2008-06-24 [colin] 3.4.0cvs108
authorColin Leroy <colin@colino.net>
Tue, 24 Jun 2008 05:45:58 +0000 (05:45 +0000)
committerColin Leroy <colin@colino.net>
Tue, 24 Jun 2008 05:45:58 +0000 (05:45 +0000)
* src/messageview.c
Fix Spam button sensitivity in newsgroups

ChangeLog
PATCHSETS
configure.ac
src/messageview.c

index 8551b38..d73e335 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-06-24 [colin]     3.4.0cvs108
+
+       * src/messageview.c
+               Fix Spam button sensitivity in newsgroups
+
 2008-06-23 [wwp]       3.4.0cvs107
 
        * po/fr.po
index cc3a832..25d1eae 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.1.2.5 -r 1.1.2.6 manual/es/plugins.xml;  ) > 3.4.0cvs105.patchset
 ( cvs diff -u -r 1.60.2.52 -r 1.60.2.53 po/es.po;  ) > 3.4.0cvs106.patchset
 ( cvs diff -u -r 1.42.2.39 -r 1.42.2.40 po/fr.po;  ) > 3.4.0cvs107.patchset
+( cvs diff -u -r 1.94.2.180 -r 1.94.2.181 src/messageview.c;  ) > 3.4.0cvs108.patchset
index d82dfcb..a10c228 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=4
 MICRO_VERSION=0
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=107
+EXTRA_VERSION=108
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index c9cf88c..bb5b648 100644 (file)
@@ -1026,10 +1026,18 @@ gint messageview_show(MessageView *messageview, MsgInfo *msginfo,
                         MSG_IS_SPAM(msginfo->flags)?LEARN_HAM:LEARN_SPAM);
 
        if (messageview->toolbar) {
-               if (messageview->toolbar->learn_spam_btn)
+               if (messageview->toolbar->learn_spam_btn) {
+                       gboolean can_learn = FALSE;
+                       if (procmsg_spam_can_learn() &&
+                           (msginfo->folder &&
+                            msginfo->folder->folder->klass->type != F_UNKNOWN &&
+                            msginfo->folder->folder->klass->type != F_NEWS))
+                               can_learn = TRUE;
+
                        gtk_widget_set_sensitive(
                                messageview->toolbar->learn_spam_btn, 
-                               procmsg_spam_can_learn());
+                               can_learn);
+               }
        }
        
        noticeview_hide(messageview->noticeview);