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 StatusLabel use geticon() instead of getpixmap()

This drops unused set_status(QPixmap) API.

Changeset c22cba4fb2df

Parent 641fed7d4e98

by Yuya Nishihara

Changes to one file · Browse files at c22cba4fb2df Showing diff from parent 641fed7d4e98 Diff from another changeset...

 
541
542
543
544
 
545
546
547
548
549
550
551
552
 
 
 
553
554
 
555
556
557
 
541
542
543
 
544
545
 
 
 
 
 
 
 
546
547
548
549
 
550
551
552
553
@@ -541,17 +541,13 @@
  self.clear_icon()   else:   if isinstance(icon, bool): - pixmap = icon and getpixmap('success') or getpixmap('error') + icon = geticon(icon and 'success' or 'error')   elif isinstance(icon, basestring): - pixmap = getpixmap(icon) - elif isinstance(icon, QIcon): - pixmap = icon.pixmap(16, 16) - elif isinstance(icon, QPixmap): - pixmap = icon - else: - raise TypeError, '%s: bool, str, QIcon or QPixmap' % type(icon) + icon = geticon(icon) + elif not isinstance(icon, QIcon): + raise TypeError, '%s: bool, str or QIcon' % type(icon)   self.status_icon.setShown(True) - self.status_icon.setPixmap(pixmap) + self.status_icon.setPixmap(icon.pixmap(16, 16))     def clear_icon(self):   self.status_icon.setHidden(True)