mirror of
https://github.com/YGGverse/Yoda.git
synced 2025-02-11 02:44:15 +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
|
// Init actions @TODO separated module
|
||||||
widget.gtk().add_action_entries([
|
widget.window().add_action_entries([
|
||||||
ActionEntry::builder("debug")
|
ActionEntry::builder("debug")
|
||||||
.activate(|this: &ApplicationWindow, _, _| {
|
.activate(|this: &ApplicationWindow, _, _| {
|
||||||
this.emit_enable_debugging(true);
|
this.emit_enable_debugging(true);
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
use gtk::{Application, ApplicationWindow, Box, HeaderBar};
|
use gtk::{Application, ApplicationWindow, Box, HeaderBar};
|
||||||
|
|
||||||
pub struct Browser {
|
pub struct Browser {
|
||||||
gtk: ApplicationWindow,
|
window: ApplicationWindow,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Browser {
|
impl Browser {
|
||||||
@ -13,7 +13,7 @@ impl Browser {
|
|||||||
default_height: i32,
|
default_height: i32,
|
||||||
) -> Browser {
|
) -> Browser {
|
||||||
Self {
|
Self {
|
||||||
gtk: ApplicationWindow::builder()
|
window: ApplicationWindow::builder()
|
||||||
.application(application)
|
.application(application)
|
||||||
.default_width(default_width)
|
.default_width(default_width)
|
||||||
.default_height(default_height)
|
.default_height(default_height)
|
||||||
@ -23,7 +23,7 @@ impl Browser {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn gtk(&self) -> &ApplicationWindow {
|
pub fn window(&self) -> &ApplicationWindow {
|
||||||
&self.gtk
|
&self.window
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -43,7 +43,7 @@ fn main() -> glib::ExitCode {
|
|||||||
move |this: &Application| {
|
move |this: &Application| {
|
||||||
browser::Browser::new(this, db.clone(), 640, 480)
|
browser::Browser::new(this, db.clone(), 640, 480)
|
||||||
.widget()
|
.widget()
|
||||||
.gtk()
|
.window()
|
||||||
.present();
|
.present();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user