def set_auto_commit_characters(self, auto_commit_characters,
update_dconf=True):
'''Sets the auto commit characters
:param auto_commit_characters: The characters which trigger a commit
with an extra space
:type auto_commit_characters: string
: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_auto_commit_characters(%s, update_dconf = %s)\n"
%(auto_commit_characters, update_dconf))
if auto_commit_characters == self._auto_commit_characters:
return
self._auto_commit_characters = auto_commit_characters
if update_dconf:
self._config.set_value(
self._config_section,
'autocommitcharacters',
GLib.Variant.new_string(auto_commit_characters))
评论列表
文章目录