def __init__(self, isconfig=False):
# self.__gobject_init__()
- self.size=0
+ self.size=(0,0)
self.isconfig=isconfig
w=config.iconsize + config.iconspace
- if self.mode=='l':
+ if self.mode=='l' or config.getIndiv():
x2=int(x / w)
y2=int(y / w)
else:
- x2=self.size - int(y/w) - 1
+ x2=self.size[1] - int(y/w) - 1
y2=int(x/w)
ret=self.get(x2,y2)
y2=y * (config.iconsize + config.iconspace)
else:
x2=y * (config.iconsize + config.iconspace)
- y2=(self.size-x-1) * (config.iconsize + config.iconspace)
+ y2=(self.size[1]-x-1) * (config.iconsize + config.iconspace)
# Only repaint the needed icons
rect=gdk.Rectangle(x2, y2, w, w)
launcher.launch(icon.name)
def signalLongpress(self, sender, icon):
- if config.getLongpress():
- self.handle_click(sender, icon)
+ self.handle_click(sender, icon)
def signalClick(self, sender, icon):
if not config.getLongpress():