Kaydet (Commit) 9fb2ff88 authored tarafından Nick Treleaven's avatar Nick Treleaven

Fix Gtk NULL warning with gtk_file_chooser_set_current_folder().

Fix using locale encoding for default Save As dialog path.



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3896 ea778897-0a13-0410-b9d1-a72fbfd435f5
üst e44071db
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:
......
......@@ -414,6 +414,7 @@ on_file_save_dialog_response (GtkDialog *dialog,
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 @@ static void create_save_file_dialog(void)
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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment