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.
This commit is contained in:
Michael Natterer 2016-09-02 20:47:51 +02:00
parent 9317952375
commit 44010beaed
1 changed files with 4 additions and 4 deletions

View File

@ -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,