(no commit message)
[drlaunch] / test.py
diff --git a/test.py b/test.py
index 79e0281..0dabe90 100755 (executable)
--- a/test.py
+++ b/test.py
@@ -27,6 +27,8 @@ from hildondesktop import *
 from gtk import gdk
 import cairo
 
+from portrait import FremantleRotation
+
 class Icons:
     def __init__(self):
        self.mode='l'
@@ -110,10 +112,11 @@ class MyQ(gtk.DrawingArea, Icons):
 #      if self.flags() & gtk.REALIZED:
 #          self.window.move_resize(*allocation)
 
-class TestPlugin(HomePluginItem, Icons):
+class TestPlugin(HomePluginItem, Icons, FremantleRotation):
     def __init__(self):
        HomePluginItem.__init__(self)
        Icons.__init__(self)
+       FremantleRotation.__init__(self, 'TestPlugin')
 
        self.setMode('l')
 
@@ -185,6 +188,9 @@ class TestPlugin(HomePluginItem, Icons):
 
     def do_button_press_event(self, event):
        print "press"
+
+    def do_button_press_event_old(self, event):
+       print "press"
        if event.type==gdk.BUTTON_PRESS:
            print "press", event.type
            if self.mode=='p':
@@ -197,6 +203,12 @@ class TestPlugin(HomePluginItem, Icons):
     def butTest(self, arg):
        print "but", arg
 
+    def on_orientation_changed(self, orientation):
+       print "orch:", orientation
+       o=orientation[0]
+       self.setMode(o)
+       self.queue_draw()
+
 hd_plugin_type = TestPlugin
 
 def do1():