mirror of
https://github.com/YGGverse/Yoda.git
synced 2025-02-10 10:24:13 +00:00
rename widget struct entity
This commit is contained in:
parent
daf276c006
commit
3d44bcb754
@ -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);
|
||||
|
@ -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
|
||||
}
|
||||
}
|
||||
|
@ -43,7 +43,7 @@ fn main() -> glib::ExitCode {
|
||||
move |this: &Application| {
|
||||
browser::Browser::new(this, db.clone(), 640, 480)
|
||||
.widget()
|
||||
.gtk()
|
||||
.window()
|
||||
.present();
|
||||
}
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user