[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
|
# Only add optional elements if not empty
|
||||||
# Note: need to handle both None and '' as empty
|
# Note: need to handle both None and '' as empty
|
||||||
# thus shouldn't use "is not None"
|
# thus shouldn't use "is not None"
|
||||||
if bm['nick']:
|
if bm.get('nick', None):
|
||||||
iq5 = iq4.setTagData('nick', bm['nick'])
|
iq5 = iq4.setTagData('nick', bm['nick'])
|
||||||
if bm['password']:
|
if bm.get('password', None):
|
||||||
iq5 = iq4.setTagData('password', bm['password'])
|
iq5 = iq4.setTagData('password', bm['password'])
|
||||||
if bm['print_status']:
|
if bm.get('print_status', None):
|
||||||
iq5 = iq4.setTagData('print_status', bm['print_status'])
|
iq5 = iq4.setTagData('print_status', bm['print_status'])
|
||||||
self.connection.send(iq)
|
self.connection.send(iq)
|
||||||
|
|
||||||
|
|
|
@ -2564,10 +2564,9 @@ class ManageBookmarksWindow:
|
||||||
autojoin = helpers.from_xs_boolean_to_python_boolean(
|
autojoin = helpers.from_xs_boolean_to_python_boolean(
|
||||||
bookmark['autojoin'])
|
bookmark['autojoin'])
|
||||||
|
|
||||||
if bookmark.has_key('print_status'):
|
print_status = bookmark.get('print_status', '')
|
||||||
print_status = bookmark['print_status']
|
if print_status not in ('', 'all', 'in_and_out', 'none'):
|
||||||
if not print_status:
|
print_status = ''
|
||||||
print_status = gajim.config.get('print_status_in_muc')
|
|
||||||
self.treestore.append( iter, [
|
self.treestore.append( iter, [
|
||||||
account,
|
account,
|
||||||
bookmark['name'],
|
bookmark['name'],
|
||||||
|
@ -2580,7 +2579,7 @@ class ManageBookmarksWindow:
|
||||||
self.print_status_combobox = self.xml.get_widget('print_status_combobox')
|
self.print_status_combobox = self.xml.get_widget('print_status_combobox')
|
||||||
model = gtk.ListStore(str, str)
|
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')}
|
'in_and_out': _('Enter and leave only'), 'none': _('None')}
|
||||||
opts = self.option_list.keys()
|
opts = self.option_list.keys()
|
||||||
opts.sort()
|
opts.sort()
|
||||||
|
|
|
@ -874,9 +874,9 @@ class GroupchatControl(ChatControlBase):
|
||||||
print_status = None
|
print_status = None
|
||||||
for bookmark in gajim.connections[self.account].bookmarks:
|
for bookmark in gajim.connections[self.account].bookmarks:
|
||||||
if bookmark['jid'] == self.room_jid:
|
if bookmark['jid'] == self.room_jid:
|
||||||
print_status = bookmark['print_status']
|
print_status = bookmark.get('print_status', None)
|
||||||
break
|
break
|
||||||
if print_status is None:
|
if not print_status:
|
||||||
print_status = gajim.config.get('print_status_in_muc')
|
print_status = gajim.config.get('print_status_in_muc')
|
||||||
nick_jid = nick
|
nick_jid = nick
|
||||||
if jid:
|
if jid:
|
||||||
|
@ -1374,8 +1374,7 @@ class GroupchatControl(ChatControlBase):
|
||||||
'jid': self.room_jid,
|
'jid': self.room_jid,
|
||||||
'autojoin': '0',
|
'autojoin': '0',
|
||||||
'password': '',
|
'password': '',
|
||||||
'nick': self.nick,
|
'nick': self.nick
|
||||||
'print_status' : gajim.config.get('print_status_in_muc')
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for bookmark in gajim.connections[self.account].bookmarks:
|
for bookmark in gajim.connections[self.account].bookmarks:
|
||||||
|
|
Loading…
Reference in New Issue