Skip to content

Commit

Permalink
examples: Use IsA from prelude
Browse files Browse the repository at this point in the history
  • Loading branch information
bilelmoussaoui committed Oct 16, 2023
1 parent 275fc44 commit 83c2bc1
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions examples/composite_template/ex_application_window/mod.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
mod imp;

use gtk::{gio, glib, subclass::prelude::*};
use gtk::{gio, glib, prelude::*, subclass::prelude::*};

glib::wrapper! {
pub struct ExApplicationWindow(ObjectSubclass<imp::ExApplicationWindow>)
Expand All @@ -9,7 +9,7 @@ glib::wrapper! {
}

impl ExApplicationWindow {
pub fn new<P: glib::IsA<gtk::Application>>(app: &P) -> Self {
pub fn new<P: IsA<gtk::Application>>(app: &P) -> Self {
glib::Object::builder().property("application", app).build()
}

Expand Down
4 changes: 2 additions & 2 deletions examples/custom_buildable/custom_buildable/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ glib::wrapper! {
}

impl CustomBuildable {
pub fn add_suffix<T: glib::IsA<gtk::Widget>>(&self, widget: &T) {
pub fn add_suffix<T: IsA<gtk::Widget>>(&self, widget: &T) {
let imp = self.imp();
imp.suffixes.append(widget);
imp.suffixes.set_visible(true);
}

pub fn add_prefix<T: glib::IsA<gtk::Widget>>(&self, widget: &T) {
pub fn add_prefix<T: IsA<gtk::Widget>>(&self, widget: &T) {
let imp = self.imp();
imp.prefixes.append(widget);
imp.prefixes.set_visible(true);
Expand Down
2 changes: 1 addition & 1 deletion examples/gif_paintable/gif_paintable_window/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ glib::wrapper! {
}

impl GifPaintableWindow {
pub fn new<P: glib::IsA<gtk::Application>>(app: &P) -> Self {
pub fn new<P: IsA<gtk::Application>>(app: &P) -> Self {
glib::Object::builder().property("application", app).build()
}

Expand Down
4 changes: 2 additions & 2 deletions examples/video_player/video_player_window/mod.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
mod imp;

use gtk::{gio, glib, subclass::prelude::*};
use gtk::{gio, glib, prelude::*, subclass::prelude::*};

glib::wrapper! {
pub struct VideoPlayerWindow(ObjectSubclass<imp::VideoPlayerWindow>)
Expand All @@ -9,7 +9,7 @@ glib::wrapper! {
}

impl VideoPlayerWindow {
pub fn new<P: glib::IsA<gtk::Application>>(app: &P) -> Self {
pub fn new<P: IsA<gtk::Application>>(app: &P) -> Self {
glib::Object::builder().property("application", app).build()
}

Expand Down

0 comments on commit 83c2bc1

Please sign in to comment.