Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 2.0, 2.0.1, and 2.0.2

stable qtlib: make getmenuicon selection at module load time

sys.platform will not change at runtime, so there is no need to check every
time an icon is loaded.

Changeset 96470f7e9e59

Parent 48b039111490

by Steve Borho

Changes to one file · Browse files at 96470f7e9e59 Showing diff from parent 48b039111490 Diff from another changeset...

 
299
300
301
302
303
 
 
 
304
305
 
 
306
307
308
 
299
300
301
 
 
302
303
304
305
 
306
307
308
309
310
@@ -299,10 +299,12 @@
  or QIcon(':/icons/fallback.svg'))   return _iconcache[name]   -def getmenuicon(name): - if sys.platform == 'darwin': +if sys.platform == 'darwin': + # On Mac OS X, we do not want icons on menus + def getmenuicon(name):   return QIcon() - return geticon(name) +else: + getmenuicon = geticon    _pixmapcache = {}