From 3a809cfc98fbac5a3202ec6ecbacbc37ce1066e1 Mon Sep 17 00:00:00 2001 From: Geert Janssens Date: Tue, 5 Apr 2011 19:55:45 +0000 Subject: [PATCH] Replace Account Hierarchy setup druid with gtkbuilder compatible gtkassistant git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20533 57a11ea4-9604-0410-9ed3-97b8803252fd --- src/gnome/Makefile.am | 4 +- ...ruid-hierarchy.c => assistant-hierarchy.c} | 168 ++-- ...ruid-hierarchy.h => assistant-hierarchy.h} | 19 +- src/gnome/dialog-new-user.c | 6 +- src/gnome/glade/account.glade | 785 ------------------ src/gnome/gnc-plugin-page-account-tree.c | 4 +- src/gnome/top-level.c | 4 +- 7 files changed, 109 insertions(+), 881 deletions(-) rename src/gnome/{druid-hierarchy.c => assistant-hierarchy.c} (87%) rename src/gnome/{druid-hierarchy.h => assistant-hierarchy.h} (69%) diff --git a/src/gnome/Makefile.am b/src/gnome/Makefile.am index dfd8a03055..7b2f1ee6be 100644 --- a/src/gnome/Makefile.am +++ b/src/gnome/Makefile.am @@ -24,6 +24,7 @@ libgnc_gnome_la_LIBADD = \ libgnc_gnome_la_SOURCES = \ swig-gnome.c \ + assistant-hierarchy.c \ dialog-commodities.c \ dialog-fincalc.c \ dialog-find-transactions.c \ @@ -37,7 +38,6 @@ libgnc_gnome_la_SOURCES = \ dialog-sx-since-last-run.c \ dialog-tax-info.c \ druid-acct-period.c \ - druid-hierarchy.c \ druid-loan.c \ druid-stock-split.c \ gnc-plugin-account-tree.c \ @@ -64,6 +64,7 @@ gnomeapp_DATA = $(gnomeapp_in_files:.desktop.in=.desktop) appicondir = $(datadir)/pixmaps noinst_HEADERS = \ + assistant-hierarchy.h \ dialog-fincalc.h \ dialog-find-transactions.h \ dialog-new-user.h \ @@ -73,7 +74,6 @@ noinst_HEADERS = \ dialog-sx-from-trans.h \ dialog-sx-since-last-run.h \ druid-acct-period.h \ - druid-hierarchy.h \ druid-loan.h \ druid-stock-split.h \ gnc-plugin-account-tree.h \ diff --git a/src/gnome/druid-hierarchy.c b/src/gnome/assistant-hierarchy.c similarity index 87% rename from src/gnome/druid-hierarchy.c rename to src/gnome/assistant-hierarchy.c index 63f4376b7f..440cc02be7 100644 --- a/src/gnome/druid-hierarchy.c +++ b/src/gnome/assistant-hierarchy.c @@ -1,7 +1,8 @@ /********************************************************************\ - * druid-hierarchy.c -- account hierarchy creation functionality * + * assistant-hierarchy.c -- account hierarchy creation functionality* * Copyright (C) 2001 Gnumatic, Inc. * * Copyright (C) 2006 David Hampton * + * Copyright (C) 2010 Geert Janssens * * * * This program is free software; you can redistribute it and/or * * modify it under the terms of the GNU General Public License as * @@ -33,9 +34,8 @@ #include "gnc-account-merge.h" #include "dialog-new-user.h" #include "dialog-utils.h" -#include "dialog-file-access.h" -#include "druid-hierarchy.h" -#include "druid-utils.h" +#include "assistant-hierarchy.h" +#include "assistant-utils.h" #include "gnc-amount-edit.h" #include "gnc-currency-edit.h" #include "gnc-exp-parser.h" @@ -71,7 +71,7 @@ typedef enum typedef struct { GtkWidget *dialog; - GtkWidget *druid; + GtkWidget *assistant; gboolean next_ok; GtkWidget *currency_selector; @@ -96,22 +96,20 @@ typedef struct gboolean account_list_added; gboolean use_defaults; - GncHierarchyDruidFinishedCallback when_completed; + GncHierarchyAssistantFinishedCallback when_completed; } hierarchy_data; -void on_choose_account_categories_prepare (GnomeDruidPage *gnomedruidpage, - gpointer arg1, +G_MODULE_EXPORT void on_prepare (GtkAssistant *assistant, GtkWidget *page, hierarchy_data *data); -void select_all_clicked (GtkButton *button, +void on_choose_account_categories_prepare (hierarchy_data *data); +G_MODULE_EXPORT void select_all_clicked (GtkButton *button, hierarchy_data *data); -void clear_all_clicked (GtkButton *button, +G_MODULE_EXPORT void clear_all_clicked (GtkButton *button, hierarchy_data *data); -void on_final_account_prepare (GnomeDruidPage *gnomedruidpage, - gpointer arg1, - hierarchy_data *data); -void on_cancel (GnomeDruid *gnomedruid, hierarchy_data *data); -void on_finish (GnomeDruidPage *gnomedruidpage, gpointer arg1, hierarchy_data *data); +void on_final_account_prepare (hierarchy_data *data); +G_MODULE_EXPORT void on_cancel (GtkAssistant *gtkassistant, hierarchy_data *data); +G_MODULE_EXPORT void on_finish (GtkAssistant *gtkassistant, hierarchy_data *data); // ------------------------------------------------------------ @@ -228,28 +226,8 @@ gnc_get_ea_locale_dir(const char *top_dir) * Choose Categories Page * ************************************************************/ -/** This is a helper function to get around a gtk issue (probably and - * ordering issue) where you cannot set this button as sensitive - * during the initial creation of the druid page. Using a delayed - * idle function works correctly for both the initial page creation - * and the subsequent changes when account sets are - * selected/deselected. - * - * @param data A pointer to the data structure describing the - * hierarchy druid. - * - * @return Always returns FALSE to remove this function from the idle - * loop. */ -static gboolean -delayed_enable_next_button (hierarchy_data *data) -{ - gnome_druid_set_buttons_sensitive(GNOME_DRUID(data->druid), - TRUE, data->next_ok, TRUE, TRUE); - return FALSE; -} - /** This is a helper function called on each item in the GtkTreeStore - * by categories_page_enable_next. The purpose is to determine is an + * by categories_page_enable_next. The purpose is to determine if an * account set has been selected. * * @param store The GtkListStore containing one line per account set. @@ -290,15 +268,23 @@ account_set_checked_helper (GtkListStore *store, * sensitive if one or more account sets has been selected. * * @param data A pointer to the data structure describing the - * hierarchy druid. */ + * hierarchy assistant. */ static void categories_page_enable_next (hierarchy_data *data) { + gint currentpagenum; + GtkWidget *currentpage; + GtkAssistant *assistant = GTK_ASSISTANT(data->dialog); + data->next_ok = FALSE; gtk_tree_model_foreach (gtk_tree_view_get_model (data->categories_tree), (GtkTreeModelForeachFunc)account_set_checked_helper, &data->next_ok); - g_idle_add((GSourceFunc)delayed_enable_next_button, data); + + currentpagenum = gtk_assistant_get_current_page(assistant); + currentpage = gtk_assistant_get_nth_page(assistant, currentpagenum); + + gtk_assistant_set_page_complete(assistant, currentpage, data->next_ok); } @@ -441,10 +427,27 @@ account_categories_tree_view_prepare (hierarchy_data *data) } } +G_MODULE_EXPORT void on_prepare (GtkAssistant *assistant, GtkWidget *page, + hierarchy_data *data) +{ + gint currentpage = gtk_assistant_get_current_page(assistant); + + switch (gtk_assistant_get_current_page(assistant)) + { + case 2: + /* Current page is account selection */ + on_choose_account_categories_prepare(data); + break; + case 3: + /* Current page is final account page */ + on_final_account_prepare (data); + break; + } + +} + void -on_choose_account_categories_prepare (GnomeDruidPage *gnomedruidpage, - gpointer arg1, - hierarchy_data *data) +on_choose_account_categories_prepare (hierarchy_data *data) { GtkTextBuffer* buffer; @@ -540,7 +543,7 @@ select_helper (GtkListStore *store, return FALSE; /* Run entire tree */ } -void +G_MODULE_EXPORT void select_all_clicked (GtkButton *button, hierarchy_data *data) { @@ -549,7 +552,7 @@ select_all_clicked (GtkButton *button, GINT_TO_POINTER(TRUE)); } -void +G_MODULE_EXPORT void clear_all_clicked (GtkButton *button, hierarchy_data *data) { @@ -858,9 +861,7 @@ use_existing_account_data_func(GtkTreeViewColumn *tree_column, } void -on_final_account_prepare (GnomeDruidPage *gnomedruidpage, - gpointer arg1, - hierarchy_data *data) +on_final_account_prepare (hierarchy_data *data) { GSList *actlist; GtkTreeView *tree_view; @@ -978,8 +979,8 @@ on_final_account_prepare (GnomeDruidPage *gnomedruidpage, gnc_resume_gui_refresh (); } -void -on_cancel (GnomeDruid *gnomedruid, +G_MODULE_EXPORT void +on_cancel (GtkAssistant *gtkassistant, hierarchy_data *data) { gnc_suspend_gui_refresh (); @@ -1003,12 +1004,11 @@ starting_balance_helper (Account *account, hierarchy_data *data) gnc_get_current_book ()); } -void -on_finish (GnomeDruidPage *gnomedruidpage, - gpointer arg1, +G_MODULE_EXPORT void +on_finish (GtkAssistant *gtkassistant, hierarchy_data *data) { - GncHierarchyDruidFinishedCallback when_completed; + GncHierarchyAssistantFinishedCallback when_completed; ENTER (" "); if (data->our_account_tree) @@ -1042,50 +1042,63 @@ on_finish (GnomeDruidPage *gnomedruidpage, } static GtkWidget * -gnc_create_hierarchy_druid (gboolean use_defaults, GncHierarchyDruidFinishedCallback when_completed) +gnc_create_hierarchy_assistant (gboolean use_defaults, GncHierarchyAssistantFinishedCallback when_completed) { hierarchy_data *data; GtkWidget *dialog; GtkTreeView *tree_view; GtkWidget *box, *start_page; - GladeXML *xml; + GtkBuilder *builder; GdkColor *color; data = g_new0 (hierarchy_data, 1); - xml = gnc_glade_xml_new ("account.glade", "Hierarchy Druid"); + builder = gnc_builder_add_from_file ("account.glade", "Hierarchy Assistant"); - dialog = glade_xml_get_widget (xml, "Hierarchy Druid"); + dialog = GTK_WIDGET(gtk_builder_get_object (builder, "Hierarchy Assistant")); data->dialog = dialog; - data->druid = glade_xml_get_widget (xml, "hierarchy_druid"); - gnc_druid_set_colors (GNOME_DRUID (data->druid)); + gnc_assistant_set_colors (GTK_ASSISTANT (data->dialog)); - start_page = glade_xml_get_widget (xml, "start_page"); - gtk_widget_show (start_page); - gtk_widget_show (glade_xml_get_widget (xml, "newUserDruidFinishPage")); + /* Enable buttons on first and last page. */ + gtk_assistant_set_page_complete (GTK_ASSISTANT (dialog), + GTK_WIDGET(gtk_builder_get_object(builder, "intro_page_label")), + TRUE); + gtk_assistant_set_page_complete (GTK_ASSISTANT (dialog), + GTK_WIDGET(gtk_builder_get_object(builder, "currency_page_vbox")), + TRUE); + gtk_assistant_set_page_complete (GTK_ASSISTANT (dialog), + GTK_WIDGET(gtk_builder_get_object(builder, "final_account_vbox")), + TRUE); + gtk_assistant_set_page_complete (GTK_ASSISTANT (dialog), + GTK_WIDGET(gtk_builder_get_object(builder, "finish_page_label")), + TRUE); /* Currency Page */ data->currency_selector = gnc_currency_edit_new(); gnc_currency_edit_set_currency (GNC_CURRENCY_EDIT(data->currency_selector), gnc_default_currency()); gtk_widget_show (data->currency_selector); - box = glade_xml_get_widget (xml, "currency_chooser_vbox"); + box = GTK_WIDGET(gtk_builder_get_object (builder, "currency_chooser_vbox")); gtk_box_pack_start(GTK_BOX(box), data->currency_selector, FALSE, FALSE, 0); /* Categories Page */ - tree_view = GTK_TREE_VIEW(glade_xml_get_widget (xml, "account_categories_tree_view")); + tree_view = GTK_TREE_VIEW(gtk_builder_get_object (builder, "account_categories_tree_view")); g_signal_connect (G_OBJECT (gtk_tree_view_get_selection (tree_view)), "changed", G_CALLBACK (categories_tree_selection_changed), data); gtk_tree_selection_set_mode (gtk_tree_view_get_selection (tree_view), GTK_SELECTION_SINGLE); data->categories_tree = tree_view; - data->category_accounts_label = GTK_LABEL(glade_xml_get_widget (xml, "accounts_in_category_label")); - data->category_accounts_container = glade_xml_get_widget (xml, "accounts_in_category"); - data->category_description = GTK_TEXT_VIEW(glade_xml_get_widget (xml, "account_types_description")); + data->category_accounts_label = GTK_LABEL(gtk_builder_get_object (builder, "accounts_in_category_label")); + data->category_accounts_container = GTK_WIDGET(gtk_builder_get_object (builder, "accounts_in_category")); + data->category_description = GTK_TEXT_VIEW(gtk_builder_get_object (builder, "account_types_description")); + data->account_list_added = FALSE; + +/* FIXME -- what is this ? color = &GNOME_DRUID_PAGE_EDGE(start_page)->textbox_color; gtk_widget_modify_base(GTK_WIDGET(data->category_description), GTK_STATE_INSENSITIVE, color); + */ /* Final Accounts Page */ - data->final_account_tree_container = glade_xml_get_widget (xml, "final_account_tree_box"); + data->final_account_tree_container = GTK_WIDGET(gtk_builder_get_object (builder, "final_account_tree_box")); data->final_account_tree = NULL; data->balance_hash = g_hash_table_new(NULL, NULL); @@ -1093,7 +1106,7 @@ gnc_create_hierarchy_druid (gboolean use_defaults, GncHierarchyDruidFinishedCall g_signal_connect (G_OBJECT(dialog), "destroy", G_CALLBACK (gnc_hierarchy_destroy_cb), data); - glade_xml_signal_autoconnect_full(xml, gnc_glade_autoconnect_full_func, data); + gtk_builder_connect_signals(builder, data); data->when_completed = when_completed; data->use_defaults = use_defaults; @@ -1101,16 +1114,16 @@ gnc_create_hierarchy_druid (gboolean use_defaults, GncHierarchyDruidFinishedCall } GtkWidget* -gnc_ui_hierarchy_druid(gboolean use_defaults) +gnc_ui_hierarchy_assistant(gboolean use_defaults) { - return gnc_create_hierarchy_druid(use_defaults, NULL); + return gnc_create_hierarchy_assistant(use_defaults, NULL); } GtkWidget* -gnc_ui_hierarchy_druid_with_callback(gboolean use_defaults, - GncHierarchyDruidFinishedCallback when_finished) +gnc_ui_hierarchy_assistant_with_callback(gboolean use_defaults, + GncHierarchyAssistantFinishedCallback when_finished) { - return gnc_create_hierarchy_druid(use_defaults, when_finished); + return gnc_create_hierarchy_assistant(use_defaults, when_finished); } static void @@ -1119,21 +1132,20 @@ create_account_page(void) GncPluginPage *page; page = gnc_plugin_page_account_tree_new(); gnc_main_window_open_page(NULL, page); - gnc_ui_file_access_for_save_as(); } static void -gnc_ui_hierarchy_druid_hook (void) +gnc_ui_hierarchy_assistant_hook (void) { if (gnc_gconf_get_bool(GCONF_SECTION, "show_on_new_file", NULL)) { - gnc_ui_hierarchy_druid_with_callback(TRUE, create_account_page); + gnc_ui_hierarchy_assistant_with_callback(TRUE, create_account_page); } } void -gnc_ui_hierarchy_druid_initialize (void) +gnc_ui_hierarchy_assistant_initialize (void) { gnc_hook_add_dangler(HOOK_NEW_BOOK, - (GFunc)gnc_ui_hierarchy_druid_hook, NULL); + (GFunc)gnc_ui_hierarchy_assistant_hook, NULL); } diff --git a/src/gnome/druid-hierarchy.h b/src/gnome/assistant-hierarchy.h similarity index 69% rename from src/gnome/druid-hierarchy.h rename to src/gnome/assistant-hierarchy.h index 43fd828c07..8f48bbb9e9 100644 --- a/src/gnome/druid-hierarchy.h +++ b/src/gnome/assistant-hierarchy.h @@ -1,6 +1,7 @@ /********************************************************************\ - * druid-hierarchy.h -- account hierarchy creation functionality * + * assistant-hierarchy.h -- account hierarchy creation functionality* * Copyright (C) 2001 Gnumatic, Inc. * + * Copyright (C) 2010 Geert Janssens * * * * This program is free software; you can redistribute it and/or * * modify it under the terms of the GNU General Public License as * @@ -20,20 +21,20 @@ * Boston, MA 02110-1301, USA gnu@gnu.org * \********************************************************************/ -#ifndef DRUID_HIERARCHY_H -#define DRUID_HIERARCHY_H +#ifndef ASSISTANT_HIERARCHY_H +#define ASSISTANT_HIERARCHY_H /** - * A callback (provided by the caller) to be invoked when the druid - * completes successfully. I.e., the new-user druid can finish the GnuCash + * A callback (provided by the caller) to be invoked when the assistant + * completes successfully. I.e., the new-user assistant can finish the GnuCash * New-User Experience, create an account plugin-page, &c. **/ -typedef void (*GncHierarchyDruidFinishedCallback)(void); +typedef void (*GncHierarchyAssistantFinishedCallback)(void); -GtkWidget* gnc_ui_hierarchy_druid (gboolean use_defaults); -GtkWidget* gnc_ui_hierarchy_druid_with_callback(gboolean use_defaults, GncHierarchyDruidFinishedCallback when_finished); +GtkWidget* gnc_ui_hierarchy_assistant (gboolean use_defaults); +GtkWidget* gnc_ui_hierarchy_assistant_with_callback(gboolean use_defaults, GncHierarchyAssistantFinishedCallback when_finished); -void gnc_ui_hierarchy_druid_initialize (void); +void gnc_ui_hierarchy_assistant_initialize (void); #endif diff --git a/src/gnome/dialog-new-user.c b/src/gnome/dialog-new-user.c index 98bbb2f75a..83a3e52f95 100644 --- a/src/gnome/dialog-new-user.c +++ b/src/gnome/dialog-new-user.c @@ -28,7 +28,7 @@ #include "dialog-new-user.h" #include "dialog-utils.h" -#include "druid-hierarchy.h" +#include "assistant-hierarchy.h" #include "gnc-engine.h" #include "gnc-gconf-utils.h" #include "gnc-hooks.h" @@ -62,7 +62,7 @@ gnc_set_first_startup (gboolean first_startup) } static void -after_hierarchy_druid(void) +after_hierarchy_assistant(void) { GncPluginPage *page; @@ -107,7 +107,7 @@ gnc_ui_new_user_dialog (void) case GTK_RESPONSE_OK: if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (new_accounts_button))) { - gnc_ui_hierarchy_druid_with_callback(TRUE, after_hierarchy_druid); + gnc_ui_hierarchy_assistant_with_callback(TRUE, after_hierarchy_assistant); break; } else if ((qifImportDruidFcn != NULL) diff --git a/src/gnome/glade/account.glade b/src/gnome/glade/account.glade index 7355199f68..540cd5f0ad 100644 --- a/src/gnome/glade/account.glade +++ b/src/gnome/glade/account.glade @@ -9,7 +9,6 @@ New Account center dialog - False True @@ -819,414 +818,6 @@ - - True - 1 - New Account Hierarchy Setup - center-on-parent - 640 - 550 - dialog - - - True - 4 - True - - - - True - Edge Start - New Account Hierarchy Setup - This assistant will help you create a set of GnuCash accounts for your assets (such as investments, checking or savings accounts), liabilities (such as loans) and different kinds of income and expenses you might have. - -Click 'Cancel' if you do not wish to create any new accounts now. - - - - - True - Choose Currency - - - True - 20 - vertical - 5 - - - True - Please choose the currency to use for new accounts. - center - - - False - False - 0 - - - - - True - - - True - - - False - 0 - - - - - True - vertical - - - - - - 1 - - - - - True - - - False - 2 - - - - - False - 1 - - - - - - - - - True - Choose accounts to create - - - - True - 6 - vertical - 6 - - - True - Select categories that correspond to the ways that you will use GnuCash. Each category you select will cause several accounts to be created. Select the categories that are relevant to you. You can always create additional accounts by hand later. - True - 75 - - - False - False - 0 - - - - - True - True - 336 - - - True - True - vertical - 200 - - - True - 6 - vertical - 6 - - - True - 0 - <b>Categories</b> - True - - - False - False - 0 - - - - - True - 12 - - - True - False - never - automatic - in - - - True - True - True - True - - - - - - - 1 - - - - - True - 12 - - - True - 6 - spread - - - _Select All - True - True - True - False - True - - - - False - False - 0 - - - - - C_lear All - True - True - True - False - True - - - - False - False - 1 - - - - - - - False - 2 - - - - - True - True - - - - - True - 6 - vertical - 6 - - - True - 0 - <b>Category Description</b> - True - - - False - False - 0 - - - - - True - 12 - - - True - True - automatic - automatic - in - - - True - False - True - False - word - False - False - - - - - - - 1 - - - - - True - True - - - - - True - True - - - - - True - 6 - vertical - 6 - - - True - 0 - <b>Accounts in %s</b> - True - - - False - False - 0 - - - - - True - 12 - - - True - False - automatic - automatic - in - - - - - - - - 1 - - - - - True - True - - - - - 1 - - - - - - - - - True - Setup selected accounts - - - - True - 5 - vertical - 10 - - - True - 1 - 1 - If you would like to change an account's name, click on the row containing the account, then click on the account name and change it. - -Some accounts are marked as "Placeholder". Placeholder accounts are used to create a hierarchy of accounts and normally do not have transactions or opening balances. If you would like an account to be a placeholder account, click the checkbox for that account. - -If you would like an account to have an opening balance, click on the row containing the account, then click on the opening balance field and enter the starting balance. - -Note: all accounts except Equity and placeholder accounts may have an opening balance. - - True - 75 - - - False - False - 5 - 0 - - - - - True - False - automatic - automatic - in - - - - - - 1 - - - - - - - - - True - GNOME_EDGE_FINISH - Finish Account Setup - Press `Apply' to create your new accounts. You will then be able to save them to a file or database. - -Press `Back' to review your selections. - -Press `Cancel' to close this dialog without creating any new accounts. - - - - - - True Select Account @@ -2199,380 +1790,4 @@ Press `Cancel' to close this dialog without creating any new accounts. - - 12 - - - - - True - This assistant will help you create a set of GnuCash accounts for your assets (such as investments, checking or savings accounts), liabilities (such as loans) and different kinds of income and expenses you might have. - -Click 'Cancel' if you do not wish to create any new accounts now. - True - - - intro - New Account Hierarchy Setup - - - - - True - vertical - 5 - - - True - Please choose the currency to use for new accounts. - - - False - False - 0 - - - - - True - - - - - - True - vertical - - - - - - False - False - 1 - - - - - - - - False - 1 - - - - - Choose Currency - - - - - True - vertical - - - True - Select categories that correspond to the ways that you will use GnuCash. Each category you select will cause several accounts to be created. Select the categories that are relevant to you. You can always create additional accounts by hand later. - True - 75 - - - False - False - 0 - - - - - True - True - 336 - True - - - True - True - vertical - 150 - True - - - True - 6 - vertical - 6 - - - True - 0 - <b>Categories</b> - True - - - False - False - 0 - - - - - True - 12 - - - True - True - never - automatic - in - - - True - True - True - True - - - - - - - 1 - - - - - True - 12 - - - True - 6 - spread - - - _Select All - True - True - True - True - True - - - False - False - 0 - - - - - C_lear All - True - True - True - True - True - - - - False - False - 1 - - - - - - - False - 2 - - - - - True - True - - - - - True - 6 - vertical - 6 - - - True - 0 - <b>Category Description</b> - True - - - False - False - 0 - - - - - True - 12 - - - True - True - automatic - automatic - in - - - True - False - True - False - word - False - False - - - - - - - 1 - - - - - True - True - - - - - True - True - - - - - True - 6 - vertical - 6 - - - True - 0 - <b>Accounts in %s</b> - True - - - False - False - 0 - - - - - True - 12 - - - True - True - automatic - automatic - in - - - - - - - - 1 - - - - - True - True - - - - - 1 - - - - - progress - Choose accounts to create - - - - - True - vertical - - - True - 1 - 1 - If you would like to change an account's name, click on the row containing the account, then click on the account name and change it. - -Some accounts are marked as "Placeholder". Placeholder accounts are used to create a hierarchy of accounts and normally do not have transactions or opening balances. If you would like an account to be a placeholder account, click the checkbox for that account. - -If you would like an account to have an opening balance, click on the row containing the account, then click on the opening balance field and enter the starting balance. - -Note: all accounts except Equity and placeholder accounts may have an opening balance. - - True - 75 - - - False - False - 5 - 0 - - - - - True - True - automatic - automatic - in - - - - - - 1 - - - - - Setup selected accounts - - - - - True - Press `Apply' to create your new accounts. You will then be able to save them to a file or database. - -Press `Back' to review your selections. - -Press `Cancel' to close this dialog without creating any new accounts. - True - - - confirm - Finish Account Setup - - - diff --git a/src/gnome/gnc-plugin-page-account-tree.c b/src/gnome/gnc-plugin-page-account-tree.c index f46a9341d8..31284d028f 100644 --- a/src/gnome/gnc-plugin-page-account-tree.c +++ b/src/gnome/gnc-plugin-page-account-tree.c @@ -45,7 +45,7 @@ #include "dialog-account.h" #include "dialog-transfer.h" #include "dialog-utils.h" -#include "druid-hierarchy.h" +#include "assistant-hierarchy.h" #include "gnc-account-sel.h" #include "gnc-component-manager.h" #include "gnc-engine.h" @@ -790,7 +790,7 @@ gnc_plugin_page_account_tree_cmd_new_account (GtkAction *action, GncPluginPageAc static void gnc_plugin_page_account_tree_cmd_file_new_hierarchy (GtkAction *action, GncPluginPageAccountTree *page) { - gnc_ui_hierarchy_druid(FALSE); + gnc_ui_hierarchy_assistant(FALSE); } static void diff --git a/src/gnome/top-level.c b/src/gnome/top-level.c index 94248399dd..bc23c8c65f 100644 --- a/src/gnome/top-level.c +++ b/src/gnome/top-level.c @@ -36,7 +36,7 @@ #include "dialog-sx-editor.h" #include "dialog-transfer.h" #include "dialog-totd.h" -#include "druid-hierarchy.h" +#include "assistant-hierarchy.h" #include "file-utils.h" #include "gnc-component-manager.h" #include "gnc-engine.h" @@ -424,7 +424,7 @@ gnc_main_gui_init (void) Anyway... Oh, maybe... nah */ gnc_plugin_manager_add_plugin (gnc_plugin_manager_get (), gnc_plugin_budget_new ()); - gnc_ui_hierarchy_druid_initialize(); + gnc_ui_hierarchy_assistant_initialize(); /* Run the ui startup hooks. */ gnc_hook_run(HOOK_UI_STARTUP, NULL);