From f10057f6a95e366540b8a1d1b51e885b92a5c214 Mon Sep 17 00:00:00 2001 From: Papoteur Date: Sun, 28 Oct 2018 12:11:45 +0100 Subject: Add tooltip in install button when tainted/nonfree is needed. --- usr/share/mageiawelcome/helpers.py | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'usr') diff --git a/usr/share/mageiawelcome/helpers.py b/usr/share/mageiawelcome/helpers.py index d94f352..cfa3ded 100644 --- a/usr/share/mageiawelcome/helpers.py +++ b/usr/share/mageiawelcome/helpers.py @@ -50,7 +50,7 @@ def is_installed(name): elif release.endswith("nonfree"): repo = 'nonfree' else: - repo = 'core' + repo = '' return release != "", repo @@ -66,14 +66,19 @@ def get_listapp(): start_btn = "" if (r[6] != ''): label = "" + r[6] + "" + title = " title='{}'".format(_("Need {} repository enabled").format(r[6])) else: - label = "" + label = "" + title = "" is_app_installed, repo = is_installed(r[1]) - if ( not is_app_installed or repo != r[6]):# NOT INSTALLED - listapp += "
  • \ -
    " + r[2] + "

    " + r[4] + "

    " + label + "
  • " + if ( not is_app_installed or repo != r[6]):# NOT INSTALLED IN EXPECTED RELEASE + if is_app_installed and r[6] == "": # ANOTHER RELEASE THAN CORE IS INSTALLED + listapp += "
  • \ +
    " + r[2] + "

    " + r[4] + "

    " + label + else: + listapp += "
  • \ +
    " + r[2] + "

    " + r[4] + "

    " + label + "
  • " else: # INSTALLED listapp += "
  • \
    " + r[2] + "

    " + r[4] + "

    " + start_btn + label + "
  • " return listapp - -- cgit v1.2.1