From b67f9f88fef52d6ae6163e370706c583350f197e Mon Sep 17 00:00:00 2001 From: thunder2 Date: Wed, 10 Oct 2012 10:51:53 +0000 Subject: [PATCH] Changed the standard dialog buttons from single buttons to buttonbox to have a standard layout and a standard translation. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5657 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- retroshare-gui/src/gui/DetailsDialog.ui | 54 ++++++------- .../src/gui/channels/ChannelDetails.cpp | 24 +----- .../src/gui/channels/ChannelDetails.h | 7 -- .../src/gui/channels/ChannelDetails.ui | 32 +------- .../src/gui/channels/CreateChannel.cpp | 9 +-- .../src/gui/channels/CreateChannel.h | 1 - .../src/gui/channels/CreateChannel.ui | 29 +------ .../src/gui/channels/EditChanDetails.cpp | 11 +-- .../src/gui/channels/EditChanDetails.h | 1 - .../src/gui/channels/EditChanDetails.ui | 32 +------- retroshare-gui/src/gui/channels/ShareKey.cpp | 9 +-- retroshare-gui/src/gui/channels/ShareKey.h | 1 - retroshare-gui/src/gui/channels/ShareKey.ui | 26 +------ .../src/gui/chat/CreateLobbyDialog.cpp | 14 ++-- .../src/gui/chat/CreateLobbyDialog.h | 1 - .../src/gui/chat/CreateLobbyDialog.ui | 26 +------ .../src/gui/connect/ConfCertDialog.cpp | 4 +- .../src/gui/connect/ConfCertDialog.ui | 47 +++--------- retroshare-gui/src/gui/forums/CreateForum.cpp | 9 +-- retroshare-gui/src/gui/forums/CreateForum.h | 1 - retroshare-gui/src/gui/forums/CreateForum.ui | 32 +------- .../src/gui/forums/EditForumDetails.cpp | 3 +- .../src/gui/forums/EditForumDetails.ui | 51 +------------ .../src/gui/forums/ForumDetails.cpp | 21 +---- retroshare-gui/src/gui/forums/ForumDetails.h | 6 -- retroshare-gui/src/gui/forums/ForumDetails.ui | 32 +------- .../src/gui/forumsv2/CreateForumV2.cpp | 12 +-- .../src/gui/forumsv2/CreateForumV2.h | 1 - .../src/gui/forumsv2/CreateForumV2.ui | 29 +------ .../src/gui/forumsv2/EditForumV2Details.cpp | 3 +- .../src/gui/forumsv2/EditForumV2Details.ui | 51 +------------ .../src/gui/forumsv2/ForumV2Details.cpp | 21 +---- .../src/gui/forumsv2/ForumV2Details.h | 6 -- .../src/gui/forumsv2/ForumV2Details.ui | 32 +------- .../src/gui/im_history/ImHistoryBrowser.ui | 29 ++----- .../src/gui/profile/StatusMessage.cpp | 4 +- .../src/gui/profile/StatusMessage.ui | 31 +------- .../src/gui/settings/rsettingswin.cpp | 3 +- retroshare-gui/src/gui/settings/settings.ui | 76 +------------------ 39 files changed, 110 insertions(+), 671 deletions(-) diff --git a/retroshare-gui/src/gui/DetailsDialog.ui b/retroshare-gui/src/gui/DetailsDialog.ui index a443038ac..9cbc14951 100644 --- a/retroshare-gui/src/gui/DetailsDialog.ui +++ b/retroshare-gui/src/gui/DetailsDialog.ui @@ -23,7 +23,7 @@ 0 - + :/images/fileinfo.png:/images/fileinfo.png @@ -352,7 +352,7 @@ - + :/images/filecomments.png:/images/filecomments.png @@ -366,7 +366,7 @@ - + retroshare link(s) @@ -407,33 +407,10 @@ - - - - Qt::Horizontal - - - - 321 - 20 - - - - - - - OK - - - true - - - - - - - Cancel + + + QDialogButtonBox::Close @@ -442,5 +419,22 @@ - + + + buttonBox + rejected() + DetailsDialog + close() + + + 262 + 456 + + + 262 + 238 + + + + diff --git a/retroshare-gui/src/gui/channels/ChannelDetails.cpp b/retroshare-gui/src/gui/channels/ChannelDetails.cpp index fa228cbcd..936bae091 100644 --- a/retroshare-gui/src/gui/channels/ChannelDetails.cpp +++ b/retroshare-gui/src/gui/channels/ChannelDetails.cpp @@ -43,11 +43,8 @@ ChannelDetails::ChannelDetails(QWidget *parent, Qt::WFlags flags) /* Invoke Qt Designer generated QObject setup routine */ ui.setupUi(this); - connect(ui.applyButton, SIGNAL(clicked()), this, SLOT(applyDialog())); - connect(ui.cancelButton, SIGNAL(clicked()), this, SLOT(closeinfodlg())); + connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(close())); - ui.applyButton->setToolTip(tr("Close")); - ui.nameline ->setReadOnly(true); ui.popline ->setReadOnly(true); ui.postline ->setReadOnly(true); @@ -79,11 +76,6 @@ void ChannelDetails::closeEvent (QCloseEvent * event) QWidget::closeEvent(event); } -void ChannelDetails::closeinfodlg() -{ - close(); -} - void ChannelDetails::showDetails(std::string mChannelId) { cId = mChannelId; @@ -137,17 +129,3 @@ void ChannelDetails::loadChannel() } } - -void ChannelDetails::applyDialog() -{ - - /* reload now */ - loadChannel(); - - /* close the Dialog after the Changes applied */ - closeinfodlg(); - -} - - - diff --git a/retroshare-gui/src/gui/channels/ChannelDetails.h b/retroshare-gui/src/gui/channels/ChannelDetails.h index 87ce1528c..03eda5b89 100644 --- a/retroshare-gui/src/gui/channels/ChannelDetails.h +++ b/retroshare-gui/src/gui/channels/ChannelDetails.h @@ -48,14 +48,7 @@ public slots: protected: void closeEvent (QCloseEvent * event); -private slots: - - void closeinfodlg(); - void applyDialog(); - - private: - void loadChannel(); std::string cId; diff --git a/retroshare-gui/src/gui/channels/ChannelDetails.ui b/retroshare-gui/src/gui/channels/ChannelDetails.ui index cfefe93ab..f7c15c02e 100644 --- a/retroshare-gui/src/gui/channels/ChannelDetails.ui +++ b/retroshare-gui/src/gui/channels/ChannelDetails.ui @@ -131,35 +131,9 @@ - - - Qt::Horizontal - - - - 311 - 20 - - - - - - - - Cancel - - - - - - - OK - - - false - - - true + + + QDialogButtonBox::Close diff --git a/retroshare-gui/src/gui/channels/CreateChannel.cpp b/retroshare-gui/src/gui/channels/CreateChannel.cpp index c19f33e47..f11925d53 100644 --- a/retroshare-gui/src/gui/channels/CreateChannel.cpp +++ b/retroshare-gui/src/gui/channels/CreateChannel.cpp @@ -44,8 +44,8 @@ CreateChannel::CreateChannel(QWidget *parent) picture = NULL; // connect up the buttons. - connect( ui.cancelButton, SIGNAL( clicked ( bool ) ), this, SLOT( cancelChannel( ) ) ); - connect( ui.createButton, SIGNAL( clicked ( bool ) ), this, SLOT( createChannel( ) ) ); + connect( ui.buttonBox, SIGNAL(accepted()), this, SLOT(createChannel())); + connect( ui.buttonBox, SIGNAL(rejected()), this, SLOT(close())); connect( ui.logoButton, SIGNAL(clicked() ), this , SLOT(addChannelLogo())); connect( ui.pubKeyShare_cb, SIGNAL( clicked() ), this, SLOT( setShareList( ) )); @@ -134,11 +134,6 @@ void CreateChannel::createChannel() close(); } -void CreateChannel::cancelChannel() -{ - close(); -} - void CreateChannel::addChannelLogo() // the same function as in EditChanDetails { QPixmap img = misc::getOpenThumbnailedPicture(this, tr("Load channel logo"), 64, 64); diff --git a/retroshare-gui/src/gui/channels/CreateChannel.h b/retroshare-gui/src/gui/channels/CreateChannel.h index bc271fba8..895ce842d 100644 --- a/retroshare-gui/src/gui/channels/CreateChannel.h +++ b/retroshare-gui/src/gui/channels/CreateChannel.h @@ -36,7 +36,6 @@ public: private slots: /* actions to take.... */ void createChannel(); - void cancelChannel(); void addChannelLogo(); void setShareList(); diff --git a/retroshare-gui/src/gui/channels/CreateChannel.ui b/retroshare-gui/src/gui/channels/CreateChannel.ui index 5c698e3a0..d93df8009 100644 --- a/retroshare-gui/src/gui/channels/CreateChannel.ui +++ b/retroshare-gui/src/gui/channels/CreateChannel.ui @@ -337,32 +337,9 @@ - - - Qt::Horizontal - - - - 238 - 20 - - - - - - - - Cancel - - - - - - - Create - - - true + + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok diff --git a/retroshare-gui/src/gui/channels/EditChanDetails.cpp b/retroshare-gui/src/gui/channels/EditChanDetails.cpp index a881a2857..c7fc84dd1 100644 --- a/retroshare-gui/src/gui/channels/EditChanDetails.cpp +++ b/retroshare-gui/src/gui/channels/EditChanDetails.cpp @@ -40,8 +40,8 @@ EditChanDetails::EditChanDetails(QWidget *parent, Qt::WFlags flags, std::string /* Invoke Qt Designer generated QObject setup routine */ ui.setupUi(this); - connect(ui.applyButton, SIGNAL(clicked()), this, SLOT(applyDialog())); - connect(ui.cancelButton, SIGNAL(clicked()), this, SLOT(closeinfodlg())); + connect(ui.buttonBox, SIGNAL(accepted()), this, SLOT(applyDialog())); + connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(close())); connect( ui.logoButton, SIGNAL(clicked() ), this , SLOT(addChannelLogo())); @@ -51,11 +51,6 @@ EditChanDetails::EditChanDetails(QWidget *parent, Qt::WFlags flags, std::string loadChannel(); } -void EditChanDetails::closeinfodlg() -{ - close(); -} - void EditChanDetails::loadChannel() { if (!rsChannels) @@ -104,7 +99,7 @@ void EditChanDetails::applyDialog() rsChannels->channelEditInfo(mChannelId, ci); /* close the Dialog after the Changes applied */ - closeinfodlg(); + close(); return; } diff --git a/retroshare-gui/src/gui/channels/EditChanDetails.h b/retroshare-gui/src/gui/channels/EditChanDetails.h index e13650ffb..fc17cc06c 100644 --- a/retroshare-gui/src/gui/channels/EditChanDetails.h +++ b/retroshare-gui/src/gui/channels/EditChanDetails.h @@ -39,7 +39,6 @@ signals: void configChanged(); private slots: - void closeinfodlg(); void applyDialog(); void addChannelLogo(); diff --git a/retroshare-gui/src/gui/channels/EditChanDetails.ui b/retroshare-gui/src/gui/channels/EditChanDetails.ui index 1660e4c22..4035d284f 100644 --- a/retroshare-gui/src/gui/channels/EditChanDetails.ui +++ b/retroshare-gui/src/gui/channels/EditChanDetails.ui @@ -21,35 +21,9 @@ - - - Qt::Horizontal - - - - 311 - 20 - - - - - - - - Cancel - - - - - - - OK - - - false - - - true + + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok diff --git a/retroshare-gui/src/gui/channels/ShareKey.cpp b/retroshare-gui/src/gui/channels/ShareKey.cpp index 202936e4c..75c36ed8f 100644 --- a/retroshare-gui/src/gui/channels/ShareKey.cpp +++ b/retroshare-gui/src/gui/channels/ShareKey.cpp @@ -39,8 +39,8 @@ ShareKey::ShareKey(QWidget *parent, Qt::WFlags flags, std::string grpId, int grp ui->headerFrame->setHeaderImage(QPixmap(":/images/user/agt_forum64.png")); ui->headerFrame->setHeaderText(tr("Share Channel")); - connect( ui->shareButton, SIGNAL( clicked ( bool ) ), this, SLOT( shareKey( ) ) ); - connect( ui->cancelButton, SIGNAL( clicked ( bool ) ), this, SLOT( cancel( ) ) ); + connect( ui->buttonBox, SIGNAL(accepted()), this, SLOT(shareKey())); + connect( ui->buttonBox, SIGNAL(rejected()), this, SLOT(close())); /* initialize key share list */ ui->keyShareList->setHeaderText(tr("Contacts:")); @@ -99,8 +99,3 @@ void ShareKey::shareKey() close(); } - -void ShareKey::cancel() -{ - close(); -} diff --git a/retroshare-gui/src/gui/channels/ShareKey.h b/retroshare-gui/src/gui/channels/ShareKey.h index 3c91b0532..71ee3af6c 100644 --- a/retroshare-gui/src/gui/channels/ShareKey.h +++ b/retroshare-gui/src/gui/channels/ShareKey.h @@ -24,7 +24,6 @@ protected: private slots: void shareKey(); - void cancel(); private: std::string mGrpId; diff --git a/retroshare-gui/src/gui/channels/ShareKey.ui b/retroshare-gui/src/gui/channels/ShareKey.ui index dc1e6862a..306347100 100644 --- a/retroshare-gui/src/gui/channels/ShareKey.ui +++ b/retroshare-gui/src/gui/channels/ShareKey.ui @@ -125,29 +125,9 @@ 0 - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Share - - - - - - - Cancel + + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok diff --git a/retroshare-gui/src/gui/chat/CreateLobbyDialog.cpp b/retroshare-gui/src/gui/chat/CreateLobbyDialog.cpp index ddab0a384..6a842f538 100644 --- a/retroshare-gui/src/gui/chat/CreateLobbyDialog.cpp +++ b/retroshare-gui/src/gui/chat/CreateLobbyDialog.cpp @@ -22,6 +22,7 @@ #include "CreateLobbyDialog.h" #include +#include #include #include @@ -48,8 +49,8 @@ CreateLobbyDialog::CreateLobbyDialog(const std::list& peer_list, in #endif ui->nickName_LE->setText(QString::fromUtf8(default_nick.c_str())) ; - connect( ui->shareButton, SIGNAL( clicked ( bool ) ), this, SLOT( createLobby( ) ) ); - connect( ui->cancelButton, SIGNAL( clicked ( bool ) ), this, SLOT( cancel( ) ) ); + connect( ui->buttonBox, SIGNAL(accepted()), this, SLOT(createLobby())); + connect( ui->buttonBox, SIGNAL(rejected()), this, SLOT(close())); connect( ui->lobbyName_LE, SIGNAL( textChanged ( QString ) ), this, SLOT( checkTextFields( ) ) ); connect( ui->lobbyTopic_LE, SIGNAL( textChanged ( QString ) ), this, SLOT( checkTextFields( ) ) ); connect( ui->nickName_LE, SIGNAL( textChanged ( QString ) ), this, SLOT( checkTextFields( ) ) ); @@ -89,9 +90,9 @@ void CreateLobbyDialog::changeEvent(QEvent *e) void CreateLobbyDialog::checkTextFields() { if(ui->lobbyName_LE->text() == "" || ui->nickName_LE->text() == "") - ui->shareButton->setEnabled(false) ; + ui->buttonBox->button(QDialogButtonBox::Ok)->setEnabled(false) ; else - ui->shareButton->setEnabled(true) ; + ui->buttonBox->button(QDialogButtonBox::Ok)->setEnabled(true) ; } void CreateLobbyDialog::createLobby() @@ -128,8 +129,3 @@ void CreateLobbyDialog::createLobby() close(); } - -void CreateLobbyDialog::cancel() -{ - close(); -} diff --git a/retroshare-gui/src/gui/chat/CreateLobbyDialog.h b/retroshare-gui/src/gui/chat/CreateLobbyDialog.h index 6bf600c1b..67f145445 100644 --- a/retroshare-gui/src/gui/chat/CreateLobbyDialog.h +++ b/retroshare-gui/src/gui/chat/CreateLobbyDialog.h @@ -24,7 +24,6 @@ private: private slots: void createLobby(); void checkTextFields(); - void cancel(); }; #endif // CREATELOBBYDIALOG_H diff --git a/retroshare-gui/src/gui/chat/CreateLobbyDialog.ui b/retroshare-gui/src/gui/chat/CreateLobbyDialog.ui index f98b28275..849761245 100644 --- a/retroshare-gui/src/gui/chat/CreateLobbyDialog.ui +++ b/retroshare-gui/src/gui/chat/CreateLobbyDialog.ui @@ -239,29 +239,9 @@ 0 - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Create - - - - - - - Cancel + + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok diff --git a/retroshare-gui/src/gui/connect/ConfCertDialog.cpp b/retroshare-gui/src/gui/connect/ConfCertDialog.cpp index 7dcca654b..8758c2003 100644 --- a/retroshare-gui/src/gui/connect/ConfCertDialog.cpp +++ b/retroshare-gui/src/gui/connect/ConfCertDialog.cpp @@ -73,8 +73,8 @@ ConfCertDialog::ConfCertDialog(const std::string& id, QWidget *parent, Qt::WFlag setAttribute(Qt::WA_DeleteOnClose, true); - connect(ui.applyButton, SIGNAL(clicked()), this, SLOT(applyDialog())); - connect(ui.cancelButton, SIGNAL(clicked()), this, SLOT(close())); + connect(ui.buttonBox, SIGNAL(accepted()), this, SLOT(applyDialog())); + connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(close())); connect(ui.make_friend_button, SIGNAL(clicked()), this, SLOT(makeFriend())); connect(ui.denyFriendButton, SIGNAL(clicked()), this, SLOT(denyFriend())); connect(ui.signKeyButton, SIGNAL(clicked()), this, SLOT(signGPGKey())); diff --git a/retroshare-gui/src/gui/connect/ConfCertDialog.ui b/retroshare-gui/src/gui/connect/ConfCertDialog.ui index f61997536..808fb3b96 100644 --- a/retroshare-gui/src/gui/connect/ConfCertDialog.ui +++ b/retroshare-gui/src/gui/connect/ConfCertDialog.ui @@ -49,38 +49,9 @@ - - - Qt::Horizontal - - - - 311 - 20 - - - - - - - - Apply and Close - - - OK - - - false - - - true - - - - - - - Cancel + + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok @@ -775,18 +746,18 @@ p, li { white-space: pre-wrap; } - - AvatarWidget - QLabel -
gui/common/AvatarWidget.h
- 1 -
HeaderFrame QFrame
gui/common/HeaderFrame.h
1
+ + AvatarWidget + QLabel +
gui/common/AvatarWidget.h
+ 1 +
LinkTextBrowser QTextBrowser diff --git a/retroshare-gui/src/gui/forums/CreateForum.cpp b/retroshare-gui/src/gui/forums/CreateForum.cpp index d7c15b64a..91c0ed4bc 100644 --- a/retroshare-gui/src/gui/forums/CreateForum.cpp +++ b/retroshare-gui/src/gui/forums/CreateForum.cpp @@ -41,8 +41,8 @@ CreateForum::CreateForum(QWidget *parent) ui.headerFrame->setHeaderText(tr("New Forum")); // connect up the buttons. - connect( ui.cancelButton, SIGNAL( clicked ( bool ) ), this, SLOT( cancelForum( ) ) ); - connect( ui.createButton, SIGNAL( clicked ( bool ) ), this, SLOT( createForum( ) ) ); + connect( ui.buttonBox, SIGNAL(accepted()), this, SLOT(createForum())); + connect( ui.buttonBox, SIGNAL(rejected()), this, SLOT(close())); connect( ui.pubKeyShare_cb, SIGNAL( clicked() ), this, SLOT( setShareList( ) )); if (!ui.pubKeyShare_cb->isChecked()) { @@ -129,8 +129,3 @@ void CreateForum::setShareList() this->resize(this->size().width() - ui.contactsdockWidget->size().width(), this->size().height()); } } - -void CreateForum::cancelForum() -{ - close(); -} diff --git a/retroshare-gui/src/gui/forums/CreateForum.h b/retroshare-gui/src/gui/forums/CreateForum.h index 3c8a7a8d3..6dcea6715 100644 --- a/retroshare-gui/src/gui/forums/CreateForum.h +++ b/retroshare-gui/src/gui/forums/CreateForum.h @@ -37,7 +37,6 @@ public: private slots: /* actions to take.... */ void createForum(); - void cancelForum(); // set private forum key share list void setShareList(); diff --git a/retroshare-gui/src/gui/forums/CreateForum.ui b/retroshare-gui/src/gui/forums/CreateForum.ui index a4b84b0ca..edc23fa0d 100644 --- a/retroshare-gui/src/gui/forums/CreateForum.ui +++ b/retroshare-gui/src/gui/forums/CreateForum.ui @@ -280,35 +280,9 @@ - - - Qt::Horizontal - - - - 238 - 20 - - - - - - - - Cancel - - - - - - - Create - - - false - - - false + + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok diff --git a/retroshare-gui/src/gui/forums/EditForumDetails.cpp b/retroshare-gui/src/gui/forums/EditForumDetails.cpp index 87221b6f0..3bc45f5a9 100644 --- a/retroshare-gui/src/gui/forums/EditForumDetails.cpp +++ b/retroshare-gui/src/gui/forums/EditForumDetails.cpp @@ -37,7 +37,8 @@ EditForumDetails::EditForumDetails(std::string forumId, QWidget *parent, Qt::WFl /* Invoke Qt Designer generated QObject setup routine */ ui.setupUi(this); - connect(ui.applyButton, SIGNAL(clicked()), this, SLOT(applyDialog())); + connect(ui.buttonBox, SIGNAL(accepted()), this, SLOT(applyDialog())); + connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(close())); loadForum(); } diff --git a/retroshare-gui/src/gui/forums/EditForumDetails.ui b/retroshare-gui/src/gui/forums/EditForumDetails.ui index e5cdb8992..e7a1f0c79 100644 --- a/retroshare-gui/src/gui/forums/EditForumDetails.ui +++ b/retroshare-gui/src/gui/forums/EditForumDetails.ui @@ -21,35 +21,9 @@ - - - Qt::Horizontal - - - - 311 - 20 - - - - - - - - Cancel - - - - - - - OK - - - false - - - true + + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok @@ -109,22 +83,5 @@ - - - cancelButton - clicked() - EditForumDetails - close() - - - 307 - 333 - - - 217 - 177 - - - - + diff --git a/retroshare-gui/src/gui/forums/ForumDetails.cpp b/retroshare-gui/src/gui/forums/ForumDetails.cpp index 9c6bc7f70..d45734a19 100644 --- a/retroshare-gui/src/gui/forums/ForumDetails.cpp +++ b/retroshare-gui/src/gui/forums/ForumDetails.cpp @@ -43,11 +43,8 @@ ForumDetails::ForumDetails(QWidget *parent, Qt::WFlags flags) /* Invoke Qt Designer generated QObject setup routine */ ui.setupUi(this); - connect(ui.applyButton, SIGNAL(clicked()), this, SLOT(applyDialog())); - connect(ui.cancelButton, SIGNAL(clicked()), this, SLOT(closeinfodlg())); + connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(close())); - ui.applyButton->setToolTip(tr("Apply and Close")); - ui.nameline ->setReadOnly(true); ui.popline ->setReadOnly(true); ui.postline ->setReadOnly(true); @@ -77,11 +74,6 @@ void ForumDetails::closeEvent (QCloseEvent * event) QWidget::closeEvent(event); } -void ForumDetails::closeinfodlg() -{ - close(); -} - void ForumDetails::showDetails(std::string mCurrForumId) { fId = mCurrForumId; @@ -129,14 +121,3 @@ void ForumDetails::loadDialog() ui.radioButton_anonymous->setChecked(true); } } - -void ForumDetails::applyDialog() -{ - - /* reload now */ - loadDialog(); - - /* close the Dialog after the Changes applied */ - closeinfodlg(); - -} diff --git a/retroshare-gui/src/gui/forums/ForumDetails.h b/retroshare-gui/src/gui/forums/ForumDetails.h index 26d294d8f..22f30b6e7 100644 --- a/retroshare-gui/src/gui/forums/ForumDetails.h +++ b/retroshare-gui/src/gui/forums/ForumDetails.h @@ -48,13 +48,7 @@ public slots: protected: void closeEvent (QCloseEvent * event); -private slots: - - void closeinfodlg(); - void applyDialog(); - private: - void loadDialog(); std::string fId; diff --git a/retroshare-gui/src/gui/forums/ForumDetails.ui b/retroshare-gui/src/gui/forums/ForumDetails.ui index ea44bf970..295f16028 100644 --- a/retroshare-gui/src/gui/forums/ForumDetails.ui +++ b/retroshare-gui/src/gui/forums/ForumDetails.ui @@ -158,35 +158,9 @@ - - - Qt::Horizontal - - - - 311 - 20 - - - - - - - - Cancel - - - - - - - OK - - - false - - - true + + + QDialogButtonBox::Close diff --git a/retroshare-gui/src/gui/forumsv2/CreateForumV2.cpp b/retroshare-gui/src/gui/forumsv2/CreateForumV2.cpp index 104dfbf7a..5b83e52f0 100644 --- a/retroshare-gui/src/gui/forumsv2/CreateForumV2.cpp +++ b/retroshare-gui/src/gui/forumsv2/CreateForumV2.cpp @@ -48,8 +48,8 @@ CreateForumV2::CreateForumV2(QWidget *parent) mForumQueue = new TokenQueue(rsForumsV2, this); // connect up the buttons. - connect( ui.cancelButton, SIGNAL( clicked ( bool ) ), this, SLOT( cancelForum( ) ) ); - connect( ui.createButton, SIGNAL( clicked ( bool ) ), this, SLOT( createForum( ) ) ); + connect( ui.buttonBox, SIGNAL(accepted()), this, SLOT(createForum())); + connect( ui.buttonBox, SIGNAL(rejected()), this, SLOT(close())); connect( ui.pubKeyShare_cb, SIGNAL( clicked() ), this, SLOT( setShareList( ) )); if (!ui.pubKeyShare_cb->isChecked()) { @@ -172,14 +172,6 @@ void CreateForumV2::setShareList() } } -void CreateForumV2::cancelForum() -{ - close(); -} - - - - void CreateForumV2::loadNewForumId(const uint32_t &token) { std::cerr << "CreateForumV2::loadNewForumId()"; diff --git a/retroshare-gui/src/gui/forumsv2/CreateForumV2.h b/retroshare-gui/src/gui/forumsv2/CreateForumV2.h index 0aa72e26e..fd4387b13 100644 --- a/retroshare-gui/src/gui/forumsv2/CreateForumV2.h +++ b/retroshare-gui/src/gui/forumsv2/CreateForumV2.h @@ -42,7 +42,6 @@ virtual void loadRequest(const TokenQueue *queue, const TokenRequest &req); private slots: /* actions to take.... */ void createForum(); - void cancelForum(); // set private forum key share list void setShareList(); diff --git a/retroshare-gui/src/gui/forumsv2/CreateForumV2.ui b/retroshare-gui/src/gui/forumsv2/CreateForumV2.ui index a361d29c7..adfbf45d1 100644 --- a/retroshare-gui/src/gui/forumsv2/CreateForumV2.ui +++ b/retroshare-gui/src/gui/forumsv2/CreateForumV2.ui @@ -271,33 +271,10 @@
- - - - Qt::Horizontal - - - - 238 - 20 - - - - - - - Cancel - - - - - - - Create - - - true + + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok diff --git a/retroshare-gui/src/gui/forumsv2/EditForumV2Details.cpp b/retroshare-gui/src/gui/forumsv2/EditForumV2Details.cpp index 5d7d9c690..60a8ddbda 100644 --- a/retroshare-gui/src/gui/forumsv2/EditForumV2Details.cpp +++ b/retroshare-gui/src/gui/forumsv2/EditForumV2Details.cpp @@ -37,7 +37,8 @@ EditForumV2Details::EditForumV2Details(std::string forumId, QWidget *parent, Qt: /* Invoke Qt Designer generated QObject setup routine */ ui.setupUi(this); - connect(ui.applyButton, SIGNAL(clicked()), this, SLOT(applyDialog())); + connect(ui.buttonBox, SIGNAL(accepted()), this, SLOT(applyDialog())); + connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(close())); loadForum(); } diff --git a/retroshare-gui/src/gui/forumsv2/EditForumV2Details.ui b/retroshare-gui/src/gui/forumsv2/EditForumV2Details.ui index b32810506..bd1136f50 100644 --- a/retroshare-gui/src/gui/forumsv2/EditForumV2Details.ui +++ b/retroshare-gui/src/gui/forumsv2/EditForumV2Details.ui @@ -21,35 +21,9 @@ - - - Qt::Horizontal - - - - 311 - 20 - - - - - - - - Cancel - - - - - - - OK - - - false - - - true + + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok @@ -109,22 +83,5 @@ - - - cancelButton - clicked() - EditForumDetails - close() - - - 307 - 333 - - - 217 - 177 - - - - + diff --git a/retroshare-gui/src/gui/forumsv2/ForumV2Details.cpp b/retroshare-gui/src/gui/forumsv2/ForumV2Details.cpp index 0f3d0f4dc..70414deb8 100644 --- a/retroshare-gui/src/gui/forumsv2/ForumV2Details.cpp +++ b/retroshare-gui/src/gui/forumsv2/ForumV2Details.cpp @@ -43,11 +43,8 @@ ForumV2Details::ForumV2Details(QWidget *parent, Qt::WFlags flags) /* Invoke Qt Designer generated QObject setup routine */ ui.setupUi(this); - connect(ui.applyButton, SIGNAL(clicked()), this, SLOT(applyDialog())); - connect(ui.cancelButton, SIGNAL(clicked()), this, SLOT(closeinfodlg())); + connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(close())); - ui.applyButton->setToolTip(tr("Apply and Close")); - ui.nameline ->setReadOnly(true); ui.popline ->setReadOnly(true); ui.postline ->setReadOnly(true); @@ -77,11 +74,6 @@ void ForumV2Details::closeEvent (QCloseEvent * event) QWidget::closeEvent(event); } -void ForumV2Details::closeinfodlg() -{ - close(); -} - void ForumV2Details::showDetails(std::string mCurrForumId) { fId = mCurrForumId; @@ -133,14 +125,3 @@ void ForumV2Details::loadDialog() #endif } - -void ForumV2Details::applyDialog() -{ - - /* reload now */ - loadDialog(); - - /* close the Dialog after the Changes applied */ - closeinfodlg(); - -} diff --git a/retroshare-gui/src/gui/forumsv2/ForumV2Details.h b/retroshare-gui/src/gui/forumsv2/ForumV2Details.h index 3489fb344..765564c1f 100644 --- a/retroshare-gui/src/gui/forumsv2/ForumV2Details.h +++ b/retroshare-gui/src/gui/forumsv2/ForumV2Details.h @@ -48,13 +48,7 @@ public slots: protected: void closeEvent (QCloseEvent * event); -private slots: - - void closeinfodlg(); - void applyDialog(); - private: - void loadDialog(); std::string fId; diff --git a/retroshare-gui/src/gui/forumsv2/ForumV2Details.ui b/retroshare-gui/src/gui/forumsv2/ForumV2Details.ui index c9e05074b..68129fe45 100644 --- a/retroshare-gui/src/gui/forumsv2/ForumV2Details.ui +++ b/retroshare-gui/src/gui/forumsv2/ForumV2Details.ui @@ -158,35 +158,9 @@ - - - Qt::Horizontal - - - - 311 - 20 - - - - - - - - Cancel - - - - - - - OK - - - false - - - true + + + QDialogButtonBox::Close diff --git a/retroshare-gui/src/gui/im_history/ImHistoryBrowser.ui b/retroshare-gui/src/gui/im_history/ImHistoryBrowser.ui index f3bb2e3e9..fa7675808 100644 --- a/retroshare-gui/src/gui/im_history/ImHistoryBrowser.ui +++ b/retroshare-gui/src/gui/im_history/ImHistoryBrowser.ui @@ -152,27 +152,8 @@ 6 - - - - Qt::Horizontal - - - - 404 - 20 - - - - - - - 0 - 0 - - QDialogButtonBox::Close @@ -198,17 +179,17 @@ - - LineEditClear - QLineEdit -
gui/common/LineEditClear.h
-
HeaderFrame QFrame
gui/common/HeaderFrame.h
1
+ + LineEditClear + QLineEdit +
gui/common/LineEditClear.h
+
diff --git a/retroshare-gui/src/gui/profile/StatusMessage.cpp b/retroshare-gui/src/gui/profile/StatusMessage.cpp index 9ba1bf23c..3b06c21db 100644 --- a/retroshare-gui/src/gui/profile/StatusMessage.cpp +++ b/retroshare-gui/src/gui/profile/StatusMessage.cpp @@ -39,8 +39,8 @@ StatusMessage::StatusMessage(QWidget *parent, Qt::WFlags flags) /* Invoke Qt Designer generated QObject setup routine */ ui.setupUi(this); - connect(ui.cancelButton, SIGNAL(clicked()), this, SLOT(close())); - connect(ui.okButton, SIGNAL(clicked()), this, SLOT(save())); + connect(ui.buttonBox, SIGNAL(accepted()), this, SLOT(save())); + connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(close())); load(); diff --git a/retroshare-gui/src/gui/profile/StatusMessage.ui b/retroshare-gui/src/gui/profile/StatusMessage.ui index 7c8afd02c..c511053fc 100644 --- a/retroshare-gui/src/gui/profile/StatusMessage.ui +++ b/retroshare-gui/src/gui/profile/StatusMessage.ui @@ -152,33 +152,17 @@ border: 1px solid #CCCCCC;} QFrame::Raised - + 220 180 - 75 + 156 23 - - OK - - - true - - - - - - 300 - 180 - 75 - 23 - - - - Cancel + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok @@ -190,13 +174,6 @@ border: 1px solid #CCCCCC;} - - - - - - - diff --git a/retroshare-gui/src/gui/settings/rsettingswin.cpp b/retroshare-gui/src/gui/settings/rsettingswin.cpp index 46f8443b8..7cc7a5897 100644 --- a/retroshare-gui/src/gui/settings/rsettingswin.cpp +++ b/retroshare-gui/src/gui/settings/rsettingswin.cpp @@ -58,7 +58,8 @@ RSettingsWin::RSettingsWin(QWidget * parent, Qt::WFlags flags) initStackedWidget(); connect(listWidget, SIGNAL(currentRowChanged(int)), this, SLOT(setNewPage(int))); - connect(applyButton, SIGNAL(clicked( bool )), this, SLOT( saveChanges()) ); + connect(buttonBox, SIGNAL(accepted()), this, SLOT(saveChanges())); + connect(buttonBox, SIGNAL(rejected()), this, SLOT(close())); connect(this, SIGNAL(finished(int)), this, SLOT(dialogFinished(int))); } diff --git a/retroshare-gui/src/gui/settings/settings.ui b/retroshare-gui/src/gui/settings/settings.ui index 1e5569fed..d9332d216 100755 --- a/retroshare-gui/src/gui/settings/settings.ui +++ b/retroshare-gui/src/gui/settings/settings.ui @@ -157,44 +157,9 @@ 0 - - - Qt::Horizontal - - - - 312 - 31 - - - - - - - - - 0 - 22 - - - - Cancel - - - - - - - - 0 - 22 - - - - OK - - - true + + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok @@ -205,38 +170,5 @@ - - - applyButton - clicked() - Settings - accept() - - - 278 - 253 - - - 96 - 254 - - - - - canceButton - clicked() - Settings - reject() - - - 369 - 253 - - - 179 - 282 - - - - +