From e44612e7da51de88d91526ac1d18e345047939b9 Mon Sep 17 00:00:00 2001 From: Federico Mena Quintero Date: Sat, 20 Nov 2004 02:00:45 +0000 Subject: [PATCH] Merged from gtk-2-4: 2004-11-19 Federico Mena Quintero Merged from gtk-2-4: Fix #141077. Based on a patch by Christian Neumair : * gtk/gtkfilechooserdefault.c (new_folder_button_clicked): Desensitize the "new folder" button. (edited_idle_cb): Sensitize the button back. --- ChangeLog | 10 ++++++++++ ChangeLog.pre-2-10 | 10 ++++++++++ ChangeLog.pre-2-6 | 10 ++++++++++ ChangeLog.pre-2-8 | 10 ++++++++++ gtk/gtkfilechooserdefault.c | 5 +++++ 5 files changed, 45 insertions(+) diff --git a/ChangeLog b/ChangeLog index 9492c15944..9356db4a8a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2004-11-19 Federico Mena Quintero + + Merged from gtk-2-4: + + Fix #141077. Based on a patch by Christian Neumair : + + * gtk/gtkfilechooserdefault.c (new_folder_button_clicked): + Desensitize the "new folder" button. + (edited_idle_cb): Sensitize the button back. + 2004-11-19 Federico Mena Quintero Merged from gtk-2-4: diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 9492c15944..9356db4a8a 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,13 @@ +2004-11-19 Federico Mena Quintero + + Merged from gtk-2-4: + + Fix #141077. Based on a patch by Christian Neumair : + + * gtk/gtkfilechooserdefault.c (new_folder_button_clicked): + Desensitize the "new folder" button. + (edited_idle_cb): Sensitize the button back. + 2004-11-19 Federico Mena Quintero Merged from gtk-2-4: diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 9492c15944..9356db4a8a 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,13 @@ +2004-11-19 Federico Mena Quintero + + Merged from gtk-2-4: + + Fix #141077. Based on a patch by Christian Neumair : + + * gtk/gtkfilechooserdefault.c (new_folder_button_clicked): + Desensitize the "new folder" button. + (edited_idle_cb): Sensitize the button back. + 2004-11-19 Federico Mena Quintero Merged from gtk-2-4: diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 9492c15944..9356db4a8a 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,13 @@ +2004-11-19 Federico Mena Quintero + + Merged from gtk-2-4: + + Fix #141077. Based on a patch by Christian Neumair : + + * gtk/gtkfilechooserdefault.c (new_folder_button_clicked): + Desensitize the "new folder" button. + (edited_idle_cb): Sensitize the button back. + 2004-11-19 Federico Mena Quintero Merged from gtk-2-4: diff --git a/gtk/gtkfilechooserdefault.c b/gtk/gtkfilechooserdefault.c index a47576a5bf..6ca67556df 100644 --- a/gtk/gtkfilechooserdefault.c +++ b/gtk/gtkfilechooserdefault.c @@ -1568,6 +1568,9 @@ new_folder_button_clicked (GtkButton *button, if (!impl->browse_files_model) return; /* FIXME: this sucks. Disable the New Folder button or something. */ + /* Prevent button from being clicked twice */ + gtk_widget_set_sensitive (impl->browse_new_folder_button, FALSE); + _gtk_file_system_model_add_editable (impl->browse_files_model, &iter); path = gtk_tree_model_get_path (GTK_TREE_MODEL (impl->browse_files_model), &iter); @@ -1596,6 +1599,8 @@ edited_idle_cb (GtkFileChooserDefault *impl) _gtk_file_system_model_remove_editable (impl->browse_files_model); g_object_set (impl->list_name_renderer, "editable", FALSE, NULL); + gtk_widget_set_sensitive (impl->browse_new_folder_button, TRUE); + if (impl->edited_new_text) /* not cancelled? */ { GError *error;