/soc/2013/ankitkv/gobjectification: 735cd882faf7: Removed warnin...
Ankit Vani
a at nevitus.org
Sat Aug 17 15:16:05 EDT 2013
Changeset: 735cd882faf7d317fe10254015e8dbc335ae413d
Author: Ankit Vani <a at nevitus.org>
Date: 2013-08-18 00:45 +0530
Branch: soc.2013.gobjectification.plugins
URL: https://hg.pidgin.im/soc/2013/ankitkv/gobjectification/rev/735cd882faf7
Description:
Removed warnings from connection.c
diffstat:
libpurple/connection.c | 14 ++++++--------
1 files changed, 6 insertions(+), 8 deletions(-)
diffs (46 lines):
diff --git a/libpurple/connection.c b/libpurple/connection.c
--- a/libpurple/connection.c
+++ b/libpurple/connection.c
@@ -53,7 +53,7 @@ typedef struct _PurpleConnectionPrivate
/** Private data for a connection */
struct _PurpleConnectionPrivate
{
- PurpleProtocol *protocol; /**< The protocol. */
+ PurpleProtocol *protocol; /**< The protocol. */
PurpleConnectionFlags flags; /**< Connection flags. */
PurpleConnectionState state; /**< The connection state. */
@@ -617,8 +617,7 @@ purple_connection_set_property(GObject *
switch (param_id) {
case PROP_PROTOCOL:
-#warning TODO: change get_pointer to get_object when PurpleProtocol is a GObject
- priv->protocol = g_value_get_pointer(value);
+ priv->protocol = g_value_get_object(value);
break;
case PROP_FLAGS:
purple_connection_set_flags(gc, g_value_get_flags(value));
@@ -651,8 +650,7 @@ purple_connection_get_property(GObject *
switch (param_id) {
case PROP_PROTOCOL:
-#warning TODO: change set_pointer to set_object when PurpleProtocol is a GObject
- g_value_set_pointer(value, purple_connection_get_protocol_info(gc));
+ g_value_set_object(value, purple_connection_get_protocol_info(gc));
break;
case PROP_FLAGS:
g_value_set_flags(value, purple_connection_get_flags(gc));
@@ -797,10 +795,10 @@ static void purple_connection_class_init
obj_class->get_property = purple_connection_get_property;
obj_class->set_property = purple_connection_set_property;
-#warning TODO: change spec_pointer to spec_object when PurpleProtocol is a GObject
g_object_class_install_property(obj_class, PROP_PROTOCOL,
- g_param_spec_pointer(PROP_PROTOCOL_S, _("Protocol plugin"),
- _("The prpl that is using the connection."),
+ g_param_spec_object(PROP_PROTOCOL_S, _("Protocol"),
+ _("The protocol that the connection is using."),
+ PURPLE_TYPE_PROTOCOL,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)
);
More information about the Commits
mailing list