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

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.

parent 5f8ba395
......@@ -287,3 +287,8 @@ Comment[x-test]=xxA requested cover has failed to downloadxx
Name=JuK running in dock mode
Comment=Use context menu in system tray to restore.
......@@ -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)) {
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();
Supports Markdown
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