Commit 12cd32ac authored by Bilal Elmoussaoui's avatar Bilal Elmoussaoui

Update to latest gtk4-rs release

parent 940a3e10
...@@ -6,9 +6,9 @@ edition = "2021" ...@@ -6,9 +6,9 @@ edition = "2021"
[dependencies] [dependencies]
gtk = { package = "gtk4", version = "0.6", features= ["gnome_44"]} gtk = { package = "gtk4", version = "0.7", features= ["gnome_45"]}
log = "0.4" log = "0.4"
gettext-rs = { version = "0.7", features = ["gettext-system"] } gettext-rs = { version = "0.7", features = ["gettext-system"] }
adw = {package = "libadwaita", version = "0.4"} adw = {package = "libadwaita", version = "0.5"}
pretty_env_logger = "0.5" pretty_env_logger = "0.5"
regex = "1.5" regex = "1.5"
...@@ -38,22 +38,11 @@ mod imp { ...@@ -38,22 +38,11 @@ mod imp {
} }
} }
#[glib::derived_properties]
impl ObjectImpl for ImagePageWidget { impl ObjectImpl for ImagePageWidget {
fn dispose(&self) { fn dispose(&self) {
self.container.unparent(); self.container.unparent();
} }
fn properties() -> &'static [glib::ParamSpec] {
Self::derived_properties()
}
fn set_property(&self, id: usize, value: &glib::Value, pspec: &glib::ParamSpec) {
self.derived_set_property(id, value, pspec)
}
fn property(&self, id: usize, pspec: &glib::ParamSpec) -> glib::Value {
self.derived_property(id, pspec)
}
} }
impl WidgetImpl for ImagePageWidget {} impl WidgetImpl for ImagePageWidget {}
......
...@@ -97,13 +97,13 @@ impl PaginatorWidget { ...@@ -97,13 +97,13 @@ impl PaginatorWidget {
} }
#[template_callback] #[template_callback]
fn on_key_pressed(&self, keyval: gdk::Key) -> gtk::Inhibit { fn on_key_pressed(&self, keyval: gdk::Key) -> glib::ControlFlow {
if keyval == gdk::Key::Right { if keyval == gdk::Key::Right {
self.try_next(); self.try_next();
} else if keyval == gdk::Key::Left { } else if keyval == gdk::Key::Left {
self.try_previous(); self.try_previous();
} }
gtk::Inhibit(false) glib::ControlFlow::Continue
} }
#[template_callback] #[template_callback]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment