From 9b5ee85fd0cb609fa022e8c6858e56ebc53cf7f7 Mon Sep 17 00:00:00 2001 From: thunder2 Date: Tue, 6 Nov 2012 23:26:47 +0000 Subject: [PATCH] Removed context help button from the dialogs (currently not used) and added minimize/maximize buttons to the "floating" dialogs. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5786 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- retroshare-gui/src/gui/ChannelFeed.cpp | 10 ++-- retroshare-gui/src/gui/ForumsDialog.cpp | 8 ++- .../src/gui/FriendRecommendDialog.cpp | 8 +-- .../src/gui/FriendRecommendDialog.h | 4 +- retroshare-gui/src/gui/FriendsDialog.cpp | 28 --------- retroshare-gui/src/gui/FriendsDialog.h | 2 - retroshare-gui/src/gui/FriendsDialog.ui | 57 +++---------------- retroshare-gui/src/gui/GenCertDialog.cpp | 4 +- retroshare-gui/src/gui/GenCertDialog.h | 2 +- retroshare-gui/src/gui/ShareManager.cpp | 6 +- retroshare-gui/src/gui/ShareManager.h | 2 +- retroshare-gui/src/gui/StartDialog.cpp | 2 +- .../src/gui/channels/ChannelDetails.cpp | 4 +- .../src/gui/channels/ChannelDetails.h | 3 +- .../src/gui/channels/CreateChannel.cpp | 6 +- .../src/gui/channels/CreateChannel.h | 2 +- .../src/gui/channels/CreateChannelMsg.cpp | 2 +- .../src/gui/channels/EditChanDetails.cpp | 4 +- .../src/gui/channels/EditChanDetails.h | 3 +- retroshare-gui/src/gui/channels/ShareKey.cpp | 4 +- retroshare-gui/src/gui/channels/ShareKey.h | 2 +- .../src/gui/chat/CreateLobbyDialog.cpp | 4 +- .../src/gui/chat/CreateLobbyDialog.h | 2 +- retroshare-gui/src/gui/forums/CreateForum.cpp | 6 +- retroshare-gui/src/gui/forums/CreateForum.h | 2 +- .../src/gui/forums/CreateForumMsg.cpp | 2 +- .../src/gui/forums/EditForumDetails.cpp | 4 +- .../src/gui/forums/EditForumDetails.h | 2 +- .../src/gui/forums/ForumDetails.cpp | 4 +- retroshare-gui/src/gui/forums/ForumDetails.h | 3 +- retroshare-gui/src/gui/groups/CreateGroup.cpp | 4 +- retroshare-gui/src/gui/groups/CreateGroup.h | 2 +- .../src/gui/im_history/ImHistoryBrowser.cpp | 4 +- .../src/gui/im_history/ImHistoryBrowser.h | 2 +- .../src/gui/profile/ProfileManager.cpp | 4 +- .../src/gui/profile/ProfileManager.h | 3 +- .../src/gui/profile/StatusMessage.cpp | 34 ++--------- .../src/gui/profile/StatusMessage.h | 8 +-- .../src/gui/settings/rsettingswin.cpp | 5 +- .../src/gui/settings/rsettingswin.h | 2 +- retroshare-gui/src/gui/style/StyleDialog.cpp | 12 +--- retroshare-gui/src/gui/style/StyleDialog.h | 3 +- 42 files changed, 86 insertions(+), 189 deletions(-) diff --git a/retroshare-gui/src/gui/ChannelFeed.cpp b/retroshare-gui/src/gui/ChannelFeed.cpp index 5c2788c80..a07498b3b 100644 --- a/retroshare-gui/src/gui/ChannelFeed.cpp +++ b/retroshare-gui/src/gui/ChannelFeed.cpp @@ -223,8 +223,10 @@ void ChannelFeed::channelListCustomPopupMenu( QPoint /*point*/ ) void ChannelFeed::createChannel() { - CreateChannel cf (this); - cf.exec(); + CreateChannel *cf = new CreateChannel(); + cf->show(); + + /* window will destroy itself! */ } /*************************************************************************************/ @@ -246,13 +248,13 @@ void ChannelFeed::openChat(std::string /*peerId*/) void ChannelFeed::editChannelDetail(){ - EditChanDetails editUi(this, 0, mChannelId); + EditChanDetails editUi(this, mChannelId); editUi.exec(); } void ChannelFeed::shareKey() { - ShareKey shareUi(this, 0, mChannelId, CHANNEL_KEY_SHARE); + ShareKey shareUi(this, mChannelId, CHANNEL_KEY_SHARE); shareUi.exec(); } diff --git a/retroshare-gui/src/gui/ForumsDialog.cpp b/retroshare-gui/src/gui/ForumsDialog.cpp index dbbfa4fb8..da87d7117 100644 --- a/retroshare-gui/src/gui/ForumsDialog.cpp +++ b/retroshare-gui/src/gui/ForumsDialog.cpp @@ -1435,8 +1435,10 @@ void ForumsDialog::copyMessageLink() void ForumsDialog::newforum() { - CreateForum cf (this); - cf.exec (); + CreateForum *cf = new CreateForum(); + cf->show(); + + /* window will destroy itself! */ } void ForumsDialog::createmessage() @@ -1598,7 +1600,7 @@ void ForumsDialog::filterItems(const QString& text) void ForumsDialog::shareKey() { - ShareKey shareUi(this, 0, mCurrForumId, FORUM_KEY_SHARE); + ShareKey shareUi(this, mCurrForumId, FORUM_KEY_SHARE); shareUi.exec(); } diff --git a/retroshare-gui/src/gui/FriendRecommendDialog.cpp b/retroshare-gui/src/gui/FriendRecommendDialog.cpp index c3ea71a90..735fd4982 100644 --- a/retroshare-gui/src/gui/FriendRecommendDialog.cpp +++ b/retroshare-gui/src/gui/FriendRecommendDialog.cpp @@ -26,14 +26,14 @@ #include "msgs/MessageComposer.h" #include "settings/rsharesettings.h" -void FriendRecommendDialog::showYourself(QWidget *parent) +void FriendRecommendDialog::showYourself() { - FriendRecommendDialog *dlg = new FriendRecommendDialog(parent); + FriendRecommendDialog *dlg = new FriendRecommendDialog(); dlg->show(); } -FriendRecommendDialog::FriendRecommendDialog(QWidget *parent) : - QDialog(parent), +FriendRecommendDialog::FriendRecommendDialog() : + QDialog(NULL, Qt::WindowSystemMenuHint | Qt::WindowTitleHint | Qt::WindowMinMaxButtonsHint | Qt::WindowCloseButtonHint), ui(new Ui::FriendRecommendDialog) { ui->setupUi(this); diff --git a/retroshare-gui/src/gui/FriendRecommendDialog.h b/retroshare-gui/src/gui/FriendRecommendDialog.h index 37061535f..511e49753 100644 --- a/retroshare-gui/src/gui/FriendRecommendDialog.h +++ b/retroshare-gui/src/gui/FriendRecommendDialog.h @@ -35,13 +35,13 @@ class FriendRecommendDialog : public QDialog public: ~FriendRecommendDialog(); - static void showYourself(QWidget *parent = 0); + static void showYourself(); private slots: void sendMsg(); private: - FriendRecommendDialog(QWidget *parent = 0); + FriendRecommendDialog(); Ui::FriendRecommendDialog *ui; }; diff --git a/retroshare-gui/src/gui/FriendsDialog.cpp b/retroshare-gui/src/gui/FriendsDialog.cpp index 9558841f7..b4a83f251 100644 --- a/retroshare-gui/src/gui/FriendsDialog.cpp +++ b/retroshare-gui/src/gui/FriendsDialog.cpp @@ -34,14 +34,10 @@ #include "retroshare/rspeers.h" #include -#ifndef RS_RELEASE_VERSION -#include "channels/CreateChannel.h" -#endif #include "common/Emoticons.h" #include "common/PeerDefs.h" #include "chat/ChatUserNotify.h" #include "connect/ConnectFriendWizard.h" -#include "forums/CreateForum.h" #include "groups/CreateGroup.h" #include "im_history/ImHistoryBrowser.h" #include "MainWindow.h" @@ -174,10 +170,6 @@ FriendsDialog::FriendsDialog(QWidget *parent) menu->addAction(ui.actionFriendRecommendations); menu->addSeparator(); - menu->addAction(ui.actionCreate_New_Forum); -#ifndef RS_RELEASE_VERSION - menu->addAction(ui.actionCreate_New_Channel); -#endif menu->addAction(ui.actionSet_your_Avatar); menu->addAction(ui.actionSet_your_Personal_Message); @@ -753,26 +745,6 @@ void FriendsDialog::getAvatar() } } -void FriendsDialog::on_actionCreate_New_Forum_activated() -{ - MainWindow::activatePage (MainWindow::Forums); - - CreateForum cf (this); - cf.exec(); - -} - -void FriendsDialog::on_actionCreate_New_Channel_activated() -{ -#ifndef RS_RELEASE_VERSION - MainWindow::activatePage (MainWindow::Channels); - - CreateChannel cf (this); - cf.exec(); -#endif -} - - /** Loads own personal status */ void FriendsDialog::loadmypersonalstatus() { diff --git a/retroshare-gui/src/gui/FriendsDialog.h b/retroshare-gui/src/gui/FriendsDialog.h index 76f75ede4..4a313f445 100644 --- a/retroshare-gui/src/gui/FriendsDialog.h +++ b/retroshare-gui/src/gui/FriendsDialog.h @@ -101,8 +101,6 @@ private slots: void getAvatar(); void on_actionAdd_Group_activated(); - void on_actionCreate_New_Forum_activated(); - void on_actionCreate_New_Channel_activated(); void loadmypersonalstatus(); diff --git a/retroshare-gui/src/gui/FriendsDialog.ui b/retroshare-gui/src/gui/FriendsDialog.ui index c79506aa3..f4c471d97 100644 --- a/retroshare-gui/src/gui/FriendsDialog.ui +++ b/retroshare-gui/src/gui/FriendsDialog.ui @@ -744,45 +744,6 @@ Add Friend - - - - :/images/contact_new.png:/images/contact_new.png - - - Create new Profile - - - - - - :/images/new_forum16.png:/images/new_forum16.png - - - Create new Forum - - - Create new Forum - - - F - - - - - - :/images/add_channel24.png:/images/add_channel24.png - - - Create new Channel - - - Create new Channel - - - C - - @@ -881,16 +842,21 @@ - AvatarWidget - QLabel -
gui/common/AvatarWidget.h
- 1 + LineEditClear + QLineEdit +
gui/common/LineEditClear.h
LinkTextBrowser QTextBrowser
gui/common/LinkTextBrowser.h
+ + AvatarWidget + QLabel +
gui/common/AvatarWidget.h
+ 1 +
FriendList QWidget @@ -909,11 +875,6 @@
gui/chat/ChatTabWidget.h
1
- - LineEditClear - QLineEdit -
gui/common/LineEditClear.h
-
diff --git a/retroshare-gui/src/gui/GenCertDialog.cpp b/retroshare-gui/src/gui/GenCertDialog.cpp index 3cdfc7318..f38a89136 100644 --- a/retroshare-gui/src/gui/GenCertDialog.cpp +++ b/retroshare-gui/src/gui/GenCertDialog.cpp @@ -33,8 +33,8 @@ #define DATETIME_FMT "MMM dd hh:mm:ss" /** Default constructor */ -GenCertDialog::GenCertDialog(bool onlyGenerateIdentity, QWidget *parent, Qt::WFlags flags) - : QDialog(parent, flags), mOnlyGenerateIdentity(onlyGenerateIdentity) +GenCertDialog::GenCertDialog(bool onlyGenerateIdentity, QWidget *parent) + : QDialog(parent, Qt::WindowSystemMenuHint | Qt::WindowTitleHint | Qt::WindowCloseButtonHint), mOnlyGenerateIdentity(onlyGenerateIdentity) { /* Invoke Qt Designer generated QObject setup routine */ ui.setupUi(this); diff --git a/retroshare-gui/src/gui/GenCertDialog.h b/retroshare-gui/src/gui/GenCertDialog.h index 38c53fe3a..0cb3e2194 100644 --- a/retroshare-gui/src/gui/GenCertDialog.h +++ b/retroshare-gui/src/gui/GenCertDialog.h @@ -30,7 +30,7 @@ class GenCertDialog : public QDialog public: /** Default constructor */ - GenCertDialog(bool onlyGenerateIdentity, QWidget *parent = 0, Qt::WFlags flags = 0); + GenCertDialog(bool onlyGenerateIdentity, QWidget *parent = 0); private slots: void genPerson(); diff --git a/retroshare-gui/src/gui/ShareManager.cpp b/retroshare-gui/src/gui/ShareManager.cpp index 6f61dfabf..ee62e0f85 100644 --- a/retroshare-gui/src/gui/ShareManager.cpp +++ b/retroshare-gui/src/gui/ShareManager.cpp @@ -45,8 +45,8 @@ ShareManager *ShareManager::_instance = NULL ; /** Default constructor */ -ShareManager::ShareManager(QWidget *parent, Qt::WFlags flags) - : QDialog(parent, flags) +ShareManager::ShareManager() + : QDialog(NULL, Qt::WindowSystemMenuHint | Qt::WindowTitleHint | Qt::WindowMinMaxButtonsHint | Qt::WindowCloseButtonHint) { /* Invoke Qt Designer generated QObject setup routine */ ui.setupUi(this); @@ -208,7 +208,7 @@ void ShareManager::load() void ShareManager::showYourself() { if(_instance == NULL) - _instance = new ShareManager(NULL,0) ; + _instance = new ShareManager() ; _instance->show() ; _instance->activateWindow(); diff --git a/retroshare-gui/src/gui/ShareManager.h b/retroshare-gui/src/gui/ShareManager.h index 885962b2f..4af7b1edb 100644 --- a/retroshare-gui/src/gui/ShareManager.h +++ b/retroshare-gui/src/gui/ShareManager.h @@ -38,7 +38,7 @@ public: private: /** Default constructor */ - ShareManager( QWidget *parent = 0, Qt::WFlags flags = 0); + ShareManager(); /** Default destructor */ ~ShareManager(); diff --git a/retroshare-gui/src/gui/StartDialog.cpp b/retroshare-gui/src/gui/StartDialog.cpp index 28243eeba..e6bf9af9a 100644 --- a/retroshare-gui/src/gui/StartDialog.cpp +++ b/retroshare-gui/src/gui/StartDialog.cpp @@ -30,7 +30,7 @@ /** Default constructor */ StartDialog::StartDialog(QWidget *parent) - : QDialog(parent, Qt::WindowSystemMenuHint | Qt::WindowTitleHint | Qt::WindowMinimizeButtonHint), reqNewCert(false) + : QDialog(parent, Qt::WindowSystemMenuHint | Qt::WindowTitleHint | Qt::WindowMinimizeButtonHint | Qt::WindowCloseButtonHint), reqNewCert(false) { /* Invoke Qt Designer generated QObject setup routine */ ui.setupUi(this); diff --git a/retroshare-gui/src/gui/channels/ChannelDetails.cpp b/retroshare-gui/src/gui/channels/ChannelDetails.cpp index 936bae091..ba884f5ff 100644 --- a/retroshare-gui/src/gui/channels/ChannelDetails.cpp +++ b/retroshare-gui/src/gui/channels/ChannelDetails.cpp @@ -37,8 +37,8 @@ #define DATETIME_FMT "MMM dd hh:mm:ss" /** Default constructor */ -ChannelDetails::ChannelDetails(QWidget *parent, Qt::WFlags flags) - : QDialog(parent, flags) +ChannelDetails::ChannelDetails(QWidget *parent) + : QDialog(parent, Qt::WindowSystemMenuHint | Qt::WindowTitleHint | Qt::WindowCloseButtonHint) { /* Invoke Qt Designer generated QObject setup routine */ ui.setupUi(this); diff --git a/retroshare-gui/src/gui/channels/ChannelDetails.h b/retroshare-gui/src/gui/channels/ChannelDetails.h index 03eda5b89..9cc4322ac 100644 --- a/retroshare-gui/src/gui/channels/ChannelDetails.h +++ b/retroshare-gui/src/gui/channels/ChannelDetails.h @@ -33,8 +33,7 @@ class ChannelDetails : public QDialog public: /** Default constructor */ - ChannelDetails(QWidget *parent = 0, Qt::WFlags flags = 0); - /** Default destructor */ + ChannelDetails(QWidget *parent = 0); void showDetails(std::string mChannelId); diff --git a/retroshare-gui/src/gui/channels/CreateChannel.cpp b/retroshare-gui/src/gui/channels/CreateChannel.cpp index f11925d53..2f69fe6ee 100644 --- a/retroshare-gui/src/gui/channels/CreateChannel.cpp +++ b/retroshare-gui/src/gui/channels/CreateChannel.cpp @@ -32,12 +32,14 @@ #include /** Constructor */ -CreateChannel::CreateChannel(QWidget *parent) -: QDialog(parent) +CreateChannel::CreateChannel() +: QDialog(NULL, Qt::WindowSystemMenuHint | Qt::WindowTitleHint | Qt::WindowMinMaxButtonsHint | Qt::WindowCloseButtonHint) { /* Invoke the Qt Designer generated object setup routine */ ui.setupUi(this); + setAttribute(Qt::WA_DeleteOnClose, true); + ui.headerFrame->setHeaderImage(QPixmap(":/images/add_channel64.png")); ui.headerFrame->setHeaderText(tr("New Channel")); diff --git a/retroshare-gui/src/gui/channels/CreateChannel.h b/retroshare-gui/src/gui/channels/CreateChannel.h index 895ce842d..f82e3536c 100644 --- a/retroshare-gui/src/gui/channels/CreateChannel.h +++ b/retroshare-gui/src/gui/channels/CreateChannel.h @@ -29,7 +29,7 @@ class CreateChannel : public QDialog Q_OBJECT public: - CreateChannel(QWidget *parent = 0); + CreateChannel(); void newChannel(); /* cleanup */ diff --git a/retroshare-gui/src/gui/channels/CreateChannelMsg.cpp b/retroshare-gui/src/gui/channels/CreateChannelMsg.cpp index fa1140394..1bf5e4cd2 100644 --- a/retroshare-gui/src/gui/channels/CreateChannelMsg.cpp +++ b/retroshare-gui/src/gui/channels/CreateChannelMsg.cpp @@ -39,7 +39,7 @@ /** Constructor */ CreateChannelMsg::CreateChannelMsg(std::string cId) -: QDialog (NULL), mChannelId(cId) ,mCheckAttachment(true), mAutoMediaThumbNail(false) +: QDialog (NULL, Qt::WindowSystemMenuHint | Qt::WindowTitleHint | Qt::WindowMinMaxButtonsHint | Qt::WindowCloseButtonHint), mChannelId(cId) ,mCheckAttachment(true), mAutoMediaThumbNail(false) { /* Invoke the Qt Designer generated object setup routine */ setupUi(this); diff --git a/retroshare-gui/src/gui/channels/EditChanDetails.cpp b/retroshare-gui/src/gui/channels/EditChanDetails.cpp index c7fc84dd1..f0cc39d78 100644 --- a/retroshare-gui/src/gui/channels/EditChanDetails.cpp +++ b/retroshare-gui/src/gui/channels/EditChanDetails.cpp @@ -34,8 +34,8 @@ /** Default constructor */ -EditChanDetails::EditChanDetails(QWidget *parent, Qt::WFlags flags, std::string cId) - : QDialog(parent, flags), mChannelId(cId) +EditChanDetails::EditChanDetails(QWidget *parent, std::string cId) + : QDialog(parent, Qt::WindowSystemMenuHint | Qt::WindowTitleHint | Qt::WindowCloseButtonHint), mChannelId(cId) { /* Invoke Qt Designer generated QObject setup routine */ ui.setupUi(this); diff --git a/retroshare-gui/src/gui/channels/EditChanDetails.h b/retroshare-gui/src/gui/channels/EditChanDetails.h index fc17cc06c..dc9cd0c4e 100644 --- a/retroshare-gui/src/gui/channels/EditChanDetails.h +++ b/retroshare-gui/src/gui/channels/EditChanDetails.h @@ -32,8 +32,7 @@ class EditChanDetails : public QDialog public: /** Default constructor */ - EditChanDetails(QWidget *parent = 0, Qt::WFlags flags = 0, std::string cId = ""); - /** Default destructor */ + EditChanDetails(QWidget *parent = 0, std::string cId = 0); signals: void configChanged(); diff --git a/retroshare-gui/src/gui/channels/ShareKey.cpp b/retroshare-gui/src/gui/channels/ShareKey.cpp index 75c36ed8f..6ff9d45fe 100644 --- a/retroshare-gui/src/gui/channels/ShareKey.cpp +++ b/retroshare-gui/src/gui/channels/ShareKey.cpp @@ -30,8 +30,8 @@ #include "gui/common/PeerDefs.h" -ShareKey::ShareKey(QWidget *parent, Qt::WFlags flags, std::string grpId, int grpType) : - QDialog(parent, flags), mGrpId(grpId), mGrpType(grpType) +ShareKey::ShareKey(QWidget *parent, std::string grpId, int grpType) : + QDialog(parent, Qt::WindowSystemMenuHint | Qt::WindowTitleHint | Qt::WindowCloseButtonHint), mGrpId(grpId), mGrpType(grpType) { ui = new Ui::ShareKey(); ui->setupUi(this); diff --git a/retroshare-gui/src/gui/channels/ShareKey.h b/retroshare-gui/src/gui/channels/ShareKey.h index 71ee3af6c..d4570484e 100644 --- a/retroshare-gui/src/gui/channels/ShareKey.h +++ b/retroshare-gui/src/gui/channels/ShareKey.h @@ -16,7 +16,7 @@ public: /* *@param chanId The channel id to send request for */ - ShareKey(QWidget *parent = 0, Qt::WFlags flags = 0, std::string grpId = "", int grpType = 0); + ShareKey(QWidget *parent = 0, std::string grpId = "", int grpType = 0); ~ShareKey(); protected: diff --git a/retroshare-gui/src/gui/chat/CreateLobbyDialog.cpp b/retroshare-gui/src/gui/chat/CreateLobbyDialog.cpp index 6a842f538..5a134688f 100644 --- a/retroshare-gui/src/gui/chat/CreateLobbyDialog.cpp +++ b/retroshare-gui/src/gui/chat/CreateLobbyDialog.cpp @@ -31,8 +31,8 @@ #include "gui/common/PeerDefs.h" #include "ChatDialog.h" -CreateLobbyDialog::CreateLobbyDialog(const std::list& peer_list, int privacyLevel, QWidget *parent, Qt::WFlags flags) : - QDialog(parent, flags) +CreateLobbyDialog::CreateLobbyDialog(const std::list& peer_list, int privacyLevel, QWidget *parent) : + QDialog(parent, Qt::WindowSystemMenuHint | Qt::WindowTitleHint | Qt::WindowCloseButtonHint) { ui = new Ui::CreateLobbyDialog() ; ui->setupUi(this); diff --git a/retroshare-gui/src/gui/chat/CreateLobbyDialog.h b/retroshare-gui/src/gui/chat/CreateLobbyDialog.h index 67f145445..87d89762a 100644 --- a/retroshare-gui/src/gui/chat/CreateLobbyDialog.h +++ b/retroshare-gui/src/gui/chat/CreateLobbyDialog.h @@ -12,7 +12,7 @@ public: /* *@param chanId The channel id to send request for */ - CreateLobbyDialog(const std::list& friends_list, int privacyLevel = 0, QWidget *parent = 0, Qt::WFlags flags = 0); + CreateLobbyDialog(const std::list& friends_list, int privacyLevel = 0, QWidget *parent = 0); ~CreateLobbyDialog(); protected: diff --git a/retroshare-gui/src/gui/forums/CreateForum.cpp b/retroshare-gui/src/gui/forums/CreateForum.cpp index 91c0ed4bc..c7ddc4a1c 100644 --- a/retroshare-gui/src/gui/forums/CreateForum.cpp +++ b/retroshare-gui/src/gui/forums/CreateForum.cpp @@ -31,12 +31,14 @@ #include /** Constructor */ -CreateForum::CreateForum(QWidget *parent) -: QDialog(parent) +CreateForum::CreateForum() +: QDialog(NULL, Qt::WindowSystemMenuHint | Qt::WindowTitleHint | Qt::WindowMinMaxButtonsHint | Qt::WindowCloseButtonHint) { /* Invoke the Qt Designer generated object setup routine */ ui.setupUi(this); + setAttribute(Qt::WA_DeleteOnClose, true); + ui.headerFrame->setHeaderImage(QPixmap(":/images/konversation64.png")); ui.headerFrame->setHeaderText(tr("New Forum")); diff --git a/retroshare-gui/src/gui/forums/CreateForum.h b/retroshare-gui/src/gui/forums/CreateForum.h index 6dcea6715..c8725e0c7 100644 --- a/retroshare-gui/src/gui/forums/CreateForum.h +++ b/retroshare-gui/src/gui/forums/CreateForum.h @@ -30,7 +30,7 @@ class CreateForum : public QDialog Q_OBJECT public: - CreateForum(QWidget *parent = 0); + CreateForum(); void newForum(); /* cleanup */ diff --git a/retroshare-gui/src/gui/forums/CreateForumMsg.cpp b/retroshare-gui/src/gui/forums/CreateForumMsg.cpp index 04d759a2a..4cb605c80 100644 --- a/retroshare-gui/src/gui/forums/CreateForumMsg.cpp +++ b/retroshare-gui/src/gui/forums/CreateForumMsg.cpp @@ -42,7 +42,7 @@ /** Constructor */ CreateForumMsg::CreateForumMsg(const std::string &fId, const std::string &pId) -: QDialog(NULL), mForumId(fId), mParentId(pId) +: QDialog(NULL, Qt::WindowSystemMenuHint | Qt::WindowTitleHint | Qt::WindowMinMaxButtonsHint | Qt::WindowCloseButtonHint), mForumId(fId), mParentId(pId) { /* Invoke the Qt Designer generated object setup routine */ ui.setupUi(this); diff --git a/retroshare-gui/src/gui/forums/EditForumDetails.cpp b/retroshare-gui/src/gui/forums/EditForumDetails.cpp index 3bc45f5a9..048db0ffa 100644 --- a/retroshare-gui/src/gui/forums/EditForumDetails.cpp +++ b/retroshare-gui/src/gui/forums/EditForumDetails.cpp @@ -31,8 +31,8 @@ /** Default constructor */ -EditForumDetails::EditForumDetails(std::string forumId, QWidget *parent, Qt::WFlags flags) - : QDialog(parent, flags), m_forumId(forumId) +EditForumDetails::EditForumDetails(std::string forumId, QWidget *parent) + : QDialog(parent, Qt::WindowSystemMenuHint | Qt::WindowTitleHint | Qt::WindowCloseButtonHint), m_forumId(forumId) { /* Invoke Qt Designer generated QObject setup routine */ ui.setupUi(this); diff --git a/retroshare-gui/src/gui/forums/EditForumDetails.h b/retroshare-gui/src/gui/forums/EditForumDetails.h index 17e700a77..28ae8d69b 100644 --- a/retroshare-gui/src/gui/forums/EditForumDetails.h +++ b/retroshare-gui/src/gui/forums/EditForumDetails.h @@ -32,7 +32,7 @@ class EditForumDetails : public QDialog public: /** Default constructor */ - EditForumDetails(std::string forumId = "", QWidget *parent = 0, Qt::WFlags flags = 0); + EditForumDetails(std::string forumId = "", QWidget *parent = 0); signals: void configChanged(); diff --git a/retroshare-gui/src/gui/forums/ForumDetails.cpp b/retroshare-gui/src/gui/forums/ForumDetails.cpp index d45734a19..5925ab014 100644 --- a/retroshare-gui/src/gui/forums/ForumDetails.cpp +++ b/retroshare-gui/src/gui/forums/ForumDetails.cpp @@ -37,8 +37,8 @@ #define DATETIME_FMT "MMM dd hh:mm:ss" /** Default constructor */ -ForumDetails::ForumDetails(QWidget *parent, Qt::WFlags flags) - : QDialog(parent, flags) +ForumDetails::ForumDetails(QWidget *parent) + : QDialog(parent, Qt::WindowSystemMenuHint | Qt::WindowTitleHint | Qt::WindowCloseButtonHint) { /* Invoke Qt Designer generated QObject setup routine */ ui.setupUi(this); diff --git a/retroshare-gui/src/gui/forums/ForumDetails.h b/retroshare-gui/src/gui/forums/ForumDetails.h index 22f30b6e7..10481b9d9 100644 --- a/retroshare-gui/src/gui/forums/ForumDetails.h +++ b/retroshare-gui/src/gui/forums/ForumDetails.h @@ -33,8 +33,7 @@ class ForumDetails : public QDialog public: /** Default constructor */ - ForumDetails(QWidget *parent = 0, Qt::WFlags flags = 0); - /** Default destructor */ + ForumDetails(QWidget *parent = 0); void showDetails(std::string mCurrForumId); diff --git a/retroshare-gui/src/gui/groups/CreateGroup.cpp b/retroshare-gui/src/gui/groups/CreateGroup.cpp index fb059904d..995d74ba3 100644 --- a/retroshare-gui/src/gui/groups/CreateGroup.cpp +++ b/retroshare-gui/src/gui/groups/CreateGroup.cpp @@ -29,8 +29,8 @@ #include "gui/common/GroupDefs.h" /** Default constructor */ -CreateGroup::CreateGroup(const std::string groupId, QWidget *parent, Qt::WFlags flags) - : QDialog(parent, flags) +CreateGroup::CreateGroup(const std::string groupId, QWidget *parent) + : QDialog(parent, Qt::WindowSystemMenuHint | Qt::WindowTitleHint | Qt::WindowCloseButtonHint) { /* Invoke Qt Designer generated QObject setup routine */ ui.setupUi(this); diff --git a/retroshare-gui/src/gui/groups/CreateGroup.h b/retroshare-gui/src/gui/groups/CreateGroup.h index 7e2b03d45..69eb67166 100644 --- a/retroshare-gui/src/gui/groups/CreateGroup.h +++ b/retroshare-gui/src/gui/groups/CreateGroup.h @@ -32,7 +32,7 @@ class CreateGroup : public QDialog public: /** Default constructor */ - CreateGroup(const std::string groupId, QWidget *parent = 0, Qt::WFlags flags = 0); + CreateGroup(const std::string groupId, QWidget *parent = 0); /** Default destructor */ ~CreateGroup(); diff --git a/retroshare-gui/src/gui/im_history/ImHistoryBrowser.cpp b/retroshare-gui/src/gui/im_history/ImHistoryBrowser.cpp index d1545b2df..43274e40b 100644 --- a/retroshare-gui/src/gui/im_history/ImHistoryBrowser.cpp +++ b/retroshare-gui/src/gui/im_history/ImHistoryBrowser.cpp @@ -91,8 +91,8 @@ void ImHistoryBrowserCreateItemsThread::run() } /** Default constructor */ -ImHistoryBrowser::ImHistoryBrowser(const std::string &peerId, QTextEdit *edit, QWidget *parent, Qt::WFlags flags) - : QDialog(parent, flags) +ImHistoryBrowser::ImHistoryBrowser(const std::string &peerId, QTextEdit *edit, QWidget *parent) + : QDialog(parent, Qt::WindowSystemMenuHint | Qt::WindowTitleHint | Qt::WindowCloseButtonHint) { /* Invoke Qt Designer generated QObject setup routine */ ui.setupUi(this); diff --git a/retroshare-gui/src/gui/im_history/ImHistoryBrowser.h b/retroshare-gui/src/gui/im_history/ImHistoryBrowser.h index f90b5217f..e6e8fb6b2 100644 --- a/retroshare-gui/src/gui/im_history/ImHistoryBrowser.h +++ b/retroshare-gui/src/gui/im_history/ImHistoryBrowser.h @@ -43,7 +43,7 @@ class ImHistoryBrowser : public QDialog public: /** Default constructor */ - ImHistoryBrowser(const std::string &peerId, QTextEdit *edit, QWidget *parent = 0, Qt::WFlags flags = 0); + ImHistoryBrowser(const std::string &peerId, QTextEdit *edit, QWidget *parent = 0); /** Default destructor */ virtual ~ImHistoryBrowser(); diff --git a/retroshare-gui/src/gui/profile/ProfileManager.cpp b/retroshare-gui/src/gui/profile/ProfileManager.cpp index ed04e3620..6fd85c9cf 100644 --- a/retroshare-gui/src/gui/profile/ProfileManager.cpp +++ b/retroshare-gui/src/gui/profile/ProfileManager.cpp @@ -42,8 +42,8 @@ #define COLUMN_GID 2 /** Default constructor */ -ProfileManager::ProfileManager(QWidget *parent, Qt::WFlags flags) - : QDialog(parent, flags) +ProfileManager::ProfileManager(QWidget *parent) + : QDialog(parent, Qt::WindowSystemMenuHint | Qt::WindowTitleHint | Qt::WindowCloseButtonHint) { /* Invoke Qt Designer generated QObject setup routine */ ui.setupUi(this); diff --git a/retroshare-gui/src/gui/profile/ProfileManager.h b/retroshare-gui/src/gui/profile/ProfileManager.h index 01b862fa5..d3678f935 100644 --- a/retroshare-gui/src/gui/profile/ProfileManager.h +++ b/retroshare-gui/src/gui/profile/ProfileManager.h @@ -33,8 +33,7 @@ class ProfileManager : public QDialog public: /** Default constructor */ - ProfileManager(QWidget *parent = 0, Qt::WFlags flags = 0); - /** Default destructor */ + ProfileManager(QWidget *parent = 0); private slots: void identityTreeWidgetCostumPopupMenu( QPoint point ); diff --git a/retroshare-gui/src/gui/profile/StatusMessage.cpp b/retroshare-gui/src/gui/profile/StatusMessage.cpp index 3b06c21db..ea94152fd 100644 --- a/retroshare-gui/src/gui/profile/StatusMessage.cpp +++ b/retroshare-gui/src/gui/profile/StatusMessage.cpp @@ -18,23 +18,14 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. ****************************************************************/ + #include "StatusMessage.h" -#include -#include -#include #include -#include "gui/settings/rsharesettings.h" - - -#include - -#include - /** Default constructor */ -StatusMessage::StatusMessage(QWidget *parent, Qt::WFlags flags) - : QDialog(parent, flags) +StatusMessage::StatusMessage(QWidget *parent) + : QDialog(parent, Qt::WindowSystemMenuHint | Qt::WindowTitleHint | Qt::WindowCloseButtonHint) { /* Invoke Qt Designer generated QObject setup routine */ ui.setupUi(this); @@ -42,13 +33,7 @@ StatusMessage::StatusMessage(QWidget *parent, Qt::WFlags flags) connect(ui.buttonBox, SIGNAL(accepted()), this, SLOT(save())); connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(close())); - load(); - -} - -/** Destructor. */ -StatusMessage::~StatusMessage() -{ + ui.txt_StatusMessage->setText(QString::fromUtf8(rsMsgs->getCustomStateString().c_str())); } /** Saves the changes on this page */ @@ -56,14 +41,5 @@ void StatusMessage::save() { rsMsgs->setCustomStateString(ui.txt_StatusMessage->text().toUtf8().constData()); - close(); + accept(); } - -/** Loads the settings for this page */ -void StatusMessage::load() -{ - ui.txt_StatusMessage->setText(QString::fromUtf8(rsMsgs->getCustomStateString().c_str())); -} - - - diff --git a/retroshare-gui/src/gui/profile/StatusMessage.h b/retroshare-gui/src/gui/profile/StatusMessage.h index 7707d79e4..3014f51a4 100644 --- a/retroshare-gui/src/gui/profile/StatusMessage.h +++ b/retroshare-gui/src/gui/profile/StatusMessage.h @@ -19,7 +19,6 @@ * Boston, MA 02110-1301, USA. ****************************************************************/ - #ifndef _STATUSMESSAGE_H #define _STATUSMESSAGE_H @@ -33,21 +32,16 @@ class StatusMessage : public QDialog public: /** Default constructor */ - StatusMessage(QWidget *parent = 0, Qt::WFlags flags = 0); - /** Default destructor */ - ~StatusMessage(); + StatusMessage(QWidget *parent = 0); private slots: /** Saves the changes on this page */ void save(); - /** Loads the settings for this page */ - void load(); private: /** Qt Designer generated object */ Ui::StatusMessage ui; - }; #endif diff --git a/retroshare-gui/src/gui/settings/rsettingswin.cpp b/retroshare-gui/src/gui/settings/rsettingswin.cpp index 7cc7a5897..b86e50eda 100644 --- a/retroshare-gui/src/gui/settings/rsettingswin.cpp +++ b/retroshare-gui/src/gui/settings/rsettingswin.cpp @@ -42,14 +42,13 @@ #define IMAGE_GENERAL ":/images/kcmsystem24.png" - #include "rsettingswin.h" RSettingsWin *RSettingsWin::_instance = NULL; int RSettingsWin::lastPage = 0; -RSettingsWin::RSettingsWin(QWidget * parent, Qt::WFlags flags) - : QDialog(parent, flags) +RSettingsWin::RSettingsWin(QWidget *parent) + : QDialog(parent, Qt::WindowSystemMenuHint | Qt::WindowTitleHint | Qt::WindowCloseButtonHint) { setupUi(this); setAttribute(Qt::WA_DeleteOnClose, true); diff --git a/retroshare-gui/src/gui/settings/rsettingswin.h b/retroshare-gui/src/gui/settings/rsettingswin.h index e94096a3a..8940efc45 100755 --- a/retroshare-gui/src/gui/settings/rsettingswin.h +++ b/retroshare-gui/src/gui/settings/rsettingswin.h @@ -38,7 +38,7 @@ public: static void postModDirectories(bool update_local); protected: - RSettingsWin(QWidget * parent = 0, Qt::WFlags flags = 0); + RSettingsWin(QWidget *parent = 0); ~RSettingsWin(); void addPage(ConfigPage*) ; diff --git a/retroshare-gui/src/gui/style/StyleDialog.cpp b/retroshare-gui/src/gui/style/StyleDialog.cpp index 63caa9737..56324bd77 100644 --- a/retroshare-gui/src/gui/style/StyleDialog.cpp +++ b/retroshare-gui/src/gui/style/StyleDialog.cpp @@ -28,7 +28,8 @@ #include "gui/style/RSStyle.h" /** Default constructor */ -StyleDialog::StyleDialog(RSStyle &style, QWidget *parent, Qt::WFlags flags) : QDialog(parent, flags) +StyleDialog::StyleDialog(RSStyle &style, QWidget *parent) + : QDialog(parent, Qt::WindowSystemMenuHint | Qt::WindowTitleHint | Qt::WindowCloseButtonHint) { /* Invoke Qt Designer generated QObject setup routine */ ui.setupUi(this); @@ -42,9 +43,7 @@ StyleDialog::StyleDialog(RSStyle &style, QWidget *parent, Qt::WFlags flags) : QD restoreGeometry(geometry); } -// setWindowIcon(QIcon(":/images/rstray3.png")); - - connect(ui.buttonBox, SIGNAL(accepted()), this, SLOT(onOK())); + connect(ui.buttonBox, SIGNAL(accepted()), this, SLOT(accept())); connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(reject())); connect(ui.color1Button, SIGNAL(clicked()), this, SLOT(chooseColor())); @@ -88,11 +87,6 @@ StyleDialog::~StyleDialog() Settings->setValueToGroup("StyleDialog", "Geometry", saveGeometry()); } -void StyleDialog::onOK() -{ - accept(); -} - int StyleDialog::neededColors() { return RSStyle::neededColors((RSStyle::StyleType) ui.styleComboBox->itemData(ui.styleComboBox->currentIndex()).toInt()); diff --git a/retroshare-gui/src/gui/style/StyleDialog.h b/retroshare-gui/src/gui/style/StyleDialog.h index db4a6f0e0..f38490ddb 100644 --- a/retroshare-gui/src/gui/style/StyleDialog.h +++ b/retroshare-gui/src/gui/style/StyleDialog.h @@ -36,14 +36,13 @@ class StyleDialog : public QDialog public: /** Default constructor */ - StyleDialog(RSStyle &style, QWidget *parent = 0, Qt::WFlags flags = 0); + StyleDialog(RSStyle &style, QWidget *parent = 0); /** Default destructor */ ~StyleDialog(); void getStyle(RSStyle &style); private slots: - void onOK(); void chooseColor(); void showButtons();