Don't show any status bar messages for new plugins

We have so many plugins, and the vast majority aren't relevant
to the majority of users... it's just noise to advise when
a new plugin is released.
This commit is contained in:
Nyall Dawson 2022-09-09 08:35:04 +10:00
parent 341add8cb9
commit c64ce53425

View File

@ -142,7 +142,7 @@ class QgsPluginInstaller(QObject):
# ----------------------------------------- # # ----------------------------------------- #
def checkingDone(self): def checkingDone(self):
""" Remove the "Looking for new plugins..." label and display a notification instead if any updates or news available """ """ Remove the "Looking for new plugins..." label and display a notification instead if any updates available """
if not self.statusLabel: if not self.statusLabel:
# only proceed if the label is present # only proceed if the label is present
return return
@ -152,18 +152,13 @@ class QgsPluginInstaller(QObject):
plugins.markNews() plugins.markNews()
status = "" status = ""
icon = "" 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 = "pluginNew.svg"
tabIndex = 4 # PLUGMAN_TAB_NEW
# then check for updates (and eventually overwrite status) # then check for updates (and eventually overwrite status)
for key in plugins.all(): for key in plugins.all():
if plugins.all()[key]["status"] == "upgradeable": if plugins.all()[key]["status"] == "upgradeable":
status = self.tr("There is a plugin update available") status = self.tr("There is a plugin update available")
icon = "pluginUpgrade.svg" icon = "pluginUpgrade.svg"
tabIndex = 3 # PLUGMAN_TAB_UPGRADEABLE tabIndex = 3 # PLUGMAN_TAB_UPGRADEABLE
# finally set the notify label # finally set the notify label
if status: if status:
self.statusLabel.setText(u'<a href="%d"><img src=":/images/themes/default/%s"></a>' % (tabIndex, icon)) self.statusLabel.setText(u'<a href="%d"><img src=":/images/themes/default/%s"></a>' % (tabIndex, icon))