diff --git a/src/functions/meson.build b/src/functions/meson.build index 99520e2..c654207 100644 --- a/src/functions/meson.build +++ b/src/functions/meson.build @@ -9,5 +9,6 @@ jade_gui_sources = [ 'desktop_screen.py', 'misc_screen.py', 'partition_screen.py', + 'summary_screen.py', ] install_data(jade_gui_sources, install_dir: functionsdir) \ No newline at end of file diff --git a/src/functions/summary_screen.py b/src/functions/summary_screen.py new file mode 100644 index 0000000..7820b6d --- /dev/null +++ b/src/functions/summary_screen.py @@ -0,0 +1,28 @@ +# summary_screen.py + +# +# Copyright 2022 user + +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +from gi.repository import Gtk, Adw +from gettext import gettext as _ + +@Gtk.Template(resource_path='/al/getcryst/jadegui/pages/summary_screen.ui') +class SummaryScreen(Adw.Bin): + __gtype_name__ = "SummaryScreen" + + def __init__(self, window, main_carousel, next_page, application, **kwargs): + super().__init__(**kwargs) diff --git a/src/jade_gui.gresource.xml b/src/jade_gui.gresource.xml index 580dc8c..9aa8cb0 100644 --- a/src/jade_gui.gresource.xml +++ b/src/jade_gui.gresource.xml @@ -13,6 +13,7 @@ pages/desktop_screen.ui pages/misc_screen.ui pages/partition_screen.ui + pages/summary_screen.ui gtk/help-overlay.ui crystal-logo-minimal.png diff --git a/src/meson.build b/src/meson.build index 0e661e4..5afb7f9 100644 --- a/src/meson.build +++ b/src/meson.build @@ -17,6 +17,7 @@ blueprints = custom_target('blueprints', 'pages/desktop_screen.blp', 'pages/misc_screen.blp', 'pages/partition_screen.blp', + 'pages/summary_screen.blp', ), output: '.', command: [find_program('blueprint-compiler'), 'batch-compile', '@OUTPUT@', '@CURRENT_SOURCE_DIR@', '@INPUT@'], diff --git a/src/pages/summary_screen.blp b/src/pages/summary_screen.blp new file mode 100644 index 0000000..c1bd8c7 --- /dev/null +++ b/src/pages/summary_screen.blp @@ -0,0 +1,155 @@ +using Gtk 4.0; +using Adw 1; + +template SummaryScreen : Adw.Bin { + hexpand: true; + vexpand: true; + + Gtk.Box { + hexpand: true; + vexpand: true; + Adw.StatusPage { + hexpand: true; + vexpand: true; + title: "Summary"; + description: "Last chance to verify everything"; + Adw.PreferencesPage { + Adw.PreferencesGroup { + title: "Timezone and Locale"; + Gtk.ListBox timezone_listbox { + Adw.ActionRow timezone_label { + title: "region/location"; + Gtk.Button { + valign: center; + halign: center; + icon-name: "document-edit-symbolic"; + } + } + Adw.ActionRow locale_label { + title: "locale"; + Gtk.Button { + valign: center; + halign: center; + icon-name: "document-edit-symbolic"; + } + } + styles ["boxed-list"] + } + } + Adw.PreferencesGroup { + title: "Keyboard Layout"; + Gtk.ListBox keyboard_listbox { + Adw.ActionRow keyboard_label { + title: "layout"; + subtitle: "keymap"; + Gtk.Button { + valign: center; + halign: center; + icon-name: "document-edit-symbolic"; + } + } + styles ["boxed-list"] + } + } + Adw.PreferencesGroup { + title: "User Settings"; + Gtk.ListBox user_listbox { + Adw.ActionRow username_label { + title: "username"; + Gtk.Button { + valign: center; + halign: center; + icon-name: "document-edit-symbolic"; + } + } + Adw.ActionRow sudo_label { + title: "sudo enabled/disabled"; + Gtk.Button { + valign: center; + halign: center; + icon-name: "document-edit-symbolic"; + } + } + Adw.ActionRow root_label { + title: "root enabled/disabled"; + Gtk.Button { + valign: center; + halign: center; + icon-name: "document-edit-symbolic"; + } + } + styles ["boxed-list"] + } + } + Adw.PreferencesGroup { + title: "Partition Settings"; + Gtk.ListBox partition_listbox { + Adw.ActionRow partition_label { + title: "selected install partition"; + Gtk.Button { + valign: center; + halign: center; + icon-name: "document-edit-symbolic"; + } + } + Adw.ActionRow disksize_label { + title: "size of disk"; + Gtk.Button { + valign: center; + halign: center; + icon-name: "document-edit-symbolic"; + } + } + Adw.ActionRow uefi_label { + title: "legacy bios/uefi"; + Gtk.Button { + valign: center; + halign: center; + icon-name: "document-edit-symbolic"; + } + } + styles ["boxed-list"] + } + } + Adw.PreferencesGroup { + title: "Miscellaneous Settings"; + Gtk.ListBox misc_listbox { + Adw.ActionRow ipv_label { + title: "ipv6 enabled/disabled"; + Gtk.Button { + valign: center; + halign: center; + icon-name: "document-edit-symbolic"; + } + } + Adw.ActionRow timeshift_label { + title: "timeshift enabled/disabled"; + Gtk.Button { + valign: center; + halign: center; + icon-name: "document-edit-symbolic"; + } + } + Adw.ActionRow theme_label { + title: "crystal theming enaled/disabled"; + Gtk.Button { + valign: center; + halign: center; + icon-name: "document-edit-symbolic"; + } + } + Adw.ActionRow unakite_label { + title: "unakite enaled/disabled"; + Gtk.Button { + valign: center; + halign: center; + icon-name: "document-edit-symbolic"; + } + } + styles ["boxed-list"] + } + } + } + } + } +} \ No newline at end of file diff --git a/src/window.blp b/src/window.blp index e56a21f..d14d2b6 100644 --- a/src/window.blp +++ b/src/window.blp @@ -10,27 +10,24 @@ template JadeGuiWindow : Gtk.ApplicationWindow { [titlebar] Adw.HeaderBar header_bar { title-widget: Gtk.Box { - Gtk.Image { - resource: "/al/getcryst/jadegui/crystal-logo-minimal.png"; - } - Gtk.Label { - margin-start: 2; - label: "Jade"; - use-markup: true; - } + Adw.CarouselIndicatorDots { + carousel: carousel; + orientation: horizontal; + } }; + [start] + Gtk.Button { + label: "Back"; + //icon-name: ; + } + styles ["flat"] } Gtk.Box { orientation: horizontal; vexpand: true; hexpand: true; - - Adw.CarouselIndicatorDots { - carousel: carousel; - orientation: vertical; - } Adw.Carousel carousel { orientation: horizontal; vexpand: true; diff --git a/src/window.py b/src/window.py index 27a585f..3b64df5 100644 --- a/src/window.py +++ b/src/window.py @@ -30,6 +30,7 @@ from .functions.user_screen import UserScreen from .functions.desktop_screen import DesktopScreen from .functions.misc_screen import MiscScreen from .functions.partition_screen import PartitionScreen +from .functions.summary_screen import SummaryScreen @Gtk.Template(resource_path='/al/getcryst/jadegui/window.ui') class JadeGuiWindow(Gtk.ApplicationWindow): @@ -47,7 +48,8 @@ class JadeGuiWindow(Gtk.ApplicationWindow): def __init__(self, **kwargs): super().__init__(**kwargs) - self.partition_screen = PartitionScreen(window=self, main_carousel=self.carousel, next_page=None, **kwargs) + self.summary_screen = SummaryScreen(window=self, main_carousel=self.carousel, next_page=None, **kwargs) + self.partition_screen = PartitionScreen(window=self, main_carousel=self.carousel, next_page=self.summary_screen, **kwargs) self.misc_screen = MiscScreen(window=self, main_carousel=self.carousel, next_page=self.partition_screen, **kwargs) self.desktop_screen = DesktopScreen(window=self, main_carousel=self.carousel, next_page=self.misc_screen, **kwargs) self.user_screen = UserScreen(window=self, main_carousel=self.carousel, next_page=self.desktop_screen, **kwargs) @@ -59,6 +61,7 @@ class JadeGuiWindow(Gtk.ApplicationWindow): self.carousel.append(self.desktop_screen) self.carousel.append(self.misc_screen) self.carousel.append(self.partition_screen) + self.carousel.append(self.summary_screen) ### Widgets for first page (welcome screen) #self.quit_button.connect("clicked", self.confirmQuit) self.next_button.connect("clicked", self.nextPage)