gaim/gaim

d6e675ec3a0f
Parents 6571f345e7c0
Children 12a937d9f5a3
Rename schedule_blist_save to gaim_blist_schedule_save, make it public,
and use it in privacy.c. This was already done in head. This makes
Bleeter happy, for some reason.
  • +24 -24
    src/blist.c
  • +9 -0
    src/blist.h
  • +4 -4
    src/privacy.c
  • --- a/src/blist.c Sun Apr 24 17:25:58 2005 -0400
    +++ b/src/blist.c Sun Apr 24 17:47:58 2005 -0400
    @@ -165,8 +165,8 @@
    return FALSE;
    }
    -static void
    -schedule_blist_save()
    +void
    +gaim_blist_schedule_save()
    {
    if (blist_save_timer != 0)
    gaim_timeout_remove(blist_save_timer);
    @@ -406,7 +406,7 @@
    g_free(buddy->name);
    buddy->name = g_strdup(name);
    - schedule_blist_save();
    + gaim_blist_schedule_save();
    if (ops && ops->update)
    ops->update(gaimbuddylist, (GaimBlistNode *)buddy);
    @@ -424,7 +424,7 @@
    else
    chat->alias = NULL;
    - schedule_blist_save();
    + gaim_blist_schedule_save();
    if (ops && ops->update)
    ops->update(gaimbuddylist, (GaimBlistNode *)chat);
    @@ -443,7 +443,7 @@
    else
    buddy->alias = NULL;
    - schedule_blist_save();
    + gaim_blist_schedule_save();
    if (ops && ops->update)
    ops->update(gaimbuddylist, (GaimBlistNode *)buddy);
    @@ -466,7 +466,7 @@
    else
    buddy->server_alias = NULL;
    - schedule_blist_save();
    + gaim_blist_schedule_save();
    if (ops && ops->update)
    ops->update(gaimbuddylist, (GaimBlistNode *)buddy);
    @@ -549,7 +549,7 @@
    }
    /* Save our changes */
    - schedule_blist_save();
    + gaim_blist_schedule_save();
    /* Update the UI */
    if (ops && ops->update)
    @@ -655,7 +655,7 @@
    else
    gaim_blist_node_remove_setting((GaimBlistNode *)buddy, "buddy_icon");
    - schedule_blist_save();
    + gaim_blist_schedule_save();
    gaim_blist_update_buddy_icon(buddy);
    }
    @@ -708,7 +708,7 @@
    ops->remove(gaimbuddylist, cnode);
    - schedule_blist_save();
    + gaim_blist_schedule_save();
    }
    if (node != NULL) {
    @@ -737,7 +737,7 @@
    }
    }
    - schedule_blist_save();
    + gaim_blist_schedule_save();
    if (ops && ops->update)
    ops->update(gaimbuddylist, (GaimBlistNode *)cnode);
    @@ -809,7 +809,7 @@
    ops->remove(gaimbuddylist, bnode);
    - schedule_blist_save();
    + gaim_blist_schedule_save();
    if (bnode->parent->parent != (GaimBlistNode*)g) {
    hb = g_new(struct _gaim_hbuddy, 1);
    @@ -866,7 +866,7 @@
    gaim_contact_compute_priority_buddy(gaim_buddy_get_contact(buddy));
    - schedule_blist_save();
    + gaim_blist_schedule_save();
    if (ops && ops->update)
    ops->update(gaimbuddylist, (GaimBlistNode*)buddy);
    @@ -903,7 +903,7 @@
    else
    contact->alias = NULL;
    - schedule_blist_save();
    + gaim_blist_schedule_save();
    if (ops && ops->update)
    ops->update(gaimbuddylist, (GaimBlistNode*)contact);
    @@ -1046,7 +1046,7 @@
    ops->remove(gaimbuddylist, cnode);
    - schedule_blist_save();
    + gaim_blist_schedule_save();
    }
    if (node && (GAIM_BLIST_NODE_IS_CONTACT(node) ||
    @@ -1072,7 +1072,7 @@
    g->currentsize++;
    g->totalsize++;
    - schedule_blist_save();
    + gaim_blist_schedule_save();
    if (ops && cnode->child)
    ops->update(gaimbuddylist, cnode);
    @@ -1163,7 +1163,7 @@
    gaimbuddylist->root = gnode;
    }
    - schedule_blist_save();
    + gaim_blist_schedule_save();
    if (ops && ops->update) {
    ops->update(gaimbuddylist, gnode);
    @@ -1206,7 +1206,7 @@
    if (node->next)
    node->next->prev = node->prev;
    - schedule_blist_save();
    + gaim_blist_schedule_save();
    /* Update the UI */
    if (ops && ops->remove)
    @@ -1255,7 +1255,7 @@
    }
    contact->totalsize--;
    - schedule_blist_save();
    + gaim_blist_schedule_save();
    /* Re-sort the contact */
    if (contact->priority == buddy) {
    @@ -1318,7 +1318,7 @@
    }
    group->totalsize--;
    - schedule_blist_save();
    + gaim_blist_schedule_save();
    /* Update the UI */
    if (ops && ops->remove)
    @@ -1372,7 +1372,7 @@
    if (node->next)
    node->next->prev = node->prev;
    - schedule_blist_save();
    + gaim_blist_schedule_save();
    /* Update the UI */
    if (ops && ops->remove)
    @@ -2469,7 +2469,7 @@
    g_hash_table_remove(node->settings, key);
    - schedule_blist_save();
    + gaim_blist_schedule_save();
    }
    @@ -2487,7 +2487,7 @@
    g_hash_table_replace(node->settings, g_strdup(key), setting);
    - schedule_blist_save();
    + gaim_blist_schedule_save();
    }
    gboolean gaim_blist_node_get_bool(GaimBlistNode* node, const char *key)
    @@ -2522,7 +2522,7 @@
    g_hash_table_replace(node->settings, g_strdup(key), setting);
    - schedule_blist_save();
    + gaim_blist_schedule_save();
    }
    int gaim_blist_node_get_int(GaimBlistNode* node, const char *key)
    @@ -2558,7 +2558,7 @@
    g_hash_table_replace(node->settings, g_strdup(key), setting);
    - schedule_blist_save();
    + gaim_blist_schedule_save();
    }
    const char *gaim_blist_node_get_string(GaimBlistNode* node, const char *key)
    --- a/src/blist.h Sun Apr 24 17:25:58 2005 -0400
    +++ b/src/blist.h Sun Apr 24 17:47:58 2005 -0400
    @@ -722,6 +722,15 @@
    void gaim_blist_load();
    /**
    + * Schedule a save of the blist.xml file. This is used by the privacy
    + * API whenever the privacy settings are changed. If you make a change
    + * to blist.xml using one of the functions in the buddy list API, then
    + * the buddy list is saved automatically, so you should not need to
    + * call this.
    + */
    +void gaim_blist_schedule_save();
    +
    +/**
    * Requests from the user information needed to add a buddy to the
    * buddy list.
    *
    --- a/src/privacy.c Sun Apr 24 17:25:58 2005 -0400
    +++ b/src/privacy.c Sun Apr 24 17:47:58 2005 -0400
    @@ -58,7 +58,7 @@
    if (privacy_ops != NULL && privacy_ops->permit_added != NULL)
    privacy_ops->permit_added(account, who);
    - gaim_blist_sync();
    + gaim_blist_schedule_save();
    return TRUE;
    }
    @@ -94,7 +94,7 @@
    if (privacy_ops != NULL && privacy_ops->permit_removed != NULL)
    privacy_ops->permit_removed(account, who);
    - gaim_blist_sync();
    + gaim_blist_schedule_save();
    return TRUE;
    }
    @@ -129,7 +129,7 @@
    if (privacy_ops != NULL && privacy_ops->deny_added != NULL)
    privacy_ops->deny_added(account, who);
    - gaim_blist_sync();
    + gaim_blist_schedule_save();
    return TRUE;
    }
    @@ -165,7 +165,7 @@
    if (privacy_ops != NULL && privacy_ops->deny_removed != NULL)
    privacy_ops->deny_removed(account, who);
    - gaim_blist_sync();
    + gaim_blist_schedule_save();
    return TRUE;
    }