mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-25 06:40:58 -04:00
* Added Reply all Button
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1027 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
9cc0e377bb
commit
1b62cbe85e
5 changed files with 134 additions and 71 deletions
|
@ -46,12 +46,12 @@
|
||||||
/* 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_MESSAGEREPLY ":/images/mail_reply.png"
|
||||||
|
#define IMAGE_MESSAGEREPLYALL ":/images/mail_replyall.png"
|
||||||
#define IMAGE_MESSAGEFORWARD ":/images/mail_forward.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_DOWNLOAD ":/images/start.png"
|
#define IMAGE_DOWNLOAD ":/images/start.png"
|
||||||
#define IMAGE_DOWNLOADALL ":/images/startall.png"
|
#define IMAGE_DOWNLOADALL ":/images/startall.png"
|
||||||
|
|
||||||
|
|
||||||
/** Constructor */
|
/** Constructor */
|
||||||
MessagesDialog::MessagesDialog(QWidget *parent)
|
MessagesDialog::MessagesDialog(QWidget *parent)
|
||||||
: MainPage(parent)
|
: MainPage(parent)
|
||||||
|
@ -67,6 +67,7 @@ MessagesDialog::MessagesDialog(QWidget *parent)
|
||||||
connect(ui.newmessageButton, SIGNAL(clicked()), this, SLOT(newmessage()));
|
connect(ui.newmessageButton, SIGNAL(clicked()), this, SLOT(newmessage()));
|
||||||
connect(ui.removemessageButton, SIGNAL(clicked()), this, SLOT(removemessage()));
|
connect(ui.removemessageButton, SIGNAL(clicked()), this, SLOT(removemessage()));
|
||||||
connect(ui.replymessageButton, SIGNAL(clicked()), this, SLOT(replytomessage()));
|
connect(ui.replymessageButton, SIGNAL(clicked()), this, SLOT(replytomessage()));
|
||||||
|
connect(ui.replyallmessageButton, SIGNAL(clicked()), this, SLOT(replyallmessage()));
|
||||||
connect(ui.forwardmessageButton, SIGNAL(clicked()), this, SLOT(forwardmessage()));
|
connect(ui.forwardmessageButton, SIGNAL(clicked()), this, SLOT(forwardmessage()));
|
||||||
|
|
||||||
//connect(ui.printbutton, SIGNAL(clicked()), this, SLOT(print()));
|
//connect(ui.printbutton, SIGNAL(clicked()), this, SLOT(print()));
|
||||||
|
@ -107,12 +108,13 @@ MessagesDialog::MessagesDialog(QWidget *parent)
|
||||||
|
|
||||||
ui.newmessageButton->setIcon(QIcon(QString(":/images/folder-draft24-pressed.png")));
|
ui.newmessageButton->setIcon(QIcon(QString(":/images/folder-draft24-pressed.png")));
|
||||||
ui.replymessageButton->setIcon(QIcon(QString(":/images/replymail-pressed.png")));
|
ui.replymessageButton->setIcon(QIcon(QString(":/images/replymail-pressed.png")));
|
||||||
|
ui.replyallmessageButton->setIcon(QIcon(QString(":/images/replymailall24-hover.png")));
|
||||||
ui.forwardmessageButton->setIcon(QIcon(QString(":/images/mailforward24-hover.png")));
|
ui.forwardmessageButton->setIcon(QIcon(QString(":/images/mailforward24-hover.png")));
|
||||||
ui.removemessageButton->setIcon(QIcon(QString(":/images/deletemail-pressed.png")));
|
ui.removemessageButton->setIcon(QIcon(QString(":/images/deletemail-pressed.png")));
|
||||||
ui.printbutton->setIcon(QIcon(QString(":/images/print24.png")));
|
ui.printbutton->setIcon(QIcon(QString(":/images/print24.png")));
|
||||||
|
|
||||||
ui.forwardmessageButton->setToolTip(tr("Forward selected Message"));
|
ui.forwardmessageButton->setToolTip(tr("Forward selected Message"));
|
||||||
|
ui.replyallmessageButton->setToolTip(tr("Replay to All"));
|
||||||
|
|
||||||
QMenu * printmenu = new QMenu();
|
QMenu * printmenu = new QMenu();
|
||||||
printmenu->addAction(ui.actionPrint);
|
printmenu->addAction(ui.actionPrint);
|
||||||
|
@ -165,6 +167,10 @@ void MessagesDialog::messageslistWidgetCostumPopupMenu( QPoint point )
|
||||||
connect( replytomsgAct , SIGNAL( triggered() ), this, SLOT( replytomessage() ) );
|
connect( replytomsgAct , SIGNAL( triggered() ), this, SLOT( replytomessage() ) );
|
||||||
contextMnu.addAction( replytomsgAct);
|
contextMnu.addAction( replytomsgAct);
|
||||||
|
|
||||||
|
replyallmsgAct = new QAction(QIcon(IMAGE_MESSAGEREPLYALL), tr( "Reply to All" ), this );
|
||||||
|
connect( replyallmsgAct , SIGNAL( triggered() ), this, SLOT( replyallmessage() ) );
|
||||||
|
contextMnu.addAction( replyallmsgAct);
|
||||||
|
|
||||||
forwardmsgAct = new QAction(QIcon(IMAGE_MESSAGEFORWARD), tr( "Forward Message" ), this );
|
forwardmsgAct = new QAction(QIcon(IMAGE_MESSAGEFORWARD), tr( "Forward Message" ), this );
|
||||||
connect( forwardmsgAct , SIGNAL( triggered() ), this, SLOT( forwardmessage() ) );
|
connect( forwardmsgAct , SIGNAL( triggered() ), this, SLOT( forwardmessage() ) );
|
||||||
contextMnu.addAction( forwardmsgAct);
|
contextMnu.addAction( forwardmsgAct);
|
||||||
|
@ -249,6 +255,41 @@ void MessagesDialog::replytomessage()
|
||||||
nMsgDialog->activateWindow();
|
nMsgDialog->activateWindow();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MessagesDialog::replyallmessage()
|
||||||
|
{
|
||||||
|
/* put msg on msgBoard, and switch to it. */
|
||||||
|
|
||||||
|
std::string cid;
|
||||||
|
std::string mid;
|
||||||
|
|
||||||
|
if(!getCurrentMsg(cid, mid))
|
||||||
|
return ;
|
||||||
|
|
||||||
|
mCurrCertId = cid;
|
||||||
|
mCurrMsgId = mid;
|
||||||
|
|
||||||
|
MessageInfo msgInfo;
|
||||||
|
if (!rsMsgs -> getMessage(mid, msgInfo))
|
||||||
|
return ;
|
||||||
|
|
||||||
|
ChanMsgDialog *nMsgDialog = new ChanMsgDialog(true);
|
||||||
|
/* fill it in */
|
||||||
|
//std::cerr << "MessagesDialog::newmessage()" << std::endl;
|
||||||
|
nMsgDialog->newMsg();
|
||||||
|
nMsgDialog->insertTitleText( (QString("Re: ") + QString::fromStdWString(msgInfo.title)).toStdString()) ;
|
||||||
|
nMsgDialog->setWindowTitle(tr("Re: ") + QString::fromStdWString(msgInfo.title) ) ;
|
||||||
|
|
||||||
|
|
||||||
|
QTextDocument doc ;
|
||||||
|
doc.setHtml(QString::fromStdWString(msgInfo.msg)) ;
|
||||||
|
std::string cited_text(doc.toPlainText().toStdString()) ;
|
||||||
|
|
||||||
|
nMsgDialog->insertPastedText(cited_text) ;
|
||||||
|
nMsgDialog->addRecipient( msgInfo.srcId ) ;
|
||||||
|
nMsgDialog->show();
|
||||||
|
nMsgDialog->activateWindow();
|
||||||
|
}
|
||||||
|
|
||||||
void MessagesDialog::forwardmessage()
|
void MessagesDialog::forwardmessage()
|
||||||
{
|
{
|
||||||
/* put msg on msgBoard, and switch to it. */
|
/* put msg on msgBoard, and switch to it. */
|
||||||
|
|
|
@ -54,6 +54,7 @@ void updateMessages ( QTreeWidgetItem * item, int column );
|
||||||
void newmessage();
|
void newmessage();
|
||||||
|
|
||||||
void replytomessage();
|
void replytomessage();
|
||||||
|
void replyallmessage();
|
||||||
void forwardmessage();
|
void forwardmessage();
|
||||||
|
|
||||||
void print();
|
void print();
|
||||||
|
@ -81,6 +82,7 @@ private:
|
||||||
/** Defines the actions for the context menu */
|
/** Defines the actions for the context menu */
|
||||||
QAction* newmsgAct;
|
QAction* newmsgAct;
|
||||||
QAction* replytomsgAct;
|
QAction* replytomsgAct;
|
||||||
|
QAction* replyallmsgAct;
|
||||||
QAction* forwardmsgAct;
|
QAction* forwardmsgAct;
|
||||||
QAction* removemsgAct;
|
QAction* removemsgAct;
|
||||||
|
|
||||||
|
|
|
@ -576,7 +576,7 @@ p, li { white-space: pre-wrap; }
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="2" >
|
<item row="1" column="3" >
|
||||||
<widget class="QPushButton" name="forwardmessageButton" >
|
<widget class="QPushButton" name="forwardmessageButton" >
|
||||||
<property name="minimumSize" >
|
<property name="minimumSize" >
|
||||||
<size>
|
<size>
|
||||||
|
@ -601,72 +601,7 @@ p, li { white-space: pre-wrap; }
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="3" >
|
<item row="1" column="7" >
|
||||||
<widget class="QPushButton" name="removemessageButton" >
|
|
||||||
<property name="minimumSize" >
|
|
||||||
<size>
|
|
||||||
<width>28</width>
|
|
||||||
<height>28</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize" >
|
|
||||||
<size>
|
|
||||||
<width>28</width>
|
|
||||||
<height>28</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="toolTip" >
|
|
||||||
<string><html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
|
||||||
p, li { white-space: pre-wrap; }
|
|
||||||
</style></head><body style=" font-family:'Arial'; font-size:8pt; font-weight:400; font-style:normal; text-decoration:none;">
|
|
||||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">remove selected message</p></body></html></string>
|
|
||||||
</property>
|
|
||||||
<property name="styleSheet" >
|
|
||||||
<string notr="true" />
|
|
||||||
</property>
|
|
||||||
<property name="text" >
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
<property name="iconSize" >
|
|
||||||
<size>
|
|
||||||
<width>24</width>
|
|
||||||
<height>24</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="4" >
|
|
||||||
<widget class="QPushButton" name="printbutton" >
|
|
||||||
<property name="sizePolicy" >
|
|
||||||
<sizepolicy vsizetype="Fixed" hsizetype="Minimum" >
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="minimumSize" >
|
|
||||||
<size>
|
|
||||||
<width>28</width>
|
|
||||||
<height>28</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize" >
|
|
||||||
<size>
|
|
||||||
<width>28</width>
|
|
||||||
<height>28</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text" >
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
<property name="iconSize" >
|
|
||||||
<size>
|
|
||||||
<width>24</width>
|
|
||||||
<height>24</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="5" >
|
|
||||||
<spacer>
|
<spacer>
|
||||||
<property name="orientation" >
|
<property name="orientation" >
|
||||||
<enum>Qt::Horizontal</enum>
|
<enum>Qt::Horizontal</enum>
|
||||||
|
@ -679,7 +614,7 @@ p, li { white-space: pre-wrap; }
|
||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="0" colspan="6" >
|
<item row="2" column="0" colspan="8" >
|
||||||
<widget class="QSplitter" name="splitter_2" >
|
<widget class="QSplitter" name="splitter_2" >
|
||||||
<property name="orientation" >
|
<property name="orientation" >
|
||||||
<enum>Qt::Horizontal</enum>
|
<enum>Qt::Horizontal</enum>
|
||||||
|
@ -1195,6 +1130,90 @@ p, li { white-space: pre-wrap; }
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="1" column="2" >
|
||||||
|
<widget class="QPushButton" name="replyallmessageButton" >
|
||||||
|
<property name="minimumSize" >
|
||||||
|
<size>
|
||||||
|
<width>28</width>
|
||||||
|
<height>28</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize" >
|
||||||
|
<size>
|
||||||
|
<width>28</width>
|
||||||
|
<height>28</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text" >
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="4" >
|
||||||
|
<widget class="QPushButton" name="removemessageButton" >
|
||||||
|
<property name="minimumSize" >
|
||||||
|
<size>
|
||||||
|
<width>28</width>
|
||||||
|
<height>28</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize" >
|
||||||
|
<size>
|
||||||
|
<width>28</width>
|
||||||
|
<height>28</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip" >
|
||||||
|
<string><html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||||
|
p, li { white-space: pre-wrap; }
|
||||||
|
</style></head><body style=" font-family:'Arial'; font-size:8pt; font-weight:400; font-style:normal; text-decoration:none;">
|
||||||
|
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">remove selected message</p></body></html></string>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet" >
|
||||||
|
<string notr="true" />
|
||||||
|
</property>
|
||||||
|
<property name="text" >
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<property name="iconSize" >
|
||||||
|
<size>
|
||||||
|
<width>24</width>
|
||||||
|
<height>24</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="5" >
|
||||||
|
<widget class="QPushButton" name="printbutton" >
|
||||||
|
<property name="sizePolicy" >
|
||||||
|
<sizepolicy vsizetype="Fixed" hsizetype="Minimum" >
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize" >
|
||||||
|
<size>
|
||||||
|
<width>28</width>
|
||||||
|
<height>28</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize" >
|
||||||
|
<size>
|
||||||
|
<width>28</width>
|
||||||
|
<height>28</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text" >
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<property name="iconSize" >
|
||||||
|
<size>
|
||||||
|
<width>24</width>
|
||||||
|
<height>24</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
<action name="actionPrint" >
|
<action name="actionPrint" >
|
||||||
<property name="text" >
|
<property name="text" >
|
||||||
|
@ -1210,7 +1229,6 @@ p, li { white-space: pre-wrap; }
|
||||||
<tabstops>
|
<tabstops>
|
||||||
<tabstop>newmessageButton</tabstop>
|
<tabstop>newmessageButton</tabstop>
|
||||||
<tabstop>replymessageButton</tabstop>
|
<tabstop>replymessageButton</tabstop>
|
||||||
<tabstop>removemessageButton</tabstop>
|
|
||||||
<tabstop>listWidget</tabstop>
|
<tabstop>listWidget</tabstop>
|
||||||
<tabstop>msgWidget</tabstop>
|
<tabstop>msgWidget</tabstop>
|
||||||
<tabstop>msgText</tabstop>
|
<tabstop>msgText</tabstop>
|
||||||
|
|
|
@ -200,6 +200,7 @@
|
||||||
<file>images/mail_delete.png</file>
|
<file>images/mail_delete.png</file>
|
||||||
<file>images/mail_get.png</file>
|
<file>images/mail_get.png</file>
|
||||||
<file>images/mail_reply.png</file>
|
<file>images/mail_reply.png</file>
|
||||||
|
<file>images/mail_replyall.png</file>
|
||||||
<file>images/mail_forward.png</file>
|
<file>images/mail_forward.png</file>
|
||||||
<file>images/mail_send.png</file>
|
<file>images/mail_send.png</file>
|
||||||
<file>images/mail_new.png</file>
|
<file>images/mail_new.png</file>
|
||||||
|
@ -231,6 +232,7 @@
|
||||||
<file>images/replymail-pressed.png</file>
|
<file>images/replymail-pressed.png</file>
|
||||||
<file>images/replymail24-hover.png</file>
|
<file>images/replymail24-hover.png</file>
|
||||||
<file>images/replymail24.png</file>
|
<file>images/replymail24.png</file>
|
||||||
|
<file>images/replymailall24-hover.png</file>
|
||||||
<file>images/reset.png</file>
|
<file>images/reset.png</file>
|
||||||
<file>images/retro4.png</file>
|
<file>images/retro4.png</file>
|
||||||
<file>images/RetroShare16.png</file>
|
<file>images/RetroShare16.png</file>
|
||||||
|
|
BIN
retroshare-gui/src/gui/images/mail_replyall.png
Executable file
BIN
retroshare-gui/src/gui/images/mail_replyall.png
Executable file
Binary file not shown.
After Width: | Height: | Size: 3.4 KiB |
Loading…
Add table
Add a link
Reference in a new issue