From b1f30fbd1e29b1e9f19f36b077570a8fce08dc74 Mon Sep 17 00:00:00 2001 From: yggverse Date: Fri, 11 Oct 2024 08:04:29 +0300 Subject: [PATCH] rename profile directory action --- src/app.rs | 4 ++-- src/app/browser.rs | 10 ++++------ src/app/browser/window.rs | 4 ++-- src/app/browser/window/header.rs | 4 ++-- src/app/browser/window/header/bar.rs | 4 ++-- src/app/browser/window/header/bar/menu.rs | 4 ++-- 6 files changed, 14 insertions(+), 16 deletions(-) diff --git a/src/app.rs b/src/app.rs index ed44bd5c..b9e15800 100644 --- a/src/app.rs +++ b/src/app.rs @@ -39,7 +39,7 @@ impl App { ) -> Self { // Init actions let action_tool_debug = Action::new("win", true); - let action_tool_profile_directory = Action::new("win", true); + let action_tool_profile = Action::new("win", true); let action_quit = Action::new("win", true); let action_update = Action::new("win", true); let action_tab_append = Action::new("win", true); @@ -84,7 +84,7 @@ impl App { let browser = Arc::new(Browser::new( profile_path, action_tool_debug.simple(), - action_tool_profile_directory.simple(), + action_tool_profile.simple(), action_quit.simple(), action_update.simple(), action_tab_append.simple(), diff --git a/src/app/browser.rs b/src/app/browser.rs index 1cc7ef01..086ee42f 100644 --- a/src/app/browser.rs +++ b/src/app/browser.rs @@ -28,7 +28,7 @@ impl Browser { profile_path: PathBuf, // Actions action_tool_debug: Arc, - action_tool_profile_directory: Arc, + action_tool_profile: Arc, action_quit: Arc, action_update: Arc, action_tab_append: Arc, @@ -42,7 +42,7 @@ impl Browser { ) -> Browser { let window = Arc::new(Window::new( action_tool_debug.clone(), - action_tool_profile_directory.clone(), + action_tool_profile.clone(), action_quit.clone(), action_update.clone(), action_tab_append.clone(), @@ -60,9 +60,7 @@ impl Browser { // Assign actions widget.gobject().add_action(action_tool_debug.as_ref()); - widget - .gobject() - .add_action(action_tool_profile_directory.as_ref()); + widget.gobject().add_action(action_tool_profile.as_ref()); widget.gobject().add_action(action_quit.as_ref()); widget.gobject().add_action(action_update.as_ref()); widget.gobject().add_action(action_tab_append.as_ref()); @@ -90,7 +88,7 @@ impl Browser { } }); - action_tool_profile_directory.connect_activate({ + action_tool_profile.connect_activate({ move |_, _| { // @TODO [4_10] https://docs.gtk.org/gtk4/class.FileLauncher.html let _ = AppInfo::launch_default_for_uri( diff --git a/src/app/browser/window.rs b/src/app/browser/window.rs index 328bc5f3..9c4fc4a3 100644 --- a/src/app/browser/window.rs +++ b/src/app/browser/window.rs @@ -24,7 +24,7 @@ impl Window { pub fn new( // Actions action_tool_debug: Arc, - action_tool_profile_directory: Arc, + action_tool_profile: Arc, action_quit: Arc, action_update: Arc, action_tab_append: Arc, @@ -48,7 +48,7 @@ impl Window { let header = Header::new_arc( // Actions action_tool_debug.clone(), - action_tool_profile_directory.clone(), + action_tool_profile.clone(), action_quit.clone(), action_tab_append.clone(), action_tab_close.clone(), diff --git a/src/app/browser/window/header.rs b/src/app/browser/window/header.rs index 53bb061d..f0a2174b 100644 --- a/src/app/browser/window/header.rs +++ b/src/app/browser/window/header.rs @@ -17,7 +17,7 @@ impl Header { pub fn new_arc( // Actions action_tool_debug: Arc, - action_tool_profile_directory: Arc, + action_tool_profile: Arc, action_quit: Arc, action_tab_append: Arc, action_tab_close: Arc, @@ -33,7 +33,7 @@ impl Header { // Init components let bar = Bar::new_arc( action_tool_debug, - action_tool_profile_directory, + action_tool_profile, action_quit, action_tab_append, action_tab_close, diff --git a/src/app/browser/window/header/bar.rs b/src/app/browser/window/header/bar.rs index 3408bcae..4cc66052 100644 --- a/src/app/browser/window/header/bar.rs +++ b/src/app/browser/window/header/bar.rs @@ -22,7 +22,7 @@ impl Bar { // Construct pub fn new_arc( action_tool_debug: Arc, - action_tool_profile_directory: Arc, + action_tool_profile: Arc, action_quit: Arc, action_tab_append: Arc, action_tab_close: Arc, @@ -40,7 +40,7 @@ impl Bar { let append = Append::new_arc(action_tab_append.clone()); let menu = Menu::new_arc( action_tool_debug, - action_tool_profile_directory, + action_tool_profile, action_quit, action_tab_append, action_tab_close, diff --git a/src/app/browser/window/header/bar/menu.rs b/src/app/browser/window/header/bar/menu.rs index bdd91699..e208b463 100644 --- a/src/app/browser/window/header/bar/menu.rs +++ b/src/app/browser/window/header/bar/menu.rs @@ -18,7 +18,7 @@ pub struct Menu { impl Menu { pub fn new_arc( action_tool_debug: Arc, - action_tool_profile_directory: Arc, + action_tool_profile: Arc, action_quit: Arc, action_tab_append: Arc, action_tab_close: Arc, @@ -63,7 +63,7 @@ impl Menu { let model_tool = gio::Menu::new(); model_tool.append(Some("Debug"), Some(&detailed_action_name(action_tool_debug))); - model_tool.append(Some("Profile directory"), Some(&detailed_action_name(action_tool_profile_directory))); + model_tool.append(Some("Profile"), Some(&detailed_action_name(action_tool_profile))); model.append_submenu(Some("Tool"), &model_tool);