Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
[Plugin installer][needs-docs] Display an icon rather than a text in …
…the status bar when new a plugin or plugin upgrade is available
- Loading branch information
Showing
with
5 additions
and
1 deletion.
-
+5
−1
python/pyplugin_installer/installer.py
|
@@ -150,19 +150,23 @@ def checkingDone(self): |
|
|
# look for news in the repositories |
|
|
plugins.markNews() |
|
|
status = "" |
|
|
icon = "" |
|
|
# first check for news |
|
|
for key in plugins.all(): |
|
|
if plugins.all()[key]["status"] == "new": |
|
|
status = self.tr("There is a new plugin available") |
|
|
icon = "plugin-new.svg" |
|
|
tabIndex = 4 # PLUGMAN_TAB_NEW |
|
|
# then check for updates (and eventually overwrite status) |
|
|
for key in plugins.all(): |
|
|
if plugins.all()[key]["status"] == "upgradeable": |
|
|
status = self.tr("There is a plugin update available") |
|
|
icon = "plugin-upgrade.svg" |
|
|
tabIndex = 3 # PLUGMAN_TAB_UPGRADEABLE |
|
|
# finally set the notify label |
|
|
if status: |
|
|
self.statusLabel.setText(u' <a href="%d">%s</a> ' % (tabIndex, status)) |
|
|
self.statusLabel.setText(u'<a href="%d"><img src="qrc:/images/themes/default/propertyicons/%s"></a>' % (tabIndex, icon)) |
|
|
self.statusLabel.setToolTip(status) |
|
|
else: |
|
|
iface.mainWindow().statusBar().removeWidget(self.statusLabel) |
|
|
self.statusLabel = None |
|
|