# HG changeset patch # User Stu Tomlinson # Date 1126659261 0 # Node ID 16796e09b9c15ecb6d56041d8a6eb9b5fbb362f6 # Parent bb98b2c092247df53f31f975132c0e87bb6b2441 [gaim-migrate @ 13790] GaimBuddy->uc is gone! at last! (it survived probably > 5 years). You'll want to make sure any plugins that make use of GaimBuddy in any way are recompiled, otherwise you'll have el-bizarro crashes. You probably want to make sure you make clean && make && make install too. Maybe reformatting your hard disk to remove any references to uc would be a good idea too. committer: Tailor Script diff -r bb98b2c09224 -r 16796e09b9c1 plugins/ChangeLog.API --- a/plugins/ChangeLog.API Tue Sep 13 21:14:58 2005 +0000 +++ b/plugins/ChangeLog.API Wed Sep 14 00:54:21 2005 +0000 @@ -102,6 +102,7 @@ * Changed: gaim_notify_userinfo, removed primary and secondary args * Changed: GaimNotifyUiOps::notify_userinfo, removed title, primary, and secondary args + * Removed: uc from the GaimBuddy struct Signals: * Changed: "received-im-msg" and "received-chat-msg" to match, both diff -r bb98b2c09224 -r 16796e09b9c1 src/blist.h --- a/src/blist.h Tue Sep 13 21:14:58 2005 +0000 +++ b/src/blist.h Wed Sep 14 00:54:21 2005 +0000 @@ -113,7 +113,6 @@ char *server_alias; /**< The server-specified alias of the buddy. (i.e. MSN "Friendly Names") */ GaimBuddyPresenceState present; /**< This is 0 if the buddy appears offline, 1 if he appears online, and 2 if he has recently signed on */ - int uc; /**< This is a cryptic bitmask that makes sense only to the prpl. This will get changed */ void *proto_data; /**< This allows the prpl to associate whatever data it wants with a buddy */ GaimBuddyIcon *icon; /**< The buddy icon. */ GaimAccount *account; /**< the account this buddy belongs to */ diff -r bb98b2c09224 -r 16796e09b9c1 src/gtkconn.c --- a/src/gtkconn.c Tue Sep 13 21:14:58 2005 +0000 +++ b/src/gtkconn.c Wed Sep 14 00:54:21 2005 +0000 @@ -69,7 +69,8 @@ gtk_gaim_status_box_set_connecting(GTK_GAIM_STATUS_BOX(gtkblist->statusbox), (gaim_connections_get_connecting() != NULL)); account = gaim_connection_get_account(gc); - g_hash_table_remove(hash, account); + if (hash != NULL) + g_hash_table_remove(hash, account); if (accountReconnecting == NULL) return; accountReconnecting = g_slist_remove(accountReconnecting, account); diff -r bb98b2c09224 -r 16796e09b9c1 src/protocols/novell/novell.c --- a/src/protocols/novell/novell.c Tue Sep 13 21:14:58 2005 +0000 +++ b/src/protocols/novell/novell.c Wed Sep 14 00:54:21 2005 +0000 @@ -2756,7 +2756,20 @@ static void novell_list_emblems(GaimBuddy * buddy, const char **se, const char **sw, const char **nw, const char **ne) { - int status = buddy->uc >> 1; + NMUserRecord *user_record = NULL; + GaimConnection *gc; + NMUser *user; + int status = 0; + + gc = gaim_account_get_connection(buddy->account); + + if (gc == NULL || (user = gc->proto_data) == NULL) + return; + + user_record = nm_find_user_record(user, buddy->name); + + if (user_record) + status = nm_user_record_get_status(user_record); switch (status) { case NM_STATUS_AVAILABLE: diff -r bb98b2c09224 -r 16796e09b9c1 src/protocols/sametime/sametime.c --- a/src/protocols/sametime/sametime.c Tue Sep 13 21:14:58 2005 +0000 +++ b/src/protocols/sametime/sametime.c Wed Sep 14 00:54:21 2005 +0000 @@ -2606,15 +2606,16 @@ static void mw_prpl_list_emblems(GaimBuddy *b, const char **se, const char **sw, const char **nw, const char **ne) { - - /* we have to add the UC_UNAVAILABLE flag so that Gaim will recognie - certain away states as indicating the buddy is unavailable */ + GaimPresence *presence = gaim_buddy_get_presence(b); + GaimStatus *status = gaim_presence_get_active_status(presence); if(! GAIM_BUDDY_IS_ONLINE(b)) { *se = "offline"; - } else if(b->uc == (mwStatus_AWAY /* XXX | UC_UNAVAILABLE */)) { + } else if(!gaim_presence_is_available(presence) && + !strcmp(gaim_status_get_id(status), MW_STATE_AWAY)) { *se = "away"; - } else if(b->uc == (mwStatus_BUSY /* XXX | UC_UNAVAILABLE */)) { + } else if(!gaim_presence_is_available(presence) && + !strcmp(gaim_status_get_id(status), MW_STATE_BUSY)) { *se = "dnd"; } } @@ -2635,6 +2636,15 @@ static const char *status_text(GaimBuddy *b) { + GaimPresence *presence = gaim_buddy_get_presence(b); + GaimStatus *status = gaim_presence_get_active_status(presence); + + return gaim_status_get_name(status); + + /* I left this here in case it's more accurate than the status name. + * Stu. */ +#if 0 + guint status = b->uc; if(! GAIM_BUDDY_IS_ONLINE(b) ) { @@ -2655,6 +2665,7 @@ } else { return MW_STATE_UNKNOWN; } +#endif }