mirror of
https://github.com/Gnucash/gnucash.git
synced 2026-07-29 23:58:03 -05:00
* src/register/gnome/gnucash-sheet.c
(gnucash_register_goto_next_trans_row): new func. * src/gnome/window-register.c: make 'enter' toolbar button move to next transaction * src/gnome/dialog-tax-info.c: more work * src/gnome/dialog-account.c: allow opening balances to come from other accounts * src/gnome/dialog-totd.c (totd_close_cb): don't bother with the help dialog after disabling tips git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@3891 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
@@ -1,3 +1,19 @@
|
||||
2001-04-04 Dave Peticolas <dave@krondo.com>
|
||||
|
||||
* src/register/gnome/gnucash-sheet.c
|
||||
(gnucash_register_goto_next_trans_row): new func.
|
||||
|
||||
* src/gnome/window-register.c: make 'enter' toolbar button
|
||||
move to next transaction
|
||||
|
||||
* src/gnome/dialog-tax-info.c: more work
|
||||
|
||||
* src/gnome/dialog-account.c: allow opening balances to come
|
||||
from other accounts
|
||||
|
||||
* src/gnome/dialog-totd.c (totd_close_cb): don't bother with the
|
||||
help dialog after disabling tips
|
||||
|
||||
2001-04-04 Christian Stimming <stimming@tuhh.de>
|
||||
|
||||
* src/gnome/gnc-html-guppi.c, src/scm/html-barchart.scm: Added new
|
||||
|
||||
+185
-24
@@ -73,6 +73,8 @@ struct _AccountWindow
|
||||
|
||||
GNCAccountType type;
|
||||
|
||||
GtkWidget * notebook;
|
||||
|
||||
GtkWidget * name_entry;
|
||||
GtkWidget * description_entry;
|
||||
GtkWidget * code_entry;
|
||||
@@ -86,7 +88,11 @@ struct _AccountWindow
|
||||
|
||||
GtkWidget * opening_balance_edit;
|
||||
GtkWidget * opening_balance_date_edit;
|
||||
GtkWidget * opening_balance_frame;
|
||||
GtkWidget * opening_balance_page;
|
||||
|
||||
GtkWidget * opening_equity_radio;
|
||||
GtkWidget * transfer_account_frame;
|
||||
GtkWidget * transfer_tree;
|
||||
|
||||
/* These probably don't belong here anymore, but until we figure out
|
||||
what we want, we'll leave them alone. */
|
||||
@@ -203,6 +209,56 @@ gnc_account_to_ui(AccountWindow *aw)
|
||||
}
|
||||
|
||||
|
||||
static gboolean
|
||||
gnc_account_create_transfer_balance (Account *account,
|
||||
Account *transfer,
|
||||
gnc_numeric balance,
|
||||
time_t date)
|
||||
{
|
||||
Transaction *trans;
|
||||
Split *split;
|
||||
|
||||
if (gnc_numeric_zero_p (balance))
|
||||
return TRUE;
|
||||
|
||||
g_return_val_if_fail (account != NULL, FALSE);
|
||||
g_return_val_if_fail (transfer != NULL, FALSE);
|
||||
|
||||
xaccAccountBeginEdit (account);
|
||||
xaccAccountBeginEdit (transfer);
|
||||
|
||||
trans = xaccMallocTransaction ();
|
||||
|
||||
xaccTransBeginEdit (trans);
|
||||
|
||||
xaccTransSetDateSecs (trans, date);
|
||||
xaccTransSetDescription (trans, _("Opening Balance"));
|
||||
|
||||
split = xaccMallocSplit ();
|
||||
|
||||
xaccTransAppendSplit (trans, split);
|
||||
xaccAccountInsertSplit (account, split);
|
||||
|
||||
xaccSplitSetShareAmount (split, balance);
|
||||
xaccSplitSetValue (split, balance);
|
||||
|
||||
balance = gnc_numeric_neg (balance);
|
||||
|
||||
split = xaccMallocSplit ();
|
||||
|
||||
xaccTransAppendSplit (trans, split);
|
||||
xaccAccountInsertSplit (transfer, split);
|
||||
|
||||
xaccSplitSetShareAmount (split, balance);
|
||||
xaccSplitSetValue (split, balance);
|
||||
|
||||
xaccTransCommitEdit (trans);
|
||||
xaccAccountCommitEdit (transfer);
|
||||
xaccAccountCommitEdit (account);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* Record the GUI values into the Account structure */
|
||||
static void
|
||||
gnc_ui_to_account(AccountWindow *aw)
|
||||
@@ -214,6 +270,7 @@ gnc_ui_to_account(AccountWindow *aw)
|
||||
const char *string;
|
||||
gboolean tax_related;
|
||||
gnc_numeric balance;
|
||||
gboolean use_equity;
|
||||
time_t date;
|
||||
|
||||
if (!account)
|
||||
@@ -300,13 +357,34 @@ gnc_ui_to_account(AccountWindow *aw)
|
||||
|
||||
balance = gnc_amount_edit_get_amount
|
||||
(GNC_AMOUNT_EDIT (aw->opening_balance_edit));
|
||||
|
||||
if (gnc_numeric_zero_p (balance))
|
||||
return;
|
||||
|
||||
date = gnc_date_edit_get_date
|
||||
(GNC_DATE_EDIT (aw->opening_balance_date_edit));
|
||||
|
||||
if (!gnc_account_create_opening_balance (account, balance, date))
|
||||
use_equity = gtk_toggle_button_get_active
|
||||
(GTK_TOGGLE_BUTTON (aw->opening_equity_radio));
|
||||
|
||||
if (use_equity)
|
||||
{
|
||||
const char *message = _("Could not create opening balance.");
|
||||
gnc_error_dialog_parented(GTK_WINDOW(aw->dialog), message);
|
||||
if (!gnc_account_create_opening_balance (account, balance, date))
|
||||
{
|
||||
const char *message = _("Could not create opening balance.");
|
||||
gnc_error_dialog_parented(GTK_WINDOW(aw->dialog), message);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Account *transfer;
|
||||
|
||||
transfer = gnc_account_tree_get_current_account
|
||||
(GNC_ACCOUNT_TREE (aw->transfer_tree));
|
||||
if (!transfer)
|
||||
return;
|
||||
|
||||
gnc_account_create_transfer_balance (account, transfer, balance, date);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -975,6 +1053,7 @@ gnc_new_account_ok (AccountWindow *aw)
|
||||
const gnc_commodity * currency;
|
||||
const gnc_commodity * security;
|
||||
Account *parent_account;
|
||||
gnc_numeric balance;
|
||||
char *name;
|
||||
|
||||
/* check for valid name */
|
||||
@@ -1067,6 +1146,33 @@ gnc_new_account_ok (AccountWindow *aw)
|
||||
return;
|
||||
}
|
||||
|
||||
balance = gnc_amount_edit_get_amount
|
||||
(GNC_AMOUNT_EDIT (aw->opening_balance_edit));
|
||||
|
||||
if (!gnc_numeric_zero_p (balance))
|
||||
{
|
||||
gboolean use_equity;
|
||||
|
||||
use_equity = gtk_toggle_button_get_active
|
||||
(GTK_TOGGLE_BUTTON (aw->opening_equity_radio));
|
||||
|
||||
if (!use_equity)
|
||||
{
|
||||
Account *transfer;
|
||||
|
||||
transfer = gnc_account_tree_get_current_account
|
||||
(GNC_ACCOUNT_TREE (aw->transfer_tree));
|
||||
|
||||
if (!transfer)
|
||||
{
|
||||
const char *message = _("You must select a transfer account or choose"
|
||||
"\nthe opening balances equity account.");
|
||||
gnc_error_dialog_parented (GTK_WINDOW(aw->dialog), message);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
gnc_finish_ok (aw, NULL, NULL, NULL);
|
||||
}
|
||||
|
||||
@@ -1208,7 +1314,13 @@ gnc_type_list_select_cb(GtkCList * type_list, gint row, gint column,
|
||||
aw->type != STOCK &&
|
||||
aw->type != MUTUAL);
|
||||
|
||||
gtk_widget_set_sensitive(aw->opening_balance_frame, sensitive);
|
||||
gtk_widget_set_sensitive(aw->opening_balance_page, sensitive);
|
||||
if (!sensitive)
|
||||
{
|
||||
gtk_notebook_set_page (GTK_NOTEBOOK (aw->notebook), 0);
|
||||
gnc_amount_edit_set_amount (GNC_AMOUNT_EDIT (aw->opening_balance_edit),
|
||||
gnc_numeric_zero ());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1351,6 +1463,34 @@ currency_changed_cb (GNCCommodityEdit *gce, gpointer data)
|
||||
gnc_commodity_get_fraction (currency));
|
||||
gnc_amount_edit_set_print_info (GNC_AMOUNT_EDIT (aw->opening_balance_edit),
|
||||
gnc_commodity_print_info (currency, FALSE));
|
||||
|
||||
gnc_account_tree_refresh (GNC_ACCOUNT_TREE (aw->transfer_tree));
|
||||
}
|
||||
|
||||
static gboolean
|
||||
account_currency_filter (Account *account, gpointer user_data)
|
||||
{
|
||||
AccountWindow *aw = user_data;
|
||||
gnc_commodity *currency;
|
||||
|
||||
if (!account)
|
||||
return FALSE;
|
||||
|
||||
currency =
|
||||
gnc_commodity_edit_get_commodity (GNC_COMMODITY_EDIT (aw->currency_edit));
|
||||
|
||||
return gnc_commodity_equiv (xaccAccountGetCurrency (account), currency);
|
||||
}
|
||||
|
||||
static void
|
||||
opening_equity_cb (GtkWidget *w, gpointer data)
|
||||
{
|
||||
AccountWindow *aw = data;
|
||||
gboolean use_equity;
|
||||
|
||||
use_equity = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (w));
|
||||
|
||||
gtk_widget_set_sensitive (aw->transfer_account_frame, !use_equity);
|
||||
}
|
||||
|
||||
/********************************************************************\
|
||||
@@ -1388,7 +1528,9 @@ gnc_account_window_create(AccountWindow *aw)
|
||||
gnome_dialog_button_connect
|
||||
(awd, 2, GTK_SIGNAL_FUNC(gnc_account_window_help_cb), aw);
|
||||
|
||||
aw->name_entry = gtk_object_get_data(awo, "name_entry");
|
||||
aw->notebook = gtk_object_get_data (awo, "account_notebook");
|
||||
|
||||
aw->name_entry = gtk_object_get_data(awo, "name_entry");
|
||||
gtk_signal_connect(GTK_OBJECT (aw->name_entry), "changed",
|
||||
GTK_SIGNAL_FUNC(gnc_account_name_changed_cb), aw);
|
||||
|
||||
@@ -1423,23 +1565,6 @@ gnc_account_window_create(AccountWindow *aw)
|
||||
|
||||
aw->quote_frame = gtk_object_get_data (awo, "price_quote_frame");
|
||||
|
||||
box = gtk_object_get_data(awo, "opening_balance_box");
|
||||
amount = gnc_amount_edit_new ();
|
||||
aw->opening_balance_edit = amount;
|
||||
gtk_box_pack_start(GTK_BOX(box), amount, TRUE, TRUE, 0);
|
||||
gnc_amount_edit_set_evaluate_on_enter (GNC_AMOUNT_EDIT (amount), TRUE);
|
||||
|
||||
box = gtk_object_get_data (awo, "opening_balance_date_box");
|
||||
date = gnc_date_edit_new(time(NULL), FALSE, FALSE);
|
||||
aw->opening_balance_date_edit = date;
|
||||
gtk_box_pack_start(GTK_BOX(box), date, TRUE, TRUE, 0);
|
||||
|
||||
aw->opening_balance_frame =
|
||||
gtk_object_get_data (awo, "opening_balance_frame");
|
||||
|
||||
aw->type_list = gtk_object_get_data(awo, "type_list");
|
||||
gnc_account_type_list_create (aw);
|
||||
|
||||
box = gtk_object_get_data(awo, "parent_scroll");
|
||||
|
||||
aw->top_level_account = xaccMallocAccount();
|
||||
@@ -1460,6 +1585,42 @@ gnc_account_window_create(AccountWindow *aw)
|
||||
|
||||
aw->tax_related_button = gtk_object_get_data (awo, "tax_related_button");
|
||||
|
||||
box = gtk_object_get_data(awo, "opening_balance_box");
|
||||
amount = gnc_amount_edit_new ();
|
||||
aw->opening_balance_edit = amount;
|
||||
gtk_box_pack_start(GTK_BOX(box), amount, TRUE, TRUE, 0);
|
||||
gnc_amount_edit_set_evaluate_on_enter (GNC_AMOUNT_EDIT (amount), TRUE);
|
||||
|
||||
box = gtk_object_get_data (awo, "opening_balance_date_box");
|
||||
date = gnc_date_edit_new(time(NULL), FALSE, FALSE);
|
||||
aw->opening_balance_date_edit = date;
|
||||
gtk_box_pack_start(GTK_BOX(box), date, TRUE, TRUE, 0);
|
||||
|
||||
aw->opening_balance_page =
|
||||
gtk_notebook_get_nth_page (GTK_NOTEBOOK (aw->notebook), 1);
|
||||
|
||||
aw->opening_equity_radio = gtk_object_get_data (awo, "opening_equity_radio");
|
||||
gtk_signal_connect (GTK_OBJECT (aw->opening_equity_radio), "toggled",
|
||||
GTK_SIGNAL_FUNC (opening_equity_cb), aw);
|
||||
|
||||
aw->transfer_account_frame =
|
||||
gtk_object_get_data (awo, "transfer_account_frame");
|
||||
|
||||
box = gtk_object_get_data(awo, "transfer_account_scroll");
|
||||
|
||||
aw->transfer_tree = gnc_account_tree_new ();
|
||||
gtk_clist_column_titles_hide (GTK_CLIST (aw->transfer_tree));
|
||||
gnc_account_tree_hide_all_but_name(GNC_ACCOUNT_TREE(aw->parent_tree));
|
||||
|
||||
gnc_account_tree_set_selectable_filter (GNC_ACCOUNT_TREE (aw->transfer_tree),
|
||||
account_currency_filter, aw);
|
||||
|
||||
gtk_container_add(GTK_CONTAINER(box), GTK_WIDGET(aw->transfer_tree));
|
||||
|
||||
/* This goes at the end so the select callback has good data. */
|
||||
aw->type_list = gtk_object_get_data(awo, "type_list");
|
||||
gnc_account_type_list_create (aw);
|
||||
|
||||
if (last_width == 0)
|
||||
gnc_get_window_size("account_win", &last_width, &last_height);
|
||||
|
||||
@@ -1815,7 +1976,7 @@ gnc_ui_edit_account_window(Account *account)
|
||||
gnc_resume_gui_refresh ();
|
||||
|
||||
gtk_widget_show_all (aw->dialog);
|
||||
gtk_widget_hide (aw->opening_balance_frame);
|
||||
gtk_widget_hide (aw->opening_balance_page);
|
||||
|
||||
parent = xaccAccountGetParentAccount (account);
|
||||
if (parent == NULL)
|
||||
|
||||
@@ -545,6 +545,8 @@ txf_code_select_row_cb (GtkCList *clist,
|
||||
{
|
||||
TaxInfoDialog *ti_dialog = user_data;
|
||||
TXFInfo *txf_info;
|
||||
GtkAdjustment *adj;
|
||||
GtkWidget *scroll;
|
||||
GtkWidget *frame;
|
||||
GtkEditable *ge;
|
||||
const char *text;
|
||||
@@ -559,6 +561,11 @@ txf_code_select_row_cb (GtkCList *clist,
|
||||
gtk_editable_delete_text (ge, 0, -1);
|
||||
gtk_editable_insert_text (ge, text, strlen (text), &pos);
|
||||
|
||||
scroll = lookup_widget (GTK_WIDGET (clist), "help_scroll");
|
||||
|
||||
adj = gtk_scrolled_window_get_vadjustment (GTK_SCROLLED_WINDOW (scroll));
|
||||
gtk_adjustment_set_value (adj, 0.0);
|
||||
|
||||
frame = lookup_widget (GTK_WIDGET (clist), "payer_name_source_frame");
|
||||
|
||||
if (txf_info->payer_name_source)
|
||||
@@ -736,7 +743,10 @@ gnc_tax_info_dialog_create (GtkWidget * parent, TaxInfoDialog *ti_dialog)
|
||||
gnc_get_window_size ("tax_info_win", &last_width, &last_height);
|
||||
|
||||
if (last_height == 0)
|
||||
{
|
||||
last_height = 400;
|
||||
last_width = 500;
|
||||
}
|
||||
|
||||
gtk_window_set_default_size (GTK_WINDOW(ti_dialog->dialog),
|
||||
last_width, last_height);
|
||||
|
||||
@@ -181,14 +181,7 @@ totd_close_cb(GtkWidget *widget, gpointer data)
|
||||
gnc_set_boolean_option("General",
|
||||
"Display \"Tip of the Day\"",
|
||||
new_enabled);
|
||||
gnc_option_refresh_ui_by_name("General", "Display \"Tip of the Day\"");
|
||||
if(new_enabled == FALSE)
|
||||
{
|
||||
const char *message = _("You have disabled \"Tip of the Day\"\n"
|
||||
"You can re-enable tips from the General\n"
|
||||
"section of the Preferences menu");
|
||||
gnc_info_dialog(message);
|
||||
}
|
||||
gnc_option_refresh_ui_by_name("General", "Display \"Tip of the Day\"");
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
+178
-81
@@ -2833,7 +2833,7 @@ create_Amortization_Schedule_Dialog (void)
|
||||
GtkWidget *button61;
|
||||
GtkWidget *button62;
|
||||
|
||||
Amortization_Schedule_Dialog = gnome_dialog_new (NULL, NULL);
|
||||
Amortization_Schedule_Dialog = gnome_dialog_new (_("Account Information"), NULL);
|
||||
gtk_object_set_data (GTK_OBJECT (Amortization_Schedule_Dialog), "Amortization_Schedule_Dialog", Amortization_Schedule_Dialog);
|
||||
gtk_window_set_policy (GTK_WINDOW (Amortization_Schedule_Dialog), FALSE, FALSE, FALSE);
|
||||
|
||||
@@ -3378,6 +3378,7 @@ create_Account_Dialog (void)
|
||||
{
|
||||
GtkWidget *Account_Dialog;
|
||||
GtkWidget *dialog_vbox12;
|
||||
GtkWidget *account_notebook;
|
||||
GtkWidget *vbox75;
|
||||
GtkWidget *frame28;
|
||||
GtkWidget *hbox62;
|
||||
@@ -3400,14 +3401,6 @@ create_Account_Dialog (void)
|
||||
GtkWidget *label812;
|
||||
GtkWidget *frame30;
|
||||
GtkWidget *parent_scroll;
|
||||
GtkWidget *opening_balance_frame;
|
||||
GtkWidget *hbox101;
|
||||
GtkWidget *vbox114;
|
||||
GtkWidget *label847737;
|
||||
GtkWidget *label847738;
|
||||
GtkWidget *vbox115;
|
||||
GtkWidget *opening_balance_box;
|
||||
GtkWidget *opening_balance_date_box;
|
||||
GtkWidget *price_quote_frame;
|
||||
GtkWidget *hbox103;
|
||||
GtkWidget *vbox116;
|
||||
@@ -3420,10 +3413,31 @@ create_Account_Dialog (void)
|
||||
GtkWidget *scrolledwindow9;
|
||||
GtkWidget *notes_text;
|
||||
GtkWidget *tax_related_button;
|
||||
GtkWidget *label8477388;
|
||||
GtkWidget *vbox118;
|
||||
GtkWidget *opening_balance_frame;
|
||||
GtkWidget *hbox101;
|
||||
GtkWidget *vbox114;
|
||||
GtkWidget *label847737;
|
||||
GtkWidget *label847738;
|
||||
GtkWidget *vbox115;
|
||||
GtkWidget *opening_balance_box;
|
||||
GtkWidget *opening_balance_date_box;
|
||||
GtkWidget *frame49;
|
||||
GtkWidget *vbox120;
|
||||
GSList *vbox120_group = NULL;
|
||||
GtkWidget *opening_equity_radio;
|
||||
GtkWidget *radiobutton8;
|
||||
GtkWidget *transfer_account_frame;
|
||||
GtkWidget *transfer_account_scroll;
|
||||
GtkWidget *label847739;
|
||||
GtkWidget *dialog_action_area12;
|
||||
GtkWidget *button63;
|
||||
GtkWidget *cancel_button;
|
||||
GtkWidget *button72;
|
||||
GtkTooltips *tooltips;
|
||||
|
||||
tooltips = gtk_tooltips_new ();
|
||||
|
||||
Account_Dialog = gnome_dialog_new (_("New Account"), NULL);
|
||||
gtk_object_set_data (GTK_OBJECT (Account_Dialog), "Account_Dialog", Account_Dialog);
|
||||
@@ -3433,12 +3447,19 @@ create_Account_Dialog (void)
|
||||
gtk_object_set_data (GTK_OBJECT (Account_Dialog), "dialog_vbox12", dialog_vbox12);
|
||||
gtk_widget_show (dialog_vbox12);
|
||||
|
||||
account_notebook = gtk_notebook_new ();
|
||||
gtk_widget_ref (account_notebook);
|
||||
gtk_object_set_data_full (GTK_OBJECT (Account_Dialog), "account_notebook", account_notebook,
|
||||
(GtkDestroyNotify) gtk_widget_unref);
|
||||
gtk_widget_show (account_notebook);
|
||||
gtk_box_pack_start (GTK_BOX (dialog_vbox12), account_notebook, TRUE, TRUE, 0);
|
||||
|
||||
vbox75 = gtk_vbox_new (FALSE, 0);
|
||||
gtk_widget_ref (vbox75);
|
||||
gtk_object_set_data_full (GTK_OBJECT (Account_Dialog), "vbox75", vbox75,
|
||||
(GtkDestroyNotify) gtk_widget_unref);
|
||||
gtk_widget_show (vbox75);
|
||||
gtk_box_pack_start (GTK_BOX (dialog_vbox12), vbox75, TRUE, TRUE, 0);
|
||||
gtk_container_add (GTK_CONTAINER (account_notebook), vbox75);
|
||||
|
||||
frame28 = gtk_frame_new (_("Account Information"));
|
||||
gtk_widget_ref (frame28);
|
||||
@@ -3607,68 +3628,6 @@ create_Account_Dialog (void)
|
||||
gtk_container_set_border_width (GTK_CONTAINER (parent_scroll), 3);
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (parent_scroll), GTK_POLICY_NEVER, GTK_POLICY_ALWAYS);
|
||||
|
||||
opening_balance_frame = gtk_frame_new (_("Opening Balance"));
|
||||
gtk_widget_ref (opening_balance_frame);
|
||||
gtk_object_set_data_full (GTK_OBJECT (Account_Dialog), "opening_balance_frame", opening_balance_frame,
|
||||
(GtkDestroyNotify) gtk_widget_unref);
|
||||
gtk_widget_show (opening_balance_frame);
|
||||
gtk_box_pack_start (GTK_BOX (vbox75), opening_balance_frame, TRUE, TRUE, 0);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (opening_balance_frame), 3);
|
||||
|
||||
hbox101 = gtk_hbox_new (FALSE, 2);
|
||||
gtk_widget_ref (hbox101);
|
||||
gtk_object_set_data_full (GTK_OBJECT (Account_Dialog), "hbox101", hbox101,
|
||||
(GtkDestroyNotify) gtk_widget_unref);
|
||||
gtk_widget_show (hbox101);
|
||||
gtk_container_add (GTK_CONTAINER (opening_balance_frame), hbox101);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (hbox101), 3);
|
||||
|
||||
vbox114 = gtk_vbox_new (TRUE, 0);
|
||||
gtk_widget_ref (vbox114);
|
||||
gtk_object_set_data_full (GTK_OBJECT (Account_Dialog), "vbox114", vbox114,
|
||||
(GtkDestroyNotify) gtk_widget_unref);
|
||||
gtk_widget_show (vbox114);
|
||||
gtk_box_pack_start (GTK_BOX (hbox101), vbox114, FALSE, FALSE, 0);
|
||||
|
||||
label847737 = gtk_label_new (_("Balance:"));
|
||||
gtk_widget_ref (label847737);
|
||||
gtk_object_set_data_full (GTK_OBJECT (Account_Dialog), "label847737", label847737,
|
||||
(GtkDestroyNotify) gtk_widget_unref);
|
||||
gtk_widget_show (label847737);
|
||||
gtk_box_pack_start (GTK_BOX (vbox114), label847737, FALSE, FALSE, 0);
|
||||
gtk_label_set_justify (GTK_LABEL (label847737), GTK_JUSTIFY_RIGHT);
|
||||
gtk_misc_set_alignment (GTK_MISC (label847737), 1, 0.5);
|
||||
|
||||
label847738 = gtk_label_new (_("Date:"));
|
||||
gtk_widget_ref (label847738);
|
||||
gtk_object_set_data_full (GTK_OBJECT (Account_Dialog), "label847738", label847738,
|
||||
(GtkDestroyNotify) gtk_widget_unref);
|
||||
gtk_widget_show (label847738);
|
||||
gtk_box_pack_start (GTK_BOX (vbox114), label847738, FALSE, FALSE, 0);
|
||||
gtk_label_set_justify (GTK_LABEL (label847738), GTK_JUSTIFY_RIGHT);
|
||||
gtk_misc_set_alignment (GTK_MISC (label847738), 1, 0.5);
|
||||
|
||||
vbox115 = gtk_vbox_new (TRUE, 0);
|
||||
gtk_widget_ref (vbox115);
|
||||
gtk_object_set_data_full (GTK_OBJECT (Account_Dialog), "vbox115", vbox115,
|
||||
(GtkDestroyNotify) gtk_widget_unref);
|
||||
gtk_widget_show (vbox115);
|
||||
gtk_box_pack_start (GTK_BOX (hbox101), vbox115, TRUE, TRUE, 0);
|
||||
|
||||
opening_balance_box = gtk_hbox_new (FALSE, 0);
|
||||
gtk_widget_ref (opening_balance_box);
|
||||
gtk_object_set_data_full (GTK_OBJECT (Account_Dialog), "opening_balance_box", opening_balance_box,
|
||||
(GtkDestroyNotify) gtk_widget_unref);
|
||||
gtk_widget_show (opening_balance_box);
|
||||
gtk_box_pack_start (GTK_BOX (vbox115), opening_balance_box, TRUE, TRUE, 0);
|
||||
|
||||
opening_balance_date_box = gtk_hbox_new (FALSE, 0);
|
||||
gtk_widget_ref (opening_balance_date_box);
|
||||
gtk_object_set_data_full (GTK_OBJECT (Account_Dialog), "opening_balance_date_box", opening_balance_date_box,
|
||||
(GtkDestroyNotify) gtk_widget_unref);
|
||||
gtk_widget_show (opening_balance_date_box);
|
||||
gtk_box_pack_start (GTK_BOX (vbox115), opening_balance_date_box, TRUE, TRUE, 0);
|
||||
|
||||
price_quote_frame = gtk_frame_new (_("Price Quote Source"));
|
||||
gtk_widget_ref (price_quote_frame);
|
||||
gtk_object_set_data_full (GTK_OBJECT (Account_Dialog), "price_quote_frame", price_quote_frame,
|
||||
@@ -3764,6 +3723,141 @@ create_Account_Dialog (void)
|
||||
gtk_box_pack_start (GTK_BOX (vbox75), tax_related_button, FALSE, FALSE, 0);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (tax_related_button), 3);
|
||||
|
||||
label8477388 = gtk_label_new (_("General Information"));
|
||||
gtk_widget_ref (label8477388);
|
||||
gtk_object_set_data_full (GTK_OBJECT (Account_Dialog), "label8477388", label8477388,
|
||||
(GtkDestroyNotify) gtk_widget_unref);
|
||||
gtk_widget_show (label8477388);
|
||||
gtk_notebook_set_tab_label (GTK_NOTEBOOK (account_notebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (account_notebook), 0), label8477388);
|
||||
|
||||
vbox118 = gtk_vbox_new (FALSE, 0);
|
||||
gtk_widget_ref (vbox118);
|
||||
gtk_object_set_data_full (GTK_OBJECT (Account_Dialog), "vbox118", vbox118,
|
||||
(GtkDestroyNotify) gtk_widget_unref);
|
||||
gtk_widget_show (vbox118);
|
||||
gtk_container_add (GTK_CONTAINER (account_notebook), vbox118);
|
||||
|
||||
opening_balance_frame = gtk_frame_new (_("Balance Information"));
|
||||
gtk_widget_ref (opening_balance_frame);
|
||||
gtk_object_set_data_full (GTK_OBJECT (Account_Dialog), "opening_balance_frame", opening_balance_frame,
|
||||
(GtkDestroyNotify) gtk_widget_unref);
|
||||
gtk_widget_show (opening_balance_frame);
|
||||
gtk_box_pack_start (GTK_BOX (vbox118), opening_balance_frame, FALSE, FALSE, 0);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (opening_balance_frame), 3);
|
||||
|
||||
hbox101 = gtk_hbox_new (FALSE, 2);
|
||||
gtk_widget_ref (hbox101);
|
||||
gtk_object_set_data_full (GTK_OBJECT (Account_Dialog), "hbox101", hbox101,
|
||||
(GtkDestroyNotify) gtk_widget_unref);
|
||||
gtk_widget_show (hbox101);
|
||||
gtk_container_add (GTK_CONTAINER (opening_balance_frame), hbox101);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (hbox101), 3);
|
||||
|
||||
vbox114 = gtk_vbox_new (TRUE, 0);
|
||||
gtk_widget_ref (vbox114);
|
||||
gtk_object_set_data_full (GTK_OBJECT (Account_Dialog), "vbox114", vbox114,
|
||||
(GtkDestroyNotify) gtk_widget_unref);
|
||||
gtk_widget_show (vbox114);
|
||||
gtk_box_pack_start (GTK_BOX (hbox101), vbox114, FALSE, FALSE, 0);
|
||||
|
||||
label847737 = gtk_label_new (_("Balance:"));
|
||||
gtk_widget_ref (label847737);
|
||||
gtk_object_set_data_full (GTK_OBJECT (Account_Dialog), "label847737", label847737,
|
||||
(GtkDestroyNotify) gtk_widget_unref);
|
||||
gtk_widget_show (label847737);
|
||||
gtk_box_pack_start (GTK_BOX (vbox114), label847737, FALSE, FALSE, 0);
|
||||
gtk_label_set_justify (GTK_LABEL (label847737), GTK_JUSTIFY_RIGHT);
|
||||
gtk_misc_set_alignment (GTK_MISC (label847737), 1, 0.5);
|
||||
|
||||
label847738 = gtk_label_new (_("Date:"));
|
||||
gtk_widget_ref (label847738);
|
||||
gtk_object_set_data_full (GTK_OBJECT (Account_Dialog), "label847738", label847738,
|
||||
(GtkDestroyNotify) gtk_widget_unref);
|
||||
gtk_widget_show (label847738);
|
||||
gtk_box_pack_start (GTK_BOX (vbox114), label847738, FALSE, FALSE, 0);
|
||||
gtk_label_set_justify (GTK_LABEL (label847738), GTK_JUSTIFY_RIGHT);
|
||||
gtk_misc_set_alignment (GTK_MISC (label847738), 1, 0.5);
|
||||
|
||||
vbox115 = gtk_vbox_new (TRUE, 0);
|
||||
gtk_widget_ref (vbox115);
|
||||
gtk_object_set_data_full (GTK_OBJECT (Account_Dialog), "vbox115", vbox115,
|
||||
(GtkDestroyNotify) gtk_widget_unref);
|
||||
gtk_widget_show (vbox115);
|
||||
gtk_box_pack_start (GTK_BOX (hbox101), vbox115, TRUE, TRUE, 0);
|
||||
|
||||
opening_balance_box = gtk_hbox_new (FALSE, 0);
|
||||
gtk_widget_ref (opening_balance_box);
|
||||
gtk_object_set_data_full (GTK_OBJECT (Account_Dialog), "opening_balance_box", opening_balance_box,
|
||||
(GtkDestroyNotify) gtk_widget_unref);
|
||||
gtk_widget_show (opening_balance_box);
|
||||
gtk_box_pack_start (GTK_BOX (vbox115), opening_balance_box, TRUE, TRUE, 0);
|
||||
|
||||
opening_balance_date_box = gtk_hbox_new (FALSE, 0);
|
||||
gtk_widget_ref (opening_balance_date_box);
|
||||
gtk_object_set_data_full (GTK_OBJECT (Account_Dialog), "opening_balance_date_box", opening_balance_date_box,
|
||||
(GtkDestroyNotify) gtk_widget_unref);
|
||||
gtk_widget_show (opening_balance_date_box);
|
||||
gtk_box_pack_start (GTK_BOX (vbox115), opening_balance_date_box, TRUE, TRUE, 0);
|
||||
|
||||
frame49 = gtk_frame_new (_("Transfer Type"));
|
||||
gtk_widget_ref (frame49);
|
||||
gtk_object_set_data_full (GTK_OBJECT (Account_Dialog), "frame49", frame49,
|
||||
(GtkDestroyNotify) gtk_widget_unref);
|
||||
gtk_widget_show (frame49);
|
||||
gtk_box_pack_start (GTK_BOX (vbox118), frame49, FALSE, FALSE, 0);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (frame49), 3);
|
||||
|
||||
vbox120 = gtk_vbox_new (FALSE, 0);
|
||||
gtk_widget_ref (vbox120);
|
||||
gtk_object_set_data_full (GTK_OBJECT (Account_Dialog), "vbox120", vbox120,
|
||||
(GtkDestroyNotify) gtk_widget_unref);
|
||||
gtk_widget_show (vbox120);
|
||||
gtk_container_add (GTK_CONTAINER (frame49), vbox120);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox120), 3);
|
||||
|
||||
opening_equity_radio = gtk_radio_button_new_with_label (vbox120_group, _("Use Opening Balances Equity account"));
|
||||
vbox120_group = gtk_radio_button_group (GTK_RADIO_BUTTON (opening_equity_radio));
|
||||
gtk_widget_ref (opening_equity_radio);
|
||||
gtk_object_set_data_full (GTK_OBJECT (Account_Dialog), "opening_equity_radio", opening_equity_radio,
|
||||
(GtkDestroyNotify) gtk_widget_unref);
|
||||
gtk_widget_show (opening_equity_radio);
|
||||
gtk_box_pack_start (GTK_BOX (vbox120), opening_equity_radio, FALSE, FALSE, 0);
|
||||
gtk_tooltips_set_tip (tooltips, opening_equity_radio, _("Use an Equity account to transfer the opening balance. The Equity account will be created if it doesn't exist already."), NULL);
|
||||
|
||||
radiobutton8 = gtk_radio_button_new_with_label (vbox120_group, _("Select Transfer Account"));
|
||||
vbox120_group = gtk_radio_button_group (GTK_RADIO_BUTTON (radiobutton8));
|
||||
gtk_widget_ref (radiobutton8);
|
||||
gtk_object_set_data_full (GTK_OBJECT (Account_Dialog), "radiobutton8", radiobutton8,
|
||||
(GtkDestroyNotify) gtk_widget_unref);
|
||||
gtk_widget_show (radiobutton8);
|
||||
gtk_box_pack_start (GTK_BOX (vbox120), radiobutton8, FALSE, FALSE, 0);
|
||||
gtk_tooltips_set_tip (tooltips, radiobutton8, _("Use the account select below to transfer the opening balance."), NULL);
|
||||
|
||||
transfer_account_frame = gtk_frame_new (_("Transfer Account"));
|
||||
gtk_widget_ref (transfer_account_frame);
|
||||
gtk_object_set_data_full (GTK_OBJECT (Account_Dialog), "transfer_account_frame", transfer_account_frame,
|
||||
(GtkDestroyNotify) gtk_widget_unref);
|
||||
gtk_widget_show (transfer_account_frame);
|
||||
gtk_box_pack_start (GTK_BOX (vbox118), transfer_account_frame, TRUE, TRUE, 0);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (transfer_account_frame), 3);
|
||||
gtk_widget_set_sensitive (transfer_account_frame, FALSE);
|
||||
|
||||
transfer_account_scroll = gtk_scrolled_window_new (NULL, NULL);
|
||||
gtk_widget_ref (transfer_account_scroll);
|
||||
gtk_object_set_data_full (GTK_OBJECT (Account_Dialog), "transfer_account_scroll", transfer_account_scroll,
|
||||
(GtkDestroyNotify) gtk_widget_unref);
|
||||
gtk_widget_show (transfer_account_scroll);
|
||||
gtk_container_add (GTK_CONTAINER (transfer_account_frame), transfer_account_scroll);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (transfer_account_scroll), 3);
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (transfer_account_scroll), GTK_POLICY_NEVER, GTK_POLICY_ALWAYS);
|
||||
|
||||
label847739 = gtk_label_new (_("Opening Balance"));
|
||||
gtk_widget_ref (label847739);
|
||||
gtk_object_set_data_full (GTK_OBJECT (Account_Dialog), "label847739", label847739,
|
||||
(GtkDestroyNotify) gtk_widget_unref);
|
||||
gtk_widget_show (label847739);
|
||||
gtk_notebook_set_tab_label (GTK_NOTEBOOK (account_notebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (account_notebook), 1), label847739);
|
||||
|
||||
dialog_action_area12 = GNOME_DIALOG (Account_Dialog)->action_area;
|
||||
gtk_object_set_data (GTK_OBJECT (Account_Dialog), "dialog_action_area12", dialog_action_area12);
|
||||
gtk_widget_show (dialog_action_area12);
|
||||
@@ -3794,6 +3888,8 @@ create_Account_Dialog (void)
|
||||
gtk_widget_show (button72);
|
||||
GTK_WIDGET_SET_FLAGS (button72, GTK_CAN_DEFAULT);
|
||||
|
||||
gtk_object_set_data (GTK_OBJECT (Account_Dialog), "tooltips", tooltips);
|
||||
|
||||
return Account_Dialog;
|
||||
}
|
||||
|
||||
@@ -5805,7 +5901,7 @@ create_Tax_Information_Dialog (void)
|
||||
GtkWidget *txf_category_clist;
|
||||
GtkWidget *label847734;
|
||||
GtkWidget *label847735;
|
||||
GtkWidget *scrolledwindow19;
|
||||
GtkWidget *help_scroll;
|
||||
GtkWidget *txf_help_text;
|
||||
GtkWidget *payer_name_source_frame;
|
||||
GtkWidget *vbox97;
|
||||
@@ -5963,7 +6059,7 @@ create_Tax_Information_Dialog (void)
|
||||
(GtkDestroyNotify) gtk_widget_unref);
|
||||
gtk_widget_show (scrolledwindow28);
|
||||
gtk_box_pack_start (GTK_BOX (vbox113), scrolledwindow28, TRUE, TRUE, 0);
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow28), GTK_POLICY_NEVER, GTK_POLICY_ALWAYS);
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow28), GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS);
|
||||
|
||||
txf_category_clist = gtk_clist_new (2);
|
||||
gtk_widget_ref (txf_category_clist);
|
||||
@@ -5973,6 +6069,7 @@ create_Tax_Information_Dialog (void)
|
||||
gtk_container_add (GTK_CONTAINER (scrolledwindow28), txf_category_clist);
|
||||
gtk_clist_set_column_width (GTK_CLIST (txf_category_clist), 0, 80);
|
||||
gtk_clist_set_column_width (GTK_CLIST (txf_category_clist), 1, 80);
|
||||
gtk_clist_set_selection_mode (GTK_CLIST (txf_category_clist), GTK_SELECTION_BROWSE);
|
||||
gtk_clist_column_titles_show (GTK_CLIST (txf_category_clist));
|
||||
|
||||
label847734 = gtk_label_new (_("Form"));
|
||||
@@ -5989,20 +6086,20 @@ create_Tax_Information_Dialog (void)
|
||||
gtk_widget_show (label847735);
|
||||
gtk_clist_set_column_widget (GTK_CLIST (txf_category_clist), 1, label847735);
|
||||
|
||||
scrolledwindow19 = gtk_scrolled_window_new (NULL, NULL);
|
||||
gtk_widget_ref (scrolledwindow19);
|
||||
gtk_object_set_data_full (GTK_OBJECT (Tax_Information_Dialog), "scrolledwindow19", scrolledwindow19,
|
||||
help_scroll = gtk_scrolled_window_new (NULL, NULL);
|
||||
gtk_widget_ref (help_scroll);
|
||||
gtk_object_set_data_full (GTK_OBJECT (Tax_Information_Dialog), "help_scroll", help_scroll,
|
||||
(GtkDestroyNotify) gtk_widget_unref);
|
||||
gtk_widget_show (scrolledwindow19);
|
||||
gtk_box_pack_start (GTK_BOX (vbox113), scrolledwindow19, TRUE, TRUE, 0);
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow19), GTK_POLICY_NEVER, GTK_POLICY_ALWAYS);
|
||||
gtk_widget_show (help_scroll);
|
||||
gtk_box_pack_start (GTK_BOX (vbox113), help_scroll, FALSE, FALSE, 0);
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (help_scroll), GTK_POLICY_NEVER, GTK_POLICY_ALWAYS);
|
||||
|
||||
txf_help_text = gtk_text_new (NULL, NULL);
|
||||
gtk_widget_ref (txf_help_text);
|
||||
gtk_object_set_data_full (GTK_OBJECT (Tax_Information_Dialog), "txf_help_text", txf_help_text,
|
||||
(GtkDestroyNotify) gtk_widget_unref);
|
||||
gtk_widget_show (txf_help_text);
|
||||
gtk_container_add (GTK_CONTAINER (scrolledwindow19), txf_help_text);
|
||||
gtk_container_add (GTK_CONTAINER (help_scroll), txf_help_text);
|
||||
|
||||
payer_name_source_frame = gtk_frame_new (_("Payer Name Source"));
|
||||
gtk_widget_ref (payer_name_source_frame);
|
||||
|
||||
+647
-519
File diff suppressed because it is too large
Load Diff
@@ -1783,6 +1783,8 @@ gnc_register_enter (RegWindow *regData, gboolean next_transaction)
|
||||
/* Now move. */
|
||||
if (goto_blank)
|
||||
gnc_register_jump_to_blank (regData);
|
||||
else if (next_transaction)
|
||||
gnucash_register_goto_next_trans_row (regData->reg);
|
||||
else
|
||||
gnucash_register_goto_next_virt_row (regData->reg);
|
||||
}
|
||||
|
||||
@@ -1738,11 +1738,12 @@ gnucash_register_goto_next_virt_row (GnucashRegister *reg)
|
||||
GnucashSheet *sheet;
|
||||
VirtualLocation virt_loc;
|
||||
|
||||
g_return_if_fail(GNUCASH_IS_REGISTER(reg));
|
||||
g_return_if_fail (reg != NULL);
|
||||
g_return_if_fail (GNUCASH_IS_REGISTER(reg));
|
||||
|
||||
sheet = GNUCASH_SHEET(reg->sheet);
|
||||
|
||||
gnucash_cursor_get_virt(GNUCASH_CURSOR(sheet->cursor), &virt_loc);
|
||||
gnucash_cursor_get_virt (GNUCASH_CURSOR(sheet->cursor), &virt_loc);
|
||||
|
||||
gnc_table_move_vertical_position (sheet->table, &virt_loc, 1);
|
||||
if (virt_loc.vcell_loc.virt_row >= sheet->num_virt_rows)
|
||||
@@ -1751,9 +1752,45 @@ gnucash_register_goto_next_virt_row (GnucashRegister *reg)
|
||||
virt_loc.phys_row_offset = 0;
|
||||
virt_loc.phys_col_offset = 0;
|
||||
|
||||
gnucash_sheet_goto_virt_loc(sheet, virt_loc);
|
||||
gnucash_sheet_goto_virt_loc (sheet, virt_loc);
|
||||
}
|
||||
|
||||
void
|
||||
gnucash_register_goto_next_trans_row (GnucashRegister *reg)
|
||||
{
|
||||
GnucashSheet *sheet;
|
||||
SheetBlockStyle *style;
|
||||
VirtualLocation virt_loc;
|
||||
CursorClass cursor_class;
|
||||
|
||||
g_return_if_fail (reg != NULL);
|
||||
g_return_if_fail (GNUCASH_IS_REGISTER(reg));
|
||||
|
||||
sheet = GNUCASH_SHEET(reg->sheet);
|
||||
|
||||
gnucash_cursor_get_virt (GNUCASH_CURSOR(sheet->cursor), &virt_loc);
|
||||
|
||||
do
|
||||
{
|
||||
gnc_table_move_vertical_position (sheet->table, &virt_loc, 1);
|
||||
if (virt_loc.vcell_loc.virt_row >= sheet->num_virt_rows)
|
||||
return;
|
||||
|
||||
style = gnucash_sheet_get_style (sheet, virt_loc.vcell_loc);
|
||||
if (!style)
|
||||
return;
|
||||
|
||||
cursor_class = xaccCursorTypeToClass (style->cursor_type);
|
||||
} while (cursor_class == CURSOR_CLASS_SPLIT);
|
||||
|
||||
if (cursor_class != CURSOR_CLASS_TRANS)
|
||||
return;
|
||||
|
||||
virt_loc.phys_row_offset = 0;
|
||||
virt_loc.phys_col_offset = 0;
|
||||
|
||||
gnucash_sheet_goto_virt_loc (sheet, virt_loc);
|
||||
}
|
||||
|
||||
SheetBlock *
|
||||
gnucash_sheet_get_block (GnucashSheet *sheet, VirtualCellLocation vcell_loc)
|
||||
|
||||
@@ -186,6 +186,8 @@ void gnucash_register_goto_virt_loc (GnucashRegister *reg,
|
||||
|
||||
void gnucash_register_goto_next_virt_row (GnucashRegister *reg);
|
||||
|
||||
void gnucash_register_goto_next_trans_row (GnucashRegister *reg);
|
||||
|
||||
void gnucash_register_attach_popup(GnucashRegister *reg, GtkWidget *popup,
|
||||
gpointer data);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user