X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Findicatornotificationbackend.cpp;h=15e765b4dd67d0802e52649a2401d17ad95488d2;hp=59c20b8d3b655be449e22db1cfc28b9295fdc06f;hb=b7447afe8e836376776dac26704e227a678d2913;hpb=694f9bfbf7f1af19108461c7e00d133e55082bce diff --git a/src/qtui/indicatornotificationbackend.cpp b/src/qtui/indicatornotificationbackend.cpp index 59c20b8d..15e765b4 100644 --- a/src/qtui/indicatornotificationbackend.cpp +++ b/src/qtui/indicatornotificationbackend.cpp @@ -1,31 +1,34 @@ /*************************************************************************** -* Copyright (C) 2005-09 Canonical Ltd * -* author: aurelien.gateau@canonical.com * -* * -* 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 program is distributed in the hope that it will be useful, * -* but WITHOUT ANY WARRANTY; without even the implied warranty of * -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -* GNU General Public License for more details. * -* * -* You should have received a copy of the GNU General Public License * -* along with this program; if not, write to the * -* Free Software Foundation, Inc., * -* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * -***************************************************************************/ + * Copyright (C) 2005-09 Canonical Ltd * + * author: aurelien.gateau@canonical.com * + * * + * 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 program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * + ***************************************************************************/ #include "indicatornotificationbackend.h" +#include +#include + #include #include #include "client.h" #include "clientsettings.h" -#include "iconloader.h" +#include "icon" #include "mainwin.h" #include "networkmodel.h" #include "qtui.h" @@ -108,8 +111,8 @@ void IndicatorNotificationBackend::notify(const Notification ¬ification) QModelIndex index = Client::networkModel()->bufferIndex(bufferId); QVariant icon = QtUi::style()->bufferViewItemData(index, Qt::DecorationRole); - if (icon.canConvert()) { - QImage image = icon.value().toImage(); + if (icon.canConvert()) { + QImage image = icon.value().pixmap(16).toImage(); indicator->setIconProperty(image); } @@ -175,7 +178,7 @@ IndicatorNotificationBackend::ConfigWidget::ConfigWidget(QWidget *parent) { ui.setupUi(this); // FIXME find proper icon (this one is used by the plasmoid as well) - ui.enabled->setIcon(SmallIcon("mail-message-new")); + ui.enabled->setIcon(icon::get("mail-message-new")); connect(ui.enabled, SIGNAL(toggled(bool)), SLOT(widgetChanged())); }