Only show room leave confirmation dialog if we are actually connected to the room.

This commit is contained in:
Travis Shirk 2006-01-16 03:59:38 +00:00
parent 6b8474299e
commit ded0b38723
1 changed files with 2 additions and 1 deletions

View File

@ -1020,7 +1020,8 @@ class GroupchatControl(ChatControlBase):
else:
excludes = gajim.config.get('noconfirm_close_muc_rooms')
excludes = excludes.split(' ')
if self.room_jid not in excludes:
if gajim.gc_connected[self.account][self.room_jid] and \
self.room_jid not in excludes:
pritext = _('Are you sure you want to leave room "%s"?') % self.name
sectext = _('If you close this window, you will be disconnected '
'from this room.')