From c6f4b327e69380eaa3786136d5903c62790e5bf3 Mon Sep 17 00:00:00 2001 From: Federico Mena Quintero Date: Wed, 21 Jan 2009 19:12:58 +0000 Subject: [PATCH] GtkFileChooser: only set local_only on the location entry if it exists 2009-01-21 Federico Mena Quintero * gtk/gtkfilechooserdefault.c (save_widgets_create): Set local_only on the location entry when we create it... (set_local_only): ... and set it here only if the location entry exists. Signed-off-by: Federico Mena Quintero svn path=/trunk/; revision=22163 --- ChangeLog | 7 +++++++ gtk/gtkfilechooserdefault.c | 4 +++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 5ec87ae90..44e91fd95 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2009-01-21 Federico Mena Quintero + + * gtk/gtkfilechooserdefault.c (save_widgets_create): Set + local_only on the location entry when we create it... + (set_local_only): ... and set it here only if the location entry + exists. + 2009-01-21 Marek Kasik Bug 561801 - "scheduled printing" doesn't function as expected diff --git a/gtk/gtkfilechooserdefault.c b/gtk/gtkfilechooserdefault.c index 3492c6984..6725e980f 100644 --- a/gtk/gtkfilechooserdefault.c +++ b/gtk/gtkfilechooserdefault.c @@ -4895,6 +4895,7 @@ save_widgets_create (GtkFileChooserDefault *impl) impl->location_entry = _gtk_file_chooser_entry_new (TRUE); _gtk_file_chooser_entry_set_file_system (GTK_FILE_CHOOSER_ENTRY (impl->location_entry), impl->file_system); + _gtk_file_chooser_entry_set_local_only (GTK_FILE_CHOOSER_ENTRY (impl->location_entry), impl->local_only); gtk_entry_set_width_chars (GTK_ENTRY (impl->location_entry), 45); gtk_entry_set_activates_default (GTK_ENTRY (impl->location_entry), TRUE); gtk_table_attach (GTK_TABLE (table), impl->location_entry, @@ -5334,7 +5335,8 @@ set_local_only (GtkFileChooserDefault *impl, { impl->local_only = local_only; - _gtk_file_chooser_entry_set_local_only (GTK_FILE_CHOOSER_ENTRY (impl->location_entry), local_only); + if (impl->location_entry) + _gtk_file_chooser_entry_set_local_only (GTK_FILE_CHOOSER_ENTRY (impl->location_entry), local_only); if (impl->shortcuts_model && impl->file_system) {