summaryrefslogtreecommitdiffstats
path: root/usr/share
diff options
context:
space:
mode:
authorPapoteur <papoteur@mageia.org>2018-10-28 12:11:45 +0100
committerPapoteur <papoteur@mageia.org>2018-10-28 12:11:45 +0100
commitf10057f6a95e366540b8a1d1b51e885b92a5c214 (patch)
tree293408525c96d49ddbf33372bbfd58bab5456f99 /usr/share
parent840927499528cd706a323f5844162724e936fa58 (diff)
downloadmageiawelcome-f10057f6a95e366540b8a1d1b51e885b92a5c214.tar
mageiawelcome-f10057f6a95e366540b8a1d1b51e885b92a5c214.tar.gz
mageiawelcome-f10057f6a95e366540b8a1d1b51e885b92a5c214.tar.bz2
mageiawelcome-f10057f6a95e366540b8a1d1b51e885b92a5c214.tar.xz
mageiawelcome-f10057f6a95e366540b8a1d1b51e885b92a5c214.zip
Add tooltip in install button when tainted/nonfree is needed.
Diffstat (limited to 'usr/share')
-rw-r--r--usr/share/mageiawelcome/helpers.py17
1 files changed, 11 insertions, 6 deletions
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 = "<button class='cmd small green' data-run='"+ r[5] + "'><i class='icon-ok-sign'> </i>" + launch +"</button>"
if (r[6] != ''):
label = "<span class='label red'>" + r[6] + "</span>"
+ 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 += "<li class='" + r[3] +"' id='" + r[0] + "'><img class=icon src=img/" + r[0] + ".png /><div class='chkbox'><input type='checkbox' datasrc='" + r[1] +"'></div> \
-<h6>" + r[2] + "</h6><p class='description'>" + r[4] + "</p>" + label + "<button class='inst small' data-rpm='" + r[1] + "'><i class='icon-circle-arrow-down'> </i>" + install +"</button></li>"
+ 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 += "<li class='urpme " + r[3] +"' id='" + r[0] + "'><img class=icon src=img/" + r[0] + ".png /><div class='chkbox'></div> \
+<h6>" + r[2] + "</h6><p class='description'>" + r[4] + "</p>" + label
+ else:
+ listapp += "<li class='" + r[3] +"' id='" + r[0] + "'><img class=icon src=img/" + r[0] + ".png /><div class='chkbox'><input type='checkbox' datasrc='" + r[1] +"'></div> \
+<h6>" + r[2] + "</h6><p class='description'>" + r[4] + "</p>" + label + "<button class='inst small' data-rpm='" + r[1] + "'" + title +"><i class='icon-circle-arrow-down'> </i>" + install +"</button></li>"
else: # INSTALLED
listapp += "<li class='urpme " + r[3] +"' id='" + r[0] + "'><img class=icon src=img/" + r[0] + ".png /><div class='chkbox'></div> \
<h6>" + r[2] + "</h6><p class='description'>" + r[4] + "</p>" + start_btn + label + "</li>"
return listapp
-