1
0
Fork 0
mirror of https://github.com/Zedfrigg/ironbar.git synced 2025-09-16 11:46:58 +02:00

Rename launch_command to open_program & move it to desktop_file.rs

This commit is contained in:
Username404-59 2025-06-22 18:31:22 +02:00
commit d891893101
No known key found for this signature in database
GPG key ID: F3A1878B14F5F0D7
4 changed files with 28 additions and 27 deletions

View file

@ -8,8 +8,9 @@ use super::{Module, ModuleInfo, ModuleParts, ModulePopup, ModuleUpdateEvent, Wid
use crate::channels::{AsyncSenderExt, BroadcastReceiverExt};
use crate::clients::wayland::{self, ToplevelEvent};
use crate::config::{
CommonConfig, EllipsizeMode, LayoutConfig, TruncateMode, default_launch_command, launch_command,
CommonConfig, EllipsizeMode, LayoutConfig, TruncateMode, default_launch_command,
};
use crate::desktop_file::open_program;
use crate::gtk_helpers::{IronbarGtkExt, IronbarLabelExt};
use crate::modules::launcher::item::ImageTextButton;
use crate::modules::launcher::pagination::{IconContext, Pagination};
@ -387,7 +388,7 @@ impl Module<gtk::Box> for LauncherModule {
if let ItemEvent::OpenItem(app_id) = event {
match desktop_files.find(&app_id).await {
Ok(Some(file)) => {
launch_command(&file.file_name, &launch_command_str);
open_program(&file.file_name, &launch_command_str);
}
Ok(None) => warn!("Could not find applications file for {}", app_id),
Err(err) => error!("Failed to find parse file for {}: {}", app_id, err),