def __init__(self):
IconGrid.__init__(self)
HomePluginItem.__init__(self)
- FremantleRotation.__init__(self, 'DrlaunchPlugin')
+ FremantleRotation.__init__(self, 'DrlaunchPlugin',
+ mode=FremantleRotation.AUTOMATIC, dontrotate=True)
self.winConfig=None
self.id=None
self.config=None
+ self.reset_mode()
+
def get_id0(self):
"""If this is called from the constructor then the program
core dumps """
HomePluginItem.do_realize(self)
def on_orientation_changed(self, orientation):
+ # Avoid bugs
+ if orientation==None or len(orientation)==0:
+ return
+
# Get the first character of the string (l/p)
o=orientation[0]
self.setMode(o)
def do_expose_event(self, event):
IconGrid.do_expose_event(self, event)
HomePluginItem.do_expose_event(self, event)
+ self.reset_mode()
def slot_show_settings(self, dt):
if self.winConfig!=None:
config.setIndiv(dt['indiv'])
config.setLongpress(dt['longpress'])
config.setAnimate(dt['animate'])
+ config.setNoBg(dt['nobg'])
+ config.setThemeBg(dt['themebg'])
config.save()
# Resize widget
self.setSize(dt['size'])
self.reloadIcons()
+ # Free memory that is used for animations if animations are disabled
+ if not dt['animate']:
+ self.clearAnimationCache()
+
self.queue_draw()
def handle_click(self, sender, icon):
""" common handler for longpress and click """
if icon.name!=None and icon.name!='':
+ print "name:", icon.name
launcher.launch(icon.name)
def signalLongpress(self, sender, icon):