libpurple/conversation.c

changeset 36109
2e4dd08b0131
parent 36108
69b4fce85ffa
child 36110
63663622e327
equal deleted inserted replaced
36108:69b4fce85ffa 36109:2e4dd08b0131
412 g_return_if_fail(title != NULL); 412 g_return_if_fail(title != NULL);
413 413
414 g_free(priv->title); 414 g_free(priv->title);
415 priv->title = g_strdup(title); 415 priv->title = g_strdup(title);
416 416
417 g_object_notify_by_pspec(G_OBJECT(conv), properties[PROP_TITLE]); 417 if (!g_object_get_data(G_OBJECT(conv), "is-finalizing"))
418 g_object_notify_by_pspec(G_OBJECT(conv), properties[PROP_TITLE]);
418 419
419 purple_conversation_update(conv, PURPLE_CONVERSATION_UPDATE_TITLE); 420 purple_conversation_update(conv, PURPLE_CONVERSATION_UPDATE_TITLE);
420 } 421 }
421 422
422 const char * 423 const char *
1131 "conversation-created", conv); 1132 "conversation-created", conv);
1132 1133
1133 g_object_unref(account); 1134 g_object_unref(account);
1134 } 1135 }
1135 1136
1137 static void
1138 purple_conversation_dispose(GObject *object)
1139 {
1140 g_object_set_data(object, "is-finalizing", GINT_TO_POINTER(TRUE));
1141 }
1142
1136 /* GObject finalize function */ 1143 /* GObject finalize function */
1137 static void 1144 static void
1138 purple_conversation_finalize(GObject *object) 1145 purple_conversation_finalize(GObject *object)
1139 { 1146 {
1140 PurpleConversation *conv = PURPLE_CONVERSATION(object); 1147 PurpleConversation *conv = PURPLE_CONVERSATION(object);
1173 { 1180 {
1174 GObjectClass *obj_class = G_OBJECT_CLASS(klass); 1181 GObjectClass *obj_class = G_OBJECT_CLASS(klass);
1175 1182
1176 parent_class = g_type_class_peek_parent(klass); 1183 parent_class = g_type_class_peek_parent(klass);
1177 1184
1185 obj_class->dispose = purple_conversation_dispose;
1178 obj_class->finalize = purple_conversation_finalize; 1186 obj_class->finalize = purple_conversation_finalize;
1179 obj_class->constructed = purple_conversation_constructed; 1187 obj_class->constructed = purple_conversation_constructed;
1180 1188
1181 /* Setup properties */ 1189 /* Setup properties */
1182 obj_class->get_property = purple_conversation_get_property; 1190 obj_class->get_property = purple_conversation_get_property;

mercurial