From 2cd9b43eff8d86d42a83d08ec60fc96f20ce9736 Mon Sep 17 00:00:00 2001 From: Ben Date: Fri, 30 Apr 2010 18:09:25 +0000 Subject: [PATCH] Completely override .purple XML write attempts. --- thblist.c | 37 ++++++++++++++++++++++++++++++++++++- thrasher.c | 5 ----- 2 files changed, 36 insertions(+), 6 deletions(-) diff --git a/thblist.c b/thblist.c index 82d469f..401ca60 100644 --- a/thblist.c +++ b/thblist.c @@ -50,7 +50,7 @@ static char* status_text_for_buddy(PurpleBuddy *buddy, PurpleStatus *status); static gboolean thrasher_buddy_request_authorize_cb1(gpointer data_in); static gboolean thrasher_buddy_request_authorize_cb2(gpointer data_in); - +static void no_dot_purple_no_op(void*); static PurpleAccountUiOps thrasher_account_uiops = { @@ -78,6 +78,37 @@ static PurpleAccountUiOps thrasher_account_uiops = NULL }; +static PurpleBlistUiOps thrasher_blist_uiops = { + /* new_list */ + NULL, + /* new_node */ + NULL, + /* show */ + NULL, + /* update */ + NULL, + /* remove */ + NULL, + /* destroy */ + NULL, + /* set_visible */ + NULL, + /* request_add_buddy */ + NULL, + /* request_add_chat */ + NULL, + /* request_add_group */ + NULL, + /* save_node */ + (void(*)(PurpleBlistNode*)) no_dot_purple_no_op, + /* remove_node */ + (void(*)(PurpleBlistNode*)) no_dot_purple_no_op, + /* save_account */ + (void(*)(PurpleAccount*)) no_dot_purple_no_op, + /* reserved */ + NULL, +}; + struct _PurpleStatusType { PurpleStatusPrimitive primitive; @@ -413,11 +444,15 @@ thrasher_blist_get_handle () return &handle; } +static void +no_dot_purple_no_op(void *nope_not_here) {} void thrasher_blist_init() { purple_accounts_set_ui_ops(&thrasher_account_uiops); + purple_blist_set_ui_ops(&thrasher_blist_uiops); + purple_signal_connect(purple_blist_get_handle(), "buddy-status-changed", thrasher_blist_get_handle(), diff --git a/thrasher.c b/thrasher.c index 70a83bf..0b1396f 100644 --- a/thrasher.c +++ b/thrasher.c @@ -247,11 +247,6 @@ thrasher_login (char *service, char *username, char *password, char *jid, PurpleAccount *account; PurpleSavedStatus *status; - /* Need to research these... */ - purple_blist_load(); - thrasher_prefs_init(); - purple_pounces_load(); /* Don't believe we need this */ - /* Setup the account and throw it back */ account = purple_account_new(username, service); g_hash_table_insert(jid_to_account, g_strdup(jid), account); -- 2.11.4.GIT