~psybers/docky/indicator-scaling

« back to all changes in this revision

Viewing changes to Docky/Docky/Items/DockyItem.cs

  • Committer: Robert Dyer
  • Date: 2010-04-04 00:51:26 UTC
  • Revision ID: psybers@gmail.com-20100404005126-7odu90q6xc4kce72
allow customizing the action of the docky button - bug 512933

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
{
33
33
        internal class DockyItem : ColoredIconDockItem, INonPersistedItem
34
34
        {
 
35
                static IPreferences prefs = DockServices.Preferences.Get <DockyItem> ();
35
36
                
36
37
                public DockyItem ()
37
38
                {
81
82
                protected override ClickAnimation OnClicked (uint button, Gdk.ModifierType mod, double xPercent, double yPercent)
82
83
                {
83
84
                        if (button == 1) {
84
 
                                ConfigurationWindow.Instance.Show ();
 
85
                                string command = prefs.Get<string> ("DockyItemCommand", "");
 
86
                                if (string.IsNullOrEmpty (command))
 
87
                                        ConfigurationWindow.Instance.Show ();
 
88
                                else
 
89
                                        DockServices.System.Execute (command);
 
90
                                
85
91
                                return ClickAnimation.Bounce;
86
92
                        }
87
93
                        return ClickAnimation.None;