comparison finch/gntblist.c @ 16771:d7ad8013b914

Fix this spectacularly braindead code. I must've been on the good stuff when I wrote this. Fixes #364.
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Wed, 02 May 2007 04:42:06 +0000
parents 1c9835f8b29c
children d0f9b2b217cf
comparison
equal deleted inserted replaced
16770:8a5fe6db7750 16771:d7ad8013b914
110 static const char * get_display_name(PurpleBlistNode *node); 110 static const char * get_display_name(PurpleBlistNode *node);
111 static void savedstatus_changed(PurpleSavedStatus *now, PurpleSavedStatus *old); 111 static void savedstatus_changed(PurpleSavedStatus *now, PurpleSavedStatus *old);
112 static void blist_show(PurpleBuddyList *list); 112 static void blist_show(PurpleBuddyList *list);
113 static void update_node_display(PurpleBlistNode *buddy, FinchBlist *ggblist); 113 static void update_node_display(PurpleBlistNode *buddy, FinchBlist *ggblist);
114 static void update_buddy_display(PurpleBuddy *buddy, FinchBlist *ggblist); 114 static void update_buddy_display(PurpleBuddy *buddy, FinchBlist *ggblist);
115 static void account_signed_on_cb(void); 115 static void account_signed_on_cb(PurpleConnection *pc, gpointer null);
116 116
117 /* Sort functions */ 117 /* Sort functions */
118 static int blist_node_compare_position(PurpleBlistNode *n1, PurpleBlistNode *n2); 118 static int blist_node_compare_position(PurpleBlistNode *n1, PurpleBlistNode *n2);
119 static int blist_node_compare_text(PurpleBlistNode *n1, PurpleBlistNode *n2); 119 static int blist_node_compare_text(PurpleBlistNode *n1, PurpleBlistNode *n2);
120 static int blist_node_compare_status(PurpleBlistNode *n1, PurpleBlistNode *n2); 120 static int blist_node_compare_status(PurpleBlistNode *n1, PurpleBlistNode *n2);
2063 } 2063 }
2064 } 2064 }
2065 } 2065 }
2066 2066
2067 static void 2067 static void
2068 account_signed_on_cb() 2068 account_signed_on_cb(PurpleConnection *pc, gpointer null)
2069 { 2069 {
2070 PurpleBlistNode *node; 2070 PurpleBlistNode *node;
2071 2071
2072 for (node = purple_blist_get_root(); node; 2072 for (node = purple_blist_get_root(); node;
2073 node = purple_blist_node_next(node, FALSE)) { 2073 node = purple_blist_node_next(node, FALSE)) {
2074 if (PURPLE_BLIST_NODE_IS_CHAT(node)) { 2074 if (PURPLE_BLIST_NODE_IS_CHAT(node)) {
2075 PurpleChat *chat = (PurpleChat*)node; 2075 PurpleChat *chat = (PurpleChat*)node;
2076 if (purple_blist_node_get_bool(node, "gnt-autojoin")) 2076 if (chat->account == purple_connection_get_account(pc) &&
2077 purple_blist_node_get_bool(node, "gnt-autojoin"))
2077 serv_join_chat(purple_account_get_connection(chat->account), chat->components); 2078 serv_join_chat(purple_account_get_connection(chat->account), chat->components);
2078 } 2079 }
2079 } 2080 }
2080 } 2081 }
2081 2082