From: John Darrington Date: Sun, 7 Aug 2011 09:38:37 +0000 (+0200) Subject: Set the "local-only" property on GtkFileChooser widgets to FALSE X-Git-Tag: v0.7.9~166 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3ca11d9dd35fd7a6f343e008724a7b245dc2e6e5;p=pspp-builds.git Set the "local-only" property on GtkFileChooser widgets to FALSE --- diff --git a/src/ui/gui/aggregate-dialog.c b/src/ui/gui/aggregate-dialog.c index c06011da..2ebb844e 100644 --- a/src/ui/gui/aggregate-dialog.c +++ b/src/ui/gui/aggregate-dialog.c @@ -164,6 +164,7 @@ choose_filename (struct aggregate *fd) GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_OK, GTK_RESPONSE_ACCEPT, NULL); + g_object_set (dialog, "local-only", FALSE, NULL); gtk_file_chooser_set_do_overwrite_confirmation (GTK_FILE_CHOOSER (dialog), TRUE); diff --git a/src/ui/gui/psppire-data-window.c b/src/ui/gui/psppire-data-window.c index e695310e..fe9f8df6 100644 --- a/src/ui/gui/psppire-data-window.c +++ b/src/ui/gui/psppire-data-window.c @@ -492,6 +492,7 @@ static void data_pick_filename (PsppireWindow *window) { PsppireDataWindow *de = PSPPIRE_DATA_WINDOW (window); + GtkFileFilter *filter = gtk_file_filter_new (); GtkWidget *button_sys; GtkWidget *dialog = gtk_file_chooser_dialog_new (_("Save"), @@ -501,7 +502,8 @@ data_pick_filename (PsppireWindow *window) GTK_STOCK_SAVE, GTK_RESPONSE_ACCEPT, NULL); - GtkFileFilter *filter = gtk_file_filter_new (); + g_object_set (dialog, "local-only", FALSE, NULL); + gtk_file_filter_set_name (filter, _("System Files (*.sav)")); gtk_file_filter_add_pattern (filter, "*.sav"); gtk_file_filter_add_pattern (filter, "*.SAV"); diff --git a/src/ui/gui/psppire-output-window.c b/src/ui/gui/psppire-output-window.c index cf65a2f9..a29fcc6c 100644 --- a/src/ui/gui/psppire-output-window.c +++ b/src/ui/gui/psppire-output-window.c @@ -586,6 +586,8 @@ psppire_output_window_export (PsppireOutputWindow *window) GTK_STOCK_SAVE, GTK_RESPONSE_ACCEPT, NULL); + g_object_set (dialog, "local-only", FALSE, NULL); + chooser = GTK_FILE_CHOOSER (dialog); list = create_file_type_list (); diff --git a/src/ui/gui/psppire-syntax-window.c b/src/ui/gui/psppire-syntax-window.c index b117825f..47df52be 100644 --- a/src/ui/gui/psppire-syntax-window.c +++ b/src/ui/gui/psppire-syntax-window.c @@ -574,6 +574,8 @@ syntax_pick_filename (PsppireWindow *window) GTK_STOCK_SAVE, GTK_RESPONSE_ACCEPT, NULL); + g_object_set (dialog, "local-only", FALSE, NULL); + filter = gtk_file_filter_new (); gtk_file_filter_set_name (filter, _("Syntax Files (*.sps) ")); gtk_file_filter_add_pattern (filter, "*.sps"); diff --git a/src/ui/gui/psppire-window.c b/src/ui/gui/psppire-window.c index 54ece05d..2b521970 100644 --- a/src/ui/gui/psppire-window.c +++ b/src/ui/gui/psppire-window.c @@ -709,6 +709,7 @@ psppire_window_load (PsppireWindow *w, const gchar *file) GtkWidget * psppire_window_file_chooser_dialog (PsppireWindow *toplevel) { + GtkFileFilter *filter = gtk_file_filter_new (); GtkWidget *dialog = gtk_file_chooser_dialog_new (_("Open"), GTK_WINDOW (toplevel), @@ -717,9 +718,8 @@ psppire_window_file_chooser_dialog (PsppireWindow *toplevel) GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT, NULL); - GtkFileFilter *filter; + g_object_set (dialog, "local-only", FALSE, NULL); - filter = gtk_file_filter_new (); gtk_file_filter_set_name (filter, _("Data and Syntax Files")); gtk_file_filter_add_pattern (filter, "*.sav"); gtk_file_filter_add_pattern (filter, "*.SAV"); diff --git a/src/ui/gui/text-data-import-dialog.c b/src/ui/gui/text-data-import-dialog.c index 38d23fe0..09daa0e6 100644 --- a/src/ui/gui/text-data-import-dialog.c +++ b/src/ui/gui/text-data-import-dialog.c @@ -525,16 +525,17 @@ destroy_file (struct import_assistant *ia) static char * choose_file (GtkWindow *parent_window) { - GtkWidget *dialog; char *file_name; - dialog = gtk_file_chooser_dialog_new (_("Import Delimited Text Data"), + GtkWidget *dialog = gtk_file_chooser_dialog_new (_("Import Delimited Text Data"), parent_window, GTK_FILE_CHOOSER_ACTION_OPEN, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT, NULL); + g_object_set (dialog, "local-only", FALSE, NULL); + switch (gtk_dialog_run (GTK_DIALOG (dialog))) { case GTK_RESPONSE_ACCEPT: