It's enough to check for GTK 2.14 at runtime, not at build time when to determine whether to show non-local folders in the file chooser dialogs.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3547 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
Enrico Tröger 2009-02-04 20:04:49 +00:00
parent 1fc1e8f24a
commit bbd58c2856
2 changed files with 8 additions and 6 deletions

View File

@ -7,6 +7,10 @@
(neither in the user's config nor in the global filetypes.php) and (neither in the user's config nor in the global filetypes.php) and
(un)commenting is used outside of the PHP tags (un)commenting is used outside of the PHP tags
(reported by Frank, thanks). (reported by Frank, thanks).
* src/dialogs.c:
It's enough to check for GTK 2.14 at runtime, not at build time when
to determine whether to show non-local folders in the file chooser
dialogs.
2009-02-02 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de> 2009-02-02 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>

View File

@ -195,9 +195,8 @@ static void create_open_file_dialog(void)
gtk_window_set_type_hint(GTK_WINDOW(ui_widgets.open_filesel), GDK_WINDOW_TYPE_HINT_DIALOG); gtk_window_set_type_hint(GTK_WINDOW(ui_widgets.open_filesel), GDK_WINDOW_TYPE_HINT_DIALOG);
gtk_window_set_transient_for(GTK_WINDOW(ui_widgets.open_filesel), GTK_WINDOW(main_widgets.window)); gtk_window_set_transient_for(GTK_WINDOW(ui_widgets.open_filesel), GTK_WINDOW(main_widgets.window));
gtk_file_chooser_set_select_multiple(GTK_FILE_CHOOSER(ui_widgets.open_filesel), TRUE); gtk_file_chooser_set_select_multiple(GTK_FILE_CHOOSER(ui_widgets.open_filesel), TRUE);
#if GTK_CHECK_VERSION(2, 14, 0) if (gtk_check_version(2, 14, 0) == NULL)
gtk_file_chooser_set_local_only(GTK_FILE_CHOOSER(ui_widgets.open_filesel), FALSE); gtk_file_chooser_set_local_only(GTK_FILE_CHOOSER(ui_widgets.open_filesel), FALSE);
#endif
/* add checkboxes and filename entry */ /* add checkboxes and filename entry */
gtk_file_chooser_set_extra_widget(GTK_FILE_CHOOSER(ui_widgets.open_filesel), gtk_file_chooser_set_extra_widget(GTK_FILE_CHOOSER(ui_widgets.open_filesel),
@ -481,9 +480,8 @@ static void create_save_file_dialog(void)
gtk_widget_show_all(vbox); gtk_widget_show_all(vbox);
gtk_file_chooser_set_extra_widget(GTK_FILE_CHOOSER(ui_widgets.save_filesel), vbox); gtk_file_chooser_set_extra_widget(GTK_FILE_CHOOSER(ui_widgets.save_filesel), vbox);
gtk_file_chooser_set_do_overwrite_confirmation(GTK_FILE_CHOOSER(ui_widgets.save_filesel), TRUE); gtk_file_chooser_set_do_overwrite_confirmation(GTK_FILE_CHOOSER(ui_widgets.save_filesel), TRUE);
#if GTK_CHECK_VERSION(2, 14, 0) if (gtk_check_version(2, 14, 0) == NULL)
gtk_file_chooser_set_local_only(GTK_FILE_CHOOSER(ui_widgets.save_filesel), FALSE); gtk_file_chooser_set_local_only(GTK_FILE_CHOOSER(ui_widgets.save_filesel), FALSE);
#endif
g_signal_connect(check_open_new_tab, "toggled", g_signal_connect(check_open_new_tab, "toggled",
G_CALLBACK(on_save_as_new_tab_toggled), rename_btn); G_CALLBACK(on_save_as_new_tab_toggled), rename_btn);