2011-12-09 [pawel] 3.7.10cvs112
authorPaweł Pękala <c0rn@gazeta.pl>
Fri, 9 Dec 2011 20:29:23 +0000 (20:29 +0000)
committerPaweł Pękala <c0rn@gazeta.pl>
Fri, 9 Dec 2011 20:29:23 +0000 (20:29 +0000)
* src/summaryview.c
* src/gtk/quicksearch.c
* src/gtk/quicksearch.h
Invalidate quicksearch root folder when removed
Fixes bug #2560 'crash when unsubscribing newsgroup and
having active search field'

ChangeLog
PATCHSETS
configure.ac
src/gtk/quicksearch.c
src/gtk/quicksearch.h
src/summaryview.c

index faebda4..82833b9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2011-12-09 [pawel]     3.7.10cvs112
+
+       * src/summaryview.c
+       * src/gtk/quicksearch.c
+       * src/gtk/quicksearch.h
+               Invalidate quicksearch root folder when removed
+               Fixes bug #2560 'crash when unsubscribing newsgroup and
+               having active search field'
+
 2011-12-08 [pawel]     3.7.10cvs111
 
        * src/mimeview.c
index 2c760d3..6f0f9b5 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.274.2.339 -r 1.274.2.340 src/mainwindow.c;  cvs diff -u -r 1.94.2.224 -r 1.94.2.225 src/messageview.c;  ) > 3.7.10cvs109.patchset
 ( cvs diff -u -r 1.382.2.596 -r 1.382.2.597 src/compose.c;  ) > 3.7.10cvs110.patchset
 ( cvs diff -u -r 1.83.2.183 -r 1.83.2.184 src/mimeview.c;  ) > 3.7.10cvs111.patchset
+( cvs diff -u -r 1.395.2.440 -r 1.395.2.441 src/summaryview.c;  cvs diff -u -r 1.1.2.106 -r 1.1.2.107 src/gtk/quicksearch.c;  cvs diff -u -r 1.1.2.22 -r 1.1.2.23 src/gtk/quicksearch.h;  ) > 3.7.10cvs112.patchset
index 38fba61..fed48a9 100644 (file)
@@ -12,7 +12,7 @@ MINOR_VERSION=7
 MICRO_VERSION=10
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=111
+EXTRA_VERSION=112
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 3998dae..63acf65 100644 (file)
@@ -50,7 +50,6 @@ struct _QuickSearchRequest
 {
        QuickSearchType                  type;
        gchar                           *matchstring;
-       FolderItem                      *folderItem;
        gboolean                         recursive;
 };
 typedef struct _QuickSearchRequest QuickSearchRequest;
@@ -1511,6 +1510,12 @@ void quicksearch_reset_cur_folder_item(QuickSearch *quicksearch)
        quicksearch->root_folder_item = NULL;
 }
 
+void quicksearch_folder_item_invalidate(QuickSearch *quicksearch, FolderItem *item)
+{
+       if (quicksearch->root_folder_item == item)
+               quicksearch->root_folder_item = NULL;
+}
+
 gboolean quicksearch_is_in_typing(QuickSearch *quicksearch)
 {
        return quicksearch->in_typing;
index 2378858..cab4246 100644 (file)
@@ -65,4 +65,5 @@ gboolean quicksearch_is_fast(QuickSearch *quicksearch);
 gboolean quicksearch_is_in_typing(QuickSearch *quicksearch);
 void quicksearch_relayout(QuickSearch *quicksearch);
 void quicksearch_set_search_strings(QuickSearch *quicksearch);
+void quicksearch_folder_item_invalidate(QuickSearch *quicksearch, FolderItem *item);
 #endif /* QUICKSEARCH_H */
index a4f21d4..c1bfcb9 100644 (file)
@@ -7984,9 +7984,11 @@ static gboolean summary_update_folder_hook(gpointer source, gpointer data)
        FolderUpdateData *hookdata;
        SummaryView *summaryview = (SummaryView *)data;
        hookdata = source;
-       if (hookdata->update_flags & FOLDER_REMOVE_FOLDERITEM)
+       if (hookdata->update_flags & FOLDER_REMOVE_FOLDERITEM) {
                summary_update_unread(summaryview, hookdata->item);
-       else
+               quicksearch_folder_item_invalidate(summaryview->quicksearch,
+                                                  hookdata->item);
+       } else
                summary_update_unread(summaryview, NULL);
 
        return FALSE;