Mercurial > pidgin
diff src/protocols/yahoo/yahoo.c @ 4724:b9e7ccf21f9c
[gaim-migrate @ 5037]
I stayed up all night and readded tooltips. It feels great.
GTK 2 provides no easy way to add a tooltip to a row of a GtkTreeView so
I had to do it all by hand. In doing so, I took some liberties and did
some stuff most tooltips can't do... my tooltips have Markup and Pixbufs
in them =-).
Tomorrow, KingAnt gets back. I'll let him readd the AIM-specific tooltip
stuff. Capabilities and logged on time used to live in the buddy struct, but
were removed for being too aim-centric. KingAnt will put them back, I'm sure.
committer: Tailor Script <tailor@pidgin.im>
| author | Sean Egan <seanegan@gmail.com> |
|---|---|
| date | Wed, 12 Mar 2003 11:37:31 +0000 |
| parents | 534eaa4ead94 |
| children | 751c37a940dd |
line wrap: on
line diff
--- a/src/protocols/yahoo/yahoo.c Wed Mar 12 07:09:27 2003 +0000 +++ b/src/protocols/yahoo/yahoo.c Wed Mar 12 11:37:31 2003 +0000 @@ -1076,6 +1076,17 @@ } } +static char *yahoo_tooltip_text(struct buddy *b) +{ + struct yahoo_data *yd = (struct yahoo_data*)b->account->gc->proto_data; + if (b->uc & UC_UNAVAILABLE && b->uc >> 2 != YAHOO_STATUS_IDLE) { + if ((b->uc >> 2) != YAHOO_STATUS_CUSTOM) + return g_strdup(yahoo_get_status_string(b->uc >> 2)); + else + return g_strdup(g_hash_table_lookup(yd->hash, b->name)); + } +} + static GList *yahoo_buddy_menu(struct gaim_connection *gc, char *who) { GList *m = NULL; @@ -1347,6 +1358,7 @@ ret->buddy_menu = yahoo_buddy_menu; ret->list_icon = yahoo_list_icon; ret->status_text = yahoo_status_text; + ret->tooltip_text = yahoo_tooltip_text; ret->actions = yahoo_actions; ret->send_im = yahoo_send_im; ret->away_states = yahoo_away_states;
