Version: 2.3.0 (using KDE 4.4.2)
As a script developer I'd like API access to KNotify through the Script API.
Current hack implementations do:
pass to a python script which uses DBus - http://kde-apps.org/content/show.php/amaroKnotify?content=103197
use "notify-send" with QProcess - https://github.com/whoward/amarok-collection_rating/blob/master/collection-ratings/classes/notifications.js
These techniques work on most systems but are brittle because:
1/ they rely on python being installed
2/ they rely on having permission to chmod +x the python script
1/ they require libnotify-bin to be installed
1/ Will likely not function cross platform (i.e. Windows)
Reproducible: Didn't try
Steps to Reproduce:
1/ Bind a notify function to the Amarok global so we can call:
Amarok.knotify("some title", "some body")
2/ Bind access to dbus? not sure if this will work - i dont know much about dbus
3/ other options?
William, could you please update to Amarok 2.3.2? Your version is quite a bit old already.
@Myriam: Version does not matter here, this feature is still missing.
@William: Will have a look at this feature request after release.
Git commit 83533cb9720d0545e26cc01492fed2e98994ea75 by Kevin Funk.
Committed on 06/06/2011 at 01:48.
Pushed by kfunk into branch 'master'.
Add scripting interface for KNotify
Currently supports two methods:
* show(titleStr, bodyStr[, pixmap]);
M +1 -0 ChangeLog
M +1 -0 src/CMakeLists.txt
M +17 -3 src/KNotificationBackend.cpp
M +3 -2 src/KNotificationBackend.h
M +2 -0 src/ScriptManager.cpp
A +68 -0 src/scriptengine/AmarokKNotifyScript.cpp [License: GPL (v2+)]
A +49 -0 src/scriptengine/AmarokKNotifyScript.h [License: GPL (v2+)]