add some comments
This commit is contained in:
parent
381fe7a889
commit
07644a2a40
|
@ -51,8 +51,8 @@ class SystrayWINAPI:
|
||||||
self.notify_icon = None
|
self.notify_icon = None
|
||||||
|
|
||||||
# Sublass the window and inject a WNDPROC to process messages.
|
# Sublass the window and inject a WNDPROC to process messages.
|
||||||
self._oldwndproc = win32gui.SetWindowLong(self._hwnd, win32con.GWL_WNDPROC,
|
self._oldwndproc = win32gui.SetWindowLong(self._hwnd,
|
||||||
self._wndproc)
|
win32con.GWL_WNDPROC, self._wndproc)
|
||||||
|
|
||||||
|
|
||||||
def add_notify_icon(self, menu, hicon=None, tooltip=None):
|
def add_notify_icon(self, menu, hicon=None, tooltip=None):
|
||||||
|
@ -225,16 +225,10 @@ class SystrayWin32(systray.Systray):
|
||||||
|
|
||||||
# self.tray_ico_imgs = self.load_icos()
|
# self.tray_ico_imgs = self.load_icos()
|
||||||
|
|
||||||
#gajim.interface.roster.window.realize()
|
|
||||||
#gajim.interface.roster.window.show_all()
|
|
||||||
w = gtk.Window() # just a window to pass
|
w = gtk.Window() # just a window to pass
|
||||||
w.realize() # realize it so gtk window exists
|
w.realize() # realize it so gtk window exists
|
||||||
self.systray_winapi = SystrayWINAPI(w)
|
self.systray_winapi = SystrayWINAPI(w)
|
||||||
|
|
||||||
# this fails if you move the window
|
|
||||||
#self.systray_winapi = SystrayWINAPI(gajim.interface.roster.window)
|
|
||||||
|
|
||||||
|
|
||||||
self.xml.signal_autoconnect(self)
|
self.xml.signal_autoconnect(self)
|
||||||
|
|
||||||
# Set up the callback messages
|
# Set up the callback messages
|
||||||
|
@ -329,7 +323,7 @@ class SystrayWin32(systray.Systray):
|
||||||
states_list.append('message')
|
states_list.append('message')
|
||||||
for state in states_list:
|
for state in states_list:
|
||||||
path_to_ico = os.path.join(path, state + '.ico')
|
path_to_ico = os.path.join(path, state + '.ico')
|
||||||
if not os.path.isfile(path_to_ico):
|
if not os.path.isfile(path_to_ico): # fallback to sun iconset
|
||||||
path_to_ico = os.path.join(path_sun_iconset, state + '.ico')
|
path_to_ico = os.path.join(path_sun_iconset, state + '.ico')
|
||||||
if os.path.exists(path_to_ico):
|
if os.path.exists(path_to_ico):
|
||||||
hinst = win32gui.GetModuleHandle(None)
|
hinst = win32gui.GetModuleHandle(None)
|
||||||
|
|
Loading…
Reference in New Issue