Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 61e5fc8d authored by Shubham Chaudhary's avatar Shubham Chaudhary Committed by Michael Pyne

Notify the user that JuK is docked on startup.

We show a simple notification if the user starts up JuK and it is set to
dock in the systray on startup (as otherwise the user may wonder why it
didn't open up). Although a "Do not show again" checkbox is not possible
with KNotification, it is possible to remove this additional
notification by going to "Application and System Notifications" in
System Settings to manage "Juk music player" application notifications.

We do *not* show a notification if a session is being restored to avoid
noise, however JuK will show the main window if the user tries to start
it up again after it's already running, so this should be OK.

Thanks to Shubham Chaudhary for the bugfix (you're been marked as the
patch author), and Michael for reporting the bug.

This bugfix adds new strings so it cannot be backported. It will show up
first in KDE SC 4.12.

BUG:316832
FIXED-IN:4.12
GUI:
parent 5f8ba395
......@@ -287,3 +287,8 @@ Comment[x-test]=xxA requested cover has failed to downloadxx
Comment[zh_CN]=请求的封面下载失败
Comment[zh_TW]=要求的封面無法成功下載
Action=Popup
[Event/dock_mode]
Name=JuK running in dock mode
Comment=Use context menu in system tray to restore.
Action=Popup
......@@ -21,6 +21,7 @@
#include <klocale.h>
#include <kglobal.h>
#include <kconfiggroup.h>
#include <knotification.h>
#include "juk.h"
......@@ -98,8 +99,13 @@ int main(int argc, char *argv[])
juk->restore(1, false /* don't show */);
KConfigGroup config(KGlobal::config(), "Settings");
if(!config.readEntry("StartDocked", false))
if(!config.readEntry("StartDocked", false)) {
juk->show();
}
else if(!a.isSessionRestored()) {
QString message = i18n("JuK running in docked mode\nUse context menu in system tray to restore.");
KNotification::event("dock_mode","JuK Docked", message);
}
return a.exec();
}
......
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