diff --git a/src/browser/main/tab.rs b/src/browser/main/tab.rs index cf5742a4..f129099b 100644 --- a/src/browser/main/tab.rs +++ b/src/browser/main/tab.rs @@ -122,7 +122,7 @@ impl Tab { } if page_navigation_request_text.is_none() { - page.grab_navigation_request_focus(); + page.navigation_request_grab_focus(); } // Result diff --git a/src/browser/main/tab/page.rs b/src/browser/main/tab/page.rs index 54395d26..49d32294 100644 --- a/src/browser/main/tab/page.rs +++ b/src/browser/main/tab/page.rs @@ -116,8 +116,8 @@ impl Page { } // Actions - pub fn grab_navigation_request_focus(&self) { - self.navigation.grab_request_focus(); + pub fn navigation_request_grab_focus(&self) { + self.navigation.request_grab_focus(); } pub fn navigation_base(&self) { @@ -127,13 +127,13 @@ impl Page { } pub fn navigation_history_back(&self) { - if let Some(url) = self.navigation.history_try_back() { + if let Some(url) = self.navigation.history_back() { self.action_page_open.activate(Some(&url.to_variant())); } } pub fn navigation_history_forward(&self) { - if let Some(url) = self.navigation.history_try_forward() { + if let Some(url) = self.navigation.history_forward() { self.action_page_open.activate(Some(&url.to_variant())); } } diff --git a/src/browser/main/tab/page/navigation.rs b/src/browser/main/tab/page/navigation.rs index c34056f4..a54d6cde 100644 --- a/src/browser/main/tab/page/navigation.rs +++ b/src/browser/main/tab/page/navigation.rs @@ -81,7 +81,7 @@ impl Navigation { } // Actions - pub fn grab_request_focus(&self) { + pub fn request_grab_focus(&self) { self.request.widget().grab_focus(); } @@ -89,12 +89,12 @@ impl Navigation { self.history.add(request, true); } - pub fn history_try_back(&self) -> Option { - self.history.try_back(true) + pub fn history_back(&self) -> Option { + self.history.back(true) } - pub fn history_try_forward(&self) -> Option { - self.history.try_forward(true) + pub fn history_forward(&self) -> Option { + self.history.forward(true) } pub fn update(&self, progress_fraction: Option) { diff --git a/src/browser/main/tab/page/navigation/history.rs b/src/browser/main/tab/page/navigation/history.rs index 72a07b36..91af9acf 100644 --- a/src/browser/main/tab/page/navigation/history.rs +++ b/src/browser/main/tab/page/navigation/history.rs @@ -76,7 +76,7 @@ impl History { } } - pub fn try_back(&self, follow_to_index: bool) -> Option { + pub fn back(&self, follow_to_index: bool) -> Option { if let Some(index) = self.index.borrow().as_ref() { if let Some(memory) = self.memory.borrow().get(index - 1) { if follow_to_index { @@ -88,7 +88,7 @@ impl History { None } - pub fn try_forward(&self, follow_to_index: bool) -> Option { + pub fn forward(&self, follow_to_index: bool) -> Option { if let Some(index) = self.index.borrow().as_ref() { if let Some(memory) = self.memory.borrow().get(index + 1) { if follow_to_index { @@ -101,12 +101,12 @@ impl History { } pub fn update(&self) { - match self.try_back(false) { + match self.back(false) { Some(_) => self.back.update(true), None => self.back.update(false), }; - match self.try_forward(false) { + match self.forward(false) { Some(_) => self.forward.update(true), None => self.forward.update(false), };