From 7abacab6a49cff5857ce5fa308375115741a1c49 Mon Sep 17 00:00:00 2001 From: Nikos Kouremenos Date: Sun, 27 Aug 2006 15:42:36 +0000 Subject: [PATCH] fix accidental commit --- src/gajim.py | 27 +++++++++++---------------- src/roster_window.py | 9 ++++++--- src/systray.py | 4 ++-- 3 files changed, 19 insertions(+), 21 deletions(-) diff --git a/src/gajim.py b/src/gajim.py index 8b2fb2101..1e35f83ab 100755 --- a/src/gajim.py +++ b/src/gajim.py @@ -1884,23 +1884,18 @@ class Interface: self.systray_enabled = False self.systray_capabilities = False - if gtk.pygtk_version >= (2, 10, 0) and gtk.gtk_version >= (2, 10, 0): - import statusicon - self.systray = statusicon.StatusIcon() - self.systray_capabilities = True - else: #FIXME: remove the following (and the files) when we migrate to 2.10 - if os.name == 'nt': - try: - import systraywin32 - except: # user doesn't have trayicon capabilities - pass - else: - self.systray_capabilities = True - self.systray = systraywin32.SystrayWin32() + if os.name == 'nt': + try: + import systraywin32 + except: # user doesn't have trayicon capabilities + pass else: - self.systray_capabilities = systray.HAS_SYSTRAY_CAPABILITIES - if self.systray_capabilities: - self.systray = systray.Systray() + self.systray_capabilities = True + self.systray = systraywin32.SystrayWin32() + else: + self.systray_capabilities = systray.HAS_SYSTRAY_CAPABILITIES + if self.systray_capabilities: + self.systray = systray.Systray() if self.systray_capabilities and gajim.config.get('trayicon'): self.show_systray() diff --git a/src/roster_window.py b/src/roster_window.py index e381251f9..0ebea5941 100644 --- a/src/roster_window.py +++ b/src/roster_window.py @@ -655,11 +655,14 @@ class RosterWindow: def on_history_manager_menuitem_activate(self, widget): if os.name == 'nt': if os.path.exists('history_manager.exe'): # user is running stable - helpers.exec_command('history_manager.exe') + os.startfile('history_manager.exe') else: # user is running svn - helpers.exec_command('history_manager.py') + try: + os.startfile('history_manager.py') + except: # user doesn't have pywin32, too bad for him + pass else: # Unix user - helpers.exec_command('python history_manager.py &') + os.system('python history_manager.py &') def get_and_connect_advanced_menuitem_menu(self, account): '''adds FOR ACCOUNT options''' diff --git a/src/systray.py b/src/systray.py index 2599224e0..b7e780919 100644 --- a/src/systray.py +++ b/src/systray.py @@ -2,7 +2,7 @@ ## ## Copyright (C) 2003-2006 Yann Le Boulanger ## Copyright (C) 2003-2004 Vincent Hanquez -## Copyright (C) 2005-2006 Nikos Kouremenos +## Copyright (C) 2005-2006 Nikos Kouremenos ## Copyright (C) 2005 Dimitur Kirov ## Copyright (C) 2005-2006 Travis Shirk ## Copyright (C) 2005 Norman Rasmussen @@ -77,7 +77,7 @@ class Systray: def add_jid(self, jid, account, typ, advanced_notif_num = None): l = [account, jid, typ] - # We can keep several single message because we open them one by one + # We can keep several single message 'cause we open them one by one if not l in self.jids or typ == 'normal': self.jids.append(l) self.set_img(advanced_notif_num)