From 7907b9754b39d581caec00ca5ded38d5a27ea22c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Tue, 19 Dec 2023 18:57:37 +0100 Subject: [PATCH] extensions-app: Use ListModel to track extensions Manually adding and removing rows to dynamic lists is rather old-fashioned, GTK 4 strongly encourages the use of models. Modernize the code by exposing extensions as ListModel, and bind it to the two lists with appropriate filters. Part-of: --- .../data/ui/extensions-window.ui | 45 +++++++++ .../extensions-app/js/extensionManager.js | 57 +++++------- .../extensions-app/js/extensionsWindow.js | 92 ++++--------------- 3 files changed, 89 insertions(+), 105 deletions(-) diff --git a/subprojects/extensions-app/data/ui/extensions-window.ui b/subprojects/extensions-app/data/ui/extensions-window.ui index 7047f130c..ba8470ce3 100644 --- a/subprojects/extensions-app/data/ui/extensions-window.ui +++ b/subprojects/extensions-app/data/ui/extensions-window.ui @@ -12,6 +12,43 @@ + + + + + + + + + + + true + substring + + + + + + sortModel + + + + + + + + + + sortModel + + + true + + + + + +