rename widget struct entity

This commit is contained in:
yggverse 2024-09-23 14:02:42 +03:00
parent daf276c006
commit 3d44bcb754
3 changed files with 6 additions and 6 deletions

View File

@ -40,7 +40,7 @@ impl Browser {
);
// Init actions @TODO separated module
widget.gtk().add_action_entries([
widget.window().add_action_entries([
ActionEntry::builder("debug")
.activate(|this: &ApplicationWindow, _, _| {
this.emit_enable_debugging(true);

View File

@ -1,7 +1,7 @@
use gtk::{Application, ApplicationWindow, Box, HeaderBar};
pub struct Browser {
gtk: ApplicationWindow,
window: ApplicationWindow,
}
impl Browser {
@ -13,7 +13,7 @@ impl Browser {
default_height: i32,
) -> Browser {
Self {
gtk: ApplicationWindow::builder()
window: ApplicationWindow::builder()
.application(application)
.default_width(default_width)
.default_height(default_height)
@ -23,7 +23,7 @@ impl Browser {
}
}
pub fn gtk(&self) -> &ApplicationWindow {
&self.gtk
pub fn window(&self) -> &ApplicationWindow {
&self.window
}
}

View File

@ -43,7 +43,7 @@ fn main() -> glib::ExitCode {
move |this: &Application| {
browser::Browser::new(this, db.clone(), 640, 480)
.widget()
.gtk()
.window()
.present();
}
});