From c04693fabaf8e10c93b1042f58b672f9d585f209 Mon Sep 17 00:00:00 2001 From: thunder2 Date: Sat, 31 Jan 2015 12:23:56 +0000 Subject: [PATCH] Removed "Send" button in CreateGxsForumMsg and used "Ok" button of the buttonbox to send a message. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7892 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- .../src/gui/gxsforums/CreateGxsForumMsg.cpp | 9 ++++++--- .../src/gui/gxsforums/CreateGxsForumMsg.ui | 18 +----------------- 2 files changed, 7 insertions(+), 20 deletions(-) diff --git a/retroshare-gui/src/gui/gxsforums/CreateGxsForumMsg.cpp b/retroshare-gui/src/gui/gxsforums/CreateGxsForumMsg.cpp index e98d99fba..b72825742 100644 --- a/retroshare-gui/src/gui/gxsforums/CreateGxsForumMsg.cpp +++ b/retroshare-gui/src/gui/gxsforums/CreateGxsForumMsg.cpp @@ -59,13 +59,13 @@ CreateGxsForumMsg::CreateGxsForumMsg(const RsGxsGroupId &fId, const RsGxsMessage /* Setup UI helper */ mStateHelper = new UIStateHelper(this); - mStateHelper->addWidget(CREATEGXSFORUMMSG_FORUMINFO, ui.sendButton); + mStateHelper->addWidget(CREATEGXSFORUMMSG_FORUMINFO, ui.buttonBox->button(QDialogButtonBox::Ok)); mStateHelper->addWidget(CREATEGXSFORUMMSG_FORUMINFO, ui.innerFrame); mStateHelper->addLoadPlaceholder(CREATEGXSFORUMMSG_FORUMINFO, ui.forumName); mStateHelper->addLoadPlaceholder(CREATEGXSFORUMMSG_FORUMINFO, ui.forumSubject); mStateHelper->addClear(CREATEGXSFORUMMSG_FORUMINFO, ui.forumName); - mStateHelper->addWidget(CREATEGXSFORUMMSG_PARENTMSG, ui.sendButton); + mStateHelper->addWidget(CREATEGXSFORUMMSG_PARENTMSG, ui.buttonBox->button(QDialogButtonBox::Ok)); mStateHelper->addWidget(CREATEGXSFORUMMSG_PARENTMSG, ui.innerFrame); mStateHelper->addLoadPlaceholder(CREATEGXSFORUMMSG_PARENTMSG, ui.forumName); mStateHelper->addLoadPlaceholder(CREATEGXSFORUMMSG_PARENTMSG, ui.forumSubject); @@ -83,8 +83,11 @@ CreateGxsForumMsg::CreateGxsForumMsg(const RsGxsGroupId &fId, const RsGxsMessage connect(ui.hashBox, SIGNAL(fileHashingFinished(QList)), this, SLOT(fileHashingFinished(QList))); + /* Rename Ok button */ + ui.buttonBox->button(QDialogButtonBox::Ok)->setText(tr("Send")); + // connect up the buttons. - connect(ui.sendButton, SIGNAL(clicked()), this, SLOT(createMsg())); + connect(ui.buttonBox, SIGNAL(accepted()), this, SLOT(createMsg())); connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(reject())); connect(ui.emoticonButton, SIGNAL(clicked()), this, SLOT(smileyWidgetForums())); connect(ui.attachFileButton, SIGNAL(clicked()), this, SLOT(addFile())); diff --git a/retroshare-gui/src/gui/gxsforums/CreateGxsForumMsg.ui b/retroshare-gui/src/gui/gxsforums/CreateGxsForumMsg.ui index 03f8c461d..923cc1264 100644 --- a/retroshare-gui/src/gui/gxsforums/CreateGxsForumMsg.ui +++ b/retroshare-gui/src/gui/gxsforums/CreateGxsForumMsg.ui @@ -290,22 +290,6 @@ p, li { white-space: pre-wrap; } - - - - - 0 - 0 - - - - Send - - - true - - - @@ -315,7 +299,7 @@ p, li { white-space: pre-wrap; } - QDialogButtonBox::Cancel + QDialogButtonBox::Cancel|QDialogButtonBox::Ok