Revision: 3896 http://geany.svn.sourceforge.net/geany/?rev=3896&view=rev Author: ntrel Date: 2009-06-25 12:39:21 +0000 (Thu, 25 Jun 2009)
Log Message: ----------- Fix Gtk NULL warning with gtk_file_chooser_set_current_folder(). Fix using locale encoding for default Save As dialog path.
Modified Paths: -------------- trunk/ChangeLog trunk/src/dialogs.c
Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2009-06-24 18:42:28 UTC (rev 3895) +++ trunk/ChangeLog 2009-06-25 12:39:21 UTC (rev 3896) @@ -1,3 +1,10 @@ +2009-06-25 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com> + + * src/dialogs.c: + Fix Gtk NULL warning with gtk_file_chooser_set_current_folder(). + Fix using locale encoding for default Save As dialog path. + + 2009-06-24 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* data/ui_toolbar.xml, src/toolbar.c:
Modified: trunk/src/dialogs.c =================================================================== --- trunk/src/dialogs.c 2009-06-24 18:42:28 UTC (rev 3895) +++ trunk/src/dialogs.c 2009-06-25 12:39:21 UTC (rev 3896) @@ -414,6 +414,7 @@ static void create_save_file_dialog(void) { GtkWidget *vbox, *check_open_new_tab, *rename_btn; + const gchar *initdir;
ui_widgets.save_filesel = gtk_file_chooser_dialog_new(_("Save File"), GTK_WINDOW(main_widgets.window), GTK_FILE_CHOOSER_ACTION_SAVE, NULL, NULL); @@ -445,8 +446,13 @@ gtk_file_chooser_set_local_only(GTK_FILE_CHOOSER(ui_widgets.save_filesel), FALSE);
/* set the folder by default to the project base dir or the global pref for opening files */ - gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(ui_widgets.save_filesel), - utils_get_default_dir_utf8()); + initdir = utils_get_default_dir_utf8(); + if (initdir) + { + gchar *linitdir = utils_get_locale_from_utf8(initdir); + gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(ui_widgets.save_filesel), linitdir); + g_free(linitdir); + }
g_signal_connect(check_open_new_tab, "toggled", G_CALLBACK(on_save_as_new_tab_toggled), rename_btn);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.