Removing dependency on libnotify

Bug #577655 reported by Erion
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
rhythmbox-record-station
Fix Released
Low
Unassigned

Bug Description

Hi and thanks for a great job!!

Since Lucid does not install libnotify-bin by default, I made a change to the code so it does not depend on libnotify anymore, and it doesn't have to call the OS.

The function that replaces notify-send is as follows:
##***************************
import dbus
def notify(icon, title, text):
    bus=dbus.SessionBus()
    busobject=bus.get_object("org.freedesktop.Notifications", "/org/freedesktop/Notifications")
    args = ["rb-record-station", 0, icon, title, text, [], {"urgency":0}, 10]
    method = busobject.get_dbus_method("Notify", "org.freedesktop.Notifications")
    retval=method(*args)
    return retval
##****************************

The inspiration for the code came from this tool
http://code.google.com/p/dbus-tools/wiki/DBusCli

I'm submitting a patch with calls to os.system replaced by a call to the new function. Hope you find it useful!

Have a nice day!
Erion.

Revision history for this message
Erion (f-launchpad-net-erion-info) wrote :
Revision history for this message
scrawl (scrawl-deactivatedaccount) wrote :

Thanks for the patch, I've checked it into bzr. It will be included in the next release.

Changed in rb-record-station:
status: New → Fix Committed
assignee: nobody → scrawl (scrawl)
importance: Undecided → Low
milestone: none → 1.4
Changed in rb-record-station:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.