Skip to content

Commit 3a52412

Browse files
committedDec 26, 2017
[Plugin installer][needs-docs] Display an icon rather than a text in the status bar when new a plugin or plugin upgrade is available
1 parent 9fb386a commit 3a52412

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed
 

‎python/pyplugin_installer/installer.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,19 +150,23 @@ def checkingDone(self):
150150
# look for news in the repositories
151151
plugins.markNews()
152152
status = ""
153+
icon = ""
153154
# first check for news
154155
for key in plugins.all():
155156
if plugins.all()[key]["status"] == "new":
156157
status = self.tr("There is a new plugin available")
158+
icon = "plugin-new.svg"
157159
tabIndex = 4 # PLUGMAN_TAB_NEW
158160
# then check for updates (and eventually overwrite status)
159161
for key in plugins.all():
160162
if plugins.all()[key]["status"] == "upgradeable":
161163
status = self.tr("There is a plugin update available")
164+
icon = "plugin-upgrade.svg"
162165
tabIndex = 3 # PLUGMAN_TAB_UPGRADEABLE
163166
# finally set the notify label
164167
if status:
165-
self.statusLabel.setText(u' <a href="%d">%s</a> ' % (tabIndex, status))
168+
self.statusLabel.setText(u'<a href="%d"><img src="qrc:/images/themes/default/propertyicons/%s"></a>' % (tabIndex, icon))
169+
self.statusLabel.setToolTip(status)
166170
else:
167171
iface.mainWindow().statusBar().removeWidget(self.statusLabel)
168172
self.statusLabel = None

0 commit comments

Comments
 (0)
Please sign in to comment.