Fix wrong usage of gtk_file_chooser_get_filename() in callback of Open File dialogs in the preferences dialog.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2513 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
parent
c44e0869b7
commit
e7598d0839
@ -2,6 +2,9 @@
|
||||
|
||||
* src/plugins.c:
|
||||
Fix GLib warning when starting with a new config.
|
||||
* src/prefs.c:
|
||||
Fix wrong usage of gtk_file_chooser_get_filename() in callback of
|
||||
Open File dialogs in the preferences dialog.
|
||||
|
||||
|
||||
2008-04-20 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
|
||||
|
11
src/prefs.c
11
src/prefs.c
@ -1503,17 +1503,22 @@ on_prefs_tools_button_clicked (GtkButton *button,
|
||||
/* run it */
|
||||
if (gtk_dialog_run(GTK_DIALOG(dialog)) == GTK_RESPONSE_ACCEPT)
|
||||
{
|
||||
gchar *utf8_filename;
|
||||
|
||||
tmp = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(dialog));
|
||||
utf8_filename = utils_get_utf8_from_locale(tmp);
|
||||
|
||||
if (g_strv_length(field) > 1)
|
||||
filename = g_strconcat(tmp, " ", field[1], NULL);
|
||||
filename = g_strconcat(utf8_filename, " ", field[1], NULL);
|
||||
else
|
||||
{
|
||||
filename = tmp;
|
||||
tmp = NULL;
|
||||
filename = utf8_filename;
|
||||
utf8_filename = NULL;
|
||||
}
|
||||
gtk_entry_set_text(GTK_ENTRY(item), filename);
|
||||
g_free(filename);
|
||||
g_free(tmp);
|
||||
g_free(utf8_filename);
|
||||
}
|
||||
|
||||
g_strfreev(field);
|
||||
|
Loading…
x
Reference in New Issue
Block a user