Remove some unused code.
authorPeng Huang <shawn.p.huang@gmail.com>
Fri, 1 Jan 2010 10:58:40 +0000 (18:58 +0800)
committerPeng Huang <shawn.p.huang@gmail.com>
Fri, 1 Jan 2010 10:58:40 +0000 (18:58 +0800)
ui/gtk/candidatepanel.py

index 5122a3f..4bde062 100644 (file)
@@ -207,9 +207,6 @@ class CandidatePanel(gtk.VBox):
             gdk.BUTTON_RELEASE_MASK | \
             gdk.BUTTON1_MOTION_MASK)
         self.__begin_move = False
-        # self.__toplevel.connect("button-press-event", self.__button_press_event_cb)
-        # self.__toplevel.connect("button-release-event", self.__button_release_event_cb)
-        # self.__toplevel.connect("motion-notify-event", self.__motion_notify_event_cb)
         self.__toplevel.connect("size-allocate", lambda w, a: self.__check_position())
 
         self.__orientation = ibus.ORIENTATION_VERTICAL
@@ -509,40 +506,6 @@ class CandidatePanel(gtk.VBox):
 
         self.move(x, y)
 
-    def __button_press_event_cb(self, widget, event):
-        if event.button == 1:
-            self.__begin_move = True
-            self.__press_pos = event.x_root, event.y_root
-            self.__toplevel.window.set_cursor(gdk.Cursor(gdk.FLEUR))
-            return True
-
-        if event.button == 3:
-            if self.get_current_orientation() == ibus.ORIENTATION_HORIZONTAL:
-                self.set_current_orientation(ibus.ORIENTATION_VERTICAL)
-            else:
-
-                self.set_current_orientation(ibus.ORIENTATION_HORIZONTAL)
-            return True
-        return False
-
-    def __button_release_event_cb(self, widget, event):
-        if event.button == 1:
-            del self.__press_pos
-            self.__begin_move = False
-            self.__toplevel.window.set_cursor(gdk.Cursor(gdk.LEFT_PTR))
-            return True
-        return False
-
-    def __motion_notify_event_cb(self, widget, event):
-        if self.__begin_move != True:
-            return False
-        x, y = self.__toplevel.get_position()
-        x  = int(x + event.x_root - self.__press_pos[0])
-        y  = int(y + event.y_root - self.__press_pos[1])
-        self.move(x, y)
-        self.__press_pos = event.x_root, event.y_root
-        return True
-
     def show_all(self):
         gtk.VBox.show_all(self)
         self.__toplevel.show_all()