[gimp] Bug 749756 - Unable to pick an ICC profile from disk



commit 167262408daadea138fb6fb98288ff4546cd0480
Author: Michael Natterer <mitch gimp org>
Date:   Sun May 24 18:39:18 2015 +0200

    Bug 749756 - Unable to pick an ICC profile from disk
    
    Block the config's "notify" signal when setting a NULL filename from a
    GimpColorProfileComboBox. The notify callback was only introduced
    because GimpColorConfig is now validating the profiles. Validation of
    a NULL profile never fails, but the NULL notify from the config
    prevented the profile file chooser dialog from appearing.

 app/dialogs/preferences-dialog.c |   16 +++++++++++++++-
 1 files changed, 15 insertions(+), 1 deletions(-)
---
diff --git a/app/dialogs/preferences-dialog.c b/app/dialogs/preferences-dialog.c
index 31f776e..3ba6cfa 100644
--- a/app/dialogs/preferences-dialog.c
+++ b/app/dialogs/preferences-dialog.c
@@ -780,16 +780,30 @@ prefs_table_new (gint          rows,
   return table;
 }
 
-static void
+static void   prefs_profile_combo_notify (GObject                  *config,
+                                          const GParamSpec         *param_spec,
+                                          GimpColorProfileComboBox *combo);
+
+  static void
 prefs_profile_combo_changed (GimpColorProfileComboBox *combo,
                              GObject                  *config)
 {
   gchar *filename = gimp_color_profile_combo_box_get_active (combo);
 
+  if (! filename)
+    g_signal_handlers_block_by_func (config,
+                                     prefs_profile_combo_notify,
+                                     combo);
+
   g_object_set (config,
                 g_object_get_data (G_OBJECT (combo), "property-name"), filename,
                 NULL);
 
+  if (! filename)
+    g_signal_handlers_unblock_by_func (config,
+                                       prefs_profile_combo_notify,
+                                       combo);
+
   g_free (filename);
 }
 


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