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
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):
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 \
(not end)) and kind == 'incoming':
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.show_title()

View File

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

View File

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