Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 1.9, 1.9.1, and 1.9.2

qtlib: support icon name in StatusLabel widget

Changeset efe6bbf2d255

Parent f3832cb8f56a

by Yuki KODAMA

Changes to one file · Browse files at efe6bbf2d255 Showing diff from parent f3832cb8f56a Diff from another changeset...

 
368
369
370
 
 
371
372
373
374
375
376
 
377
378
379
 
368
369
370
371
372
373
374
375
376
377
 
378
379
380
381
@@ -368,12 +368,14 @@
  else:   if isinstance(icon, bool):   pixmap = icon and getpixmap('success') or getpixmap('error') + elif isinstance(icon, basestring): + pixmap = getpixmap(icon)   elif isinstance(icon, QtGui.QIcon):   pixmap = icon.pixmap(16, 16)   elif isinstance(icon, QtGui.QPixmap):   pixmap = icon   else: - raise TypeError, '%s: bool, QIcon or QPixmap' % type(icon) + raise TypeError, '%s: bool, str, QIcon or QPixmap' % type(icon)   self.status_icon.setShown(True)   self.status_icon.setPixmap(pixmap)