[gimp] app: properly notify on group changes in GimpLayerModeComboBox



commit 3d79f382baaa0b6359990963ffcde350c4588d82
Author: Michael Natterer <mitch gimp org>
Date:   Mon Jan 30 13:20:57 2017 +0100

    app: properly notify on group changes in GimpLayerModeComboBox

 app/widgets/gimplayermodecombobox.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/app/widgets/gimplayermodecombobox.c b/app/widgets/gimplayermodecombobox.c
index 87c8ef0..a7d0f89 100644
--- a/app/widgets/gimplayermodecombobox.c
+++ b/app/widgets/gimplayermodecombobox.c
@@ -272,14 +272,19 @@ gimp_layer_mode_combo_box_set_mode (GimpLayerModeComboBox *combo,
 
       model = gtk_combo_box_get_model (GTK_COMBO_BOX (combo));
 
+      g_object_freeze_notify (G_OBJECT (combo));
+
       if (! gimp_int_store_lookup_by_value (model, mode, &dummy))
         {
           combo->priv->group = gimp_layer_mode_get_group (mode);
+          g_object_notify (G_OBJECT (combo), "group");
 
           gimp_layer_mode_combo_box_update_model (combo, FALSE);
         }
 
       gimp_int_combo_box_set_active (GIMP_INT_COMBO_BOX (combo), mode);
+
+      g_object_thaw_notify (G_OBJECT (combo));
     }
 }
 
@@ -300,9 +305,14 @@ gimp_layer_mode_combo_box_set_group (GimpLayerModeComboBox *combo,
 
   if (group != combo->priv->group)
     {
+      g_object_freeze_notify (G_OBJECT (combo));
+
       combo->priv->group = group;
+      g_object_notify (G_OBJECT (combo), "group");
 
       gimp_layer_mode_combo_box_update_model (combo, TRUE);
+
+      g_object_thaw_notify (G_OBJECT (combo));
     }
 }
 


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