# HG changeset patch # User Christian Hammond # Date 1057275610 0 # Node ID 35679a3f2bcc089e75f09e573c010e9fe2d8252c # Parent 3750fc0325ac92adc2367aaff6fffbb7ad7f300f [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 diff -r 3750fc0325ac -r 35679a3f2bcc plugins/idle.c --- 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;