diff options
-rw-r--r-- | qml/mageiawelcome.py | 8 | ||||
-rw-r--r-- | qml/mw-ui.qml | 4 |
2 files changed, 9 insertions, 3 deletions
diff --git a/qml/mageiawelcome.py b/qml/mageiawelcome.py index b5e13da..c0be01d 100644 --- a/qml/mageiawelcome.py +++ b/qml/mageiawelcome.py @@ -136,9 +136,15 @@ class Installable(QObject): @pyqtSlot(str, str, result=bool) def installable(self, app,repo): is_app_installed, inst_repo = is_installed(app) - installable = (not is_app_installed) or (repo != inst_repo and inst_repo != "") + installable = (not is_app_installed) or (repo != inst_repo and inst_repo == "") return installable + @pyqtSlot(str, str, result=bool) + def other(self, app, repo): + is_app_installed, inst_repo = is_installed(app) + return (is_app_installed and repo == '' and inst_repo != "") + + def username(): user = pwd.getpwuid(os.getuid())[4] # pw_gecos, i e the real name if user == "": diff --git a/qml/mw-ui.qml b/qml/mw-ui.qml index cebd7aa..3cc1223 100644 --- a/qml/mw-ui.qml +++ b/qml/mw-ui.qml @@ -484,7 +484,7 @@ Rectangle { { var entry = appList.get(i); var pattern = new RegExp(group, "g"); - if(pattern.test(entry.group) ) { + if(pattern.test(entry.group) && !pyinstallable.other(entry.name, entry.repo)) { appListDM.items.insert(entry, "group"); } } @@ -596,7 +596,7 @@ Rectangle { { var entry = appList.get(i); var pattern = /featured/g; - if(pattern.test(entry.group) ) { + if(pattern.test(entry.group) && !pyinstallable.other(entry.name, entry.repo) ) { items.insert(entry, "group"); } } |