Add new pages
parent
66b5725a14
commit
046387da1c
@ -0,0 +1,39 @@
|
|||||||
|
# partition_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/partition_screen.ui')
|
||||||
|
class PartitionScreen(Adw.Bin):
|
||||||
|
__gtype_name__ = "PartitionScreen"
|
||||||
|
|
||||||
|
partition_list = Gtk.Template.Child()
|
||||||
|
next_page_button = Gtk.Template.Child()
|
||||||
|
#custom_partition = Gtk.Template.Child()
|
||||||
|
|
||||||
|
def __init__(self, window, main_carousel, next_page, application, **kwargs):
|
||||||
|
super().__init__(**kwargs)
|
||||||
|
self.window = window
|
||||||
|
self.carousel = main_carousel
|
||||||
|
self.next_page = next_page
|
||||||
|
self.next_page_button.connect("clicked", self.carousel_next)
|
||||||
|
|
||||||
|
def carousel_next(self, widget):
|
||||||
|
self.carousel.scroll_to(self.next_page, True)
|
@ -0,0 +1,52 @@
|
|||||||
|
using Gtk 4.0;
|
||||||
|
using Adw 1;
|
||||||
|
|
||||||
|
template PartitionScreen : Adw.Bin {
|
||||||
|
vexpand: true;
|
||||||
|
hexpand: true;
|
||||||
|
|
||||||
|
Gtk.Box {
|
||||||
|
hexpand: true;
|
||||||
|
vexpand: true;
|
||||||
|
Adw.StatusPage {
|
||||||
|
hexpand: true;
|
||||||
|
vexpand: true;
|
||||||
|
title: "Now select the disk you want to install crystal on";
|
||||||
|
description: "This will wipe the entire disk you selected";
|
||||||
|
Adw.PreferencesPage {
|
||||||
|
Adw.PreferencesGroup {
|
||||||
|
Gtk.ListBox partition_list {
|
||||||
|
styles ["boxed-list"]
|
||||||
|
}
|
||||||
|
// Gtk.ListBox {
|
||||||
|
// margin-top: 10;
|
||||||
|
// Adw.ActionRow {
|
||||||
|
// title: "I will partition myself";
|
||||||
|
// Gtk.Box {
|
||||||
|
// Gtk.Button custom_partition {
|
||||||
|
// label: "Continue";
|
||||||
|
// margin-top: 5;
|
||||||
|
// margin-bottom: 5;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// styles ["boxed-list"]
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
Gtk.Overlay {
|
||||||
|
[overlay]
|
||||||
|
Gtk.Button next_page_button {
|
||||||
|
margin-end: 20;
|
||||||
|
margin-bottom: 20;
|
||||||
|
label: "Next";
|
||||||
|
halign: end;
|
||||||
|
valign: end;
|
||||||
|
tooltip-text: "Move to next page";
|
||||||
|
styles ["suggested-action"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,12 @@
|
|||||||
|
using Gtk 4.0;
|
||||||
|
using Adw 1;
|
||||||
|
|
||||||
|
template DiskEntry : Adw.ActionRow {
|
||||||
|
title: "Disk";
|
||||||
|
subtitle: "disk size";
|
||||||
|
Gtk.Box {
|
||||||
|
Gtk.CheckButton select_button {
|
||||||
|
use-underline: true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,34 @@
|
|||||||
|
# disk.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, GLib, Adw
|
||||||
|
from gettext import gettext as _
|
||||||
|
|
||||||
|
@Gtk.Template(resource_path='/al/getcryst/jadegui/widgets/disk.ui')
|
||||||
|
class DiskEntry(Adw.ActionRow):
|
||||||
|
__gtype_name__ = 'DiskEntry'
|
||||||
|
|
||||||
|
select_button = Gtk.Template.Child()
|
||||||
|
|
||||||
|
def __init__(self, window, disk, disk_size, button_group, application, **kwargs):
|
||||||
|
super().__init__(**kwargs)
|
||||||
|
self.window = window
|
||||||
|
self.set_title(disk)
|
||||||
|
self.set_subtitle(disk_size)
|
||||||
|
self.select_button.set_group(button_group)
|
Loading…
Reference in New Issue