gobjectification: 9d0c2134: Fixed the components property. GHashTabl...

gillux at soc.pidgin.im gillux at soc.pidgin.im
Tue Aug 10 09:12:28 EDT 2010


----------------------------------------------------------------------
Revision: 9d0c21345e0089f64bc3579cdfabb4a09fecc71f
Parent:   30b7bd009e86cc798927aef0729ef18e9166a96c
Author:   gillux at soc.pidgin.im
Date:     08/10/10 04:05:16
Branch:   im.pidgin.gobjectification
URL: http://d.pidgin.im/viewmtn/revision/info/9d0c21345e0089f64bc3579cdfabb4a09fecc71f

Changelog: 

Fixed the components property. GHashTables aren't gobjects so we use pointers
here. Also fixed the flags: it must be writable to be set at construct time.

Changes against parent 30b7bd009e86cc798927aef0729ef18e9166a96c

  patched  libpurple/chat.c

-------------- next part --------------
============================================================
--- libpurple/chat.c	be54890dbd017ca9c06e0429cbab5a4177767321
+++ libpurple/chat.c	5e1a535c9c0b8cb46d415fc934b1c98af71ba013
@@ -326,7 +326,7 @@ purple_chat_set_property(GObject *obj, g
 			purple_chat_set_account(chat, g_value_get_object(value));
 			break;
 		case PROP_COMPONENTS:
-			purple_chat_set_components(chat, g_value_get_object(value));
+			purple_chat_set_components(chat, g_value_get_pointer(value));
 			break;
 		default:
 			G_OBJECT_WARN_INVALID_PROPERTY_ID(obj, param_id, pspec);
@@ -343,7 +343,7 @@ purple_chat_get_property(GObject *obj, g
 			g_value_set_string(value, purple_chat_get_name(chat));
 			break;
 		case PROP_COMPONENTS:
-			g_value_set_object(value, purple_chat_get_components(chat));
+			g_value_set_pointer(value, purple_chat_get_components(chat));
 			break;
 		case PROP_ACCOUNT:
 			g_value_set_object(value, purple_chat_get_account(chat));
@@ -386,7 +386,7 @@ purple_chat_class_init(PurpleChatClass *
 	g_object_class_install_property(obj_class, PROP_COMPONENTS,
 			g_param_spec_pointer(PROP_COMPONENTS_S, _("Components"),
 				_("The components for the chat."),
-				G_PARAM_READABLE | G_PARAM_CONSTRUCT_ONLY)
+				G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)
 			);
 }
 


More information about the Commits mailing list