Skip to content

Commit 2ff4a77

Browse files
examples: Use IsA from prelude
1 parent 848f2fc commit 2ff4a77

File tree

4 files changed

+7
-7
lines changed
  • examples
    • composite_template/ex_application_window
    • custom_buildable/custom_buildable
    • gif_paintable/gif_paintable_window
    • video_player/video_player_window

4 files changed

+7
-7
lines changed

examples/composite_template/ex_application_window/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
mod imp;
22

3-
use gtk::{gio, glib, subclass::prelude::*};
3+
use gtk::{gio, glib, prelude::*, subclass::prelude::*};
44

55
glib::wrapper! {
66
pub struct ExApplicationWindow(ObjectSubclass<imp::ExApplicationWindow>)
@@ -9,7 +9,7 @@ glib::wrapper! {
99
}
1010

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

examples/custom_buildable/custom_buildable/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ glib::wrapper! {
99
}
1010

1111
impl CustomBuildable {
12-
pub fn add_suffix<T: glib::IsA<gtk::Widget>>(&self, widget: &T) {
12+
pub fn add_suffix<T: IsA<gtk::Widget>>(&self, widget: &T) {
1313
let imp = self.imp();
1414
imp.suffixes.append(widget);
1515
imp.suffixes.set_visible(true);
1616
}
1717

18-
pub fn add_prefix<T: glib::IsA<gtk::Widget>>(&self, widget: &T) {
18+
pub fn add_prefix<T: IsA<gtk::Widget>>(&self, widget: &T) {
1919
let imp = self.imp();
2020
imp.prefixes.append(widget);
2121
imp.prefixes.set_visible(true);

examples/gif_paintable/gif_paintable_window/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ glib::wrapper! {
1111
}
1212

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

examples/video_player/video_player_window/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
mod imp;
22

3-
use gtk::{gio, glib, subclass::prelude::*};
3+
use gtk::{gio, glib, prelude::*, subclass::prelude::*};
44

55
glib::wrapper! {
66
pub struct VideoPlayerWindow(ObjectSubclass<imp::VideoPlayerWindow>)
@@ -9,7 +9,7 @@ glib::wrapper! {
99
}
1010

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

0 commit comments

Comments
 (0)