From 44010beaed9fdaa0a1bead9b7bf00735eabc0e78 Mon Sep 17 00:00:00 2001 From: Michael Natterer Date: Fri, 2 Sep 2016 20:47:51 +0200 Subject: [PATCH] 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 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libgimpwidgets/gimppropwidgets.c b/libgimpwidgets/gimppropwidgets.c index df44ad9705..9f9a3b3a00 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,