do not autojoin bookmarks if you are invisible
This commit is contained in:
parent
c0ece2bf42
commit
0901a6db53
|
@ -774,8 +774,11 @@ class Interface:
|
|||
# Auto join GC windows if neccessary
|
||||
for bm in bms:
|
||||
if bm['autojoin'] in ('1', 'true'):
|
||||
self.roster.join_gc_room(account, bm['jid'], bm['nick'],
|
||||
bm['password'])
|
||||
invisible_show = gajim.SHOW_LIST.index('invisible')
|
||||
# do not autojoin if we are invisible
|
||||
if gajim.connections[account].connected != invisible_show:
|
||||
self.roster.join_gc_room(account, bm['jid'], bm['nick'],
|
||||
bm['password'])
|
||||
for account in gajim.connections:
|
||||
for room_jid in self.instances[account]['gc']:
|
||||
if room_jid == 'tabbed':
|
||||
|
|
|
@ -278,6 +278,8 @@ class RosterWindow:
|
|||
model[iter][C_SECPIXBUF] = scaled_pixbuf
|
||||
|
||||
def join_gc_room(self, account, room_jid, nick, password):
|
||||
'''joins the room immediatelly'''
|
||||
print 'JOIN_GC_ROOM'
|
||||
if room_jid in gajim.interface.instances[account]['gc'] and \
|
||||
gajim.gc_connected[account][room_jid]:
|
||||
dialogs.ErrorDialog(_('You are already in room %s') % room_jid
|
||||
|
@ -1738,6 +1740,7 @@ _('If "%s" accepts this request you will know his or her status.') %jid)
|
|||
dialogs.AddNewContactWindow(account)
|
||||
|
||||
def on_join_gc_activate(self, widget, account):
|
||||
'''when the join gc menuitem is clicked, show the join gc window'''
|
||||
invisible_show = gajim.SHOW_LIST.index('invisible')
|
||||
if gajim.connections[account].connected == invisible_show:
|
||||
dialogs.ErrorDialog(_('You cannot join a room while you are invisible')
|
||||
|
@ -2599,7 +2602,6 @@ _('If "%s" accepts this request you will know his or her status.') %jid)
|
|||
col.add_attribute(render_text, 'editable', C_EDITABLE) # where we hold if the row is editable
|
||||
col.set_cell_data_func(render_text, self.nameCellDataFunc, None)
|
||||
|
||||
|
||||
render_pixbuf = gtk.CellRendererPixbuf() # tls or avatar img
|
||||
col.pack_start(render_pixbuf, expand = False)
|
||||
col.add_attribute(render_pixbuf, 'pixbuf', C_SECPIXBUF)
|
||||
|
|
Loading…
Reference in New Issue