Mercurial > pidgin
changeset 6008:35679a3f2bcc
[gaim-migrate @ 6456]
The I'dle Mak'er plugin now uses the special account drop-down making
function thing that other such things use.
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Thu, 03 Jul 2003 23:40:10 +0000 |
parents | 3750fc0325ac |
children | 5cd7a10c6ade |
files | plugins/idle.c |
diffstat | 1 files changed, 7 insertions(+), 25 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/idle.c Thu Jul 03 22:46:14 2003 +0000 +++ b/plugins/idle.c Thu Jul 03 23:40:10 2003 +0000 @@ -36,36 +36,18 @@ gc->is_idle = 0; } -static void sel_gc(GtkWidget *opt, GaimConnection *g) { - gc = g; +static void select_account_cb(GtkWidget *opt, GaimAccount *account) +{ + gc = gaim_account_get_connection(account); } static void make_connect_menu(GtkWidget *box) { - GtkWidget *optmenu, *menu, *opt; - GaimAccount *account; - GList *c = gaim_connections_get_all(); - GaimConnection *g; - - optmenu = gtk_option_menu_new(); - gtk_box_pack_start(GTK_BOX(box), optmenu, FALSE, FALSE, 5); - - menu = gtk_menu_new(); + GtkWidget *optmenu; - while (c) { - g = (GaimConnection *)c->data; - account = gaim_connection_get_account(g); + optmenu = gaim_gtk_account_option_menu_new(NULL, FALSE, + G_CALLBACK(select_account_cb), NULL); - opt = gtk_menu_item_new_with_label(gaim_account_get_username(account)); - g_signal_connect(G_OBJECT(opt), "activate", - G_CALLBACK(sel_gc), g); - gtk_menu_shell_append(GTK_MENU_SHELL(menu), opt); - gtk_widget_show(opt); - c = g_list_next(c); - } - - gtk_option_menu_remove_menu(GTK_OPTION_MENU(optmenu)); - gtk_option_menu_set_menu(GTK_OPTION_MENU(optmenu), menu); - gtk_option_menu_set_history(GTK_OPTION_MENU(optmenu), 0); + gtk_box_pack_start(GTK_BOX(box), optmenu, FALSE, FALSE, 5); if (gaim_connections_get_all()) gc = gaim_connections_get_all()->data;