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

View File

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