[PATCH] Fix for deleting last remaining filter



Attempting to delete the last existing filter (Edit->Filters...), cannot be done because the OK button becomes greyed out after the Delete button is pressed.

It is caused by a "changed" signal issuing a callback to fe_action_changed, which resets the various buttons inappropriately for this case. The patch simply moves the set_button_sensitivities call down two lines, below the responsible line:

  gtk_entry_set_text(GTK_ENTRY(fe_name_entry),"");


--- balsa/src/filter-edit-callbacks.c	2005-10-02 14:43:19.000000000 -0400
+++ localBalsa/src/filter-edit-callbacks.c	2005-10-02 15:30:40.000000000 -0400
@@ -1700,12 +1700,17 @@
         gtk_tree_selection_select_path(selection, path);
     else {
         /* ...the store is empty: */
-        /* We make the filters delete,revert,apply buttons unsensitive */
-        gtk_widget_set_sensitive(fe_delete_button,FALSE);
-        set_button_sensitivities(FALSE);
         /* We clear all widgets */
         gtk_entry_set_text(GTK_ENTRY(fe_name_entry),"");
         gtk_entry_set_text(GTK_ENTRY(fe_popup_entry),"");
+
+        /* fe_name_entry "changed" signal calls
+         * set_button_sensitivities(TRUE) so, we
+         * make the filters delete, revert, apply
+         * buttons unsensitive here */
+        gtk_widget_set_sensitive(fe_delete_button,FALSE);
+        set_button_sensitivities(FALSE);
+
         /*gtk_option_menu_set_history(GTK_OPTION_MENU(fe_mailboxes), 0); */
 #if !GTK_CHECK_VERSION(2, 6, 0)
         gtk_entry_set_text(GTK_ENTRY(gnome_file_entry_gtk_entry(GNOME_FILE_ENTRY(fe_sound_entry))),"");



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]