[junglecow] Bookmarked groupchat rooms to follow global print_status_in_muc setting
if print_status unspecified by user. Fixes #2641.
This commit is contained in:
parent
fae038075b
commit
57e4c75a83
|
@ -926,11 +926,11 @@ class Connection(ConnectionHandlers):
|
|||
# Only add optional elements if not empty
|
||||
# Note: need to handle both None and '' as empty
|
||||
# thus shouldn't use "is not None"
|
||||
if bm['nick']:
|
||||
if bm.get('nick', None):
|
||||
iq5 = iq4.setTagData('nick', bm['nick'])
|
||||
if bm['password']:
|
||||
if bm.get('password', None):
|
||||
iq5 = iq4.setTagData('password', bm['password'])
|
||||
if bm['print_status']:
|
||||
if bm.get('print_status', None):
|
||||
iq5 = iq4.setTagData('print_status', bm['print_status'])
|
||||
self.connection.send(iq)
|
||||
|
||||
|
|
|
@ -2564,10 +2564,9 @@ class ManageBookmarksWindow:
|
|||
autojoin = helpers.from_xs_boolean_to_python_boolean(
|
||||
bookmark['autojoin'])
|
||||
|
||||
if bookmark.has_key('print_status'):
|
||||
print_status = bookmark['print_status']
|
||||
if not print_status:
|
||||
print_status = gajim.config.get('print_status_in_muc')
|
||||
print_status = bookmark.get('print_status', '')
|
||||
if print_status not in ('', 'all', 'in_and_out', 'none'):
|
||||
print_status = ''
|
||||
self.treestore.append( iter, [
|
||||
account,
|
||||
bookmark['name'],
|
||||
|
@ -2580,7 +2579,7 @@ class ManageBookmarksWindow:
|
|||
self.print_status_combobox = self.xml.get_widget('print_status_combobox')
|
||||
model = gtk.ListStore(str, str)
|
||||
|
||||
self.option_list = {'all': _('All'),
|
||||
self.option_list = {'': _('Default'), 'all': _('All'),
|
||||
'in_and_out': _('Enter and leave only'), 'none': _('None')}
|
||||
opts = self.option_list.keys()
|
||||
opts.sort()
|
||||
|
|
|
@ -874,9 +874,9 @@ class GroupchatControl(ChatControlBase):
|
|||
print_status = None
|
||||
for bookmark in gajim.connections[self.account].bookmarks:
|
||||
if bookmark['jid'] == self.room_jid:
|
||||
print_status = bookmark['print_status']
|
||||
print_status = bookmark.get('print_status', None)
|
||||
break
|
||||
if print_status is None:
|
||||
if not print_status:
|
||||
print_status = gajim.config.get('print_status_in_muc')
|
||||
nick_jid = nick
|
||||
if jid:
|
||||
|
@ -1374,8 +1374,7 @@ class GroupchatControl(ChatControlBase):
|
|||
'jid': self.room_jid,
|
||||
'autojoin': '0',
|
||||
'password': '',
|
||||
'nick': self.nick,
|
||||
'print_status' : gajim.config.get('print_status_in_muc')
|
||||
'nick': self.nick
|
||||
}
|
||||
|
||||
for bookmark in gajim.connections[self.account].bookmarks:
|
||||
|
|
Loading…
Reference in New Issue