Skip to content
Permalink
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
borysiasty committed Dec 26, 2017
1 parent 9fb386a commit 3a52412c20ef8966df06e03103a94c15031e3591
Showing with 5 additions and 1 deletion.
  1. +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

0 comments on commit 3a52412

Please sign in to comment.
You can’t perform that action at this time.