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 356edc5483
commit 37e36e7f1d

View File

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