mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-05 07:35:12 -04:00
all messages in MessagesDialog are now editable from context menu or with double click
changes from defnax with some corrections from me git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3135 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
f4186fb7c8
commit
5b1fae0123
4 changed files with 54 additions and 34 deletions
|
@ -43,7 +43,9 @@ MessageComposer::MessageComposer(QWidget *parent, Qt::WFlags flags)
|
|||
{
|
||||
/* Invoke the Qt Designer generated object setup routine */
|
||||
ui.setupUi(this);
|
||||
|
||||
|
||||
m_nBox = -1; // not defined
|
||||
|
||||
setupFileActions();
|
||||
setupEditActions();
|
||||
setupViewActions();
|
||||
|
@ -397,6 +399,7 @@ void MessageComposer::newMsg(std::string msgId /*= ""*/)
|
|||
insertSendList();
|
||||
|
||||
m_sMsgId = msgId;
|
||||
m_nBox = -1; // not defined
|
||||
|
||||
if (m_sMsgId.empty() == false) {
|
||||
// fill existing message
|
||||
|
@ -407,6 +410,8 @@ void MessageComposer::newMsg(std::string msgId /*= ""*/)
|
|||
return;
|
||||
}
|
||||
|
||||
m_nBox = msgInfo.msgflags & RS_MSG_BOXMASK;
|
||||
|
||||
insertTitleText( QString::fromStdWString(msgInfo.title).toStdString());
|
||||
setWindowTitle( tr ("Compose: ") + QString::fromStdWString(msgInfo.title));
|
||||
|
||||
|
@ -518,7 +523,10 @@ void MessageComposer::sendMessage_internal(bool bDraftbox)
|
|||
}
|
||||
|
||||
if (bDraftbox) {
|
||||
mi.msgId = m_sMsgId;
|
||||
if (m_nBox != -1 && (m_nBox & RS_MSG_DRAFTBOX) == RS_MSG_DRAFTBOX) {
|
||||
// only save draft box to draft box again, for all other message create a new one in draft box
|
||||
mi.msgId = m_sMsgId;
|
||||
}
|
||||
rsMsgs->MessageToDraft(mi);
|
||||
} else {
|
||||
rsMsgs->MessageSend(mi);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue