Mercurial > pidgin.yaz
changeset 5167:d9073c83a8a0
[gaim-migrate @ 5531]
Changed "view history" to "view log" in the conversation windows. This makes
it consistent with the right click menu in the buddy list. I chose "log"
over "history" because I feel it describes the action more accurately.
I also added sweet little status text thingies for oscar people. Most
importantly it shows "Not Authorized" for ICQ peeps, but it also shows
"Away" and "Not Available" and "Free For Chat" and what not. It's cool.
Robot101 suggested it, and it's a leap frog from faceprint's code.
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Fri, 18 Apr 2003 19:20:45 +0000 |
parents | cab5cd204956 |
children | 0f31d00d2501 |
files | src/gtkconv.c src/gtkconv.h src/protocols/oscar/oscar.c |
diffstat | 3 files changed, 29 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/src/gtkconv.c Fri Apr 18 18:04:38 2003 +0000 +++ b/src/gtkconv.c Fri Apr 18 19:20:45 2003 +0000 @@ -275,7 +275,7 @@ } static void -menu_view_history_cb(gpointer data, guint action, GtkWidget *widget) +menu_view_log_cb(gpointer data, guint action, GtkWidget *widget) { struct gaim_window *win = (struct gaim_window *)data; struct gaim_conversation *conv; @@ -1740,7 +1740,7 @@ /* Update the menubar */ if (gaim_conversation_get_type(conv) == GAIM_CONV_IM) { - gtk_widget_set_sensitive(gtkwin->menu.view_history, TRUE); + gtk_widget_set_sensitive(gtkwin->menu.view_log, TRUE); gtk_widget_set_sensitive(gtkwin->menu.insert_image, (gc && gc->prpl->options & OPT_PROTO_IM_IMAGE)); @@ -1748,7 +1748,7 @@ g_timeout_add(0, (GSourceFunc)update_send_as_selection, win); } else { - gtk_widget_set_sensitive(gtkwin->menu.view_history, FALSE); + gtk_widget_set_sensitive(gtkwin->menu.view_log, FALSE); gtk_widget_set_sensitive(gtkwin->menu.insert_image, FALSE); if (gtkwin->menu.send_as != NULL) @@ -2528,7 +2528,7 @@ { N_("/_Conversation"), NULL, NULL, 0, "<Branch>" }, { N_("/Conversation/_Save As..."), NULL, menu_save_as_cb, 0, "<StockItem>", GTK_STOCK_SAVE_AS }, - { N_("/Conversation/View _History..."), NULL, menu_view_history_cb, 0, NULL }, + { N_("/Conversation/View _Log..."), NULL, menu_view_log_cb, 0, NULL }, { "/Conversation/sep1", NULL, NULL, 0, "<Separator>" }, { N_("/Conversation/Insert _URL..."), NULL, menu_insert_link_cb, 0, "<StockItem>", GAIM_STOCK_LINK }, @@ -2576,8 +2576,8 @@ gtkwin->menu.menubar = gtk_item_factory_get_widget(gtkwin->menu.item_factory, "<main>"); - gtkwin->menu.view_history = gtk_item_factory_get_widget(gtkwin->menu.item_factory, - N_("/Conversation/View History...")); + gtkwin->menu.view_log = gtk_item_factory_get_widget(gtkwin->menu.item_factory, + N_("/Conversation/View Log...")); gtkwin->menu.insert_link = gtk_item_factory_get_widget(gtkwin->menu.item_factory, N_("/Conversation/Insert URL...")); gtkwin->menu.insert_image = gtk_item_factory_get_widget(gtkwin->menu.item_factory,
--- a/src/gtkconv.h Fri Apr 18 18:04:38 2003 +0000 +++ b/src/gtkconv.h Fri Apr 18 19:20:45 2003 +0000 @@ -46,7 +46,7 @@ { GtkWidget *menubar; - GtkWidget *view_history; + GtkWidget *view_log; GtkWidget *insert_link; GtkWidget *insert_image; GtkWidget *logging;
--- a/src/protocols/oscar/oscar.c Fri Apr 18 18:04:38 2003 +0000 +++ b/src/protocols/oscar/oscar.c Fri Apr 18 19:20:45 2003 +0000 @@ -5203,6 +5203,27 @@ return yay; } +static char *oscar_status_text(struct buddy *b) { + struct gaim_connection *gc = b->account->gc; + struct oscar_data *od = gc->proto_data; + gchar *ret = NULL; + + if ((b->uc & UC_UNAVAILABLE) || (((b->uc & 0xffff0000) >> 16) & AIM_ICQ_STATE_CHAT)) { + if (isdigit(b->name[0])) + ret = gaim_icq_status((b->uc & 0xffff0000) >> 16); + else + ret = g_strdup(_("Away")); + } else if (!GAIM_BUDDY_IS_ONLINE(b)) { + char *gname = aim_ssi_itemlist_findparentname(od->sess->ssi.local, b->name); + if (aim_ssi_waitingforauth(od->sess->ssi.local, gname, b->name)) + ret = g_strdup(_("Not Authorized")); + else + ret = g_strdup(_("Offline")); + } + + return ret; +} + /* * We have just established a socket with the other dude, so set up some handlers. */ @@ -5809,6 +5830,7 @@ ret->list_icon = oscar_list_icon; ret->list_emblems = oscar_list_emblems; ret->tooltip_text = oscar_tooltip_text; + ret->status_text = oscar_status_text; ret->away_states = oscar_away_states; ret->actions = oscar_actions; ret->buddy_menu = oscar_buddy_menu;