# self.__toplevel.connect("motion-notify-event", self.__motion_notify_event_cb)
self.__toplevel.connect("size-allocate", lambda w, a: self.__check_position())
- self.__orientation = gtk.ORIENTATION_HORIZONTAL
self.__orientation = gtk.ORIENTATION_VERTICAL
+ self.__system_orientation = self.__orientation
self.__preedit_visible = False
self.__aux_string_visible = False
self.__lookup_table_visible = False
self.__lookup_table = lookup_table
self.__refresh_candidates()
self.__refresh_labels()
+ orientation = self.__lookup_table.get_orientation()
+ if orientation in (0, 1):
+ self.set_orientation((gtk.ORIENTATION_HORIZONTAL,
+ gtk.ORIENTATION_VERTICAL)[orientation])
+ else:
+ self.set_orientation(self.__system_orientation)
def show_lookup_table(self):
self.__lookup_table_visible = True
if self.__toplevel.flags() & gtk.VISIBLE:
self.show_all()
+ def set_system_orientation(self, orientation):
+ self.__system_orientation = orientation
+ self.set_orientation(orientation)
+
def get_orientation(self):
return self.__orientation
if value != 0 and value != 1:
value = 0
if value == 0:
- self.__candidate_panel.set_orientation(gtk.ORIENTATION_HORIZONTAL)
+ self.__candidate_panel.set_system_orientation(gtk.ORIENTATION_HORIZONTAL)
else:
- self.__candidate_panel.set_orientation(gtk.ORIENTATION_VERTICAL)
+ self.__candidate_panel.set_system_orientation(gtk.ORIENTATION_VERTICAL)
def __config_load_show(self):
show = self.__config.get_value("panel", "show", 1)