Some days Dragon Master Ian aka eean asked me to have a look at integrating Dragon Player into the New Device Notifier thingy. While I was pretty sure it’s not meant for actual use yet (didn’t seem like it afterwards either :P) I jumped into it and came up with dragonplayer-opendvd.desktop.
The magic behind that stuff is that one actually can define very clearly when the desktop file should apply (using information provided by Solid).
X-KDE-Solid-Predicate=[[ StorageVolume.ignored == false AND OpticalDisc.availableContent == ‘Data|VideoDvd’ ] OR [ StorageVolume.ignored == false AND OpticalDisc.availableContent == ‘Data|VideoDvd’ ]]
Meaning unless the volume is set to be ignored somewhere from something and if it is an optical disc providing video dvd data this cool application can launch it.
The line above might seem a bit strange … actually it is … apparently whatever is parsing that desktop file (some solid dataengine I guess) doesn’t like 2 ANDs or no AND or no OR => simply put: x = ? AND y = ? OR x = ? AND z = ?
No more and no less than that😉
Also I think the new device notifier needs some changes to increase understandibility:
The usual action is ‘Open with ApplicationName’ (e.g. Open with Dolphin), in my opinion an approach like in KickOff would be much better => use the generic name and only provide the application name as minor information. As a new user I might not know what Dolphin or Dragon Player is and what it does (ok, for Dragon it’s pretty obvious😉 so using ‘Open with File Manager’ and ‘Open with Video Player’ seems much more reasonable to me.
Anyway, get the new dragonplayer and check out the new device notifier integration🙂