Add installer page

ui is almost finished 🎉
pull/6/head
axtloss 2 years ago
parent ae91a5d789
commit 39e71cd1e0

@ -54,6 +54,23 @@ modules:
build-commands:
- ls
- pip3 install --prefix=/app .
# - name: vte
# buildsystem: meson
# config-opts:
# - -Ddocs = false
# - -Dvapi=false
# - -Dgtk4=true
# - -Dgtk3=false
# sources:
# - type: git
# url: https://gitlab.gnome.org/GNOME/vte.git
# commit: 3ed53bfaa7344ce5b7727a60a2d33315b15201e5
- name: blueprint
buildsystem: meson
sources:
- type: git
url: "https://gitlab.gnome.org/jwestman/blueprint-compiler"
branch: "main"
- name: jadegui
buildsystem: meson
build-options:

@ -0,0 +1,32 @@
# installer_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 <http://www.gnu.org/licenses/>.
from gi.repository import Gtk, Adw
from gettext import gettext as _
@Gtk.Template(resource_path='/al/getcryst/jadegui/pages/install_screen.ui')
class InstallScreen(Adw.Bin):
__gtype_name__="InstallScreen"
log_text = Gtk.Template.Child()
def __init__(self, window, main_carousel, next_page, application, **kwargs):
super().__init__(**kwargs)
self.log_text.set_text("tsarnitasnri\ntnaoietnioer\ntsarnitoarsn\ntisratnoisr")

@ -10,5 +10,6 @@ jade_gui_sources = [
'misc_screen.py',
'partition_screen.py',
'summary_screen.py',
'install_screen.py',
]
install_data(jade_gui_sources, install_dir: functionsdir)

@ -14,6 +14,7 @@
<file>pages/misc_screen.ui</file>
<file>pages/partition_screen.ui</file>
<file>pages/summary_screen.ui</file>
<file>pages/install_screen.ui</file>
<file>gtk/help-overlay.ui</file>
<file>crystal-logo-minimal.png</file>
</gresource>

@ -18,6 +18,7 @@ blueprints = custom_target('blueprints',
'pages/misc_screen.blp',
'pages/partition_screen.blp',
'pages/summary_screen.blp',
'pages/install_screen.blp',
),
output: '.',
command: [find_program('blueprint-compiler'), 'batch-compile', '@OUTPUT@', '@CURRENT_SOURCE_DIR@', '@INPUT@'],

@ -0,0 +1,36 @@
using Gtk 4.0;
using Adw 1;
template InstallScreen : Adw.Bin {
hexpand: true;
vexpand: true;
Gtk.Box {
hexpand: true;
vexpand: true;
Adw.StatusPage {
hexpand: true;
vexpand: true;
title: "Installing Crystal";
description: "This may take some time";
Gtk.Box {
margin-end: 50;
margin-start: 50;
styles ["card"]
Gtk.ScrolledWindow {
margin-start: 12;
margin-end: 12;
min-content-height: 200;
overflow: hidden;
Gtk.Label log_text {
hexpand: true;
vexpand: true;
wrap: true;
selectable: true;
xalign: 0;
yalign: 0;
}
}
}
}
}
}

@ -31,6 +31,7 @@ from .functions.desktop_screen import DesktopScreen
from .functions.misc_screen import MiscScreen
from .functions.partition_screen import PartitionScreen
from .functions.summary_screen import SummaryScreen
from .functions.install_screen import InstallScreen
@Gtk.Template(resource_path='/al/getcryst/jadegui/window.ui')
class JadeGuiWindow(Gtk.ApplicationWindow):
@ -48,7 +49,8 @@ class JadeGuiWindow(Gtk.ApplicationWindow):
def __init__(self, **kwargs):
super().__init__(**kwargs)
self.summary_screen = SummaryScreen(window=self, main_carousel=self.carousel, next_page=None, **kwargs)
self.installer_screen = InstallScreen(window=self, main_carousel=self.carousel, next_page=None, **kwargs)
self.summary_screen = SummaryScreen(window=self, main_carousel=self.carousel, next_page=self.installer_screen, **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)
@ -62,6 +64,7 @@ class JadeGuiWindow(Gtk.ApplicationWindow):
self.carousel.append(self.misc_screen)
self.carousel.append(self.partition_screen)
self.carousel.append(self.summary_screen)
self.carousel.append(self.installer_screen)
### Widgets for first page (welcome screen)
#self.quit_button.connect("clicked", self.confirmQuit)
self.next_button.connect("clicked", self.nextPage)

Loading…
Cancel
Save