From 434002745edd83fadc45d3a91120222c74d56ba0 Mon Sep 17 00:00:00 2001 From: Heliguy Date: Wed, 9 Oct 2024 11:24:48 -0400 Subject: [PATCH] Add files for installation chooser --- src/gtk/installation_chooser.blp | 6 ++++++ src/gtk/installation_chooser.py | 7 +++++++ src/meson.build | 2 ++ src/warehouse.gresource.xml | 1 + 4 files changed, 16 insertions(+) create mode 100644 src/gtk/installation_chooser.blp create mode 100644 src/gtk/installation_chooser.py diff --git a/src/gtk/installation_chooser.blp b/src/gtk/installation_chooser.blp new file mode 100644 index 0000000..33cb088 --- /dev/null +++ b/src/gtk/installation_chooser.blp @@ -0,0 +1,6 @@ +using Gtk 4.0; +using Adw 1; + +template $InstallationChooser : Adw.PreferencesGroup { + title: _("Choose Installation"); +} \ No newline at end of file diff --git a/src/gtk/installation_chooser.py b/src/gtk/installation_chooser.py new file mode 100644 index 0000000..1363447 --- /dev/null +++ b/src/gtk/installation_chooser.py @@ -0,0 +1,7 @@ +from gi.repository import Adw, Gtk +from .host_info import HostInfo + +@Gtk.Template(resource_path="/io/github/flattool/Warehouse/gtk/installation_chooser.ui") +class InstallationChooser(Adw.ActionRow): + __gtype_name__ = 'InstallationChooser' + gtc = Gtk.Template.Child \ No newline at end of file diff --git a/src/meson.build b/src/meson.build index 5fe39b6..49546e0 100644 --- a/src/meson.build +++ b/src/meson.build @@ -7,6 +7,7 @@ blueprints = custom_target('blueprints', 'gtk/app_row.blp', 'gtk/help-overlay.blp', 'gtk/loading_status.blp', + 'gtk/installation_chooser.blp', 'main_window/window.blp', 'packages_page/packages_page.blp', 'packages_page/filters_page.blp', @@ -74,6 +75,7 @@ warehouse_sources = [ 'gtk/error_toast.py', 'gtk/sidebar_button.py', 'gtk/loading_status.py', + 'gtk/installation_chooser.py', 'gtk/app_row.py', 'main_window/window.py', 'package_install_worker.py', diff --git a/src/warehouse.gresource.xml b/src/warehouse.gresource.xml index 2b730dd..ebcacc8 100644 --- a/src/warehouse.gresource.xml +++ b/src/warehouse.gresource.xml @@ -5,6 +5,7 @@ gtk/help-overlay.ui gtk/loading_status.ui gtk/app_row.ui + gtk/installation_chooser.ui main_window/window.ui packages_page/packages_page.ui packages_page/filters_page.ui