From: Paul Mangan Date: Sat, 13 Jan 2007 18:23:51 +0000 (+0000) Subject: 2007-01-13 [paul] 2.7.0cvs22 X-Git-Tag: rel_2_8_0~149 X-Git-Url: http://git.claws-mail.org/?p=claws.git;a=commitdiff_plain;h=3a52db863b03444c3a509a81e20702a85a049af6;ds=sidebyside 2007-01-13 [paul] 2.7.0cvs22 * src/mainwindow.c * src/summaryview.c * src/summaryview.h add 'Edit/Delete thread' --- diff --git a/ChangeLog b/ChangeLog index 58cad7d0a..3450f8ead 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2007-01-13 [paul] 2.7.0cvs22 + + * src/mainwindow.c + * src/summaryview.c + * src/summaryview.h + add 'Edit/Delete thread' + 2007-01-13 [colin] 2.7.0cvs21 * src/prefs_account.c diff --git a/PATCHSETS b/PATCHSETS index 6e151804b..fb9c73cfa 100644 --- a/PATCHSETS +++ b/PATCHSETS @@ -2248,3 +2248,4 @@ ( cvs diff -u -r 1.1.4.64 -r 1.1.4.65 src/etpan/imap-thread.c; ) > 2.7.0cvs19.patchset ( cvs diff -u -r 1.3.12.22 -r 1.3.12.23 src/message_search.c; cvs diff -u -r 1.94.2.117 -r 1.94.2.118 src/messageview.c; cvs diff -u -r 1.15.2.42 -r 1.15.2.43 src/summary_search.c; ) > 2.7.0cvs20.patchset ( cvs diff -u -r 1.105.2.78 -r 1.105.2.79 src/prefs_account.c; cvs diff -u -r 1.1.2.15 -r 1.1.2.16 src/prefs_compose_writing.c; cvs diff -u -r 1.1.2.21 -r 1.1.2.22 src/prefs_message.c; cvs diff -u -r 1.1.2.28 -r 1.1.2.29 src/prefs_msg_colors.c; cvs diff -u -r 1.1.2.13 -r 1.1.2.14 src/prefs_other.c; cvs diff -u -r 1.1.2.14 -r 1.1.2.15 src/prefs_receive.c; cvs diff -u -r 1.5.2.30 -r 1.5.2.31 src/prefs_spelling.c; cvs diff -u -r 1.1.2.33 -r 1.1.2.34 src/prefs_summaries.c; cvs diff -u -r 1.3.2.47 -r 1.3.2.48 src/prefs_themes.c; cvs diff -u -r 1.5.2.48 -r 1.5.2.49 src/gtk/gtkutils.c; cvs diff -u -r 1.4.2.29 -r 1.4.2.30 src/gtk/gtkutils.h; cvs diff -u -r 1.1.2.15 -r 1.1.2.16 src/plugins/pgpcore/prefs_gpg.c; cvs diff -u -r 1.23.2.33 -r 1.23.2.34 src/plugins/spamassassin/spamassassin_gtk.c; ) > 2.7.0cvs21.patchset +( cvs diff -u -r 1.274.2.162 -r 1.274.2.163 src/mainwindow.c; cvs diff -u -r 1.395.2.274 -r 1.395.2.275 src/summaryview.c; cvs diff -u -r 1.68.2.31 -r 1.68.2.32 src/summaryview.h; ) > 2.7.0cvs22.patchset diff --git a/configure.ac b/configure.ac index c37438d09..e19e63306 100644 --- a/configure.ac +++ b/configure.ac @@ -11,7 +11,7 @@ MINOR_VERSION=7 MICRO_VERSION=0 INTERFACE_AGE=0 BINARY_AGE=0 -EXTRA_VERSION=21 +EXTRA_VERSION=22 EXTRA_RELEASE= EXTRA_GTK2_VERSION= diff --git a/src/mainwindow.c b/src/mainwindow.c index 8614aee0b..37dca7ab2 100644 --- a/src/mainwindow.c +++ b/src/mainwindow.c @@ -390,6 +390,9 @@ static void allsel_cb (MainWindow *mainwin, static void select_thread_cb (MainWindow *mainwin, guint action, GtkWidget *widget); +static void delete_thread_cb (MainWindow *mainwin, + guint action, + GtkWidget *widget); static void create_filter_cb (MainWindow *mainwin, guint action, @@ -520,6 +523,7 @@ static GtkItemFactoryEntry mainwin_entries[] = {N_("/_Edit/_Copy"), "C", copy_cb, 0, NULL}, {N_("/_Edit/Select _all"), "A", allsel_cb, 0, NULL}, {N_("/_Edit/Select _thread"), NULL, select_thread_cb, 0, NULL}, + {N_("/_Edit/_Delete thread"), NULL, delete_thread_cb, 0, NULL}, {N_("/_Edit/---"), NULL, NULL, 0, ""}, {N_("/_Edit/_Find in current message..."), "F", search_cb, 0, NULL}, @@ -2230,6 +2234,7 @@ void main_window_set_menu_sensitive(MainWindow *mainwin) {"/File/Exit" , M_UNLOCKED}, {"/Edit/Select thread" , M_SINGLE_TARGET_EXIST}, + {"/Edit/Delete thread" , M_SINGLE_TARGET_EXIST}, {"/Edit/Find in current message...", M_SINGLE_TARGET_EXIST}, {"/View/Set displayed columns/in Folder list..." @@ -3791,7 +3796,13 @@ static void allsel_cb(MainWindow *mainwin, guint action, GtkWidget *widget) static void select_thread_cb(MainWindow *mainwin, guint action, GtkWidget *widget) { - summary_select_thread(mainwin->summaryview); + summary_select_thread(mainwin->summaryview, FALSE); +} + +static void delete_thread_cb(MainWindow *mainwin, guint action, + GtkWidget *widget) +{ + summary_select_thread(mainwin->summaryview, TRUE); } static void create_filter_cb(MainWindow *mainwin, guint action, diff --git a/src/summaryview.c b/src/summaryview.c index a4a69cd7b..822cfb6dc 100644 --- a/src/summaryview.c +++ b/src/summaryview.c @@ -4013,7 +4013,7 @@ void summary_unselect_all(SummaryView *summaryview) summary_status_show(summaryview); } -void summary_select_thread(SummaryView *summaryview) +void summary_select_thread(SummaryView *summaryview, gboolean delete_thread) { GtkCTree *ctree = GTK_CTREE(summaryview->ctree); GtkCTreeNode *node = summaryview->selected; @@ -4031,6 +4031,13 @@ void summary_select_thread(SummaryView *summaryview) gtk_ctree_select_recursive(ctree, node); + if (delete_thread) { + if (FOLDER_TYPE(summaryview->folder_item->folder) == F_NEWS) + summary_delete(summaryview); + else + summary_delete_trash(summaryview); + } + summary_status_show(summaryview); } diff --git a/src/summaryview.h b/src/summaryview.h index 351a7d702..8cde245c9 100644 --- a/src/summaryview.h +++ b/src/summaryview.h @@ -271,7 +271,8 @@ void summary_unignore_thread (SummaryView *summaryview); 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_select_thread (SummaryView *summaryview, + gboolean delete_thread); void summary_set_colorlabel (SummaryView *summaryview, guint labelcolor,