soc.2010.detachablepurple: 5d6c8a19: Adapted my getters/setters/frees to matc.
gillux at soc.pidgin.im
gillux at soc.pidgin.im
Thu Jul 15 17:35:47 EDT 2010
----------------------------------------------------------------------
Revision: 5d6c8a19188d84d34a70a730fdea9385d81cb9a8
Parent: 6a5bcbd9651f88eb72d403e9bcd4f575861419db
Author: gillux at soc.pidgin.im
Date: 07/15/10 09:33:07
Branch: im.pidgin.soc.2010.detachablepurple
URL: http://d.pidgin.im/viewmtn/revision/info/5d6c8a19188d84d34a70a730fdea9385d81cb9a8
Changelog:
Adapted my getters/setters/frees to match the new gobject private properties
system included in the last merge from im.pidgin.gobjectification.
Changes against parent 6a5bcbd9651f88eb72d403e9bcd4f575861419db
patched libpurple/pobject.c
-------------- next part --------------
============================================================
--- libpurple/pobject.c c51c3016fb37b0a17cac0d2e2c9df2427992c54b
+++ libpurple/pobject.c e24eb2eb009b9e9445e29a612ce55c4cf9cd4dab
@@ -74,15 +74,15 @@ purple_object_dispose(GObject *obj)
g_warning("Purple-Object: object destroyed without unsetting the ui data. This may lead to memory leak.\n");
}
- g_free(pobj->priv->dbus_purple_interface);
+ g_free(priv->dbus_purple_interface);
- if(pobj->priv->dbus_obj_proxy)
- g_object_unref(pobj->priv->dbus_obj_proxy);
+ if(priv->dbus_obj_proxy)
+ g_object_unref(priv->dbus_obj_proxy);
- if(pobj->priv->dbus_props_proxy)
- g_object_unref(pobj->priv->dbus_props_proxy);
+ if(priv->dbus_props_proxy)
+ g_object_unref(priv->dbus_props_proxy);
- g_free(pobj->priv->dbus_path);
+ g_free(priv->dbus_path);
/* XXX: do _notify_close_with_handle etc here */
@@ -199,57 +199,81 @@ purple_object_get_dbus_obj_interface(Pur
char*
purple_object_get_dbus_obj_interface(PurpleObject *pobj)
{
+ PurpleObjectPrivate *priv;
+
g_return_val_if_fail(pobj, NULL);
- return pobj->priv->dbus_purple_interface;
+ priv = PURPLE_OBJECT_GET_PRIVATE(pobj);
+ return priv->dbus_purple_interface;
}
void
purple_object_set_dbus_obj_interface(PurpleObject *pobj, char* interface)
{
+ PurpleObjectPrivate *priv;
+
g_return_if_fail(pobj);
- pobj->priv->dbus_purple_interface = g_strdup(interface);
+ priv = PURPLE_OBJECT_GET_PRIVATE(pobj);
+ priv->dbus_purple_interface = g_strdup(interface);
}
gpointer
purple_object_get_dbus_obj_proxy(PurpleObject *pobj)
{
+ PurpleObjectPrivate *priv;
+
g_return_val_if_fail(pobj, NULL);
- return pobj->priv->dbus_obj_proxy;
+ priv = PURPLE_OBJECT_GET_PRIVATE(pobj);
+ return priv->dbus_obj_proxy;
}
void
purple_object_set_dbus_obj_proxy(PurpleObject *pobj, gpointer dbus_proxy)
{
+ PurpleObjectPrivate *priv;
+
g_return_if_fail(pobj);
- pobj->priv->dbus_obj_proxy = dbus_proxy;
+ priv = PURPLE_OBJECT_GET_PRIVATE(pobj);
+ priv->dbus_obj_proxy = dbus_proxy;
}
gpointer
purple_object_get_dbus_props_proxy(PurpleObject *pobj)
{
+ PurpleObjectPrivate *priv;
+
g_return_val_if_fail(pobj, NULL);
- return pobj->priv->dbus_props_proxy;
+ priv = PURPLE_OBJECT_GET_PRIVATE(pobj);
+ return priv->dbus_props_proxy;
}
void
purple_object_set_dbus_props_proxy(PurpleObject *pobj, gpointer dbus_proxy)
{
+ PurpleObjectPrivate *priv;
+
g_return_if_fail(pobj);
- pobj->priv->dbus_props_proxy = dbus_proxy;
+ priv = PURPLE_OBJECT_GET_PRIVATE(pobj);
+ priv->dbus_props_proxy = dbus_proxy;
}
char*
purple_object_get_dbus_path(PurpleObject *pobj)
{
+ PurpleObjectPrivate *priv;
+
g_return_val_if_fail(pobj, NULL);
- return pobj->priv->dbus_path;
+ priv = PURPLE_OBJECT_GET_PRIVATE(pobj);
+ return priv->dbus_path;
}
void
purple_object_set_dbus_path(PurpleObject *pobj, char* path)
{
+ PurpleObjectPrivate *priv;
+
g_return_if_fail(pobj);
- pobj->priv->dbus_path = g_strdup(path);
+ priv = PURPLE_OBJECT_GET_PRIVATE(pobj);
+ priv->dbus_path = g_strdup(path);
}
int purple_object_get_int(PurpleObject *pobj, const char *prop)
More information about the Commits
mailing list