From 495cc17da3b9633b23b8fe1edac846c5436c98fe Mon Sep 17 00:00:00 2001 From: thunder2 Date: Mon, 2 Sep 2013 21:48:23 +0000 Subject: [PATCH] Moved service permission matrix to the left toolbar Updated english translation git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6678 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- retroshare-gui/src/gui/FriendsDialog.cpp | 5 +--- retroshare-gui/src/gui/FriendsDialog.h | 1 - retroshare-gui/src/gui/FriendsDialog.ui | 5 ---- retroshare-gui/src/gui/MainWindow.cpp | 7 +++++ retroshare-gui/src/gui/MainWindow.h | 1 + retroshare-gui/src/gui/MainWindow.ui | 13 +++++++++ .../src/gui/ServicePermissionDialog.cpp | 18 +++++++++++- .../src/gui/ServicePermissionDialog.h | 3 ++ retroshare-gui/src/gui/common/FriendList.cpp | 8 ------ retroshare-gui/src/gui/common/FriendList.h | 1 - retroshare-gui/src/lang/retroshare_en.ts | 28 +++++++++++++------ 11 files changed, 62 insertions(+), 28 deletions(-) diff --git a/retroshare-gui/src/gui/FriendsDialog.cpp b/retroshare-gui/src/gui/FriendsDialog.cpp index 9ea095d12..dab1cc0b9 100644 --- a/retroshare-gui/src/gui/FriendsDialog.cpp +++ b/retroshare-gui/src/gui/FriendsDialog.cpp @@ -53,7 +53,6 @@ #include "util/DateTime.h" //#include "FriendRecommendDialog.h" #include "FriendsDialog.h" -//#include "ServicePermissionDialog.h" #include "NetworkView.h" #include "NetworkDialog.h" @@ -88,8 +87,7 @@ FriendsDialog::FriendsDialog(QWidget *parent) connect( ui.actionSet_your_Personal_Message, SIGNAL(triggered()), this, SLOT(statusmessage())); connect( ui.addfileButton, SIGNAL(clicked() ), this , SLOT(addExtraFile())); connect( ui.actionAdd_Friend, SIGNAL(triggered()), this, SLOT(addFriend())); - connect( ui.actionFriendRecommendations, SIGNAL(triggered()), this, SLOT(recommendFriends())); - connect( ui.actionServicePermission, SIGNAL(triggered()), this, SLOT(servicePermission())); + connect( ui.actionFriendRecommendations, SIGNAL(triggered()), this, SLOT(recommendFriends())); ui.avatar->setFrameType(AvatarWidget::STATUS_FRAME); ui.avatar->setOwnId(); @@ -171,7 +169,6 @@ FriendsDialog::FriendsDialog(QWidget *parent) // menu->addAction(ui.actionAdd_Group); // menu->addAction(ui.actionCreate_new_Chat_lobby); // menu->addAction(ui.actionFriendRecommendations); -// menu->addAction(ui.actionServicePermission); // // menu->addSeparator(); // menu->addAction(ui.actionSet_your_Avatar); diff --git a/retroshare-gui/src/gui/FriendsDialog.h b/retroshare-gui/src/gui/FriendsDialog.h index 9da3bb78f..85d644e49 100644 --- a/retroshare-gui/src/gui/FriendsDialog.h +++ b/retroshare-gui/src/gui/FriendsDialog.h @@ -128,7 +128,6 @@ private slots: //void newsFeedChanged(int count); // void recommendFriends(); - // void servicePermission(); signals: void notifyGroupChat(const QString&,const QString&) ; diff --git a/retroshare-gui/src/gui/FriendsDialog.ui b/retroshare-gui/src/gui/FriendsDialog.ui index 9c39f6d52..6f263e186 100644 --- a/retroshare-gui/src/gui/FriendsDialog.ui +++ b/retroshare-gui/src/gui/FriendsDialog.ui @@ -843,11 +843,6 @@ Reset font to default - - - Service permissions - - diff --git a/retroshare-gui/src/gui/MainWindow.cpp b/retroshare-gui/src/gui/MainWindow.cpp index 0fb92cee3..4cab70d45 100644 --- a/retroshare-gui/src/gui/MainWindow.cpp +++ b/retroshare-gui/src/gui/MainWindow.cpp @@ -61,6 +61,7 @@ #include "SoundManager.h" #include "notifyqt.h" #include "common/UserNotify.h" +#include "gui/ServicePermissionDialog.h" #ifdef UNFINISHED #include "unfinished/ApplicationWindow.h" @@ -225,6 +226,7 @@ MainWindow::MainWindow(QWidget* parent, Qt::WFlags flags) connect(ui->actionAdd_Share, SIGNAL(triggered() ), this , SLOT( openShareManager() ) ); connect(ui->actionOptions, SIGNAL(triggered()), this, SLOT( showSettings()) ); // connect(ui->actionMessenger, SIGNAL(triggered()), this, SLOT( showMessengerWindow()) ); + connect(ui->actionServicePermissions, SIGNAL(triggered()), this, SLOT(servicePermission())); ui->actionMessenger->setVisible(false); @@ -1322,3 +1324,8 @@ void MainWindow::retroshareLinkActivated(const QUrl &url) links.append(link); RetroShareLink::process(links); } + +void MainWindow::servicePermission() +{ + ServicePermissionDialog::showYourself(); +} diff --git a/retroshare-gui/src/gui/MainWindow.h b/retroshare-gui/src/gui/MainWindow.h index ed822d78e..88eedc22a 100644 --- a/retroshare-gui/src/gui/MainWindow.h +++ b/retroshare-gui/src/gui/MainWindow.h @@ -187,6 +187,7 @@ private slots: void showMessengerWindow(); void showDhtWindow(); void showBwCtrlWindow(); + void servicePermission(); #ifdef UNFINISHED void showApplWindow(); diff --git a/retroshare-gui/src/gui/MainWindow.ui b/retroshare-gui/src/gui/MainWindow.ui index ec1062a0b..9255b555b 100644 --- a/retroshare-gui/src/gui/MainWindow.ui +++ b/retroshare-gui/src/gui/MainWindow.ui @@ -50,6 +50,7 @@ + @@ -134,6 +135,18 @@ Quick Start Wizard + + + + :/images/admin-24.png:/images/admin-24.png + + + ServicePermissions + + + Service permissions matrix + + diff --git a/retroshare-gui/src/gui/ServicePermissionDialog.cpp b/retroshare-gui/src/gui/ServicePermissionDialog.cpp index deb9073b4..c2abd3bc7 100644 --- a/retroshare-gui/src/gui/ServicePermissionDialog.cpp +++ b/retroshare-gui/src/gui/ServicePermissionDialog.cpp @@ -25,16 +25,20 @@ #include "ui_ServicePermissionDialog.h" #include "settings/rsharesettings.h" +static ServicePermissionDialog *servicePermissionDialog = NULL; + ServicePermissionDialog::ServicePermissionDialog() : QDialog(NULL, Qt::WindowSystemMenuHint | Qt::WindowTitleHint | Qt::WindowMinMaxButtonsHint | Qt::WindowCloseButtonHint), ui(new Ui::ServicePermissionDialog) { ui->setupUi(this); + setAttribute(Qt::WA_DeleteOnClose, true); + Settings->loadWidgetInformation(this); ui->headerFrame->setHeaderImage(QPixmap(":/images/user/servicepermissions64.png")); - ui->headerFrame->setHeaderText(tr("Service Permissions")); + ui->headerFrame->setHeaderText(tr("Service Permissions")); connect(ui->buttonBox, SIGNAL(accepted()), this, SLOT(setPermissions())); connect(ui->buttonBox, SIGNAL(rejected()), this, SLOT(reject())); @@ -63,6 +67,18 @@ ServicePermissionDialog::~ServicePermissionDialog() Settings->saveWidgetInformation(this); delete ui; + + servicePermissionDialog = NULL; +} + +void ServicePermissionDialog::showYourself() +{ + if (!servicePermissionDialog) { + servicePermissionDialog = new ServicePermissionDialog(); + } + + servicePermissionDialog->show(); + servicePermissionDialog->activateWindow(); } void ServicePermissionDialog::itemAdded(int idType, const QString &id, QTreeWidgetItem *item) diff --git a/retroshare-gui/src/gui/ServicePermissionDialog.h b/retroshare-gui/src/gui/ServicePermissionDialog.h index 5e82bdc9b..4446e3b4c 100644 --- a/retroshare-gui/src/gui/ServicePermissionDialog.h +++ b/retroshare-gui/src/gui/ServicePermissionDialog.h @@ -38,6 +38,9 @@ class ServicePermissionDialog : public QDialog Q_OBJECT public: + static void showYourself(); + +private: ServicePermissionDialog(); ~ServicePermissionDialog(); diff --git a/retroshare-gui/src/gui/common/FriendList.cpp b/retroshare-gui/src/gui/common/FriendList.cpp index 8a2d1e52e..88bdca04e 100644 --- a/retroshare-gui/src/gui/common/FriendList.cpp +++ b/retroshare-gui/src/gui/common/FriendList.cpp @@ -33,7 +33,6 @@ #include "gui/chat/ChatDialog.h" //#include "gui/chat/CreateLobbyDialog.h" #include "gui/common/AvatarDefs.h" -#include "gui/ServicePermissionDialog.h" #include "gui/FriendRecommendDialog.h" #include "gui/connect/ConfCertDialog.h" @@ -71,7 +70,6 @@ #define IMAGE_REMOVE ":/images/delete.png" #define IMAGE_EXPAND ":/images/edit_add24.png" #define IMAGE_COLLAPSE ":/images/edit_remove24.png" -#define IMAGE_PERMISSIONS ":/images/admin-16.png" /* Images for Status icons */ #define IMAGE_AVAILABLE ":/images/user/identityavaiblecyan24.png" #define IMAGE_CONNECT2 ":/images/reload24.png" @@ -532,7 +530,6 @@ void FriendList::peerTreeWidgetCostumPopupMenu() contextMnu.addSeparator(); contextMnu.addAction(QIcon(IMAGE_EXPAND), tr("Recommend many friends to each others"), this, SLOT(recommendFriends())); - contextMnu.addAction(QIcon(IMAGE_PERMISSIONS), tr("Service permissions matrix"), this, SLOT(servicePermission())); contextMnu.addSeparator(); @@ -551,11 +548,6 @@ void FriendList::recommendFriends() { FriendRecommendDialog::showYourself(); } -void FriendList::servicePermission() -{ - ServicePermissionDialog dlg; - dlg.exec(); -} void FriendList::updateDisplay() { diff --git a/retroshare-gui/src/gui/common/FriendList.h b/retroshare-gui/src/gui/common/FriendList.h index ec35f0ad7..c2f1dab3a 100644 --- a/retroshare-gui/src/gui/common/FriendList.h +++ b/retroshare-gui/src/gui/common/FriendList.h @@ -150,7 +150,6 @@ private slots: #ifdef UNFINISHED_FD void viewprofile(); #endif - void servicePermission() ; void recommendFriends() ; void createNewGroup() ; diff --git a/retroshare-gui/src/lang/retroshare_en.ts b/retroshare-gui/src/lang/retroshare_en.ts index 8e15901cc..cf04f4a14 100644 --- a/retroshare-gui/src/lang/retroshare_en.ts +++ b/retroshare-gui/src/lang/retroshare_en.ts @@ -5546,10 +5546,6 @@ p, li { white-space: pre-wrap; } Recommend many friends to each others - - Service permissions matrix - - Display @@ -5730,10 +5726,6 @@ p, li { white-space: pre-wrap; } Reset font to default - - Service permissions - - Local network @@ -7778,6 +7770,14 @@ p, li { white-space: pre-wrap; } Anonymous Id + + Create new Identity + + + + Delete Identity + + IdEditDialog @@ -7841,6 +7841,10 @@ p, li { white-space: pre-wrap; } Unknown real name + + Create New Identity + + ImHistoryBrowser @@ -8134,6 +8138,14 @@ p, li { white-space: pre-wrap; } The file link is malformed. + + ServicePermissions + + + + Service permissions matrix + + MessageComposer