From cfffe57047f958b68bb42e781b5564346e1e6ae5 Mon Sep 17 00:00:00 2001 From: nokyan Date: Thu, 10 Oct 2024 07:49:50 +0200 Subject: [PATCH 01/11] Allow for multiple processes to be selected at once --- src/ui/pages/applications/mod.rs | 20 +-- src/ui/pages/processes/mod.rs | 200 ++++++++++++++++-------- src/ui/pages/processes/process_entry.rs | 8 +- src/ui/window.rs | 137 +++++++++++----- src/utils/process.rs | 10 +- 5 files changed, 258 insertions(+), 117 deletions(-) diff --git a/src/ui/pages/applications/mod.rs b/src/ui/pages/applications/mod.rs index 88aa8da8..35ca4ffd 100644 --- a/src/ui/pages/applications/mod.rs +++ b/src/ui/pages/applications/mod.rs @@ -728,11 +728,11 @@ impl ResApplications { // Confirmation dialog & warning let dialog = adw::AlertDialog::builder() - .heading(get_action_name(action, &[&app.name()])) - .body(get_app_action_warning(action)) + .heading(get_action_name(action, &app.name())) + .body(get_action_warning(action)) .build(); - dialog.add_response("yes", &get_app_action_description(action)); + dialog.add_response("yes", &get_action_description(action)); dialog.set_response_appearance("yes", ResponseAppearance::Destructive); dialog.add_response("no", &i18n("Cancel")); @@ -1443,16 +1443,16 @@ impl ResApplications { } } -fn get_action_name(action: ProcessAction, args: &[&str]) -> String { +fn get_action_name(action: ProcessAction, name: &str) -> String { match action { - ProcessAction::TERM => i18n_f("End {}?", args), - ProcessAction::STOP => i18n_f("Halt {}?", args), - ProcessAction::KILL => i18n_f("Kill {}?", args), - ProcessAction::CONT => i18n_f("Continue {}?", args), + ProcessAction::TERM => i18n_f("End {}?", &[name]), + ProcessAction::STOP => i18n_f("Halt {}?", &[name]), + ProcessAction::KILL => i18n_f("Kill {}?", &[name]), + ProcessAction::CONT => i18n_f("Continue {}?", &[name]), } } -fn get_app_action_warning(action: ProcessAction) -> String { +fn get_action_warning(action: ProcessAction) -> String { match action { ProcessAction::TERM => i18n("Unsaved work might be lost."), ProcessAction::STOP => i18n("Halting an app can come with serious risks such as losing data and security implications. Use with caution."), @@ -1461,7 +1461,7 @@ fn get_app_action_warning(action: ProcessAction) -> String { } } -fn get_app_action_description(action: ProcessAction) -> String { +fn get_action_description(action: ProcessAction) -> String { match action { ProcessAction::TERM => i18n("End App"), ProcessAction::STOP => i18n("Halt App"), diff --git a/src/ui/pages/processes/mod.rs b/src/ui/pages/processes/mod.rs index 91db4ad2..7fead037 100644 --- a/src/ui/pages/processes/mod.rs +++ b/src/ui/pages/processes/mod.rs @@ -9,13 +9,13 @@ use adw::{prelude::*, subclass::prelude::*}; use async_channel::Sender; use gtk::glib::{self, clone, closure, MainContext, Object}; use gtk::{ - gio, ColumnView, ColumnViewColumn, EventControllerKey, FilterChange, ListItem, NumericSorter, - SortType, StringSorter, Widget, + gio, BitsetIter, ColumnView, ColumnViewColumn, EventControllerKey, FilterChange, ListItem, + NumericSorter, SortType, StringSorter, Widget, }; use process_data::Niceness; use crate::config::PROFILE; -use crate::i18n::{i18n, i18n_f}; +use crate::i18n::{i18n, i18n_f, ni18n_f}; use crate::ui::dialogs::process_dialog::ResProcessDialog; use crate::ui::dialogs::process_options_dialog::ResProcessOptionsDialog; use crate::ui::pages::NICE_TO_LABEL; @@ -94,7 +94,7 @@ mod imp { pub end_process_button: TemplateChild, pub store: RefCell, - pub selection_model: RefCell, + pub selection_model: RefCell, pub filter_model: RefCell, pub sort_model: RefCell, pub column_view: RefCell, @@ -163,7 +163,7 @@ mod imp { information_button: Default::default(), end_process_button: Default::default(), store: gio::ListStore::new::().into(), - selection_model: Default::default(), + selection_model: RefCell::new(glib::object::Object::new::()), filter_model: Default::default(), sort_model: Default::default(), column_view: Default::default(), @@ -201,8 +201,10 @@ mod imp { if let Some(process_entry) = res_processes.imp().popped_over_process.borrow().as_ref() { - res_processes - .execute_process_action_dialog(process_entry, ProcessAction::TERM); + res_processes.execute_process_action_dialog( + vec![process_entry.clone()], + ProcessAction::TERM, + ); } }, ); @@ -214,8 +216,10 @@ mod imp { if let Some(process_entry) = res_processes.imp().popped_over_process.borrow().as_ref() { - res_processes - .execute_process_action_dialog(process_entry, ProcessAction::KILL); + res_processes.execute_process_action_dialog( + vec![process_entry.clone()], + ProcessAction::KILL, + ); } }, ); @@ -227,8 +231,10 @@ mod imp { if let Some(process_entry) = res_processes.imp().popped_over_process.borrow().as_ref() { - res_processes - .execute_process_action_dialog(process_entry, ProcessAction::STOP); + res_processes.execute_process_action_dialog( + vec![process_entry.clone()], + ProcessAction::STOP, + ); } }, ); @@ -240,8 +246,10 @@ mod imp { if let Some(process_entry) = res_processes.imp().popped_over_process.borrow().as_ref() { - res_processes - .execute_process_action_dialog(process_entry, ProcessAction::CONT); + res_processes.execute_process_action_dialog( + vec![process_entry.clone()], + ProcessAction::CONT, + ); } }, ); @@ -274,8 +282,9 @@ mod imp { "processes.kill-process", None, move |res_processes, _, _| { - if let Some(process) = res_processes.get_selected_process_entry() { - res_processes.execute_process_action_dialog(&process, ProcessAction::KILL); + let selected = res_processes.get_selected_process_entries(); + if !selected.is_empty() { + res_processes.execute_process_action_dialog(selected, ProcessAction::KILL); } }, ); @@ -284,8 +293,9 @@ mod imp { "processes.halt-process", None, move |res_processes, _, _| { - if let Some(process) = res_processes.get_selected_process_entry() { - res_processes.execute_process_action_dialog(&process, ProcessAction::STOP); + let selected = res_processes.get_selected_process_entries(); + if !selected.is_empty() { + res_processes.execute_process_action_dialog(selected, ProcessAction::STOP); } }, ); @@ -294,8 +304,9 @@ mod imp { "processes.continue-process", None, move |res_processes, _, _| { - if let Some(process) = res_processes.get_selected_process_entry() { - res_processes.execute_process_action_dialog(&process, ProcessAction::CONT); + let selected = res_processes.get_selected_process_entries(); + if !selected.is_empty() { + res_processes.execute_process_action_dialog(selected, ProcessAction::CONT); } }, ); @@ -450,9 +461,7 @@ impl ResProcesses { let sort_model = gtk::SortListModel::new(Some(filter_model.clone()), column_view.sorter()); - let selection_model = gtk::SingleSelection::new(Some(sort_model.clone())); - selection_model.set_can_unselect(true); - selection_model.set_autoselect(false); + let selection_model = gtk::MultiSelection::new(Some(sort_model.clone())); column_view.set_model(Some(&selection_model)); @@ -483,12 +492,11 @@ impl ResProcesses { self, move |model, _, _| { let imp = this.imp(); - imp.information_button - .set_sensitive(model.selected() != u32::MAX); - imp.options_button - .set_sensitive(model.selected() != u32::MAX); - imp.end_process_button - .set_sensitive(model.selected() != u32::MAX); + let bitset = model.selection(); + + imp.information_button.set_sensitive(bitset.size() == 1); + imp.options_button.set_sensitive(bitset.size() == 1); + imp.end_process_button.set_sensitive(bitset.size() > 0); } )); @@ -535,10 +543,11 @@ impl ResProcesses { self, move |_| { let imp = this.imp(); + let bitset = imp.selection_model.borrow().selection(); let selection_option = imp .selection_model .borrow() - .selected_item() + .item(bitset.maximum()) // the info button is only available when only 1 item is selected, so this should be fine .map(|object| object.downcast::().unwrap()); if let Some(selection) = selection_option { this.open_options_dialog(&selection); @@ -551,10 +560,11 @@ impl ResProcesses { self, move |_| { let imp = this.imp(); + let bitset = imp.selection_model.borrow().selection(); let selection_option = imp .selection_model .borrow() - .selected_item() + .item(bitset.maximum()) // the info button is only available when only 1 item is selected, so this should be fine .map(|object| object.downcast::().unwrap()); if let Some(selection) = selection_option { this.open_info_dialog(&selection); @@ -566,8 +576,9 @@ impl ResProcesses { #[weak(rename_to = this)] self, move |_| { - if let Some(process) = this.get_selected_process_entry() { - this.execute_process_action_dialog(&process, ProcessAction::TERM); + let selected = this.get_selected_process_entries(); + if !selected.is_empty() { + this.execute_process_action_dialog(selected, ProcessAction::TERM); } } )); @@ -671,12 +682,34 @@ impl ResProcesses { || item.commandline().to_lowercase().contains(&search_string) } - pub fn get_selected_process_entry(&self) -> Option { - self.imp() - .selection_model - .borrow() - .selected_item() - .and_then(|object| object.downcast::().ok()) + pub fn get_selected_process_entries(&self) -> Vec { + let imp = self.imp(); + + if let Some((bitset_iter, first)) = + BitsetIter::init_first(&imp.selection_model.borrow().selection()) + { + let mut return_vec: Vec<_> = bitset_iter + .filter_map(|position| { + imp.selection_model + .borrow() + .item(position) + .map(|object| object.downcast::().unwrap()) + }) + .collect(); + + if let Some(first_process) = imp + .selection_model + .borrow() + .item(first) + .map(|object| object.downcast::().unwrap()) + { + return_vec.insert(0, first_process); + } + + return_vec + } else { + Vec::default() + } } pub fn refresh_processes_list(&self, apps_context: &AppsContext) { @@ -759,25 +792,31 @@ impl ResProcesses { )); } - pub fn execute_process_action_dialog(&self, process: &ProcessEntry, action: ProcessAction) { + pub fn execute_process_action_dialog( + &self, + processes: Vec, + action: ProcessAction, + ) { // Nothing too bad can happen on Continue so dont show the dialog if action == ProcessAction::CONT { let main_context = MainContext::default(); main_context.spawn_local(clone!( #[weak(rename_to = this)] self, - #[weak] - process, + #[strong] + processes, async move { let imp = this.imp(); let _ = imp .sender .get() .unwrap() - .send(Action::ManipulateProcess( + .send(Action::ManipulateProcesses( action, - process.pid(), - process.name().to_string(), + processes + .iter() + .map(|process_entry| process_entry.pid()) + .collect(), imp.toast_overlay.get(), )) .await; @@ -786,45 +825,53 @@ impl ResProcesses { return; } + let action_name = if processes.len() == 1 { + get_action_name(action, &processes[0].name()) + } else { + get_action_name_multiple(action, processes.len()) + }; + // Confirmation dialog & warning let dialog = adw::AlertDialog::builder() - .heading(get_action_name(action, &[&process.name()])) - .body(get_process_action_warning(action)) + .heading(action_name) + .body(get_action_warning(action)) .build(); - dialog.add_response("yes", &get_process_action_description(action)); + dialog.add_response("yes", &get_action_description(action)); dialog.set_response_appearance("yes", ResponseAppearance::Destructive); dialog.add_response("no", &i18n("Cancel")); dialog.set_default_response(Some("no")); dialog.set_close_response("no"); - // Called when "yes" or "no" were clicked + // wtf is this dialog.connect_response( None, clone!( #[weak(rename_to = this)] self, - #[weak] - process, + #[strong] + processes, move |_, response| { if response == "yes" { let main_context = MainContext::default(); main_context.spawn_local(clone!( - #[strong] + #[weak] this, #[strong] - process, + processes, async move { let imp = this.imp(); let _ = imp .sender .get() .unwrap() - .send(Action::ManipulateProcess( + .send(Action::ManipulateProcesses( action, - process.pid(), - process.name().to_string(), + processes + .iter() + .map(|process_entry| process_entry.pid()) + .collect(), imp.toast_overlay.get(), )) .await; @@ -1872,16 +1919,45 @@ impl ResProcesses { } } -fn get_action_name(action: ProcessAction, args: &[&str]) -> String { +fn get_action_name(action: ProcessAction, name: &str) -> String { + match action { + ProcessAction::TERM => i18n_f("End {}?", &[name]), + ProcessAction::STOP => i18n_f("Halt {}?", &[name]), + ProcessAction::KILL => i18n_f("Kill {}?", &[name]), + ProcessAction::CONT => i18n_f("Continue {}?", &[name]), + } +} + +fn get_action_name_multiple(action: ProcessAction, count: usize) -> String { match action { - ProcessAction::TERM => i18n_f("End {}?", args), - ProcessAction::STOP => i18n_f("Halt {}?", args), - ProcessAction::KILL => i18n_f("Kill {}?", args), - ProcessAction::CONT => i18n_f("Continue {}?", args), + ProcessAction::TERM => ni18n_f( + "End process?", + "End {} processes?", + count as u32, + &[&count.to_string()], + ), + ProcessAction::STOP => ni18n_f( + "Halt process?", + "Halt {} processes?", + count as u32, + &[&count.to_string()], + ), + ProcessAction::KILL => ni18n_f( + "Kill process?", + "Kill {} processes?", + count as u32, + &[&count.to_string()], + ), + ProcessAction::CONT => ni18n_f( + "Kill process?", + "Kill {} processes?", + count as u32, + &[&count.to_string()], + ), } } -fn get_process_action_warning(action: ProcessAction) -> String { +fn get_action_warning(action: ProcessAction) -> String { match action { ProcessAction::TERM => i18n("Unsaved work might be lost."), ProcessAction::STOP => i18n("Halting a process can come with serious risks such as losing data and security implications. Use with caution."), @@ -1890,7 +1966,7 @@ fn get_process_action_warning(action: ProcessAction) -> String { } } -fn get_process_action_description(action: ProcessAction) -> String { +fn get_action_description(action: ProcessAction) -> String { match action { ProcessAction::TERM => i18n("End Process"), ProcessAction::STOP => i18n("Halt Process"), diff --git a/src/ui/pages/processes/process_entry.rs b/src/ui/pages/processes/process_entry.rs index a63592d3..90ca7fc0 100644 --- a/src/ui/pages/processes/process_entry.rs +++ b/src/ui/pages/processes/process_entry.rs @@ -196,12 +196,6 @@ glib::wrapper! { impl ProcessEntry { pub fn new(process: &Process) -> Self { - let display_name = if process.executable_name.starts_with(&process.data.comm) { - process.executable_name.clone() - } else { - process.data.comm.clone() - }; - let containerization = match process.data.containerization { Containerization::None => i18n("No"), Containerization::Flatpak => i18n("Yes (Flatpak)"), @@ -209,7 +203,7 @@ impl ProcessEntry { }; let this: Self = glib::Object::builder() - .property("name", &display_name) + .property("name", &process.display_name) .property("commandline", process.data.commandline.replace('\0', " ")) .property("user", &process.data.user) .property("icon", &process.icon) diff --git a/src/ui/window.rs b/src/ui/window.rs index a297f12a..05edad0e 100644 --- a/src/ui/window.rs +++ b/src/ui/window.rs @@ -33,7 +33,7 @@ use super::pages::{applications, processes}; #[derive(Debug, Clone)] pub enum Action { - ManipulateProcess(ProcessAction, libc::pid_t, String, ToastOverlay), + ManipulateProcesses(ProcessAction, Vec, ToastOverlay), ManipulateApp(ProcessAction, String, ToastOverlay), AdjustProcess(libc::pid_t, Niceness, Vec, String, ToastOverlay), } @@ -253,10 +253,9 @@ impl MainWindow { .execute_app_action_dialog(&app_item, process_action); } } else if selected_page.is::() { - if let Some(process_item) = imp.processes.get_selected_process_entry() { - imp.processes - .execute_process_action_dialog(&process_item, process_action); - } + let selected = imp.processes.get_selected_process_entries(); + imp.processes + .execute_process_action_dialog(selected, process_action); } } @@ -270,8 +269,9 @@ impl MainWindow { imp.applications.open_info_dialog(&app_item); } } else if selected_page.is::() { - if let Some(process_item) = imp.processes.get_selected_process_entry() { - imp.processes.open_info_dialog(&process_item); + let selected = imp.processes.get_selected_process_entries(); + if selected.len() == 1 { + imp.processes.open_info_dialog(&selected[0]); } } } @@ -282,8 +282,9 @@ impl MainWindow { let selected_page = self.get_selected_page().unwrap(); if selected_page.is::() { - if let Some(process_item) = imp.processes.get_selected_process_entry() { - imp.processes.open_options_dialog(&process_item); + let selected = imp.processes.get_selected_process_entries(); + if selected.len() == 1 { + imp.processes.open_options_dialog(&selected[0]); } } } @@ -881,14 +882,47 @@ impl MainWindow { fn process_action(&self, action: Action) { let apps_context = self.imp().apps_context.borrow(); match action { - Action::ManipulateProcess(action, pid, display_name, toast_overlay) => { - if let Some(process) = apps_context.get_process(pid) { - let toast_message = match process.execute_process_action(action) { - Ok(()) => get_action_success(action, &[&display_name]), - Err(_) => get_process_action_failure(action, &[&display_name]), - }; - toast_overlay.add_toast(Toast::new(&toast_message)); + Action::ManipulateProcesses(action, pids, toast_overlay) => { + let mut processes_unsuccessful: usize = 0; + + let mut first_process = None; + + for (i, pid) in pids.iter().enumerate() { + if let Some(process) = apps_context.get_process(*pid) { + if i == 0 { + first_process = Some(process); + } + if process.execute_process_action(action).is_err() { + processes_unsuccessful += 1; + } + } } + + let toast_message = if processes_unsuccessful > 0 { + if pids.len() == 1 { + if let Some(display_name) = + first_process.map(|process| &process.display_name) + { + get_named_action_failure(action, display_name) + } else { + // this should never happen + get_action_failure(action, 1) + } + } else { + get_action_failure(action, processes_unsuccessful) + } + } else if pids.len() == 1 { + if let Some(display_name) = first_process.map(|process| &process.display_name) { + get_action_success(action, display_name) + } else { + // this should never happen + get_processes_success(action, 1) + } + } else { + get_processes_success(action, pids.len()) + }; + + toast_overlay.add_toast(Toast::new(&toast_message)); } Action::ManipulateApp(action, id, toast_overlay) => { @@ -900,9 +934,9 @@ impl MainWindow { let processes_unsuccessful = processes_tried - processes_successful; let toast_message = if processes_unsuccessful > 0 { - get_app_action_failure(action, processes_unsuccessful as u32) + get_action_failure(action, processes_unsuccessful) } else { - get_action_success(action, &[&app.display_name]) + get_action_success(action, &app.display_name) }; toast_overlay.add_toast(Toast::new(&toast_message)); @@ -992,49 +1026,78 @@ impl Default for MainWindow { } } -fn get_action_success(action: ProcessAction, args: &[&str]) -> String { +fn get_action_success(action: ProcessAction, name: &str) -> String { match action { - ProcessAction::TERM => i18n_f("Successfully ended {}", args), - ProcessAction::STOP => i18n_f("Successfully halted {}", args), - ProcessAction::KILL => i18n_f("Successfully killed {}", args), - ProcessAction::CONT => i18n_f("Successfully continued {}", args), + ProcessAction::TERM => i18n_f("Successfully ended {}", &[name]), + ProcessAction::STOP => i18n_f("Successfully halted {}", &[name]), + ProcessAction::KILL => i18n_f("Successfully killed {}", &[name]), + ProcessAction::CONT => i18n_f("Successfully continued {}", &[name]), + } +} + +fn get_processes_success(action: ProcessAction, count: usize) -> String { + match action { + ProcessAction::TERM => ni18n_f( + "Successfully ended the process", + "Successfully ended {} processes", + count as u32, + &[&count.to_string()], + ), + ProcessAction::STOP => ni18n_f( + "Successfully halted the process", + "Successfully halted {} processes", + count as u32, + &[&count.to_string()], + ), + ProcessAction::KILL => ni18n_f( + "Successfully killed the process", + "Successfully killed {} processes", + count as u32, + &[&count.to_string()], + ), + ProcessAction::CONT => ni18n_f( + "Successfully continued the process", + "Successfully continued {} processes", + count as u32, + &[&count.to_string()], + ), } } -fn get_app_action_failure(action: ProcessAction, args: u32) -> String { +fn get_action_failure(action: ProcessAction, count: usize) -> String { match action { ProcessAction::TERM => ni18n_f( "There was a problem ending a process", "There were problems ending {} processes", - args, - &[&args.to_string()], + count as u32, + &[&count.to_string()], ), ProcessAction::STOP => ni18n_f( "There was a problem halting a process", "There were problems halting {} processes", - args, - &[&args.to_string()], + count as u32, + &[&count.to_string()], ), ProcessAction::KILL => ni18n_f( "There was a problem killing a process", "There were problems killing {} processes", - args, - &[&args.to_string()], + count as u32, + &[&count.to_string()], ), ProcessAction::CONT => ni18n_f( "There was a problem continuing a process", "There were problems continuing {} processes", - args, - &[&args.to_string()], + count as u32, + &[&count.to_string()], ), } } -pub fn get_process_action_failure(action: ProcessAction, args: &[&str]) -> String { +pub fn get_named_action_failure(action: ProcessAction, name: &str) -> String { match action { - ProcessAction::TERM => i18n_f("There was a problem ending {}", args), - ProcessAction::STOP => i18n_f("There was a problem halting {}", args), - ProcessAction::KILL => i18n_f("There was a problem killing {}", args), - ProcessAction::CONT => i18n_f("There was a problem continuing {}", args), + ProcessAction::TERM => i18n_f("There was a problem ending {}", &[name]), + ProcessAction::STOP => i18n_f("There was a problem halting {}", &[name]), + ProcessAction::KILL => i18n_f("There was a problem killing {}", &[name]), + ProcessAction::CONT => i18n_f("There was a problem continuing {}", &[name]), } } diff --git a/src/utils/process.rs b/src/utils/process.rs index 75638109..c4a3a289 100644 --- a/src/utils/process.rs +++ b/src/utils/process.rs @@ -69,6 +69,7 @@ pub struct Process { pub read_bytes_last: Option, pub write_bytes_last: Option, pub gpu_usage_stats_last: BTreeMap, + pub display_name: String, } // TODO: Better name? @@ -135,6 +136,12 @@ impl Process { None }; + let display_name = if executable_name.starts_with(&process_data.comm) { + executable_name.clone() + } else { + process_data.comm.clone() + }; + Self { executable_path, executable_name, @@ -145,6 +152,7 @@ impl Process { read_bytes_last, write_bytes_last, gpu_usage_stats_last: Default::default(), + display_name, } } @@ -292,7 +300,7 @@ impl Process { Ok(()) } else { error!( - "Couldn't {action_string} {}, return_code: {return_code}", + "Couldn't {action_string} {}, return code: {return_code}", self.data.pid ); bail!("non-zero return code: {return_code}") From 4566c4eca6acaf58586a50c9420d7eea7930622a Mon Sep 17 00:00:00 2001 From: nokyan Date: Thu, 10 Oct 2024 07:50:43 +0200 Subject: [PATCH 02/11] Fix comment --- src/ui/window.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ui/window.rs b/src/ui/window.rs index 05edad0e..81fa5c67 100644 --- a/src/ui/window.rs +++ b/src/ui/window.rs @@ -848,7 +848,7 @@ impl MainWindow { } } - // Add new network pages + // Add new battery pages for path in paths { battery_pages.entry(path.clone()).or_insert_with(|| { // A battery has been added From 95eb94c9305c3a8ff453ba3806099d8f20e576d0 Mon Sep 17 00:00:00 2001 From: nokyan Date: Thu, 10 Oct 2024 07:55:16 +0200 Subject: [PATCH 03/11] Update resources.pot --- po/resources.pot | 245 ++++++++++++++++++++++++++++------------------- 1 file changed, 144 insertions(+), 101 deletions(-) diff --git a/po/resources.pot b/po/resources.pot index 6c662608..d020da6f 100644 --- a/po/resources.pot +++ b/po/resources.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-08-26 01:10+0200\n" +"POT-Creation-Date: 2024-10-10 07:50+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -51,8 +51,8 @@ msgid "CPU" msgstr "" #: data/net.nokyan.Resources.metainfo.xml.in.in:25 -#: src/ui/pages/applications/mod.rs:844 src/ui/pages/memory.rs:140 -#: src/ui/pages/memory.rs:221 src/ui/pages/processes/mod.rs:1013 +#: src/ui/pages/applications/mod.rs:841 src/ui/pages/memory.rs:140 +#: src/ui/pages/memory.rs:221 src/ui/pages/processes/mod.rs:1060 #: data/resources/ui/window.ui:158 data/resources/ui/window.ui:165 #: data/resources/ui/dialogs/app_dialog.ui:82 #: data/resources/ui/dialogs/process_dialog.ui:64 @@ -62,8 +62,8 @@ msgid "Memory" msgstr "" #: data/net.nokyan.Resources.metainfo.xml.in.in:26 -#: src/ui/pages/applications/mod.rs:1217 src/ui/pages/gpu.rs:157 -#: src/ui/pages/processes/mod.rs:1397 src/ui/window.rs:303 +#: src/ui/pages/applications/mod.rs:1214 src/ui/pages/gpu.rs:157 +#: src/ui/pages/processes/mod.rs:1444 src/ui/window.rs:304 #: data/resources/ui/dialogs/app_dialog.ui:131 #: data/resources/ui/dialogs/process_dialog.ui:109 #: data/resources/ui/dialogs/settings_dialog.ui:163 @@ -138,7 +138,7 @@ msgstr "" #: src/ui/dialogs/process_dialog.rs:133 src/ui/dialogs/process_dialog.rs:135 #: src/ui/dialogs/process_dialog.rs:153 src/ui/dialogs/process_dialog.rs:160 #: src/ui/dialogs/process_dialog.rs:167 src/ui/dialogs/process_dialog.rs:174 -#: src/ui/pages/applications/mod.rs:987 src/ui/pages/applications/mod.rs:1111 +#: src/ui/pages/applications/mod.rs:984 src/ui/pages/applications/mod.rs:1108 #: src/ui/pages/battery.rs:239 src/ui/pages/battery.rs:259 #: src/ui/pages/battery.rs:265 src/ui/pages/battery.rs:268 #: src/ui/pages/battery.rs:294 src/ui/pages/battery.rs:318 @@ -164,10 +164,10 @@ msgstr "" #: src/ui/pages/network.rs:357 src/ui/pages/network.rs:360 #: src/ui/pages/network.rs:362 src/ui/pages/network.rs:391 #: src/ui/pages/network.rs:394 src/ui/pages/network.rs:396 -#: src/ui/pages/processes/mod.rs:1155 src/ui/pages/processes/mod.rs:1221 -#: src/ui/pages/processes/mod.rs:1287 src/ui/pages/processes/mod.rs:1353 -#: src/ui/pages/processes/mod.rs:1835 src/ui/pages/processes/mod.rs:1837 -#: src/utils/battery.rs:139 src/utils/drive.rs:90 src/utils/gpu/mod.rs:258 +#: src/ui/pages/processes/mod.rs:1202 src/ui/pages/processes/mod.rs:1268 +#: src/ui/pages/processes/mod.rs:1334 src/ui/pages/processes/mod.rs:1400 +#: src/ui/pages/processes/mod.rs:1882 src/ui/pages/processes/mod.rs:1884 +#: src/utils/battery.rs:136 src/utils/drive.rs:89 src/utils/gpu/mod.rs:258 #: src/utils/gpu/mod.rs:264 msgid "N/A" msgstr "" @@ -178,17 +178,17 @@ msgid "CPU {}" msgstr "" #: src/ui/pages/applications/application_entry.rs:179 src/ui/pages/drive.rs:434 -#: src/ui/pages/drive.rs:444 src/ui/pages/processes/process_entry.rs:206 +#: src/ui/pages/drive.rs:444 src/ui/pages/processes/process_entry.rs:200 msgid "No" msgstr "" #: src/ui/pages/applications/application_entry.rs:180 -#: src/ui/pages/processes/process_entry.rs:207 +#: src/ui/pages/processes/process_entry.rs:201 msgid "Yes (Flatpak)" msgstr "" #: src/ui/pages/applications/application_entry.rs:181 -#: src/ui/pages/processes/process_entry.rs:208 +#: src/ui/pages/processes/process_entry.rs:202 msgid "Yes (Snap)" msgstr "" @@ -198,20 +198,21 @@ msgstr "" msgid "Apps" msgstr "" -#: src/ui/pages/applications/mod.rs:700 +#. -1 because we don't want to count System Processes +#: src/ui/pages/applications/mod.rs:698 msgid "Running Apps: {}" msgstr "" -#: src/ui/pages/applications/mod.rs:741 src/ui/pages/processes/mod.rs:798 +#: src/ui/pages/applications/mod.rs:738 src/ui/pages/processes/mod.rs:843 msgid "Cancel" msgstr "" -#: src/ui/pages/applications/mod.rs:787 +#: src/ui/pages/applications/mod.rs:784 msgid "App" msgstr "" -#: src/ui/pages/applications/mod.rs:903 src/ui/pages/cpu.rs:157 -#: src/ui/pages/processes/mod.rs:1071 src/ui/window.rs:355 +#: src/ui/pages/applications/mod.rs:900 src/ui/pages/cpu.rs:157 +#: src/ui/pages/processes/mod.rs:1118 src/ui/window.rs:356 #: data/resources/ui/window.ui:127 data/resources/ui/window.ui:134 #: data/resources/ui/dialogs/app_dialog.ui:73 #: data/resources/ui/dialogs/process_dialog.ui:55 @@ -220,7 +221,7 @@ msgstr "" msgid "Processor" msgstr "" -#: src/ui/pages/applications/mod.rs:966 src/ui/pages/processes/mod.rs:1134 +#: src/ui/pages/applications/mod.rs:963 src/ui/pages/processes/mod.rs:1181 #: data/resources/ui/dialogs/app_dialog.ui:91 #: data/resources/ui/dialogs/process_dialog.ui:69 #: data/resources/ui/dialogs/settings_dialog.ui:143 @@ -228,7 +229,7 @@ msgstr "" msgid "Drive Read" msgstr "" -#: src/ui/pages/applications/mod.rs:1030 src/ui/pages/processes/mod.rs:1200 +#: src/ui/pages/applications/mod.rs:1027 src/ui/pages/processes/mod.rs:1247 #: data/resources/ui/dialogs/app_dialog.ui:100 #: data/resources/ui/dialogs/process_dialog.ui:78 #: data/resources/ui/dialogs/settings_dialog.ui:148 @@ -236,7 +237,7 @@ msgstr "" msgid "Drive Read Total" msgstr "" -#: src/ui/pages/applications/mod.rs:1090 src/ui/pages/processes/mod.rs:1266 +#: src/ui/pages/applications/mod.rs:1087 src/ui/pages/processes/mod.rs:1313 #: data/resources/ui/dialogs/app_dialog.ui:109 #: data/resources/ui/dialogs/process_dialog.ui:87 #: data/resources/ui/dialogs/settings_dialog.ui:153 @@ -244,7 +245,7 @@ msgstr "" msgid "Drive Write" msgstr "" -#: src/ui/pages/applications/mod.rs:1156 src/ui/pages/processes/mod.rs:1332 +#: src/ui/pages/applications/mod.rs:1153 src/ui/pages/processes/mod.rs:1379 #: data/resources/ui/dialogs/app_dialog.ui:118 #: data/resources/ui/dialogs/process_dialog.ui:96 #: data/resources/ui/dialogs/settings_dialog.ui:158 @@ -252,7 +253,7 @@ msgstr "" msgid "Drive Write Total" msgstr "" -#: src/ui/pages/applications/mod.rs:1275 src/ui/pages/processes/mod.rs:1455 +#: src/ui/pages/applications/mod.rs:1272 src/ui/pages/processes/mod.rs:1502 #: data/resources/ui/dialogs/app_dialog.ui:149 #: data/resources/ui/dialogs/process_dialog.ui:127 #: data/resources/ui/dialogs/settings_dialog.ui:173 @@ -260,7 +261,7 @@ msgstr "" msgid "Video Encoder" msgstr "" -#: src/ui/pages/applications/mod.rs:1335 src/ui/pages/processes/mod.rs:1515 +#: src/ui/pages/applications/mod.rs:1332 src/ui/pages/processes/mod.rs:1562 #: data/resources/ui/dialogs/app_dialog.ui:158 #: data/resources/ui/dialogs/process_dialog.ui:136 #: data/resources/ui/dialogs/settings_dialog.ui:178 @@ -268,7 +269,7 @@ msgstr "" msgid "Video Decoder" msgstr "" -#: src/ui/pages/applications/mod.rs:1394 src/ui/pages/processes/mod.rs:1575 +#: src/ui/pages/applications/mod.rs:1391 src/ui/pages/processes/mod.rs:1622 #: data/resources/ui/dialogs/app_dialog.ui:140 #: data/resources/ui/dialogs/process_dialog.ui:118 #: data/resources/ui/dialogs/settings_dialog.ui:168 @@ -276,57 +277,57 @@ msgstr "" msgid "Video Memory" msgstr "" -#: src/ui/pages/applications/mod.rs:1451 src/ui/pages/processes/mod.rs:1877 +#: src/ui/pages/applications/mod.rs:1448 src/ui/pages/processes/mod.rs:1924 msgid "End {}?" msgstr "" -#: src/ui/pages/applications/mod.rs:1452 src/ui/pages/processes/mod.rs:1878 +#: src/ui/pages/applications/mod.rs:1449 src/ui/pages/processes/mod.rs:1925 msgid "Halt {}?" msgstr "" -#: src/ui/pages/applications/mod.rs:1453 src/ui/pages/processes/mod.rs:1879 +#: src/ui/pages/applications/mod.rs:1450 src/ui/pages/processes/mod.rs:1926 msgid "Kill {}?" msgstr "" -#: src/ui/pages/applications/mod.rs:1454 src/ui/pages/processes/mod.rs:1880 +#: src/ui/pages/applications/mod.rs:1451 src/ui/pages/processes/mod.rs:1927 msgid "Continue {}?" msgstr "" -#: src/ui/pages/applications/mod.rs:1460 src/ui/pages/processes/mod.rs:1886 +#: src/ui/pages/applications/mod.rs:1457 src/ui/pages/processes/mod.rs:1962 msgid "Unsaved work might be lost." msgstr "" -#: src/ui/pages/applications/mod.rs:1461 +#: src/ui/pages/applications/mod.rs:1458 msgid "" "Halting an app can come with serious risks such as losing data and security " "implications. Use with caution." msgstr "" -#: src/ui/pages/applications/mod.rs:1462 +#: src/ui/pages/applications/mod.rs:1459 msgid "" "Killing an app can come with serious risks such as losing data and security " "implications. Use with caution." msgstr "" -#: src/ui/pages/applications/mod.rs:1469 +#: src/ui/pages/applications/mod.rs:1466 #: data/resources/ui/pages/applications.ui:22 #: data/resources/ui/pages/applications.ui:127 msgid "End App" msgstr "" -#: src/ui/pages/applications/mod.rs:1470 +#: src/ui/pages/applications/mod.rs:1467 #: data/resources/ui/pages/applications.ui:10 #: data/resources/ui/pages/applications.ui:30 msgid "Halt App" msgstr "" -#: src/ui/pages/applications/mod.rs:1471 +#: src/ui/pages/applications/mod.rs:1468 #: data/resources/ui/pages/applications.ui:6 #: data/resources/ui/pages/applications.ui:26 msgid "Kill App" msgstr "" -#: src/ui/pages/applications/mod.rs:1472 +#: src/ui/pages/applications/mod.rs:1469 #: data/resources/ui/pages/applications.ui:14 #: data/resources/ui/pages/applications.ui:34 msgid "Continue App" @@ -438,291 +439,333 @@ msgstr "" msgid "Processes" msgstr "" -#: src/ui/pages/processes/mod.rs:757 +#: src/ui/pages/processes/mod.rs:790 msgid "Running Processes: {}" msgstr "" -#: src/ui/pages/processes/mod.rs:845 +#: src/ui/pages/processes/mod.rs:892 msgid "Process" msgstr "" -#: src/ui/pages/processes/mod.rs:906 +#: src/ui/pages/processes/mod.rs:953 #: data/resources/ui/dialogs/process_dialog.ui:177 #: data/resources/ui/dialogs/settings_dialog.ui:205 msgid "Process ID" msgstr "" -#: src/ui/pages/processes/mod.rs:959 +#: src/ui/pages/processes/mod.rs:1006 #: data/resources/ui/dialogs/process_dialog.ui:204 #: data/resources/ui/dialogs/settings_dialog.ui:210 msgid "User" msgstr "" -#: src/ui/pages/processes/mod.rs:1634 +#: src/ui/pages/processes/mod.rs:1681 #: data/resources/ui/dialogs/process_dialog.ui:145 #: data/resources/ui/dialogs/settings_dialog.ui:265 msgid "Total CPU Time" msgstr "" -#: src/ui/pages/processes/mod.rs:1693 +#: src/ui/pages/processes/mod.rs:1740 #: data/resources/ui/dialogs/process_dialog.ui:154 #: data/resources/ui/dialogs/settings_dialog.ui:270 msgid "User CPU Time" msgstr "" -#: src/ui/pages/processes/mod.rs:1752 +#: src/ui/pages/processes/mod.rs:1799 #: data/resources/ui/dialogs/process_dialog.ui:163 #: data/resources/ui/dialogs/settings_dialog.ui:275 msgid "System CPU Time" msgstr "" -#: src/ui/pages/processes/mod.rs:1811 +#: src/ui/pages/processes/mod.rs:1858 #: data/resources/ui/dialogs/process_options_dialog.ui:87 #: data/resources/ui/dialogs/settings_dialog.ui:280 msgid "Priority" msgstr "" -#: src/ui/pages/processes/mod.rs:1887 +#: src/ui/pages/processes/mod.rs:1934 +msgid "End process?" +msgid_plural "End {} processes?" +msgstr[0] "" +msgstr[1] "" + +#: src/ui/pages/processes/mod.rs:1940 +msgid "Halt process?" +msgid_plural "Halt {} processes?" +msgstr[0] "" +msgstr[1] "" + +#: src/ui/pages/processes/mod.rs:1946 src/ui/pages/processes/mod.rs:1952 +msgid "Kill process?" +msgid_plural "Kill {} processes?" +msgstr[0] "" +msgstr[1] "" + +#: src/ui/pages/processes/mod.rs:1963 msgid "" "Halting a process can come with serious risks such as losing data and " "security implications. Use with caution." msgstr "" -#: src/ui/pages/processes/mod.rs:1888 +#: src/ui/pages/processes/mod.rs:1964 msgid "" "Killing a process can come with serious risks such as losing data and " "security implications. Use with caution." msgstr "" -#: src/ui/pages/processes/mod.rs:1895 data/resources/ui/pages/processes.ui:22 +#: src/ui/pages/processes/mod.rs:1971 data/resources/ui/pages/processes.ui:22 #: data/resources/ui/pages/processes.ui:146 msgid "End Process" msgstr "" -#: src/ui/pages/processes/mod.rs:1896 data/resources/ui/pages/processes.ui:10 +#: src/ui/pages/processes/mod.rs:1972 data/resources/ui/pages/processes.ui:10 #: data/resources/ui/pages/processes.ui:30 msgid "Halt Process" msgstr "" -#: src/ui/pages/processes/mod.rs:1897 data/resources/ui/pages/processes.ui:6 +#: src/ui/pages/processes/mod.rs:1973 data/resources/ui/pages/processes.ui:6 #: data/resources/ui/pages/processes.ui:26 msgid "Kill Process" msgstr "" -#: src/ui/pages/processes/mod.rs:1898 data/resources/ui/pages/processes.ui:14 +#: src/ui/pages/processes/mod.rs:1974 data/resources/ui/pages/processes.ui:14 #: data/resources/ui/pages/processes.ui:34 msgid "Continue Process" msgstr "" -#: src/ui/window.rs:301 +#: src/ui/window.rs:302 msgid "GPU {}" msgstr "" -#: src/ui/window.rs:916 +#: src/ui/window.rs:950 msgid "Successfully adjusted {}" msgstr "" -#: src/ui/window.rs:917 +#: src/ui/window.rs:951 msgid "There was a problem adjusting {}" msgstr "" -#: src/ui/window.rs:997 +#: src/ui/window.rs:1031 msgid "Successfully ended {}" msgstr "" -#: src/ui/window.rs:998 +#: src/ui/window.rs:1032 msgid "Successfully halted {}" msgstr "" -#: src/ui/window.rs:999 +#: src/ui/window.rs:1033 msgid "Successfully killed {}" msgstr "" -#: src/ui/window.rs:1000 +#: src/ui/window.rs:1034 msgid "Successfully continued {}" msgstr "" -#: src/ui/window.rs:1007 +#: src/ui/window.rs:1041 +msgid "Successfully ended the process" +msgid_plural "Successfully ended {} processes" +msgstr[0] "" +msgstr[1] "" + +#: src/ui/window.rs:1047 +msgid "Successfully halted the process" +msgid_plural "Successfully halted {} processes" +msgstr[0] "" +msgstr[1] "" + +#: src/ui/window.rs:1053 +msgid "Successfully killed the process" +msgid_plural "Successfully killed {} processes" +msgstr[0] "" +msgstr[1] "" + +#: src/ui/window.rs:1059 +msgid "Successfully continued the process" +msgid_plural "Successfully continued {} processes" +msgstr[0] "" +msgstr[1] "" + +#: src/ui/window.rs:1070 msgid "There was a problem ending a process" msgid_plural "There were problems ending {} processes" msgstr[0] "" msgstr[1] "" -#: src/ui/window.rs:1013 +#: src/ui/window.rs:1076 msgid "There was a problem halting a process" msgid_plural "There were problems halting {} processes" msgstr[0] "" msgstr[1] "" -#: src/ui/window.rs:1019 +#: src/ui/window.rs:1082 msgid "There was a problem killing a process" msgid_plural "There were problems killing {} processes" msgstr[0] "" msgstr[1] "" -#: src/ui/window.rs:1025 +#: src/ui/window.rs:1088 msgid "There was a problem continuing a process" msgid_plural "There were problems continuing {} processes" msgstr[0] "" msgstr[1] "" -#: src/ui/window.rs:1035 +#: src/ui/window.rs:1098 msgid "There was a problem ending {}" msgstr "" -#: src/ui/window.rs:1036 +#: src/ui/window.rs:1099 msgid "There was a problem halting {}" msgstr "" -#: src/ui/window.rs:1037 +#: src/ui/window.rs:1100 msgid "There was a problem killing {}" msgstr "" -#: src/ui/window.rs:1038 +#: src/ui/window.rs:1101 msgid "There was a problem continuing {}" msgstr "" -#: src/utils/app.rs:220 +#: src/utils/app.rs:222 msgid "System Processes" msgstr "" -#: src/utils/battery.rs:80 +#: src/utils/battery.rs:77 msgid "Charging" msgstr "" -#: src/utils/battery.rs:81 +#: src/utils/battery.rs:78 msgid "Discharging" msgstr "" -#: src/utils/battery.rs:82 +#: src/utils/battery.rs:79 msgid "Empty" msgstr "" -#: src/utils/battery.rs:83 +#: src/utils/battery.rs:80 msgid "Full" msgstr "" -#: src/utils/battery.rs:84 +#: src/utils/battery.rs:81 msgid "Unknown" msgstr "" -#: src/utils/battery.rs:130 +#: src/utils/battery.rs:127 msgid "Nickel-Metal Hydride" msgstr "" -#: src/utils/battery.rs:131 +#: src/utils/battery.rs:128 msgid "Nickel-Cadmium" msgstr "" -#: src/utils/battery.rs:132 +#: src/utils/battery.rs:129 msgid "Nickel-Zinc" msgstr "" -#: src/utils/battery.rs:133 +#: src/utils/battery.rs:130 msgid "Lead-Acid" msgstr "" -#: src/utils/battery.rs:134 +#: src/utils/battery.rs:131 msgid "Lithium-Ion" msgstr "" -#: src/utils/battery.rs:135 +#: src/utils/battery.rs:132 msgid "Lithium Iron Phosphate" msgstr "" -#: src/utils/battery.rs:136 +#: src/utils/battery.rs:133 msgid "Lithium Polymer" msgstr "" -#: src/utils/battery.rs:138 +#: src/utils/battery.rs:135 msgid "Rechargeable Alkaline Managanese" msgstr "" -#: src/utils/battery.rs:232 +#: src/utils/battery.rs:229 msgid "{} Battery" msgstr "" -#: src/utils/battery.rs:234 +#: src/utils/battery.rs:231 msgid "Battery" msgstr "" -#: src/utils/drive.rs:82 src/utils/drive.rs:153 +#: src/utils/drive.rs:81 src/utils/drive.rs:152 msgid "CD/DVD/Blu-ray Drive" msgstr "" -#: src/utils/drive.rs:83 +#: src/utils/drive.rs:82 msgid "eMMC Storage" msgstr "" -#: src/utils/drive.rs:84 +#: src/utils/drive.rs:83 msgid "Flash Storage" msgstr "" -#: src/utils/drive.rs:85 src/utils/drive.rs:154 +#: src/utils/drive.rs:84 src/utils/drive.rs:153 msgid "Floppy Drive" msgstr "" -#: src/utils/drive.rs:86 +#: src/utils/drive.rs:85 msgid "Hard Disk Drive" msgstr "" -#: src/utils/drive.rs:87 +#: src/utils/drive.rs:86 msgid "Loop Device" msgstr "" -#: src/utils/drive.rs:88 +#: src/utils/drive.rs:87 msgid "Mapped Device" msgstr "" -#: src/utils/drive.rs:89 +#: src/utils/drive.rs:88 msgid "NVMe Drive" msgstr "" -#: src/utils/drive.rs:91 +#: src/utils/drive.rs:90 msgid "Software Raid" msgstr "" -#: src/utils/drive.rs:92 +#: src/utils/drive.rs:91 msgid "RAM Disk" msgstr "" -#: src/utils/drive.rs:93 +#: src/utils/drive.rs:92 msgid "Solid State Drive" msgstr "" -#: src/utils/drive.rs:94 +#: src/utils/drive.rs:93 msgid "ZFS Volume" msgstr "" -#: src/utils/drive.rs:95 +#: src/utils/drive.rs:94 msgid "Compressed RAM Disk (zram)" msgstr "" -#: src/utils/drive.rs:155 +#: src/utils/drive.rs:154 msgid "{} Loop Device" msgstr "" -#: src/utils/drive.rs:156 +#: src/utils/drive.rs:155 msgid "{} Mapped Device" msgstr "" -#: src/utils/drive.rs:157 +#: src/utils/drive.rs:156 msgid "{} RAID" msgstr "" -#: src/utils/drive.rs:158 +#: src/utils/drive.rs:157 msgid "{} RAM Disk" msgstr "" -#: src/utils/drive.rs:159 +#: src/utils/drive.rs:158 msgid "{} zram Device" msgstr "" -#: src/utils/drive.rs:160 +#: src/utils/drive.rs:159 msgid "{} ZFS Volume" msgstr "" -#: src/utils/drive.rs:161 +#: src/utils/drive.rs:160 msgid "{} Drive" msgstr "" From 8a267443a0aa92f067e457550c493dd912da0012 Mon Sep 17 00:00:00 2001 From: nokyan Date: Thu, 10 Oct 2024 07:55:27 +0200 Subject: [PATCH 04/11] Update German translation --- po/de.po | 253 +++++++++++++++++++++++++++++++++---------------------- 1 file changed, 150 insertions(+), 103 deletions(-) diff --git a/po/de.po b/po/de.po index 22e1d83e..46e8fda7 100644 --- a/po/de.po +++ b/po/de.po @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: resources\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-08-24 11:07+0200\n" -"PO-Revision-Date: 2024-08-24 11:32+0200\n" +"POT-Creation-Date: 2024-10-10 07:50+0200\n" +"PO-Revision-Date: 2024-10-10 07:53+0200\n" "Last-Translator: nokyan \n" "Language-Team: German \n" "Language: de\n" @@ -15,7 +15,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1)\n" -"X-Generator: Gtranslator 46.1\n" +"X-Generator: Gtranslator 47.0\n" #: data/net.nokyan.Resources.desktop.in.in:3 #: data/net.nokyan.Resources.metainfo.xml.in.in:4 src/application.rs:262 @@ -56,8 +56,8 @@ msgid "CPU" msgstr "CPU" #: data/net.nokyan.Resources.metainfo.xml.in.in:25 -#: src/ui/pages/applications/mod.rs:844 src/ui/pages/memory.rs:140 -#: src/ui/pages/memory.rs:221 src/ui/pages/processes/mod.rs:1013 +#: src/ui/pages/applications/mod.rs:841 src/ui/pages/memory.rs:140 +#: src/ui/pages/memory.rs:221 src/ui/pages/processes/mod.rs:1060 #: data/resources/ui/window.ui:158 data/resources/ui/window.ui:165 #: data/resources/ui/dialogs/app_dialog.ui:82 #: data/resources/ui/dialogs/process_dialog.ui:64 @@ -67,8 +67,8 @@ msgid "Memory" msgstr "Arbeitsspeicher" #: data/net.nokyan.Resources.metainfo.xml.in.in:26 -#: src/ui/pages/applications/mod.rs:1217 src/ui/pages/gpu.rs:157 -#: src/ui/pages/processes/mod.rs:1397 src/ui/window.rs:303 +#: src/ui/pages/applications/mod.rs:1214 src/ui/pages/gpu.rs:157 +#: src/ui/pages/processes/mod.rs:1444 src/ui/window.rs:304 #: data/resources/ui/dialogs/app_dialog.ui:131 #: data/resources/ui/dialogs/process_dialog.ui:109 #: data/resources/ui/dialogs/settings_dialog.ui:163 @@ -143,7 +143,7 @@ msgstr "Icon von" #: src/ui/dialogs/process_dialog.rs:133 src/ui/dialogs/process_dialog.rs:135 #: src/ui/dialogs/process_dialog.rs:153 src/ui/dialogs/process_dialog.rs:160 #: src/ui/dialogs/process_dialog.rs:167 src/ui/dialogs/process_dialog.rs:174 -#: src/ui/pages/applications/mod.rs:987 src/ui/pages/applications/mod.rs:1111 +#: src/ui/pages/applications/mod.rs:984 src/ui/pages/applications/mod.rs:1108 #: src/ui/pages/battery.rs:239 src/ui/pages/battery.rs:259 #: src/ui/pages/battery.rs:265 src/ui/pages/battery.rs:268 #: src/ui/pages/battery.rs:294 src/ui/pages/battery.rs:318 @@ -169,10 +169,10 @@ msgstr "Icon von" #: src/ui/pages/network.rs:357 src/ui/pages/network.rs:360 #: src/ui/pages/network.rs:362 src/ui/pages/network.rs:391 #: src/ui/pages/network.rs:394 src/ui/pages/network.rs:396 -#: src/ui/pages/processes/mod.rs:1155 src/ui/pages/processes/mod.rs:1221 -#: src/ui/pages/processes/mod.rs:1287 src/ui/pages/processes/mod.rs:1353 -#: src/ui/pages/processes/mod.rs:1835 src/ui/pages/processes/mod.rs:1837 -#: src/utils/battery.rs:139 src/utils/drive.rs:90 src/utils/gpu/mod.rs:258 +#: src/ui/pages/processes/mod.rs:1202 src/ui/pages/processes/mod.rs:1268 +#: src/ui/pages/processes/mod.rs:1334 src/ui/pages/processes/mod.rs:1400 +#: src/ui/pages/processes/mod.rs:1882 src/ui/pages/processes/mod.rs:1884 +#: src/utils/battery.rs:136 src/utils/drive.rs:89 src/utils/gpu/mod.rs:258 #: src/utils/gpu/mod.rs:264 msgid "N/A" msgstr "n. v." @@ -183,17 +183,17 @@ msgid "CPU {}" msgstr "CPU {}" #: src/ui/pages/applications/application_entry.rs:179 src/ui/pages/drive.rs:434 -#: src/ui/pages/drive.rs:444 src/ui/pages/processes/process_entry.rs:206 +#: src/ui/pages/drive.rs:444 src/ui/pages/processes/process_entry.rs:200 msgid "No" msgstr "Nein" #: src/ui/pages/applications/application_entry.rs:180 -#: src/ui/pages/processes/process_entry.rs:207 +#: src/ui/pages/processes/process_entry.rs:201 msgid "Yes (Flatpak)" msgstr "Ja (Flatpak)" #: src/ui/pages/applications/application_entry.rs:181 -#: src/ui/pages/processes/process_entry.rs:208 +#: src/ui/pages/processes/process_entry.rs:202 msgid "Yes (Snap)" msgstr "Ja (Snap)" @@ -203,20 +203,21 @@ msgstr "Ja (Snap)" msgid "Apps" msgstr "Anwendungen" -#: src/ui/pages/applications/mod.rs:700 +#. -1 because we don't want to count System Processes +#: src/ui/pages/applications/mod.rs:698 msgid "Running Apps: {}" msgstr "Laufende Anwendungen: {}" -#: src/ui/pages/applications/mod.rs:741 src/ui/pages/processes/mod.rs:798 +#: src/ui/pages/applications/mod.rs:738 src/ui/pages/processes/mod.rs:843 msgid "Cancel" msgstr "Abbrechen" -#: src/ui/pages/applications/mod.rs:787 +#: src/ui/pages/applications/mod.rs:784 msgid "App" msgstr "Anwendung" -#: src/ui/pages/applications/mod.rs:903 src/ui/pages/cpu.rs:157 -#: src/ui/pages/processes/mod.rs:1071 src/ui/window.rs:355 +#: src/ui/pages/applications/mod.rs:900 src/ui/pages/cpu.rs:157 +#: src/ui/pages/processes/mod.rs:1118 src/ui/window.rs:356 #: data/resources/ui/window.ui:127 data/resources/ui/window.ui:134 #: data/resources/ui/dialogs/app_dialog.ui:73 #: data/resources/ui/dialogs/process_dialog.ui:55 @@ -225,7 +226,7 @@ msgstr "Anwendung" msgid "Processor" msgstr "Prozessor" -#: src/ui/pages/applications/mod.rs:966 src/ui/pages/processes/mod.rs:1134 +#: src/ui/pages/applications/mod.rs:963 src/ui/pages/processes/mod.rs:1181 #: data/resources/ui/dialogs/app_dialog.ui:91 #: data/resources/ui/dialogs/process_dialog.ui:69 #: data/resources/ui/dialogs/settings_dialog.ui:143 @@ -233,7 +234,7 @@ msgstr "Prozessor" msgid "Drive Read" msgstr "Lesevorgänge" -#: src/ui/pages/applications/mod.rs:1030 src/ui/pages/processes/mod.rs:1200 +#: src/ui/pages/applications/mod.rs:1027 src/ui/pages/processes/mod.rs:1247 #: data/resources/ui/dialogs/app_dialog.ui:100 #: data/resources/ui/dialogs/process_dialog.ui:78 #: data/resources/ui/dialogs/settings_dialog.ui:148 @@ -241,7 +242,7 @@ msgstr "Lesevorgänge" msgid "Drive Read Total" msgstr "Lesevorgänge insgesamt" -#: src/ui/pages/applications/mod.rs:1090 src/ui/pages/processes/mod.rs:1266 +#: src/ui/pages/applications/mod.rs:1087 src/ui/pages/processes/mod.rs:1313 #: data/resources/ui/dialogs/app_dialog.ui:109 #: data/resources/ui/dialogs/process_dialog.ui:87 #: data/resources/ui/dialogs/settings_dialog.ui:153 @@ -249,7 +250,7 @@ msgstr "Lesevorgänge insgesamt" msgid "Drive Write" msgstr "Schreibvorgänge" -#: src/ui/pages/applications/mod.rs:1156 src/ui/pages/processes/mod.rs:1332 +#: src/ui/pages/applications/mod.rs:1153 src/ui/pages/processes/mod.rs:1379 #: data/resources/ui/dialogs/app_dialog.ui:118 #: data/resources/ui/dialogs/process_dialog.ui:96 #: data/resources/ui/dialogs/settings_dialog.ui:158 @@ -257,7 +258,7 @@ msgstr "Schreibvorgänge" msgid "Drive Write Total" msgstr "Schreibvorgänge insgesamt" -#: src/ui/pages/applications/mod.rs:1275 src/ui/pages/processes/mod.rs:1455 +#: src/ui/pages/applications/mod.rs:1272 src/ui/pages/processes/mod.rs:1502 #: data/resources/ui/dialogs/app_dialog.ui:149 #: data/resources/ui/dialogs/process_dialog.ui:127 #: data/resources/ui/dialogs/settings_dialog.ui:173 @@ -265,7 +266,7 @@ msgstr "Schreibvorgänge insgesamt" msgid "Video Encoder" msgstr "Videokodierer" -#: src/ui/pages/applications/mod.rs:1335 src/ui/pages/processes/mod.rs:1515 +#: src/ui/pages/applications/mod.rs:1332 src/ui/pages/processes/mod.rs:1562 #: data/resources/ui/dialogs/app_dialog.ui:158 #: data/resources/ui/dialogs/process_dialog.ui:136 #: data/resources/ui/dialogs/settings_dialog.ui:178 @@ -273,7 +274,7 @@ msgstr "Videokodierer" msgid "Video Decoder" msgstr "Videodekodierer" -#: src/ui/pages/applications/mod.rs:1394 src/ui/pages/processes/mod.rs:1575 +#: src/ui/pages/applications/mod.rs:1391 src/ui/pages/processes/mod.rs:1622 #: data/resources/ui/dialogs/app_dialog.ui:140 #: data/resources/ui/dialogs/process_dialog.ui:118 #: data/resources/ui/dialogs/settings_dialog.ui:168 @@ -281,27 +282,27 @@ msgstr "Videodekodierer" msgid "Video Memory" msgstr "Grafikspeicher" -#: src/ui/pages/applications/mod.rs:1451 src/ui/pages/processes/mod.rs:1877 +#: src/ui/pages/applications/mod.rs:1448 src/ui/pages/processes/mod.rs:1924 msgid "End {}?" msgstr "{} beenden?" -#: src/ui/pages/applications/mod.rs:1452 src/ui/pages/processes/mod.rs:1878 +#: src/ui/pages/applications/mod.rs:1449 src/ui/pages/processes/mod.rs:1925 msgid "Halt {}?" msgstr "{} anhalten?" -#: src/ui/pages/applications/mod.rs:1453 src/ui/pages/processes/mod.rs:1879 +#: src/ui/pages/applications/mod.rs:1450 src/ui/pages/processes/mod.rs:1926 msgid "Kill {}?" msgstr "{} abwürgen?" -#: src/ui/pages/applications/mod.rs:1454 src/ui/pages/processes/mod.rs:1880 +#: src/ui/pages/applications/mod.rs:1451 src/ui/pages/processes/mod.rs:1927 msgid "Continue {}?" msgstr "{} fortsetzen?" -#: src/ui/pages/applications/mod.rs:1460 src/ui/pages/processes/mod.rs:1886 +#: src/ui/pages/applications/mod.rs:1457 src/ui/pages/processes/mod.rs:1962 msgid "Unsaved work might be lost." msgstr "Ungespeicherte Daten könnten verloren gehen." -#: src/ui/pages/applications/mod.rs:1461 +#: src/ui/pages/applications/mod.rs:1458 msgid "" "Halting an app can come with serious risks such as losing data and security " "implications. Use with caution." @@ -309,7 +310,7 @@ msgstr "" "Das Anhalten einer Anwendung ist mit Risiken wie dem Verlust von Daten sowie " "Sicherheitsproblemen verbunden. Sie sollten vorsichtig sein." -#: src/ui/pages/applications/mod.rs:1462 +#: src/ui/pages/applications/mod.rs:1459 msgid "" "Killing an app can come with serious risks such as losing data and security " "implications. Use with caution." @@ -317,25 +318,25 @@ msgstr "" "Das Abwürgen einer Anwendung ist mit Risiken wie dem Verlust von Daten sowie " "Sicherheitsproblemen verbunden. Sie sollten vorsichtig sein." -#: src/ui/pages/applications/mod.rs:1469 +#: src/ui/pages/applications/mod.rs:1466 #: data/resources/ui/pages/applications.ui:22 #: data/resources/ui/pages/applications.ui:127 msgid "End App" msgstr "Anwendung beenden" -#: src/ui/pages/applications/mod.rs:1470 +#: src/ui/pages/applications/mod.rs:1467 #: data/resources/ui/pages/applications.ui:10 #: data/resources/ui/pages/applications.ui:30 msgid "Halt App" msgstr "Anwendung anhalten" -#: src/ui/pages/applications/mod.rs:1471 +#: src/ui/pages/applications/mod.rs:1468 #: data/resources/ui/pages/applications.ui:6 #: data/resources/ui/pages/applications.ui:26 msgid "Kill App" msgstr "Anwendung abwürgen" -#: src/ui/pages/applications/mod.rs:1472 +#: src/ui/pages/applications/mod.rs:1469 #: data/resources/ui/pages/applications.ui:14 #: data/resources/ui/pages/applications.ui:34 msgid "Continue App" @@ -447,51 +448,69 @@ msgstr "E: {} · S: {}" msgid "Processes" msgstr "Prozesse" -#: src/ui/pages/processes/mod.rs:757 +#: src/ui/pages/processes/mod.rs:790 msgid "Running Processes: {}" msgstr "Laufende Prozesse: {}" -#: src/ui/pages/processes/mod.rs:845 +#: src/ui/pages/processes/mod.rs:892 msgid "Process" msgstr "Prozess" -#: src/ui/pages/processes/mod.rs:906 +#: src/ui/pages/processes/mod.rs:953 #: data/resources/ui/dialogs/process_dialog.ui:177 #: data/resources/ui/dialogs/settings_dialog.ui:205 msgid "Process ID" msgstr "Prozess-ID" -#: src/ui/pages/processes/mod.rs:959 +#: src/ui/pages/processes/mod.rs:1006 #: data/resources/ui/dialogs/process_dialog.ui:204 #: data/resources/ui/dialogs/settings_dialog.ui:210 msgid "User" msgstr "Benutzer" -#: src/ui/pages/processes/mod.rs:1634 +#: src/ui/pages/processes/mod.rs:1681 #: data/resources/ui/dialogs/process_dialog.ui:145 #: data/resources/ui/dialogs/settings_dialog.ui:265 msgid "Total CPU Time" msgstr "Gesamte Prozessorzeit" -#: src/ui/pages/processes/mod.rs:1693 +#: src/ui/pages/processes/mod.rs:1740 #: data/resources/ui/dialogs/process_dialog.ui:154 #: data/resources/ui/dialogs/settings_dialog.ui:270 msgid "User CPU Time" msgstr "Benutzerprozessorzeit" -#: src/ui/pages/processes/mod.rs:1752 +#: src/ui/pages/processes/mod.rs:1799 #: data/resources/ui/dialogs/process_dialog.ui:163 #: data/resources/ui/dialogs/settings_dialog.ui:275 msgid "System CPU Time" msgstr "Systemprozessorzeit" -#: src/ui/pages/processes/mod.rs:1811 +#: src/ui/pages/processes/mod.rs:1858 #: data/resources/ui/dialogs/process_options_dialog.ui:87 #: data/resources/ui/dialogs/settings_dialog.ui:280 msgid "Priority" msgstr "Priorität" -#: src/ui/pages/processes/mod.rs:1887 +#: src/ui/pages/processes/mod.rs:1934 +msgid "End process?" +msgid_plural "End {} processes?" +msgstr[0] "Prozess beenden?" +msgstr[1] "{} Prozesse beenden?" + +#: src/ui/pages/processes/mod.rs:1940 +msgid "Halt process?" +msgid_plural "Halt {} processes?" +msgstr[0] "Prozess anhalten?" +msgstr[1] "{} Prozesse anhalten?" + +#: src/ui/pages/processes/mod.rs:1946 src/ui/pages/processes/mod.rs:1952 +msgid "Kill process?" +msgid_plural "Kill {} processes?" +msgstr[0] "Prozess abwürgen?" +msgstr[1] "{} Prozesse abwürgen?" + +#: src/ui/pages/processes/mod.rs:1963 msgid "" "Halting a process can come with serious risks such as losing data and " "security implications. Use with caution." @@ -499,7 +518,7 @@ msgstr "" "Das Anhalten eines Prozesses ist mit Risiken wie dem Verlust von Daten sowie " "Sicherheitsproblemen verbunden. Sie sollten vorsichtig sein." -#: src/ui/pages/processes/mod.rs:1888 +#: src/ui/pages/processes/mod.rs:1964 msgid "" "Killing a process can come with serious risks such as losing data and " "security implications. Use with caution." @@ -507,235 +526,259 @@ msgstr "" "Das Abwürgen eines Prozesses ist mit Risiken wie dem Verlust von Daten sowie " "Sicherheitsproblemen verbunden. Sie sollten vorsichtig sein." -#: src/ui/pages/processes/mod.rs:1895 data/resources/ui/pages/processes.ui:22 +#: src/ui/pages/processes/mod.rs:1971 data/resources/ui/pages/processes.ui:22 #: data/resources/ui/pages/processes.ui:146 msgid "End Process" msgstr "Prozess beenden" -#: src/ui/pages/processes/mod.rs:1896 data/resources/ui/pages/processes.ui:10 +#: src/ui/pages/processes/mod.rs:1972 data/resources/ui/pages/processes.ui:10 #: data/resources/ui/pages/processes.ui:30 msgid "Halt Process" msgstr "Prozess anhalten" -#: src/ui/pages/processes/mod.rs:1897 data/resources/ui/pages/processes.ui:6 +#: src/ui/pages/processes/mod.rs:1973 data/resources/ui/pages/processes.ui:6 #: data/resources/ui/pages/processes.ui:26 msgid "Kill Process" msgstr "Prozess abwürgen" -#: src/ui/pages/processes/mod.rs:1898 data/resources/ui/pages/processes.ui:14 +#: src/ui/pages/processes/mod.rs:1974 data/resources/ui/pages/processes.ui:14 #: data/resources/ui/pages/processes.ui:34 msgid "Continue Process" msgstr "Prozess fortsetzen" -#: src/ui/window.rs:301 +#: src/ui/window.rs:302 msgid "GPU {}" msgstr "GPU {}" -#: src/ui/window.rs:916 +#: src/ui/window.rs:950 msgid "Successfully adjusted {}" msgstr "{} wurde erfolgreich angepasst" -#: src/ui/window.rs:917 +#: src/ui/window.rs:951 msgid "There was a problem adjusting {}" msgstr "Es gab ein Problem beim Anpassen von {}" -#: src/ui/window.rs:997 +#: src/ui/window.rs:1031 msgid "Successfully ended {}" msgstr "{} wurde erfolgreich beendet" -#: src/ui/window.rs:998 +#: src/ui/window.rs:1032 msgid "Successfully halted {}" msgstr "{} wurde erfolgreich angehalten" -#: src/ui/window.rs:999 +#: src/ui/window.rs:1033 msgid "Successfully killed {}" msgstr "{} wurde erfolgreich abgewürgt" -#: src/ui/window.rs:1000 +#: src/ui/window.rs:1034 msgid "Successfully continued {}" msgstr "{} wurde erfolgreich fortgesetzt" -#: src/ui/window.rs:1007 +#: src/ui/window.rs:1041 +msgid "Successfully ended the process" +msgid_plural "Successfully ended {} processes" +msgstr[0] "Prozess wurde erfolgreich beendet" +msgstr[1] "{} Prozesse wurden erfolgreich beendet" + +#: src/ui/window.rs:1047 +msgid "Successfully halted the process" +msgid_plural "Successfully halted {} processes" +msgstr[0] "Prozess wurde erfolgreich angehalten" +msgstr[1] "{} Prozesse wurden erfolgreich angehalten" + +#: src/ui/window.rs:1053 +msgid "Successfully killed the process" +msgid_plural "Successfully killed {} processes" +msgstr[0] "Prozess wurde erfolgreich abgewürgt" +msgstr[1] "{} Prozesse wurden erfolgreich abgewürgt" + +#: src/ui/window.rs:1059 +msgid "Successfully continued the process" +msgid_plural "Successfully continued {} processes" +msgstr[0] "Prozess wurde erfolgreich fortgesetzt" +msgstr[1] "{} Prozesse wurden erfolgreich fortgesetzt" + +#: src/ui/window.rs:1070 msgid "There was a problem ending a process" msgid_plural "There were problems ending {} processes" msgstr[0] "Es gab ein Problem beim Beenden von {} Prozessen" msgstr[1] "Es gab ein Problem beim Beenden eines Prozesses" -#: src/ui/window.rs:1013 +#: src/ui/window.rs:1076 msgid "There was a problem halting a process" msgid_plural "There were problems halting {} processes" msgstr[0] "Es gab ein Problem beim Anhalten von {} Prozessen" msgstr[1] "Es gab ein Problem beim Anhalten eines Prozesses" -#: src/ui/window.rs:1019 +#: src/ui/window.rs:1082 msgid "There was a problem killing a process" msgid_plural "There were problems killing {} processes" msgstr[0] "Es gab ein Problem beim Abwürgen von {} Prozessen" msgstr[1] "Es gab ein Problem beim Abwürgen eines Prozesses" -#: src/ui/window.rs:1025 +#: src/ui/window.rs:1088 msgid "There was a problem continuing a process" msgid_plural "There were problems continuing {} processes" msgstr[0] "Es gab ein Problem beim Fortsetzen von {} Prozessen" msgstr[1] "Es gab ein Problem beim Fortsetzen eines Prozesses" -#: src/ui/window.rs:1035 +#: src/ui/window.rs:1098 msgid "There was a problem ending {}" msgstr "Es gab ein Problem beim Beenden von {}" -#: src/ui/window.rs:1036 +#: src/ui/window.rs:1099 msgid "There was a problem halting {}" msgstr "Es gab ein Problem beim Anhalten von {}" -#: src/ui/window.rs:1037 +#: src/ui/window.rs:1100 msgid "There was a problem killing {}" msgstr "Es gab ein Problem beim Abwürgen von {}" -#: src/ui/window.rs:1038 +#: src/ui/window.rs:1101 msgid "There was a problem continuing {}" msgstr "Es gab ein Problem beim Fortsetzen von {}" -#: src/utils/app.rs:220 +#: src/utils/app.rs:222 msgid "System Processes" msgstr "Systemprozesse" -#: src/utils/battery.rs:80 +#: src/utils/battery.rs:77 msgid "Charging" msgstr "Lädt" -#: src/utils/battery.rs:81 +#: src/utils/battery.rs:78 msgid "Discharging" msgstr "Entlädt" -#: src/utils/battery.rs:82 +#: src/utils/battery.rs:79 msgid "Empty" msgstr "Leer" -#: src/utils/battery.rs:83 +#: src/utils/battery.rs:80 msgid "Full" msgstr "Voll" -#: src/utils/battery.rs:84 +#: src/utils/battery.rs:81 msgid "Unknown" msgstr "Unbekannt" -#: src/utils/battery.rs:130 +#: src/utils/battery.rs:127 msgid "Nickel-Metal Hydride" msgstr "Nickel-Metallhydrid" -#: src/utils/battery.rs:131 +#: src/utils/battery.rs:128 msgid "Nickel-Cadmium" msgstr "Nickel-Cadmium" -#: src/utils/battery.rs:132 +#: src/utils/battery.rs:129 msgid "Nickel-Zinc" msgstr "Nickel-Zink" -#: src/utils/battery.rs:133 +#: src/utils/battery.rs:130 msgid "Lead-Acid" msgstr "Blei" -#: src/utils/battery.rs:134 +#: src/utils/battery.rs:131 msgid "Lithium-Ion" msgstr "Lithium-Ionen" -#: src/utils/battery.rs:135 +#: src/utils/battery.rs:132 msgid "Lithium Iron Phosphate" msgstr "Lithium-Eisenphosphat" -#: src/utils/battery.rs:136 +#: src/utils/battery.rs:133 msgid "Lithium Polymer" msgstr "Lithium-Polymer" -#: src/utils/battery.rs:138 +#: src/utils/battery.rs:135 msgid "Rechargeable Alkaline Managanese" msgstr "Wiederaufladbares Alkali-Mangan" -#: src/utils/battery.rs:232 +#: src/utils/battery.rs:229 msgid "{} Battery" msgstr "{}-Akku" -#: src/utils/battery.rs:234 +#: src/utils/battery.rs:231 msgid "Battery" msgstr "Akku" -#: src/utils/drive.rs:82 src/utils/drive.rs:153 +#: src/utils/drive.rs:81 src/utils/drive.rs:152 msgid "CD/DVD/Blu-ray Drive" msgstr "CD/DVD/Blu-ray-Laufwerk" -#: src/utils/drive.rs:83 +#: src/utils/drive.rs:82 msgid "eMMC Storage" msgstr "eMMC-Speicher" -#: src/utils/drive.rs:84 +#: src/utils/drive.rs:83 msgid "Flash Storage" msgstr "Flash-Speicher" -#: src/utils/drive.rs:85 src/utils/drive.rs:154 +#: src/utils/drive.rs:84 src/utils/drive.rs:153 msgid "Floppy Drive" msgstr "Diskettenlaufwerk" -#: src/utils/drive.rs:86 +#: src/utils/drive.rs:85 msgid "Hard Disk Drive" msgstr "Festplatte" -#: src/utils/drive.rs:87 +#: src/utils/drive.rs:86 msgid "Loop Device" msgstr "Loop Device" -#: src/utils/drive.rs:88 +#: src/utils/drive.rs:87 msgid "Mapped Device" msgstr "Mapped Device" -#: src/utils/drive.rs:89 +#: src/utils/drive.rs:88 msgid "NVMe Drive" msgstr "NVMe-Speicher" -#: src/utils/drive.rs:91 +#: src/utils/drive.rs:90 msgid "Software Raid" msgstr "Software-RAID" -#: src/utils/drive.rs:92 +#: src/utils/drive.rs:91 msgid "RAM Disk" msgstr "RAM-Disk" -#: src/utils/drive.rs:93 +#: src/utils/drive.rs:92 msgid "Solid State Drive" msgstr "Solid-State-Drive" -#: src/utils/drive.rs:94 +#: src/utils/drive.rs:93 msgid "ZFS Volume" msgstr "ZFS-Datenträger" -#: src/utils/drive.rs:95 +#: src/utils/drive.rs:94 msgid "Compressed RAM Disk (zram)" msgstr "Komprimierte RAM-Disk (zram)" -#: src/utils/drive.rs:155 +#: src/utils/drive.rs:154 msgid "{} Loop Device" msgstr "{} Loop Device" -#: src/utils/drive.rs:156 +#: src/utils/drive.rs:155 msgid "{} Mapped Device" msgstr "{} Mapped Device" -#: src/utils/drive.rs:157 +#: src/utils/drive.rs:156 msgid "{} RAID" msgstr "{}-RAID" -#: src/utils/drive.rs:158 +#: src/utils/drive.rs:157 msgid "{} RAM Disk" msgstr "{}-RAM-Disk" -#: src/utils/drive.rs:159 +#: src/utils/drive.rs:158 msgid "{} zram Device" msgstr "{}-zram-Speicher" -#: src/utils/drive.rs:160 +#: src/utils/drive.rs:159 msgid "{} ZFS Volume" msgstr "{}-ZFS-Volumen" -#: src/utils/drive.rs:161 +#: src/utils/drive.rs:160 msgid "{} Drive" msgstr "{}-Datenträger" @@ -1307,6 +1350,10 @@ msgstr "Kontrollgruppe" msgid "Process Options" msgstr "Prozessoptionen" +#: data/resources/ui/dialogs/process_options_dialog.ui:29 +msgid "Apply" +msgstr "Anwenden" + #: data/resources/ui/dialogs/process_options_dialog.ui:72 msgid "Niceness" msgstr "Nice-Wert" From 017adf1806f5915ae23b1d1906f2ecd9da30903c Mon Sep 17 00:00:00 2001 From: nokyan Date: Thu, 17 Oct 2024 12:27:47 +0200 Subject: [PATCH 05/11] Use saturating operations in more places --- lib/process_data/src/lib.rs | 17 +++++++++++------ src/ui/pages/drive.rs | 10 ++++++---- src/ui/widgets/graph.rs | 5 +++-- src/utils/app.rs | 8 +++++++- src/utils/cpu.rs | 12 +++++++----- src/utils/memory.rs | 8 ++++---- src/utils/process.rs | 5 ++++- 7 files changed, 42 insertions(+), 23 deletions(-) diff --git a/lib/process_data/src/lib.rs b/lib/process_data/src/lib.rs index 8603e003..b479ef21 100644 --- a/lib/process_data/src/lib.rs +++ b/lib/process_data/src/lib.rs @@ -284,7 +284,8 @@ impl ProcessData { }); }); - let memory_usage = (statm[1].parse::()? - statm[2].parse::()?) * *PAGESIZE; + let memory_usage = + (statm[1].parse::()? - statm[2].parse::()?).saturating_mul(*PAGESIZE); let starttime = stat[21 - 2].parse()?; @@ -498,17 +499,17 @@ impl ProcessData { .and_then(|captures| captures.get(1)) .and_then(|capture| capture.as_str().parse::().ok()) .unwrap_or_default() - * 1024; + .saturating_mul(1024); let gtt = RE_DRM_MEMORY_GTT .captures(&content) .and_then(|captures| captures.get(1)) .and_then(|capture| capture.as_str().parse::().ok()) .unwrap_or_default() - * 1024; + .saturating_mul(1024); let stats = GpuUsageStats { - gfx: gfx + compute, + gfx: gfx.saturating_add(compute), mem: vram.saturating_add(gtt), enc, dec, @@ -586,8 +587,12 @@ impl ProcessData { for (pci_slot, gpu) in NVML_DEVICES.iter() { return_map.insert( pci_slot.to_owned(), - gpu.process_utilization_stats(unix_as_millis() * 1000 - 5_000_000) - .unwrap_or_default(), + gpu.process_utilization_stats( + unix_as_millis() + .saturating_mul(1000) + .saturating_sub(5_000_000), + ) + .unwrap_or_default(), ); } diff --git a/src/ui/pages/drive.rs b/src/ui/pages/drive.rs index 7a8b7bd6..bcf8c173 100644 --- a/src/ui/pages/drive.rs +++ b/src/ui/pages/drive.rs @@ -349,7 +349,8 @@ impl ResDrive { ) { let delta_read_sectors = read_sectors.saturating_sub(*old_read_sectors); - let read_speed = (delta_read_sectors * Self::SECTOR_SIZE) as f64 / time_passed; + let read_speed = + (delta_read_sectors.saturating_mul(Self::SECTOR_SIZE)) as f64 / time_passed; imp.read_speed.graph().set_visible(true); imp.read_speed.graph().push_data_point(read_speed); @@ -379,7 +380,8 @@ impl ResDrive { ) { let delta_write_sectors = write_sectors.saturating_sub(*old_write_sectors); - let write_speed = (delta_write_sectors * Self::SECTOR_SIZE) as f64 / time_passed; + let write_speed = + (delta_write_sectors.saturating_mul(Self::SECTOR_SIZE)) as f64 / time_passed; imp.read_speed.graph().set_visible(true); imp.write_speed.graph().push_data_point(write_speed); @@ -408,11 +410,11 @@ impl ResDrive { disk_stats.get("write_sectors"), ) { imp.total_read.set_subtitle(&convert_storage( - (read_sectors * Self::SECTOR_SIZE) as f64, + (read_sectors.saturating_mul(Self::SECTOR_SIZE)) as f64, false, )); imp.total_written.set_subtitle(&convert_storage( - (write_sectors * Self::SECTOR_SIZE) as f64, + (write_sectors.saturating_mul(Self::SECTOR_SIZE)) as f64, false, )); } else { diff --git a/src/ui/widgets/graph.rs b/src/ui/widgets/graph.rs index f4d60f53..90cac715 100644 --- a/src/ui/widgets/graph.rs +++ b/src/ui/widgets/graph.rs @@ -90,7 +90,8 @@ mod imp { let data_points = self.data_points.borrow(); let color = self.graph_color.get(); - let start_point = (MAX_DATA_POINTS - SETTINGS.graph_data_points()) as usize; + let start_point = + (MAX_DATA_POINTS.saturating_sub(SETTINGS.graph_data_points())) as usize; let root = backend.into_drawing_area(); @@ -169,7 +170,7 @@ impl ResGraph { pub fn get_highest_value(&self) -> f64 { let imp = self.imp(); - let start_point = (MAX_DATA_POINTS - SETTINGS.graph_data_points()) as usize; + let start_point = (MAX_DATA_POINTS.saturating_sub(SETTINGS.graph_data_points())) as usize; *imp.data_points .borrow() diff --git a/src/utils/app.rs b/src/utils/app.rs index 805c37f3..34f23548 100644 --- a/src/utils/app.rs +++ b/src/utils/app.rs @@ -811,7 +811,13 @@ impl AppsContext { _ => None, }, ) - .reduce(|sum, current| (sum.0 + current.0, sum.1 + current.1)) // sum them up + .reduce(|sum, current| { + // sum them up + ( + sum.0.saturating_add(current.0), + sum.1.saturating_add(current.1), + ) + }) .unwrap_or((0, 0)); // if there were no processes, it's 0 for both app.read_bytes_from_dead_processes += read_dead; diff --git a/src/utils/cpu.rs b/src/utils/cpu.rs index 05a49a6e..b4783406 100644 --- a/src/utils/cpu.rs +++ b/src/utils/cpu.rs @@ -174,7 +174,7 @@ pub fn cpu_info() -> Result { captures .get(1) .and_then(|capture| capture.as_str().parse::().ok()) - .map(|int| int * sockets.unwrap_or(1)) + .map(|int| int.saturating_mul(sockets.unwrap_or(1))) }); let virtualization = RE_LSCPU_VIRTUALIZATION @@ -229,10 +229,12 @@ fn parse_proc_stat_line>(line: S) -> Result<(u64, u64)> { .name("idle") .and_then(|x| x.as_str().parse::().ok()) .ok_or_else(|| anyhow!("unable to get idle time"))? - + captures - .name("iowait") - .and_then(|x| x.as_str().parse::().ok()) - .ok_or_else(|| anyhow!("unable to get iowait time"))?; + .saturating_add( + captures + .name("iowait") + .and_then(|x| x.as_str().parse::().ok()) + .ok_or_else(|| anyhow!("unable to get iowait time"))?, + ); let sum = captures .iter() .skip(1) diff --git a/src/utils/memory.rs b/src/utils/memory.rs index 57a72ba1..ecb7450f 100644 --- a/src/utils/memory.rs +++ b/src/utils/memory.rs @@ -69,7 +69,7 @@ impl MemoryData { .as_str() .parse::() .context("unable to parse MemTotal") - .map(|int| int * 1024) + .map(|int| int.saturating_mul(1024)) }) })?; @@ -85,7 +85,7 @@ impl MemoryData { .as_str() .parse::() .context("unable to parse MemAvailable") - .map(|int| int * 1024) + .map(|int| int.saturating_mul(1024)) }) })?; @@ -101,7 +101,7 @@ impl MemoryData { .as_str() .parse::() .context("unable to parse SwapTotal") - .map(|int| int * 1024) + .map(|int| int.saturating_mul(1024)) }) })?; @@ -117,7 +117,7 @@ impl MemoryData { .as_str() .parse::() .context("unable to parse SwapFree") - .map(|int| int * 1024) + .map(|int| int.saturating_mul(1024)) }) })?; diff --git a/src/utils/process.rs b/src/utils/process.rs index bfdb6cdb..fa24ac06 100644 --- a/src/utils/process.rs +++ b/src/utils/process.rs @@ -330,7 +330,10 @@ impl Process { * 1000.0; let delta_time = self.data.timestamp.saturating_sub(self.timestamp_last); - (delta_cpu_time / (delta_time * *TICK_RATE as u64 * *NUM_CPUS as u64) as f32) + (delta_cpu_time + / (delta_time + .saturating_mul(*TICK_RATE as u64) + .saturating_mul(*NUM_CPUS as u64)) as f32) .finite_or_default() } } From b18e5ca137bd0e5cfb66a06bfaab3f750c222f3c Mon Sep 17 00:00:00 2001 From: nokyan Date: Fri, 18 Oct 2024 19:48:04 +0200 Subject: [PATCH 06/11] Adapt buttons and context menus for process selections greater than 1 --- data/resources/ui/pages/processes.ui | 40 ++++++++++++++++++ src/ui/pages/applications/mod.rs | 18 ++++---- src/ui/pages/processes/mod.rs | 63 +++++++++++++++++++++------- src/ui/window.rs | 4 +- 4 files changed, 99 insertions(+), 26 deletions(-) diff --git a/data/resources/ui/pages/processes.ui b/data/resources/ui/pages/processes.ui index 0fb00ea7..81b7b639 100644 --- a/data/resources/ui/pages/processes.ui +++ b/data/resources/ui/pages/processes.ui @@ -16,6 +16,22 @@ + +
+ + Kill Processes + processes.kill-process + + + Halt Processes + processes.halt-process + + + Continue Processes + processes.continue-process + +
+
@@ -48,11 +64,35 @@
+ +
+ + End Processes + processes.end-process + + + Kill Processes + processes.kill-process + + + Halt Processes + processes.halt-process + + + Continue Processes + processes.continue-process + +
+