X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Fqtui%2Fsystemtray.cpp;h=948e48db0498ae894f334de036f9f0bae3202daa;hb=921e54680da16fcf2adb7a90506875aceb6633a4;hp=bb80eeb10e5732e3b7fd696cb63d0528ab5ed5d9;hpb=04315f46a16fc3627218377071e008b6b9744992;p=quassel.git diff --git a/src/qtui/systemtray.cpp b/src/qtui/systemtray.cpp index bb80eeb1..948e48db 100644 --- a/src/qtui/systemtray.cpp +++ b/src/qtui/systemtray.cpp @@ -1,11 +1,11 @@ /*************************************************************************** - * Copyright (C) 2005-2013 by the Quassel Project * + * Copyright (C) 2005-2015 by the Quassel Project * * devel@quassel-irc.org * * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) version 3. * + * This file is free software; you can redistribute it and/or modify * + * it under the terms of the GNU Library General Public License (LGPL) * + * as published by the Free Software Foundation; either version 2 of the * + * License, or (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * @@ -26,7 +26,6 @@ #include "action.h" #include "actioncollection.h" #include "client.h" -#include "iconloader.h" #include "qtui.h" #ifdef HAVE_KDE @@ -40,9 +39,9 @@ SystemTray::SystemTray(QWidget *parent) _mode(Invalid), _state(Passive), _shouldBeVisible(true), - _passiveIcon(DesktopIcon("quassel-inactive")), - _activeIcon(DesktopIcon("quassel")), - _needsAttentionIcon(DesktopIcon("quassel-message")), + _passiveIcon(QIcon::fromTheme("quassel-inactive", QIcon(":/icons/quassel-inactive.png"))), + _activeIcon(QIcon::fromTheme("quassel", QIcon(":/icons/quassel.png"))), + _needsAttentionIcon(QIcon::fromTheme("quassel-message", QIcon(":/icons/quassel-message.png"))), _trayMenu(0), _associatedWidget(parent) { @@ -122,13 +121,13 @@ void SystemTray::setMode(Mode mode_) } -Icon SystemTray::stateIcon() const +QIcon SystemTray::stateIcon() const { return stateIcon(state()); } -Icon SystemTray::stateIcon(State state) const +QIcon SystemTray::stateIcon(State state) const { switch (state) { case Passive: @@ -138,7 +137,7 @@ Icon SystemTray::stateIcon(State state) const case NeedsAttention: return _needsAttentionIcon; } - return Icon(); + return QIcon(); }