Skip to content

Commit

Permalink
add missing appmenu service methods
Browse files Browse the repository at this point in the history
probably avoids errors like in issue #9 but does not resolve the issue
  • Loading branch information
jonian committed Nov 29, 2018
1 parent 495bdc5 commit bcf74b8
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions gnomehud/utils/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,23 @@ def __init__(self):
@dbus.service.method(BUS_NAME, in_signature='uo', sender_keyword='sender')

def RegisterWindow(self, windowId, menuObjectPath, sender):
self.window_dict[windowId] = (sender, menuObjectPath)
self.window_dict[windowId] = [dbus.String(sender), dbus.ObjectPath(menuObjectPath)]

@dbus.service.method(BUS_NAME, in_signature='u')

def UnregisterWindow(self, windowId):
del self.window_dict[windowId]

@dbus.service.method(BUS_NAME, in_signature='u', out_signature='so')

def GetMenuForWindow(self, windowId):
if windowId in self.window_dict:
sender, menuObjectPath = self.window_dict[windowId]
return [dbus.String(sender), dbus.ObjectPath(menuObjectPath)]
return self.window_dict[windowId]

@dbus.service.method(BUS_NAME)

def GetMenus(self):
return self.window_dict

@dbus.service.method(BUS_NAME)

Expand Down

0 comments on commit bcf74b8

Please sign in to comment.