From b529a8218938384bb9c51f784ab301f0bca0d296 Mon Sep 17 00:00:00 2001 From: Papoteur Date: Tue, 1 Jan 2019 09:07:53 +0100 Subject: Check application installable in real time, not stored --- qml/mageiawelcome.py | 2 +- qml/mw-ui.qml | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) (limited to 'qml') diff --git a/qml/mageiawelcome.py b/qml/mageiawelcome.py index dfe6998..b5e13da 100644 --- a/qml/mageiawelcome.py +++ b/qml/mageiawelcome.py @@ -169,7 +169,7 @@ if __name__ == '__main__': view.rootContext().setContextProperty('launch', la) view.rootContext().setContextProperty('user', us) view.rootContext().setContextProperty('ConfList', cl) - view.rootContext().setContextProperty('installable', ins) + view.rootContext().setContextProperty('pyinstallable', ins) view.rootContext().setContextProperty('startupcheck', sc) view.rootContext().setContextProperty('norun', nr) current_path = os.path.abspath(os.path.dirname(__file__)) diff --git a/qml/mw-ui.qml b/qml/mw-ui.qml index f73315a..105f83f 100644 --- a/qml/mw-ui.qml +++ b/qml/mw-ui.qml @@ -474,8 +474,6 @@ Rectangle { for( var i = 0;i < rowCount;i++ ) { var entry = appList.get(i); - entry.installable = installable.installable(entry.name, entry.inst_repo) - console.log(entry.name, entry.inst_repo, entry.installable) var pattern = new RegExp(group, "g"); if(pattern.test(entry.group) ) { appListDM.items.insert(entry, "group"); @@ -483,6 +481,7 @@ Rectangle { } appListDM.filterOnGroup = "items"; } + Rectangle { property var title: qsTr("Applications") width: view.width; height: view.height @@ -586,7 +585,6 @@ Rectangle { { var entry = appList.get(i); var pattern = /featured/g; - entry.installable = installable.installable(entry.name, entry.inst_repo) if(pattern.test(entry.group) ) { items.insert(entry, "group"); } @@ -661,7 +659,7 @@ Rectangle { color: "white" } } - sourceComponent: (installable === "True") ? button : (command === "" ? dummy : launcher) + sourceComponent: ( pyinstallable.installable(name, inst_repo)) ? button : (command === "" ? dummy : launcher) } Loader { -- cgit v1.2.1