Fix get_origin calls in Betsy

This commit is contained in:
Clement Lefebvre 2017-04-28 13:02:28 +01:00
parent ee8ae40cd0
commit 0824cdf39d

View File

@ -752,9 +752,13 @@ class MenuWin( object ):
ourHeight = self.mainwin.window.get_size()[1] + self.mainwin.offset
# Get the dimensions/position of the widgetToAlignWith
print(self.applet.get_window().get_origin())
try:
entryX = self.applet.get_window().get_origin().x
entryY = self.applet.get_window().get_origin().y
except:
# In Betsy get_origin returns an unamed tuple so the code above fails
entryX = self.applet.get_window().get_origin()[1]
entryY = self.applet.get_window().get_origin()[2]
entryWidth, entryHeight = self.applet.get_allocation().width, self.applet.get_allocation().height
entryHeight = entryHeight + self.mainwin.offset