From 735a27f8da4fa620f79c93f2f37aeb93fac74279 Mon Sep 17 00:00:00 2001 From: thunder2 Date: Sat, 2 May 2015 00:22:30 +0000 Subject: [PATCH] Removed maximum value from chat lobby participants list. Saved size of participants list in profile. Removed show/hide button to get more space. The participants list can be colapsed by moving the splitter to the right frame border. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@8204 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- TODO.txt | 4 +- .../src/gui/chat/ChatLobbyDialog.cpp | 26 ++----- retroshare-gui/src/gui/chat/ChatLobbyDialog.h | 1 - .../src/gui/chat/ChatLobbyDialog.ui | 74 ------------------- .../src/gui/settings/RsharePeerSettings.cpp | 10 --- .../src/gui/settings/RsharePeerSettings.h | 3 - 6 files changed, 9 insertions(+), 109 deletions(-) diff --git a/TODO.txt b/TODO.txt index e413d5560..9ec2ee514 100644 --- a/TODO.txt +++ b/TODO.txt @@ -71,10 +71,12 @@ To be done the big subscribe button on the top, but never used. generally,we have 2 panels here, both semi-empty. need to compact all the stuff -0031 [ ] chats - participant list can't be extended in wide. +0031 [X] chats - participant list can't be extended in wide. show/hide button is almost invisible. make it more big. but it takes space in width, so move it to bar with lobby name. however, the lobby name bar also seems redundant. so maybe the button's final place must domewhere in the lower button bar. +0031a[ ] ... the lobby name bar also seems redundant .... + 0032 [ ] In Network->friend list. Remove "[Connected]" to location names. Takes room and isn't useful since the text is in bold when connected. Also put the avatar column first. Remove the "Busy" and "Idle" text since they are shown as icon already and set them as tooltip => lots of saved space. diff --git a/retroshare-gui/src/gui/chat/ChatLobbyDialog.cpp b/retroshare-gui/src/gui/chat/ChatLobbyDialog.cpp index 84bd8f45c..7446fad78 100644 --- a/retroshare-gui/src/gui/chat/ChatLobbyDialog.cpp +++ b/retroshare-gui/src/gui/chat/ChatLobbyDialog.cpp @@ -56,7 +56,6 @@ ChatLobbyDialog::ChatLobbyDialog(const ChatLobbyId& lid, QWidget *parent, Qt::Wi /* Invoke Qt Designer generated QObject setup routine */ ui.setupUi(this); - connect(ui.participantsFrameButton, SIGNAL(toggled(bool)), this, SLOT(showParticipantsFrame(bool))); //connect(ui.actionChangeNickname, SIGNAL(triggered()), this, SLOT(changeNickname())); connect(ui.participantsList, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(participantsTreeWidgetCustomPopupMenu(QPoint))); connect(ui.participantsList, SIGNAL(itemDoubleClicked(QTreeWidgetItem*,int)), this, SLOT(participantsTreeWidgetDoubleClicked(QTreeWidgetItem*,int))); @@ -224,9 +223,6 @@ void ChatLobbyDialog::init() lastUpdateListTime = 0; - /* Hide or show the participants frames */ - showParticipantsFrame(PeerSettings->getShowParticipantsFrame(ChatId(lobbyId))); - // add to window dynamic_cast(MainWindow::getPage(MainWindow::ChatLobby))->addChatPage(this) ; @@ -268,8 +264,14 @@ void ChatLobbyDialog::processSettings(bool load) if (load) { // load settings + + // state of splitter + ui.splitter->restoreState(Settings->value("splitter").toByteArray()); } else { // save settings + + // state of splitter + Settings->setValue("splitter", ui.splitter->saveState()); } Settings->endGroup(); @@ -695,19 +697,3 @@ void ChatLobbyDialog::showDialog(uint chatflags) dynamic_cast(MainWindow::getPage(MainWindow::ChatLobby))->setCurrentChatPage(this) ; } } - -void ChatLobbyDialog::showParticipantsFrame(bool show) -{ - ui.participantsFrame->setVisible(show); - ui.participantsFrameButton->setChecked(show); - - if (show) { - ui.participantsFrameButton->setToolTip(tr("Hide Participants")); - ui.participantsFrameButton->setIcon(QIcon(":images/show_toolbox_frame.png")); - } else { - ui.participantsFrameButton->setToolTip(tr("Show Participants")); - ui.participantsFrameButton->setIcon(QIcon(":images/hide_toolbox_frame.png")); - } - - PeerSettings->setShowParticipantsFrame(ChatId(lobbyId), show); -} diff --git a/retroshare-gui/src/gui/chat/ChatLobbyDialog.h b/retroshare-gui/src/gui/chat/ChatLobbyDialog.h index d52950b1e..1aa742573 100644 --- a/retroshare-gui/src/gui/chat/ChatLobbyDialog.h +++ b/retroshare-gui/src/gui/chat/ChatLobbyDialog.h @@ -48,7 +48,6 @@ public: ChatLobbyId id() const { return lobbyId ;} private slots: - void showParticipantsFrame(bool show); void participantsTreeWidgetCustomPopupMenu( QPoint point ); void inviteFriends() ; void leaveLobby() ; diff --git a/retroshare-gui/src/gui/chat/ChatLobbyDialog.ui b/retroshare-gui/src/gui/chat/ChatLobbyDialog.ui index e9a176437..3e619f475 100644 --- a/retroshare-gui/src/gui/chat/ChatLobbyDialog.ui +++ b/retroshare-gui/src/gui/chat/ChatLobbyDialog.ui @@ -52,12 +52,6 @@ 0 - - - 140 - 16777215 - - 0 @@ -85,12 +79,6 @@ 0 - - - 140 - 16777215 - - Qt::CustomContextMenu @@ -132,68 +120,6 @@ - - - - - 0 - 0 - - - - - 14 - 16777215 - - - - - 0 - - - - - - 14 - 31 - - - - - 14 - 31 - - - - - - - - 16 - 31 - - - - true - - - - - - - Qt::Vertical - - - - 12 - 335 - - - - - - - diff --git a/retroshare-gui/src/gui/settings/RsharePeerSettings.cpp b/retroshare-gui/src/gui/settings/RsharePeerSettings.cpp index fefefd101..d01d494a8 100644 --- a/retroshare-gui/src/gui/settings/RsharePeerSettings.cpp +++ b/retroshare-gui/src/gui/settings/RsharePeerSettings.cpp @@ -240,16 +240,6 @@ void RsharePeerSettings::setShowAvatarFrame(const ChatId& chatId, bool value) return set(chatId, "ShowAvatarFrame", value); } -bool RsharePeerSettings::getShowParticipantsFrame(const ChatId& chatId) -{ - return get(chatId, "ShowParticipantsFrame", true).toBool(); -} - -void RsharePeerSettings::setShowParticipantsFrame(const ChatId& chatId, bool value) -{ - return set(chatId, "ShowParticipantsFrame", value); -} - void RsharePeerSettings::getStyle(const ChatId& chatId, const QString &name, RSStyle &style) { std::string settingsId; diff --git a/retroshare-gui/src/gui/settings/RsharePeerSettings.h b/retroshare-gui/src/gui/settings/RsharePeerSettings.h index 94d841b03..e6e89bb64 100644 --- a/retroshare-gui/src/gui/settings/RsharePeerSettings.h +++ b/retroshare-gui/src/gui/settings/RsharePeerSettings.h @@ -50,9 +50,6 @@ public: bool getShowAvatarFrame(const ChatId& chatId); void setShowAvatarFrame(const ChatId& chatId, bool value); - bool getShowParticipantsFrame(const ChatId& chatId); - void setShowParticipantsFrame(const ChatId& chatId, bool value); - void getStyle(const ChatId& chatId, const QString &name, RSStyle &style); void setStyle(const ChatId& chatId, const QString &name, RSStyle &style);