def set_lookup_table_orientation(self, orientation, update_dconf=True):
'''Sets the page size of the lookup table
:param orientation: The orientation of the lookup table
:type mode: integer >= 0 and <= 2
:param update_dconf: Whether to write the change to dconf.
Set this to False if this method is
called because the dconf key changed
to avoid endless loops when the dconf
key is changed twice in a short time.
:type update_dconf: boolean
'''
if DEBUG_LEVEL > 1:
sys.stderr.write(
"set_lookup_table_orientation(%s, update_dconf = %s)\n"
%(orientation, update_dconf))
if orientation == self._lookup_table_orientation:
return
if orientation >= 0 and orientation <= 2:
self._lookup_table_orientation = orientation
self._lookup_table.set_orientation(self._lookup_table_orientation)
self.reset()
if update_dconf:
self._config.set_value(
self._config_section,
'lookuptableorientation',
GLib.Variant.new_int32(orientation))
评论列表
文章目录