[gtk+/gtk-3-14] color editor: make popups toggleable



commit 2d1ea4c1a08703cdd0887b870fa8c05584a423f5
Author: Matthias Clasen <mclasen redhat com>
Date:   Sat Jun 13 22:32:05 2015 -0400

    color editor: make popups toggleable
    
    The popups on the color editor are somewhat hard to get rid of.
    Arrange things so that clicking the same control again dismisses
    the current popup.

 gtk/gtkcoloreditor.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkcoloreditor.c b/gtk/gtkcoloreditor.c
index c647b8c..7145dba 100644
--- a/gtk/gtkcoloreditor.c
+++ b/gtk/gtkcoloreditor.c
@@ -208,7 +208,9 @@ popup_edit (GtkWidget      *widget,
       focus = editor->priv->a_entry;
     }
 
-  if (popup)
+  if (popup == editor->priv->current_popup)
+    dismiss_current_popup (editor);
+  else if (popup)
     {
       dismiss_current_popup (editor);
       toplevel = gtk_widget_get_toplevel (GTK_WIDGET (editor));


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