libpurple: Use G_PARAM_STATIC_STRINGS and ensure g_object_notify is always called soc.2013.gobjectification

Sun, 17 Nov 2013 18:11:04 +0530

author
Ankit Vani <a@nevitus.org>
date
Sun, 17 Nov 2013 18:11:04 +0530
branch
soc.2013.gobjectification
changeset 35066
f997e5384f79
parent 35065
2fe1b3f20c3c
child 35067
267e820a9301

libpurple: Use G_PARAM_STATIC_STRINGS and ensure g_object_notify is always called

libpurple/account.c file | annotate | diff | comparison | revisions
libpurple/blistnode.c file | annotate | diff | comparison | revisions
libpurple/blistnodetypes.c file | annotate | diff | comparison | revisions
libpurple/circularbuffer.c file | annotate | diff | comparison | revisions
libpurple/connection.c file | annotate | diff | comparison | revisions
libpurple/conversation.c file | annotate | diff | comparison | revisions
libpurple/conversationtypes.c file | annotate | diff | comparison | revisions
libpurple/presence.c file | annotate | diff | comparison | revisions
libpurple/protocols/jabber/jingle/content.c file | annotate | diff | comparison | revisions
libpurple/roomlist.c file | annotate | diff | comparison | revisions
libpurple/status.c file | annotate | diff | comparison | revisions
libpurple/whiteboard.c file | annotate | diff | comparison | revisions
libpurple/xfer.c file | annotate | diff | comparison | revisions
--- a/libpurple/account.c	Sun Nov 17 15:56:35 2013 +0530
+++ b/libpurple/account.c	Sun Nov 17 18:11:04 2013 +0530
@@ -802,6 +802,7 @@
 		char *old = priv->alias;
 
 		priv->alias = g_strdup(alias);
+		g_object_notify(G_OBJECT(account), "private-alias");
 		purple_signal_emit(purple_accounts_get_handle(), "account-alias-changed",
 						 account, old);
 		g_free(old);
@@ -856,6 +857,8 @@
 	g_free(priv->protocol_id);
 	priv->protocol_id = g_strdup(protocol_id);
 
+	g_object_notify(G_OBJECT(account), "protocol-id");
+
 	purple_accounts_schedule_save();
 }
 
@@ -868,6 +871,8 @@
 
 	priv = PURPLE_ACCOUNT_GET_PRIVATE(account);
 	priv->gc = gc;
+
+	g_object_notify(G_OBJECT(account), "connection");
 }
 
 void
@@ -916,6 +921,8 @@
 	else if(!was_enabled && value)
 		purple_signal_emit(purple_accounts_get_handle(), "account-enabled", account);
 
+	g_object_notify(G_OBJECT(account), "enabled");
+
 	if ((gc != NULL) && (_purple_connection_wants_to_die(gc)))
 		wants_to_die = TRUE;
 
@@ -3064,55 +3071,56 @@
 	g_object_class_install_property(obj_class, PROP_USERNAME,
 			g_param_spec_string("username", "Username",
 				"The username for the account.", NULL,
-				G_PARAM_READWRITE | G_PARAM_CONSTRUCT)
+				G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS)
 			);
 
 	g_object_class_install_property(obj_class, PROP_PRIVATE_ALIAS,
 			g_param_spec_string("private-alias", "Private Alias",
 				"The private alias for the account.", NULL,
-				G_PARAM_READWRITE)
+				G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)
 			);
 
 	g_object_class_install_property(obj_class, PROP_USER_INFO,
 			g_param_spec_string("user-info", "User information",
 				"Detailed user information for the account.", NULL,
-				G_PARAM_READWRITE)
+				G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)
 			);
 
 	g_object_class_install_property(obj_class, PROP_BUDDY_ICON_PATH,
 			g_param_spec_string("buddy-icon-path", "Buddy icon path",
 				"Path to the buddyicon for the account.", NULL,
-				G_PARAM_READWRITE)
+				G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)
 			);
 
 	g_object_class_install_property(obj_class, PROP_ENABLED,
 			g_param_spec_boolean("enabled", "Enabled",
 				"Whether the account is enabled or not.", FALSE,
-				G_PARAM_READWRITE)
+				G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)
 			);
 
 	g_object_class_install_property(obj_class, PROP_REMEMBER_PASSWORD,
 			g_param_spec_boolean("remember-password", "Remember password",
 				"Whether to remember and store the password for this account.", FALSE,
-				G_PARAM_READWRITE)
+				G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)
 			);
 
 	g_object_class_install_property(obj_class, PROP_CHECK_MAIL,
 			g_param_spec_boolean("check-mail", "Check mail",
 				"Whether to check mails for this account.", FALSE,
-				G_PARAM_READWRITE)
+				G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)
 			);
 
 	g_object_class_install_property(obj_class, PROP_CONNECTION,
 			g_param_spec_object("connection", "Connection",
 				"The connection for the account.", PURPLE_TYPE_CONNECTION,
-				G_PARAM_READWRITE)
+				G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)
 			);
 
 	g_object_class_install_property(obj_class, PROP_PROTOCOL_ID,
 			g_param_spec_string("protocol-id", "Protocol ID",
 				"ID of the protocol that is responsible for the account.", NULL,
-				G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)
+				G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY |
+				G_PARAM_STATIC_STRINGS)
 			);
 
 	g_type_class_add_private(klass, sizeof(PurpleAccountPrivate));
--- a/libpurple/blistnode.c	Sun Nov 17 15:56:35 2013 +0530
+++ b/libpurple/blistnode.c	Sun Nov 17 18:11:04 2013 +0530
@@ -410,7 +410,7 @@
 	g_object_class_install_property(obj_class, BLNODE_PROP_TRANSIENT,
 			g_param_spec_boolean("transient", "Transient",
 				"Whether node should not be saved with the buddy list.",
-				FALSE, G_PARAM_READWRITE)
+				FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)
 			);
 
 	g_type_class_add_private(klass, sizeof(PurpleBlistNodePrivate));
@@ -605,19 +605,22 @@
 	g_object_class_install_property(obj_class, CNODE_PROP_TOTAL_SIZE,
 			g_param_spec_int("total-size", "Total size",
 				"The number of children under this node.",
-				G_MININT, G_MAXINT, 0, G_PARAM_READWRITE)
+				G_MININT, G_MAXINT, 0, G_PARAM_READWRITE |
+				G_PARAM_STATIC_STRINGS)
 			);
 
 	g_object_class_install_property(obj_class, CNODE_PROP_CURRENT_SIZE,
 			g_param_spec_int("current-size", "Current size",
 				"The number of children with online accounts.",
-				G_MININT, G_MAXINT, 0, G_PARAM_READWRITE)
+				G_MININT, G_MAXINT, 0, G_PARAM_READWRITE |
+				G_PARAM_STATIC_STRINGS)
 			);
 
 	g_object_class_install_property(obj_class, CNODE_PROP_ONLINE_COUNT,
 			g_param_spec_int("online-count", "Online count",
 				"The number of children that are online.",
-				G_MININT, G_MAXINT, 0, G_PARAM_READWRITE)
+				G_MININT, G_MAXINT, 0, G_PARAM_READWRITE |
+				G_PARAM_STATIC_STRINGS)
 			);
 
 	g_type_class_add_private(klass, sizeof(PurpleCountingNodePrivate));
--- a/libpurple/blistnodetypes.c	Sun Nov 17 15:56:35 2013 +0530
+++ b/libpurple/blistnodetypes.c	Sun Nov 17 18:11:04 2013 +0530
@@ -154,6 +154,8 @@
 	{
 		purple_buddy_icon_unref(priv->icon);
 		priv->icon = (icon != NULL ? purple_buddy_icon_ref(icon) : NULL);
+
+		g_object_notify(G_OBJECT(buddy), "icon");
 	}
 
 	purple_signal_emit(purple_blist_get_handle(), "buddy-icon-changed", buddy);
@@ -195,14 +197,14 @@
 	g_free(priv->name);
 	priv->name = purple_utf8_strip_unprintables(name);
 
+	g_object_notify(G_OBJECT(buddy), "name");
+
 	if (ops) {
 		if (ops->save_node)
 			ops->save_node(PURPLE_BLIST_NODE(buddy));
 		if (ops->update)
 			ops->update(purple_blist_get_buddy_list(), PURPLE_BLIST_NODE(buddy));
 	}
-
-	g_object_notify(G_OBJECT(buddy), "name");
 }
 
 const char *
@@ -324,6 +326,8 @@
 		g_free(new_alias); /* could be "\0" */
 	}
 
+	g_object_notify(G_OBJECT(buddy), "local-alias");
+
 	if (ops && ops->save_node)
 		ops->save_node(PURPLE_BLIST_NODE(buddy));
 
@@ -377,6 +381,8 @@
 		g_free(new_alias); /* could be "\0"; */
 	}
 
+	g_object_notify(G_OBJECT(buddy), "server-alias");
+
 	if (ops) {
 		if (ops->save_node)
 			ops->save_node(PURPLE_BLIST_NODE(buddy));
@@ -682,44 +688,45 @@
 	g_object_class_install_property(obj_class, BUDDY_PROP_NAME,
 			g_param_spec_string("name", "Name",
 				"The name of the buddy.", NULL,
-				G_PARAM_READWRITE | G_PARAM_CONSTRUCT)
+				G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS)
 			);
 
 	g_object_class_install_property(obj_class, BUDDY_PROP_LOCAL_ALIAS,
 			g_param_spec_string("local-alias", "Local alias",
 				"Local alias of thee buddy.", NULL,
-				G_PARAM_READWRITE | G_PARAM_CONSTRUCT)
+				G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS)
 			);
 
 	g_object_class_install_property(obj_class, BUDDY_PROP_SERVER_ALIAS,
 			g_param_spec_string("server-alias", "Server alias",
 				"Server-side alias of the buddy.", NULL,
-				G_PARAM_READWRITE)
+				G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)
 			);
 
 	g_object_class_install_property(obj_class, BUDDY_PROP_ICON,
 			g_param_spec_pointer("icon", "Buddy icon",
 				"The icon for the buddy.",
-				G_PARAM_READWRITE)
+				G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)
 			);
 
 	g_object_class_install_property(obj_class, BUDDY_PROP_ACCOUNT,
 			g_param_spec_object("account", "Account",
 				"The account for the buddy.", PURPLE_TYPE_ACCOUNT,
-				G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)
+				G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY |
+				G_PARAM_STATIC_STRINGS)
 			);
 
 	g_object_class_install_property(obj_class, BUDDY_PROP_PRESENCE,
 			g_param_spec_object("presence", "Presence",
 				"The status information for the buddy.", PURPLE_TYPE_PRESENCE,
-				G_PARAM_READABLE)
+				G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)
 			);
 
 	g_object_class_install_property(obj_class, BUDDY_PROP_MEDIA_CAPS,
 			g_param_spec_enum("media-caps", "Media capabilities",
 				"The media capabilities of the buddy.",
 				PURPLE_MEDIA_TYPE_CAPS, PURPLE_MEDIA_CAPS_NONE,
-				G_PARAM_READWRITE)
+				G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)
 			);
 
 	g_type_class_add_private(klass, sizeof(PurpleBuddyPrivate));
@@ -813,6 +820,8 @@
 
 	priv->priority_buddy = new_priority;
 	priv->priority_valid = TRUE;
+
+	g_object_notify(G_OBJECT(contact), "priority-buddy");
 }
 
 PurpleGroup *
@@ -852,6 +861,8 @@
 		g_free(new_alias); /* could be "\0" */
 	}
 
+	g_object_notify(G_OBJECT(contact), "alias");
+
 	if (ops) {
 		if (ops->save_node)
 			ops->save_node(PURPLE_BLIST_NODE(contact));
@@ -1043,13 +1054,13 @@
 	g_object_class_install_property(obj_class, CONTACT_PROP_ALIAS,
 			g_param_spec_string("alias", "Alias",
 				"The alias for the contact.", NULL,
-				G_PARAM_READWRITE)
+				G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)
 			);
 
 	g_object_class_install_property(obj_class, CONTACT_PROP_PRIORITY_BUDDY,
 			g_param_spec_object("priority-buddy",
 				"Priority buddy", "The priority buddy of the contact.",
-				PURPLE_TYPE_BUDDY, G_PARAM_READABLE)
+				PURPLE_TYPE_BUDDY, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)
 			);
 
 	g_type_class_add_private(klass, sizeof(PurpleContactPrivate));
@@ -1155,6 +1166,8 @@
 		g_free(new_alias); /* could be "\0" */
 	}
 
+	g_object_notify(G_OBJECT(chat), "alias");
+
 	if (ops) {
 		if (ops->save_node)
 			ops->save_node(PURPLE_BLIST_NODE(chat));
@@ -1299,19 +1312,21 @@
 	g_object_class_install_property(obj_class, CHAT_PROP_ALIAS,
 			g_param_spec_string("alias", "Alias",
 				"The alias for the chat.", NULL,
-				G_PARAM_READWRITE | G_PARAM_CONSTRUCT)
+				G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS)
 			);
 
 	g_object_class_install_property(obj_class, CHAT_PROP_ACCOUNT,
 			g_param_spec_object("account", "Account",
 				"The account that the chat belongs to.", PURPLE_TYPE_ACCOUNT,
-				G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)
+				G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY |
+				G_PARAM_STATIC_STRINGS)
 			);
 
 	g_object_class_install_property(obj_class, CHAT_PROP_COMPONENTS,
 			g_param_spec_pointer("components", "Components",
 				"The protocol components of the chat.",
-				G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)
+				G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY |
+				G_PARAM_STATIC_STRINGS)
 			);
 
 	g_type_class_add_private(klass, sizeof(PurpleChatPrivate));
@@ -1482,6 +1497,8 @@
 
 		old_name = priv->name;
 		priv->name = new_name;
+
+		g_object_notify(G_OBJECT(source), "name");
 	}
 
 	/* Save our changes */
@@ -1641,7 +1658,7 @@
 	g_object_class_install_property(obj_class, GROUP_PROP_NAME,
 			g_param_spec_string("name", "Name",
 				"Name of the group.", NULL,
-				G_PARAM_READWRITE | G_PARAM_CONSTRUCT)
+				G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS)
 			);
 
 	g_type_class_add_private(klass, sizeof(PurpleGroupPrivate));
--- a/libpurple/circularbuffer.c	Sun Nov 17 15:56:35 2013 +0530
+++ b/libpurple/circularbuffer.c	Sun Nov 17 18:11:04 2013 +0530
@@ -81,6 +81,7 @@
 	PurpleCircularBufferPrivate *priv = NULL;
 	gsize in_offset = 0, out_offset = 0;
 	gsize start_buflen;
+	GObject *obj;
 
 	priv = PURPLE_CIRCULAR_BUFFER_GET_PRIVATE(buffer);
 
@@ -120,6 +121,12 @@
 			priv->input = priv->buffer + start_buflen + in_offset;
 		}
 	}
+
+	obj = G_OBJECT(buffer);
+	g_object_freeze_notify(obj);
+	g_object_notify(obj, "input");
+	g_object_notify(obj, "output");
+	g_object_thaw_notify(obj);
 }
 
 static void
@@ -128,6 +135,7 @@
 {
 	PurpleCircularBufferPrivate *priv = NULL;
 	gsize len_stored;
+	GObject *obj;
 
 	priv = PURPLE_CIRCULAR_BUFFER_GET_PRIVATE(buffer);
 
@@ -155,6 +163,12 @@
 	}
 
 	priv->bufused += len;
+
+	obj = G_OBJECT(buffer);
+	g_object_freeze_notify(obj);
+	g_object_notify(obj, "buffer-used");
+	g_object_notify(obj, "input");
+	g_object_thaw_notify(obj);
 }
 
 static gsize
@@ -179,6 +193,7 @@
                                       gsize len)
 {
 	PurpleCircularBufferPrivate *priv = NULL;
+	GObject *obj;
 
 	g_return_val_if_fail(purple_circular_buffer_get_max_read(buffer) >= len, FALSE);
 
@@ -191,6 +206,12 @@
 	if((gsize)(priv->output - priv->buffer) == priv->buflen)
 		priv->output = priv->buffer;
 
+	obj = G_OBJECT(buffer);
+	g_object_freeze_notify(obj);
+	g_object_notify(obj, "buffer-used");
+	g_object_notify(obj, "output");
+	g_object_thaw_notify(obj);
+
 	return TRUE;
 }
 
@@ -293,23 +314,24 @@
 		g_param_spec_ulong("grow-size", "grow-size",
 		                   "The grow size of the buffer",
 		                   0, G_MAXSIZE, 0,
-		                   G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
+		                   G_PARAM_READWRITE | G_PARAM_CONSTRUCT |
+		                   G_PARAM_STATIC_STRINGS));
 
 	g_object_class_install_property(obj_class, PROP_BUFFER_USED,
 		g_param_spec_ulong("buffer-used", "buffer-used",
 		                   "The amount of the buffer used",
 		                   0, G_MAXSIZE, 0,
-		                   G_PARAM_READABLE));
+		                   G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
 
 	g_object_class_install_property(obj_class, PROP_INPUT,
 		g_param_spec_pointer("input", "input",
 		                     "The input pointer of the buffer",
-		                     G_PARAM_READABLE));
+		                     G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
 
 	g_object_class_install_property(obj_class, PROP_OUTPUT,
 		g_param_spec_pointer("output", "output",
 		                     "The output pointer of the buffer",
-		                     G_PARAM_READABLE));
+		                     G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
 }
 
 /******************************************************************************
@@ -440,7 +462,7 @@
 void
 purple_circular_buffer_reset(PurpleCircularBuffer *buffer) {
 	PurpleCircularBufferPrivate *priv = NULL;
-	GObject *obj = NULL;
+	GObject *obj;
 
 	g_return_if_fail(PURPLE_IS_CIRCULAR_BUFFER(buffer));
 
--- a/libpurple/connection.c	Sun Nov 17 15:56:35 2013 +0530
+++ b/libpurple/connection.c	Sun Nov 17 18:11:04 2013 +0530
@@ -815,39 +815,42 @@
 	g_object_class_install_property(obj_class, PROP_PRPL,
 			g_param_spec_pointer("prpl", "Protocol plugin",
 				"The prpl that is using the connection.",
-				G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)
+				G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY |
+				G_PARAM_STATIC_STRINGS)
 			);
 
 	g_object_class_install_property(obj_class, PROP_FLAGS,
 			g_param_spec_flags("flags", "Connection flags",
 				"The flags of the connection.",
 				PURPLE_TYPE_CONNECTION_FLAGS, 0,
-				G_PARAM_READWRITE)
+				G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)
 			);
 
 	g_object_class_install_property(obj_class, PROP_STATE,
 			g_param_spec_enum("state", "Connection state",
 				"The current state of the connection.",
 				PURPLE_TYPE_CONNECTION_STATE, PURPLE_CONNECTION_DISCONNECTED,
-				G_PARAM_READWRITE)
+				G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)
 			);
 
 	g_object_class_install_property(obj_class, PROP_ACCOUNT,
 			g_param_spec_object("account", "Account",
 				"The account using the connection.", PURPLE_TYPE_ACCOUNT,
-				G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)
+				G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY |
+				G_PARAM_STATIC_STRINGS)
 			);
 
 	g_object_class_install_property(obj_class, PROP_PASSWORD,
 			g_param_spec_string("password", "Password",
 				"The password used for connection.", NULL,
-				G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)
+				G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY |
+				G_PARAM_STATIC_STRINGS)
 			);
 
 	g_object_class_install_property(obj_class, PROP_DISPLAY_NAME,
 			g_param_spec_string("display-name", "Display name",
 				"Your name that appears to other people.", NULL,
-				G_PARAM_READWRITE)
+				G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)
 			);
 
 	g_type_class_add_private(klass, sizeof(PurpleConnectionPrivate));
--- a/libpurple/conversation.c	Sun Nov 17 15:56:35 2013 +0530
+++ b/libpurple/conversation.c	Sun Nov 17 18:11:04 2013 +0530
@@ -282,6 +282,9 @@
 	g_return_if_fail(priv != NULL);
 
 	priv->features = features;
+
+	g_object_notify(G_OBJECT(conv), "features");
+
 	purple_conversation_update(conv, PURPLE_CONVERSATION_UPDATE_FEATURES);
 }
 
@@ -335,6 +338,8 @@
 	purple_conversations_update_cache(conv, NULL, account);
 	priv->account = account;
 
+	g_object_notify(G_OBJECT(conv), "account");
+
 	purple_conversation_update(conv, PURPLE_CONVERSATION_UPDATE_ACCOUNT);
 }
 
@@ -374,6 +379,8 @@
 	g_free(priv->title);
 	priv->title = g_strdup(title);
 
+	g_object_notify(G_OBJECT(conv), "title");
+
 	purple_conversation_update(conv, PURPLE_CONVERSATION_UPDATE_TITLE);
 }
 
@@ -426,8 +433,9 @@
 	g_free(priv->name);
 	priv->name = g_strdup(name);
 
+	g_object_notify(G_OBJECT(conv), "name");
+
 	purple_conversation_autoset_title(conv);
-
 	purple_conversation_update(conv, PURPLE_CONVERSATION_UPDATE_NAME);
 }
 
@@ -503,6 +511,8 @@
 		if (log && priv->logs == NULL)
 			open_log(conv);
 
+		g_object_notify(G_OBJECT(conv), "logging");
+
 		purple_conversation_update(conv, PURPLE_CONVERSATION_UPDATE_LOGGING);
 	}
 }
@@ -1118,32 +1128,32 @@
 	g_object_class_install_property(obj_class, PROP_ACCOUNT,
 			g_param_spec_object("account", "Account",
 				"The account for the conversation.", PURPLE_TYPE_ACCOUNT,
-				G_PARAM_READWRITE | G_PARAM_CONSTRUCT)
+				G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS)
 			);
 
 	g_object_class_install_property(obj_class, PROP_NAME,
 			g_param_spec_string("name", "Name",
 				"The name of the conversation.", NULL,
-				G_PARAM_READWRITE | G_PARAM_CONSTRUCT)
+				G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS)
 			);
 
 	g_object_class_install_property(obj_class, PROP_TITLE,
 			g_param_spec_string("title", "Title",
 				"The title of the conversation.", NULL,
-				G_PARAM_READWRITE | G_PARAM_CONSTRUCT)
+				G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS)
 			);
 
 	g_object_class_install_property(obj_class, PROP_LOGGING,
 			g_param_spec_boolean("logging", "Logging status",
 				"Whether logging is enabled or not.", FALSE,
-				G_PARAM_READWRITE)
+				G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)
 			);
 
 	g_object_class_install_property(obj_class, PROP_FEATURES,
 			g_param_spec_flags("features", "Connection features",
 				"The connection features of the conversation.",
 				PURPLE_TYPE_CONNECTION_FLAGS, 0,
-				G_PARAM_READWRITE)
+				G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)
 			);
 
 	g_type_class_add_private(klass, sizeof(PurpleConversationPrivate));
--- a/libpurple/conversationtypes.c	Sun Nov 17 15:56:35 2013 +0530
+++ b/libpurple/conversationtypes.c	Sun Nov 17 18:11:04 2013 +0530
@@ -181,6 +181,8 @@
 		purple_buddy_icon_unref(priv->icon);
 
 		priv->icon = (icon == NULL ? NULL : purple_buddy_icon_ref(icon));
+
+		g_object_notify(G_OBJECT(im), "icon");
 	}
 
 	purple_conversation_update(PURPLE_CONVERSATION(im),
@@ -213,6 +215,8 @@
 	{
 		priv->typing_state = state;
 
+		g_object_notify(G_OBJECT(im), "typing-state");
+
 		switch (state)
 		{
 			case PURPLE_IM_TYPING:
@@ -515,13 +519,15 @@
 			g_param_spec_enum("typing-state", "Typing state",
 				"Status of the user's typing of a message.",
 				PURPLE_TYPE_IM_TYPING_STATE, PURPLE_IM_NOT_TYPING,
-				G_PARAM_READWRITE)
+				G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS |
+				G_PARAM_STATIC_STRINGS)
 			);
 
 	g_object_class_install_property(obj_class, IM_PROP_ICON,
 			g_param_spec_pointer("icon", "Buddy icon",
 				"The buddy icon for the IM.",
-				G_PARAM_READWRITE)
+				G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS |
+				G_PARAM_STATIC_STRINGS)
 			);
 
 	g_type_class_add_private(klass, sizeof(PurpleIMConversationPrivate));
@@ -714,6 +720,7 @@
 purple_chat_conversation_set_topic(PurpleChatConversation *chat, const char *who, const char *topic)
 {
 	PurpleChatConversationPrivate *priv = PURPLE_CHAT_CONVERSATION_GET_PRIVATE(chat);
+	GObject *obj;
 
 	g_return_if_fail(priv != NULL);
 
@@ -723,6 +730,12 @@
 	priv->who   = g_strdup(who);
 	priv->topic = g_strdup(topic);
 
+	obj = G_OBJECT(chat);
+	g_object_freeze_notify(obj);
+	g_object_notify(obj, "topic-who");
+	g_object_notify(obj, "topic");
+	g_object_thaw_notify(obj);
+
 	purple_conversation_update(PURPLE_CONVERSATION(chat),
 							 PURPLE_CONVERSATION_UPDATE_TOPIC);
 
@@ -1280,6 +1293,9 @@
 	g_return_if_fail(priv != NULL);
 
 	priv->left = TRUE;
+
+	g_object_notify(G_OBJECT(chat), "left");
+
 	purple_conversation_update(PURPLE_CONVERSATION(chat), PURPLE_CONVERSATION_UPDATE_CHATLEFT);
 }
 
@@ -1321,6 +1337,8 @@
 	purple_chat_conversation_set_topic(chat, NULL, NULL);
 	priv->left = FALSE;
 
+	g_object_notify(G_OBJECT(chat), "left");
+
 	purple_conversation_update(conv, PURPLE_CONVERSATION_UPDATE_CHATLEFT);
 }
 
@@ -1542,31 +1560,31 @@
 	g_object_class_install_property(obj_class, CHAT_PROP_TOPIC_WHO,
 			g_param_spec_string("topic-who", "Who set topic",
 				"Who set the chat topic.", NULL,
-				G_PARAM_READABLE)
+				G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)
 			);
 
 	g_object_class_install_property(obj_class, CHAT_PROP_TOPIC,
 			g_param_spec_string("topic", "Topic",
 				"Topic of the chat.", NULL,
-				G_PARAM_READABLE)
+				G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)
 			);
 
 	g_object_class_install_property(obj_class, CHAT_PROP_ID,
 			g_param_spec_int("chat-id", "Chat ID",
 				"The ID of the chat.", G_MININT, G_MAXINT, 0,
-				G_PARAM_READWRITE)
+				G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)
 			);
 
 	g_object_class_install_property(obj_class, CHAT_PROP_NICK,
 			g_param_spec_string("nick", "Nickname",
 				"The nickname of the user in a chat.", NULL,
-				G_PARAM_READWRITE)
+				G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)
 			);
 
 	g_object_class_install_property(obj_class, CHAT_PROP_LEFT,
 			g_param_spec_boolean("left", "Left the chat",
 				"Whether the user has left the chat.", FALSE,
-				G_PARAM_READWRITE)
+				G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)
 			);
 
 	g_type_class_add_private(klass, sizeof(PurpleChatConversationPrivate));
@@ -1726,6 +1744,8 @@
 	oldflags = priv->flags;
 	priv->flags = flags;
 
+	g_object_notify(G_OBJECT(cb), "flags");
+
 	ops = purple_conversation_get_ui_ops(PURPLE_CONVERSATION(priv->chat));
 
 	if (ops != NULL && ops->chat_update_user != NULL)
@@ -1772,6 +1792,8 @@
 	g_return_if_fail(priv != NULL);
 
 	priv->chat = chat;
+
+	g_object_notify(G_OBJECT(cb), "chat");
 }
 
 PurpleChatConversation *
@@ -1913,26 +1935,27 @@
 	g_object_class_install_property(obj_class, CU_PROP_CHAT,
 			g_param_spec_object("chat", "Chat",
 				"The chat the buddy belongs to.", PURPLE_TYPE_CHAT_CONVERSATION,
-				G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)
+				G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY |
+				G_PARAM_STATIC_STRINGS)
 			);
 
 	g_object_class_install_property(obj_class, CU_PROP_NAME,
 			g_param_spec_string("name", "Name",
 				"Name of the chat user.", NULL,
-				G_PARAM_READWRITE | G_PARAM_CONSTRUCT)
+				G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS)
 			);
 
 	g_object_class_install_property(obj_class, CU_PROP_ALIAS,
 			g_param_spec_string("alias", "Alias",
 				"Alias of the chat user.", NULL,
-				G_PARAM_READWRITE | G_PARAM_CONSTRUCT)
+				G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS)
 			);
 
 	g_object_class_install_property(obj_class, CU_PROP_FLAGS,
 			g_param_spec_flags("flags", "Buddy flags",
 				"The flags for the chat user.",
 				PURPLE_TYPE_CHAT_USER_FLAGS, PURPLE_CHAT_USER_NONE,
-				G_PARAM_READWRITE | G_PARAM_CONSTRUCT)
+				G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS)
 			);
 
 	g_type_class_add_private(klass, sizeof(PurpleChatUserPrivate));
--- a/libpurple/presence.c	Sun Nov 17 15:56:35 2013 +0530
+++ b/libpurple/presence.c	Sun Nov 17 18:11:04 2013 +0530
@@ -146,6 +146,7 @@
 	gboolean old_idle;
 	PurplePresencePrivate *priv = PURPLE_PRESENCE_GET_PRIVATE(presence);
 	PurplePresenceClass *klass = PURPLE_PRESENCE_GET_CLASS(presence);
+	GObject *obj;
 
 	g_return_if_fail(priv != NULL);
 
@@ -156,6 +157,12 @@
 	priv->idle      = idle;
 	priv->idle_time = (idle ? idle_time : 0);
 
+	obj = G_OBJECT(presence);
+	g_object_freeze_notify(obj);
+	g_object_notify(obj, "idle");
+	g_object_notify(obj, "idle-time");
+	g_object_thaw_notify(obj);
+
 	if (klass->update_idle)
 		klass->update_idle(presence, old_idle);
 }
@@ -459,7 +466,7 @@
 	g_object_class_install_property(obj_class, PRES_PROP_IDLE,
 			g_param_spec_boolean("idle", "Idle",
 				"Whether the presence is in idle state.", FALSE,
-				G_PARAM_READWRITE)
+				G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)
 			);
 
 
@@ -480,7 +487,7 @@
 #else
 #error Unknown size of time_t
 #endif
-				G_PARAM_READWRITE)
+				G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)
 			);
 
 	g_object_class_install_property(obj_class, PRES_PROP_LOGIN_TIME,
@@ -500,19 +507,19 @@
 #else
 #error Unknown size of time_t
 #endif
-				G_PARAM_READWRITE)
+				G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)
 			);
 
 	g_object_class_install_property(obj_class, PRES_PROP_STATUSES,
 			g_param_spec_pointer("statuses", "Statuses",
 				"The list of statuses in the presence.",
-				G_PARAM_READABLE)
+				G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)
 			);
 
 	g_object_class_install_property(obj_class, PRES_PROP_ACTIVE_STATUS,
 			g_param_spec_object("active-status", "Active status",
 				"The active status for the presence.", PURPLE_TYPE_STATUS,
-				G_PARAM_READWRITE)
+				G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)
 			);
 
 	g_type_class_add_private(klass, sizeof(PurplePresencePrivate));
@@ -751,7 +758,8 @@
 	g_object_class_install_property(obj_class, ACPRES_PROP_ACCOUNT,
 			g_param_spec_object("account", "Account",
 				"The account that this presence is of.", PURPLE_TYPE_ACCOUNT,
-				G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)
+				G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY |
+				G_PARAM_STATIC_STRINGS)
 			);
 
 	g_type_class_add_private(klass, sizeof(PurpleAccountPresencePrivate));
@@ -945,7 +953,8 @@
 	g_object_class_install_property(obj_class, BUDPRES_PROP_BUDDY,
 			g_param_spec_object("buddy", "Buddy",
 				"The buddy that this presence is of.", PURPLE_TYPE_BUDDY,
-				G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)
+				G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY |
+				G_PARAM_STATIC_STRINGS)
 			);
 
 	g_type_class_add_private(klass, sizeof(PurpleBuddyPresencePrivate));
--- a/libpurple/protocols/jabber/jingle/content.c	Sun Nov 17 15:56:35 2013 +0530
+++ b/libpurple/protocols/jabber/jingle/content.c	Sun Nov 17 18:11:04 2013 +0530
@@ -356,14 +356,19 @@
 void
 jingle_content_accept_transport(JingleContent *content)
 {
+	GObject *obj;
+
 	if (content->priv->transport)
 		g_object_unref(content->priv->transport);
 
 	content->priv->transport = content->priv->pending_transport;
 	content->priv->pending_transport = NULL;
 
-	g_object_notify(G_OBJECT(content), "transport");
-	g_object_notify(G_OBJECT(content), "pending-transport");
+	obj = G_OBJECT(content);
+	g_object_freeze_notify(obj);
+	g_object_notify(obj, "transport");
+	g_object_notify(obj, "pending-transport");
+	g_object_thaw_notify(obj);
 }
 
 void
--- a/libpurple/roomlist.c	Sun Nov 17 15:56:35 2013 +0530
+++ b/libpurple/roomlist.c	Sun Nov 17 18:11:04 2013 +0530
@@ -374,19 +374,20 @@
 			g_param_spec_object("account", "Account",
 				"The account for the room list.",
 				PURPLE_TYPE_ACCOUNT,
-				G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)
+				G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY |
+				G_PARAM_STATIC_STRINGS)
 			);
 
 	g_object_class_install_property(obj_class, PROP_FIELDS,
 			g_param_spec_pointer("fields", "Fields",
 				"The list of fields for a roomlist.",
-				G_PARAM_READWRITE)
+				G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)
 			);
 
 	g_object_class_install_property(obj_class, PROP_IN_PROGRESS,
 			g_param_spec_boolean("in-progress", "In progress",
 				"Whether the room list is being fetched.", FALSE,
-				G_PARAM_READWRITE)
+				G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)
 			);
 
 	g_type_class_add_private(klass, sizeof(PurpleRoomlistPrivate));
@@ -480,6 +481,8 @@
 			room->fields = g_list_append(room->fields, GINT_TO_POINTER(field));
 			break;
 	}
+
+	g_object_notify(G_OBJECT(list), "fields");
 }
 
 void purple_roomlist_room_join(PurpleRoomlist *list, PurpleRoomlistRoom *room)
--- a/libpurple/status.c	Sun Nov 17 15:56:35 2013 +0530
+++ b/libpurple/status.c	Sun Nov 17 18:11:04 2013 +0530
@@ -594,13 +594,13 @@
 			PURPLE_STATUS_GET_PRIVATE(old_status)->active = FALSE;
 			g_object_notify(G_OBJECT(old_status), "active");
 		}
-
-		g_object_set(presence, "active-status", status, NULL);
-		g_object_notify(G_OBJECT(status), "active");
 	}
 	else
 		old_status = NULL;
 
+	g_object_set(presence, "active-status", status, NULL);
+	g_object_notify(G_OBJECT(status), "active");
+
 	notify_status_update(presence, old_status, status);
 }
 
@@ -1229,19 +1229,21 @@
 	g_object_class_install_property(obj_class, PROP_STATUS_TYPE,
 			g_param_spec_pointer("status-type", "Status type",
 				"The PurpleStatusType of the status.",
-				G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)
+				G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY |
+				G_PARAM_STATIC_STRINGS)
 			);
 
 	g_object_class_install_property(obj_class, PROP_PRESENCE,
 			g_param_spec_object("presence", "Presence",
 				"The presence that the status belongs to.", PURPLE_TYPE_PRESENCE,
-				G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)
+				G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY |
+				G_PARAM_STATIC_STRINGS)
 			);
 
 	g_object_class_install_property(obj_class, PROP_ACTIVE,
 			g_param_spec_boolean("active", "Active",
 				"Whether the status is active or not.", FALSE,
-				G_PARAM_READWRITE)
+				G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)
 			);
 
 	g_type_class_add_private(klass, sizeof(PurpleStatusPrivate));
--- a/libpurple/whiteboard.c	Sun Nov 17 15:56:35 2013 +0530
+++ b/libpurple/whiteboard.c	Sun Nov 17 18:11:04 2013 +0530
@@ -442,25 +442,27 @@
 			g_param_spec_int("state", "State",
 				"State of the whiteboard.",
 				G_MININT, G_MAXINT, 0,
-				G_PARAM_READWRITE | G_PARAM_CONSTRUCT)
+				G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS)
 			);
 
 	g_object_class_install_property(obj_class, PROP_ACCOUNT,
 			g_param_spec_object("account", "Account",
 				"The whiteboard's account.", PURPLE_TYPE_ACCOUNT,
-				G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)
+				G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY |
+				G_PARAM_STATIC_STRINGS)
 			);
 
 	g_object_class_install_property(obj_class, PROP_WHO,
 			g_param_spec_string("who", "Who",
 				"Who you're drawing with.", NULL,
-				G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)
+				G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY |
+				G_PARAM_STATIC_STRINGS)
 			);
 
 	g_object_class_install_property(obj_class, PROP_DRAW_LIST,
 			g_param_spec_pointer("draw-list", "Draw list",
 				"A list of points to draw to the buddy.",
-				G_PARAM_READWRITE)
+				G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)
 			);
 
 	g_type_class_add_private(klass, sizeof(PurpleWhiteboardPrivate));
--- a/libpurple/xfer.c	Sun Nov 17 15:56:35 2013 +0530
+++ b/libpurple/xfer.c	Sun Nov 17 18:11:04 2013 +0530
@@ -189,6 +189,8 @@
 
 	priv->status = status;
 
+	g_object_notify(G_OBJECT(xfer), "status");
+
 	if(priv->type == PURPLE_XFER_TYPE_SEND) {
 		switch(status) {
 			case PURPLE_XFER_STATUS_ACCEPTED:
@@ -606,7 +608,7 @@
 	purple_debug_misc("xfer", "request accepted for %p\n", xfer);
 
 	if (!filename && type == PURPLE_XFER_TYPE_RECEIVE) {
-		priv->status = PURPLE_XFER_STATUS_ACCEPTED;
+		purple_xfer_set_status(xfer, PURPLE_XFER_STATUS_ACCEPTED);
 		priv->ops.init(xfer);
 		return;
 	}
@@ -662,7 +664,7 @@
 	}
 	else {
 		/* Receiving a file */
-		priv->status = PURPLE_XFER_STATUS_ACCEPTED;
+		purple_xfer_set_status(xfer, PURPLE_XFER_STATUS_ACCEPTED);
 		purple_xfer_set_local_filename(xfer, filename);
 
 		msg = g_strdup_printf(_("Starting transfer of %s from %s"),
@@ -1046,7 +1048,9 @@
 	g_return_if_fail(priv != NULL);
 
 	priv->bytes_sent = bytes_sent;
-	priv->bytes_remaining = purple_xfer_get_size(xfer) - bytes_sent;
+
+	if (purple_xfer_get_size(xfer) > 0)
+		priv->bytes_remaining = purple_xfer_get_size(xfer) - bytes_sent;
 
 	g_object_notify(G_OBJECT(xfer), "bytes-sent");
 }
@@ -1364,7 +1368,7 @@
 		if (s == 0) {
 			if (priv->watcher) {
 				purple_input_remove(priv->watcher);
-				priv->watcher = 0;
+				purple_xfer_set_watcher(xfer, 0);
 			}
 			return;
 		}
@@ -1389,7 +1393,7 @@
 				 */
 				if (priv->watcher != 0) {
 					purple_input_remove(priv->watcher);
-					priv->watcher = 0;
+					purple_xfer_set_watcher(xfer, 0);
 				}
 
 				/* Need to indicate the prpl is still ready... */
@@ -1441,10 +1445,7 @@
 	}
 
 	if (r > 0) {
-		if (purple_xfer_get_size(xfer) > 0)
-			priv->bytes_remaining -= r;
-
-		priv->bytes_sent += r;
+		purple_xfer_set_bytes_sent(xfer, priv->bytes_sent + r);
 
 		if (priv->ops.ack != NULL)
 			priv->ops.ack(xfer, buffer, r);
@@ -1472,7 +1473,7 @@
 			priv->ready |= PURPLE_XFER_READY_PRPL;
 
 			purple_input_remove(priv->watcher);
-			priv->watcher = 0;
+			purple_xfer_set_watcher(xfer, 0);
 
 			purple_debug_misc("xfer", "prpl is ready on ft %p, waiting for UI\n", xfer);
 			return;
@@ -1510,10 +1511,13 @@
 	}
 
 	if (priv->fd != -1)
-		priv->watcher = purple_input_add(priv->fd, cond, transfer_cb, xfer);
+		purple_xfer_set_watcher(xfer,
+				purple_input_add(priv->fd, cond, transfer_cb, xfer));
 
 	priv->start_time = time(NULL);
 
+	g_object_notify(G_OBJECT(xfer), "start-time");
+
 	if (priv->ops.start != NULL)
 		priv->ops.start(xfer);
 }
@@ -1521,16 +1525,14 @@
 static void
 connect_cb(gpointer data, gint source, const gchar *error_message)
 {
-	PurpleXfer *xfer = (PurpleXfer *)data;
-	PurpleXferPrivate *priv = PURPLE_XFER_GET_PRIVATE(xfer);
+	PurpleXfer *xfer = PURPLE_XFER(data);
 
 	if (source < 0) {
 		purple_xfer_cancel_local(xfer);
 		return;
 	}
 
-	priv->fd = source;
-
+	purple_xfer_set_fd(xfer, source);
 	begin_transfer(xfer, PURPLE_INPUT_READ);
 }
 
@@ -1559,7 +1561,8 @@
 		cond = PURPLE_INPUT_READ;
 
 	if (priv->watcher == 0 && priv->fd != -1)
-		priv->watcher = purple_input_add(priv->fd, cond, transfer_cb, xfer);
+		purple_xfer_set_watcher(xfer,
+				purple_input_add(priv->fd, cond, transfer_cb, xfer));
 
 	priv->ready = PURPLE_XFER_READY_NONE;
 
@@ -1594,6 +1597,7 @@
 	PurpleXferPrivate *priv = PURPLE_XFER_GET_PRIVATE(xfer);
 	PurpleInputCondition cond;
 	PurpleXferType type;
+	GObject *obj;
 
 	g_return_if_fail(priv != NULL);
 	g_return_if_fail(purple_xfer_get_xfer_type(xfer) != PURPLE_XFER_TYPE_UNKNOWN);
@@ -1609,6 +1613,12 @@
 			priv->remote_ip   = g_strdup(ip);
 			priv->remote_port = port;
 
+			obj = G_OBJECT(xfer);
+			g_object_freeze_notify(obj);
+			g_object_notify(obj, "remote-ip");
+			g_object_notify(obj, "remote-port");
+			g_object_thaw_notify(obj);
+
 			/* Establish a file descriptor. */
 			purple_proxy_connect(NULL, priv->account, priv->remote_ip,
 							   priv->remote_port, connect_cb, xfer);
@@ -1616,13 +1626,13 @@
 			return;
 		}
 		else {
-			priv->fd = fd;
+			purple_xfer_set_fd(xfer, fd);
 		}
 	}
 	else {
 		cond = PURPLE_INPUT_WRITE;
 
-		priv->fd = fd;
+		purple_xfer_set_fd(xfer, fd);
 	}
 
 	begin_transfer(xfer, cond);
@@ -1642,12 +1652,15 @@
 	}
 
 	priv->end_time = time(NULL);
+
+	g_object_notify(G_OBJECT(xfer), "end-time");
+
 	if (priv->ops.end != NULL)
 		priv->ops.end(xfer);
 
 	if (priv->watcher != 0) {
 		purple_input_remove(priv->watcher);
-		priv->watcher = 0;
+		purple_xfer_set_watcher(xfer, 0);
 	}
 
 	if (priv->fd != -1)
@@ -1700,6 +1713,8 @@
 	purple_xfer_set_status(xfer, PURPLE_XFER_STATUS_CANCEL_LOCAL);
 	priv->end_time = time(NULL);
 
+	g_object_notify(G_OBJECT(xfer), "end-time");
+
 	if (purple_xfer_get_filename(xfer) != NULL)
 	{
 		msg = g_strdup_printf(_("You cancelled the transfer of %s"),
@@ -1725,7 +1740,7 @@
 
 	if (priv->watcher != 0) {
 		purple_input_remove(priv->watcher);
-		priv->watcher = 0;
+		purple_xfer_set_watcher(xfer, 0);
 	}
 
 	if (priv->fd != -1)
@@ -1761,6 +1776,8 @@
 	purple_xfer_set_status(xfer, PURPLE_XFER_STATUS_CANCEL_REMOTE);
 	priv->end_time = time(NULL);
 
+	g_object_notify(G_OBJECT(xfer), "end-time");
+
 	account = purple_xfer_get_account(xfer);
 	buddy = purple_blist_find_buddy(account, priv->who);
 
@@ -1791,7 +1808,7 @@
 
 	if (priv->watcher != 0) {
 		purple_input_remove(priv->watcher);
-		priv->watcher = 0;
+		purple_xfer_set_watcher(xfer, 0);
 	}
 
 	if (priv->fd != -1)
@@ -2079,7 +2096,6 @@
 	PURPLE_DBUS_REGISTER_POINTER(xfer, PurpleXfer);
 
 	priv->ui_ops = purple_xfers_get_ui_ops();
-	priv->message = NULL;
 	priv->current_buffer_size = FT_INITIAL_BUFFER_SIZE;
 	priv->fd = -1;
 	priv->ready = PURPLE_XFER_READY_NONE;
@@ -2166,86 +2182,88 @@
 			g_param_spec_enum("type", "Transfer type",
 				"The type of file transfer.", PURPLE_TYPE_XFER_TYPE,
 				PURPLE_XFER_TYPE_UNKNOWN,
-				G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)
+				G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY |
+				G_PARAM_STATIC_STRINGS)
 			);
 
 	g_object_class_install_property(obj_class, PROP_ACCOUNT,
 			g_param_spec_object("account", "Account",
 				"The account sending or receiving the file.",
 				PURPLE_TYPE_ACCOUNT,
-				G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)
+				G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY |
+				G_PARAM_STATIC_STRINGS)
 			);
 
 	g_object_class_install_property(obj_class, PROP_REMOTE_USER,
 			g_param_spec_string("remote-user", "Remote user",
 				"The name of the remote user.", NULL,
-				G_PARAM_READWRITE | G_PARAM_CONSTRUCT)
+				G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS)
 			);
 
 	g_object_class_install_property(obj_class, PROP_MESSAGE,
 			g_param_spec_string("message", "Message",
 				"The message for the file transfer.", NULL,
-				G_PARAM_READWRITE)
+				G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)
 			);
 
 	g_object_class_install_property(obj_class, PROP_FILENAME,
 			g_param_spec_string("filename", "Filename",
 				"The filename for the file transfer.", NULL,
-				G_PARAM_READWRITE)
+				G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)
 			);
 
 	g_object_class_install_property(obj_class, PROP_LOCAL_FILENAME,
 			g_param_spec_string("local-filename", "Local filename",
 				"The local filename for the file transfer.", NULL,
-				G_PARAM_READWRITE)
+				G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)
 			);
 
 	g_object_class_install_property(obj_class, PROP_FILE_SIZE,
 			g_param_spec_int64("file-size", "File size",
 				"Size of the file in a file transfer.",
 				G_MININT64, G_MAXINT64, 0,
-				G_PARAM_READWRITE)
+				G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)
 			);
 
 	g_object_class_install_property(obj_class, PROP_REMOTE_IP,
 			g_param_spec_string("remote-ip", "Remote IP",
 				"The remote IP address in the file transfer.", NULL,
-				G_PARAM_READABLE)
+				G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)
 			);
 
 	g_object_class_install_property(obj_class, PROP_LOCAL_PORT,
 			g_param_spec_int("local-port", "Local port",
 				"The local port number in the file transfer.",
 				G_MININT, G_MAXINT, 0,
-				G_PARAM_READWRITE)
+				G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)
 			);
 
 	g_object_class_install_property(obj_class, PROP_REMOTE_PORT,
 			g_param_spec_int("remote-port", "Remote port",
 				"The remote port number in the file transfer.",
 				G_MININT, G_MAXINT, 0,
-				G_PARAM_READABLE)
+				G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)
 			);
 
 	g_object_class_install_property(obj_class, PROP_FD,
 			g_param_spec_int("fd", "Socket FD",
 				"The socket file descriptor.",
 				G_MININT, G_MAXINT, 0,
-				G_PARAM_READWRITE)
+				G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)
 			);
 
 	g_object_class_install_property(obj_class, PROP_WATCHER,
 			g_param_spec_int("watcher", "Watcher",
 				"The watcher for the file transfer.",
 				G_MININT, G_MAXINT, 0,
-				G_PARAM_READWRITE)
+				G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)
 			);
 
 	g_object_class_install_property(obj_class, PROP_BYTES_SENT,
 			g_param_spec_int64("bytes-sent", "Bytes sent",
 				"The number of bytes sent (or received) so far.",
 				G_MININT64, G_MAXINT64, 0,
-				G_PARAM_READWRITE)
+				G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)
 			);
 
 	g_object_class_install_property(obj_class, PROP_START_TIME,
@@ -2265,7 +2283,7 @@
 #else
 #error Unknown size of time_t
 #endif
-				G_PARAM_READABLE)
+				G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)
 			);
 
 	g_object_class_install_property(obj_class, PROP_END_TIME,
@@ -2285,14 +2303,14 @@
 #else
 #error Unknown size of time_t
 #endif
-				G_PARAM_READABLE)
+				G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)
 			);
 
 	g_object_class_install_property(obj_class, PROP_STATUS,
 			g_param_spec_enum("status", "Status",
 				"The current status for the file transfer.",
 				PURPLE_TYPE_XFER_STATUS, PURPLE_XFER_STATUS_UNKNOWN,
-				G_PARAM_READWRITE)
+				G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)
 			);
 
 	g_type_class_add_private(klass, sizeof(PurpleXferPrivate));

mercurial