Final touches before translation
This commit is contained in:
parent
4b7f515a9c
commit
b80c564692
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.0 KiB |
@ -11,28 +11,4 @@ then
|
||||
elif [[ $1 == "description" ]]
|
||||
then
|
||||
apt-cache show $2 | grep 'Description*' | cut -d":" -f2 | head -n1
|
||||
elif [[ $1 == "device" ]]
|
||||
then
|
||||
if echo "$2" | grep -i -E 'pika-rocm-meta|vulkan-amdgpu-pro|amf-amdgpu-pro|amdvlk|opencl-legacy-amdgpu-pro-icd|amdgpu-pro-oglp' &> /dev/null
|
||||
then
|
||||
DEVICE="$(lspci | grep -i -E 'vga|display|3d' | grep -i AMD)"
|
||||
elif echo "$2" | grep -i -E 'xone' &> /dev/null
|
||||
then
|
||||
DEVICE="$(lsusb | grep -i xbox)"
|
||||
elif echo "$2" | grep -i -E 'intel' &> /dev/null
|
||||
then
|
||||
DEVICE="$(lspci | grep -i -E 'vga|display|3d' | grep -i intel)"
|
||||
elif echo "$2" | grep -i -E 'nvidia' &> /dev/null
|
||||
then
|
||||
DEVICE="$(lspci | grep -i -E 'vga|display|3d' | grep -i nvidia)"
|
||||
elif echo "$2" | grep -i -E 'mesa' &> /dev/null
|
||||
then
|
||||
DEVICE="$(lspci | grep -i -E 'vga|display|3d' | grep -vi nvidia)"
|
||||
fi
|
||||
if [[ ! -z $DEVICE ]]
|
||||
then
|
||||
echo "$DEVICE"
|
||||
else
|
||||
echo "UNKNOWN!"
|
||||
fi
|
||||
fi
|
@ -58,8 +58,8 @@ pub fn build_ui(app: &adw::Application) {
|
||||
.margin_top(20)
|
||||
.margin_bottom(20)
|
||||
.margin_start(20)
|
||||
.vexpand(true)
|
||||
.hexpand(true)
|
||||
.width_request(120)
|
||||
.height_request(120)
|
||||
.margin_end(20)
|
||||
.build();
|
||||
|
||||
@ -123,7 +123,7 @@ pub fn build_ui(app: &adw::Application) {
|
||||
credits_button.connect_clicked(clone!(@weak credits_button => move |_| credits_window.present()));
|
||||
|
||||
println!("Downloading driver DB...");
|
||||
let data = reqwest::blocking::get("https://raw.githubusercontent.com/PikaOS-Linux/pkg-pika-drivers/main/driver-db.json").unwrap().text().unwrap();
|
||||
let data = reqwest::blocking::get(DRIVER_DB_JSON_URL).unwrap().text().unwrap();
|
||||
|
||||
let (drive_hws_sender, drive_hws_receiver) = async_channel::unbounded();
|
||||
let drive_hws_sender = drive_hws_sender.clone();
|
||||
@ -185,7 +185,7 @@ pub fn build_ui(app: &adw::Application) {
|
||||
// The main loop executes the asynchronous block
|
||||
drive_hws_main_context.spawn_local(clone!(@weak content_box, @weak loading_box, @strong data => async move {
|
||||
while let Ok(drive_hws_state) = drive_hws_receiver.recv().await {
|
||||
get_drivers(&content_box, &loading_box, drive_hws_state, &window, &data);
|
||||
get_drivers(&content_box, &loading_box, drive_hws_state, &window);
|
||||
}
|
||||
}));
|
||||
}
|
||||
@ -219,7 +219,6 @@ fn get_drivers(
|
||||
loading_box: >k::Box,
|
||||
driver_array: Vec<DriverPackage>,
|
||||
window: &adw::ApplicationWindow,
|
||||
json_data: &String
|
||||
) {
|
||||
let main_box = gtk::Box::builder()
|
||||
.margin_top(20)
|
||||
|
@ -1,7 +1,7 @@
|
||||
pub const APP_ID: &str = "com.github.pikaos-linux.pikadrivers";
|
||||
pub const VERSION: &str = env!("CARGO_PKG_VERSION");
|
||||
pub const APP_ICON: &str = "pika-drivers";
|
||||
|
||||
pub const APP_ICON: &str = "com.github.pikaos-linux.pikadrivers";
|
||||
pub const APP_NAME: &str = "PikaOS Driver Manager";
|
||||
pub const APP_DEV: &str = "Cosmo";
|
||||
pub const APP_GITHUB: &str = "https://github.com/PikaOS-Linux/pkg-pika-drivers";
|
||||
pub const DRIVER_DB_JSON_URL : &str = "https://raw.githubusercontent.com/PikaOS-Linux/pkg-pika-drivers/main/driver-db.json";
|
Loading…
Reference in New Issue
Block a user