Mercurial > pidgin.yaz
changeset 4673:049ea04f99d9
[gaim-migrate @ 4984]
somehow I was too lazy to code this for the earlier fix. *shrug*
committer: Tailor Script <tailor@pidgin.im>
author | Nathan Walp <nwalp@pidgin.im> |
---|---|
date | Sat, 08 Mar 2003 06:51:40 +0000 |
parents | 6e3b8a8a143f |
children | 7ffe2b64de2d |
files | src/gtkconv.c |
diffstat | 1 files changed, 8 insertions(+), 22 deletions(-) [+] |
line wrap: on
line diff
--- a/src/gtkconv.c Sat Mar 08 02:47:11 2003 +0000 +++ b/src/gtkconv.c Sat Mar 08 06:51:40 2003 +0000 @@ -1253,9 +1253,10 @@ } static void -menu_conv_sel_send_cb(GObject *m, struct gaim_account *account) +menu_conv_sel_send_cb(GObject *m, gpointer data) { struct gaim_window *win = g_object_get_data(m, "user_data"); + struct gaim_account *account = g_object_get_data(m, "gaim_account"); struct gaim_conversation *conv; if (gaim_gtk_is_state_locked()) @@ -1986,26 +1987,10 @@ child = child->next) { GtkWidget *item = child->data; - GtkWidget *box; - GList *children; - GtkWidget *label; - const char *title; - - box = gtk_bin_get_child(GTK_BIN(item)); - - children = gtk_container_get_children(GTK_CONTAINER(box)); - - if(g_list_length(children) < 2) - continue; - - label = g_list_nth_data(children, 1); - - if (!GTK_IS_LABEL(label)) - continue; - - title = gtk_label_get_text(GTK_LABEL(label)); - - if (!strcmp(title, username)) { + struct gaim_account *item_account = g_object_get_data(G_OBJECT(item), + "gaim_account"); + + if (account == item_account) { gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(item), TRUE); break; } @@ -2124,9 +2109,10 @@ /* Set our data and callbacks. */ g_object_set_data(G_OBJECT(menuitem), "user_data", win); + g_object_set_data(G_OBJECT(menuitem), "gaim_account", gc->account); g_signal_connect(G_OBJECT(menuitem), "activate", - G_CALLBACK(menu_conv_sel_send_cb), gc->account); + G_CALLBACK(menu_conv_sel_send_cb), NULL); gtk_widget_show(menuitem); gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem);