Small improvements to the hierarchy assistant:

* Set a default height to the assistant so it gets rid of one of the
scroll bars and make the currency drop down larger to show all text.
* Also make the assistant window stay on top as when it is started from
the new user dialog, the main save window used to hide the assistant
window and could confuse the user
Patch by Robert Fewell

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@21392 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Geert Janssens 2011-10-08 13:33:34 +00:00
parent 30d3cfc914
commit fda7e72c89
2 changed files with 91 additions and 24 deletions

View File

@ -1069,6 +1069,10 @@ gnc_create_hierarchy_assistant (gboolean use_defaults, GncHierarchyAssistantFini
dialog = GTK_WIDGET(gtk_builder_get_object (builder, "Hierarchy Assistant"));
data->dialog = dialog;
/* If we have a callback, make this window stay on top */
if (when_completed != NULL)
gtk_window_set_keep_above (GTK_WINDOW(data->dialog), TRUE);
gnc_assistant_set_colors (GTK_ASSISTANT (data->dialog));
/* Enable buttons on first and last page. */
@ -1089,8 +1093,8 @@ gnc_create_hierarchy_assistant (gboolean use_defaults, GncHierarchyAssistantFini
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 = GTK_WIDGET(gtk_builder_get_object (builder, "currency_chooser_vbox"));
gtk_box_pack_start(GTK_BOX(box), data->currency_selector, FALSE, FALSE, 0);
box = GTK_WIDGET(gtk_builder_get_object (builder, "currency_chooser_hbox"));
gtk_box_pack_start(GTK_BOX(box), data->currency_selector, TRUE, TRUE, 0);
/* Categories Page */
tree_view = GTK_TREE_VIEW(gtk_builder_get_object (builder, "account_categories_tree_view"));

View File

@ -4,13 +4,19 @@
<!-- interface-naming-policy toplevel-contextual -->
<object class="GtkAssistant" id="Hierarchy Assistant">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">12</property>
<signal name="prepare" handler="on_prepare"/>
<signal name="cancel" handler="on_cancel"/>
<signal name="close" handler="on_finish"/>
<property name="default_height">550</property>
<signal name="close" handler="on_finish" swapped="no"/>
<signal name="prepare" handler="on_prepare" swapped="no"/>
<signal name="cancel" handler="on_cancel" swapped="no"/>
<child>
<placeholder/>
</child>
<child>
<object class="GtkLabel" id="intro_page_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">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.</property>
@ -24,12 +30,14 @@ Click 'Cancel' if you do not wish to create any new accounts now.</property>
<child>
<object class="GtkVBox" id="currency_page_vbox">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<property name="can_focus">False</property>
<property name="spacing">5</property>
<child>
<object class="GtkLabel" id="choose_currency_label">
<property name="visible">True</property>
<property name="label" translatable="yes">Please choose the currency to use for new accounts.</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">
Please choose the currency to use for new accounts.</property>
</object>
<packing>
<property name="expand">False</property>
@ -38,25 +46,55 @@ Click 'Cancel' if you do not wish to create any new accounts now.</property>
</packing>
</child>
<child>
<object class="GtkAlignment" id="currency_chooser_alignment">
<object class="GtkHBox" id="currency_chooser_vbox">
<property name="visible">True</property>
<property name="yalign">0</property>
<property name="xscale">0</property>
<property name="yscale">0</property>
<property name="can_focus">False</property>
<child>
<object class="GtkVBox" id="currency_chooser_vbox">
<object class="GtkLabel" id="label1">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<property name="can_focus">False</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkHBox" id="currency_chooser_hbox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label2">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="title" translatable="yes">Choose Currency</property>
@ -65,11 +103,13 @@ Click 'Cancel' if you do not wish to create any new accounts now.</property>
<child>
<object class="GtkVBox" id="choose_account_types_vbox">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<property name="can_focus">False</property>
<child>
<object class="GtkLabel" id="pickAccountsDescriptionLabel">
<property name="visible">True</property>
<property name="label" translatable="yes">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.</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">
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.</property>
<property name="wrap">True</property>
<property name="width_chars">75</property>
</object>
@ -89,18 +129,18 @@ Click 'Cancel' if you do not wish to create any new accounts now.</property>
<object class="GtkVPaned" id="vpaned2">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="orientation">vertical</property>
<property name="position">150</property>
<property name="position">200</property>
<property name="position_set">True</property>
<child>
<object class="GtkVBox" id="vbox7">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">6</property>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
<object class="GtkLabel" id="label8477431">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">&lt;b&gt;Categories&lt;/b&gt;</property>
<property name="use_markup">True</property>
@ -114,6 +154,7 @@ Click 'Cancel' if you do not wish to create any new accounts now.</property>
<child>
<object class="GtkAlignment" id="alignment11">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="left_padding">12</property>
<child>
<object class="GtkScrolledWindow" id="scrolledwindow1">
@ -134,16 +175,20 @@ Click 'Cancel' if you do not wish to create any new accounts now.</property>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkAlignment" id="alignment12">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="left_padding">12</property>
<child>
<object class="GtkHButtonBox" id="hbuttonbox3">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">6</property>
<property name="layout_style">spread</property>
<child>
@ -153,8 +198,9 @@ Click 'Cancel' if you do not wish to create any new accounts now.</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="receives_default">True</property>
<property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
<signal name="clicked" handler="select_all_clicked"/>
<signal name="clicked" handler="select_all_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
@ -169,8 +215,9 @@ Click 'Cancel' if you do not wish to create any new accounts now.</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="receives_default">True</property>
<property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
<signal name="clicked" handler="clear_all_clicked"/>
<signal name="clicked" handler="clear_all_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
@ -183,6 +230,7 @@ Click 'Cancel' if you do not wish to create any new accounts now.</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
@ -195,12 +243,13 @@ Click 'Cancel' if you do not wish to create any new accounts now.</property>
<child>
<object class="GtkVBox" id="vbox130">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">6</property>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
<object class="GtkLabel" id="label8477397">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">&lt;b&gt;Category Description&lt;/b&gt;</property>
<property name="use_markup">True</property>
@ -214,6 +263,7 @@ Click 'Cancel' if you do not wish to create any new accounts now.</property>
<child>
<object class="GtkAlignment" id="alignment10">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="left_padding">12</property>
<child>
<object class="GtkScrolledWindow" id="scrolledwindow31">
@ -237,6 +287,8 @@ Click 'Cancel' if you do not wish to create any new accounts now.</property>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
@ -255,12 +307,13 @@ Click 'Cancel' if you do not wish to create any new accounts now.</property>
<child>
<object class="GtkVBox" id="vbox131">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">6</property>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
<object class="GtkLabel" id="accounts_in_category_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label">&lt;b&gt;Accounts in %s&lt;/b&gt;</property>
<property name="use_markup">True</property>
@ -274,6 +327,7 @@ Click 'Cancel' if you do not wish to create any new accounts now.</property>
<child>
<object class="GtkAlignment" id="alignment13">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="left_padding">12</property>
<child>
<object class="GtkScrolledWindow" id="accounts_in_category">
@ -289,6 +343,8 @@ Click 'Cancel' if you do not wish to create any new accounts now.</property>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
@ -300,6 +356,8 @@ Click 'Cancel' if you do not wish to create any new accounts now.</property>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
@ -311,13 +369,15 @@ Click 'Cancel' if you do not wish to create any new accounts now.</property>
<child>
<object class="GtkVBox" id="final_account_vbox">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<property name="can_focus">False</property>
<child>
<object class="GtkLabel" id="finalAccountLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xpad">1</property>
<property name="ypad">1</property>
<property name="label" translatable="yes">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.
<property name="label" translatable="yes">
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.
@ -347,6 +407,8 @@ Note: all accounts except Equity and placeholder accounts may have an opening ba
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
@ -358,6 +420,7 @@ Note: all accounts except Equity and placeholder accounts may have an opening ba
<child>
<object class="GtkLabel" id="finish_page_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">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.