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
This commit is contained in:
thunder2 2015-01-31 12:23:56 +00:00
parent 1fcd6d417d
commit c04693faba
2 changed files with 7 additions and 20 deletions

View File

@ -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<HashedFile>)), this, SLOT(fileHashingFinished(QList<HashedFile>)));
/* 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()));

View File

@ -290,22 +290,6 @@ p, li { white-space: pre-wrap; }
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="sendButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Send</string>
</property>
<property name="default">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="sizePolicy">
@ -315,7 +299,7 @@ p, li { white-space: pre-wrap; }
</sizepolicy>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Cancel</set>
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
</property>
</widget>
</item>