Connected the menu actions reply, reply all and forward in MessagesDialog. Now they work again.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4233 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2011-06-05 13:37:49 +00:00
parent 11a56d2737
commit a5ccab9a13
2 changed files with 64 additions and 35 deletions

View File

@ -41,9 +41,6 @@
/* Images for context menu icons */
#define IMAGE_MESSAGE ":/images/folder-draft.png"
#define IMAGE_MESSAGEREPLY ":/images/mail_reply.png"
#define IMAGE_MESSAGEREPLYALL ":/images/mail_replyall.png"
#define IMAGE_MESSAGEFORWARD ":/images/mail_forward.png"
#define IMAGE_MESSAGEREMOVE ":/images/message-mail-imapdelete.png"
#define IMAGE_STAR_ON ":/images/star-on-16.png"
#define IMAGE_STAR_OFF ":/images/star-off-16.png"
@ -252,12 +249,12 @@ MessagesDialog::MessagesDialog(QWidget *parent)
ui.forwardmessageButton->setToolTip(tr("Forward selected Message"));
ui.replyallmessageButton->setToolTip(tr("Reply to All"));
QMenu * printmenu = new QMenu();
QMenu *printmenu = new QMenu();
printmenu->addAction(ui.actionPrint);
printmenu->addAction(ui.actionPrintPreview);
ui.printbutton->setMenu(printmenu);
QMenu * viewmenu = new QMenu();
QMenu *viewmenu = new QMenu();
viewmenu->addAction(ui.actionTextBesideIcon);
viewmenu->addAction(ui.actionIconOnly);
//viewmenu->addAction(ui.actionTextUnderIcon);
@ -559,18 +556,14 @@ void MessagesDialog::messageslistWidgetCostumPopupMenu( QPoint point )
contextMnu.addSeparator();
action = contextMnu.addAction(QIcon(IMAGE_MESSAGEREPLY), tr("Reply to Message"), this, SLOT(replytomessage()));
if (nCount != 1) {
action->setDisabled(true);
}
action = contextMnu.addAction(QIcon(IMAGE_MESSAGEREPLYALL), tr("Reply to All"), this, SLOT(replyallmessage()));
if (nCount != 1) {
action->setDisabled(true);
}
action = contextMnu.addAction(QIcon(IMAGE_MESSAGEFORWARD), tr("Forward Message"), this, SLOT(forwardmessage()));
if (nCount != 1) {
action->setDisabled(true);
}
contextMnu.addAction(ui.actionReply);
ui.actionReply->setEnabled(nCount == 1);
contextMnu.addAction(ui.actionReplyAll);
ui.actionReplyAll->setEnabled(nCount == 1);
contextMnu.addAction(ui.actionForward);
ui.actionForward->setEnabled(nCount == 1);
contextMnu.addSeparator();
@ -1936,6 +1929,17 @@ void MessagesDialog::connectActions()
ui.actionSaveAs->disconnect();
ui.removemessageButton->disconnect();
ui.actionReply->disconnect();
ui.actionReplyAll->disconnect();
ui.actionForward->disconnect();
if (msgWidget) {
// connect actions
msg->connectAction(MessageWidget::ACTION_REPLY, ui.actionReply);
msg->connectAction(MessageWidget::ACTION_REPLY_ALL, ui.actionReplyAll);
msg->connectAction(MessageWidget::ACTION_FORWARD, ui.actionForward);
}
if (msg) {
if (tab == 0) {
// connect with own slot to remove multiple messages

View File

@ -582,7 +582,7 @@ border: 1px solid #CCCCCC;}</string>
<string>Compose</string>
</property>
<property name="icon">
<iconset resource="images.qrc">
<iconset>
<normaloff>:/images/folder-draft24.png</normaloff>:/images/folder-draft24.png</iconset>
</property>
<property name="iconSize">
@ -639,7 +639,7 @@ border: 1px solid #CCCCCC;}</string>
<string>Reply</string>
</property>
<property name="icon">
<iconset resource="images.qrc">
<iconset>
<normaloff>:/images/replymail-pressed.png</normaloff>:/images/replymail-pressed.png</iconset>
</property>
<property name="iconSize">
@ -680,7 +680,7 @@ border: 1px solid #CCCCCC;}</string>
<string>Reply all</string>
</property>
<property name="icon">
<iconset resource="images.qrc">
<iconset>
<normaloff>:/images/replymailall24-hover.png</normaloff>:/images/replymailall24-hover.png</iconset>
</property>
<property name="iconSize">
@ -721,7 +721,7 @@ border: 1px solid #CCCCCC;}</string>
<string>Foward</string>
</property>
<property name="icon">
<iconset resource="images.qrc">
<iconset>
<normaloff>:/images/mailforward24-hover.png</normaloff>:/images/mailforward24-hover.png</iconset>
</property>
<property name="iconSize">
@ -772,7 +772,7 @@ border: 1px solid #CCCCCC;}</string>
<string>Delete</string>
</property>
<property name="icon">
<iconset resource="images.qrc">
<iconset>
<normaloff>:/images/deletemail24.png</normaloff>:/images/deletemail24.png</iconset>
</property>
<property name="iconSize">
@ -819,7 +819,7 @@ border: 1px solid #CCCCCC;}</string>
<string>Print</string>
</property>
<property name="icon">
<iconset resource="images.qrc">
<iconset>
<normaloff>:/images/print24.png</normaloff>:/images/print24.png</iconset>
</property>
<property name="iconSize">
@ -854,7 +854,7 @@ border: 1px solid #CCCCCC;}</string>
<string>Display</string>
</property>
<property name="icon">
<iconset resource="images.qrc">
<iconset>
<normaloff>:/images/looknfeel.png</normaloff>:/images/looknfeel.png</iconset>
</property>
<property name="iconSize">
@ -895,7 +895,7 @@ border: 1px solid #CCCCCC;}</string>
<string/>
</property>
<property name="pixmap">
<pixmap resource="images.qrc">:/images/find-16.png</pixmap>
<pixmap>:/images/find-16.png</pixmap>
</property>
</widget>
</item>
@ -993,7 +993,7 @@ border-image: url(:/images/closepressed.png)
<string>Tags</string>
</property>
<property name="icon">
<iconset resource="images.qrc">
<iconset>
<normaloff>:/images/tag24.png</normaloff>:/images/tag24.png</iconset>
</property>
<property name="iconSize">
@ -1129,7 +1129,7 @@ border-image: url(:/images/closepressed.png)
<string>Inbox</string>
</property>
<property name="icon">
<iconset resource="images.qrc">
<iconset>
<normaloff>:/images/folder-inbox.png</normaloff>:/images/folder-inbox.png</iconset>
</property>
</item>
@ -1138,7 +1138,7 @@ border-image: url(:/images/closepressed.png)
<string>Outbox</string>
</property>
<property name="icon">
<iconset resource="images.qrc">
<iconset>
<normaloff>:/images/folder-outbox.png</normaloff>:/images/folder-outbox.png</iconset>
</property>
</item>
@ -1147,7 +1147,7 @@ border-image: url(:/images/closepressed.png)
<string>Draft</string>
</property>
<property name="icon">
<iconset resource="images.qrc">
<iconset>
<normaloff>:/images/folder-draft.png</normaloff>:/images/folder-draft.png</iconset>
</property>
</item>
@ -1156,7 +1156,7 @@ border-image: url(:/images/closepressed.png)
<string>Sent</string>
</property>
<property name="icon">
<iconset resource="images.qrc">
<iconset>
<normaloff>:/images/folder-sent.png</normaloff>:/images/folder-sent.png</iconset>
</property>
</item>
@ -1165,7 +1165,7 @@ border-image: url(:/images/closepressed.png)
<string>Trash</string>
</property>
<property name="icon">
<iconset resource="images.qrc">
<iconset>
<normaloff>:/images/folder-trash.png</normaloff>:/images/folder-trash.png</iconset>
</property>
</item>
@ -1212,7 +1212,7 @@ border: 1px solid #CCCCCC;}</string>
<string>Quick View</string>
</property>
<property name="icon">
<iconset resource="images.qrc">
<iconset>
<normaloff>:/images/tag24.png</normaloff>:/images/tag24.png</iconset>
</property>
<property name="checkable">
@ -1366,6 +1366,33 @@ padding: 4px;
<string>Save As...</string>
</property>
</action>
<action name="actionReply">
<property name="icon">
<iconset>
<normaloff>:/images/mail_reply.png</normaloff>:/images/mail_reply.png</iconset>
</property>
<property name="text">
<string>Reply to Message</string>
</property>
</action>
<action name="actionReplyAll">
<property name="icon">
<iconset>
<normaloff>:/images/mail_replyall.png</normaloff>:/images/mail_replyall.png</iconset>
</property>
<property name="text">
<string>Reply to All</string>
</property>
</action>
<action name="actionForward">
<property name="icon">
<iconset>
<normaloff>:/images/mail_forward.png</normaloff>:/images/mail_forward.png</iconset>
</property>
<property name="text">
<string>Forward Message</string>
</property>
</action>
</widget>
<customwidgets>
<customwidget>
@ -1380,9 +1407,7 @@ padding: 4px;
<tabstop>replymessageButton</tabstop>
<tabstop>listWidget</tabstop>
</tabstops>
<resources>
<include location="images.qrc"/>
</resources>
<resources/>
<connections>
<connection>
<sender>quickViewsButton</sender>