fixes for ticket 128

This commit is contained in:
Nikos Kouremenos 2005-03-28 01:20:47 +00:00
parent 4e9745b77e
commit d80325510b
4 changed files with 11 additions and 6 deletions

View file

@ -678,7 +678,11 @@ class GajimCore:
return list_ev return list_ev
def request_infos(self, account, con, jid): def request_infos(self, account, con, jid):
con.discoverInfo(jid) try: # FIXME: nk 2 yann. is this the best way ?
con.discoverInfo(jid)
except AttributeError:
pass
def read_queue(self): def read_queue(self):
while self.hub.queueIn.empty() == 0: while self.hub.queueIn.empty() == 0:

View file

@ -589,6 +589,7 @@ class Chat:
if ((jid != self.get_active_jid()) or (not self.window.is_active()) or \ if ((jid != self.get_active_jid()) or (not self.window.is_active()) or \
(not end)) and kind == 'incoming': (not end)) and kind == 'incoming':
self.nb_unread[jid] += 1 self.nb_unread[jid] += 1
self.plugin.systray.add_jid(jid, self.account) if self.plugin.systray_enabled:
self.plugin.systray.add_jid(jid, self.account)
self.redraw_tab(jid) self.redraw_tab(jid)
self.show_title() self.show_title()

View file

@ -697,11 +697,11 @@ class plugin:
def show_systray(self): def show_systray(self):
self.systray.show_icon() self.systray.show_icon()
self.systray_visible = 1 self.systray_enabled = True
def hide_systray(self): def hide_systray(self):
self.systray.hide_icon() self.systray.hide_icon()
self.systray_visible = 0 self.systray_enabled = False
def image_is_ok(self, image): def image_is_ok(self, image):
if not os.path.exists(image): if not os.path.exists(image):
@ -899,7 +899,7 @@ class plugin:
self.sleeper = common.sleepy.Sleepy( \ self.sleeper = common.sleepy.Sleepy( \
self.config['autoawaytime']*60, \ self.config['autoawaytime']*60, \
self.config['autoxatime']*60) self.config['autoxatime']*60)
self.systray_visible = 0 self.systray_enabled = False
try: try:
import egg.trayicon as trayicon # use gnomepythonextras trayicon import egg.trayicon as trayicon # use gnomepythonextras trayicon
except: except:

View file

@ -934,7 +934,7 @@ class Roster_window:
def on_roster_window_delete_event(self, widget, event): def on_roster_window_delete_event(self, widget, event):
"""When we want to close the window""" """When we want to close the window"""
if self.plugin.systray_visible: if self.plugin.systray_enabled:
self.window.hide() self.window.hide()
else: else:
accounts = self.plugin.accounts.keys() accounts = self.plugin.accounts.keys()