diff --git a/retroshare-gui/src/gui/ForumsDialog.cpp b/retroshare-gui/src/gui/ForumsDialog.cpp index 2110ca1bd..ee34ebd86 100644 --- a/retroshare-gui/src/gui/ForumsDialog.cpp +++ b/retroshare-gui/src/gui/ForumsDialog.cpp @@ -1474,7 +1474,6 @@ void ForumsDialog::createthread() } CreateForumMsg *cfm = new CreateForumMsg(mCurrForumId, ""); - cfm->setWindowTitle(tr("Start New Thread")); cfm->show(); /* window will destroy itself! */ diff --git a/retroshare-gui/src/gui/forums/CreateForumMsg.cpp b/retroshare-gui/src/gui/forums/CreateForumMsg.cpp index 4112f1a29..04d759a2a 100644 --- a/retroshare-gui/src/gui/forums/CreateForumMsg.cpp +++ b/retroshare-gui/src/gui/forums/CreateForumMsg.cpp @@ -41,13 +41,19 @@ /** Constructor */ -CreateForumMsg::CreateForumMsg(std::string fId, std::string pId) -: QMainWindow(NULL), mForumId(fId), mParentId(pId) +CreateForumMsg::CreateForumMsg(const std::string &fId, const std::string &pId) +: QDialog(NULL), mForumId(fId), mParentId(pId) { /* Invoke the Qt Designer generated object setup routine */ ui.setupUi(this); setAttribute(Qt::WA_DeleteOnClose, true); + QString text = pId.empty() ? tr("Start New Thread") : tr("Post Forum Message"); + setWindowTitle(text); + + ui.headerFrame->setHeaderImage(QPixmap(":/images/konversation64.png")); + ui.headerFrame->setHeaderText(text); + Settings->loadWidgetInformation(this); connect( ui.forumMessage, SIGNAL( customContextMenuRequested( QPoint ) ), this, SLOT( forumMessageCostumPopupMenu( QPoint ) ) ); @@ -55,8 +61,8 @@ CreateForumMsg::CreateForumMsg(std::string fId, std::string pId) connect(ui.hashBox, SIGNAL(fileHashingFinished(QList)), this, SLOT(fileHashingFinished(QList))); // connect up the buttons. - connect( ui.postmessage_action, SIGNAL( triggered (bool) ), this, SLOT( createMsg( ) ) ); - connect( ui.close_action, SIGNAL( triggered (bool) ), this, SLOT( cancelMsg( ) ) ); + connect( ui.buttonBox, SIGNAL(accepted()), this, SLOT(createMsg())); + connect( ui.buttonBox, SIGNAL(rejected()), this, SLOT(close())); connect( ui.emoticonButton, SIGNAL(clicked()), this, SLOT(smileyWidgetForums())); connect( ui.attachFileButton, SIGNAL(clicked() ), this , SLOT(addFile())); connect( ui.pastersButton, SIGNAL(clicked() ), this , SLOT(pasteLink())); @@ -189,11 +195,6 @@ void CreateForumMsg::closeEvent (QCloseEvent * /*event*/) Settings->saveWidgetInformation(this); } -void CreateForumMsg::cancelMsg() -{ - close(); -} - void CreateForumMsg::smileyWidgetForums() { Emoticons::showSmileyWidget(this, ui.emoticonButton, SLOT(addSmileys()), false); diff --git a/retroshare-gui/src/gui/forums/CreateForumMsg.h b/retroshare-gui/src/gui/forums/CreateForumMsg.h index 630b397cb..1ff855b5a 100644 --- a/retroshare-gui/src/gui/forums/CreateForumMsg.h +++ b/retroshare-gui/src/gui/forums/CreateForumMsg.h @@ -25,12 +25,12 @@ #include "ui_CreateForumMsg.h" -class CreateForumMsg : public QMainWindow +class CreateForumMsg : public QDialog { Q_OBJECT public: - CreateForumMsg(std::string fId, std::string pId); + CreateForumMsg(const std::string &fId, const std::string &pId); void newMsg(); /* cleanup */ @@ -41,7 +41,6 @@ private slots: void fileHashingFinished(QList hashedFiles); /* actions to take.... */ void createMsg(); - void cancelMsg(); void pasteLink(); void pasteLinkFull(); void pasteOwnCertificateLink(); diff --git a/retroshare-gui/src/gui/forums/CreateForumMsg.ui b/retroshare-gui/src/gui/forums/CreateForumMsg.ui index 14be8b9ea..80206caad 100644 --- a/retroshare-gui/src/gui/forums/CreateForumMsg.ui +++ b/retroshare-gui/src/gui/forums/CreateForumMsg.ui @@ -1,7 +1,7 @@ CreateForumMsg - + 0 @@ -17,21 +17,27 @@ :/images/rstray3.png:/images/rstray3.png - - Qt::ToolButtonTextUnderIcon - - - - - 0 - - - 0 - - - - - + + + 0 + + + 0 + + + + + + + + QFrame::StyledPanel + + + QFrame::Raised + + + + QFrame::NoFrame @@ -39,48 +45,37 @@ QFrame::Raised - - 6 - - - 6 + + 0 - - - - - Forum - - - - - - - false - - - - + + + Forum + + + + + + + false + + - - - - - Subject - - - - - - - + + + Subject + + + + + - + @@ -206,112 +201,73 @@ - - - - QFrame::NoFrame + + + + Forum Post - - QFrame::Raised - - - - 6 - - - 6 - + - - - Forum Post + + + Qt::CustomContextMenu - - - - - Qt::CustomContextMenu - - - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;"></p></body></html> - - - - - - - - - - Attach files via drag and drop - - - - - - 0 - 0 - - - - You can attach files via drag and drop here in this window - - - true - - - - + + + + Attach files via drag and drop + + + + + + + 0 + 0 + + + + You can attach files via drag and drop here in this window + + + true + + + + + + + + + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok + + + - - - - - - toolBar - - - false - - - TopToolBarArea - - - false - - - - - - - - :/images/mail_send24.png:/images/mail_send24.png - - - Post Forum Msg - - - - - - :/images/button_cancel.png:/images/button_cancel.png - - - Close - - + + + + + HeaderFrame + QFrame +
gui/common/HeaderFrame.h
+ 1 +
HashBox QScrollArea