[gtk+] No popup menu on the button



commit 91611193293bda1fc76d1d95ffc1bbca40fe5ce3
Author: Matthias Clasen <mclasen redhat com>
Date:   Tue Jan 31 00:39:00 2012 -0500

    No popup menu on the button

 gtk/gtkcolorswatch.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkcolorswatch.c b/gtk/gtkcolorswatch.c
index bf5edf6..4211f60 100644
--- a/gtk/gtkcolorswatch.c
+++ b/gtk/gtkcolorswatch.c
@@ -451,7 +451,8 @@ swatch_button_press (GtkWidget      *widget,
 
   gtk_widget_grab_focus (GTK_WIDGET (swatch));
 
-  if (gdk_event_triggers_context_menu ((GdkEvent *) event))
+  if (gdk_event_triggers_context_menu ((GdkEvent *) event) &&
+      swatch->priv->has_color)
     {
       do_popup (widget, event);
       return TRUE;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]