summaryrefslogtreecommitdiffstats
path: root/qml/helpers.py
diff options
context:
space:
mode:
authorPapoteur <papoteur@mageia.org>2018-12-16 08:38:03 +0100
committerPapoteur <papoteur@mageia.org>2018-12-17 10:19:29 +0100
commit71275bf3bae65e5f702be584915a44095cbe5a09 (patch)
tree6de62fa088f61e889a7f65701f7f3e89ef1afedc /qml/helpers.py
parent1106c8b5c4a8cb025613759cf6bdb6467c091ab8 (diff)
downloadmageiawelcome-71275bf3bae65e5f702be584915a44095cbe5a09.tar
mageiawelcome-71275bf3bae65e5f702be584915a44095cbe5a09.tar.gz
mageiawelcome-71275bf3bae65e5f702be584915a44095cbe5a09.tar.bz2
mageiawelcome-71275bf3bae65e5f702be584915a44095cbe5a09.tar.xz
mageiawelcome-71275bf3bae65e5f702be584915a44095cbe5a09.zip
Clean helpers.py
Diffstat (limited to 'qml/helpers.py')
-rw-r--r--qml/helpers.py33
1 files changed, 0 insertions, 33 deletions
diff --git a/qml/helpers.py b/qml/helpers.py
index 773070d..52e9660 100644
--- a/qml/helpers.py
+++ b/qml/helpers.py
@@ -7,9 +7,6 @@ import rpm
gettext.install("mageiawelcome")
-install = _("Install")
-launch = _("Launch")
-
ts = rpm.TransactionSet()
def get_desktop_name(x):
@@ -51,33 +48,3 @@ def is_installed(name):
else:
repo = ''
return release != "", repo
-
-
-def get_listapp():
- listapp = ''
- with open("apps.csv", 'rt') as f:
- mycsv = csv.reader(f,delimiter='|')
- next(mycsv)
- for r in mycsv:
- if (r[5] == 'false'):
- start_btn = ""
- else:
- 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 = ""
- title = ""
- is_app_installed, repo = is_installed(r[1])
- 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