[gtk+] GtkColorChooserWidget: deselect swatch before removing palettes
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] GtkColorChooserWidget: deselect swatch before removing palettes
- Date: Mon, 4 Mar 2013 23:31:28 +0000 (UTC)
commit 670e532a6ba528f3b1b9a359a05cec80da94ebd9
Author: Michael Hofmann <mh21 mh21 de>
Date: Sun Feb 17 16:01:06 2013 +0100
GtkColorChooserWidget: deselect swatch before removing palettes
When adding custom palettes, set the current swatch to NULL if the
palette it is on is going to be removed.
https://bugzilla.gnome.org/show_bug.cgi?id=693995
gtk/gtkcolorchooserwidget.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkcolorchooserwidget.c b/gtk/gtkcolorchooserwidget.c
index be954a2..8e6cf2c 100644
--- a/gtk/gtkcolorchooserwidget.c
+++ b/gtk/gtkcolorchooserwidget.c
@@ -296,6 +296,10 @@ remove_palette (GtkColorChooserWidget *cc)
GList *children, *l;
GtkWidget *widget;
+ if (cc->priv->current != NULL &&
+ gtk_widget_get_parent (GTK_WIDGET (cc->priv->current)) != cc->priv->custom)
+ cc->priv->current = NULL;
+
children = gtk_container_get_children (GTK_CONTAINER (cc->priv->palette));
for (l = children; l; l = l->next)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]