diff --git a/src/app/browser/window/tab/item/identity/gemini/widget/form.rs b/src/app/browser/window/tab/item/identity/gemini/widget/form.rs index 4b088742..affb2609 100644 --- a/src/app/browser/window/tab/item/identity/gemini/widget/form.rs +++ b/src/app/browser/window/tab/item/identity/gemini/widget/form.rs @@ -18,7 +18,7 @@ use gtk::{prelude::BoxExt, Box, Orientation}; use std::rc::Rc; pub struct Form { - // pub widget_action: Rc, + // pub action_widget: Rc, pub drop: Rc, pub exit: Rc, pub file: Rc, @@ -32,11 +32,11 @@ impl Form { // Constructors /// Create new `Self` - pub fn new(profile: Rc, widget_action: Rc, auth_url: &str) -> Self { + pub fn new(profile: Rc, action_widget: Rc, auth_url: &str) -> Self { // Init components - let list = Rc::new(List::new(widget_action.clone(), profile.clone(), auth_url)); - let file = Rc::new(File::new(widget_action.clone())); - let name = Rc::new(Name::new(widget_action.clone())); + let list = Rc::new(List::new(action_widget.clone(), profile.clone(), auth_url)); + let file = Rc::new(File::new(action_widget.clone())); + let name = Rc::new(Name::new(action_widget.clone())); let save = Rc::new(Save::new(profile.clone(), list.clone())); let drop = Rc::new(Drop::new(profile.clone(), list.clone())); let exit = Rc::new(Exit::new(profile.clone(), list.clone())); @@ -53,7 +53,7 @@ impl Form { // Return activated `Self` Self { - // widget_action, + // action_widget, drop, exit, file, diff --git a/src/app/browser/window/tab/item/identity/gemini/widget/form/file.rs b/src/app/browser/window/tab/item/identity/gemini/widget/form/file.rs index 7bcdf477..54617b23 100644 --- a/src/app/browser/window/tab/item/identity/gemini/widget/form/file.rs +++ b/src/app/browser/window/tab/item/identity/gemini/widget/form/file.rs @@ -21,7 +21,7 @@ impl File { // Constructors /// Create new `Self` - pub fn new(widget_action: Rc) -> Self { + pub fn new(action_widget: Rc) -> Self { // Init PEM let pem = Rc::new(RefCell::new(None)); @@ -35,9 +35,9 @@ impl File { // Init events button.connect_clicked({ + let action_widget = action_widget.clone(); let button = button.clone(); let pem = pem.clone(); - let widget_action = widget_action.clone(); move |_| { // Lock open button (prevent double click) button.set_sensitive(false); @@ -61,9 +61,9 @@ impl File { .default_filter(&filter_pem) .build() .open(None::<&Window>, None::<&Cancellable>, { + let action_widget = action_widget.clone(); let button = button.clone(); let pem = pem.clone(); - let widget_action = widget_action.clone(); move |result| { match result { Ok(file) => match file.path() { @@ -89,7 +89,7 @@ impl File { } } button.set_sensitive(true); // unlock - widget_action.update.activate() + action_widget.update.activate() } }); } diff --git a/src/app/browser/window/tab/item/identity/gemini/widget/form/list.rs b/src/app/browser/window/tab/item/identity/gemini/widget/form/list.rs index 7b6547a3..e32145b8 100644 --- a/src/app/browser/window/tab/item/identity/gemini/widget/form/list.rs +++ b/src/app/browser/window/tab/item/identity/gemini/widget/form/list.rs @@ -25,7 +25,7 @@ impl List { // Constructors /// Create new `Self` - pub fn new(widget_action: Rc, profile: Rc, auth_url: &str) -> Self { + pub fn new(action_widget: Rc, profile: Rc, auth_url: &str) -> Self { // Init model let list_store = ListStore::new::(); @@ -134,7 +134,7 @@ impl List { .build(); // Connect events - dropdown.connect_selected_notify(move |_| widget_action.update.activate()); + dropdown.connect_selected_notify(move |_| action_widget.update.activate()); // Return activated `Self` Self { diff --git a/src/app/browser/window/tab/item/identity/gemini/widget/form/name.rs b/src/app/browser/window/tab/item/identity/gemini/widget/form/name.rs index e1cace63..83201690 100644 --- a/src/app/browser/window/tab/item/identity/gemini/widget/form/name.rs +++ b/src/app/browser/window/tab/item/identity/gemini/widget/form/name.rs @@ -19,7 +19,7 @@ impl Name { // Constructors /// Create new `Self` - pub fn new(widget_action: Rc) -> Self { + pub fn new(action_widget: Rc) -> Self { // Init main gobject let entry = Entry::builder() .margin_top(MARGIN) @@ -29,7 +29,7 @@ impl Name { .build(); // Init events - entry.connect_changed(move |_| widget_action.update.activate()); + entry.connect_changed(move |_| action_widget.update.activate()); // Return activated `Self` Self { entry }