2007-02-05 [colin] 2.7.2cvs24
authorColin Leroy <colin@colino.net>
Mon, 5 Feb 2007 20:36:46 +0000 (20:36 +0000)
committerColin Leroy <colin@colino.net>
Mon, 5 Feb 2007 20:36:46 +0000 (20:36 +0000)
* src/gtk/quicksearch.c
Don't reload summary list if quicksearch wasn't
active on hiding; move currently selected mail in
the visible area when showing the quicksearch

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

index 21316dd..1c9c951 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2007-02-05 [colin]     2.7.2cvs24
+
+       * src/gtk/quicksearch.c
+               Don't reload summary list if quicksearch wasn't
+               active on hiding; move currently selected mail in
+               the visible area when showing the quicksearch
+
 2007-02-05 [colin]     2.7.2cvs23
 
        * src/folderview.c
index 5c99eb1..6b3aa79 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.382.2.357 -r 1.382.2.358 src/compose.c;  cvs diff -u -r 1.1.2.22 -r 1.1.2.23 src/plugins/pgpcore/passphrase.c;  cvs diff -u -r 1.1.2.16 -r 1.1.2.17 src/plugins/pgpcore/select-keys.c;  ) > 2.7.2cvs21.patchset
 ( cvs diff -u -r 1.274.2.171 -r 1.274.2.172 src/mainwindow.c;  ) > 2.7.2cvs22.patchset
 ( cvs diff -u -r 1.207.2.146 -r 1.207.2.147 src/folderview.c;  ) > 2.7.2cvs23.patchset
+( cvs diff -u -r 1.1.2.61 -r 1.1.2.62 src/gtk/quicksearch.c;  ) > 2.7.2cvs24.patchset
index a606576..fe22eb6 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=7
 MICRO_VERSION=2
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=23
+EXTRA_VERSION=24
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index ac8cca9..a0c603a 100644 (file)
@@ -671,17 +671,34 @@ GtkWidget *quicksearch_get_widget(QuickSearch *quicksearch)
 
 void quicksearch_show(QuickSearch *quicksearch)
 {
+       MainWindow *mainwin = mainwindow_get_mainwindow();
+       GtkWidget *ctree = NULL;
        prepare_matcher(quicksearch);
        gtk_widget_show(quicksearch->hbox_search);
        update_extended_buttons(quicksearch);
        gtk_widget_grab_focus(
                GTK_WIDGET(GTK_COMBO(quicksearch->search_string_entry)->entry));
+
+       GTK_EVENTS_FLUSH();
+
+       if (!mainwin || !mainwin->summaryview) {
+               return;
+       }
+       
+       ctree = summary_get_main_widget(mainwin->summaryview);
+       
+       if (ctree && mainwin->summaryview->selected)
+               gtk_ctree_node_moveto(GTK_CTREE(ctree), 
+                               mainwin->summaryview->selected, 
+                               0, 0.5, 0);
 }
 
 void quicksearch_hide(QuickSearch *quicksearch)
 {
-       quicksearch_set(quicksearch, prefs_common.summary_quicksearch_type, "");
-       quicksearch_set_active(quicksearch, FALSE);
+       if (quicksearch_is_active(quicksearch)) {
+               quicksearch_set(quicksearch, prefs_common.summary_quicksearch_type, "");
+               quicksearch_set_active(quicksearch, FALSE);
+       }
        gtk_widget_hide(quicksearch->hbox_search);
 }