summaryrefslogtreecommitdiff
path: root/src/gui/windows
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-03-04 19:23:03 +0300
committerAndrei Karas <akaras@inbox.ru>2016-03-04 19:23:03 +0300
commit9706e377c799d4b2c0a9f88c8ba6768bf2ea858c (patch)
tree37bc6dc1cfdac6d392409bc520ac6288a7810989 /src/gui/windows
parent367c92d1ac584eb7ad5812f717aea27456f44e5f (diff)
downloadplus-9706e377c799d4b2c0a9f88c8ba6768bf2ea858c.tar.gz
plus-9706e377c799d4b2c0a9f88c8ba6768bf2ea858c.tar.bz2
plus-9706e377c799d4b2c0a9f88c8ba6768bf2ea858c.tar.xz
plus-9706e377c799d4b2c0a9f88c8ba6768bf2ea858c.zip
Remove isVisible getter from widget.
Diffstat (limited to 'src/gui/windows')
-rw-r--r--src/gui/windows/chatwindow.cpp31
-rw-r--r--src/gui/windows/ministatuswindow.cpp6
2 files changed, 21 insertions, 16 deletions
diff --git a/src/gui/windows/chatwindow.cpp b/src/gui/windows/chatwindow.cpp
index b4b73ff23..d7d5f690a 100644
--- a/src/gui/windows/chatwindow.cpp
+++ b/src/gui/windows/chatwindow.cpp
@@ -253,7 +253,7 @@ void ChatWindow::loadGMCommands()
void ChatWindow::updateTabsMargin()
{
- if (mColorPicker->isVisibleLocal())
+ if (mColorPicker->mVisible == Visible_true)
mChatTabs->setRightMargin(mColorPicker->getWidth() + 16 + 8);
else
mChatTabs->setRightMargin(8);
@@ -274,10 +274,15 @@ void ChatWindow::adjustTabSize()
mChatInput->setPosition(frame, y);
mChatTabs->setWidth(awFrame2);
const int height = ah - frame2 - (inputHeight + frame2);
- if (mChatInput->isVisibleLocal() || !config.getBoolValue("hideChatInput"))
+ if (mChatInput->mVisible == Visible_true ||
+ !config.getBoolValue("hideChatInput"))
+ {
mChatTabs->setHeight(height);
+ }
else
+ {
mChatTabs->setHeight(height + inputHeight);
+ }
updateTabsMargin();
if (showEmotes)
@@ -288,8 +293,7 @@ void ChatWindow::adjustTabSize()
w -= mEmoteButtonSpacing;
y += mEmoteButtonY;
mChatInput->setWidth(w);
- mChatButton->setVisible(fromBool(mChatInput->isVisibleLocal(),
- Visible));
+ mChatButton->setVisible(mChatInput->mVisible);
mChatButton->setPosition(x, y);
}
else
@@ -458,7 +462,7 @@ void ChatWindow::action(const ActionEvent &event)
{
if (emoteWindow)
{
- if (emoteWindow->isVisibleLocal())
+ if (emoteWindow->mVisible == Visible_true)
emoteWindow->hide();
else
emoteWindow->show();
@@ -497,11 +501,12 @@ void ChatWindow::action(const ActionEvent &event)
}
}
- if (mColorPicker && mColorPicker->isVisibleLocal()
- != config.getBoolValue("showChatColorsList"))
+ if (mColorPicker)
{
- mColorPicker->setVisible(fromBool(config.getBoolValue(
- "showChatColorsList"), Visible));
+ const Visible vis = fromBool(config.getBoolValue(
+ "showChatColorsList"), Visible);
+ if (mColorPicker->mVisible != vis)
+ mColorPicker->setVisible(vis);
}
}
@@ -817,12 +822,12 @@ void ChatWindow::keyPressed(KeyEvent &event)
return;
}
else if (actionId == InputAction::GUI_CANCEL &&
- mChatInput->isVisibleLocal())
+ mChatInput->mVisible == Visible_true)
{
mChatInput->processVisible(Visible_false);
}
else if (actionId == InputAction::CHAT_PREV_HISTORY &&
- mChatInput->isVisibleLocal())
+ mChatInput->mVisible == Visible_true)
{
const ChatTab *const tab = getFocused();
if (tab && tab->hasRows())
@@ -854,7 +859,7 @@ void ChatWindow::keyPressed(KeyEvent &event)
}
}
else if (actionId == InputAction::CHAT_NEXT_HISTORY &&
- mChatInput->isVisibleLocal())
+ mChatInput->mVisible == Visible_true)
{
const ChatTab *const tab = getFocused();
if (tab && tab->hasRows())
@@ -893,7 +898,7 @@ void ChatWindow::keyPressed(KeyEvent &event)
{
if (emoteWindow)
{
- if (emoteWindow->isVisibleLocal())
+ if (emoteWindow->mVisible == Visible_true)
emoteWindow->hide();
else
emoteWindow->show();
diff --git a/src/gui/windows/ministatuswindow.cpp b/src/gui/windows/ministatuswindow.cpp
index 267401707..6dd427a98 100644
--- a/src/gui/windows/ministatuswindow.cpp
+++ b/src/gui/windows/ministatuswindow.cpp
@@ -168,7 +168,7 @@ MiniStatusWindow::~MiniStatusWindow()
ProgressBar *bar = *it;
if (!bar)
continue;
- if (!bar->isVisibleLocal())
+ if (bar->mVisible == Visible_false)
delete bar;
}
mBars.clear();
@@ -207,7 +207,7 @@ void MiniStatusWindow::updateBars()
ProgressBar *const bar = *it;
if (!bar)
continue;
- if (bar->isVisibleLocal())
+ if (bar->mVisible == Visible_true)
{
bar->setPosition(x, 0);
add(bar);
@@ -525,7 +525,7 @@ void MiniStatusWindow::saveBars() const
FOR_EACH (ProgressBarVectorCIter, it, mBars)
{
const ProgressBar *const bar = *it;
- if (!bar->isVisibleLocal())
+ if (bar->mVisible == Visible_false)
{
config.setValue("ministatus" + toString(i),
bar->getActionEventId());