Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 0.8, 0.8.1, and 0.8.2

taskbar: workarounds for py2exe packaging

importing win32ui crashes hard. We were only using it for a warning message, so
I just removed it. Also made the icon load fail gracefully if the file is not
found.

Changeset 92af0a06cf0e

Parent 516c35f8da25

by Steve Borho

Changes to one file · Browse files at 92af0a06cf0e Showing diff from parent 516c35f8da25 Diff from another changeset...

Change 1 of 3 Show Entire File taskbar.py Stacked
 
10
11
12
13
 
14
15
16
 
56
57
58
59
 
60
61
62
 
104
105
106
107
108
 
109
110
111
 
10
11
12
 
13
14
15
16
 
56
57
58
 
59
60
61
62
 
104
105
106
 
 
107
108
109
110
@@ -10,7 +10,7 @@
   from win32api import *  from win32gui import * -import win32ui +  import win32pipe  import win32con  import win32event @@ -56,7 +56,7 @@
  hinst = GetModuleHandle(None)   from thgutil.paths import get_tortoise_icon   iconPathName = get_tortoise_icon("hg.ico") - if os.path.isfile(iconPathName): + if iconPathName and os.path.isfile(iconPathName):   icon_flags = win32con.LR_LOADFROMFILE | win32con.LR_DEFAULTSIZE   hicon = LoadImage(hinst, iconPathName, win32con.IMAGE_ICON, 0, 0, icon_flags)   else: @@ -104,8 +104,7 @@
  if not self.guithread or not self.guithread.isAlive():   self.launchgui()   else: - msg = "TortoiseHG options dialog already running" - win32ui.MessageBox(msg, 'TortoiseHG options...', win32con.MB_OK) + print "TortoiseHG options dialog already running"   elif id == 1025:   self.exit_application()   else: