Skip to content

Commit

Permalink
codegen: Use ObjectExt trait directly
Browse files Browse the repository at this point in the history
As it is exposed by glib prelude nowadays
  • Loading branch information
bilelmoussaoui committed Jul 6, 2023
1 parent 38d6899 commit f6b8437
Showing 1 changed file with 5 additions and 14 deletions.
19 changes: 5 additions & 14 deletions src/codegen/property_body.rs
@@ -1,8 +1,4 @@
use crate::{
chunk::Chunk,
env::Env,
nameutil::{use_glib_type, use_gtk_type},
};
use crate::{chunk::Chunk, env::Env, nameutil::use_gtk_type};

pub struct Builder<'a> {
name: String,
Expand Down Expand Up @@ -95,10 +91,8 @@ impl<'a> Builder<'a> {
};

vec![Chunk::Custom(format!(
"{}::property({}, \"{}\")",
use_glib_type(self.env, "ObjectExt"),
self_,
self.name
"ObjectExt::property({}, \"{}\")",
self_, self.name
))]
}
}
Expand Down Expand Up @@ -126,11 +120,8 @@ impl<'a> Builder<'a> {
};

vec![Chunk::Custom(format!(
"{}::set_property({},\"{}\", {})",
use_glib_type(self.env, "ObjectExt"),
self_,
self.name,
self.var_name
"ObjectExt::set_property({},\"{}\", {})",
self_, self.name, self.var_name
))]
}
}
Expand Down

0 comments on commit f6b8437

Please sign in to comment.