begin auto parting work
This commit is contained in:
parent
ceac6592bd
commit
ceb4fc3a50
37
src/automatic_partitioning_page/mod.rs
Normal file
37
src/automatic_partitioning_page/mod.rs
Normal file
@ -0,0 +1,37 @@
|
||||
use adw::gio;
|
||||
use crate::installer_stack_page;
|
||||
use gtk::{prelude::*, glib as glib};
|
||||
use glib::{clone, closure_local};
|
||||
|
||||
pub fn automatic_partitioning_page(
|
||||
main_carousel: &adw::Carousel,
|
||||
language_changed_action: &gio::SimpleAction
|
||||
) {
|
||||
let automatic_partitioning_page = installer_stack_page::InstallerStackPage::new();
|
||||
automatic_partitioning_page.set_page_icon("builder");
|
||||
automatic_partitioning_page.set_back_visible(true);
|
||||
automatic_partitioning_page.set_next_visible(true);
|
||||
automatic_partitioning_page.set_back_sensitive(true);
|
||||
automatic_partitioning_page.set_next_sensitive(false);
|
||||
|
||||
let content_box = gtk::Box::builder()
|
||||
.orientation(gtk::Orientation::Vertical)
|
||||
.hexpand(true)
|
||||
.vexpand(true)
|
||||
.build();
|
||||
|
||||
automatic_partitioning_page.connect_closure(
|
||||
"back-button-pressed",
|
||||
false,
|
||||
closure_local!(
|
||||
#[weak]
|
||||
main_carousel,
|
||||
move |_automatic_partitioning_page: installer_stack_page::InstallerStackPage|
|
||||
{
|
||||
main_carousel.scroll_to(&main_carousel.nth_page(0), true)
|
||||
}
|
||||
)
|
||||
);
|
||||
|
||||
main_carousel.append(&automatic_partitioning_page);
|
||||
}
|
@ -14,6 +14,7 @@ mod eula_page;
|
||||
mod keyboard_page;
|
||||
mod timezone_page;
|
||||
mod partitioning_page;
|
||||
mod automatic_partitioning_page;
|
||||
|
||||
#[macro_use]
|
||||
extern crate rust_i18n;
|
||||
|
@ -1,6 +1,8 @@
|
||||
use crate::installer_stack_page;
|
||||
use gtk::{prelude::*, glib as glib, gio as gio};
|
||||
use glib::{clone, closure_local};
|
||||
use crate::{automatic_partitioning_page};
|
||||
|
||||
pub fn partitioning_page(
|
||||
main_carousel: &adw::Carousel,
|
||||
language_changed_action: &gio::SimpleAction
|
||||
@ -82,6 +84,7 @@ pub fn partitioning_page(
|
||||
//
|
||||
|
||||
partitioning_carousel.append(&partitioning_page);
|
||||
automatic_partitioning_page::automatic_partitioning_page(&partitioning_carousel, &language_changed_action);
|
||||
|
||||
partitioning_page.connect_closure(
|
||||
"back-button-pressed",
|
||||
|
Loading…
Reference in New Issue
Block a user