The menu_pressed method need some work. Now it will throw a exception in too many cases and if it fails it might not use the right application.
I think it is better to use:
if uri.endswith(".desktop"):
try:
appinfo = gio.unix.DesktopAppInfo(uri)
if appinfo: appinfo.launch(self.ids[menu_id]])
except ...
The menu_pressed method need some work. Now it will throw a exception in too many cases and if it fails it might not use the right application.
I think it is better to use:
if uri.endswith( ".desktop" ): DesktopAppInfo( uri)
appinfo. launch( self.ids[ menu_id] ])
try:
appinfo = gio.unix.
if appinfo:
except ...