/soc/2013/ankitkv/gobjectification: 24216dad8696: Use spec_point...

Ankit Vani a at nevitus.org
Mon Jul 15 16:19:18 EDT 2013


Changeset: 24216dad869623b20b307764df7d5bdcc633a15d
Author:	 Ankit Vani <a at nevitus.org>
Date:	 2013-07-16 01:49 +0530
Branch:	 soc.2013.gobjectification
URL: https://hg.pidgin.im/soc/2013/ankitkv/gobjectification/rev/24216dad8696

Description:

Use spec_pointer instead of spec_boxed for properties

diffstat:

 libpurple/blistnodetypes.c    |  14 +++++++-------
 libpurple/connection.c        |  14 +++++++-------
 libpurple/conversationtypes.c |  14 +++++++-------
 3 files changed, 21 insertions(+), 21 deletions(-)

diffs (119 lines):

diff --git a/libpurple/blistnodetypes.c b/libpurple/blistnodetypes.c
--- a/libpurple/blistnodetypes.c
+++ b/libpurple/blistnodetypes.c
@@ -549,8 +549,8 @@ purple_buddy_set_property(GObject *obj, 
 			purple_buddy_set_server_alias(buddy, g_value_get_string(value));
 			break;
 		case BUDDY_PROP_ICON:
-#warning TODO: change get_boxed to get_object when PurpleBuddyIcon is a GObject
-			purple_buddy_set_icon(buddy, g_value_get_boxed(value));
+#warning TODO: change get_pointer to get_object when PurpleBuddyIcon is a GObject
+			purple_buddy_set_icon(buddy, g_value_get_pointer(value));
 			break;
 		case BUDDY_PROP_ACCOUNT:
 			priv->account = g_value_get_object(value);
@@ -582,8 +582,8 @@ purple_buddy_get_property(GObject *obj, 
 			g_value_set_string(value, purple_buddy_get_server_alias(buddy));
 			break;
 		case BUDDY_PROP_ICON:
-#warning TODO: change set_static_boxed to set_object when PurpleBuddyIcon is a GObject
-			g_value_set_static_boxed(value, purple_buddy_get_icon(buddy));
+#warning TODO: change set_pointer to set_object when PurpleBuddyIcon is a GObject
+			g_value_set_pointer(value, purple_buddy_get_icon(buddy));
 			break;
 		case BUDDY_PROP_ACCOUNT:
 			g_value_set_object(value, purple_buddy_get_account(buddy));
@@ -700,10 +700,10 @@ static void purple_buddy_class_init(Purp
 				G_PARAM_READWRITE)
 			);
 
-#warning TODO: change spec_boxed to spec_object when PurpleBuddyIcon is a GObject
+#warning TODO: change spec_pointer to spec_object when PurpleBuddyIcon is a GObject
 	g_object_class_install_property(obj_class, BUDDY_PROP_ICON,
-			g_param_spec_boxed(BUDDY_PROP_ICON_S, _("Buddy icon"),
-				_("The icon for the buddy."), PURPLE_TYPE_BUDDY_ICON,
+			g_param_spec_pointer(BUDDY_PROP_ICON_S, _("Buddy icon"),
+				_("The icon for the buddy."),
 				G_PARAM_READWRITE)
 			);
 
diff --git a/libpurple/connection.c b/libpurple/connection.c
--- a/libpurple/connection.c
+++ b/libpurple/connection.c
@@ -614,8 +614,8 @@ purple_connection_set_property(GObject *
 
 	switch (param_id) {
 		case PROP_PRPL:
-#warning TODO: change get_boxed to get_object when prpl is a GObject
-			priv->prpl = g_value_get_boxed(value);
+#warning TODO: change get_pointer to get_object when prpl is a GObject
+			priv->prpl = g_value_get_pointer(value);
 			break;
 		case PROP_FLAGS:
 			purple_connection_set_flags(gc, g_value_get_flags(value));
@@ -648,8 +648,8 @@ purple_connection_get_property(GObject *
 
 	switch (param_id) {
 		case PROP_PRPL:
-#warning TODO: change set_static_boxed to set_object when prpl is a GObject
-			g_value_set_static_boxed(value, purple_connection_get_prpl(gc));
+#warning TODO: change set_pointer to set_object when prpl is a GObject
+			g_value_set_pointer(value, purple_connection_get_prpl(gc));
 			break;
 		case PROP_FLAGS:
 			g_value_set_flags(value, purple_connection_get_flags(gc));
@@ -796,10 +796,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_boxed to spec_object when prpl is a GObject
+#warning TODO: change spec_pointer to spec_object when prpl is a GObject
 	g_object_class_install_property(obj_class, PROP_PRPL,
-			g_param_spec_boxed(PROP_PRPL_S, _("Protocol plugin"),
-				_("The prpl that is using the connection."), PURPLE_TYPE_PLUGIN,
+			g_param_spec_pointer(PROP_PRPL_S, _("Protocol plugin"),
+				_("The prpl that is using the connection."),
 				G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)
 			);
 
diff --git a/libpurple/conversationtypes.c b/libpurple/conversationtypes.c
--- a/libpurple/conversationtypes.c
+++ b/libpurple/conversationtypes.c
@@ -390,9 +390,9 @@ purple_im_conversation_set_property(GObj
 		case IM_PROP_TYPING_STATE:
 			purple_im_conversation_set_typing_state(im, g_value_get_enum(value));
 			break;
-#warning TODO: change get_boxed to get_object when PurpleBuddyIcon is a GObject
+#warning TODO: change get_pointer to get_object when PurpleBuddyIcon is a GObject
 		case IM_PROP_ICON:
-			purple_im_conversation_set_icon(im, g_value_get_boxed(value));
+			purple_im_conversation_set_icon(im, g_value_get_pointer(value));
 			break;
 		default:
 			G_OBJECT_WARN_INVALID_PROPERTY_ID(obj, param_id, pspec);
@@ -411,9 +411,9 @@ purple_im_conversation_get_property(GObj
 		case IM_PROP_TYPING_STATE:
 			g_value_set_enum(value, purple_im_conversation_get_typing_state(im));
 			break;
-#warning TODO: change set_static_boxed to set_object when PurpleBuddyIcon is a GObject
+#warning TODO: change set_pointer to set_object when PurpleBuddyIcon is a GObject
 		case IM_PROP_ICON:
-			g_value_set_static_boxed(value, purple_im_conversation_get_icon(im));
+			g_value_set_pointer(value, purple_im_conversation_get_icon(im));
 			break;
 		default:
 			G_OBJECT_WARN_INVALID_PROPERTY_ID(obj, param_id, pspec);
@@ -515,10 +515,10 @@ static void purple_im_conversation_class
 				G_PARAM_READWRITE)
 			);
 
-#warning TODO: change spec_boxed to spec_object when PurpleBuddyIcon is a GObject
+#warning TODO: change spec_pointer to spec_object when PurpleBuddyIcon is a GObject
 	g_object_class_install_property(obj_class, IM_PROP_ICON,
-			g_param_spec_boxed(IM_PROP_ICON_S, _("Buddy icon"),
-				_("The buddy icon for the IM."), PURPLE_TYPE_BUDDY_ICON,
+			g_param_spec_pointer(IM_PROP_ICON_S, _("Buddy icon"),
+				_("The buddy icon for the IM."),
 				G_PARAM_READWRITE)
 			);
 



More information about the Commits mailing list