summaryrefslogtreecommitdiff
path: root/gtk/gtkfilechooserdefault.c
diff options
context:
space:
mode:
authorBenjamin Otte <otte@gnome.org>2009-06-25 15:50:55 +0200
committerBenjamin Otte <otte@gnome.org>2009-06-27 11:32:57 +0200
commit02ac8ea3af92887fedd6b7cf2cf01c5565a5b2d2 (patch)
treeb0247dbd5c3b096c826ac7ef4f40eca01b53054a /gtk/gtkfilechooserdefault.c
parent6c18c25adbf61a5291f53b2e3dc11ba4e46b5b21 (diff)
downloadgtk+-02ac8ea3af92887fedd6b7cf2cf01c5565a5b2d2.tar.gz
make sure the "Create folder" button doesn't get shown accidentally
Switching to search or recent files mode and back to browse mode made the button visible previously
Diffstat (limited to 'gtk/gtkfilechooserdefault.c')
-rw-r--r--gtk/gtkfilechooserdefault.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/gtk/gtkfilechooserdefault.c b/gtk/gtkfilechooserdefault.c
index ccb5453c07..b6aae66939 100644
--- a/gtk/gtkfilechooserdefault.c
+++ b/gtk/gtkfilechooserdefault.c
@@ -5520,8 +5520,6 @@ update_appearance (GtkFileChooserDefault *impl)
gtk_widget_hide (impl->browse_widgets);
}
- gtk_widget_show (impl->browse_new_folder_button);
-
if (impl->select_multiple)
{
g_warning ("Save mode cannot be set in conjunction with multiple selection mode. "
@@ -9131,7 +9129,11 @@ search_switch_to_browse_mode (GtkFileChooserDefault *impl)
impl->search_entry = NULL;
gtk_widget_show (impl->browse_path_bar);
- gtk_widget_show (impl->browse_new_folder_button);
+ if (impl->action == GTK_FILE_CHOOSER_ACTION_OPEN)
+ gtk_widget_hide (impl->browse_new_folder_button);
+ else
+ gtk_widget_show (impl->browse_new_folder_button);
+
if (impl->action == GTK_FILE_CHOOSER_ACTION_OPEN ||
impl->action == GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER)
@@ -9696,7 +9698,10 @@ recent_switch_to_browse_mode (GtkFileChooserDefault *impl)
impl->recent_hbox = NULL;
gtk_widget_show (impl->browse_path_bar);
- gtk_widget_show (impl->browse_new_folder_button);
+ if (impl->action == GTK_FILE_CHOOSER_ACTION_OPEN)
+ gtk_widget_hide (impl->browse_new_folder_button);
+ else
+ gtk_widget_show (impl->browse_new_folder_button);
if (impl->action == GTK_FILE_CHOOSER_ACTION_OPEN ||
impl->action == GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER)