mirror of
https://github.com/Gnucash/gnucash.git
synced 2026-07-29 23:58:03 -05:00
2001-10-24 Joshua Sled <jsled@asynchronous.org>
* src/gnome/dialog-scheduledxaction.c (sxed_delete_event): Added. (gnc_ui_scheduled_xaction_editor_dialog_create): Added support for delete-event [WM window close]. (sxed_check_close): Added close-check, including register check. (editor_cancel_button_clicked): Renamed from editor_close_button_clicked; correctly handles a cancel WRT ledger changes. * src/gnome/glade/sched-xact.glade: Added as-yet-unused Start Date widgets to make-from-transaction dialog. * src/gnome/dialog-sx-from-trans.c (sxftd_add_template_trans): Use the user-friendly amount formating instead of a stringified gnc_numeric. Copies the account data over into the template transaction. (sxftd_init): Added; supports using the Description of the transaction as the initial name of the SX. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@5715 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
@@ -1,3 +1,23 @@
|
|||||||
|
2001-10-24 Joshua Sled <jsled@asynchronous.org>
|
||||||
|
|
||||||
|
* src/gnome/dialog-scheduledxaction.c (sxed_delete_event): Added.
|
||||||
|
(gnc_ui_scheduled_xaction_editor_dialog_create): Added support for
|
||||||
|
delete-event [WM window close].
|
||||||
|
(sxed_check_close): Added close-check, including register check.
|
||||||
|
(editor_cancel_button_clicked): Renamed from
|
||||||
|
editor_close_button_clicked; correctly handles a cancel WRT ledger
|
||||||
|
changes.
|
||||||
|
|
||||||
|
* src/gnome/glade/sched-xact.glade: Added as-yet-unused Start
|
||||||
|
Date widgets to make-from-transaction dialog.
|
||||||
|
|
||||||
|
* src/gnome/dialog-sx-from-trans.c (sxftd_add_template_trans): Use
|
||||||
|
the user-friendly amount formating instead of a stringified
|
||||||
|
gnc_numeric. Copies the account data over into the template
|
||||||
|
transaction.
|
||||||
|
(sxftd_init): Added; supports using the Description of the
|
||||||
|
transaction as the initial name of the SX.
|
||||||
|
|
||||||
2001-10-22 Joshua Sled <jsled@asynchronous.org>
|
2001-10-22 Joshua Sled <jsled@asynchronous.org>
|
||||||
|
|
||||||
* src/engine/SchedXaction.c (xaccSchedXactionInit): Fixed
|
* src/engine/SchedXaction.c (xaccSchedXactionInit): Fixed
|
||||||
|
|||||||
@@ -35,11 +35,26 @@ X create a template register
|
|||||||
|
|
||||||
? Hook into 'book data changed' save-on-exit decision
|
? Hook into 'book data changed' save-on-exit decision
|
||||||
|
|
||||||
. add a big calendar [gnome-pim? evo?] to SXaction List/overview
|
. SX list
|
||||||
|
. add a big calendar [gnome-pim? evo?] to SXaction List/overview
|
||||||
|
|
||||||
. match existing transactions for long-time users
|
. SX editor
|
||||||
. based off template-transaction data, some big existing-transaction
|
. 'Cancel' button should auto-cancel ledger changes
|
||||||
scanning code.
|
|
||||||
|
. make-from-transaction
|
||||||
|
X credit/debit pull-over issues
|
||||||
|
X need to remove '-' from printed credit value.
|
||||||
|
X pull accounts over.
|
||||||
|
X pull initial SX name from the Transaction name?
|
||||||
|
. need start-date on Make dialog
|
||||||
|
. [initially starts as the next occurance after the created-from SX,
|
||||||
|
which may not be the Right Thing]
|
||||||
|
. better frequency guess?
|
||||||
|
. non-trivial problem
|
||||||
|
[related...]
|
||||||
|
. match existing transactions for long-time users
|
||||||
|
. based off template-transaction data, some big existing-transaction
|
||||||
|
scanning code.
|
||||||
|
|
||||||
. need "since-last-run" UI for instanatiation.
|
. need "since-last-run" UI for instanatiation.
|
||||||
X Change from dialogs to druid
|
X Change from dialogs to druid
|
||||||
@@ -81,6 +96,7 @@ X create a template register
|
|||||||
. Context menus/sensitive toolbar button/menu item for creation of
|
. Context menus/sensitive toolbar button/menu item for creation of
|
||||||
not-yet-created transactions.
|
not-yet-created transactions.
|
||||||
. The ability to turn a non-recurring transaction into a recurring one...
|
. The ability to turn a non-recurring transaction into a recurring one...
|
||||||
|
X [see from-trans section]
|
||||||
. inactive cells
|
. inactive cells
|
||||||
X date
|
X date
|
||||||
. recn?
|
. recn?
|
||||||
@@ -98,6 +114,8 @@ X create a template register
|
|||||||
. PostgreSQL
|
. PostgreSQL
|
||||||
. others?
|
. others?
|
||||||
|
|
||||||
|
---------------
|
||||||
|
|
||||||
. SX Creation...
|
. SX Creation...
|
||||||
. Creation occurs due to a variety of circumstances:
|
. Creation occurs due to a variety of circumstances:
|
||||||
X GnuCash starts and hasn't been run in some length of time; the
|
X GnuCash starts and hasn't been run in some length of time; the
|
||||||
|
|||||||
@@ -51,6 +51,8 @@ static short module = MOD_SX;
|
|||||||
#define DIALOG_SCHEDXACTION_CM_CLASS "dialog-scheduledtransactions"
|
#define DIALOG_SCHEDXACTION_CM_CLASS "dialog-scheduledtransactions"
|
||||||
#define DIALOG_SCHEDXACTION_EDITOR_CM_CLASS "dialog-scheduledtransaction-editor"
|
#define DIALOG_SCHEDXACTION_EDITOR_CM_CLASS "dialog-scheduledtransaction-editor"
|
||||||
|
|
||||||
|
#define SX_LIST_GLADE_NAME "Scheduled Transaction List"
|
||||||
|
#define SX_EDITOR_GLADE_NAME "Scheduled Transaction Editor"
|
||||||
#define SX_OPT_STR "Scheduled Transactions"
|
#define SX_OPT_STR "Scheduled Transactions"
|
||||||
#define AUTOCREATE_OPT "autocreate_opt"
|
#define AUTOCREATE_OPT "autocreate_opt"
|
||||||
#define NOTIFY_OPT "notify_opt"
|
#define NOTIFY_OPT "notify_opt"
|
||||||
@@ -183,14 +185,20 @@ close_button_clicked( GtkButton *b, gpointer d )
|
|||||||
sxd_close_handler( d );
|
sxd_close_handler( d );
|
||||||
}
|
}
|
||||||
|
|
||||||
static
|
static void
|
||||||
void
|
editor_cancel_button_clicked( GtkButton *b, SchedXactionEditorDialog *sxed )
|
||||||
editor_close_button_clicked( GtkButton *b, SchedXactionEditorDialog *sxed )
|
|
||||||
{
|
{
|
||||||
gnc_close_gui_component_by_data( DIALOG_SCHEDXACTION_EDITOR_CM_CLASS,
|
SplitRegister *reg;
|
||||||
sxed );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
reg = gnc_ledger_display_get_split_register( sxed->ledger );
|
||||||
|
/* cancel ledger changes */
|
||||||
|
gnc_split_register_cancel_cursor_trans_changes( reg );
|
||||||
|
/* FIXME: cancel other changes */
|
||||||
|
|
||||||
|
/* close */
|
||||||
|
gnc_close_gui_component_by_data (DIALOG_SCHEDXACTION_EDITOR_CM_CLASS,
|
||||||
|
sxed);
|
||||||
|
}
|
||||||
|
|
||||||
static
|
static
|
||||||
void
|
void
|
||||||
@@ -354,14 +362,18 @@ scheduledxaction_editor_dialog_destroy(GtkObject *object, gpointer data)
|
|||||||
{
|
{
|
||||||
SchedXactionEditorDialog *sxed = data;
|
SchedXactionEditorDialog *sxed = data;
|
||||||
|
|
||||||
|
DEBUG( "editor_dialog_destroy" );
|
||||||
|
|
||||||
if (sxed == NULL)
|
if (sxed == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
#if 0
|
||||||
if ( sxed->ledger ) {
|
if ( sxed->ledger ) {
|
||||||
sxed_close_handler( sxed );
|
sxed_close_handler( sxed );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
#endif /* 0 */
|
||||||
|
DEBUG( "foo" );
|
||||||
gnc_unregister_gui_component_by_data
|
gnc_unregister_gui_component_by_data
|
||||||
(DIALOG_SCHEDXACTION_EDITOR_CM_CLASS, sxed);
|
(DIALOG_SCHEDXACTION_EDITOR_CM_CLASS, sxed);
|
||||||
|
|
||||||
@@ -394,10 +406,8 @@ gnc_ui_scheduled_xaction_dialog_create(void)
|
|||||||
sxd = g_new0( SchedXactionDialog, 1 );
|
sxd = g_new0( SchedXactionDialog, 1 );
|
||||||
|
|
||||||
/* sxd->dialog = create_Scheduled_Transaction_List(); */
|
/* sxd->dialog = create_Scheduled_Transaction_List(); */
|
||||||
sxd->gxml = gnc_glade_xml_new( "sched-xact.glade",
|
sxd->gxml = gnc_glade_xml_new( "sched-xact.glade", SX_LIST_GLADE_NAME );
|
||||||
"Scheduled Transaction List" );
|
sxd->dialog = glade_xml_get_widget( sxd->gxml, SX_LIST_GLADE_NAME );
|
||||||
sxd->dialog = glade_xml_get_widget( sxd->gxml,
|
|
||||||
"Scheduled Transaction List" );
|
|
||||||
|
|
||||||
sxdo = GTK_OBJECT(sxd->dialog);
|
sxdo = GTK_OBJECT(sxd->dialog);
|
||||||
|
|
||||||
@@ -499,6 +509,27 @@ schedXact_populate( SchedXactionDialog *sxd )
|
|||||||
GTK_SIGNAL_FUNC(row_select_handler), sxd );
|
GTK_SIGNAL_FUNC(row_select_handler), sxd );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
sxed_check_close( SchedXactionEditorDialog *sxed )
|
||||||
|
{
|
||||||
|
SplitRegister *reg;
|
||||||
|
|
||||||
|
reg = gnc_ledger_display_get_split_register( sxed->ledger );
|
||||||
|
|
||||||
|
/* Check for SX changes... how? */
|
||||||
|
|
||||||
|
/* Check the ledger for changes. */
|
||||||
|
gnc_sxed_reg_check_close( sxed );
|
||||||
|
}
|
||||||
|
|
||||||
|
static gboolean
|
||||||
|
sxed_delete_event( GtkWidget *widget, GdkEvent *evt, gpointer ud )
|
||||||
|
{
|
||||||
|
DEBUG( "delete-event" );
|
||||||
|
sxed_close_handler( (SchedXactionEditorDialog*)ud );
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
SchedXactionEditorDialog *
|
SchedXactionEditorDialog *
|
||||||
gnc_ui_scheduled_xaction_editor_dialog_create( SchedXactionDialog *sxd,
|
gnc_ui_scheduled_xaction_editor_dialog_create( SchedXactionDialog *sxd,
|
||||||
SchedXaction *sx,
|
SchedXaction *sx,
|
||||||
@@ -516,7 +547,7 @@ gnc_ui_scheduled_xaction_editor_dialog_create( SchedXactionDialog *sxd,
|
|||||||
gpointer objectData;
|
gpointer objectData;
|
||||||
} widgets[] = {
|
} widgets[] = {
|
||||||
{ "ok_button", "clicked", editor_ok_button_clicked, NULL },
|
{ "ok_button", "clicked", editor_ok_button_clicked, NULL },
|
||||||
{ "cancel_button", "clicked", editor_close_button_clicked, NULL },
|
{ "cancel_button", "clicked", editor_cancel_button_clicked, NULL },
|
||||||
{ "help_button", "clicked", editor_help_button_clicked, NULL},
|
{ "help_button", "clicked", editor_help_button_clicked, NULL},
|
||||||
|
|
||||||
{ "rb_enddate", "toggled", endgroup_rb_toggled, GINT_TO_POINTER(END_OPTION) },
|
{ "rb_enddate", "toggled", endgroup_rb_toggled, GINT_TO_POINTER(END_OPTION) },
|
||||||
@@ -543,11 +574,10 @@ gnc_ui_scheduled_xaction_editor_dialog_create( SchedXactionDialog *sxd,
|
|||||||
sxed = g_new0( SchedXactionEditorDialog, 1 );
|
sxed = g_new0( SchedXactionEditorDialog, 1 );
|
||||||
|
|
||||||
/* sxed->dialog = create_Scheduled_Transaction_Editor(); */
|
/* sxed->dialog = create_Scheduled_Transaction_Editor(); */
|
||||||
sxed->gxml = gnc_glade_xml_new( "sched-xact.glade", "Scheduled Transaction Editor" );
|
sxed->gxml = gnc_glade_xml_new( "sched-xact.glade",
|
||||||
sxed->dialog = glade_xml_get_widget( sxed->gxml, "Scheduled Transaction Editor" );
|
SX_EDITOR_GLADE_NAME );
|
||||||
if ( sxed->dialog == NULL ) {
|
sxed->dialog = glade_xml_get_widget( sxed->gxml, SX_EDITOR_GLADE_NAME );
|
||||||
PERR( "Damnit... sxed->dialog is null\n" );
|
|
||||||
}
|
|
||||||
sxed->sxd = sxd;
|
sxed->sxd = sxd;
|
||||||
sxed->sx = sx;
|
sxed->sx = sx;
|
||||||
sxed->new = newP;
|
sxed->new = newP;
|
||||||
@@ -558,6 +588,8 @@ gnc_ui_scheduled_xaction_editor_dialog_create( SchedXactionDialog *sxd,
|
|||||||
close handler */
|
close handler */
|
||||||
sxed );
|
sxed );
|
||||||
|
|
||||||
|
gtk_signal_connect(GTK_OBJECT(sxed->dialog), "delete-event",
|
||||||
|
GTK_SIGNAL_FUNC(sxed_delete_event), sxed );
|
||||||
gtk_signal_connect(GTK_OBJECT(sxed->dialog), "destroy",
|
gtk_signal_connect(GTK_OBJECT(sxed->dialog), "destroy",
|
||||||
GTK_SIGNAL_FUNC(scheduledxaction_editor_dialog_destroy),
|
GTK_SIGNAL_FUNC(scheduledxaction_editor_dialog_destroy),
|
||||||
sxed);
|
sxed);
|
||||||
@@ -1279,7 +1311,21 @@ static
|
|||||||
void
|
void
|
||||||
sxe_register_record_cb( GnucashRegister *reg, gpointer d )
|
sxe_register_record_cb( GnucashRegister *reg, gpointer d )
|
||||||
{
|
{
|
||||||
|
SchedXactionEditorDialog *sxed = (SchedXactionEditorDialog*)d;
|
||||||
|
SplitRegister *splitreg;
|
||||||
|
Transaction *t;
|
||||||
|
|
||||||
DEBUG( "FIXME: sxe_register_record_cb called\n" );
|
DEBUG( "FIXME: sxe_register_record_cb called\n" );
|
||||||
|
|
||||||
|
splitreg = gnc_ledger_display_get_split_register( sxed->ledger );
|
||||||
|
t = gnc_split_register_get_current_trans( splitreg );
|
||||||
|
if ( ! gnc_split_register_save( splitreg, TRUE ) )
|
||||||
|
return;
|
||||||
|
|
||||||
|
/* clipped "if (t)
|
||||||
|
* gnc_reg_incl_date( splitreg, trans_get_date(trans) )" */
|
||||||
|
|
||||||
|
gnc_split_register_redraw( splitreg );
|
||||||
}
|
}
|
||||||
|
|
||||||
static
|
static
|
||||||
@@ -1611,8 +1657,9 @@ gnc_sxed_reg_check_close(SchedXactionEditorDialog *sxed)
|
|||||||
|
|
||||||
pending_changes = gnc_split_register_changed (reg);
|
pending_changes = gnc_split_register_changed (reg);
|
||||||
if (pending_changes) {
|
if (pending_changes) {
|
||||||
const char *message = _("The current transaction has been changed.\n"
|
const char *message =
|
||||||
"Would you like to record it?");
|
_("The current template transaction has been changed.\n"
|
||||||
|
"Would you like to record the changes?");
|
||||||
if (gnc_verify_dialog_parented(sxed->dialog, message, TRUE)) {
|
if (gnc_verify_dialog_parented(sxed->dialog, message, TRUE)) {
|
||||||
sxed_reg_recordCB(sxed->dialog, sxed);
|
sxed_reg_recordCB(sxed->dialog, sxed);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -2,7 +2,8 @@
|
|||||||
* dialog-sx-from-trans.c -- a simple dialog for creating a *
|
* dialog-sx-from-trans.c -- a simple dialog for creating a *
|
||||||
* scheduled transaction for a "real *
|
* scheduled transaction for a "real *
|
||||||
* one *
|
* one *
|
||||||
* Copyright (C) 2000 Robert Merkel <rgmerk@mira.net> *
|
* Copyright (C) 2001 Robert Merkel <rgmerk@mira.net> *
|
||||||
|
* Copyright (C) 2001 Joshua Sled <jsled@asynchronous.org> *
|
||||||
* *
|
* *
|
||||||
* This program is free software; you can redistribute it and/or *
|
* This program is free software; you can redistribute it and/or *
|
||||||
* modify it under the terms of the GNU General Public License as *
|
* modify it under the terms of the GNU General Public License as *
|
||||||
@@ -47,6 +48,7 @@
|
|||||||
#define SXFTD_N_OCCURRENCES_ENTRY "n_occurrences_entry"
|
#define SXFTD_N_OCCURRENCES_ENTRY "n_occurrences_entry"
|
||||||
#define SXFTD_FREQ_OPTION_MENU "freq_option_menu"
|
#define SXFTD_FREQ_OPTION_MENU "freq_option_menu"
|
||||||
#define SXFTD_END_DATE_EDIT "end_date_edit"
|
#define SXFTD_END_DATE_EDIT "end_date_edit"
|
||||||
|
#define SXFTD_START_DATE_EDIT "start_date_edit"
|
||||||
|
|
||||||
static short module = MOD_SX;
|
static short module = MOD_SX;
|
||||||
|
|
||||||
@@ -183,6 +185,7 @@ sxftd_add_template_trans(SXFromTransInfo *sxfti)
|
|||||||
TTSplitInfo *ttsi;
|
TTSplitInfo *ttsi;
|
||||||
Split *sp;
|
Split *sp;
|
||||||
gnc_numeric split_value;
|
gnc_numeric split_value;
|
||||||
|
const char *tmpStr;
|
||||||
|
|
||||||
gnc_ttinfo_set_description(tti, xaccTransGetDescription(tr));
|
gnc_ttinfo_set_description(tti, xaccTransGetDescription(tr));
|
||||||
gnc_ttinfo_set_num(tti, xaccTransGetNum(tr));
|
gnc_ttinfo_set_num(tti, xaccTransGetNum(tr));
|
||||||
@@ -198,15 +201,23 @@ sxftd_add_template_trans(SXFromTransInfo *sxfti)
|
|||||||
|
|
||||||
if(gnc_numeric_positive_p(split_value))
|
if(gnc_numeric_positive_p(split_value))
|
||||||
{
|
{
|
||||||
gnc_ttsplitinfo_set_debit_formula_numeric(ttsi, split_value);
|
tmpStr = xaccPrintAmount( split_value,
|
||||||
|
gnc_default_print_info(FALSE) );
|
||||||
|
gnc_ttsplitinfo_set_debit_formula( ttsi, tmpStr );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
gnc_ttsplitinfo_set_credit_formula_numeric(ttsi, split_value);
|
/* Negate the numeric so it prints w/o the sign at the front. */
|
||||||
|
tmpStr = xaccPrintAmount( gnc_numeric_neg( split_value ),
|
||||||
|
gnc_default_print_info(FALSE) );
|
||||||
|
gnc_ttsplitinfo_set_credit_formula( ttsi, tmpStr );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Copy over per-split account info */
|
||||||
|
gnc_ttsplitinfo_set_account( ttsi, xaccSplitGetAccount( sp ) );
|
||||||
|
|
||||||
template_splits = g_list_append(template_splits, ttsi);
|
template_splits = g_list_append(template_splits, ttsi);
|
||||||
}
|
}
|
||||||
|
|
||||||
gnc_ttinfo_set_template_splits(tti, template_splits);
|
gnc_ttinfo_set_template_splits(tti, template_splits);
|
||||||
|
|
||||||
@@ -218,6 +229,38 @@ sxftd_add_template_trans(SXFromTransInfo *sxfti)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static gint
|
||||||
|
sxftd_init( SXFromTransInfo *sxfti )
|
||||||
|
{
|
||||||
|
GtkWidget *w;
|
||||||
|
const char *transName;
|
||||||
|
gint pos;
|
||||||
|
|
||||||
|
if ( ! sxfti->sx ) {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
if ( ! sxfti->trans ) {
|
||||||
|
return -2;
|
||||||
|
}
|
||||||
|
|
||||||
|
sxfti_attach_callbacks(sxfti);
|
||||||
|
|
||||||
|
/* Get the name from the transaction, try that as the initial SX name. */
|
||||||
|
transName = xaccTransGetDescription( sxfti->trans );
|
||||||
|
xaccSchedXactionSetName( sxfti->sx, transName );
|
||||||
|
|
||||||
|
w = glade_xml_get_widget( sxfti->gxml, SXFTD_NAME_ENTRY );
|
||||||
|
pos = 0;
|
||||||
|
gtk_editable_insert_text( GTK_EDITABLE(w), transName,
|
||||||
|
(strlen(transName) * sizeof(char)), &pos );
|
||||||
|
|
||||||
|
w = glade_xml_get_widget(sxfti->gxml,
|
||||||
|
SXFTD_FREQ_OPTION_MENU);
|
||||||
|
gnc_option_menu_init(w);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
static guint
|
static guint
|
||||||
sxftd_compute_sx(SXFromTransInfo *sxfti)
|
sxftd_compute_sx(SXFromTransInfo *sxfti)
|
||||||
{
|
{
|
||||||
@@ -243,11 +286,9 @@ sxftd_compute_sx(SXFromTransInfo *sxfti)
|
|||||||
xaccSchedXactionSetName(sx, name);
|
xaccSchedXactionSetName(sx, name);
|
||||||
g_free(name);
|
g_free(name);
|
||||||
|
|
||||||
/* get the date (basis for start date */
|
/* get the date (basis for start date) */
|
||||||
|
|
||||||
trans_t = xaccTransGetDate(sxfti->trans);
|
trans_t = xaccTransGetDate(sxfti->trans);
|
||||||
|
|
||||||
|
|
||||||
g_date_set_time(&date, trans_t);
|
g_date_set_time(&date, trans_t);
|
||||||
|
|
||||||
fs = xaccFreqSpecMalloc(gnc_get_current_session ());
|
fs = xaccFreqSpecMalloc(gnc_get_current_session ());
|
||||||
@@ -255,13 +296,13 @@ sxftd_compute_sx(SXFromTransInfo *sxfti)
|
|||||||
/* get the frequency */
|
/* get the frequency */
|
||||||
|
|
||||||
w = glade_xml_get_widget(sxfti->gxml, SXFTD_FREQ_OPTION_MENU);
|
w = glade_xml_get_widget(sxfti->gxml, SXFTD_FREQ_OPTION_MENU);
|
||||||
|
|
||||||
index = gnc_option_menu_get_active(w);
|
index = gnc_option_menu_get_active(w);
|
||||||
|
|
||||||
/* Note that we make the start date the *NEXT* instance, not the
|
/* Note that we make the start date the *NEXT* instance, not the
|
||||||
* present one
|
* present one
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/* Methinks this should use the FreqSpec to do the calculation... --jsled */
|
||||||
switch(index)
|
switch(index)
|
||||||
{
|
{
|
||||||
case FREQ_DAILY:
|
case FREQ_DAILY:
|
||||||
@@ -413,8 +454,8 @@ sxftd_advanced_clicked(GtkWidget *w, gpointer user_data)
|
|||||||
void
|
void
|
||||||
gnc_sx_create_from_trans(Transaction *trans)
|
gnc_sx_create_from_trans(Transaction *trans)
|
||||||
{
|
{
|
||||||
GtkWidget *w;
|
int errno;
|
||||||
SXFromTransInfo *sxfti = g_malloc(sizeof(SXFromTransInfo));
|
SXFromTransInfo *sxfti = g_new0( SXFromTransInfo, 1);
|
||||||
|
|
||||||
sxfti->gxml = gnc_glade_xml_new(SX_GLADE_FILE,
|
sxfti->gxml = gnc_glade_xml_new(SX_GLADE_FILE,
|
||||||
SXFTD_DIALOG_GLADE_NAME);
|
SXFTD_DIALOG_GLADE_NAME);
|
||||||
@@ -426,16 +467,11 @@ gnc_sx_create_from_trans(Transaction *trans)
|
|||||||
|
|
||||||
sxfti->sx = xaccSchedXactionMalloc(gnc_get_current_session ());
|
sxfti->sx = xaccSchedXactionMalloc(gnc_get_current_session ());
|
||||||
|
|
||||||
sxfti_attach_callbacks(sxfti);
|
if ( (errno = sxftd_init( sxfti )) < 0 ) {
|
||||||
|
PERR( "Error in sxftd_init: %d", errno );
|
||||||
|
}
|
||||||
|
|
||||||
w = glade_xml_get_widget(sxfti->gxml,
|
|
||||||
SXFTD_FREQ_OPTION_MENU);
|
|
||||||
|
|
||||||
gnc_option_menu_init(w);
|
|
||||||
|
|
||||||
gtk_widget_show_all(sxfti->dialog);
|
gtk_widget_show_all(sxfti->dialog);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -4382,6 +4382,50 @@ Anually
|
|||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
|
|
||||||
|
<widget>
|
||||||
|
<class>GtkHBox</class>
|
||||||
|
<name>hbox165</name>
|
||||||
|
<homogeneous>False</homogeneous>
|
||||||
|
<spacing>0</spacing>
|
||||||
|
<child>
|
||||||
|
<padding>0</padding>
|
||||||
|
<expand>True</expand>
|
||||||
|
<fill>True</fill>
|
||||||
|
</child>
|
||||||
|
|
||||||
|
<widget>
|
||||||
|
<class>GtkLabel</class>
|
||||||
|
<name>label847875</name>
|
||||||
|
<label>Start Date: </label>
|
||||||
|
<justify>GTK_JUSTIFY_CENTER</justify>
|
||||||
|
<wrap>False</wrap>
|
||||||
|
<xalign>0.5</xalign>
|
||||||
|
<yalign>0.5</yalign>
|
||||||
|
<xpad>0</xpad>
|
||||||
|
<ypad>0</ypad>
|
||||||
|
<child>
|
||||||
|
<padding>0</padding>
|
||||||
|
<expand>False</expand>
|
||||||
|
<fill>True</fill>
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
|
|
||||||
|
<widget>
|
||||||
|
<class>GnomeDateEdit</class>
|
||||||
|
<name>start_date_edit</name>
|
||||||
|
<show_time>False</show_time>
|
||||||
|
<use_24_format>True</use_24_format>
|
||||||
|
<week_start_monday>False</week_start_monday>
|
||||||
|
<lower_hour>7</lower_hour>
|
||||||
|
<upper_hour>19</upper_hour>
|
||||||
|
<child>
|
||||||
|
<padding>0</padding>
|
||||||
|
<expand>False</expand>
|
||||||
|
<fill>True</fill>
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
|
|
||||||
<widget>
|
<widget>
|
||||||
<class>GtkFrame</class>
|
<class>GtkFrame</class>
|
||||||
<name>frame78</name>
|
<name>frame78</name>
|
||||||
|
|||||||
Reference in New Issue
Block a user