fix layout
This commit is contained in:
parent
32058d32de
commit
9269b2d60b
1
Cargo.lock
generated
1
Cargo.lock
generated
@ -926,6 +926,7 @@ version = "1.0.2"
|
||||
dependencies = [
|
||||
"async-channel",
|
||||
"duct",
|
||||
"glib 0.18.5",
|
||||
"glib 0.20.0",
|
||||
"glob",
|
||||
"gnome-desktop",
|
||||
|
@ -6,6 +6,7 @@ edition = "2021"
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
glib_old = { version = "0.18", package = "glib"}
|
||||
adw = { version = "0.7.0", package = "libadwaita", features = ["v1_5"] }
|
||||
async-channel = "2.3.1"
|
||||
duct = "0.13.7"
|
||||
|
@ -4,6 +4,8 @@ use gtk::{prelude::*, glib as glib, gio as gio};
|
||||
use adw::{prelude::*};
|
||||
use glib::{clone, closure_local};
|
||||
use std::{process::Command, env, fs, path::Path};
|
||||
use gtk::ResponseType::No;
|
||||
|
||||
pub fn language_page(
|
||||
main_carousel: &adw::Carousel,
|
||||
language_changed_action: &gio::SimpleAction
|
||||
@ -232,12 +234,7 @@ pub fn language_page(
|
||||
|
||||
for locale in locale_list.iter() {
|
||||
let locale = locale.to_string();
|
||||
let locale_name_cli =
|
||||
Command::new("/usr/lib/pika/pika-installer-gtk4/scripts/locale-name.py")
|
||||
.arg(locale.clone())
|
||||
.output()
|
||||
.expect("failed to execute process");
|
||||
let locale_name = String::from_utf8(locale_name_cli.stdout).unwrap();
|
||||
let locale_name = gnome_desktop::language_from_locale(&locale, None).unwrap_or(locale.clone().into()).to_string();
|
||||
let locale_clone = locale.clone();
|
||||
let locale_checkbutton = gtk::CheckButton::builder()
|
||||
.valign(gtk::Align::Center)
|
||||
|
Loading…
Reference in New Issue
Block a user