Closed emorrp1 closed 15 years ago
this is possible with pynotify. it should be usable on all linux platforms. when should such a notification show up? only when uploading large files? or everytime, depending on a new mintUpload configuration?:
import pynotify
def callback_function(notification=None, action=None, data=None):
print "It worked!"
pynotify.init( "Some Application or Title" )
n = pynotify.Notification("Title", "body", "dialog-warning")
n.set_urgency(pynotify.URGENCY_NORMAL)
n.set_timeout(pynotify.EXPIRES_NEVER)
n.add_action("clicked","Button text", callback_function, None)
n.show()
I would say that it should definitely be possible to turn the notifications off, as some people really hate them. Also bear in mind that the jaunty notification system is just that, with no actions, which is ok just to say upload finished. Also not sure about the expires never part. As for when it shows, I'd go for a configurable minimum filesize, such that a setting of 0 would be every upload. There might also be other things we want to "notify" about, but I can't think of any at the moment.
Oooh, one thought, can we implement it using a custom notification class please, like with the custom error class, in such a way that we just need to call something like Notify(message) to do it all. I suppose actually this could just be a notify(message) function rather than class, at least until we do something more useful.
i just copied the code from a tutorial to have some sort of reference to plan the actual implementation ;) your points are absolute correct.
maybe its time for some sort of review notification system? we have a progressbar, statusbar and noficications.... hm... maybe later
I don't think it's too bad, the progressbar isn't really notification, everything should go to statusbar, and a few things past a certain "visibility threshold" would be real notifications.
just wondering if it would be better to just use notify-send, as that's what mintInstall uses?
i really dont know. what does notify-send do?
try it (terminal): notify-send -i /usr/lib/linuxmint/mintSystem/icon.png "Heading" "Message"
Fix Committed, grossly simplified, ready for release v3.6
Perhaps provide an upload finished notification for large uploads.