Mercurial > pidgin.yaz
changeset 11536:16796e09b9c1
[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 <tailor@pidgin.im>
author | Stu Tomlinson <stu@nosnilmot.com> |
---|---|
date | Wed, 14 Sep 2005 00:54:21 +0000 |
parents | bb98b2c09224 |
children | 9b58dadf1c16 |
files | plugins/ChangeLog.API src/blist.h src/gtkconn.c src/protocols/novell/novell.c src/protocols/sametime/sametime.c |
diffstat | 5 files changed, 33 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- 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
--- 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 */
--- 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);
--- 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:
--- 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 }