fix layout

This commit is contained in:
Ward from fusion-voyager-3 2024-08-06 23:13:47 +03:00
parent 32058d32de
commit 9269b2d60b
3 changed files with 5 additions and 6 deletions

1
Cargo.lock generated
View File

@ -926,6 +926,7 @@ version = "1.0.2"
dependencies = [ dependencies = [
"async-channel", "async-channel",
"duct", "duct",
"glib 0.18.5",
"glib 0.20.0", "glib 0.20.0",
"glob", "glob",
"gnome-desktop", "gnome-desktop",

View File

@ -6,6 +6,7 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies] [dependencies]
glib_old = { version = "0.18", package = "glib"}
adw = { version = "0.7.0", package = "libadwaita", features = ["v1_5"] } adw = { version = "0.7.0", package = "libadwaita", features = ["v1_5"] }
async-channel = "2.3.1" async-channel = "2.3.1"
duct = "0.13.7" duct = "0.13.7"

View File

@ -4,6 +4,8 @@ use gtk::{prelude::*, glib as glib, gio as gio};
use adw::{prelude::*}; use adw::{prelude::*};
use glib::{clone, closure_local}; use glib::{clone, closure_local};
use std::{process::Command, env, fs, path::Path}; use std::{process::Command, env, fs, path::Path};
use gtk::ResponseType::No;
pub fn language_page( pub fn language_page(
main_carousel: &adw::Carousel, main_carousel: &adw::Carousel,
language_changed_action: &gio::SimpleAction language_changed_action: &gio::SimpleAction
@ -232,12 +234,7 @@ pub fn language_page(
for locale in locale_list.iter() { for locale in locale_list.iter() {
let locale = locale.to_string(); let locale = locale.to_string();
let locale_name_cli = let locale_name = gnome_desktop::language_from_locale(&locale, None).unwrap_or(locale.clone().into()).to_string();
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_clone = locale.clone(); let locale_clone = locale.clone();
let locale_checkbutton = gtk::CheckButton::builder() let locale_checkbutton = gtk::CheckButton::builder()
.valign(gtk::Align::Center) .valign(gtk::Align::Center)