sync with 0.9.7cvs1
authorPaul Mangan <paul@claws-mail.org>
Tue, 28 Oct 2003 08:39:05 +0000 (08:39 +0000)
committerPaul Mangan <paul@claws-mail.org>
Tue, 28 Oct 2003 08:39:05 +0000 (08:39 +0000)
ChangeLog
ChangeLog.claws
ChangeLog.jp
configure.ac
src/summary_search.c

index fabe37d..6e8f933 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2003-10-28
+
+       * src/summary_search.c: summary_search_execute(): fixed 'Select all
+         matched' when backward search is enabled.
+         Made the backward search button insensitive when 'select all
+         matched' is enabled.
+
 2003-10-15
 
        * version 0.9.7
index 4f96496..f282060 100644 (file)
@@ -1,3 +1,8 @@
+2003-10-28 [paul]      0.9.6claws56
+
+       * sync with 0.9.7cvs1
+               see ChangeLog 2003-10-28
+
 2003-10-27 [alfons]    0.9.6claws55
 
        * src/matcher_parser_parse.y
index 2917d2a..ac9216c 100644 (file)
@@ -1,3 +1,9 @@
+2003-10-28
+
+       * src/summary_search.c: summary_search_execute(): ¸åÊý¸¡º÷¤¬Í­¸ú¤Ê
+         ¤È¤­¤Î¡Ö°ì³ç¸¡º÷¡×¤ò½¤Àµ¡£
+         ¡Ö°ì³ç¸¡º÷¡×¤¬Í­¸ú¤Ê¤È¤­¤Ï¸åÊý¸¡º÷¥Ü¥¿¥ó¤ò̵¸ú¤Ë¤¹¤ë¤è¤¦¤Ë¤·¤¿¡£
+
 2003-10-15
 
        * version 0.9.7
index d864359..411354c 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=9
 MICRO_VERSION=6
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=55
+EXTRA_VERSION=56
 if test $EXTRA_VERSION -eq 0; then
     VERSION=${MAJOR_VERSION}.${MINOR_VERSION}.${MICRO_VERSION}claws
 else
index 6544118..edf611a 100644 (file)
@@ -71,6 +71,7 @@ static void from_activated(void);
 static void to_activated(void);
 static void subject_activated(void);
 static void body_activated(void);
+static void all_clicked(GtkButton *button);
 static void key_pressed(GtkWidget *widget, GdkEventKey *event, gpointer data);
 
 void summary_search(SummaryView *summaryview)
@@ -195,6 +196,8 @@ static void summary_search_create(SummaryView *summaryview)
        gtk_widget_show (all_checkbtn);
        gtk_box_pack_start (GTK_BOX (checkbtn_hbox), all_checkbtn,
                            FALSE, FALSE, 0);
+       gtk_signal_connect(GTK_OBJECT(all_checkbtn), "clicked",
+                          GTK_SIGNAL_FUNC(all_clicked), summaryview);
 
        and_checkbtn =
                gtk_check_button_new_with_label (_("AND search"));
@@ -229,7 +232,7 @@ static void summary_search_execute(GtkButton *button, gpointer data)
        MsgInfo *msginfo;
        gboolean case_sens;
        gboolean backward;
-       gboolean select_all;
+       gboolean search_all;
        gboolean search_and;
        gboolean all_searched = FALSE;
        gboolean all_matched = FALSE;
@@ -249,7 +252,7 @@ static void summary_search_execute(GtkButton *button, gpointer data)
                (GTK_TOGGLE_BUTTON(case_checkbtn));
        backward = gtk_toggle_button_get_active
                (GTK_TOGGLE_BUTTON(backward_checkbtn));
-       select_all = gtk_toggle_button_get_active
+       search_all = gtk_toggle_button_get_active
                (GTK_TOGGLE_BUTTON(all_checkbtn));
        search_and = gtk_toggle_button_get_active
                (GTK_TOGGLE_BUTTON(and_checkbtn));
@@ -272,11 +275,12 @@ static void summary_search_execute(GtkButton *button, gpointer data)
        subjwcs = (wchar_t *)GTK_ENTRY(subject_entry)->text;
        body_str = gtk_entry_get_text(GTK_ENTRY(body_entry));
 
-       if (select_all) {
+       if (search_all) {
                gtk_clist_freeze(GTK_CLIST(ctree));
                gtk_clist_unselect_all(GTK_CLIST(ctree));
-       }
-       if (!summaryview->selected) {
+               node = GTK_CTREE_NODE(GTK_CLIST(ctree)->row_list);
+               backward = FALSE;
+       } else if (!summaryview->selected) {
                if (backward)
                        node = GTK_CTREE_NODE(GTK_CLIST(ctree)->row_list_end);
                else
@@ -303,7 +307,7 @@ static void summary_search_execute(GtkButton *button, gpointer data)
                        gchar *str;
                        AlertValue val;
 
-                       if (select_all) {
+                       if (search_all) {
                                gtk_clist_thaw(GTK_CLIST(ctree));
                                break;
                        }
@@ -349,7 +353,7 @@ static void summary_search_execute(GtkButton *button, gpointer data)
                        else
                                all_matched = FALSE;
                        g_free(wcs_hs);
-               }       
+               }
                if (*towcs && msginfo->to) {
                        wcs_hs = strdup_mbstowcs(msginfo->to);
                        if (wcs_hs && WCSFindFunc(wcs_hs, towcs) != NULL)
@@ -375,7 +379,7 @@ static void summary_search_execute(GtkButton *button, gpointer data)
 
                if ((from_matched || to_matched || subj_matched || body_matched)
                    && (!search_and || all_matched)) {
-                       if (select_all)
+                       if (search_all)
                                gtk_ctree_select(ctree, node);
                        else {
                                if (messageview_is_visible
@@ -435,6 +439,14 @@ static void body_activated(void)
        gtk_button_clicked(GTK_BUTTON(search_btn));
 }
 
+static void all_clicked(GtkButton *button)
+{
+       if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(button)))
+               gtk_widget_set_sensitive(backward_checkbtn, FALSE);
+       else
+               gtk_widget_set_sensitive(backward_checkbtn, TRUE);
+}
+
 static void key_pressed(GtkWidget *widget, GdkEventKey *event, gpointer data)
 {
        if (event && event->keyval == GDK_Escape)