Commit ce63eb14 authored by Laurent Montel's avatar Laurent Montel 😁

Clean up action

parent 7af4b1d9
......@@ -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" />
......
......@@ -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;
......
......@@ -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
......
......@@ -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" />
......
......@@ -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)
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment