* Backport of bugfix 103493

svn path=/branches/KDE_3_4_BRANCH/kdepim/; revision=404579
wilder-work
Mario Teijeiro Otero 21 years ago
parent 1004935391
commit f132cf242a
  1. 19
      kmmainwidget.cpp
  2. 19
      kmreadermainwin.cpp

@ -2068,10 +2068,10 @@ void KMMainWidget::slotMsgPopup(KMMessage&, const KURL &aUrl, const QPoint& aPoi
KPopupMenu * menu = new KPopupMenu;
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")
{
@ -2101,9 +2101,18 @@ void KMMainWidget::slotMsgPopup(KMMessage&, const KURL &aUrl, const QPoint& aPoi
// only be present if it is.
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

@ -19,7 +19,7 @@
#include <kwin.h>
#include <kaction.h>
#include <kiconloader.h>
#include <kdebug.h>
#include "kmcommands.h"
#include "kmenubar.h"
#include "kpopupmenu.h"
@ -297,11 +297,10 @@ void KMReaderMainWin::slotMsgPopup(KMMessage &aMsg, const KURL &aUrl, const QPoi
KPopupMenu * menu = new KPopupMenu;
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
mReaderWin->mailToComposeAction()->plug( menu );
@ -320,7 +319,15 @@ void KMReaderMainWin::slotMsgPopup(KMMessage &aMsg, const KURL &aUrl, const QPoi
mReaderWin->copyURLAction()->plug( menu );
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
if (!mMsg) // no message

Loading…
Cancel
Save