From 5f7e41b79bf59567f36d6c8ca709f1eb07ad9ee7 Mon Sep 17 00:00:00 2001 From: Andrzej Kapolka Date: Fri, 14 Mar 2014 10:55:27 -0700 Subject: [PATCH] More dock widget tweaks. --- interface/interface_en.ts | 8 ++++---- interface/src/Menu.cpp | 8 ++++---- interface/src/ui/ChatWindow.cpp | 2 ++ 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/interface/interface_en.ts b/interface/interface_en.ts index 9565d6e88a..f07f50f287 100644 --- a/interface/interface_en.ts +++ b/interface/interface_en.ts @@ -45,7 +45,7 @@ - + day %n day @@ -53,7 +53,7 @@ - + hour %n hour @@ -61,7 +61,7 @@ - + minute %n minute @@ -76,7 +76,7 @@ - + %1 online now: diff --git a/interface/src/Menu.cpp b/interface/src/Menu.cpp index 22b441d868..c4b7fdcdd6 100644 --- a/interface/src/Menu.cpp +++ b/interface/src/Menu.cpp @@ -1047,8 +1047,8 @@ void Menu::showChat() { Application::getInstance()->getWindow()->addDockWidget(Qt::RightDockWidgetArea, _chatWindow = new ChatWindow()); } else { - if (!_chatWindow->isVisible()) { - _chatWindow->show(); + if (!_chatWindow->toggleViewAction()->isChecked()) { + _chatWindow->toggleViewAction()->trigger(); } } } @@ -1056,8 +1056,8 @@ void Menu::showChat() { void Menu::toggleChat() { #ifdef HAVE_QXMPP _chatAction->setEnabled(XmppClient::getInstance().getXMPPClient().isConnected()); - if (!_chatAction->isEnabled() && _chatWindow) { - _chatWindow->hide(); + if (!_chatAction->isEnabled() && _chatWindow && _chatWindow->toggleViewAction()->isChecked()) { + _chatWindow->toggleViewAction()->trigger(); } #endif } diff --git a/interface/src/ui/ChatWindow.cpp b/interface/src/ui/ChatWindow.cpp index b7587f9508..55f32c5c7c 100644 --- a/interface/src/ui/ChatWindow.cpp +++ b/interface/src/ui/ChatWindow.cpp @@ -41,6 +41,8 @@ ChatWindow::ChatWindow() : ui->messagePlainTextEdit->installEventFilter(this); + ui->closeButton->hide(); + #ifdef HAVE_QXMPP const QXmppClient& xmppClient = XmppClient::getInstance().getXMPPClient(); if (xmppClient.isConnected()) {