projects
/
quassel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
bump © years
[quassel.git]
/
src
/
qtui
/
legacysystemtray.cpp
diff --git
a/src/qtui/legacysystemtray.cpp
b/src/qtui/legacysystemtray.cpp
index
9176dbd
..
52bd15d
100644
(file)
--- a/
src/qtui/legacysystemtray.cpp
+++ b/
src/qtui/legacysystemtray.cpp
@@
-1,5
+1,5
@@
/***************************************************************************
/***************************************************************************
- * Copyright (C) 2005-201
0
by the Quassel Project *
+ * Copyright (C) 2005-201
2
by the Quassel Project *
* devel@quassel-irc.org *
* *
* This program is free software; you can redistribute it and/or modify *
* devel@quassel-irc.org *
* *
* This program is free software; you can redistribute it and/or modify *
@@
-27,7
+27,6
@@
LegacySystemTray::LegacySystemTray(QWidget *parent)
: SystemTray(parent),
_blinkState(false),
LegacySystemTray::LegacySystemTray(QWidget *parent)
: SystemTray(parent),
_blinkState(false),
- _isVisible(true),
_lastMessageId(0)
{
#ifndef HAVE_KDE
_lastMessageId(0)
{
#ifndef HAVE_KDE
@@
-78,9
+77,9
@@
void LegacySystemTray::syncLegacyIcon() {
}
void LegacySystemTray::setVisible(bool visible) {
}
void LegacySystemTray::setVisible(bool visible) {
-
_isVisible = visible
;
+
SystemTray::setVisible(visible)
;
if(mode() == Legacy) {
if(mode() == Legacy) {
- if(
visible
)
+ if(
shouldBeVisible()
)
_trayIcon->show();
else
_trayIcon->hide();
_trayIcon->show();
else
_trayIcon->hide();
@@
-91,16
+90,21
@@
bool LegacySystemTray::isVisible() const {
if(mode() == Legacy) {
return _trayIcon->isVisible();
}
if(mode() == Legacy) {
return _trayIcon->isVisible();
}
- return
false
;
+ return
SystemTray::isVisible()
;
}
void LegacySystemTray::setMode(Mode mode_) {
}
void LegacySystemTray::setMode(Mode mode_) {
+ if(mode_ == mode())
+ return;
+
SystemTray::setMode(mode_);
if(mode() == Legacy) {
syncLegacyIcon();
SystemTray::setMode(mode_);
if(mode() == Legacy) {
syncLegacyIcon();
- if(
_isVisible
)
+ if(
shouldBeVisible()
)
_trayIcon->show();
_trayIcon->show();
+ else
+ _trayIcon->hide();
if(state() == NeedsAttention)
_blinkTimer.start();
} else {
if(state() == NeedsAttention)
_blinkTimer.start();
} else {