almost complete new user stuff.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@4156 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
James LewisMoss 2001-05-10 16:15:08 +00:00
parent c31188fbf4
commit edf821719a
6 changed files with 388 additions and 80 deletions

View File

@ -28,6 +28,7 @@
#include <gnome.h>
#include "gnc-book.h"
#include "new-user-callbacks.h"
#include "new-user-interface.h"
#include "gnc-commodity-edit.h"
@ -36,10 +37,23 @@
#include "gnc-ui-util.h"
#include "gnc-dir.h"
#include "io-example-account.h"
#include "FileDialog.h"
#include <guile/gh.h>
static int commodEditAdded = 0;
static AccountGroup *our_final_group = NULL;
static void
delete_our_final_group(void)
{
if(our_final_group != NULL)
{
xaccFreeAccountGroup(our_final_group);
our_final_group = NULL;
}
}
static void
set_first_startup(int first_startup)
{
@ -88,8 +102,15 @@ on_newUserDruidFinishPage_finish (GnomeDruidPage *gnomedruidpage,
/* now we need to load all the accounts into the program */
gh_eval_str("(gnc:show-main-window)");
gh_eval_str("(gnc:hook-run-danglers gnc:*book-opened-hook* #f)");
set_first_startup(0);
if(our_final_group)
{
xaccGroupConcatGroup(gnc_book_get_group(gncGetCurrentBook()),
our_final_group);
}
}
@ -115,15 +136,17 @@ on_newAccountCancelDialog_OKButton_clicked
set_first_startup(keepshowing);
delete_our_final_group();
gnc_ui_delete_new_user_window();
gnc_ui_delete_nu_cancel_dialog();
gnc_ui_delete_nu_account_list();
gh_eval_str("(gnc:default-ui-start)");
gh_eval_str("(gnc:show-main-window)");
gh_eval_str("(gnc:hook-run-danglers gnc:*book-opened-hook* #f)");
}
void
on_newAccountCurrencyChoosePage_prepare (GnomeDruidPage *gnomedruidpage,
gpointer arg1,
@ -131,21 +154,14 @@ on_newAccountCurrencyChoosePage_prepare (GnomeDruidPage *gnomedruidpage,
{
/* need to load currency info here. In fact drop a
gnc-commodity-edit widget here */
GtkWidget *commodityWid;
GtkWidget *vbox;
if(!commodEditAdded)
{
commodEditAdded = 1;
commodityWid = gnc_commodity_edit_new();
gtk_widget_show(commodityWid);
gnc_commodity_edit_set_commodity(GNC_COMMODITY_EDIT(commodityWid),
gnc_locale_default_currency());
vbox = lookup_widget(GTK_WIDGET(gnomedruidpage),
"newAccountCurrencyChooser_vbox");
gtk_box_pack_start(GTK_BOX(vbox), commodityWid, FALSE, FALSE, 0);
gtk_box_pack_start(
GTK_BOX(lookup_widget(GTK_WIDGET(gnomedruidpage),
"newAccountCurrencyChooser_vbox")),
GTK_WIDGET(gnc_get_new_user_commodity_editor()), FALSE, FALSE, 0);
}
}
@ -172,6 +188,7 @@ on_chooseAccountTypesPage_prepare (GnomeDruidPage *gnomedruidpage,
gpointer arg1,
gpointer user_data)
{
static gboolean addedAccountLists = 0;
GSList *list;
GtkCList *clist;
@ -179,13 +196,17 @@ on_chooseAccountTypesPage_prepare (GnomeDruidPage *gnomedruidpage,
list = gnc_load_example_account_list(GNC_ACCOUNTS_DIR "/C");
clist = GTK_CLIST(lookup_widget(GTK_WIDGET(gnomedruidpage),
"newAccountTypesList"));
clist = gnc_new_user_get_clist();
gtk_clist_freeze(clist);
gtk_clist_set_sort_column(clist, 0);
g_slist_foreach(list, add_each_gea_to_clist, (gpointer)clist);
if(!addedAccountLists)
{
g_slist_foreach(list, add_each_gea_to_clist, (gpointer)clist);
addedAccountLists = 1;
}
gtk_clist_sort(clist);
gtk_clist_thaw(clist);
@ -204,6 +225,38 @@ on_newUserDruidFinishPage_prepare (GnomeDruidPage *gnomedruidpage,
/* need to fill up the account list info here */
}
static gpointer
add_to_tree_account(Account* toadd, gpointer data)
{
GtkWidget *item;
GtkTree *tree = GTK_TREE(data);
if(!toadd)
{
return NULL;
}
item = gtk_tree_item_new_with_label(xaccAccountGetName(toadd));
gtk_tree_insert(tree, item, 0);
gtk_widget_show(item);
if(xaccGroupGetNumSubAccounts(xaccAccountGetChildren(toadd)) > 0)
{
GtkWidget *subtree = gtk_tree_new();
gtk_tree_item_set_subtree(GTK_TREE_ITEM(item), subtree);
gtk_tree_item_expand(GTK_TREE_ITEM(item));
xaccGroupForEachAccount(xaccAccountGetChildren(toadd),
add_to_tree_account, subtree, FALSE);
}
return NULL;
}
static void
add_to_tree(GtkTree *tree, AccountGroup *grp)
{
xaccGroupForEachAccount(grp, add_to_tree_account, tree, FALSE);
}
void
on_newAccountTypesList_select_row (GtkCList *clist,
@ -212,7 +265,29 @@ on_newAccountTypesList_select_row (GtkCList *clist,
GdkEvent *event,
gpointer user_data)
{
/* need to fill in useful data on a select row */
GtkText *datext =
GTK_TEXT(gnc_new_user_get_widget("newAccountTypesDescription"));
GtkTree *datree =
GTK_TREE(gnc_new_user_get_widget("newAccountListTree"));
GncExampleAccount *gea =
(GncExampleAccount*)gtk_clist_get_row_data(clist, row);
gtk_text_freeze(datext);
gtk_text_set_point(datext, 0);
gtk_text_forward_delete(datext, gtk_text_get_length(datext));
if(gea->long_description != NULL)
{
gtk_text_set_editable(datext, TRUE);
gtk_text_insert(datext, NULL, NULL, NULL, gea->long_description, -1);
gtk_text_set_editable(datext, FALSE);
}
gtk_text_thaw(datext);
gtk_tree_clear_items(datree, 0, 1000);
add_to_tree(datree, gea->group);
printf("%s", "");
}
@ -231,7 +306,6 @@ void
on_newAccountSelectAllButton_clicked (GtkButton *button,
gpointer user_data)
{
}
@ -258,12 +332,118 @@ on_newAccountsTypeList_SelectAllButton_clicked
(GtkButton *button,
gpointer user_data)
{
gtk_clist_select_all(gnc_new_user_get_clist());
}
void
on_newAccountsTypeList_ClearAllButton_clicked
(GtkButton *button,
gpointer user_data)
{
gtk_clist_unselect_all(gnc_new_user_get_clist());
}
struct FinalInsertData_struct
{
GtkCTree *tree;
GtkCTreeNode *node;
GtkCTreeNode *sibling;
};
typedef struct FinalInsertData_struct FinalInsertData;
static gchar**
generate_account_titles(Account *act)
{
gchar **ret;
ret = g_new(gchar *, 3);
ret[0] = (gchar*)xaccAccountGetName(act);
ret[1] = xaccAccountTypeEnumAsString(xaccAccountGetType(act));
ret[2] = "";
return ret;
}
static void
free_account_titles(gchar **tofree)
{
g_free(tofree);
}
static gpointer
add_to_ctree_final_account(Account* toadd, gpointer data)
{
FinalInsertData *topdata = (FinalInsertData*)data;
GtkCTreeNode *node;
gchar **titles;
titles = generate_account_titles (toadd);
node = gtk_ctree_insert_node(topdata->tree, topdata->node,
topdata->sibling,
titles, 0,
NULL, NULL, NULL, NULL,
FALSE, TRUE);
/* don't know if this is safe, so commented out at the moment. FIXME! */
/* free_account_titles(titles); */
if(xaccGroupGetNumAccounts(xaccAccountGetChildren(toadd)) > 0)
{
FinalInsertData nextdata;
nextdata.tree = topdata->tree;
nextdata.node = node;
nextdata.sibling = NULL;
xaccGroupForEachAccount(xaccAccountGetChildren(toadd),
add_to_ctree_final_account, &nextdata, FALSE);
}
topdata->sibling = node;
return NULL;
}
void
gnc_new_user_insert_final_accounts(GtkCTree *tree, AccountGroup *group)
{
FinalInsertData data;
data.tree = tree;
data.node = NULL;
data.sibling = NULL;
xaccGroupForEachAccount(group, add_to_ctree_final_account, &data, FALSE);
}
void
on_finalAccountDruidPage_prepare (GnomeDruidPage *gnomedruidpage,
gpointer arg1,
gpointer user_data)
{
GList *dalist;
GSList *actlist = NULL;
GtkCList *clist = gnc_new_user_get_clist();
gtk_clist_clear(GTK_CLIST(gnc_new_user_get_widget("finalAccountCTree")));
for(dalist = clist->selection; dalist; dalist = dalist->next)
{
int row = GPOINTER_TO_INT(dalist->data);
actlist = g_slist_append(actlist, gtk_clist_get_row_data(clist, row));
}
delete_our_final_group();
our_final_group = gnc_new_user_merge_groups(actlist);
gnc_new_user_insert_final_accounts(
GTK_CTREE(gnc_new_user_get_widget("finalAccountCTree")),
our_final_group);
}
void
on_ctree1_select_row (GtkCList *clist,
on_finalAccountCTree_select_row (GtkCList *clist,
gint row,
gint column,
GdkEvent *event,
@ -272,12 +452,3 @@ on_ctree1_select_row (GtkCList *clist,
}
void
on_finalAccountDruidPage_prepare (GnomeDruidPage *gnomedruidpage,
gpointer arg1,
gpointer user_data)
{
}

View File

@ -80,9 +80,6 @@ on_newAccountTree_select_row (GtkCList *clist,
GdkEvent *event,
gpointer user_data);
#endif /* _NEW_USER_CALLBACKS_H_ */
void
on_newAccountSelectAllButton_clicked (GtkButton *button,
gpointer user_data);
@ -109,13 +106,21 @@ on_newAccountsTypeList_SelectAllButton_clicked
gpointer user_data);
void
on_ctree1_select_row (GtkCList *clist,
on_finalAccountDruidPage_prepare (GnomeDruidPage *gnomedruidpage,
gpointer arg1,
gpointer user_data);
void
on_newAccountsTypeList_ClearAllButton_clicked
(GtkButton *button,
gpointer user_data);
void
on_finalAccountCTree_select_row (GtkCList *clist,
gint row,
gint column,
GdkEvent *event,
gpointer user_data);
void
on_finalAccountDruidPage_prepare (GnomeDruidPage *gnomedruidpage,
gpointer arg1,
gpointer user_data);
#endif /* _NEW_USER_CALLBACKS_H_ */

View File

@ -30,6 +30,14 @@
#include "new-user-callbacks.h"
#include "new-user-interface.h"
#include "new-user-funs.h"
#include "glade-support.h"
#include "gnc-currency-edit.h"
#include "gnc-ui-util.h"
#include "Group.h"
#include "io-example-account.h"
#include "Account.h"
#include "AccountP.h"
#include <guile/gh.h>
@ -37,6 +45,115 @@ static GtkWidget *newUserDialog = NULL;
static GtkWidget *cancelDialog = NULL;
static GtkWidget *accountList = NULL;
static Account*
clone_account(const Account* from, gnc_commodity *com)
{
Account *ret;
ret = xaccCloneAccountSimple(from);
ret->currency = com;
return ret;
}
GNCCommodityEdit *
gnc_get_new_user_commodity_editor(void)
{
static GNCCommodityEdit *cur_editor = NULL;
if(!cur_editor)
{
cur_editor = GNC_COMMODITY_EDIT(gnc_commodity_edit_new());
gtk_widget_set_name (GTK_WIDGET(cur_editor),
"newAccountCurrencyChooser");
gtk_widget_show(GTK_WIDGET(cur_editor));
gnc_commodity_edit_set_commodity(cur_editor,
gnc_locale_default_currency());
}
return cur_editor;
}
struct add_group_data_struct
{
AccountGroup *to;
gnc_commodity *com;
};
static gpointer
add_groups_for_each(Account *toadd, gpointer data)
{
struct add_group_data_struct *dadata =
(struct add_group_data_struct*)data;
Account *foundact;
foundact = xaccGetAccountFromName(dadata->to, xaccAccountGetName(toadd));
if(!foundact)
{
foundact = clone_account(toadd, dadata->com);
xaccGroupInsertAccount(dadata->to, foundact);
}
{
AccountGroup *addgrp = xaccAccountGetChildren(toadd);
if(xaccGroupGetNumAccounts(addgrp) > 0)
{
struct add_group_data_struct downdata;
downdata.to = xaccAccountGetChildren(foundact);
downdata.com = dadata->com;
xaccGroupForEachAccount(addgrp, add_groups_for_each,
&downdata, FALSE);
}
}
return NULL;
}
static void
add_groups_to_with_random_guids(AccountGroup *into, AccountGroup *from,
gnc_commodity *com)
{
struct add_group_data_struct data;
data.to = into;
data.com = com;
xaccGroupForEachAccount(from, add_groups_for_each, &data, FALSE);
}
AccountGroup*
gnc_new_user_merge_groups(GSList *dalist)
{
GSList *mark;
gnc_commodity *com;
AccountGroup *ret = xaccMallocAccountGroup();
com = gnc_commodity_edit_get_commodity(
gnc_get_new_user_commodity_editor());
for(mark = dalist; mark; mark = mark->next)
{
add_groups_to_with_random_guids(
ret, ((GncExampleAccount*)mark->data)->group, com);
}
return ret;
}
GtkWidget*
gnc_new_user_get_widget(const char *name)
{
return lookup_widget(newUserDialog, name);
}
GtkCList*
gnc_new_user_get_clist(void)
{
return GTK_CLIST(gnc_new_user_get_widget("newAccountTypesList"));
}
/***********************************************************************/
static int
createit(GtkWidget*(*creator)(), GtkWidget** placetoput)
{

View File

@ -23,6 +23,11 @@
#ifndef _NEW_USER_FUNS_H_
#define _NEW_USER_FUNS_H_
#include <glib.h>
#include "gnc-commodity-edit.h"
#include "Group.h"
int gnc_ui_show_new_user_window(void);
int gnc_ui_delete_new_user_window(void);
@ -32,4 +37,9 @@ int gnc_ui_delete_nu_cancel_dialog(void);
int gnc_ui_show_nu_account_list(void);
int gnc_ui_delete_nu_account_list(void);
GtkCList* gnc_new_user_get_clist(void);
GtkWidget* gnc_new_user_get_widget(const char *name);
AccountGroup* gnc_new_user_merge_groups(GSList *dalist);
GNCCommodityEdit * gnc_get_new_user_commodity_editor(void);
#endif /* NEW_USER_FUNS_H */

View File

@ -46,7 +46,7 @@ create_newUserDialog (void)
GtkWidget *newAccountTypesList_DescriptionLabel;
GtkWidget *hbox1;
GtkWidget *scrolledwindow2;
GtkWidget *accountTypesDescription;
GtkWidget *newAccountTypesDescription;
GtkWidget *scrolledwindow3;
GtkWidget *viewport1;
GtkWidget *newAccountListTree;
@ -58,10 +58,10 @@ create_newUserDialog (void)
GdkColor finalAccountDruidPage_logo_bg_color = { 0, 65535, 65535, 65535 };
GdkColor finalAccountDruidPage_title_color = { 0, 65535, 65535, 65535 };
GtkWidget *druid_vbox3;
GtkWidget *label6;
GtkWidget *finalAccountLabel;
GtkWidget *hbox4;
GtkWidget *scrolledwindow4;
GtkWidget *ctree1;
GtkWidget *finalAccountCTree;
GtkWidget *checkAccountList_AccountNameLabel;
GtkWidget *checkAccountList_TypeLabel;
GtkWidget *checkAccountList_StartBalanceLabel;
@ -80,6 +80,7 @@ create_newUserDialog (void)
gtk_object_set_data (GTK_OBJECT (newUserDialog), "newUserDialog", newUserDialog);
gtk_widget_set_usize (newUserDialog, 540, 370);
gtk_window_set_title (GTK_WINDOW (newUserDialog), _("New User Account setup"));
gtk_window_set_position (GTK_WINDOW (newUserDialog), GTK_WIN_POS_MOUSE);
gtk_window_set_default_size (GTK_WINDOW (newUserDialog), 640, 480);
accountChooseDruidPage = gnome_druid_new ();
@ -222,15 +223,14 @@ create_newUserDialog (void)
gtk_box_pack_start (GTK_BOX (hbox1), scrolledwindow2, TRUE, TRUE, 0);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow2), GTK_POLICY_NEVER, GTK_POLICY_ALWAYS);
accountTypesDescription = gtk_text_new (NULL, NULL);
gtk_widget_set_name (accountTypesDescription, "accountTypesDescription");
gtk_widget_ref (accountTypesDescription);
gtk_object_set_data_full (GTK_OBJECT (newUserDialog), "accountTypesDescription", accountTypesDescription,
newAccountTypesDescription = gtk_text_new (NULL, NULL);
gtk_widget_set_name (newAccountTypesDescription, "newAccountTypesDescription");
gtk_widget_ref (newAccountTypesDescription);
gtk_object_set_data_full (GTK_OBJECT (newUserDialog), "newAccountTypesDescription", newAccountTypesDescription,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (accountTypesDescription);
gtk_container_add (GTK_CONTAINER (scrolledwindow2), accountTypesDescription);
gtk_widget_set_sensitive (accountTypesDescription, FALSE);
GTK_WIDGET_UNSET_FLAGS (accountTypesDescription, GTK_CAN_FOCUS);
gtk_widget_show (newAccountTypesDescription);
gtk_container_add (GTK_CONTAINER (scrolledwindow2), newAccountTypesDescription);
GTK_WIDGET_UNSET_FLAGS (newAccountTypesDescription, GTK_CAN_FOCUS);
scrolledwindow3 = gtk_scrolled_window_new (NULL, NULL);
gtk_widget_set_name (scrolledwindow3, "scrolledwindow3");
@ -256,7 +256,6 @@ create_newUserDialog (void)
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (newAccountListTree);
gtk_container_add (GTK_CONTAINER (viewport1), newAccountListTree);
gtk_widget_set_sensitive (newAccountListTree, FALSE);
hbox3 = gtk_hbox_new (FALSE, 0);
gtk_widget_set_name (hbox3, "hbox3");
@ -301,17 +300,17 @@ create_newUserDialog (void)
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (druid_vbox3);
label6 = gtk_label_new (_("If you would like the accounts to have a starting balance click on the account line and enter the starting balance in the text entry box on the right."));
gtk_widget_set_name (label6, "label6");
gtk_widget_ref (label6);
gtk_object_set_data_full (GTK_OBJECT (newUserDialog), "label6", label6,
finalAccountLabel = gtk_label_new (_("If you would like the accounts to have a starting balance click on the account line and enter the starting balance in the text entry box on the right."));
gtk_widget_set_name (finalAccountLabel, "finalAccountLabel");
gtk_widget_ref (finalAccountLabel);
gtk_object_set_data_full (GTK_OBJECT (newUserDialog), "finalAccountLabel", finalAccountLabel,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (label6);
gtk_box_pack_start (GTK_BOX (druid_vbox3), label6, FALSE, FALSE, 0);
gtk_label_set_justify (GTK_LABEL (label6), GTK_JUSTIFY_FILL);
gtk_label_set_line_wrap (GTK_LABEL (label6), TRUE);
gtk_misc_set_alignment (GTK_MISC (label6), 0.0800003, 0.08);
gtk_misc_set_padding (GTK_MISC (label6), 1, 1);
gtk_widget_show (finalAccountLabel);
gtk_box_pack_start (GTK_BOX (druid_vbox3), finalAccountLabel, FALSE, FALSE, 0);
gtk_label_set_justify (GTK_LABEL (finalAccountLabel), GTK_JUSTIFY_FILL);
gtk_label_set_line_wrap (GTK_LABEL (finalAccountLabel), TRUE);
gtk_misc_set_alignment (GTK_MISC (finalAccountLabel), 0.0800003, 0.08);
gtk_misc_set_padding (GTK_MISC (finalAccountLabel), 1, 1);
hbox4 = gtk_hbox_new (FALSE, 0);
gtk_widget_set_name (hbox4, "hbox4");
@ -329,17 +328,17 @@ create_newUserDialog (void)
gtk_widget_show (scrolledwindow4);
gtk_box_pack_start (GTK_BOX (hbox4), scrolledwindow4, TRUE, TRUE, 0);
ctree1 = gtk_ctree_new (3, 0);
gtk_widget_set_name (ctree1, "ctree1");
gtk_widget_ref (ctree1);
gtk_object_set_data_full (GTK_OBJECT (newUserDialog), "ctree1", ctree1,
finalAccountCTree = gtk_ctree_new (3, 0);
gtk_widget_set_name (finalAccountCTree, "finalAccountCTree");
gtk_widget_ref (finalAccountCTree);
gtk_object_set_data_full (GTK_OBJECT (newUserDialog), "finalAccountCTree", finalAccountCTree,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (ctree1);
gtk_container_add (GTK_CONTAINER (scrolledwindow4), ctree1);
gtk_clist_set_column_width (GTK_CLIST (ctree1), 0, 285);
gtk_clist_set_column_width (GTK_CLIST (ctree1), 1, 118);
gtk_clist_set_column_width (GTK_CLIST (ctree1), 2, 80);
gtk_clist_column_titles_show (GTK_CLIST (ctree1));
gtk_widget_show (finalAccountCTree);
gtk_container_add (GTK_CONTAINER (scrolledwindow4), finalAccountCTree);
gtk_clist_set_column_width (GTK_CLIST (finalAccountCTree), 0, 285);
gtk_clist_set_column_width (GTK_CLIST (finalAccountCTree), 1, 118);
gtk_clist_set_column_width (GTK_CLIST (finalAccountCTree), 2, 80);
gtk_clist_column_titles_show (GTK_CLIST (finalAccountCTree));
checkAccountList_AccountNameLabel = gtk_label_new (_("Account Name"));
gtk_widget_set_name (checkAccountList_AccountNameLabel, "checkAccountList_AccountNameLabel");
@ -347,7 +346,7 @@ create_newUserDialog (void)
gtk_object_set_data_full (GTK_OBJECT (newUserDialog), "checkAccountList_AccountNameLabel", checkAccountList_AccountNameLabel,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (checkAccountList_AccountNameLabel);
gtk_clist_set_column_widget (GTK_CLIST (ctree1), 0, checkAccountList_AccountNameLabel);
gtk_clist_set_column_widget (GTK_CLIST (finalAccountCTree), 0, checkAccountList_AccountNameLabel);
checkAccountList_TypeLabel = gtk_label_new (_("Type"));
gtk_widget_set_name (checkAccountList_TypeLabel, "checkAccountList_TypeLabel");
@ -355,7 +354,7 @@ create_newUserDialog (void)
gtk_object_set_data_full (GTK_OBJECT (newUserDialog), "checkAccountList_TypeLabel", checkAccountList_TypeLabel,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (checkAccountList_TypeLabel);
gtk_clist_set_column_widget (GTK_CLIST (ctree1), 1, checkAccountList_TypeLabel);
gtk_clist_set_column_widget (GTK_CLIST (finalAccountCTree), 1, checkAccountList_TypeLabel);
checkAccountList_StartBalanceLabel = gtk_label_new (_("Starting Balance"));
gtk_widget_set_name (checkAccountList_StartBalanceLabel, "checkAccountList_StartBalanceLabel");
@ -363,7 +362,7 @@ create_newUserDialog (void)
gtk_object_set_data_full (GTK_OBJECT (newUserDialog), "checkAccountList_StartBalanceLabel", checkAccountList_StartBalanceLabel,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (checkAccountList_StartBalanceLabel);
gtk_clist_set_column_widget (GTK_CLIST (ctree1), 2, checkAccountList_StartBalanceLabel);
gtk_clist_set_column_widget (GTK_CLIST (finalAccountCTree), 2, checkAccountList_StartBalanceLabel);
vbox5 = gtk_vbox_new (FALSE, 0);
gtk_widget_set_name (vbox5, "vbox5");
@ -435,11 +434,14 @@ create_newUserDialog (void)
gtk_signal_connect (GTK_OBJECT (newAccountsTypeList_SelectAllButton), "clicked",
GTK_SIGNAL_FUNC (on_newAccountsTypeList_SelectAllButton_clicked),
NULL);
gtk_signal_connect (GTK_OBJECT (newAccountsTypeList_ClearAllButton), "clicked",
GTK_SIGNAL_FUNC (on_newAccountsTypeList_ClearAllButton_clicked),
NULL);
gtk_signal_connect (GTK_OBJECT (finalAccountDruidPage), "prepare",
GTK_SIGNAL_FUNC (on_finalAccountDruidPage_prepare),
NULL);
gtk_signal_connect (GTK_OBJECT (ctree1), "select_row",
GTK_SIGNAL_FUNC (on_ctree1_select_row),
gtk_signal_connect (GTK_OBJECT (finalAccountCTree), "select_row",
GTK_SIGNAL_FUNC (on_finalAccountCTree_select_row),
NULL);
gtk_signal_connect (GTK_OBJECT (newUserDruidFinishPage), "finish",
GTK_SIGNAL_FUNC (on_newUserDruidFinishPage_finish),

View File

@ -29,7 +29,7 @@
<height>370</height>
<title>New User Account setup</title>
<type>GTK_WINDOW_TOPLEVEL</type>
<position>GTK_WIN_POS_NONE</position>
<position>GTK_WIN_POS_MOUSE</position>
<modal>False</modal>
<default_width>640</default_width>
<default_height>480</default_height>
@ -259,8 +259,7 @@
<widget>
<class>GtkText</class>
<name>accountTypesDescription</name>
<sensitive>False</sensitive>
<name>newAccountTypesDescription</name>
<editable>False</editable>
<text></text>
</widget>
@ -287,7 +286,6 @@
<widget>
<class>GtkTree</class>
<name>newAccountListTree</name>
<sensitive>False</sensitive>
<selection_mode>GTK_SELECTION_SINGLE</selection_mode>
<view_mode>GTK_TREE_VIEW_LINE</view_mode>
<view_line>True</view_line>
@ -329,6 +327,11 @@
<class>GtkButton</class>
<name>newAccountsTypeList_ClearAllButton</name>
<can_focus>True</can_focus>
<signal>
<name>clicked</name>
<handler>on_newAccountsTypeList_ClearAllButton_clicked</handler>
<last_modification_time>Thu, 19 Apr 2001 14:27:32 GMT</last_modification_time>
</signal>
<label>Clear All</label>
<relief>GTK_RELIEF_NORMAL</relief>
<child>
@ -368,7 +371,7 @@
<widget>
<class>GtkLabel</class>
<name>label6</name>
<name>finalAccountLabel</name>
<label>If you would like the accounts to have a starting balance click on the account line and enter the starting balance in the text entry box on the right.</label>
<justify>GTK_JUSTIFY_FILL</justify>
<wrap>True</wrap>
@ -409,12 +412,12 @@
<widget>
<class>GtkCTree</class>
<name>ctree1</name>
<name>finalAccountCTree</name>
<can_focus>True</can_focus>
<signal>
<name>select_row</name>
<handler>on_ctree1_select_row</handler>
<last_modification_time>Thu, 12 Apr 2001 22:48:53 GMT</last_modification_time>
<handler>on_finalAccountCTree_select_row</handler>
<last_modification_time>Thu, 19 Apr 2001 17:26:51 GMT</last_modification_time>
</signal>
<columns>3</columns>
<column_widths>285,118,80</column_widths>