comparison src/gtkblist.c @ 9917:e74eb0d11f86

[gaim-migrate @ 10809] view chat logs curtesy of datallah committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Tue, 31 Aug 2004 01:45:12 +0000
parents 348636e6ba89
children c203312d8224
comparison
equal deleted inserted replaced
9916:4d17a945aab3 9917:e74eb0d11f86
528 static void gtk_blist_menu_bp_cb(GtkWidget *w, GaimBuddy *b) 528 static void gtk_blist_menu_bp_cb(GtkWidget *w, GaimBuddy *b)
529 { 529 {
530 gaim_gtkpounce_dialog_show(b->account, b->name, NULL); 530 gaim_gtkpounce_dialog_show(b->account, b->name, NULL);
531 } 531 }
532 532
533 static void gtk_blist_menu_showlog_cb(GtkWidget *w, GaimBuddy *b) 533 static void gtk_blist_menu_showlog_cb(GtkWidget *w, GaimBlistNode *node)
534 { 534 {
535 gaim_gtk_log_show(b->name, b->account); 535 GaimLogType type;
536 GaimAccount *account;
537 char *name = NULL;
538 if (GAIM_BLIST_NODE_IS_BUDDY(node)) {
539 GaimBuddy *b = (GaimBuddy*) node;
540 type = GAIM_LOG_IM;
541 name = g_strdup(b->name);
542 account = b->account;
543 } else if (GAIM_BLIST_NODE_IS_CHAT(node)) {
544 GaimChat *c = (GaimChat*) node;
545 GaimPluginProtocolInfo *prpl_info = NULL;
546 type = GAIM_LOG_CHAT;
547 account = c->account;
548 prpl_info = GAIM_PLUGIN_PROTOCOL_INFO(gaim_find_prpl(gaim_account_get_protocol_id(account)));
549 if (prpl_info && prpl_info->get_chat_name) {
550 name = prpl_info->get_chat_name(c->components);
551 }
552 } else
553 return;
554
555 if (name && account) {
556 gaim_gtk_log_show(type, name, account);
557 g_free(name);
558 }
536 } 559 }
537 560
538 static void gtk_blist_show_systemlog_cb() 561 static void gtk_blist_show_systemlog_cb()
539 { 562 {
540 gaim_gtk_syslog_show(); 563 gaim_gtk_syslog_show();
1215 1238
1216 gaim_new_item_from_stock(menu, _("_Join"), GAIM_STOCK_CHAT, 1239 gaim_new_item_from_stock(menu, _("_Join"), GAIM_STOCK_CHAT,
1217 G_CALLBACK(gtk_blist_menu_join_cb), node, 0, 0, NULL); 1240 G_CALLBACK(gtk_blist_menu_join_cb), node, 0, 0, NULL);
1218 gaim_new_check_item(menu, _("Auto-Join"), 1241 gaim_new_check_item(menu, _("Auto-Join"),
1219 G_CALLBACK(gtk_blist_menu_autojoin_cb), node, autojoin); 1242 G_CALLBACK(gtk_blist_menu_autojoin_cb), node, autojoin);
1243 gaim_new_item_from_stock(menu, _("View _Log"), NULL,
1244 G_CALLBACK(gtk_blist_menu_showlog_cb), node, 0, 0, NULL);
1220 1245
1221 gaim_gtk_append_blist_node_proto_menu(menu, c->account->gc, node); 1246 gaim_gtk_append_blist_node_proto_menu(menu, c->account->gc, node);
1222 gaim_gtk_append_blist_node_extended_menu(menu, node); 1247 gaim_gtk_append_blist_node_extended_menu(menu, node);
1223 1248
1224 gaim_separator(menu); 1249 gaim_separator(menu);