From 753eab55c111636cf8516f27f239d3fe1be298da Mon Sep 17 00:00:00 2001 From: Jonathan Marten Date: Thu, 30 Nov 2006 15:02:01 +0000 Subject: [PATCH] Port 606990,607024 from work/kdepim-3.5.5+ feature branch: Some changes to make menubar and popup menus more consistent (but still some way to go): Menubar - Message has same "Mark Thread" submenu as popup All popups with "Print", "Save" and "Save Attachments" in consistent order Message window popup (when selected text) has same "Reply" menu as preview popup Menubar - Folder - Mailing List Management has "..." Folder list popup has "Empty" and "Delete" in consistent order Add keyboard shortcut Ctrl+S for "Save As" action in reader window GUI: CCBUG:92905 BUG:106478 svn path=/branches/KDE/3.5/kdepim/; revision=609393 --- kmail_part.rc | 8 ++------ kmfoldertree.cpp | 3 +-- kmheaders.cpp | 7 +------ kmmainwidget.cpp | 6 +++++- kmmainwin.rc | 8 ++------ kmreadermainwin.cpp | 8 +++++++- kmreadermainwin.h | 4 ++-- 7 files changed, 20 insertions(+), 24 deletions(-) diff --git a/kmail_part.rc b/kmail_part.rc index fe851d754..afef10c9c 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 @@ -126,11 +126,7 @@ - - Mark Thread as - - - + diff --git a/kmfoldertree.cpp b/kmfoldertree.cpp index 4dfbd11dd..3e4ecd1f1 100644 --- a/kmfoldertree.cpp +++ b/kmfoldertree.cpp @@ -1020,11 +1020,10 @@ void KMFolderTree::slotContextMenuRequested( QListViewItem *lvi, mMainWidget->action("compact")->plug(folderMenu); folderMenu->insertSeparator(); + mMainWidget->action("empty")->plug(folderMenu); if ( !fti->folder()->isSystemFolder() ) { mMainWidget->action("delete_folder")->plug(folderMenu); - folderMenu->insertSeparator(); } - mMainWidget->action("empty")->plug(folderMenu); folderMenu->insertSeparator(); } } diff --git a/kmheaders.cpp b/kmheaders.cpp index ae07280a5..aa8a1f0a2 100644 --- a/kmheaders.cpp +++ b/kmheaders.cpp @@ -2325,11 +2325,6 @@ void KMHeaders::slotRMB() mOwner->threadStatusMenu()->plug( menu ); // Mark Thread menu } - if (!out_folder && !mFolder->isSent() && mOwner->watchThreadAction()->isEnabled() ) { - mOwner->watchThreadAction()->plug(menu); - mOwner->ignoreThreadAction()->plug(menu); - } - if ( !out_folder ) { menu->insertSeparator(); mOwner->filterMenu()->plug( menu ); // Create Filter menu @@ -2337,9 +2332,9 @@ void KMHeaders::slotRMB() } menu->insertSeparator(); + mOwner->printAction()->plug(menu); mOwner->saveAsAction()->plug(menu); mOwner->saveAttachmentsAction()->plug(menu); - mOwner->printAction()->plug(menu); menu->insertSeparator(); if ( mFolder->isTrash() ) { mOwner->deleteAction()->plug(menu); diff --git a/kmmainwidget.cpp b/kmmainwidget.cpp index d38755961..1209d1473 100644 --- a/kmmainwidget.cpp +++ b/kmmainwidget.cpp @@ -2428,7 +2428,7 @@ void KMMainWidget::setupActions() mModifyFolderAction = new KAction( i18n("&Properties"), "configure", 0, this, SLOT(slotModifyFolder()), actionCollection(), "modify" ); - mFolderMailingListPropertiesAction = new KAction( i18n("&Mailing List Management"), + mFolderMailingListPropertiesAction = new KAction( i18n("&Mailing List Management..."), /*"folder_mailinglist_properties",*/ 0, this, SLOT( slotFolderMailingListProperties() ), actionCollection(), "folder_mailinglist_properties" ); @@ -2655,6 +2655,10 @@ void KMMainWidget::setupActions() 0, this, SLOT(slotSetThreadStatusIgnored()), actionCollection(), "thread_ignored"); + mThreadStatusMenu->insert( new KActionSeparator( this ) ); + mThreadStatusMenu->insert( mWatchThreadAction ); + mThreadStatusMenu->insert( mIgnoreThreadAction ); + mSaveAttachmentsAction = new KAction( i18n("Save A&ttachments..."), "attach", 0, this, SLOT(slotSaveAttachments()), actionCollection(), "file_save_attachments" ); diff --git a/kmmainwin.rc b/kmmainwin.rc index d89b51a99..7f6cb77fc 100644 --- a/kmmainwin.rc +++ b/kmmainwin.rc @@ -2,7 +2,7 @@ the same menu entries at the same place in KMail and Kontact --> - + &File @@ -129,11 +129,7 @@ - - Mark Thread as - - - + diff --git a/kmreadermainwin.cpp b/kmreadermainwin.cpp index ffa890091..7ff5500d4 100644 --- a/kmreadermainwin.cpp +++ b/kmreadermainwin.cpp @@ -285,6 +285,9 @@ void KMReaderMainWin::setupAccel() // this, SLOT( slotSaveMsg() ), // actionCollection(), "file_save_as" ); + mSaveAsAction = KStdAction::saveAs( mReaderWin, SLOT( slotSaveMsg() ), + actionCollection() ); + mSaveAsAction->setShortcut( KStdAccel::shortcut( KStdAccel::Save ) ); mPrintAction = KStdAction::print( this, SLOT( slotPrintMsg() ), actionCollection() ); @@ -423,6 +426,9 @@ void KMReaderMainWin::slotMsgPopup(KMMessage &aMsg, const KURL &aUrl, const QPoi if(mReaderWin && !mReaderWin->copyText().isEmpty()) { if ( urlMenuAdded ) menu->insertSeparator(); + mReplyActionMenu->plug( menu ); + menu->insertSeparator(); + mReaderWin->copyAction()->plug( menu ); mReaderWin->selectAllAction()->plug( menu ); } else if ( !urlMenuAdded ) @@ -454,7 +460,7 @@ void KMReaderMainWin::slotMsgPopup(KMMessage &aMsg, const KURL &aUrl, const QPoi mReaderWin->toggleFixFontAction()->plug( menu ); menu->insertSeparator(); mPrintAction->plug( menu ); - menu->insertItem( SmallIcon("filesaveas"), i18n( "Save &As..." ), mReaderWin, SLOT( slotSaveMsg() ) ); + mSaveAsAction->plug( menu ); menu->insertItem( i18n("Save Attachments..."), mReaderWin, SLOT(slotSaveAttachments()) ); } menu->exec(aPoint, 0); diff --git a/kmreadermainwin.h b/kmreadermainwin.h index aea1c85c7..49ef395ea 100644 --- a/kmreadermainwin.h +++ b/kmreadermainwin.h @@ -65,8 +65,8 @@ private: KURL mUrl; QMap mMenuToFolder; // a few actions duplicated from kmmainwidget - KAction *mTrashAction, *mPrintAction, *mReplyAction, *mReplyAllAction, *mReplyAuthorAction, - *mReplyListAction, *mForwardInlineAction, + KAction *mTrashAction, *mPrintAction, *mSaveAsAction, *mReplyAction, + *mReplyAllAction, *mReplyAuthorAction, *mReplyListAction, *mForwardInlineAction, *mForwardAttachedAction, *mForwardDigestAction, *mRedirectAction, *mViewSourceAction; KActionMenu *mReplyActionMenu;