diff --git a/src/app/browser/window/tab/item/page.rs b/src/app/browser/window/tab/item/page.rs index 58f5be4f..3824d60a 100644 --- a/src/app/browser/window/tab/item/page.rs +++ b/src/app/browser/window/tab/item/page.rs @@ -59,6 +59,7 @@ impl Page { action_tab_append.clone(), action_page_open.clone(), )); + let navigation = Navigation::new_arc( action_tab_page_navigation_base.clone(), action_tab_page_navigation_history_back.clone(), @@ -66,6 +67,7 @@ impl Page { action_tab_page_navigation_reload.clone(), action_update.clone(), ); + let widget = Widget::new_arc( action_page_open.clone(), &name, // ID @@ -81,17 +83,15 @@ impl Page { let navigation = navigation.clone(); let action_tab_page_navigation_reload = action_tab_page_navigation_reload.clone(); move |_, request| { - // Convert to GString - let request = GString::from( + // Update request + navigation.set_request_text( request .expect("Parameter required for `page.open` action") .get::() - .expect("Parameter does not match `String`"), + .expect("Parameter does not match `String`") + .as_str(), ); - // Update - navigation.set_request_text(&request); - // Reload page action_tab_page_navigation_reload.activate(None); } diff --git a/src/app/browser/window/tab/item/page/navigation.rs b/src/app/browser/window/tab/item/page/navigation.rs index 3323c32b..8e2d0d1b 100644 --- a/src/app/browser/window/tab/item/page/navigation.rs +++ b/src/app/browser/window/tab/item/page/navigation.rs @@ -158,7 +158,7 @@ impl Navigation { } // Setters - pub fn set_request_text(&self, value: &GString) { + pub fn set_request_text(&self, value: &str) { // Focus out from content area on activate the link @TODO self.widget.focus(); diff --git a/src/app/browser/window/tab/item/page/navigation/request.rs b/src/app/browser/window/tab/item/page/navigation/request.rs index f3f3705f..c63da418 100644 --- a/src/app/browser/window/tab/item/page/navigation/request.rs +++ b/src/app/browser/window/tab/item/page/navigation/request.rs @@ -94,7 +94,7 @@ impl Request { } // Setters - pub fn set_text(&self, value: &GString) { + pub fn set_text(&self, value: &str) { self.widget.set_text(value); } diff --git a/src/app/browser/window/tab/item/page/navigation/request/widget.rs b/src/app/browser/window/tab/item/page/navigation/request/widget.rs index ff1ef570..8b016ad1 100644 --- a/src/app/browser/window/tab/item/page/navigation/request/widget.rs +++ b/src/app/browser/window/tab/item/page/navigation/request/widget.rs @@ -181,7 +181,7 @@ impl Widget { } // Setters - pub fn set_text(&self, value: &GString) { + pub fn set_text(&self, value: &str) { self.gobject.set_text(value); }