/srv/mercurial-server/detachablepurple: 1c7666331900: Fixed the ...
Gilles Bedel
gillux at cpw.pidgin.im
Fri Jun 15 22:01:30 EDT 2012
Changeset: 1c7666331900c431b3180cdbec5e1f45ee05a18d
Author: Gilles Bedel <gillux at cpw.pidgin.im>
Date: 2011-05-19 22:29 +0000
Branch: cpw.gillux.detachablepurple
URL: http://hg.pidgin.im/srv/mercurial-server/detachablepurple/rev/1c7666331900
Description:
Fixed the purple default dbus properties setter.
diffstat:
libpurple/pobject.c | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diffs (40 lines):
diff --git a/libpurple/pobject.c b/libpurple/pobject.c
--- a/libpurple/pobject.c
+++ b/libpurple/pobject.c
@@ -651,20 +651,20 @@
GError **error,
gpointer object)
{
- gboolean ret = FALSE;
GParamSpec *pspec;
GValue value = {0, };
GValue tmp = {0, };
pspec = g_object_class_find_property(G_OBJECT_GET_CLASS(object),
property_name);
- if (!pspec)
+ if (!pspec) {
g_set_error(error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS,
- "No property named %s in interface %s.",
- property_name, interface_name);
- else {
+ "No property named %s in interface %s.",
+ property_name, interface_name);
+ return FALSE;
+ } else {
+ g_value_init(&value, G_PARAM_SPEC_VALUE_TYPE(pspec));
g_dbus_gvariant_to_gvalue(variant, &value);
- g_value_init(&value, G_PARAM_SPEC_VALUE_TYPE(pspec));
if (G_TYPE_IS_OBJECT(G_PARAM_SPEC_VALUE_TYPE(pspec))
&& G_VALUE_HOLDS_STRING(&value)) {
/* Convert dbus path names into gobjects. */
@@ -677,8 +677,8 @@
}
g_object_set_property(G_OBJECT(object), property_name, &value);
g_value_unset(&value);
+ return TRUE;
}
- return ret;
}
guint
More information about the Commits
mailing list