Rename bookmark_on_join to synchronise_open_rooms

Also add some more documentation about it.
This commit is contained in:
Emmanuel Gil Peyrot 2020-05-24 16:21:14 +02:00
parent cfa75f8877
commit 3d91223066
5 changed files with 15 additions and 9 deletions

View file

@ -141,8 +141,8 @@ use_bookmarks_method =
#open_all_bookmarks = false #open_all_bookmarks = false
# Will create a bookmark on manual /join, using your preferred # Will create a bookmark on manual /join, using your preferred
# storage method # storage method. Use /leave to remove the bookmark.
#bookmark_on_join = false #synchronise_open_rooms = true
# What will be put after the name, when using autocompletion at the # What will be put after the name, when using autocompletion at the
# beginning of the input. A space will always be added after that # beginning of the input. A space will always be added after that

View file

@ -371,12 +371,18 @@ to understand what is :ref:`carbons <carbons-details>` or
sender intended it as such. See :ref:`Message Correction <correct-feature>` for sender intended it as such. See :ref:`Message Correction <correct-feature>` for
more information. more information.
bookmark_on_join synchronise_open_rooms
**Default value:** ``false`` **Default value:** ``true``
If ``true``, poezio will bookmark automatically every room that is joined with If ``false``, poezio will not store the state of currently open rooms,
a manual ``/join`` command. so that if you leave a room and restart poezio (or start another
client) it will reopen it.
If ``true``, ``/join`` will create a bookmark with ``autojoin=true``,
and ``/leave`` will remove said bookmark.
This was previously named ``bookmark_on_join``.
force_remote_bookmarks force_remote_bookmarks

View file

@ -38,7 +38,6 @@ DEFAULT_CONFIG = {
'autorejoin_delay': '5', 'autorejoin_delay': '5',
'autorejoin': False, 'autorejoin': False,
'beep_on': 'highlight private invite disconnect', 'beep_on': 'highlight private invite disconnect',
'bookmark_on_join': False,
'ca_cert_path': '', 'ca_cert_path': '',
'certificate': '', 'certificate': '',
'certfile': '', 'certfile': '',
@ -133,6 +132,7 @@ DEFAULT_CONFIG = {
'show_useless_separator': True, 'show_useless_separator': True,
'status': '', 'status': '',
'status_message': '', 'status_message': '',
'synchronise_open_rooms': True,
'theme': 'default', 'theme': 'default',
'themes_dir': '', 'themes_dir': '',
'tmp_image_dir': '', 'tmp_image_dir': '',

View file

@ -401,7 +401,7 @@ class CommandCore:
tab.password = password tab.password = password
tab.join() tab.join()
if config.get('bookmark_on_join'): if config.get('synchronise_open_rooms'):
method = 'remote' if config.get( method = 'remote' if config.get(
'use_remote_bookmarks') else 'local' 'use_remote_bookmarks') else 'local'
self._add_bookmark('%s/%s' % (room, nick), True, password, method) self._add_bookmark('%s/%s' % (room, nick), True, password, method)

View file

@ -1489,7 +1489,7 @@ class MucTab(ChatTab):
/leave [msg] /leave [msg]
""" """
self.leave_room(msg) self.leave_room(msg)
if config.get('bookmark_on_join'): if config.get('synchronise_open_rooms'):
self.core.bookmarks.remove(self.jid) self.core.bookmarks.remove(self.jid)
self.core.bookmarks.save(self.core.xmpp) self.core.bookmarks.save(self.core.xmpp)
self.core.close_tab(self) self.core.close_tab(self)