fix segfault in prefs_filtering.c
authorMartin Schaaf <mascha@ma-scha.de>
Thu, 27 Feb 2003 20:35:47 +0000 (20:35 +0000)
committerMartin Schaaf <mascha@ma-scha.de>
Thu, 27 Feb 2003 20:35:47 +0000 (20:35 +0000)
ChangeLog.claws
configure.ac
src/prefs_filtering.c

index f0a2a9493e5ace47f30ab432daa0d4e8b4a86fd8..729d5c1e5687edfaa65564525eaafa1ca4e4a62b 100644 (file)
@@ -1,3 +1,11 @@
+2003-02-27 [martin]    0.8.10claws56
+
+       * src/prefs_filtering.c 
+               fix segfault in prefs_filtering_ok() when the
+               last entry is deleted and prevents that the
+               message "entry not saved" comes up after deleting
+               an entry
+
 2003-02-27 [paul]      0.8.10claws55
 
        * sync with 0.8.10cvs18
index d8280e2a0aee7c27bf974d8f8c48c2efdd165e9f..a7a4ad1063554baeec6354a9c1d12ebd39437afe 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=8
 MICRO_VERSION=10
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=claws55
+EXTRA_VERSION=claws56
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl set $target
index 24950e47bcbcce1f3aa4938116a99dbd949010a7..8e15987ff64ac5a54ad75af568934f209da3bc56 100644 (file)
@@ -1065,6 +1065,8 @@ static void prefs_filtering_delete_cb(void)
 
        gtk_clist_remove(clist, row);
 
+       prefs_filtering_reset_dialog();
+
        prefs_filtering_update_hscrollbar();
 }
 
@@ -1480,19 +1482,20 @@ static void prefs_filtering_ok(void)
        prop = prefs_filtering_dialog_to_filtering(FALSE);
        if (prop != NULL) {
                str = filteringprop_to_string(prop);
+
                while (gtk_clist_get_text(GTK_CLIST(filtering.cond_clist),
                                          row, 0, &filtering_str)) {
                        if (strcmp(filtering_str, str) == 0) break;
                        row++;
                }
                if (strcmp(filtering_str, str) != 0) {
-                        val = alertpanel(_("Entry not saved"),
-                                        _("The entry was not saved. Close anyway?"),
-                                        _("Yes"), _("No"), NULL);
-                        if (G_ALERTDEFAULT != val) {
+                       val = alertpanel(_("Entry not saved"),
+                                _("The entry was not saved. Close anyway?"),
+                                _("Yes"), _("No"), NULL);
+                       if (G_ALERTDEFAULT != val) {
                                g_free(str);
                                return;
-                        }
+                       }
                }
                g_free(str);
        }