Comment 13 for bug 335197

Revision history for this message
Bram Bonné (brambonne) wrote :

I edited notifier.py here to do just that, but I've only been able to test it on systems with the new notification system (so I don't guarantuee that it will work on systems that DO support actions, although it should).
I wasn't able to find the original file to create a patch, so here is the code that should be inserted instead of

> if buttons:
> actions = ["openbrowser", _("Go to Gmail Account"),\
> "mailreader", _("Open mail reader")]

this is the replacement:

> # Check if the notification system supports actions
> capabilitiesMethod = self.notif.get_dbus_method("GetCapabilities")
> capabilities = capabilitiesMethod()
> actionsSupport = "actions" in capabilities
>
> if buttons and actionsSupport:
> actions = ["openbrowser", _("Go to Gmail Account"),\
> "mailreader", _("Open mail reader")]