summaryrefslogtreecommitdiff
path: root/gio/src
diff options
context:
space:
mode:
authorKjell Ahlstedt <kjell.ahlstedt@bredband.net>2015-03-17 10:33:18 +0100
committerKjell Ahlstedt <kjell.ahlstedt@bredband.net>2015-03-17 10:33:18 +0100
commitb28bc49e7af2b90d23bb4ea460ca15c8eaf0cc54 (patch)
treea250d06c6f705b47b658044844d2bf7c7d975f2d /gio/src
parent010a2d71e4379a12849d2cda742dfdc0a868d043 (diff)
downloadglibmm-b28bc49e7af2b90d23bb4ea460ca15c8eaf0cc54.tar.gz
Gio::Action, ActionGroup: Fix critical messages from vfuncs
* glib/glibmm/wrap.h: Add unwrap_copy(const T& obj). * gio/src/action.hg: * gio/src/actiongroup.hg: Make vfuncs that return a GVariant* use the new Glib::unwrap_copy() overload by adding the _WRAP_VFUNC parameter refreturn_ctype. It avoids a critical message if Glib::VariantBase:: gobj() == 0, which is not an error in these functions. Bug #705124.
Diffstat (limited to 'gio/src')
-rw-r--r--gio/src/action.hg6
-rw-r--r--gio/src/actiongroup.hg5
2 files changed, 4 insertions, 7 deletions
diff --git a/gio/src/action.hg b/gio/src/action.hg
index 207bb93a..eca98122 100644
--- a/gio/src/action.hg
+++ b/gio/src/action.hg
@@ -222,13 +222,11 @@ public:
_WRAP_VFUNC(Glib::VariantType get_parameter_type() const, "get_parameter_type", keep_return)
_WRAP_VFUNC(Glib::VariantType get_state_type() const, "get_state_type", keep_return)
-#m4 _CONVERSION(`Glib::VariantBase',`GVariant*',`$3.gobj_copy()')
-
- _WRAP_VFUNC(Glib::VariantBase get_state_hint() const, "get_state_hint")
+ _WRAP_VFUNC(Glib::VariantBase get_state_hint() const, "get_state_hint", refreturn_ctype)
_WRAP_VFUNC(bool get_enabled() const, "get_enabled")
- _WRAP_VFUNC(Glib::VariantBase get_state() const, "get_state")
+ _WRAP_VFUNC(Glib::VariantBase get_state() const, "get_state", refreturn_ctype)
#m4 _CONVERSION(`GVariant*',`const Glib::VariantBase&',`Glib::wrap($3, true)')
_WRAP_VFUNC(void change_state(const Glib::VariantBase& value), "change_state")
diff --git a/gio/src/actiongroup.hg b/gio/src/actiongroup.hg
index a7483bac..71385be6 100644
--- a/gio/src/actiongroup.hg
+++ b/gio/src/actiongroup.hg
@@ -152,9 +152,8 @@ public:
_WRAP_VFUNC(Glib::VariantType get_action_parameter_type(const Glib::ustring& name) const, "get_action_parameter_type", keep_return)
_WRAP_VFUNC(Glib::VariantType get_action_state_type(const Glib::ustring& name) const, "get_action_state_type", keep_return)
-#m4 _CONVERSION(`Glib::VariantBase',`GVariant*',`$3.gobj_copy()')
- _WRAP_VFUNC(Glib::VariantBase get_action_state_hint(const Glib::ustring& name) const, "get_action_state_hint")
- _WRAP_VFUNC(Glib::VariantBase get_action_state(const Glib::ustring& name) const, "get_action_state")
+ _WRAP_VFUNC(Glib::VariantBase get_action_state_hint(const Glib::ustring& name) const, "get_action_state_hint", refreturn_ctype)
+ _WRAP_VFUNC(Glib::VariantBase get_action_state(const Glib::ustring& name) const, "get_action_state", refreturn_ctype)
_WRAP_VFUNC(void change_action_state(const Glib::ustring& name, const Glib::VariantBase& value), "change_action_state")
_WRAP_VFUNC(void activate_action(const Glib::ustring& name, const Glib::VariantBase& parameter), "activate_action")