[gimp] libgimpwidgets: use gimp_config_path_unexpand() in gimp_prop_file_choose_button



commit 44010beaed9fdaa0a1bead9b7bf00735eabc0e78
Author: Michael Natterer <mitch gimp org>
Date:   Fri Sep 2 20:47:51 2016 +0200

    libgimpwidgets: use gimp_config_path_unexpand() in gimp_prop_file_choose_button
    
    instead of a plain g_filename_to_utf8(), so special paths like
    ${gimp_dir}, ${gimp_plug_in_dir} etc get substituted correctly.

 libgimpwidgets/gimppropwidgets.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/libgimpwidgets/gimppropwidgets.c b/libgimpwidgets/gimppropwidgets.c
index df44ad9..9f9a3b3 100644
--- a/libgimpwidgets/gimppropwidgets.c
+++ b/libgimpwidgets/gimppropwidgets.c
@@ -2421,7 +2421,7 @@ gimp_prop_file_chooser_button_callback (GtkFileChooser *button,
     return;
 
   value = gtk_file_chooser_get_filename (button);
-  utf8 = value ? g_filename_to_utf8 (value, -1, NULL, NULL, NULL) : NULL;
+  utf8 = value ? gimp_config_path_unexpand (value, TRUE, NULL) : NULL;
   g_free (value);
 
   g_object_get (config,
@@ -2591,7 +2591,7 @@ gimp_prop_path_editor_path_callback (GimpPathEditor *editor,
     return;
 
   value = gimp_path_editor_get_path (editor);
-  utf8 = g_filename_to_utf8 (value, -1, NULL, NULL, NULL);
+  utf8 = value ? gimp_config_path_unexpand (value, TRUE, NULL) : NULL;
   g_free (value);
 
   g_signal_handlers_block_by_func (config,
@@ -2611,7 +2611,7 @@ gimp_prop_path_editor_path_callback (GimpPathEditor *editor,
   if (writable_param_spec)
     {
       value = gimp_path_editor_get_writable_path (editor);
-      utf8 = g_filename_to_utf8 (value, -1, NULL, NULL, NULL);
+      utf8 = value ? gimp_config_path_unexpand (value, TRUE, NULL) : NULL;
       g_free (value);
 
       g_signal_handlers_block_by_func (config,
@@ -2644,7 +2644,7 @@ gimp_prop_path_editor_writable_callback (GimpPathEditor *editor,
     return;
 
   value = gimp_path_editor_get_writable_path (editor);
-  utf8 = g_filename_to_utf8 (value, -1, NULL, NULL, NULL);
+  utf8 = value ? gimp_config_path_unexpand (value, TRUE, NULL) : NULL;
   g_free (value);
 
   g_signal_handlers_block_by_func (config,


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