gobjectification: 2fbbe42e: Fix up the previous propagate and one or...
darkrain42 at pidgin.im
darkrain42 at pidgin.im
Mon Jul 27 02:16:34 EDT 2009
-----------------------------------------------------------------
Revision: 2fbbe42e8102ea9c785c06c6be7a4d7163266cf7
Ancestor: 2fc04d793c0e445fc4989c34b0caf85ddf7a24c8
Author: darkrain42 at pidgin.im
Date: 2009-07-27T06:12:21
Branch: im.pidgin.gobjectification
URL: http://d.pidgin.im/viewmtn/revision/info/2fbbe42e8102ea9c785c06c6be7a4d7163266cf7
Modified files:
libpurple/blist-node.c libpurple/blist.c libpurple/buddy.c
libpurple/chat.c libpurple/cipher.c libpurple/contact.c
libpurple/group.c
ChangeLog:
Fix up the previous propagate and one or two other bugs.
I wish 'mtn cp' existed and worked sorta like svn's.
-------------- next part --------------
============================================================
--- libpurple/blist-node.c 0edde9e80ddeabb5ea8494350d910cd6429d3fb9
+++ libpurple/blist-node.c 25dab095710c44dd8d4358680388414f7220283f
@@ -205,6 +205,7 @@ void purple_blist_node_remove_setting(Pu
void purple_blist_node_remove_setting(PurpleBlistNode *node, const char *key)
{
PurpleBlistNodePrivate *priv;
+ PurpleBlistUiOps *ops;
g_return_if_fail(node != NULL);
@@ -215,7 +216,9 @@ void purple_blist_node_remove_setting(Pu
g_hash_table_remove(priv->settings, key);
- purple_blist_schedule_save();
+ ops = purple_blist_get_ui_ops();
+ if (ops && ops->save_node)
+ ops->save_node(node);
}
void
@@ -259,6 +262,7 @@ purple_blist_node_set_bool(PurpleBlistNo
{
GValue *value;
PurpleBlistNodePrivate *priv;
+ PurpleBlistUiOps *ops;
g_return_if_fail(node != NULL);
@@ -272,7 +276,9 @@ purple_blist_node_set_bool(PurpleBlistNo
g_hash_table_replace(priv->settings, g_strdup(key), value);
- purple_blist_schedule_save();
+ ops = purple_blist_get_ui_ops();
+ if (ops && ops->save_node)
+ ops->save_node(node);
}
gboolean
@@ -303,6 +309,7 @@ purple_blist_node_set_int(PurpleBlistNod
{
GValue *value;
PurpleBlistNodePrivate *priv;
+ PurpleBlistUiOps *ops;
g_return_if_fail(node != NULL);
@@ -316,7 +323,9 @@ purple_blist_node_set_int(PurpleBlistNod
g_hash_table_replace(priv->settings, g_strdup(key), value);
- purple_blist_schedule_save();
+ ops = purple_blist_get_ui_ops();
+ if (ops && ops->save_node)
+ ops->save_node(node);
}
int
@@ -347,6 +356,7 @@ purple_blist_node_set_string(PurpleBlist
{
GValue *value;
PurpleBlistNodePrivate *priv;
+ PurpleBlistUiOps *ops;
g_return_if_fail(node != NULL);
@@ -360,7 +370,9 @@ purple_blist_node_set_string(PurpleBlist
g_hash_table_replace(priv->settings, g_strdup(key), value);
- purple_blist_schedule_save();
+ ops = purple_blist_get_ui_ops();
+ if (ops && ops->save_node)
+ ops->save_node(node);
}
GHashTable *
@@ -372,7 +384,7 @@ purple_blist_node_get_settings(PurpleBli
priv = PURPLE_BLIST_NODE_GET_PRIVATE(node);
return priv->settings;
-}
+}
const char *
purple_blist_node_get_string(PurpleBlistNode* node, const char *key)
============================================================
--- libpurple/blist.c e2032328f9993e06e3492c2ecd8cc59ca2ea26c4
+++ libpurple/blist.c 78c1382f25731d96121dcb37e1f6b4784dec6b45
@@ -550,7 +550,7 @@ void purple_blist_rename_group(PurpleGro
/* Save our changes */
if (ops && ops->save_node)
- ops->save_node((PurpleBlistNode*) source);
+ ops->save_node(PURPLE_BLIST_NODE(source));
/* Update the UI */
if (ops && ops->update)
@@ -625,7 +625,7 @@ void purple_blist_rename_buddy(PurpleBud
hb->account = purple_buddy_get_account(buddy);
hb->group = (PURPLE_BLIST_NODE(buddy))->parent->parent;
g_hash_table_remove(list->buddies, hb);
-
+
account_buddies = g_hash_table_lookup(list->buddies_cache, purple_buddy_get_account(buddy));
g_hash_table_remove(account_buddies, hb);
@@ -643,7 +643,7 @@ void purple_blist_rename_buddy(PurpleBud
purple_buddy_set_name(buddy, name);
if (ops && ops->save_node)
- ops->save_node((PurpleBlistNode*) buddy);
+ ops->save_node(PURPLE_BLIST_NODE(buddy));
if (ops && ops->update)
ops->update(PURPLE_BLIST_NODE(buddy));
@@ -1279,8 +1279,6 @@ void purple_blist_add_chat(PurpleChat *c
* reinitialize it */
if (ops && ops->new_node)
ops->new_node(cnode);
-
- purple_blist_schedule_save();
}
if (node != NULL) {
@@ -1309,7 +1307,8 @@ void purple_blist_add_chat(PurpleChat *c
}
}
- purple_blist_schedule_save();
+ if (ops && ops->save_node)
+ ops->save_node(PURPLE_BLIST_NODE(cnode));
if (ops && ops->update)
ops->update(PURPLE_BLIST_NODE(cnode));
@@ -1360,7 +1359,6 @@ void purple_blist_add_buddy(PurpleBuddy
}
cnode = PURPLE_BLIST_NODE(c);
- PurpleBlistUiOps *ops;
if (bnode->parent) {
if (PURPLE_BUDDY_IS_ONLINE(buddy)) {
@@ -1457,7 +1455,8 @@ void purple_blist_add_buddy(PurpleBuddy
purple_contact_invalidate_priority_buddy(purple_buddy_get_contact(buddy));
- purple_blist_schedule_save();
+ if (ops && ops->save_node)
+ ops->save_node(PURPLE_BLIST_NODE(buddy));
if (ops && ops->update)
ops->update(PURPLE_BLIST_NODE(buddy));
@@ -1541,6 +1540,8 @@ PurpleBuddy *purple_find_buddy_in_group(
ret = g_hash_table_lookup(purple_blist_get_list()->buddies, &hb);
g_free(hb.name);
+
+ return ret;
}
static void
============================================================
--- libpurple/buddy.c 7a2332c028f381431037b1c5dcfd88f4ce7a092e
+++ libpurple/buddy.c 95fac21bf4aee01f8469764d0ce421511bb335e8
@@ -169,7 +169,8 @@ void purple_buddy_set_alias(PurpleBuddy
g_free(new_alias); /* could be "\0" */
}
- purple_blist_schedule_save();
+ if (ops && ops->save_node)
+ ops->save_node(PURPLE_BLIST_NODE(buddy));
if (ops && ops->update)
ops->update(PURPLE_BLIST_NODE(buddy));
@@ -224,7 +225,8 @@ void purple_blist_server_alias_buddy(Pur
g_free(new_alias); /* could be "\0"; */
}
- purple_blist_schedule_save();
+ if (ops && ops->save_node)
+ ops->save_node(PURPLE_BLIST_NODE(buddy));
if (ops && ops->update)
ops->update(PURPLE_BLIST_NODE(buddy));
============================================================
--- libpurple/chat.c 1e3c511b26a60330d7650fed24ca0095cdd50abd
+++ libpurple/chat.c c1cc93b946628f634f5a1b90d6d748558ecdc2da
@@ -148,7 +148,8 @@ void purple_chat_set_alias(PurpleChat *c
g_free(new_alias); /* could be "\0" */
}
- purple_blist_schedule_save();
+ if (ops && ops->save_node)
+ ops->save_node(PURPLE_BLIST_NODE(chat));
if (ops && ops->update)
ops->update(PURPLE_BLIST_NODE(chat));
============================================================
--- libpurple/cipher.c b20a384b1a7271cf355c6c533a3beb3ab2352efb
+++ libpurple/cipher.c 2707d9bafdb42c9d2ca66b57c59f3c07d0945e8d
@@ -35,8 +35,8 @@ static void
* Object Stuff
*****************************************************************************/
static void
-purple_cipher_finalize(obj) {
- purple_cipher_reset(obj);
+purple_cipher_finalize(GObject *obj) {
+ purple_cipher_reset(PURPLE_CIPHER(obj));
G_OBJECT_CLASS(parent_class)->finalize(obj);
}
============================================================
--- libpurple/contact.c 6a6df4af0dde39ad643b0a2a3a84e224ec0bdaef
+++ libpurple/contact.c dcb0e75282a90707139d8d17f17fbe4ad1f487c5
@@ -170,7 +170,8 @@ void purple_blist_alias_contact(PurpleCo
g_free(new_alias); /* could be "\0" */
}
- purple_blist_schedule_save();
+ if (ops && ops->save_node)
+ ops->save_node(PURPLE_BLIST_NODE(contact));
if (ops && ops->update)
ops->update(PURPLE_BLIST_NODE(contact));
============================================================
--- libpurple/group.c 10095187033fbb9a71dbe761f708173e736afec7
+++ libpurple/group.c fa05064deffe944819664db0a75877e57e784d7c
@@ -116,6 +116,7 @@ purple_group_add_update(PurpleGroup *gro
}
group->totalsize++;
+ #warning Is this schedule save necessary?
purple_blist_schedule_save();
purple_signal_emit(purple_blist_node_get_handle(), "node-added", child);
More information about the Commits
mailing list