Daniel Brötzmann pushed to branch master at gajim / gajim


Commits:
02c6c225 by wurstsalat at 2023-01-08T18:46:09+01:00
fix: AppPage: Differentiate between updates (Gajim/Plugins)

Fixes #11363

- - - - -


1 changed file:

- gajim/gtk/app_page.py


Changes:

=====================================
gajim/gtk/app_page.py
=====================================
@@ -131,17 +131,27 @@ def _on_update_check(self, *args: Any) -> None:
 
     @staticmethod
     def _get_update_text() -> str:
+        gajim = ''
+        plugins = _('Plugins: No updates available')
         if not app.settings.get('check_for_update'):
-            return _('Update check disabled in preferences')
+            gajim = _('Gajim: Update check disabled in preferences')
+
+        if not app.settings.get('plugins_update_check'):
+            plugins = _('Plugins: Update check disabled in preferences')
+
+        if any(gajim and plugins):
+            return f'{gajim}\n{plugins}'
 
         last_check = app.settings.get('last_update_check')
         if not last_check:
-            return _('No updates available (last check: never)')
+            gajim = _('Gajim: No updates available (last check: never)')
+            return f'{gajim}\n{plugins}'
 
         date = datetime.strptime(last_check, '%Y-%m-%d %H:%M')
         format_string = app.settings.get('date_format')
-        return _('No updates available (last check: %s)') % date.strftime(
-            format_string)
+        gajim = _('Gajim: No updates available '
+                  '(last check: %s)') % date.strftime(format_string)
+        return f'{gajim}\n{plugins}'
 
 
 class AppMessageRow(Gtk.ListBoxRow):



View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/commit/02c6c225f665a2ccd55fe9c67d65295825de87a3

-- 
View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/commit/02c6c225f665a2ccd55fe9c67d65295825de87a3
You're receiving this email because of your account on dev.gajim.org.


_______________________________________________
Commits mailing list
[email protected]
https://lists.gajim.org/cgi-bin/listinfo/commits

Reply via email to