[prev in list] [next in list] [prev in thread] [next in thread]
List: kmail-devel
Subject: patch for Right Mouse popup in Message and Headers Window
From: Seth Chaiklin <seth () psy ! au ! dk>
Date: 2001-03-13 23:11:05
[Download RAW message or body]
1. The right mouse button popup window is different according to whether it
is done in a message or in the headers window. It is must less confusing if
they are identical.
2. Also, in the current version, when the rmb is used on the message, then
the Move To and Copy To pop up a window, rather than the much more convenient
style found in the "headers" window.
3. The attached patch moves in the direction of trying to make them identical.
4. There are still some things that should be done, but I could not figure
out how to do them. I would be happy to do them, if I could get some
hints/suggestions about how to do it.
a. I could not figure out how to add a "print" to the headers menu (I
marked it with a comment.)
b. I was able to "grey-out" the edit function for the messages in the
MainWin, except for drafts or outbox, but I could not get it to
work in the headers. Similarly, I tried and failed to grey it out in
Message menu. I would think this would be a better solution then
the current pop-up message that says that one cannot edit a message.
5. Don Sanders mentioned that editing should only happen with "drafts".
I asked about this, but didn't see any response. I have left things now so
that it is possible to edit both "drafts" and "outbox", but I will change it
if it is wrong.
--
seth@psy.au.dk
seth@schutz.psy.aau.dk
["rmb.patch" (text/plain)]
--- kmmainwin.cpp.orig Mon Mar 5 13:36:24 2001
+++ kmmainwin.cpp Tue Mar 13 22:57:42 2001
@@ -1350,7 +1355,11 @@
//-----------------------------------------------------------------------------
void KMMainWin::slotMsgPopup(const KURL &aUrl, const QPoint& aPoint)
{
+
KPopupMenu* menu = new KPopupMenu;
+ KPopupMenu *setStatusMenu = new KPopupMenu();
+ (void) KMMainWin::updateMessageMenu();
+
mUrlCurrent = aUrl;
@@ -1384,16 +1393,29 @@
}
else
{
- // popup somewhere else on the document
+ // popup somewhere else (i.e., not a URL) on the message
replyAction->plug(menu);
replyAllAction->plug(menu);
forwardAction->plug(menu);
redirectAction->plug(menu);
+ bounceAction->plug(menu);
menu->insertSeparator();
- menu->insertItem(i18n("&Move..."), this,
- SLOT(slotMoveMsg()), Key_M);
- menu->insertItem(i18n("&Copy..."), this,
- SLOT(slotCopyMsg()), Key_C);
+ menu->insertItem(i18n("&Move to"), moveMenu);
+ menu->insertItem(i18n("&Copy to"), copyMenu);
+ menu->insertItem(i18n("&Set Status"), setStatusMenu);
+ newAction->plug(setStatusMenu);
+ unreadAction->plug(setStatusMenu);
+ readAction->plug(setStatusMenu);
+ repliedAction->plug(setStatusMenu);
+ queueAction->plug(setStatusMenu);
+ sentAction->plug(setStatusMenu);
+ menu->insertSeparator();
+ KStdAction::print (this, SLOT(slotPrintMsg()), actionCollection())->plug(menu);
+ saveAsAction->plug(menu);
+ int editAction = menu->insertItem(i18n("Edi&t"), this,
+ SLOT(slotEditMsg()), Key_T);
+ if((mFolder != kernel->outboxFolder()) && (mFolder != kernel->draftsFolder()))
+ menu->setItemEnabled(editAction,false);
menu->insertSeparator();
deleteAction->plug(menu);
menu->popup(aPoint, 0);
--- kmheaders.cpp.orig Mon Mar 5 13:36:14 2001
+++ kmheaders.cpp Tue Mar 13 23:54:54 2001
@@ -2141,10 +2159,9 @@
mOwner->replyAction->plug(menu);
mOwner->replyAllAction->plug(menu);
mOwner->forwardAction->plug(menu);
+ mOwner->redirectAction->plug(menu);
mOwner->bounceAction->plug(menu);
menu->insertSeparator();
- mOwner->saveAsAction->plug(menu);
- mOwner->editAction->plug(menu);
menu->insertItem(i18n("&Move to"), msgMoveMenu);
menu->insertItem(i18n("&Copy to"), msgCopyMenu);
menu->insertItem(i18n("&Set Status"), setStatusMenu);
@@ -2154,6 +2181,12 @@
mOwner->repliedAction->plug(setStatusMenu);
mOwner->queueAction->plug(setStatusMenu);
mOwner->sentAction->plug(setStatusMenu);
+ menu->insertSeparator();
+ // Print should go here
+ mOwner->saveAsAction->plug(menu);
+ // Grey-out edit should go here
+ mOwner->editAction->plug(menu);
+ menu->insertSeparator();
mOwner->deleteAction->plug(menu);
menu->exec (QCursor::pos(), 0);
delete menu;
_______________________________________________
Kmail Developers mailing list
Kmail@master.kde.org
http://master.kde.org/mailman/listinfo/kmail
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic