Author: mhabersack
Date: 2007-06-25 14:17:10 -0400 (Mon, 25 Jun 2007)
New Revision: 80711
Modified:
trunk/moon/desklet/panel/ChangeLog
trunk/moon/desklet/panel/PanelWindow.cs
Log:
2007-06-25 Marek Habersack <[EMAIL PROTECTED]>
* PanelWindow.cs: Added a handler for the Activate event to toggle
window
visibility.
Modified: trunk/moon/desklet/panel/ChangeLog
===================================================================
--- trunk/moon/desklet/panel/ChangeLog 2007-06-25 18:08:30 UTC (rev 80710)
+++ trunk/moon/desklet/panel/ChangeLog 2007-06-25 18:17:10 UTC (rev 80711)
@@ -1,6 +1,8 @@
2007-06-25 Marek Habersack <[EMAIL PROTECTED]>
* PanelWindow.cs: added a handler for the icon popup menu.
+ Added a handler for the Activate event to toggle window
+ visibility.
* Panel.cs: added status icon. Graphics is loaded from resources
Modified: trunk/moon/desklet/panel/PanelWindow.cs
===================================================================
--- trunk/moon/desklet/panel/PanelWindow.cs 2007-06-25 18:08:30 UTC (rev
80710)
+++ trunk/moon/desklet/panel/PanelWindow.cs 2007-06-25 18:17:10 UTC (rev
80711)
@@ -26,6 +26,7 @@
statusIcon = new StatusIcon (icon);
statusIcon = statusIcon;
statusIcon.PopupMenu += new PopupMenuHandler (IconPopupHandler);
+ statusIcon.Activate += new EventHandler (IconActivateHandler);
}
void IconPopupHandler (object o, PopupMenuArgs args)
@@ -37,7 +38,16 @@
// broken
// popup.Popup (null, null, new MenuPositionFunc
(StatusIcon.PositionMenu),
// null, args.Event.Button,
Gtk.Global.CurrentEventTime);
+ popup.Popup ();
}
+
+ void IconActivateHandler (object o, EventArgs args)
+ {
+ if (Visible)
+ Hide ();
+ else
+ Show ();
+ }
protected void OnDeleteEvent (object sender, DeleteEventArgs a)
{
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches