sync with 0.8.3cvs4
authorPaul Mangan <paul@claws-mail.org>
Fri, 20 Sep 2002 22:22:19 +0000 (22:22 +0000)
committerPaul Mangan <paul@claws-mail.org>
Fri, 20 Sep 2002 22:22:19 +0000 (22:22 +0000)
ChangeLog
ChangeLog.claws
ChangeLog.jp
configure.in
src/mainwindow.c
src/summaryview.c
src/summaryview.h

index db6eaf2..2243d5d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2002-09-20
+
+       * src/mainwindow.c: added 'Edit/Select thread' menu.
+       * src/summaryview.[ch]: added 'Select thread' to the context menu.
+         summary_select_thread(): new. It selects all messages of current
+         thread.
+
 2002-09-19
 
        * src/rfc2015.c: check_signature(): corrected error handling and
index 7a34a72..12f4b85 100644 (file)
@@ -1,4 +1,10 @@
-2002-09-21 [alfons]    0.8.2claws63
+22002-09-20 [paul]     0.8.2claws64
+
+       * sync with 0.8.3cvs4
+               'Select thread' re-implemented 
+               see ChangeLog 2002-09-20
+
+002-09-21 [alfons]     0.8.2claws63
 
        * src/compose.c
                compose_send(): plug unnoticed memleak
index 485cc4c..efedc95 100644 (file)
@@ -1,3 +1,11 @@
+2002-09-20
+
+       * src/mainwindow.c: ¡ÖÊÔ½¸/¥¹¥ì¥Ã¥É¤òÁªÂò¡×¥á¥Ë¥å¡¼¤òÄɲá£
+       * src/summaryview.[ch]: ¥³¥ó¥Æ¥­¥¹¥È¥á¥Ë¥å¡¼¤Ë¡Ö¥¹¥ì¥Ã¥É¤òÁªÂò¡×¤ò
+         Äɲá£
+         summary_select_thread(): ¿·µ¬¡£¸½ºß¤Î¥¹¥ì¥Ã¥É¤Î¥á¥Ã¥»¡¼¥¸¤òÁ´¤Æ
+         ÁªÂò¤¹¤ë¡£
+
 2002-09-19
 
        * src/rfc2015.c: check_signature(): ¥¨¥é¡¼½èÍý¤È¥á¥â¥ê¥ê¡¼¥¯¤ò½¤Àµ¡£
index c5563da..d7b0319 100644 (file)
@@ -10,7 +10,7 @@ MINOR_VERSION=8
 MICRO_VERSION=2
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=claws63
+EXTRA_VERSION=claws64
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl set $target
index 0e5df32..f12557f 100644 (file)
@@ -331,9 +331,10 @@ static void copy_cb                 (MainWindow    *mainwin,
 static void allsel_cb           (MainWindow    *mainwin,
                                  guint          action,
                                  GtkWidget     *widget);
-static void selthread_cb        (MainWindow    *mainwin,
+static void select_thread_cb    (MainWindow    *mainwin,
                                  guint          action,
                                  GtkWidget     *widget);
+
 static void create_filter_cb    (MainWindow    *mainwin,
                                  guint          action,
                                  GtkWidget     *widget);
@@ -425,7 +426,7 @@ static GtkItemFactoryEntry mainwin_entries[] =
        {N_("/_Edit"),                          NULL, NULL, 0, "<Branch>"},
        {N_("/_Edit/_Copy"),                    "<control>C", copy_cb, 0, NULL},
        {N_("/_Edit/Select _all"),              "<control>A", allsel_cb, 0, NULL},
-       {N_("/_Edit/Select thread"),            "<control>Z", selthread_cb, 0, NULL},
+       {N_("/_Edit/Select _thread"),           NULL, select_thread_cb, 0, NULL},
        {N_("/_Edit/---"),                      NULL, NULL, 0, "<Separator>"},
        {N_("/_Edit/_Find in current message..."),
                                                "<control>F", search_cb, 0, NULL},
@@ -1496,6 +1497,7 @@ void main_window_set_menu_sensitive(MainWindow *mainwin)
                {"/File/Exit"      , M_UNLOCKED},
 
                {"/Edit/Select thread"             , M_SINGLE_TARGET_EXIST},
+
                {"/View/Sort"                      , M_EXEC},
                {"/View/Thread view"               , M_EXEC},
                {"/View/Expand all threads"        , M_MSG_EXIST},
@@ -2616,10 +2618,10 @@ static void allsel_cb(MainWindow *mainwin, guint action, GtkWidget *widget)
                messageview_select_all(mainwin->messageview);
 }
 
-static void selthread_cb(MainWindow *mainwin, guint action, GtkWidget *widget)
+static void select_thread_cb(MainWindow *mainwin, guint action,
+                            GtkWidget *widget)
 {
-       if (messageview_is_visible(mainwin->summaryview->messageview))
-               summary_select_thread(mainwin->summaryview);
+       summary_select_thread(mainwin->summaryview);
 }
 
 static void create_filter_cb(MainWindow *mainwin, guint action,
index 17422a0..fe116ea 100644 (file)
@@ -395,9 +395,6 @@ static GtkItemFactoryEntry summary_popup_entries[] =
        {N_("/---"),                    NULL, NULL,             0, "<Separator>"},
        {N_("/Re-_edit"),               NULL, summary_reedit,   0, NULL},
        {N_("/---"),                    NULL, NULL,             0, "<Separator>"},
-       {N_("/Select _thread"),         NULL, summary_select_thread, 0, NULL},
-       {N_("/Select _all"),            NULL, summary_select_all, 0, NULL},
-       {N_("/---"),                    NULL, NULL,             0, "<Separator>"},
        {N_("/M_ove..."),               NULL, summary_move_to,  0, NULL},
        {N_("/_Copy..."),               NULL, summary_copy_to,  0, NULL},
        {N_("/_Delete"),                NULL, summary_delete,   0, NULL},
@@ -436,6 +433,9 @@ static GtkItemFactoryEntry summary_popup_entries[] =
        {N_("/---"),                    NULL, NULL,             0, "<Separator>"},
        {N_("/_Save as..."),            NULL, summary_save_as,  0, NULL},
        {N_("/_Print..."),              NULL, summary_print,    0, NULL},
+       {N_("/---"),                    NULL, NULL,             0, "<Separator>"},
+       {N_("/Select _all"),            NULL, summary_select_all, 0, NULL},
+       {N_("/Select t_hread"),         NULL, summary_select_thread, 0, NULL}
 };
 
 static const gchar *const col_label[N_SUMMARY_COLS] = {
@@ -1138,7 +1138,6 @@ static void summary_set_menu_sensitive(SummaryView *summaryview)
 #if 0
        menu_set_sensitive(ifactory, "/Delete", TRUE);
 #endif
-       menu_set_sensitive(ifactory, "/Select all", TRUE);
        menu_set_sensitive(ifactory, "/Copy...", TRUE);
        menu_set_sensitive(ifactory, "/Execute", TRUE);
 
@@ -1175,10 +1174,11 @@ static void summary_set_menu_sensitive(SummaryView *summaryview)
        else
                menu_set_sensitive(ifactory, "/Re-edit", FALSE);
 
-       menu_set_sensitive(ifactory, "/Select thread", sens);
        menu_set_sensitive(ifactory, "/Save as...", sens);
        menu_set_sensitive(ifactory, "/Print...",   TRUE);
 
+       menu_set_sensitive(ifactory, "/Select all", TRUE);
+       menu_set_sensitive(ifactory, "/Select thread", sens);
        if (summaryview->folder_item->folder->account)
                sens = summaryview->folder_item->folder->account->protocol
                        == A_NNTP;
@@ -3243,6 +3243,27 @@ void summary_unselect_all(SummaryView *summaryview)
        gtk_sctree_unselect_all(GTK_SCTREE(summaryview->ctree));
 }
 
+void summary_select_thread(SummaryView *summaryview)
+{
+       GtkCTree *ctree = GTK_CTREE(summaryview->ctree);
+       GtkCTreeNode *node = summaryview->selected;
+
+       if (!node) return;
+
+       while (GTK_CTREE_ROW(node)->parent != NULL)
+               node = GTK_CTREE_ROW(node)->parent;
+
+       if (node != summaryview->selected)
+               summary_select_node
+                       (summaryview, node,
+                        messageview_is_visible(summaryview->messageview),
+                        FALSE);
+
+       gtk_ctree_select_recursive(ctree, node);
+
+       summary_status_show(summaryview);
+}
+
 void summary_save_as(SummaryView *summaryview)
 {
        GtkCTree *ctree = GTK_CTREE(summaryview->ctree);
@@ -5010,37 +5031,6 @@ static gint summary_cmp_by_locked(GtkCList *clist,
        return MSG_IS_LOCKED(msginfo1->flags) - MSG_IS_LOCKED(msginfo2->flags);
 }
 
-static void summary_select_thread_func(GtkCTree *ctree, GtkCTreeNode *row, gpointer data)
-{
-       MsgInfo *msginfo;
-
-       msginfo = gtk_ctree_node_get_row_data(ctree, row);
-       gtk_ctree_select(GTK_CTREE(ctree), row);        
-       debug_print("Message %d selected\n", msginfo->msgnum);
-}
-
-/* select current thread */
-void summary_select_thread(SummaryView *summaryview)
-{
-       GtkCTree *ctree = GTK_CTREE(summaryview->ctree);
-       GtkCTreeNode *node = summaryview->selected;
-       GList *cur;
-
-       g_return_if_fail(node != NULL);
-       
-       while (GTK_CTREE_ROW(node)->parent != NULL)
-               node = GTK_CTREE_ROW(node)->parent;
-
-       if (node && node != summaryview->selected)
-               summary_select_node(summaryview, node, TRUE, FALSE);
-
-       for (cur = GTK_CLIST(ctree)->selection; cur != NULL; cur = cur->next) {
-               gtk_ctree_pre_recursive(ctree, GTK_CTREE_NODE(cur->data), GTK_CTREE_FUNC(summary_select_thread_func), summaryview);
-       }
-       
-       summary_status_show(summaryview);
-}
-
 static void summary_ignore_thread_func(GtkCTree *ctree, GtkCTreeNode *row, gpointer data)
 {
        SummaryView *summaryview = (SummaryView *) data;
index d603f45..80aa929 100644 (file)
@@ -249,6 +249,7 @@ void summary_add_address      (SummaryView          *summaryview);
 void summary_select_all                  (SummaryView          *summaryview);
 void summary_unselect_all        (SummaryView          *summaryview);
 void summary_select_thread       (SummaryView          *summaryview);
+
 void summary_reply               (SummaryView          *summaryview,
                                   ComposeMode           mode);