History

Merge branch 'master' of https://github.com/worklist/hifi into 19508

stojce committed 12 years ago

Commit 71697902 parents 4e2d3c9 2b7cc4335 files · +435 −173Browse files

Showing the changes to interface/src/Menu.cpp (1 of 35 files). Show all

Unified · Split

interface/src/Menu.cpp+6−8
@@ -914,13 +914,11 @@ void Menu::showMetavoxelEditor() { · 913 unmodified lines
914914
915915 void Menu::showChat() {
916916 if (!_chatWindow) {
917− _chatWindow = new ChatWindow();
918− QMainWindow* mainWindow = Application::getInstance()->getWindow();
919− QBoxLayout* boxLayout = static_cast<QBoxLayout*>(mainWindow->centralWidget()->layout());
920− boxLayout->addWidget(_chatWindow, 0, Qt::AlignRight);
917+ Application::getInstance()->getWindow()->addDockWidget(Qt::RightDockWidgetArea, _chatWindow = new ChatWindow());
918+
921919 } else {
922− if (!_chatWindow->isVisible()) {
923− _chatWindow->show();
920+ if (!_chatWindow->toggleViewAction()->isChecked()) {
921+ _chatWindow->toggleViewAction()->trigger();
924922 }
925923 }
926924 }
@@ -928,8 +926,8 @@ void Menu::showChat() { · 1 unmodified line
928926 void Menu::toggleChat() {
929927 #ifdef HAVE_QXMPP
930928 _chatAction->setEnabled(XmppClient::getInstance().getXMPPClient().isConnected());
931− if (!_chatAction->isEnabled() && _chatWindow) {
932− _chatWindow->hide();
929+ if (!_chatAction->isEnabled() && _chatWindow && _chatWindow->toggleViewAction()->isChecked()) {
930+ _chatWindow->toggleViewAction()->trigger();
933931 }
934932 #endif
935933 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t