Commit 88d9170a authored by David Jarvie's avatar David Jarvie

Fix system tray icon used for "some alarms disabled"

parent 32527543
KAlarm Change Log
=== Version 2.11.13 --- 26 January 2017 ===
+ Fix system tray icon used for "some alarms disabled"
+ Improved system tray icons (requires Plasma 5.9) [KDE Bug 362631]
=== Version 2.11.12 (KDE Applications 16.12.1) --- 1 January 2017 ===
+ Fix Export Alarms file save error [KDE Bug 374337]
+ Fix arrow/page up/down keys not working in date edit control
......
......@@ -24,7 +24,7 @@
#undef QT3_SUPPORT
#define VERSION_SUFFIX "-5"
#define KALARM_VERSION "2.11.12" VERSION_SUFFIX
#define KALARM_VERSION "2.11.13" VERSION_SUFFIX
#define KALARM_NAME "KAlarm"
#define KALARM_DBUS_SERVICE "org.kde.kalarm" // D-Bus service name of KAlarm application
......
/*
* traywindow.cpp - the KDE system tray applet
* Program: kalarm
* Copyright © 2002-2016 by David Jarvie <djarvie@kde.org>
* Copyright © 2002-2017 by David Jarvie <djarvie@kde.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
......@@ -43,7 +43,6 @@
#include <kstandardguiitem.h>
#include <kiconeffect.h>
#include <kconfig.h>
#include <KIconLoader>
#include <KAboutData>
#include <QMenu>
......@@ -80,9 +79,6 @@ TrayWindow::TrayWindow(MainWindow* parent)
setToolTipIconByName(QStringLiteral("kalarm"));
setToolTipTitle(KAboutData::applicationData().displayName());
setIconByName(QStringLiteral("kalarm"));
// Load the disabled icon for use by setIconByPixmap()
// - setIconByName() doesn't work for this one!
mIconDisabled.addPixmap(KIconLoader::global()->loadIcon(QStringLiteral("kalarm-disabled"), KIconLoader::Panel));
setStatus(KStatusNotifierItem::Active);
// Set up the context menu
mActionEnabled = KAlarm::createAlarmEnableAction(this);
......@@ -329,10 +325,9 @@ void TrayWindow::updateToolTip()
*/
void TrayWindow::updateIcon()
{
if (theApp()->alarmsEnabled())
setIconByName(mHaveDisabledAlarms ? QStringLiteral("kalarm-partdisabled") : QStringLiteral("kalarm"));
else
setIconByPixmap(mIconDisabled);
setIconByName(!theApp()->alarmsEnabled() ? QStringLiteral("kalarm-disabled")
: mHaveDisabledAlarms ? QStringLiteral("kalarm-partdisabled")
: QStringLiteral("kalarm"));
}
/******************************************************************************
......
......@@ -67,7 +67,6 @@ class TrayWindow : public KStatusNotifierItem
void updateIcon();
MainWindow* mAssocMainWindow; // main window associated with this, or null
QIcon mIconDisabled;
KToggleAction* mActionEnabled;
NewAlarmAction* mActionNew;
mutable AlarmListModel* mAlarmsModel; // active alarms sorted in time order
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment