console/gntaccount.c

changeset 14086
732c14687955
parent 14047
764a70ebfdc5
child 14103
bcac61d40461
equal deleted inserted replaced
14085:e85d99f73e40 14086:732c14687955
546 GaimAccount *account = key; 546 GaimAccount *account = key;
547 547
548 gaim_account_set_enabled(account, GAIM_GNT_UI, gnt_tree_get_choice(GNT_TREE(widget), key)); 548 gaim_account_set_enabled(account, GAIM_GNT_UI, gnt_tree_get_choice(GNT_TREE(widget), key));
549 } 549 }
550 550
551 static void
552 reset_accounts_win(GntWidget *widget, gpointer null)
553 {
554 accounts.window = NULL;
555 accounts.tree = NULL;
556 }
557
551 void gg_accounts_show_all() 558 void gg_accounts_show_all()
552 { 559 {
553 GList *iter; 560 GList *iter;
554 GntWidget *box, *button; 561 GntWidget *box, *button;
555 562
595 button = gnt_button_new(_("Delete")); 602 button = gnt_button_new(_("Delete"));
596 gnt_box_add_widget(GNT_BOX(box), button); 603 gnt_box_add_widget(GNT_BOX(box), button);
597 g_signal_connect(G_OBJECT(button), "activate", G_CALLBACK(delete_account_cb), accounts.tree); 604 g_signal_connect(G_OBJECT(button), "activate", G_CALLBACK(delete_account_cb), accounts.tree);
598 605
599 gnt_box_add_widget(GNT_BOX(accounts.window), box); 606 gnt_box_add_widget(GNT_BOX(accounts.window), box);
607
608 g_signal_connect(G_OBJECT(accounts.window), "destroy", G_CALLBACK(reset_accounts_win), NULL);
600 609
601 gnt_widget_show(accounts.window); 610 gnt_widget_show(accounts.window);
602 } 611 }
603 612
604 static gpointer 613 static gpointer
639 gg_accounts_show_all(); 648 gg_accounts_show_all();
640 } 649 }
641 650
642 void gg_accounts_uninit() 651 void gg_accounts_uninit()
643 { 652 {
644 gnt_widget_destroy(accounts.window); 653 if (accounts.window)
654 gnt_widget_destroy(accounts.window);
645 } 655 }
646 656
647 /* The following uiops stuff are copied from gtkaccount.c */ 657 /* The following uiops stuff are copied from gtkaccount.c */
648 typedef struct 658 typedef struct
649 { 659 {

mercurial