Files linked to assistant-stock-split.glade

This commit is contained in:
Robert Fewell 2017-06-21 10:24:35 +01:00
parent 3c3b609384
commit ff70c67e56
2 changed files with 130 additions and 122 deletions

View File

@ -534,8 +534,8 @@ gnc_stock_split_assistant_create (StockSplitInfo *info)
GtkWidget *window;
builder = gtk_builder_new();
gnc_builder_add_from_file (builder , "assistant-stock-split.glade", "Stock Split Assistant");
window = GTK_WIDGET(gtk_builder_get_object (builder, "Stock Split Assistant"));
gnc_builder_add_from_file (builder , "assistant-stock-split.glade", "stock_split_assistant");
window = GTK_WIDGET(gtk_builder_get_object (builder, "stock_split_assistant"));
info->window = window;
/* Enable buttons on first, second, fourth and last page. */
@ -605,7 +605,7 @@ gnc_stock_split_assistant_create (StockSplitInfo *info)
info->description_entry = GTK_WIDGET(gtk_builder_get_object(builder, "description_entry"));
date = gnc_date_edit_new (gnc_time (NULL), FALSE, FALSE);
gtk_table_attach_defaults (GTK_TABLE (table), date, 1, 2, 0, 1);
gtk_grid_attach (GTK_GRID(table), date, 1, 0, 1, 1);
gtk_widget_show (date);
info->date_edit = date;
@ -616,7 +616,7 @@ gnc_stock_split_assistant_create (StockSplitInfo *info)
g_signal_connect (amount, "changed",
G_CALLBACK (gnc_stock_split_details_valid_cb), info);
gnc_amount_edit_set_evaluate_on_enter (GNC_AMOUNT_EDIT (amount), TRUE);
gtk_table_attach_defaults (GTK_TABLE (table), amount, 1, 2, 1, 2);
gtk_grid_attach (GTK_GRID(table), amount, 1, 1, 1, 1);
gtk_widget_show (amount);
info->distribution_edit = amount;
@ -629,7 +629,7 @@ gnc_stock_split_assistant_create (StockSplitInfo *info)
g_signal_connect (amount, "changed",
G_CALLBACK (gnc_stock_split_details_valid_cb), info);
gnc_amount_edit_set_evaluate_on_enter (GNC_AMOUNT_EDIT (amount), TRUE);
gtk_table_attach_defaults (GTK_TABLE (table), amount, 1, 2, 5, 6);
gtk_grid_attach (GTK_GRID(table), amount, 1, 5, 1, 1);
gtk_widget_show (amount);
info->price_edit = amount;
@ -639,7 +639,7 @@ gnc_stock_split_assistant_create (StockSplitInfo *info)
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);
gtk_table_attach_defaults (GTK_TABLE (table), info->price_currency_edit, 1, 2, 6, 7);
gtk_grid_attach (GTK_GRID(table), info->price_currency_edit, 1, 6, 1, 1);
}
/* Cash page Widgets */

View File

@ -1,16 +1,22 @@
<?xml version="1.0"?>
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.20.0 -->
<interface>
<requires lib="gtk+" version="2.16"/>
<!-- interface-naming-policy project-wide -->
<object class="GtkAssistant" id="Stock Split Assistant">
<requires lib="gtk+" version="3.10"/>
<object class="GtkAssistant" id="stock_split_assistant">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="border_width">12</property>
<signal name="prepare" handler="gnc_stock_split_assistant_prepare"/>
<signal name="cancel" handler="gnc_stock_split_assistant_cancel"/>
<signal name="close" handler="gnc_stock_split_assistant_finish"/>
<property name="title" translatable="yes">Stock Split Assistant</property>
<property name="window_position">center</property>
<property name="default_width">500</property>
<signal name="cancel" handler="gnc_stock_split_assistant_cancel" swapped="no"/>
<signal name="close" handler="gnc_stock_split_assistant_finish" swapped="no"/>
<signal name="prepare" handler="gnc_stock_split_assistant_prepare" swapped="no"/>
<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 record a stock split or stock merger.
</property>
<property name="wrap">True</property>
@ -18,15 +24,19 @@
<packing>
<property name="page_type">intro</property>
<property name="title" translatable="yes">Stock Split Assistant</property>
<property name="has_padding">False</property>
</packing>
</child>
<child>
<object class="GtkVBox" id="stock_account_page">
<object class="GtkBox" id="stock_account_page">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin_left">12</property>
<property name="orientation">vertical</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>
@ -40,31 +50,39 @@
<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>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<child internal-child="selection">
<object class="GtkTreeSelection" id="treeview-selection1"/>
</child>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="title" translatable="yes">Stock Split Account</property>
<property name="has_padding">False</property>
</packing>
</child>
<child>
<object class="GtkVBox" id="stock_details_page">
<object class="GtkBox" id="stock_details_page">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</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>
@ -76,131 +94,119 @@
</packing>
</child>
<child>
<object class="GtkTable" id="stock_details_table">
<object class="GtkGrid" 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">7</property>
<property name="n_columns">2</property>
<property name="column_spacing">6</property>
<property name="row_spacing">12</property>
<property name="column_spacing">6</property>
<child>
<object class="GtkLabel" id="date_label">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="can_focus">False</property>
<property name="halign">start</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>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="distribution_label">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="label" translatable="yes">_Shares:</property>
<property name="use_underline">True</property>
<property name="justify">center</property>
</object>
<packing>
<property name="left_attach">0</property>
<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="xalign">0</property>
<property name="can_focus">False</property>
<property name="halign">start</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="left_attach">0</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="GtkEntry" id="description_entry">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char">&#x25CF;</property>
<property name="invisible_char"></property>
<property name="text" translatable="yes">Stock Split</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">
<object class="GtkSeparator" id="hseparator1">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
<packing>
<property name="right_attach">2</property>
<property name="left_attach">0</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>
<property name="width">2</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="left_attach">0</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>
<property name="width">2</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="price_label">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="label" translatable="yes">New _Price:</property>
<property name="use_underline">True</property>
<property name="justify">center</property>
</object>
<packing>
<property name="left_attach">0</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="GtkLabel" id="currency_label">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="label" translatable="yes">Currenc_y:</property>
<property name="use_underline">True</property>
<property name="justify">center</property>
</object>
<packing>
<property name="left_attach">0</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>
@ -213,23 +219,11 @@
<placeholder/>
</child>
<child>
<object class="GtkHBox" id="price_currency_box">
<property name="visible">True</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>
<placeholder/>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
@ -237,17 +231,20 @@
</object>
<packing>
<property name="title" translatable="yes">Stock Split Details</property>
<property name="has_padding">False</property>
</packing>
</child>
<child>
<object class="GtkVBox" id="stock_cash_page">
<object class="GtkBox" id="stock_cash_page">
<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">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>
@ -259,67 +256,63 @@
</packing>
</child>
<child>
<object class="GtkTable" id="cash_table">
<object class="GtkGrid" id="cash_table">
<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="can_focus">False</property>
<property name="row_spacing">6</property>
<property name="column_spacing">12</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>
<property name="left_attach">0</property>
<property name="top_attach">0</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="left_attach">0</property>
<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">&#x25CF;</property>
<property name="hexpand">True</property>
<property name="invisible_char">●</property>
<property name="text" translatable="yes">Cash In Lieu</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">
<object class="GtkBox" id="cash_box">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">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>
<property name="top_attach">0</property>
</packing>
</child>
</object>
@ -330,69 +323,50 @@
</packing>
</child>
<child>
<object class="GtkTable" id="cash_table2">
<object class="GtkGrid" id="cash_table2">
<property name="visible">True</property>
<property name="n_rows">2</property>
<property name="n_columns">2</property>
<property name="can_focus">False</property>
<property name="column_spacing">12</property>
<property name="column_homogeneous">True</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>
<property name="left_attach">0</property>
<property name="top_attach">0</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>
<property name="top_attach">0</property>
</packing>
</child>
<child>
<object class="GtkAlignment" id="alignment2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="vexpand">True</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="hexpand">True</property>
<property name="vexpand">True</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>
<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>
@ -401,30 +375,64 @@
</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="GtkAlignment" id="alignment3">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="vexpand">True</property>
<child>
<object class="GtkScrolledWindow" id="asset_scroll">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="border_width">3</property>
<child>
<placeholder/>
</child>
</object>
</child>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</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>
<property name="has_padding">False</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>
<property name="has_padding">False</property>
</packing>
</child>
<child internal-child="action_area">
<object class="GtkBox" id="assistant-action_area2">
<property name="can_focus">False</property>
</object>
<packing>
<property name="has_padding">False</property>
</packing>
</child>
</object>