/***************************************************************************
-* 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 <QIcon>
+#include <QImage>
+
#include <qindicateserver.h>
#include <qindicateindicator.h>
#include "client.h"
#include "clientsettings.h"
-#include "iconloader.h"
#include "mainwin.h"
#include "networkmodel.h"
#include "qtui.h"
QModelIndex index = Client::networkModel()->bufferIndex(bufferId);
QVariant icon = QtUi::style()->bufferViewItemData(index, Qt::DecorationRole);
- if (icon.canConvert<QPixmap>()) {
- QImage image = icon.value<QPixmap>().toImage();
+ if (icon.canConvert<QIcon>()) {
+ QImage image = icon.value<QIcon>().pixmap(16).toImage();
indicator->setIconProperty(image);
}
{
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(QIcon::fromTheme("mail-message-new"));
connect(ui.enabled, SIGNAL(toggled(bool)), SLOT(widgetChanged()));
}