diff --git a/src/codegen/translate_from_glib.rs b/src/codegen/translate_from_glib.rs index f18e05b25..d30ccd75a 100644 --- a/src/codegen/translate_from_glib.rs +++ b/src/codegen/translate_from_glib.rs @@ -1,5 +1,4 @@ use analysis; -use analysis::namespaces; use analysis::rust_type::rust_type; use analysis::conversion_type::ConversionType; use chunk::conversion_from_glib::Mode; @@ -69,17 +68,10 @@ impl TranslateFromGlib for analysis::return_value::Info { (prefix, format!("{}.{}", from_glib_xxx.1, suffix_function)) } None if self.bool_return_is_error.is_some() => { - if env.namespaces.glib_ns_id == namespaces::MAIN { - ( - "error::BoolError::from_glib(".into(), - format!(", \"{}\")", self.bool_return_is_error.as_ref().unwrap()), - ) - } else { - ( - "glib::error::BoolError::from_glib(".into(), - format!(", \"{}\")", self.bool_return_is_error.as_ref().unwrap()), - ) - } + ( + "glib_result_from_gboolean!(".into(), + format!(", \"{}\")", self.bool_return_is_error.as_ref().unwrap()), + ) } None => Mode::from(par).translate_from_glib_as_function(env, array_length), },