Avoid problems with orientation
authorStefanos Harhalakis <v13@v13.gr>
Fri, 14 Jan 2011 00:16:28 +0000 (00:16 +0000)
committerStefanos Harhalakis <v13@v13.gr>
Fri, 14 Jan 2011 00:16:28 +0000 (00:16 +0000)
src/widget.py

index 1918367..11e4cf9 100755 (executable)
@@ -129,6 +129,10 @@ class DrlaunchPlugin(IconGrid, HomePluginItem, FremantleRotation):
        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)