Version: 1.8 (using KDE 3.4.0, Gentoo) Compiler: gcc version 3.3.5 (Gentoo Linux 3.3.5-r1, ssp-3.3.2-3, pie-8.7.7.1) OS: Linux (i686) release 2.6.11-gentoo-r1 Normally, when I rightclick email addresses in a message (header or body), I get a context menu with options to send e.g. a reply on the current to that address. But when some text is selected, the context menu is replaced by a simple one with only the options 'select all' and 'copy'; also when I rightclick email addresses _outside_ the selected text. My proposal would be: show the copy-context menu only inside the selected text, and keep the normal context menu for email addresses.
CVS commit by mteijeiro: * When there are selected text on a message reader and rigthclick on a url, show url context menu, instead of the copy menu. BUGS:103493 M +14 -5 kmmainwidget.cpp 1.327 M +14 -7 kmreadermainwin.cpp 1.44 --- kdepim/kmail/kmreadermainwin.cpp #1.43:1.44 @@ -34,5 +34,5 @@ #include <kaction.h> #include <kiconloader.h> - +#include <kdebug.h> #include "kmcommands.h" #include "kmenubar.h" @@ -312,9 +312,8 @@ void KMReaderMainWin::slotMsgPopup(KMMes mUrl = aUrl; mMsg = &aMsg; + bool urlMenuAdded=false; - if(mReaderWin && !mReaderWin->copyText().isEmpty()) { - mReaderWin->copyAction()->plug( menu ); - mReaderWin->selectAllAction()->plug( menu ); - } else if (!aUrl.isEmpty()) { + if (!aUrl.isEmpty()) + { if (aUrl.protocol() == "mailto") { // popup on a mailto URL @@ -335,5 +334,13 @@ void KMReaderMainWin::slotMsgPopup(KMMes mReaderWin->addBookmarksAction()->plug( menu ); } - } else { + urlMenuAdded=true; + } + if(mReaderWin && !mReaderWin->copyText().isEmpty()) { + if ( urlMenuAdded ) + menu->insertSeparator(); + mReaderWin->copyAction()->plug( menu ); + mReaderWin->selectAllAction()->plug( menu ); + } else if ( !urlMenuAdded ) + { // popup somewhere else (i.e., not a URL) on the message --- kdepim/kmail/kmmainwidget.cpp #1.326:1.327 @@ -2078,8 +2078,8 @@ void KMMainWidget::slotMsgPopup(KMMessag updateMessageMenu(); mUrlCurrent = aUrl; - if(mMsgView && !mMsgView->copyText().isEmpty()) { - mMsgView->copyAction()->plug( menu ); - mMsgView->selectAllAction()->plug( menu ); - } else if (!aUrl.isEmpty()) + + bool urlMenuAdded = false; + + if (!aUrl.isEmpty()) { if (aUrl.protocol() == "mailto") @@ -2111,7 +2111,16 @@ void KMMainWidget::slotMsgPopup(KMMessag mMsgView->startImChatAction()->plug( menu ); } + + urlMenuAdded=true; kdDebug( 0 ) << k_funcinfo << " URL is: " << aUrl << endl; } - else + + + if(mMsgView && !mMsgView->copyText().isEmpty()) { + if ( urlMenuAdded ) + menu->insertSeparator(); + mMsgView->copyAction()->plug( menu ); + mMsgView->selectAllAction()->plug( menu ); + } else if ( !urlMenuAdded ) { // popup somewhere else (i.e., not a URL) on the message
On Saturday 09 April 2005 13:08, emeteo@escomposlinux.org wrote: > emeteo escomposlinux org changed: > >
You need to log in before you can comment on or make changes to this bug.