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.
This commit is contained in:
Matthias Clasen 2015-06-13 22:32:05 -04:00
parent 822886edbc
commit d1f2e5896b

View File

@ -202,7 +202,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));