2011-07-03 [paul] 3.7.9cvs28
authorPaul Mangan <paul@claws-mail.org>
Sun, 3 Jul 2011 13:17:49 +0000 (13:17 +0000)
committerPaul Mangan <paul@claws-mail.org>
Sun, 3 Jul 2011 13:17:49 +0000 (13:17 +0000)
* src/mainwindow.c
* src/mainwindow.h
* src/summaryview.c
fix bug #2461, 'popup menu in message list displays
'move to trash' and 'delete''.
Add a new sensitivity condition 'M_NOT_TRASH' and
remove the broken workaround for right-click in summaryview.c.
Fix broken main menu sensitivity for "Menu/Message/Move" in
News folder.

ChangeLog
PATCHSETS
configure.ac
src/mainwindow.c
src/mainwindow.h
src/summaryview.c

index 1fb9dba..51477e7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2011-07-03 [paul]      3.7.9cvs28
+
+       * src/mainwindow.c
+       * src/mainwindow.h
+       * src/summaryview.c
+               fix bug #2461, 'popup menu in message list displays
+               'move to trash' and 'delete''.
+               Add a new sensitivity condition 'M_NOT_TRASH' and
+               remove the broken workaround for right-click in summaryview.c.
+               Fix broken main menu sensitivity for "Menu/Message/Move" in
+               News folder.
+
 2011-06-21 [paul]      3.7.9cvs27
 
        * src/mainwindow.c
index a65371c..b1be720 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.1.2.18 -r 1.1.2.19 po/ca.po;  cvs diff -u -r 1.9.2.21 -r 1.9.2.22 po/cs.po;  cvs diff -u -r 1.58.2.48 -r 1.58.2.49 po/de.po;  cvs diff -u -r 1.34.2.29 -r 1.34.2.30 po/it.po;  cvs diff -u -r 1.16.2.11 -r 1.16.2.12 po/ja.po;  cvs diff -u -r 1.1.2.3 -r 1.1.2.4 po/pt_PT.po;  cvs diff -u -r 1.2.2.32 -r 1.2.2.33 po/sk.po;  cvs diff -u -r 1.1.2.3 -r 1.1.2.4 po/uk.po;  cvs diff -u -r 1.43.2.122 -r 1.43.2.123 src/toolbar.c;  cvs diff -u -r 1.4.2.78 -r 1.4.2.79 src/gtk/about.c;  ) > 3.7.9cvs25.patchset
 ( cvs diff -u -r 1.654.2.4253 -r 1.654.2.4254 configure.ac;  ) > 3.7.9cvs26.patchset
 ( cvs diff -u -r 1.274.2.324 -r 1.274.2.325 src/mainwindow.c;  ) > 3.7.9cvs27.patchset
+( cvs diff -u -r 1.274.2.325 -r 1.274.2.326 src/mainwindow.c;  cvs diff -u -r 1.39.2.60 -r 1.39.2.61 src/mainwindow.h;  cvs diff -u -r 1.395.2.428 -r 1.395.2.429 src/summaryview.c;  ) > 3.7.9cvs28.patchset
index b7f0e97..379eedb 100644 (file)
@@ -12,7 +12,7 @@ MINOR_VERSION=7
 MICRO_VERSION=9
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=27
+EXTRA_VERSION=28
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index fe974fd..1a8a4de 100644 (file)
@@ -3070,6 +3070,11 @@ SensitiveCond main_window_get_current_state(MainWindow *mainwin)
                state |= M_NEWS;
        else
                state |= M_NOT_NEWS;
+       if (mainwin->summaryview->folder_item &&
+           (mainwin->summaryview->folder_item->stype != F_TRASH ||
+            !folder_has_parent_of_type(mainwin->summaryview->folder_item, F_TRASH)))
+               state |= M_NOT_TRASH;
+
        if (prefs_common.actions_list && g_slist_length(prefs_common.actions_list))
                state |= M_ACTIONS_EXIST;
 
@@ -3209,9 +3214,9 @@ void main_window_set_menu_sensitive(MainWindow *mainwin)
                {"Menu/Message/Forward"               , M_HAVE_ACCOUNT|M_TARGET_EXIST|M_SUMMARY_ISLIST},
                {"Menu/Message/ForwardAtt" , M_HAVE_ACCOUNT|M_TARGET_EXIST|M_SUMMARY_ISLIST},
                {"Menu/Message/Redirect"                  , M_HAVE_ACCOUNT|M_TARGET_EXIST|M_SUMMARY_ISLIST},
-               {"Menu/Message/Move"              , M_TARGET_EXIST|M_ALLOW_DELETE},
+               {"Menu/Message/Move"              , M_TARGET_EXIST|M_ALLOW_DELETE|M_NOT_NEWS},
                {"Menu/Message/Copy"              , M_TARGET_EXIST|M_EXEC},
-               {"Menu/Message/Trash"     , M_TARGET_EXIST|M_ALLOW_DELETE|M_NOT_NEWS},
+               {"Menu/Message/Trash"     , M_TARGET_EXIST|M_ALLOW_DELETE|M_NOT_NEWS|M_NOT_TRASH},
                {"Menu/Message/Delete"            , M_TARGET_EXIST|M_ALLOW_DELETE},
                {"Menu/Message/CancelNews" , M_TARGET_EXIST|M_ALLOW_DELETE|M_NEWS},
                {"Menu/Message/Mark"              , M_TARGET_EXIST|M_SUMMARY_ISLIST},
index df5f496..0c75583 100644 (file)
@@ -65,7 +65,8 @@ typedef enum
        M_HAVE_MULTI_ACCOUNT  = 1 << 24,
        M_FOLDER_SELECTED     = 1 << 25,
        M_SESSION_PASSWORDS   = 1 << 26,
-       M_DELETED_EXISTS      = 1 << 27
+       M_DELETED_EXISTS      = 1 << 27,
+       M_NOT_TRASH           = 1 << 28
 } SensitiveCond;
 
 typedef enum
index 3dd1bc1..0128ed6 100644 (file)
@@ -1643,7 +1643,7 @@ void summary_set_menu_sensitive(SummaryView *summaryview)
 
                {"Menus/SummaryViewPopup/Move"                  , M_TARGET_EXIST|M_ALLOW_DELETE|M_NOT_NEWS},
                {"Menus/SummaryViewPopup/Copy"                  , M_TARGET_EXIST|M_EXEC},
-               {"Menus/SummaryViewPopup/Trash"         , M_TARGET_EXIST|M_ALLOW_DELETE|M_NOT_NEWS},
+               {"Menus/SummaryViewPopup/Trash"         , M_TARGET_EXIST|M_ALLOW_DELETE|M_NOT_NEWS|M_NOT_TRASH},
 #ifndef GENERIC_UMPC
                {"Menus/SummaryViewPopup/Delete"                        , M_TARGET_EXIST|M_ALLOW_DELETE},
 #endif
@@ -6498,8 +6498,6 @@ static gboolean summary_button_pressed(GtkWidget *ctree, GdkEventButton *event,
        if (event->button == 3) {
                /* right clicked */
                summary_set_menu_sensitive(summaryview);
-               cm_menu_set_sensitive_full(summaryview->mainwin->ui_manager, "Menus/SummaryViewPopup/Trash", 
-                       !folder_has_parent_of_type(summaryview->folder_item, F_TRASH) && summaryview->selected);
                gtk_menu_popup(GTK_MENU(summaryview->popupmenu), NULL, NULL,
                               NULL, NULL, event->button, event->time);
        } else if (event->button == 2) {