gobjectification: 22d658ce: PurpleBuddyList only exists in blist.c
aluink at soc.pidgin.im
aluink at soc.pidgin.im
Wed Jul 15 20:55:28 EDT 2009
-----------------------------------------------------------------
Revision: 22d658ced930d6608ec29268fd129b62d55ce8a0
Ancestor: 34bbcc961e079f1af02905cd16ddd52030dd0d44
Author: aluink at soc.pidgin.im
Date: 2009-07-16T00:46:52
Branch: im.pidgin.gobjectification
URL: http://d.pidgin.im/viewmtn/revision/info/22d658ced930d6608ec29268fd129b62d55ce8a0
Modified files:
libpurple/blist.c libpurple/blist.h
libpurple/protocols/myspace/myspace.c
ChangeLog:
PurpleBuddyList only exists in blist.c
-------------- next part --------------
============================================================
--- libpurple/blist.c b488f7891c1e1ec4bd05bdb2d9763ab9f8dab3d3
+++ libpurple/blist.c 4aa7c9f3a367c6f8d5523a0a53937804adc1f32c
@@ -34,6 +34,7 @@ static GType purple_blist_get_gtype(void
static GType purple_blist_get_gtype(void);
/** @copydoc _PurpleBlist */
+typedef struct _PurpleBuddyList PurpleBuddyList;
typedef struct _PurpleBuddyListClass PurpleBuddyListClass;
#define PURPLE_BUDDY_LIST_TYPE (purple_blist_get_gtype ())
#define PURPLE_BUDDY_LIST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PURPLE_BUDDY_LIST_TYPE, PurpleBuddyList))
@@ -71,6 +72,24 @@ static void purple_blist_buddies_cache_a
static void purple_blist_buddies_cache_add_account(PurpleAccount *account);
+PurpleBuddyList *
+purple_blist_get_list()
+{
+ static PurpleBuddyList *list = NULL;
+ if(!list){
+ GList *account;
+ PurpleBlistUiOps *ui_ops = purple_blist_get_ui_ops();
+ list = g_object_new(PURPLE_BUDDY_LIST_TYPE, NULL);
+ for (account = purple_accounts_get_all(); account != NULL; account = account->next) {
+ purple_blist_buddies_cache_add_account(account->data);
+ }
+
+ if (ui_ops != NULL && ui_ops->new_list != NULL)
+ ui_ops->new_list(list);
+ }
+ return list;
+}
+
/*********************************************************************
* Private utility functions *
*********************************************************************/
@@ -360,24 +379,6 @@ purple_blist_load()
* Public API functions *
*****************************************************************************/
-PurpleBuddyList *
-purple_blist_get_list()
-{
- static PurpleBuddyList *list = NULL;
- if(!list){
- GList *account;
- PurpleBlistUiOps *ui_ops = purple_blist_get_ui_ops();
- list = g_object_new(PURPLE_BUDDY_LIST_TYPE, NULL);
- for (account = purple_accounts_get_all(); account != NULL; account = account->next) {
- purple_blist_buddies_cache_add_account(account->data);
- }
-
- if (ui_ops != NULL && ui_ops->new_list != NULL)
- ui_ops->new_list(list);
- }
- return list;
-}
-
PurpleBlistNode *
purple_blist_get_root()
{
============================================================
--- libpurple/blist.h 37e2fd8d08535e02cd627e0fb8b36c6ee269c1da
+++ libpurple/blist.h e4664618ab9f005fd3b655abdd1fa76c519f3246
@@ -43,8 +43,6 @@ typedef struct _PurpleBlistUiOps PurpleB
/**************************************************************************/
/* Enumerations */
/**************************************************************************/
-typedef struct _PurpleBuddyList PurpleBuddyList;
-
#include "account.h"
#include "buddyicon.h"
#include "status.h"
@@ -124,20 +122,6 @@ extern "C" {
/*@{*/
/**
- * Creates a new buddy list
- *
- * @return The new buddy list.
- */
-PurpleBuddyList *purple_blist_new(void);
-
-/**
- * Returns the main buddy list.
- *
- * @return The main buddy list.
- */
-PurpleBuddyList *purple_blist_get_list(void);
-
-/**
* Returns the root node of the main buddy list.
*
* @return The root node.
============================================================
--- libpurple/protocols/myspace/myspace.c 5032c737d9ea7fcb96318b6770e8d8dcd6b92893
+++ libpurple/protocols/myspace/myspace.c 78cc63db4b14164f687895fc6c251e897f309930
@@ -1328,7 +1328,6 @@ msim_incoming_status(MsimSession *sessio
static gboolean
msim_incoming_status(MsimSession *session, MsimMessage *msg)
{
- PurpleBuddyList *blist;
MsimUser *user;
GList *list;
gchar *status_headline, *status_headline_escaped;
@@ -1363,8 +1362,6 @@ msim_incoming_status(MsimSession *sessio
purple_debug_info("msim", "msim_status: %s's status code = %d\n", username, status_code);
status_headline = msim_msg_get_string_from_element(g_list_nth_data(list, MSIM_STATUS_ORDINAL_HEADLINE));
- blist = purple_blist_get_list();
-
/* Add buddy if not found.
* TODO: Could this be responsible for #3444? */
user = msim_find_user(session, username);
More information about the Commits
mailing list