remove extra methods

This commit is contained in:
yggverse 2024-11-11 00:04:19 +02:00
parent 41ccee209f
commit 12fa47f8f9
6 changed files with 106 additions and 105 deletions

View file

@ -10,7 +10,10 @@ use crate::app::browser::action::Action as BrowserAction;
use crate::app::browser::window::action::Action as WindowAction;
use crate::app::browser::window::tab::action::Action as TabAction;
use adw::{TabPage, TabView};
use gtk::glib::{uuid_string_random, GString};
use gtk::{
glib::{uuid_string_random, GString},
prelude::EditableExt,
};
use sqlite::Transaction;
use std::rc::Rc;
@ -63,26 +66,6 @@ impl Item {
}
// Actions
pub fn page_home(&self) {
self.page.home()
}
pub fn page_history_back(&self) {
self.page.history_back()
}
pub fn page_history_forward(&self) {
self.page.history_forward()
}
pub fn page_reload(&self) {
self.page.reload()
}
pub fn page_navigation_request_grab_focus(&self) {
self.page.navigation_request_grab_focus()
}
pub fn update(&self) {
// Update child components
self.page.update();
@ -188,14 +171,24 @@ impl Item {
// Setters
pub fn set_page_navigation_request_text(&self, value: &str) {
self.page.set_navigation_request_text(value);
self.page
.navigation()
.request()
.widget()
.gobject()
.set_text(value);
}
// Getters
pub fn id(&self) -> GString {
self.id.clone()
}
pub fn page(&self) -> &Rc<Page> {
&self.page
}
pub fn page_is_loading(&self) -> bool {
self.page.is_loading()
}