summaryrefslogtreecommitdiff
path: root/src/gui/widgets/tabs
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-05-30 12:46:49 +0300
committerAndrei Karas <akaras@inbox.ru>2014-05-30 12:46:49 +0300
commit9bb11133522836a9c5e251550ac88c9a4e091c0e (patch)
treef65703ac1a51b79a0766c48420769d28d0847f41 /src/gui/widgets/tabs
parente55ed9a138e97f6fba5e3b6858a755f8a50197d2 (diff)
downloadplus-9bb11133522836a9c5e251550ac88c9a4e091c0e.tar.gz
plus-9bb11133522836a9c5e251550ac88c9a4e091c0e.tar.bz2
plus-9bb11133522836a9c5e251550ac88c9a4e091c0e.tar.xz
plus-9bb11133522836a9c5e251550ac88c9a4e091c0e.zip
Move main window related code into windowmanager.
Diffstat (limited to 'src/gui/widgets/tabs')
-rw-r--r--src/gui/widgets/tabs/chattab.cpp9
-rw-r--r--src/gui/widgets/tabs/setup_video.cpp6
-rw-r--r--src/gui/widgets/tabs/setup_visual.cpp6
-rw-r--r--src/gui/widgets/tabs/tab.cpp3
4 files changed, 16 insertions, 8 deletions
diff --git a/src/gui/widgets/tabs/chattab.cpp b/src/gui/widgets/tabs/chattab.cpp
index 893149a98..36e4b5437 100644
--- a/src/gui/widgets/tabs/chattab.cpp
+++ b/src/gui/widgets/tabs/chattab.cpp
@@ -27,12 +27,14 @@
#include "commands.h"
#include "commandhandler.h"
#include "configuration.h"
+#include "settings.h"
#include "soundconsts.h"
#include "soundmanager.h"
#include "being/localplayer.h"
#include "gui/chatlog.h"
+#include "gui/windowmanager.h"
#include "gui/windows/chatwindow.h"
#include "gui/windows/helpwindow.h"
@@ -320,8 +322,9 @@ void ChatTab::chatLog(std::string line, ChatMsgType::Type own,
if ((getAllowHighlight() || own == ChatMsgType::BY_GM)
&& (this != tabArea->getSelectedTab()
- || (client->getIsMinimized() || (!client->getMouseFocused()
- && !client->getInputFocused()))))
+ || (WindowManager::getIsMinimized()
+ || (!settings.mouseFocused
+ && !settings.inputFocused))))
{
if (own == ChatMsgType::BY_GM)
{
@@ -335,7 +338,7 @@ void ChatTab::chatLog(std::string line, ChatMsgType::Type own,
chatWindow->unHideWindow();
playNewMessageSound();
}
- client->newChatMessage();
+ WindowManager::newChatMessage();
}
}
}
diff --git a/src/gui/widgets/tabs/setup_video.cpp b/src/gui/widgets/tabs/setup_video.cpp
index 439765260..54b17396a 100644
--- a/src/gui/widgets/tabs/setup_video.cpp
+++ b/src/gui/widgets/tabs/setup_video.cpp
@@ -27,6 +27,8 @@
#include "graphicsmanager.h"
+#include "gui/windowmanager.h"
+
#include "gui/windows/okdialog.h"
#include "gui/windows/textdialog.h"
@@ -360,7 +362,7 @@ void Setup_Video::action(const ActionEvent &event)
if (intToRenderType(config.getIntValue("opengl"))
== RENDER_SOFTWARE)
{
- client->resizeVideo(width, height, false);
+ WindowManager::resizeVideo(width, height, false);
}
else
{
@@ -385,7 +387,7 @@ void Setup_Video::action(const ActionEvent &event)
}
#else
mainGraphics->setWindowSize(width, height);
- client->resizeVideo(width, height, false);
+ WindowManager::resizeVideo(width, height, false);
#endif
}
diff --git a/src/gui/widgets/tabs/setup_visual.cpp b/src/gui/widgets/tabs/setup_visual.cpp
index d9f3ec4cf..e90008ac1 100644
--- a/src/gui/widgets/tabs/setup_visual.cpp
+++ b/src/gui/widgets/tabs/setup_visual.cpp
@@ -21,6 +21,8 @@
#include "gui/widgets/tabs/setup_visual.h"
+#include "gui/windowmanager.h"
+
#include "gui/models/namesmodel.h"
#include "gui/widgets/containerplacer.h"
@@ -228,8 +230,8 @@ Setup_Visual::~Setup_Visual()
void Setup_Visual::apply()
{
SetupTabScroll::apply();
- Client::applyGrabMode();
+ WindowManager::applyGrabMode();
#ifndef WIN32
- client->applyScale();
+ WindowManager::applyScale();
#endif
}
diff --git a/src/gui/widgets/tabs/tab.cpp b/src/gui/widgets/tabs/tab.cpp
index 2ad0e8ac8..73c38343b 100644
--- a/src/gui/widgets/tabs/tab.cpp
+++ b/src/gui/widgets/tabs/tab.cpp
@@ -67,6 +67,7 @@
#include "client.h"
#include "graphicsvertexes.h"
+#include "settings.h"
#include "gui/gui.h"
#include "gui/skin.h"
@@ -178,7 +179,7 @@ void Tab::init()
void Tab::updateAlpha()
{
- const float alpha = std::max(client->getGuiAlpha(),
+ const float alpha = std::max(settings.guiAlpha,
theme->getMinimumOpacity());
if (alpha != mAlpha)