[Goodies-commits] r2696 - in xfce4-places-plugin/trunk: . panel-plugin

Diego Ongaro ongardie at xfce.org
Sat Apr 21 00:47:49 CEST 2007


Author: ongardie
Date: 2007-04-20 22:47:49 +0000 (Fri, 20 Apr 2007)
New Revision: 2696

Modified:
   xfce4-places-plugin/trunk/ChangeLog
   xfce4-places-plugin/trunk/panel-plugin/view.c
Log:
2007-04-20	Diego Ongaro <ongardie at gmail.com>

* view.c: Got rid of final TODOs regarding xfdesktop's code.



Modified: xfce4-places-plugin/trunk/ChangeLog
===================================================================
--- xfce4-places-plugin/trunk/ChangeLog	2007-04-20 21:35:54 UTC (rev 2695)
+++ xfce4-places-plugin/trunk/ChangeLog	2007-04-20 22:47:49 UTC (rev 2696)
@@ -7,6 +7,7 @@
 	  Now using g_object_ref_sink() and g_object_unref() on tooltips.
 	  Connects menu deactivate signal only once per menu.
 	  Registers menu with panel before every popup.
+	  Got rid of final TODOs regarding xfdesktop's code.
 
 2007-04-14	Diego Ongaro <ongardie at gmail.com>
 

Modified: xfce4-places-plugin/trunk/panel-plugin/view.c
===================================================================
--- xfce4-places-plugin/trunk/panel-plugin/view.c	2007-04-20 21:35:54 UTC (rev 2695)
+++ xfce4-places-plugin/trunk/panel-plugin/view.c	2007-04-20 22:47:49 UTC (rev 2696)
@@ -104,7 +104,6 @@
     gtk_tooltips_set_tip(pd->view_tooltips, pd->view_button, _("Places"), NULL);
     
     pd->view_button_image = gtk_image_new();
-    // TODO: why does xfdesktop ref the new image?
     gtk_widget_show(pd->view_button_image);
     gtk_container_add(GTK_CONTAINER(pd->view_button), pd->view_button_image);
 
@@ -374,14 +373,12 @@
 
 // Button
 static gboolean
-places_view_cb_button_pressed(PlacesData *pd, GdkEventButton *ev)
+places_view_cb_button_pressed(PlacesData *pd, GdkEventButton *evt)
 {
-    if(G_UNLIKELY(ev->button != 1))
+    // (it's the way xfdesktop menu does it...)
+    if(evt->button != 1 || ((evt->state & GDK_CONTROL_MASK)
+                             && !(evt->state & (GDK_MOD1_MASK|GDK_SHIFT_MASK|GDK_MOD4_MASK))))
         return FALSE;
-
-    // TODO: why does xfdesktop have:
-    // if(evt->button != 1 || ((evt->state & GDK_CONTROL_MASK)
-    //                         && !(evt->state & (GDK_MOD1_MASK|GDK_SHIFT_MASK|GDK_MOD4_MASK))))
     
     places_view_open_menu(pd);
 




More information about the Goodies-commits mailing list