mirror of
https://github.com/YGGverse/Yoda.git
synced 2025-02-11 10:54:14 +00:00
rename profile directory action
This commit is contained in:
parent
472aadb9d3
commit
b1f30fbd1e
@ -39,7 +39,7 @@ impl App {
|
|||||||
) -> Self {
|
) -> Self {
|
||||||
// Init actions
|
// Init actions
|
||||||
let action_tool_debug = Action::new("win", true);
|
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_quit = Action::new("win", true);
|
||||||
let action_update = Action::new("win", true);
|
let action_update = Action::new("win", true);
|
||||||
let action_tab_append = Action::new("win", true);
|
let action_tab_append = Action::new("win", true);
|
||||||
@ -84,7 +84,7 @@ impl App {
|
|||||||
let browser = Arc::new(Browser::new(
|
let browser = Arc::new(Browser::new(
|
||||||
profile_path,
|
profile_path,
|
||||||
action_tool_debug.simple(),
|
action_tool_debug.simple(),
|
||||||
action_tool_profile_directory.simple(),
|
action_tool_profile.simple(),
|
||||||
action_quit.simple(),
|
action_quit.simple(),
|
||||||
action_update.simple(),
|
action_update.simple(),
|
||||||
action_tab_append.simple(),
|
action_tab_append.simple(),
|
||||||
|
@ -28,7 +28,7 @@ impl Browser {
|
|||||||
profile_path: PathBuf,
|
profile_path: PathBuf,
|
||||||
// Actions
|
// Actions
|
||||||
action_tool_debug: Arc<SimpleAction>,
|
action_tool_debug: Arc<SimpleAction>,
|
||||||
action_tool_profile_directory: Arc<SimpleAction>,
|
action_tool_profile: Arc<SimpleAction>,
|
||||||
action_quit: Arc<SimpleAction>,
|
action_quit: Arc<SimpleAction>,
|
||||||
action_update: Arc<SimpleAction>,
|
action_update: Arc<SimpleAction>,
|
||||||
action_tab_append: Arc<SimpleAction>,
|
action_tab_append: Arc<SimpleAction>,
|
||||||
@ -42,7 +42,7 @@ impl Browser {
|
|||||||
) -> Browser {
|
) -> Browser {
|
||||||
let window = Arc::new(Window::new(
|
let window = Arc::new(Window::new(
|
||||||
action_tool_debug.clone(),
|
action_tool_debug.clone(),
|
||||||
action_tool_profile_directory.clone(),
|
action_tool_profile.clone(),
|
||||||
action_quit.clone(),
|
action_quit.clone(),
|
||||||
action_update.clone(),
|
action_update.clone(),
|
||||||
action_tab_append.clone(),
|
action_tab_append.clone(),
|
||||||
@ -60,9 +60,7 @@ impl Browser {
|
|||||||
|
|
||||||
// Assign actions
|
// Assign actions
|
||||||
widget.gobject().add_action(action_tool_debug.as_ref());
|
widget.gobject().add_action(action_tool_debug.as_ref());
|
||||||
widget
|
widget.gobject().add_action(action_tool_profile.as_ref());
|
||||||
.gobject()
|
|
||||||
.add_action(action_tool_profile_directory.as_ref());
|
|
||||||
widget.gobject().add_action(action_quit.as_ref());
|
widget.gobject().add_action(action_quit.as_ref());
|
||||||
widget.gobject().add_action(action_update.as_ref());
|
widget.gobject().add_action(action_update.as_ref());
|
||||||
widget.gobject().add_action(action_tab_append.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 |_, _| {
|
move |_, _| {
|
||||||
// @TODO [4_10] https://docs.gtk.org/gtk4/class.FileLauncher.html
|
// @TODO [4_10] https://docs.gtk.org/gtk4/class.FileLauncher.html
|
||||||
let _ = AppInfo::launch_default_for_uri(
|
let _ = AppInfo::launch_default_for_uri(
|
||||||
|
@ -24,7 +24,7 @@ impl Window {
|
|||||||
pub fn new(
|
pub fn new(
|
||||||
// Actions
|
// Actions
|
||||||
action_tool_debug: Arc<SimpleAction>,
|
action_tool_debug: Arc<SimpleAction>,
|
||||||
action_tool_profile_directory: Arc<SimpleAction>,
|
action_tool_profile: Arc<SimpleAction>,
|
||||||
action_quit: Arc<SimpleAction>,
|
action_quit: Arc<SimpleAction>,
|
||||||
action_update: Arc<SimpleAction>,
|
action_update: Arc<SimpleAction>,
|
||||||
action_tab_append: Arc<SimpleAction>,
|
action_tab_append: Arc<SimpleAction>,
|
||||||
@ -48,7 +48,7 @@ impl Window {
|
|||||||
let header = Header::new_arc(
|
let header = Header::new_arc(
|
||||||
// Actions
|
// Actions
|
||||||
action_tool_debug.clone(),
|
action_tool_debug.clone(),
|
||||||
action_tool_profile_directory.clone(),
|
action_tool_profile.clone(),
|
||||||
action_quit.clone(),
|
action_quit.clone(),
|
||||||
action_tab_append.clone(),
|
action_tab_append.clone(),
|
||||||
action_tab_close.clone(),
|
action_tab_close.clone(),
|
||||||
|
@ -17,7 +17,7 @@ impl Header {
|
|||||||
pub fn new_arc(
|
pub fn new_arc(
|
||||||
// Actions
|
// Actions
|
||||||
action_tool_debug: Arc<SimpleAction>,
|
action_tool_debug: Arc<SimpleAction>,
|
||||||
action_tool_profile_directory: Arc<SimpleAction>,
|
action_tool_profile: Arc<SimpleAction>,
|
||||||
action_quit: Arc<SimpleAction>,
|
action_quit: Arc<SimpleAction>,
|
||||||
action_tab_append: Arc<SimpleAction>,
|
action_tab_append: Arc<SimpleAction>,
|
||||||
action_tab_close: Arc<SimpleAction>,
|
action_tab_close: Arc<SimpleAction>,
|
||||||
@ -33,7 +33,7 @@ impl Header {
|
|||||||
// Init components
|
// Init components
|
||||||
let bar = Bar::new_arc(
|
let bar = Bar::new_arc(
|
||||||
action_tool_debug,
|
action_tool_debug,
|
||||||
action_tool_profile_directory,
|
action_tool_profile,
|
||||||
action_quit,
|
action_quit,
|
||||||
action_tab_append,
|
action_tab_append,
|
||||||
action_tab_close,
|
action_tab_close,
|
||||||
|
@ -22,7 +22,7 @@ impl Bar {
|
|||||||
// Construct
|
// Construct
|
||||||
pub fn new_arc(
|
pub fn new_arc(
|
||||||
action_tool_debug: Arc<SimpleAction>,
|
action_tool_debug: Arc<SimpleAction>,
|
||||||
action_tool_profile_directory: Arc<SimpleAction>,
|
action_tool_profile: Arc<SimpleAction>,
|
||||||
action_quit: Arc<SimpleAction>,
|
action_quit: Arc<SimpleAction>,
|
||||||
action_tab_append: Arc<SimpleAction>,
|
action_tab_append: Arc<SimpleAction>,
|
||||||
action_tab_close: Arc<SimpleAction>,
|
action_tab_close: Arc<SimpleAction>,
|
||||||
@ -40,7 +40,7 @@ impl Bar {
|
|||||||
let append = Append::new_arc(action_tab_append.clone());
|
let append = Append::new_arc(action_tab_append.clone());
|
||||||
let menu = Menu::new_arc(
|
let menu = Menu::new_arc(
|
||||||
action_tool_debug,
|
action_tool_debug,
|
||||||
action_tool_profile_directory,
|
action_tool_profile,
|
||||||
action_quit,
|
action_quit,
|
||||||
action_tab_append,
|
action_tab_append,
|
||||||
action_tab_close,
|
action_tab_close,
|
||||||
|
@ -18,7 +18,7 @@ pub struct Menu {
|
|||||||
impl Menu {
|
impl Menu {
|
||||||
pub fn new_arc(
|
pub fn new_arc(
|
||||||
action_tool_debug: Arc<SimpleAction>,
|
action_tool_debug: Arc<SimpleAction>,
|
||||||
action_tool_profile_directory: Arc<SimpleAction>,
|
action_tool_profile: Arc<SimpleAction>,
|
||||||
action_quit: Arc<SimpleAction>,
|
action_quit: Arc<SimpleAction>,
|
||||||
action_tab_append: Arc<SimpleAction>,
|
action_tab_append: Arc<SimpleAction>,
|
||||||
action_tab_close: Arc<SimpleAction>,
|
action_tab_close: Arc<SimpleAction>,
|
||||||
@ -63,7 +63,7 @@ impl Menu {
|
|||||||
|
|
||||||
let model_tool = gio::Menu::new();
|
let model_tool = gio::Menu::new();
|
||||||
model_tool.append(Some("Debug"), Some(&detailed_action_name(action_tool_debug)));
|
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);
|
model.append_submenu(Some("Tool"), &model_tool);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user