remove unneeded commented line
This commit is contained in:
parent
0408a86d7b
commit
f9a26dce55
|
@ -1118,6 +1118,8 @@ class Account_modification_window:
|
||||||
self.plugin.windows[name] = self.plugin.windows[self.account]
|
self.plugin.windows[name] = self.plugin.windows[self.account]
|
||||||
self.plugin.queues[name] = self.plugin.queues[self.account]
|
self.plugin.queues[name] = self.plugin.queues[self.account]
|
||||||
self.plugin.nicks[name] = self.plugin.nicks[self.account]
|
self.plugin.nicks[name] = self.plugin.nicks[self.account]
|
||||||
|
self.plugin.allow_notifications[name] = \
|
||||||
|
self.plugin.allow_notifications[self.account]
|
||||||
self.plugin.roster.groups[name] = \
|
self.plugin.roster.groups[name] = \
|
||||||
self.plugin.roster.groups[self.account]
|
self.plugin.roster.groups[self.account]
|
||||||
self.plugin.roster.contacts[name] = \
|
self.plugin.roster.contacts[name] = \
|
||||||
|
@ -1139,6 +1141,7 @@ class Account_modification_window:
|
||||||
del self.plugin.windows[self.account]
|
del self.plugin.windows[self.account]
|
||||||
del self.plugin.queues[self.account]
|
del self.plugin.queues[self.account]
|
||||||
del self.plugin.nicks[self.account]
|
del self.plugin.nicks[self.account]
|
||||||
|
del self.plugin.allow_notifications[self.account]
|
||||||
del self.plugin.roster.groups[self.account]
|
del self.plugin.roster.groups[self.account]
|
||||||
del self.plugin.roster.contacts[self.account]
|
del self.plugin.roster.contacts[self.account]
|
||||||
del self.plugin.sleeper_state[self.account]
|
del self.plugin.sleeper_state[self.account]
|
||||||
|
@ -1187,6 +1190,7 @@ class Account_modification_window:
|
||||||
self.plugin.roster.newly_added[name] = []
|
self.plugin.roster.newly_added[name] = []
|
||||||
self.plugin.roster.to_be_removed[name] = []
|
self.plugin.roster.to_be_removed[name] = []
|
||||||
self.plugin.nicks[name] = config['name']
|
self.plugin.nicks[name] = config['name']
|
||||||
|
self.plugin.allow_notifications[name] = False
|
||||||
self.plugin.sleeper_state[name] = 0
|
self.plugin.sleeper_state[name] = 0
|
||||||
#refresh accounts window
|
#refresh accounts window
|
||||||
if self.plugin.windows.has_key('accounts'):
|
if self.plugin.windows.has_key('accounts'):
|
||||||
|
@ -2011,6 +2015,8 @@ class Remove_account_window:
|
||||||
self.plugin.save_config()
|
self.plugin.save_config()
|
||||||
del self.plugin.windows[self.account]
|
del self.plugin.windows[self.account]
|
||||||
del self.plugin.queues[self.account]
|
del self.plugin.queues[self.account]
|
||||||
|
del self.plugin.nicks[self.account]
|
||||||
|
del self.plugin.allow_notifications[self.account]
|
||||||
del self.plugin.roster.groups[self.account]
|
del self.plugin.roster.groups[self.account]
|
||||||
del self.plugin.roster.contacts[self.account]
|
del self.plugin.roster.contacts[self.account]
|
||||||
del self.plugin.roster.to_be_removed[self.account]
|
del self.plugin.roster.to_be_removed[self.account]
|
||||||
|
|
11
src/gajim.py
11
src/gajim.py
|
@ -154,8 +154,13 @@ class Interface:
|
||||||
self.windows[account]['gc'][jid_from].print_conversation(
|
self.windows[account]['gc'][jid_from].print_conversation(
|
||||||
'Error %s: %s' % (array[2], array[1]), jid_from)
|
'Error %s: %s' % (array[2], array[1]), jid_from)
|
||||||
|
|
||||||
|
def allow_notif(self, account):
|
||||||
|
self.allow_notifications[account] = True
|
||||||
|
|
||||||
def handle_event_status(self, account, status): # OUR status
|
def handle_event_status(self, account, status): # OUR status
|
||||||
#('STATUS', account, status)
|
#('STATUS', account, status)
|
||||||
|
if status != 'offline':
|
||||||
|
gobject.timeout_add(30000, self.allow_notif, account)
|
||||||
self.roster.on_status_changed(account, status)
|
self.roster.on_status_changed(account, status)
|
||||||
|
|
||||||
def handle_event_notify(self, account, array):
|
def handle_event_notify(self, account, array):
|
||||||
|
@ -237,7 +242,8 @@ class Interface:
|
||||||
self.play_sound('contact_connected')
|
self.play_sound('contact_connected')
|
||||||
if not self.windows[account]['chats'].has_key(jid) and \
|
if not self.windows[account]['chats'].has_key(jid) and \
|
||||||
not self.queues[account].has_key(jid) and \
|
not self.queues[account].has_key(jid) and \
|
||||||
gajim.config.get('notify_on_online'):
|
gajim.config.get('notify_on_online') and \
|
||||||
|
self.allow_notifications[account]:
|
||||||
show_notification = False
|
show_notification = False
|
||||||
# check OUR status and if we allow notifications for that status
|
# check OUR status and if we allow notifications for that status
|
||||||
if gajim.config.get('autopopupaway'): # always notify
|
if gajim.config.get('autopopupaway'): # always notify
|
||||||
|
@ -389,6 +395,7 @@ class Interface:
|
||||||
self.queues[name] = {}
|
self.queues[name] = {}
|
||||||
gajim.connections[name].connected = 0
|
gajim.connections[name].connected = 0
|
||||||
self.nicks[name] = array[1]['name']
|
self.nicks[name] = array[1]['name']
|
||||||
|
self.allow_notifications[name] = False
|
||||||
self.roster.groups[name] = {}
|
self.roster.groups[name] = {}
|
||||||
self.roster.contacts[name] = {}
|
self.roster.contacts[name] = {}
|
||||||
self.roster.newly_added[name] = []
|
self.roster.newly_added[name] = []
|
||||||
|
@ -666,11 +673,13 @@ class Interface:
|
||||||
self.windows = {'logs':{}}
|
self.windows = {'logs':{}}
|
||||||
self.queues = {}
|
self.queues = {}
|
||||||
self.nicks = {}
|
self.nicks = {}
|
||||||
|
self.allow_notifications = {}
|
||||||
self.sleeper_state = {} #whether we pass auto away / xa or not
|
self.sleeper_state = {} #whether we pass auto away / xa or not
|
||||||
for a in gajim.connections:
|
for a in gajim.connections:
|
||||||
self.windows[a] = {'infos': {}, 'chats': {}, 'gc': {}, 'gc_config': {}}
|
self.windows[a] = {'infos': {}, 'chats': {}, 'gc': {}, 'gc_config': {}}
|
||||||
self.queues[a] = {}
|
self.queues[a] = {}
|
||||||
self.nicks[a] = gajim.config.get_per('accounts', a, 'name')
|
self.nicks[a] = gajim.config.get_per('accounts', a, 'name')
|
||||||
|
self.allow_notifications[a] = False
|
||||||
self.sleeper_state[a] = 0 #0:don't use sleeper for this account
|
self.sleeper_state[a] = 0 #0:don't use sleeper for this account
|
||||||
#1:online and use sleeper
|
#1:online and use sleeper
|
||||||
#2:autoaway and use sleeper
|
#2:autoaway and use sleeper
|
||||||
|
|
|
@ -740,7 +740,6 @@ class Roster_window:
|
||||||
accountIter = self.get_account_iter(account)
|
accountIter = self.get_account_iter(account)
|
||||||
if accountIter:
|
if accountIter:
|
||||||
model.set_value(accountIter, 0, self.jabber_state_images['connecting'])
|
model.set_value(accountIter, 0, self.jabber_state_images['connecting'])
|
||||||
# gajim.connections[account].connected = 1
|
|
||||||
if self.plugin.systray_enabled:
|
if self.plugin.systray_enabled:
|
||||||
self.plugin.systray.set_status('connecting')
|
self.plugin.systray.set_status('connecting')
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue