diff --git a/kmail_part.rc b/kmail_part.rc index 0649307f2..6921c2fda 100644 --- a/kmail_part.rc +++ b/kmail_part.rc @@ -2,7 +2,7 @@ the same menu entries at the same place in KMail and Kontact --> - + &File @@ -113,6 +113,7 @@ &Message + diff --git a/kmmainwidget.cpp b/kmmainwidget.cpp index dce352c13..c14f65716 100644 --- a/kmmainwidget.cpp +++ b/kmmainwidget.cpp @@ -2961,12 +2961,13 @@ void KMMainWidget::setupActions() connect( mTemplateMenu->menu(), SIGNAL( triggered(QAction*) ), this, SLOT( slotNewFromTemplate(QAction*) ) ); - { - KAction *action = new KAction(KIcon("mail-message-new-list"), i18n("New Message t&o Mailing-List..."), this); - actionCollection()->addAction("post_message", action ); - connect(action, SIGNAL(triggered(bool) ), SLOT(slotPostToML())); - action->setShortcut(QKeySequence(Qt::CTRL+Qt::SHIFT+Qt::Key_N)); - } + mPostToMailinglistAction = new KAction( KIcon( "mail-message-new-list" ), + i18n( "New Message t&o Mailing-List..." ), + this ); + actionCollection()->addAction("post_message", mPostToMailinglistAction ); + connect( mPostToMailinglistAction, SIGNAL( triggered(bool) ), + SLOT( slotPostToML() ) ); + mPostToMailinglistAction->setShortcut( QKeySequence( Qt::CTRL + Qt::SHIFT + Qt::Key_N ) ); mForwardActionMenu = new KActionMenu(KIcon("mail-forward"), i18nc("Message->","&Forward"), this); actionCollection()->addAction("message_forward", mForwardActionMenu ); @@ -3560,6 +3561,9 @@ void KMMainWidget::updateFolderMenu() { bool folderWithContent = mFolder && !mFolder->noContent(); bool multiFolder = folderTree()->selectedFolders().count() > 1; + bool mailingList = mFolder && mFolder->isMailingListEnabled() && !multiFolder; + + mPostToMailinglistAction->setEnabled( mailingList ); mModifyFolderAction->setEnabled( folderWithContent && !multiFolder ); mFolderMailingListPropertiesAction->setEnabled( folderWithContent && !multiFolder ); mCompactFolderAction->setEnabled( folderWithContent && !multiFolder ); diff --git a/kmmainwidget.h b/kmmainwidget.h index 24a02d1e7..ff69ec90a 100644 --- a/kmmainwidget.h +++ b/kmmainwidget.h @@ -566,7 +566,7 @@ class KMAIL_EXPORT KMMainWidget : public QWidget *mExpireFolderAction, *mCompactFolderAction, *mRefreshFolderAction, *mEmptyFolderAction, *mMarkAllAsReadAction, *mFolderMailingListPropertiesAction, *mFolderShortCutCommandAction, *mTroubleshootFolderAction, *mRemoveDuplicatesAction, - *mTroubleshootMaildirAction; + *mTroubleshootMaildirAction, *mPostToMailinglistAction; KToggleAction *mPreferHtmlAction, *mPreferHtmlLoadExtAction, *mThreadMessagesAction, *mThreadBySubjectAction; KToggleAction *mFolderAction, *mHeaderAction, *mMimeAction; diff --git a/kmmainwin.rc b/kmmainwin.rc index 9cf117543..7f30d052f 100644 --- a/kmmainwin.rc +++ b/kmmainwin.rc @@ -2,7 +2,7 @@ the same menu entries at the same place in KMail and Kontact --> - + &File @@ -116,6 +116,7 @@ &Message +