Skip to content

Instantly share code, notes, and snippets.

@garrett
Created March 2, 2009 12:02
Show Gist options
  • Save garrett/72721 to your computer and use it in GitHub Desktop.
Save garrett/72721 to your computer and use it in GitHub Desktop.
patch to make GNOME Do's contextual menu (in docky mode) much more usable, by moving the window list closer to the icon and removing the "remove from dock" item
=== modified file 'Do.Interface.Linux.Docky/src/Docky.Interface/Docky.Interface.Items/ApplicationDockItem.cs'
--- Do.Interface.Linux.Docky/src/Docky.Interface/Docky.Interface.Items/ApplicationDockItem.cs 2009-03-01 23:01:00 +0000
+++ Do.Interface.Linux.Docky/src/Docky.Interface/Docky.Interface.Items/ApplicationDockItem.cs 2009-03-02 11:58:57 +0000
@@ -305,16 +305,16 @@
public IEnumerable<AbstractMenuArgs> GetMenuItems ()
{
- foreach (Wnck.Window window in VisibleWindows)
- yield return new WindowMenuButtonArgs (window, window.Name, WindowIcon);
-
- yield return new SeparatorMenuButtonArgs ();
-
yield return new SimpleMenuButtonArgs (() => WindowControl.MinimizeRestoreWindows (VisibleWindows),
MinimizeRestoreText, MinimizeIcon);
yield return new SimpleMenuButtonArgs (() => WindowControl.CloseWindows (VisibleWindows),
CloseText, Gtk.Stock.Quit);
+
+ yield return new SeparatorMenuButtonArgs ();
+
+ foreach (Wnck.Window window in VisibleWindows)
+ yield return new WindowMenuButtonArgs (window, window.Name, WindowIcon);
}
public override void Dispose ()
=== modified file 'Do.Interface.Linux.Docky/src/Docky.Interface/Docky.Interface.Items/ItemDockItem.cs'
--- Do.Interface.Linux.Docky/src/Docky.Interface/Docky.Interface.Items/ItemDockItem.cs 2009-03-01 04:24:20 +0000
+++ Do.Interface.Linux.Docky/src/Docky.Interface/Docky.Interface.Items/ItemDockItem.cs 2009-03-02 11:58:57 +0000
@@ -281,16 +281,16 @@
{
bool hasApps = HasVisibleApps;
+ foreach (Act act in ActionsForItem)
+ yield return new LaunchMenuButtonArgs (act, element, act.Name, act.Icon);
+
if (hasApps) {
+ yield return new SeparatorMenuButtonArgs ();
foreach (Wnck.Window window in VisibleWindows)
yield return new WindowMenuButtonArgs (window, window.Name, Icon);
- yield return new SeparatorMenuButtonArgs ();
}
- foreach (Act act in ActionsForItem)
- yield return new LaunchMenuButtonArgs (act, element, act.Name, act.Icon);
-
- yield return new SimpleMenuButtonArgs (OnRemoveClicked, Catalog.GetString ("Remove from Dock"), Gtk.Stock.Remove);
+ //yield return new SimpleMenuButtonArgs (OnRemoveClicked, Catalog.GetString ("Remove from Dock"), Gtk.Stock.Remove);
}
#endregion
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment