summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <[email protected]>2017-11-03 13:20:23 +0100
committerMontel Laurent <[email protected]>2017-11-03 13:20:23 +0100
commitce63eb14894951b8aa89033b656cd7bc91a3c747 (patch)
tree783d833bcc5de08f9db1a00a88e4804c9a8e99f2
parent7af4b1d989828de41ecbb61a9af223dfb1e0542a (diff)
Clean up action
-rw-r--r--src/kmail_part.rc3
-rw-r--r--src/kmmainwidget.cpp10
-rw-r--r--src/kmmainwidget.h2
-rw-r--r--src/kmmainwin.rc15
-rw-r--r--src/messageactions.cpp11
-rw-r--r--src/messageactions.h2
6 files changed, 8 insertions, 35 deletions
diff --git a/src/kmail_part.rc b/src/kmail_part.rc
index 64cc89b..3e95edc 100644
--- a/src/kmail_part.rc
+++ b/src/kmail_part.rc
@@ -2,7 +2,7 @@
the same menu entries at the same place in KMail and Kontact -->
<!DOCTYPE gui>
-<gui version="527" name="kmmainwin" translationDomain="kmail">
+<gui version="528" name="kmmainwin" translationDomain="kmail">
<MenuBar>
<Menu noMerge="1" name="file" >
<text>&amp;File</text>
@@ -168,7 +168,6 @@
<Action name="custom_forward" />
</Menu>
<Action name="send_again" />
- <Action name="edit"/>
<Action name="mailing_list"/>
<Separator/>
<Action name="akonadi_item_copy_to_menu" />
diff --git a/src/kmmainwidget.cpp b/src/kmmainwidget.cpp
index 9be94e7..91e4674 100644
--- a/src/kmmainwidget.cpp
+++ b/src/kmmainwidget.cpp
@@ -2689,8 +2689,6 @@ void KMMainWidget::showMessagePopup(const Akonadi::Item &msg, const QUrl &url, c
}
if (parentCol.isValid() && CommonKernel->folderIsSentMailFolder(parentCol)) {
menu.addAction(sendAgainAction());
- } else {
- menu.addAction(editAction());
}
menu.addAction(mailingListActionMenu());
menu.addSeparator();
@@ -3751,7 +3749,6 @@ void KMMainWidget::updateMessageActionsDelayed()
mMsgActions->forwardAttachedAction()->setEnabled(mass_actions && !CommonKernel->folderIsTemplates(mCurrentCollection));
mMsgActions->forwardMenu()->setEnabled(mass_actions && !CommonKernel->folderIsTemplates(mCurrentCollection));
- mMsgActions->editAction()->setEnabled(single_actions);
mNewMessageFromTemplateAction->setEnabled(single_actions && CommonKernel->folderIsTemplates(mCurrentCollection));
filterMenu()->setEnabled(single_actions);
mMsgActions->redirectAction()->setEnabled(/*single_actions &&*/ mass_actions && !CommonKernel->folderIsTemplates(mCurrentCollection));
@@ -3782,8 +3779,6 @@ void KMMainWidget::updateMessageActionsDelayed()
bool statusSendAgain = single_actions && ((currentMessage.isValid() && status.isSent()) || (currentMessage.isValid() && CommonKernel->folderIsSentMailFolder(mCurrentCollection)));
if (statusSendAgain) {
actionList << mSendAgainAction;
- } else if (single_actions) {
- actionList << messageActions()->editAction();
}
actionList << mSaveAttachmentsAction;
if (mCurrentCollection.isValid() && FolderArchive::FolderArchiveUtil::resourceSupportArchiving(mCurrentCollection.resource())) {
@@ -4270,11 +4265,6 @@ KActionMenu *KMMainWidget::mailingListActionMenu() const
return mMsgActions->mailingListActionMenu();
}
-QAction *KMMainWidget::editAction() const
-{
- return mMsgActions->editAction();
-}
-
QAction *KMMainWidget::sendAgainAction() const
{
return mSendAgainAction;
diff --git a/src/kmmainwidget.h b/src/kmmainwidget.h
index d21d0da..885fbe2 100644
--- a/src/kmmainwidget.h
+++ b/src/kmmainwidget.h
@@ -219,8 +219,6 @@ private:
KActionMenu *mailingListActionMenu() const;
- QAction *editAction() const;
-
// Moving messages around
/**
* This will ask for a destination folder and move the currently selected
diff --git a/src/kmmainwin.rc b/src/kmmainwin.rc
index 2c6310e..3e95edc 100644
--- a/src/kmmainwin.rc
+++ b/src/kmmainwin.rc
@@ -2,7 +2,7 @@
the same menu entries at the same place in KMail and Kontact -->
<!DOCTYPE gui>
-<gui version="527" name="kmmainwin" translationDomain="kmail">
+<gui version="528" name="kmmainwin" translationDomain="kmail">
<MenuBar>
<Menu noMerge="1" name="file" >
<text>&amp;File</text>
@@ -126,14 +126,14 @@
<Action name="remove_duplicate_recursive" />
<Separator/>
<Menu name="apply_filters_folder_actions">
- <text>Apply Filters on Folder</text>
- <Action name="apply_filters_folder" />
- <ActionList name="menu_filter_folder_actions" />
+ <text>Apply Filters on Folder</text>
+ <Action name="apply_filters_folder" />
+ <ActionList name="menu_filter_folder_actions" />
</Menu>
<Menu name="apply_filters_folder_recursive_actions">
- <text>Apply Filters on Folder and all its Subfolders</text>
- <Action name="apply_filters_folder_recursive" />
- <ActionList name="menu_filter_folder_recursive_actions" />
+ <text>Apply Filters on Folder and all its Subfolders</text>
+ <Action name="apply_filters_folder_recursive" />
+ <ActionList name="menu_filter_folder_recursive_actions" />
</Menu>
<Separator/>
<Action name="display_format_message" />
@@ -168,7 +168,6 @@
<Action name="custom_forward" />
</Menu>
<Action name="send_again" />
- <Action name="edit"/>
<Action name="mailing_list"/>
<Separator/>
<Action name="akonadi_item_copy_to_menu" />
diff --git a/src/messageactions.cpp b/src/messageactions.cpp
index bfbf5c9..4116cd0 100644
--- a/src/messageactions.cpp
+++ b/src/messageactions.cpp
@@ -125,11 +125,6 @@ MessageActions::MessageActions(KActionCollection *ac, QWidget *parent)
mStatusMenu->addAction(action);
}
- mEditAction = new QAction(QIcon::fromTheme(QStringLiteral("accessories-text-editor")), i18n("&Edit Message"), this);
- ac->addAction(QStringLiteral("edit"), mEditAction);
- connect(mEditAction, &QAction::triggered, this, &MessageActions::editCurrentMessage);
- ac->setDefaultShortcut(mEditAction, Qt::Key_T);
-
mAnnotateAction = new QAction(QIcon::fromTheme(QStringLiteral("view-pim-notes")), i18n("Add Note..."), this);
ac->addAction(QStringLiteral("annotate"), mAnnotateAction);
connect(mAnnotateAction, &QAction::triggered, this, &MessageActions::annotateMessage);
@@ -262,11 +257,6 @@ KActionMenu *MessageActions::forwardMenu() const
return mForwardActionMenu;
}
-QAction *MessageActions::editAction() const
-{
- return mEditAction;
-}
-
QAction *MessageActions::annotateAction() const
{
return mAnnotateAction;
@@ -361,7 +351,6 @@ void MessageActions::updateActions()
connect(job, &Akonadi::ItemFetchJob::result, this, &MessageActions::slotUpdateActionsFetchDone);
}
}
- mEditAction->setEnabled(uniqItem);
}
void MessageActions::slotUpdateActionsFetchDone(KJob *job)
diff --git a/src/messageactions.h b/src/messageactions.h
index 8900b18..ce6fb25 100644
--- a/src/messageactions.h
+++ b/src/messageactions.h
@@ -80,7 +80,6 @@ public:
KActionMenu *messageStatusMenu() const;
KActionMenu *forwardMenu() const;
- QAction *editAction() const;
QAction *annotateAction() const;
QAction *printAction() const;
QAction *printPreviewAction() const;
@@ -151,7 +150,6 @@ private:
KActionMenu *mStatusMenu = nullptr;
KActionMenu *mForwardActionMenu = nullptr;
KActionMenu *mMailingListActionMenu = nullptr;
- QAction *mEditAction = nullptr;
QAction *mAnnotateAction = nullptr;
QAction *mPrintAction = nullptr;
QAction *mPrintPreviewAction = nullptr;