Mercurial > pidgin
comparison src/gtkconv.c @ 7975:2311532f9036
[gaim-migrate @ 8652]
marv pointed this out. damn buttons.
committer: Tailor Script <tailor@pidgin.im>
author | Nathan Walp <nwalp@pidgin.im> |
---|---|
date | Sat, 03 Jan 2004 06:22:54 +0000 |
parents | 6fca0d9cc98b |
children | d9e831876c28 |
comparison
equal
deleted
inserted
replaced
7974:415df6fa0395 | 7975:2311532f9036 |
---|---|
478 } | 478 } |
479 | 479 |
480 gtk_widget_grab_focus(GAIM_GTK_CONVERSATION(conv)->entry); | 480 gtk_widget_grab_focus(GAIM_GTK_CONVERSATION(conv)->entry); |
481 } | 481 } |
482 | 482 |
483 static void chat_do_info(GaimConversation *conv, const char *who) | |
484 { | |
485 GaimPluginProtocolInfo *prpl_info = NULL; | |
486 GaimConnection *gc; | |
487 | |
488 if ((gc = gaim_conversation_get_gc(conv))) { | |
489 prpl_info = GAIM_PLUGIN_PROTOCOL_INFO(gc->prpl); | |
490 | |
491 /* | |
492 * If there are special needs for getting info on users in | |
493 * buddy chat "rooms"... | |
494 */ | |
495 if (prpl_info->get_cb_info != NULL) | |
496 prpl_info->get_cb_info(gc, gaim_conv_chat_get_id(GAIM_CONV_CHAT(conv)), who); | |
497 else | |
498 prpl_info->get_info(gc, who); | |
499 } | |
500 } | |
501 | |
502 | |
483 static void | 503 static void |
484 info_cb(GtkWidget *widget, GaimConversation *conv) | 504 info_cb(GtkWidget *widget, GaimConversation *conv) |
485 { | 505 { |
486 GaimGtkConversation *gtkconv; | 506 GaimGtkConversation *gtkconv; |
487 | 507 |
508 if (gtk_tree_selection_get_selected(sel, NULL, &iter)) | 528 if (gtk_tree_selection_get_selected(sel, NULL, &iter)) |
509 gtk_tree_model_get(GTK_TREE_MODEL(model), &iter, 1, &name, -1); | 529 gtk_tree_model_get(GTK_TREE_MODEL(model), &iter, 1, &name, -1); |
510 else | 530 else |
511 return; | 531 return; |
512 | 532 |
513 serv_get_info(gaim_conversation_get_gc(conv), name); | 533 chat_do_info(conv, name); |
514 } | 534 } |
515 } | 535 } |
516 | 536 |
517 static void | 537 static void |
518 warn_cb(GtkWidget *widget, GaimConversation *conv) | 538 warn_cb(GtkWidget *widget, GaimConversation *conv) |
1072 } | 1092 } |
1073 | 1093 |
1074 static void | 1094 static void |
1075 menu_chat_info_cb(GtkWidget *w, GaimConversation *conv) | 1095 menu_chat_info_cb(GtkWidget *w, GaimConversation *conv) |
1076 { | 1096 { |
1077 GaimPluginProtocolInfo *prpl_info = NULL; | |
1078 GaimConnection *gc; | |
1079 char *who; | 1097 char *who; |
1080 | 1098 |
1081 gc = gaim_conversation_get_gc(conv); | |
1082 who = g_object_get_data(G_OBJECT(w), "user_data"); | 1099 who = g_object_get_data(G_OBJECT(w), "user_data"); |
1083 | 1100 |
1084 if (gc != NULL) { | 1101 chat_do_info(conv, who); |
1085 prpl_info = GAIM_PLUGIN_PROTOCOL_INFO(gc->prpl); | |
1086 | |
1087 /* | |
1088 * If there are special needs for getting info on users in | |
1089 * buddy chat "rooms"... | |
1090 */ | |
1091 if (prpl_info->get_cb_info != NULL) | |
1092 prpl_info->get_cb_info(gc, gaim_conv_chat_get_id(GAIM_CONV_CHAT(conv)), who); | |
1093 else | |
1094 prpl_info->get_info(gc, who); | |
1095 } | |
1096 } | 1102 } |
1097 | 1103 |
1098 static void | 1104 static void |
1099 menu_chat_get_away_cb(GtkWidget *w, GaimConversation *conv) | 1105 menu_chat_get_away_cb(GtkWidget *w, GaimConversation *conv) |
1100 { | 1106 { |