~bratsche/ubuntu/maverick/monodevelop/disable-appmenu

« back to all changes in this revision

Viewing changes to src/core/MonoDevelop.Components/MonoDevelop.Components.Commands/KeyBindingManager.cs

  • Committer: Bazaar Package Importer
  • Author(s): Stefan Ebner
  • Date: 2009-03-17 17:55:55 UTC
  • mfrom: (1.1.13 sid)
  • Revision ID: james.westby@ubuntu.com-20090317175555-2w5qbmu0l5maq6fq
Tags: 1.9.3+dfsg-1ubuntu1
* FFe for Monodevelop 2 granted by motu-release team :)
* Merge from Debian Unstable , remaining Ubuntu changes:
  + debian/control:
    - Update for Gnome# 2.24

Show diffs side-by-side

added added

removed removed

Lines of Context:
44
44
//   binding: The full key binding for a command/action.
45
45
//
46
46
 
47
 
namespace MonoDevelop.Components.Commands {
48
 
        public class KeyBindingManager {
49
 
                Dictionary<string, List<Command>> bindings;
50
 
                Dictionary<string, int> modes;
51
 
                List<Command> commands;
52
 
                
53
 
#region Constructors
54
 
                public KeyBindingManager ()
55
 
                {
56
 
                        bindings = new Dictionary<string, List<Command>> ();
57
 
                        modes = new Dictionary<string, int> ();
58
 
                        commands = new List<Command> ();
59
 
                }
60
 
                
61
 
                ~KeyBindingManager ()
62
 
                {
 
47
namespace MonoDevelop.Components.Commands
 
48
{
 
49
        public class KeyBindingManager : IDisposable
 
50
        {
 
51
                Dictionary<string, List<Command>> bindings = new Dictionary<string, List<Command>> ();
 
52
                Dictionary<string, int> modes = new Dictionary<string, int> ();
 
53
                List<Command> commands = new List<Command> ();
 
54
                
 
55
                public void Dispose ()
 
56
                {
 
57
                        if (commands == null)
 
58
                                return;
 
59
                        
63
60
                        for (int i = 0; i < commands.Count; i++)
64
61
                                commands[i].KeyBindingChanged -= OnKeyBindingChanged;
 
62
                        commands = null;
65
63
                }
66
 
#endregion
67
64
                
68
65
#region Static Public Helpers For Building Key-Binding Strings
69
66
                static string KeyToString (Gdk.Key key)