def __config_load_lookup_table_orientation(self):
value = self.__config.get_value("panel", "lookup_table_orientation", 0)
- if value != 0 and value != 1:
- value = 0
- if value == 0:
- self.__candidate_panel.set_orientation(gtk.ORIENTATION_HORIZONTAL)
+ if value in (ibus.ORIENTATION_HORIZONTAL, ibus.ORIENTATION_VERTICAL):
+ orientation = value
else:
- self.__candidate_panel.set_orientation(gtk.ORIENTATION_VERTICAL)
+ orientation = ibus.ORIENTATION_HORIZONTAL
+ self.__candidate_panel.set_orientation(orientation)
def __config_load_show(self):
show = self.__config.get_value("panel", "show", 1)