mirror of
https://github.com/Gnucash/gnucash.git
synced 2024-11-25 10:20:18 -06:00
Reverting r18428 as per multiple user requests. This patch needs some more work.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18655 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
f03c101929
commit
87af0d8007
@ -121,7 +121,6 @@ gnc_split_register_set_cells (SplitRegister *reg, TableLayout *layout)
|
||||
|
||||
copy_cursor_row (layout, curs, curs_last, 0);
|
||||
|
||||
gnc_table_layout_set_cell (layout, curs, DTRANS_CELL, 1, 0);
|
||||
gnc_table_layout_set_cell (layout, curs, ACTN_CELL, 1, 1);
|
||||
gnc_table_layout_set_cell (layout, curs, NOTES_CELL, 1, 2);
|
||||
gnc_table_layout_set_cell (layout, curs, VNOTES_CELL, 1, 3);
|
||||
@ -143,7 +142,6 @@ gnc_split_register_set_cells (SplitRegister *reg, TableLayout *layout)
|
||||
|
||||
copy_cursor_row (layout, curs, curs_last, 0);
|
||||
|
||||
gnc_table_layout_set_cell (layout, curs, DTRANS_CELL, 1, 0);
|
||||
gnc_table_layout_set_cell (layout, curs, NOTES_CELL, 1, 2);
|
||||
gnc_table_layout_set_cell (layout, curs, VNOTES_CELL, 1, 3);
|
||||
|
||||
@ -535,14 +533,6 @@ gnc_split_register_layout_add_cells (SplitRegister *reg,
|
||||
FALSE,
|
||||
FALSE);
|
||||
|
||||
gnc_register_add_cell (layout,
|
||||
DTRANS_CELL,
|
||||
DATE_CELL_TYPE_NAME,
|
||||
N_("sample:12/12/2000") + 7,
|
||||
CELL_ALIGN_RIGHT,
|
||||
FALSE,
|
||||
FALSE);
|
||||
|
||||
gnc_register_add_cell (layout,
|
||||
NUM_CELL,
|
||||
NUM_CELL_TYPE_NAME,
|
||||
|
@ -110,31 +110,6 @@ gnc_split_register_save_due_date_cell (BasicCell * cell,
|
||||
xaccTransSetDateDueTS (sd->trans, &ts);
|
||||
}
|
||||
|
||||
static void
|
||||
gnc_split_register_save_trans_date_cell (BasicCell * cell,
|
||||
gpointer save_data,
|
||||
gpointer user_data)
|
||||
{
|
||||
SRSaveData *sd = save_data;
|
||||
const char *value;
|
||||
Timespec ts;
|
||||
|
||||
|
||||
g_return_if_fail (gnc_basic_cell_has_name (cell, DTRANS_CELL));
|
||||
|
||||
value = gnc_basic_cell_get_value (cell);
|
||||
|
||||
/* commit any pending changes */
|
||||
gnc_date_cell_commit ((DateCell *) cell);
|
||||
|
||||
|
||||
DEBUG ("TRANSACTION: %s", value ? value : "(null)");
|
||||
|
||||
gnc_date_cell_get_date ((DateCell *) cell, &ts);
|
||||
|
||||
xaccTransSetDateEnteredTS (sd->trans, &ts);
|
||||
}
|
||||
|
||||
static void
|
||||
gnc_split_register_save_num_cell (BasicCell * cell,
|
||||
gpointer save_data,
|
||||
@ -771,11 +746,6 @@ gnc_split_register_model_add_save_handlers (TableModel *model)
|
||||
gnc_split_register_save_due_date_cell,
|
||||
DDUE_CELL);
|
||||
|
||||
|
||||
gnc_table_model_set_save_handler (model,
|
||||
gnc_split_register_save_trans_date_cell,
|
||||
DTRANS_CELL);
|
||||
|
||||
gnc_table_model_set_save_handler (model,
|
||||
gnc_split_register_save_type_cell,
|
||||
TYPE_CELL);
|
||||
@ -850,12 +820,6 @@ gnc_template_register_model_add_save_handlers (TableModel *model)
|
||||
gnc_template_register_save_unexpected_cell,
|
||||
DDUE_CELL);
|
||||
|
||||
|
||||
gnc_table_model_set_save_handler (model,
|
||||
gnc_template_register_save_unexpected_cell,
|
||||
DTRANS_CELL);
|
||||
|
||||
|
||||
gnc_table_model_set_save_handler (model,
|
||||
gnc_template_register_save_xfrm_cell,
|
||||
XFRM_CELL);
|
||||
|
@ -192,13 +192,6 @@ gnc_split_register_get_due_date_label (VirtualLocation virt_loc,
|
||||
return _("Due Date");
|
||||
}
|
||||
|
||||
static const char *
|
||||
gnc_split_register_get_trans_date_label (VirtualLocation virt_loc,
|
||||
gpointer user_data)
|
||||
{
|
||||
return _("Transaction");
|
||||
}
|
||||
|
||||
static const char *
|
||||
gnc_split_register_get_num_label (VirtualLocation virt_loc,
|
||||
gpointer user_data)
|
||||
@ -837,51 +830,10 @@ gnc_split_register_get_due_date_entry (VirtualLocation virt_loc,
|
||||
|
||||
xaccTransGetDateDueTS (trans, &ts);
|
||||
//PWARN ("returning valid due_date entry");
|
||||
|
||||
|
||||
return gnc_print_date (ts);
|
||||
}
|
||||
|
||||
|
||||
static const char *
|
||||
gnc_split_register_get_trans_date_entry (VirtualLocation virt_loc,
|
||||
gboolean translate,
|
||||
gboolean *conditionally_changed,
|
||||
gpointer user_data)
|
||||
{
|
||||
SplitRegister *reg = user_data;
|
||||
Transaction *trans;
|
||||
Split *split;
|
||||
Timespec ts;
|
||||
|
||||
split = gnc_split_register_get_split (reg, virt_loc.vcell_loc);
|
||||
trans = xaccSplitGetParent (split);
|
||||
if (!trans) {
|
||||
//PWARN ("No transaction in transaction_date entry");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
xaccTransGetDateEnteredTS (trans, &ts);
|
||||
//PWARN ("returning valid transaction_date entry");
|
||||
|
||||
return gnc_print_date (ts);
|
||||
}
|
||||
|
||||
|
||||
static char *
|
||||
gnc_split_register_get_trans_date_help (VirtualLocation virt_loc,
|
||||
gpointer user_data)
|
||||
{
|
||||
SplitRegister *reg = user_data;
|
||||
const char *help;
|
||||
|
||||
help = gnc_table_get_entry (reg->table, virt_loc);
|
||||
if (!help || *help == '\0')
|
||||
help = _("Enter the transaction date");
|
||||
|
||||
return g_strdup (help);
|
||||
}
|
||||
|
||||
|
||||
static const char *
|
||||
gnc_split_register_get_date_entry (VirtualLocation virt_loc,
|
||||
gboolean translate,
|
||||
@ -2206,10 +2158,6 @@ gnc_split_register_model_new (void)
|
||||
gnc_split_register_get_date_entry,
|
||||
DATE_CELL);
|
||||
|
||||
gnc_table_model_set_entry_handler (model,
|
||||
gnc_split_register_get_trans_date_entry,
|
||||
DTRANS_CELL);
|
||||
|
||||
gnc_table_model_set_entry_handler (model,
|
||||
gnc_split_register_get_due_date_entry,
|
||||
DDUE_CELL);
|
||||
@ -2303,10 +2251,6 @@ gnc_split_register_model_new (void)
|
||||
gnc_split_register_get_date_label,
|
||||
DATE_CELL);
|
||||
|
||||
gnc_table_model_set_label_handler (model,
|
||||
gnc_split_register_get_trans_date_label,
|
||||
DTRANS_CELL);
|
||||
|
||||
gnc_table_model_set_label_handler (model,
|
||||
gnc_split_register_get_due_date_label,
|
||||
DDUE_CELL);
|
||||
@ -2403,10 +2347,6 @@ gnc_split_register_model_new (void)
|
||||
gnc_split_register_get_date_help,
|
||||
DATE_CELL);
|
||||
|
||||
gnc_table_model_set_help_handler (model,
|
||||
gnc_split_register_get_trans_date_help,
|
||||
DTRANS_CELL);
|
||||
|
||||
gnc_table_model_set_help_handler (model,
|
||||
gnc_split_register_get_date_help,
|
||||
DDUE_CELL);
|
||||
@ -2463,10 +2403,6 @@ gnc_split_register_model_new (void)
|
||||
gnc_table_model_set_io_flags_handler(
|
||||
model, gnc_split_register_get_standard_io_flags, DATE_CELL);
|
||||
|
||||
gnc_table_model_set_io_flags_handler(
|
||||
model, gnc_split_register_get_standard_io_flags, DTRANS_CELL);
|
||||
|
||||
|
||||
/* FIXME: We really only need a due date for 'invoices', not for
|
||||
* 'payments' or 'receipts'. This implies we really only need the
|
||||
* due-date for transactions that credit the ACCT_TYPE_RECEIVABLE or
|
||||
@ -2588,18 +2524,12 @@ gnc_template_register_model_new (void)
|
||||
gnc_table_model_set_entry_handler(
|
||||
model, gnc_split_register_get_inactive_date_entry, DATE_CELL );
|
||||
|
||||
gnc_table_model_set_entry_handler(
|
||||
model, gnc_split_register_get_inactive_date_entry, DTRANS_CELL );
|
||||
|
||||
gnc_table_model_set_entry_handler(
|
||||
model, gnc_split_register_get_inactive_date_entry, DDUE_CELL );
|
||||
|
||||
gnc_table_model_set_io_flags_handler(
|
||||
model, gnc_split_register_get_inactive_io_flags, DATE_CELL );
|
||||
|
||||
gnc_table_model_set_io_flags_handler(
|
||||
model, gnc_split_register_get_inactive_io_flags, DTRANS_CELL );
|
||||
|
||||
gnc_table_model_set_io_flags_handler(
|
||||
model, gnc_split_register_get_inactive_io_flags, DDUE_CELL );
|
||||
|
||||
|
@ -191,7 +191,6 @@ typedef enum
|
||||
#define CRED_CELL "credit"
|
||||
#define DATE_CELL "date"
|
||||
#define DDUE_CELL "date-due"
|
||||
#define DTRANS_CELL "transaction-date"
|
||||
#define DEBT_CELL "debit"
|
||||
#define DESC_CELL "description"
|
||||
#define FCRED_CELL "credit-formula"
|
||||
|
Loading…
Reference in New Issue
Block a user