Bug #650584 - Change Stock Split Druid to an Assistant

Patch by Bob

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20662 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Geert Janssens 2011-05-19 17:22:58 +00:00
parent fb2e4af923
commit 2a42972a04
7 changed files with 768 additions and 654 deletions

View File

@ -25,6 +25,7 @@ libgnc_gnome_la_LIBADD = \
libgnc_gnome_la_SOURCES = \
swig-gnome.c \
assistant-hierarchy.c \
assistant-stock-split.c \
dialog-commodities.c \
dialog-fincalc.c \
dialog-find-transactions.c \
@ -39,7 +40,6 @@ libgnc_gnome_la_SOURCES = \
dialog-tax-info.c \
druid-acct-period.c \
druid-loan.c \
druid-stock-split.c \
gnc-plugin-account-tree.c \
gnc-plugin-basic-commands.c \
gnc-plugin-budget.c \
@ -65,6 +65,7 @@ appicondir = $(datadir)/pixmaps
noinst_HEADERS = \
assistant-hierarchy.h \
assistant-stock-split.h \
dialog-fincalc.h \
dialog-find-transactions.h \
dialog-new-user.h \
@ -75,7 +76,6 @@ noinst_HEADERS = \
dialog-sx-since-last-run.h \
druid-acct-period.h \
druid-loan.h \
druid-stock-split.h \
gnc-plugin-account-tree.h \
gnc-plugin-basic-commands.h \
gnc-plugin-budget.h \

View File

@ -1,8 +1,9 @@
/********************************************************************\
* druid-stock-split.c -- stock split druid for GnuCash *
* assistant-stock-split.c -- stock split assistant for GnuCash *
* Copyright (C) 2001 Gnumatic, Inc. *
* Copyright (c) 2001 Dave Peticolas <dave@krondo.com> *
* Copyright (c) 2006 David Hampton <hampton@employees.org> *
* Copyright (C) 2011 Robert Fewell *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License as *
@ -24,13 +25,13 @@
#include "config.h"
#include <gnome.h>
#include <gtk/gtk.h>
#include <glib/gi18n.h>
#include "Transaction.h"
#include "dialog-utils.h"
#include "druid-stock-split.h"
#include "druid-utils.h"
#include "assistant-stock-split.h"
#include "assistant-utils.h"
#include "gnc-amount-edit.h"
#include "gnc-component-manager.h"
#include "gnc-currency-edit.h"
@ -43,7 +44,7 @@
#include "gnc-ui-util.h"
#define DRUID_STOCK_SPLIT_CM_CLASS "druid-stock-split"
#define ASSISTANT_STOCK_SPLIT_CM_CLASS "assistant-stock-split"
enum split_cols
{
@ -58,7 +59,7 @@ enum split_cols
typedef struct
{
GtkWidget * window;
GtkWidget * druid;
GtkWidget * assistant;
/* account page data */
GtkWidget * account_view;
@ -80,39 +81,35 @@ typedef struct
/** declarations *******************************************************/
void gnc_stock_split_druid_window_destroy_cb (GtkObject *object, gpointer data);
gboolean gnc_stock_split_druid_account_next (GnomeDruidPage *druidpage,
gpointer arg1,
void gnc_stock_split_assistant_window_destroy_cb (GtkObject *object, gpointer user_data);
void gnc_stock_split_assistant_prepare (GtkAssistant *assistant,
GtkWidget *page,
gpointer user_data);
void gnc_stock_split_druid_details_prepare (GnomeDruidPage *druidpage,
gpointer arg1,
void gnc_stock_split_assistant_details_prepare (GtkAssistant *assistant,
gpointer user_data);
gboolean gnc_stock_split_druid_details_next (GnomeDruidPage *druidpage,
gpointer arg1,
void gnc_stock_split_assistant_cash_prepare (GtkAssistant *assistant,
gpointer user_data);
void gnc_stock_split_druid_cash_prepare (GnomeDruidPage *druidpage,
gpointer arg1,
gboolean gnc_stock_split_assistant_details_test (GtkAssistant *assistant,
gpointer user_data);
gboolean gnc_stock_split_druid_cash_next (GnomeDruidPage *druidpage,
gpointer arg1,
gboolean gnc_stock_split_assistant_cash_test (GtkAssistant *assistant,
gpointer user_data);
void gnc_stock_split_druid_finish (GnomeDruidPage *druidpage,
gpointer arg1,
void gnc_stock_split_assistant_finish (GtkAssistant *assistant,
gpointer user_data);
void gnc_stock_split_druid_cancel_druid (GnomeDruid *druid,
void gnc_stock_split_assistant_cancel (GtkAssistant *gtkassistant,
gpointer user_data);
/******* implementations ***********************************************/
void
gnc_stock_split_druid_window_destroy_cb (GtkObject *object, gpointer data)
gnc_stock_split_assistant_window_destroy_cb (GtkObject *object, gpointer user_data)
{
StockSplitInfo *info = data;
StockSplitInfo *info = user_data;
gnc_unregister_gui_component_by_data (DRUID_STOCK_SPLIT_CM_CLASS, info);
gnc_unregister_gui_component_by_data (ASSISTANT_STOCK_SPLIT_CM_CLASS, info);
g_free (info);
}
static int
fill_account_list (StockSplitInfo *info, Account *selected_account)
{
@ -191,8 +188,9 @@ fill_account_list (StockSplitInfo *info, Account *selected_account)
return rows;
}
static void
selection_changed (GtkTreeSelection *selection,
selection_changed_cb (GtkTreeSelection *selection,
gpointer user_data)
{
StockSplitInfo *info = user_data;
@ -206,6 +204,7 @@ selection_changed (GtkTreeSelection *selection,
-1);
}
static void
refresh_details_page (StockSplitInfo *info)
{
@ -249,19 +248,6 @@ refresh_details_page (StockSplitInfo *info)
currency);
}
gboolean
gnc_stock_split_druid_account_next (GnomeDruidPage *druidpage,
gpointer arg1,
gpointer user_data)
{
StockSplitInfo *info = user_data;
g_return_val_if_fail (info->acct != NULL, TRUE);
refresh_details_page (info);
return FALSE;
}
static void
gnc_parse_error_dialog (StockSplitInfo *info, const char *error_string)
@ -281,64 +267,46 @@ gnc_parse_error_dialog (StockSplitInfo *info, const char *error_string)
parse_error_string);
}
void gnc_stock_split_assistant_prepare (GtkAssistant *assistant, GtkWidget *page,
gpointer user_data)
{
StockSplitInfo *info = user_data;
gint currentpage = gtk_assistant_get_current_page(assistant);
switch (currentpage)
{
case 2:
/* Current page is details page */
gtk_assistant_set_page_complete (assistant, page, FALSE);
gnc_stock_split_assistant_details_prepare(assistant, user_data);
break;
case 3:
/* Current page is Cash in Lieu page */
gtk_assistant_set_page_complete (assistant, page, FALSE);
gnc_stock_split_assistant_cash_prepare (assistant, user_data);
break;
}
}
void
gnc_stock_split_druid_details_prepare (GnomeDruidPage *druidpage,
gpointer arg1,
gnc_stock_split_assistant_details_prepare (GtkAssistant *assistant,
gpointer user_data)
{
StockSplitInfo *info = user_data;
gtk_widget_grab_focus(info->distribution_edit);
refresh_details_page(info);
gtk_widget_set_can_focus(GTK_WIDGET (info->distribution_edit), TRUE);
gtk_widget_grab_focus(GTK_WIDGET (info->distribution_edit));
/** FIXME The focus does not seem to work ? **/
}
gboolean
gnc_stock_split_druid_details_next (GnomeDruidPage *druidpage,
gpointer arg1,
gpointer user_data)
{
StockSplitInfo *info = user_data;
gnc_numeric amount;
if (!gnc_amount_edit_evaluate (GNC_AMOUNT_EDIT (info->distribution_edit)))
{
gnc_parse_error_dialog (info,
_("You must enter a valid distribution amount."));
return TRUE;
}
amount = gnc_amount_edit_get_amount
(GNC_AMOUNT_EDIT (info->distribution_edit));
if (gnc_numeric_zero_p (amount))
{
const char *message = _("You must enter a distribution amount.");
gnc_error_dialog (info->window, "%s", message);
return TRUE;
}
if (!gnc_amount_edit_evaluate (GNC_AMOUNT_EDIT (info->price_edit)))
{
gnc_parse_error_dialog (info,
_("You must either enter a valid price "
"or leave it blank."));
return TRUE;
}
amount = gnc_amount_edit_get_amount (GNC_AMOUNT_EDIT (info->price_edit));
if (gnc_numeric_negative_p (amount))
{
const char *message = _("The price must be positive.");
gnc_error_dialog (info->window, "%s", message);
return TRUE;
}
return FALSE;
}
void
gnc_stock_split_druid_cash_prepare (GnomeDruidPage *druidpage,
gpointer arg1,
gnc_stock_split_assistant_cash_prepare (GtkAssistant *assistant,
gpointer user_data)
{
StockSplitInfo *info = user_data;
@ -353,11 +321,59 @@ gnc_stock_split_druid_cash_prepare (GnomeDruidPage *druidpage,
gtk_tree_selection_unselect_all (selection);
gtk_widget_grab_focus(info->cash_edit);
/** FIXME The focus does not seem to work ? **/
}
gboolean
gnc_stock_split_druid_cash_next (GnomeDruidPage *druidpage,
gpointer arg1,
gnc_stock_split_assistant_details_test (GtkAssistant *assistant,
gpointer user_data)
{
StockSplitInfo *info = user_data;
gnc_numeric amount;
if (!gnc_amount_edit_evaluate (GNC_AMOUNT_EDIT (info->distribution_edit)))
{
gnc_parse_error_dialog (info,
_("You must enter a valid distribution amount."));
return FALSE;
}
amount = gnc_amount_edit_get_amount
(GNC_AMOUNT_EDIT (info->distribution_edit));
if (gnc_numeric_zero_p (amount))
{
const char *message = _("You must enter a distribution amount.");
gnc_error_dialog (info->window, "%s", message);
return FALSE;
}
if (!gnc_amount_edit_evaluate (GNC_AMOUNT_EDIT (info->price_edit)))
{
gnc_parse_error_dialog (info,
_("You must either enter a valid price "
"or leave it blank."));
return FALSE;
}
amount = gnc_amount_edit_get_amount (GNC_AMOUNT_EDIT (info->price_edit));
if (gnc_numeric_negative_p (amount))
{
const char *message = _("The price must be positive.");
gnc_error_dialog (info->window, "%s", message);
return FALSE;
}
return TRUE;
}
gboolean
gnc_stock_split_assistant_cash_test (GtkAssistant *assistant,
gpointer user_data)
{
StockSplitInfo *info = user_data;
@ -368,7 +384,7 @@ gnc_stock_split_druid_cash_next (GnomeDruidPage *druidpage,
gnc_parse_error_dialog (info,
_("You must either enter a valid cash amount "
"or leave it blank."));
return TRUE;
return FALSE;
}
amount = gnc_amount_edit_get_amount (GNC_AMOUNT_EDIT (info->cash_edit));
@ -377,7 +393,7 @@ gnc_stock_split_druid_cash_next (GnomeDruidPage *druidpage,
{
const char *message = _("The cash distribution must be positive.");
gnc_error_dialog (info->window, "%s", message);
return TRUE;
return FALSE;
}
if (gnc_numeric_positive_p (amount))
@ -390,7 +406,7 @@ gnc_stock_split_druid_cash_next (GnomeDruidPage *druidpage,
const char *message = _("You must select an income account "
"for the cash distribution.");
gnc_error_dialog (info->window, "%s", message);
return TRUE;
return FALSE;
}
account = gnc_tree_view_account_get_selected_account (GNC_TREE_VIEW_ACCOUNT(info->asset_tree));
@ -399,16 +415,16 @@ gnc_stock_split_druid_cash_next (GnomeDruidPage *druidpage,
const char *message = _("You must select an asset account "
"for the cash distribution.");
gnc_error_dialog (info->window, "%s", message);
return TRUE;
return FALSE;
}
}
return FALSE;
return TRUE;
}
void
gnc_stock_split_druid_finish (GnomeDruidPage *druidpage,
gpointer arg1,
gnc_stock_split_assistant_finish (GtkAssistant *assistant,
gpointer user_data)
{
StockSplitInfo *info = user_data;
@ -545,19 +561,20 @@ gnc_stock_split_druid_finish (GnomeDruidPage *druidpage,
gnc_resume_gui_refresh ();
gnc_close_gui_component_by_data (DRUID_STOCK_SPLIT_CM_CLASS, info);
gnc_close_gui_component_by_data (ASSISTANT_STOCK_SPLIT_CM_CLASS, info);
}
void
gnc_stock_split_druid_cancel_druid (GnomeDruid *druid, gpointer user_data)
gnc_stock_split_assistant_cancel (GtkAssistant *assistant, gpointer user_data)
{
StockSplitInfo *info = user_data;
gnc_close_gui_component_by_data (DRUID_STOCK_SPLIT_CM_CLASS, info);
gnc_close_gui_component_by_data (ASSISTANT_STOCK_SPLIT_CM_CLASS, info);
}
static gboolean
gnc_stock_split_druid_view_filter_income (Account *account,
gnc_stock_split_assistant_view_filter_income (Account *account,
gpointer data)
{
GNCAccountType type;
@ -566,8 +583,9 @@ gnc_stock_split_druid_view_filter_income (Account *account,
return (type == ACCT_TYPE_INCOME);
}
static gboolean
gnc_stock_split_druid_view_filter_asset (Account *account,
gnc_stock_split_assistant_view_filter_asset (Account *account,
gpointer data)
{
GNCAccountType type;
@ -577,25 +595,73 @@ gnc_stock_split_druid_view_filter_asset (Account *account,
(type == ACCT_TYPE_ASSET));
}
static void
gnc_stock_split_druid_create (StockSplitInfo *info)
gnc_stock_split_details_valid_button_cb (GtkButton *button, gpointer user_data)
{
GladeXML *xml;
StockSplitInfo *info = user_data;
GtkAssistant *assistant = GTK_ASSISTANT(info->window);
gint num = gtk_assistant_get_current_page (assistant);
GtkWidget *page = gtk_assistant_get_nth_page (assistant, num);
xml = gnc_glade_xml_new ("stocks.glade", "Stock Split Druid");
info->window = glade_xml_get_widget (xml, "Stock Split Druid");
info->druid = glade_xml_get_widget (xml, "stock_split_druid");
glade_xml_signal_autoconnect_full(xml, gnc_glade_autoconnect_full_func, info);
/* libglade2 is broken. It should read these from the glade file. */
gnc_druid_set_colors (GNOME_DRUID(info->druid));
gnc_druid_set_watermark_images (GNOME_DRUID(info->druid),
"stock_split_title.png",
"stock_split_watermark.png");
if(gnc_stock_split_assistant_details_test (assistant,user_data) == TRUE)
{
gtk_assistant_set_page_complete (assistant, page, TRUE);
gtk_assistant_set_current_page (assistant, num + 1);
}
}
/* account list */
static void
gnc_stock_split_cash_valid_button_cb (GtkButton *button, gpointer user_data)
{
StockSplitInfo *info = user_data;
GtkAssistant *assistant = GTK_ASSISTANT(info->window);
gint num = gtk_assistant_get_current_page (assistant);
GtkWidget *page = gtk_assistant_get_nth_page (assistant, num);
if(gnc_stock_split_assistant_cash_test (assistant,user_data) == TRUE)
{
gtk_assistant_set_page_complete (assistant, page, TRUE);
gtk_assistant_set_current_page (assistant, num + 1);
}
}
static GtkWidget *
gnc_stock_split_assistant_create (StockSplitInfo *info)
{
GtkBuilder *builder;
GtkWidget *window;
builder = gtk_builder_new();
gnc_builder_add_from_file (builder ,"stocks.glade", "Stock Split Assistant");
window = GTK_WIDGET(gtk_builder_get_object (builder, "Stock Split Assistant"));
info->window = window;
/* Set the assistant colors */
gnc_assistant_set_colors (GTK_ASSISTANT (info->window));
/* Enable buttons on first, second and last page. */
gtk_assistant_set_page_complete (GTK_ASSISTANT (window),
GTK_WIDGET(gtk_builder_get_object(builder, "intro_page_label")),
TRUE);
gtk_assistant_set_page_complete (GTK_ASSISTANT (window),
GTK_WIDGET(gtk_builder_get_object(builder, "stock_account_page")),
TRUE);
/**
gtk_assistant_set_page_complete (GTK_ASSISTANT (window),
GTK_WIDGET(gtk_builder_get_object(builder, "stock_details_page")),
TRUE);
gtk_assistant_set_page_complete (GTK_ASSISTANT (window),
GTK_WIDGET(gtk_builder_get_object(builder, "stock_cash_page")),
TRUE);
**/
gtk_assistant_set_page_complete (GTK_ASSISTANT (window),
GTK_WIDGET(gtk_builder_get_object(builder, "finish_page_label")),
TRUE);
/* Account page Widgets */
{
GtkTreeView *view;
GtkListStore *store;
@ -603,7 +669,7 @@ gnc_stock_split_druid_create (StockSplitInfo *info)
GtkCellRenderer *renderer;
GtkTreeViewColumn *column;
info->account_view = glade_xml_get_widget (xml, "account_view");
info->account_view = GTK_WIDGET(gtk_builder_get_object(builder, "account_view"));
view = GTK_TREE_VIEW(info->account_view);
@ -633,101 +699,120 @@ gnc_stock_split_druid_create (StockSplitInfo *info)
selection = gtk_tree_view_get_selection(view);
gtk_tree_selection_set_mode(selection, GTK_SELECTION_BROWSE);
g_signal_connect (selection, "changed",
G_CALLBACK (selection_changed), info);
G_CALLBACK (selection_changed_cb), info);
}
/* info widgets */
/* Details Page Widgets */
{
GtkWidget *box;
GtkWidget *amount;
GtkWidget *date;
GtkWidget *ce;
GtkWidget *label;
GtkWidget *button;
info->description_entry = glade_xml_get_widget (xml, "description_entry");
info->description_entry = GTK_WIDGET(gtk_builder_get_object(builder, "description_entry"));
box = glade_xml_get_widget (xml, "date_box");
box = GTK_WIDGET(gtk_builder_get_object(builder, "date_box"));
date = gnc_date_edit_new(time(NULL), FALSE, FALSE);
gtk_box_pack_start (GTK_BOX (box), date, TRUE, TRUE, 0);
info->date_edit = date;
label = glade_xml_get_widget (xml, "date_label");
label = GTK_WIDGET(gtk_builder_get_object(builder, "date_label"));
gnc_date_make_mnemonic_target (GNC_DATE_EDIT(date), label);
box = glade_xml_get_widget (xml, "distribution_box");
box = GTK_WIDGET(gtk_builder_get_object(builder, "distribution_box"));
amount = gnc_amount_edit_new ();
gtk_box_pack_start (GTK_BOX (box), amount, TRUE, TRUE, 0);
info->distribution_edit = amount;
label = glade_xml_get_widget (xml, "distribution_label");
label = GTK_WIDGET(gtk_builder_get_object(builder, "distribution_label"));
gtk_label_set_mnemonic_widget(GTK_LABEL(label), amount);
box = glade_xml_get_widget (xml, "price_box");
box = GTK_WIDGET(gtk_builder_get_object(builder, "price_box"));
amount = gnc_amount_edit_new ();
gnc_amount_edit_set_print_info (GNC_AMOUNT_EDIT (amount),
gnc_default_price_print_info ());
gnc_amount_edit_set_evaluate_on_enter (GNC_AMOUNT_EDIT (amount), TRUE);
gtk_box_pack_start (GTK_BOX (box), amount, TRUE, TRUE, 0);
info->price_edit = amount;
label = glade_xml_get_widget (xml, "price_label");
label = GTK_WIDGET(gtk_builder_get_object(builder, "price_label"));
gtk_label_set_mnemonic_widget(GTK_LABEL(label), amount);
box = glade_xml_get_widget (xml, "price_currency_box");
ce = gnc_currency_edit_new ();
gtk_box_pack_start (GTK_BOX (box), ce, TRUE, TRUE, 0);
info->price_currency_edit = ce;
label = glade_xml_get_widget (xml, "currency_label");
gtk_label_set_mnemonic_widget(GTK_LABEL(label), ce);
info->price_currency_edit = gnc_currency_edit_new();
gnc_currency_edit_set_currency (GNC_CURRENCY_EDIT(info->price_currency_edit), gnc_default_currency());
gtk_widget_show (info->price_currency_edit);
box = GTK_WIDGET(gtk_builder_get_object (builder, "price_currency_box"));
gtk_box_pack_start(GTK_BOX(box), info->price_currency_edit, TRUE, TRUE, 0);
button = GTK_WIDGET(gtk_builder_get_object(builder, "stock_details_valid_button"));
g_signal_connect (G_OBJECT (button), "clicked",
G_CALLBACK (gnc_stock_split_details_valid_button_cb), info);
}
/* Cash in Lieu page */
/* Cash page Widgets */
{
GtkWidget *box;
GtkWidget *tree;
GtkWidget *amount;
GtkWidget *label;
GtkWidget *scroll;
GtkWidget *button;
box = glade_xml_get_widget (xml, "cash_box");
box = GTK_WIDGET(gtk_builder_get_object(builder, "cash_box"));
amount = gnc_amount_edit_new ();
gtk_box_pack_start (GTK_BOX (box), amount, TRUE, TRUE, 0);
info->cash_edit = amount;
label = glade_xml_get_widget (xml, "cash_label");
label = GTK_WIDGET(gtk_builder_get_object(builder, "cash_label"));
gtk_label_set_mnemonic_widget(GTK_LABEL(label), amount);
info->memo_entry = glade_xml_get_widget (xml, "memo_entry");
info->memo_entry = GTK_WIDGET(gtk_builder_get_object(builder, "memo_entry"));
/* income tree */
tree = GTK_WIDGET(gnc_tree_view_account_new (FALSE));
info->income_tree = tree;
gnc_tree_view_account_set_filter (GNC_TREE_VIEW_ACCOUNT (tree),
gnc_stock_split_druid_view_filter_income,
gnc_stock_split_assistant_view_filter_income,
NULL, /* user data */
NULL /* destroy callback */);
gtk_widget_show (tree);
label = glade_xml_get_widget (xml, "income_label");
label = GTK_WIDGET(gtk_builder_get_object(builder, "income_label"));
gtk_label_set_mnemonic_widget (GTK_LABEL(label), tree);
scroll = glade_xml_get_widget (xml, "income_scroll");
scroll = GTK_WIDGET(gtk_builder_get_object(builder, "income_scroll"));
gtk_container_add (GTK_CONTAINER (scroll), tree);
/* asset tree */
tree = GTK_WIDGET(gnc_tree_view_account_new (FALSE));
info->asset_tree = tree;
gnc_tree_view_account_set_filter (GNC_TREE_VIEW_ACCOUNT (tree),
gnc_stock_split_druid_view_filter_asset,
gnc_stock_split_assistant_view_filter_asset,
NULL /* user data */,
NULL /* destroy callback */);
gtk_widget_show (tree);
label = glade_xml_get_widget (xml, "asset_label");
label = GTK_WIDGET(gtk_builder_get_object(builder, "asset_label"));
gtk_label_set_mnemonic_widget (GTK_LABEL(label), tree);
scroll = glade_xml_get_widget (xml, "asset_scroll");
scroll = GTK_WIDGET(gtk_builder_get_object(builder, "asset_scroll"));
gtk_container_add (GTK_CONTAINER (scroll), tree);
button = GTK_WIDGET(gtk_builder_get_object(builder, "stock_cash_valid_button"));
g_signal_connect (G_OBJECT (button), "clicked",
G_CALLBACK (gnc_stock_split_cash_valid_button_cb), info);
}
g_signal_connect (G_OBJECT(window), "destroy",
G_CALLBACK (gnc_stock_split_assistant_window_destroy_cb), info);
gtk_builder_connect_signals(builder, info);
g_object_unref(G_OBJECT(builder));
return window;
}
static void
@ -736,22 +821,17 @@ refresh_handler (GHashTable *changes, gpointer user_data)
StockSplitInfo *info = user_data;
Account *old_account;
GtkWidget *page;
GladeXML *xml;
GtkBuilder *builder;
old_account = info->acct;
if (fill_account_list (info, info->acct) == 0)
{
gnc_close_gui_component_by_data (DRUID_STOCK_SPLIT_CM_CLASS, info);
gnc_close_gui_component_by_data (ASSISTANT_STOCK_SPLIT_CM_CLASS, info);
return;
}
if (NULL == info->acct || old_account == info->acct) return;
xml = glade_get_widget_tree (info->window);
page = glade_xml_get_widget (xml, "account_page");
gnome_druid_set_page (GNOME_DRUID (info->druid), GNOME_DRUID_PAGE (page));
}
static void
@ -780,9 +860,9 @@ gnc_stock_split_dialog (GtkWidget *parent, Account * initial)
info->acct = NULL;
gnc_stock_split_druid_create (info);
gnc_stock_split_assistant_create (info);
component_id = gnc_register_gui_component (DRUID_STOCK_SPLIT_CM_CLASS,
component_id = gnc_register_gui_component (ASSISTANT_STOCK_SPLIT_CM_CLASS,
refresh_handler, close_handler,
info);
@ -793,7 +873,7 @@ gnc_stock_split_dialog (GtkWidget *parent, Account * initial)
if (fill_account_list (info, initial) == 0)
{
gnc_warning_dialog (parent, "%s", _("You don't have any stock accounts with balances!"));
gnc_close_gui_component_by_data (DRUID_STOCK_SPLIT_CM_CLASS, info);
gnc_close_gui_component_by_data (ASSISTANT_STOCK_SPLIT_CM_CLASS, info);
return;
}

View File

@ -1,8 +1,9 @@
/********************************************************************\
* druid-stock-split.h -- stock split druid for GnuCash *
* assistant-stock-split.h -- stock split assistant for GnuCash *
* Copyright (C) 2001 Gnumatic, Inc. *
* Copyright (C) 2001 Dave Peticolas <dave@krondo.com> *
* Copyright (C) 2003 Linas Vepstas <linas@linas.org> *
* Copyright (C) 2011 Robert Fewell *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License as *
@ -22,8 +23,8 @@
* Boston, MA 02110-1301, USA gnu@gnu.org *
\********************************************************************/
#ifndef GNC_DRUID_STOCK_SPLIT_H
#define GNC_DRUID_STOCK_SPLIT_H
#ifndef GNC_ASSISTANT_STOCK_SPLIT_H
#define GNC_ASSISTANT_STOCK_SPLIT_H
#include "Account.h"

View File

@ -13,7 +13,6 @@ glade_DATA = \
progress.glade \
reconcile.glade \
register.glade \
stocks.glade \
tax.glade \
userpass.glade \
sched-xact.glade

View File

@ -1,489 +0,0 @@
<?xml version="1.0"?>
<glade-interface>
<requires lib="gnome"/>
<!-- interface-requires gnome 2399.41192 -->
<!-- interface-requires gtk+ 2.10 -->
<!-- interface-naming-policy toplevel-contextual -->
<widget class="GtkWindow" id="Stock Split Druid">
<property name="visible">True</property>
<property name="title" translatable="yes">Stock Split</property>
<signal name="destroy" handler="gnc_stock_split_druid_window_destroy_cb"/>
<child>
<widget class="GnomeDruid" id="stock_split_druid">
<property name="visible">True</property>
<property name="border_width">4</property>
<signal name="cancel" handler="gnc_stock_split_druid_cancel_druid"/>
<child>
<widget class="GnomeDruidPageEdge" id="start_page">
<property name="visible">True</property>
<property name="position">Edge Start</property>
<property name="text" translatable="yes">This assistant will help you record a stock split or stock merger.</property>
</widget>
</child>
<child>
<widget class="GnomeDruidPageStandard" id="account_page">
<property name="visible">True</property>
<property name="title" translatable="yes">Stock Account</property>
<property name="title_foreground_gdk">#ffffffffffff</property>
<property name="background_gdk">#666666669999</property>
<property name="logo_background_gdk">#666666669999</property>
<signal name="next" handler="gnc_stock_split_druid_account_next"/>
<child internal-child="vbox">
<widget class="GtkVBox" id="vbox98">
<property name="visible">True</property>
<property name="border_width">5</property>
<property name="orientation">vertical</property>
<child>
<widget class="GtkLabel" id="label847677">
<property name="visible">True</property>
<property name="label" translatable="yes">Select the account for which you want to record a stock split or merger.</property>
<property name="justify">center</property>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<widget class="GtkScrolledWindow" id="scrolledwindow22">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hscrollbar_policy">automatic</property>
<property name="vscrollbar_policy">automatic</property>
<property name="shadow_type">in</property>
<child>
<widget class="GtkTreeView" id="account_view">
<property name="visible">True</property>
<property name="can_focus">True</property>
</widget>
</child>
</widget>
<packing>
<property name="position">1</property>
</packing>
</child>
</widget>
</child>
</widget>
</child>
<child>
<widget class="GnomeDruidPageStandard" id="details_page">
<property name="visible">True</property>
<property name="title" translatable="yes">Stock Split Details</property>
<property name="title_foreground_gdk">#ffffffffffff</property>
<property name="background_gdk">#666666669999</property>
<property name="logo_background_gdk">#666666669999</property>
<signal name="prepare" handler="gnc_stock_split_druid_details_prepare"/>
<signal name="next" handler="gnc_stock_split_druid_details_next"/>
<child internal-child="vbox">
<widget class="GtkVBox" id="druid-vbox32">
<property name="visible">True</property>
<property name="border_width">6</property>
<property name="orientation">vertical</property>
<property name="spacing">10</property>
<child>
<widget class="GtkLabel" id="label847681">
<property name="visible">True</property>
<property name="label" translatable="yes">Enter the date and the number of shares you gained or lost from the stock split or merger. For stock mergers (negative splits) use a negative value for the share distribution. You can also enter a description of the transaction, or accept the default one.</property>
<property name="justify">center</property>
<property name="wrap">True</property>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<widget class="GtkTable" id="table1">
<property name="visible">True</property>
<property name="border_width">6</property>
<property name="n_rows">7</property>
<property name="n_columns">2</property>
<property name="column_spacing">6</property>
<property name="row_spacing">12</property>
<child>
<widget class="GtkLabel" id="date_label">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">_Date:</property>
<property name="use_underline">True</property>
<property name="justify">center</property>
</widget>
<packing>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="distribution_label">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">_Shares:</property>
<property name="use_underline">True</property>
<property name="justify">center</property>
</widget>
<packing>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label847693">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Desc_ription:</property>
<property name="use_underline">True</property>
<property name="justify">center</property>
<property name="mnemonic_widget">description_entry</property>
</widget>
<packing>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkEntry" id="description_entry">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="text" translatable="yes">Stock Split</property>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkHSeparator" id="hseparator2">
<property name="visible">True</property>
</widget>
<packing>
<property name="right_attach">2</property>
<property name="top_attach">3</property>
<property name="bottom_attach">4</property>
<property name="x_options">GTK_FILL</property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label847691">
<property name="visible">True</property>
<property name="label" translatable="yes">If you want to record a stock price for the split, enter it below. You may safely leave it blank.</property>
<property name="justify">center</property>
<property name="wrap">True</property>
</widget>
<packing>
<property name="right_attach">2</property>
<property name="top_attach">4</property>
<property name="bottom_attach">5</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="price_label">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">New _Price:</property>
<property name="use_underline">True</property>
<property name="justify">center</property>
</widget>
<packing>
<property name="top_attach">5</property>
<property name="bottom_attach">6</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="currency_label">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Currenc_y:</property>
<property name="use_underline">True</property>
<property name="justify">center</property>
</widget>
<packing>
<property name="top_attach">6</property>
<property name="bottom_attach">7</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkHBox" id="date_box">
<property name="visible">True</property>
<child>
<placeholder/>
</child>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
<widget class="GtkHBox" id="distribution_box">
<property name="visible">True</property>
<child>
<placeholder/>
</child>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
<widget class="GtkHBox" id="price_box">
<property name="visible">True</property>
<child>
<placeholder/>
</child>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">5</property>
<property name="bottom_attach">6</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
<widget class="GtkHBox" id="price_currency_box">
<property name="visible">True</property>
<child>
<placeholder/>
</child>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">6</property>
<property name="bottom_attach">7</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
</packing>
</child>
</widget>
<packing>
<property name="expand">False</property>
<property name="position">1</property>
</packing>
</child>
</widget>
</child>
</widget>
</child>
<child>
<widget class="GnomeDruidPageStandard" id="cash_page">
<property name="visible">True</property>
<property name="title" translatable="yes">Cash In Lieu</property>
<property name="title_foreground_gdk">#ffffffffffff</property>
<property name="background_gdk">#666666669999</property>
<property name="logo_background_gdk">#666666669999</property>
<signal name="prepare" handler="gnc_stock_split_druid_cash_prepare"/>
<signal name="next" handler="gnc_stock_split_druid_cash_next"/>
<child internal-child="vbox">
<widget class="GtkVBox" id="druid-vbox33">
<property name="visible">True</property>
<property name="border_width">6</property>
<property name="orientation">vertical</property>
<property name="spacing">12</property>
<child>
<widget class="GtkLabel" id="label847687">
<property name="visible">True</property>
<property name="label" translatable="yes">If you received a cash disbursement as a result of the stock split, enter the details of that payment here. Otherwise, just click `Forward'.</property>
<property name="wrap">True</property>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<widget class="GtkTable" id="table3">
<property name="visible">True</property>
<property name="n_rows">2</property>
<property name="n_columns">2</property>
<property name="column_spacing">12</property>
<property name="row_spacing">6</property>
<child>
<widget class="GtkLabel" id="cash_label">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">_Amount:</property>
<property name="use_underline">True</property>
<property name="justify">center</property>
</widget>
<packing>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label847689">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">_Memo:</property>
<property name="use_underline">True</property>
<property name="justify">center</property>
<property name="mnemonic_widget">memo_entry</property>
</widget>
<packing>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkEntry" id="memo_entry">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="text" translatable="yes">Cash In Lieu</property>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkHBox" id="cash_box">
<property name="visible">True</property>
<child>
<placeholder/>
</child>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
</packing>
</child>
</widget>
<packing>
<property name="expand">False</property>
<property name="position">1</property>
</packing>
</child>
<child>
<widget class="GtkTable" id="table2">
<property name="visible">True</property>
<property name="n_rows">2</property>
<property name="n_columns">2</property>
<property name="column_spacing">12</property>
<child>
<widget class="GtkLabel" id="income_label">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">&lt;b&gt;_Income Account&lt;/b&gt;</property>
<property name="use_markup">True</property>
<property name="use_underline">True</property>
</widget>
<packing>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="asset_label">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">&lt;b&gt;A_sset Account&lt;/b&gt;</property>
<property name="use_markup">True</property>
<property name="use_underline">True</property>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkAlignment" id="alignment2">
<property name="visible">True</property>
<property name="left_padding">12</property>
<child>
<widget class="GtkScrolledWindow" id="income_scroll">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">3</property>
<property name="hscrollbar_policy">automatic</property>
<property name="vscrollbar_policy">automatic</property>
<child>
<placeholder/>
</child>
</widget>
</child>
</widget>
<packing>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
</packing>
</child>
<child>
<widget class="GtkAlignment" id="alignment3">
<property name="visible">True</property>
<property name="left_padding">12</property>
<child>
<widget class="GtkScrolledWindow" id="asset_scroll">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">3</property>
<property name="hscrollbar_policy">automatic</property>
<property name="vscrollbar_policy">automatic</property>
<child>
<placeholder/>
</child>
</widget>
</child>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
</packing>
</child>
</widget>
<packing>
<property name="position">2</property>
</packing>
</child>
</widget>
</child>
</widget>
</child>
<child>
<widget class="GnomeDruidPageEdge" id="finish_page">
<property name="visible">True</property>
<property name="position">GNOME_EDGE_FINISH</property>
<property name="text" translatable="yes">If you are finished creating the stock split or merger, press `Apply'. You may also press `Back' to review your choices, or `Cancel' to quit without making any changes.</property>
<signal name="finish" handler="gnc_stock_split_druid_finish"/>
</widget>
</child>
</widget>
</child>
</widget>
</glade-interface>

View File

@ -50,7 +50,7 @@
#include "dialog-print-check.h"
#include "dialog-transfer.h"
#include "dialog-utils.h"
#include "druid-stock-split.h"
#include "assistant-stock-split.h"
#include "gnc-gconf-utils.h"
#include "gnc-component-manager.h"
#include "gnc-date.h"

View File

@ -1,13 +1,536 @@
<?xml version="1.0"?>
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<requires lib="gtk+" version="2.16"/>
<!-- interface-naming-policy toplevel-contextual -->
<object class="GtkWindow" id="Stock Split Druid">
<!-- interface-naming-policy project-wide -->
<object class="GtkAssistant" id="Stock Split Assistant">
<property name="visible">True</property>
<property name="title" translatable="yes">Stock Split</property>
<signal name="destroy" handler="gnc_stock_split_druid_window_destroy_cb"/>
<property name="can_focus">False</property>
<property name="border_width">12</property>
<signal name="close" handler="gnc_stock_split_assistant_finish" swapped="no"/>
<signal name="cancel" handler="gnc_stock_split_assistant_cancel" swapped="no"/>
<signal name="prepare" handler="gnc_stock_split_assistant_prepare" swapped="no"/>
<child>
<placeholder/>
<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 record a stock split or stock merger.
</property>
<property name="wrap">True</property>
</object>
<packing>
<property name="page_type">intro</property>
<property name="title" translatable="yes">Stock Split Assistant</property>
</packing>
</child>
<child>
<object class="GtkVBox" id="stock_account_page">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkLabel" id="stock_account_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Select the account for which you want to record a stock split or merger.</property>
<property name="justify">center</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkScrolledWindow" id="stock_account_scrolled">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hscrollbar_policy">automatic</property>
<property name="vscrollbar_policy">automatic</property>
<child>
<object class="GtkTreeView" id="account_view">
<property name="visible">True</property>
<property name="can_focus">True</property>
</object>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="title" translatable="yes">Stock Split Account</property>
</packing>
</child>
<child>
<object class="GtkVBox" id="stock_details_page">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkLabel" id="stock_detail_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Enter the date and the number of shares you gained or lost from the stock split or merger. For stock mergers (negative splits) use a negative value for the share distribution. You can also enter a description of the transaction, or accept the default one.</property>
<property name="justify">center</property>
<property name="wrap">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkTable" id="stock_details_table">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">6</property>
<property name="n_rows">8</property>
<property name="n_columns">2</property>
<property name="column_spacing">6</property>
<property name="row_spacing">12</property>
<child>
<object class="GtkLabel" id="date_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">_Date:</property>
<property name="use_underline">True</property>
<property name="justify">center</property>
</object>
<packing>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<object class="GtkLabel" id="distribution_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">_Shares:</property>
<property name="use_underline">True</property>
<property name="justify">center</property>
</object>
<packing>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<object class="GtkLabel" id="description_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Desc_ription:</property>
<property name="use_underline">True</property>
<property name="justify">center</property>
<property name="mnemonic_widget">description_entry</property>
</object>
<packing>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<object class="GtkEntry" id="description_entry">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char">●</property>
<property name="text" translatable="yes">Stock Split</property>
<property name="primary_icon_activatable">False</property>
<property name="secondary_icon_activatable">False</property>
<property name="primary_icon_sensitive">True</property>
<property name="secondary_icon_sensitive">True</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<object class="GtkHSeparator" id="hseparator1">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
<packing>
<property name="right_attach">2</property>
<property name="top_attach">3</property>
<property name="bottom_attach">4</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<object class="GtkLabel" id="text_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">If you want to record a stock price for the split, enter it below. You may safely leave it blank.</property>
<property name="use_underline">True</property>
<property name="justify">center</property>
<property name="wrap">True</property>
</object>
<packing>
<property name="right_attach">2</property>
<property name="top_attach">4</property>
<property name="bottom_attach">5</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<object class="GtkLabel" id="price_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">New _Price:</property>
<property name="use_underline">True</property>
<property name="justify">center</property>
</object>
<packing>
<property name="top_attach">5</property>
<property name="bottom_attach">6</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<object class="GtkLabel" id="currency_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Currenc_y:</property>
<property name="use_underline">True</property>
<property name="justify">center</property>
</object>
<packing>
<property name="top_attach">6</property>
<property name="bottom_attach">7</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<object class="GtkHBox" id="date_box">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<object class="GtkHBox" id="distribution_box">
<property name="visible">True</property>
<property name="can_focus">True</property>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<object class="GtkHBox" id="price_box">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">5</property>
<property name="bottom_attach">6</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<object class="GtkHBox" id="price_currency_box">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">6</property>
<property name="bottom_attach">7</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<object class="GtkButton" id="stock_details_valid_button">
<property name="label" translatable="yes"> Click to _Validate and Proceed </property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
</object>
<packing>
<property name="right_attach">2</property>
<property name="top_attach">7</property>
<property name="bottom_attach">8</property>
<property name="x_options"></property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="title" translatable="yes">Stock Split Details</property>
</packing>
</child>
<child>
<object class="GtkVBox" id="stock_cash_page">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">6</property>
<property name="spacing">12</property>
<child>
<object class="GtkLabel" id="stock_cash_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">If you received a cash disbursement as a result of the stock split, enter the details of that payment here. Otherwise, just click `Forward'.</property>
<property name="justify">center</property>
<property name="wrap">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkTable" id="cash_table">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="n_rows">2</property>
<property name="n_columns">2</property>
<property name="column_spacing">12</property>
<property name="row_spacing">6</property>
<child>
<object class="GtkLabel" id="cash_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">_Amount:</property>
<property name="use_underline">True</property>
<property name="justify">center</property>
</object>
<packing>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<object class="GtkLabel" id="memo_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">_Memo:</property>
<property name="use_underline">True</property>
<property name="justify">center</property>
<property name="mnemonic_widget">memo_entry</property>
</object>
<packing>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<object class="GtkEntry" id="memo_entry">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char">●</property>
<property name="text" translatable="yes">Cash In Lieu</property>
<property name="primary_icon_activatable">False</property>
<property name="secondary_icon_activatable">False</property>
<property name="primary_icon_sensitive">True</property>
<property name="secondary_icon_sensitive">True</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
</packing>
</child>
<child>
<object class="GtkHBox" id="cash_box">
<property name="visible">True</property>
<property name="can_focus">True</property>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkTable" id="cash_table2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="n_rows">3</property>
<property name="n_columns">2</property>
<property name="column_spacing">12</property>
<child>
<object class="GtkLabel" id="income_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">&lt;b&gt;_Income Account&lt;/b&gt;</property>
<property name="use_markup">True</property>
<property name="use_underline">True</property>
</object>
<packing>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<object class="GtkLabel" id="asset_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">&lt;b&gt;A_sset Account&lt;/b&gt;</property>
<property name="use_markup">True</property>
<property name="use_underline">True</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<object class="GtkAlignment" id="alignment2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="left_padding">12</property>
<child>
<object class="GtkScrolledWindow" id="income_scroll">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">3</property>
<property name="hscrollbar_policy">automatic</property>
<property name="vscrollbar_policy">automatic</property>
<child>
<placeholder/>
</child>
</object>
</child>
</object>
<packing>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
</packing>
</child>
<child>
<object class="GtkAlignment" id="alignment3">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkScrolledWindow" id="asset_scroll">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">3</property>
<property name="hscrollbar_policy">automatic</property>
<property name="vscrollbar_policy">automatic</property>
<child>
<placeholder/>
</child>
</object>
</child>
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
</packing>
</child>
<child>
<object class="GtkButton" id="stock_cash_valid_button">
<property name="label" translatable="yes"> Click to _Validate and Proceed </property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
</object>
<packing>
<property name="right_attach">2</property>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
<property name="x_options"></property>
<property name="y_options"></property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="title" translatable="yes">Cash in Lieu</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="finish_page_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">If you are finished creating the stock split or merger, press `Apply'. You may also press `Back' to review your choices, or `Cancel' to quit without making any changes.</property>
<property name="wrap">True</property>
</object>
<packing>
<property name="page_type">confirm</property>
<property name="title" translatable="yes">Stock Split Finish</property>
</packing>
</child>
</object>
</interface>