~vcs-imports/beagle/trunk

« back to all changes in this revision

Viewing changes to search/Beagle.Search/Search.cs

  • Committer: dbera
  • Date: 2008-07-08 23:52:06 UTC
  • Revision ID: vcs-imports@canonical.com-20080708235206-1axm3o8wmkjxawcq
Add a python script (from CCSM) to grab shortcut keys from user input. Use the script in beagle-settings to get the shortcut key for beagle-search. Store the entire binding string in config instead of separately storing ctrl, alt and the key. Note that CCSM is GPLv2+ so we are including the script as GPLv3. It is possible to create a C# program to do what the script does but I am not taking the risk yet.

Show diffs side-by-side

added added

removed removed

Lines of Context:
45
45
 
46
46
                                Config config = Conf.Get (Conf.Names.BeagleSearchConfig);
47
47
 
48
 
                                bool binding_ctrl = config.GetOption (Conf.Names.KeyBinding_Ctrl, false);
49
 
                                bool binding_alt = config.GetOption (Conf.Names.KeyBinding_Alt, false);
50
 
                                string binding_key = config.GetOption (Conf.Names.KeyBinding_Key, "F12");
51
 
 
52
48
                                string tip_text = Catalog.GetString ("Desktop Search");
53
 
                                string binding = new KeyBinding (binding_key, binding_ctrl, binding_alt).ToString ();
 
49
                                string binding = config.GetOption ("KeyBinding", "F12");
54
50
 
55
51
                                if (!String.IsNullOrEmpty (binding)) {
56
52
                                        tip_text += String.Format (" ({0})", binding);