mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
2002-11-23 Joshua Sled <jsled@asynchronous.org>
* src/app-utils/prefs.scm (gnc:make-number-range-option): Fix wording of pref-widget hints; fixes Bug#99389. * src/gnome/glade/sched-xact.glade: * src/gnome/dialog-sx-from-trans.c: * src/gnome/druid-loan.c (gnc_ui_sx_loan_druid_create): * src/gnome-utils/gnc-frequency.c (gnc_frequency_init): * src/gnome/dialog-scheduledxaction.c (gnc_ui_scheduled_xaction_editor_dialog_create): GnomeDateEdit -> GNCDateEdit; Fixes Bug#99357. * src/gnome/dialog-scheduledxaction.c (gnc_ui_scheduled_xaction_editor_dialog_create): Removed delete-event handling duplicated by close signal from GnomeDialog; fixes Bug#99399. (sxed_close_event): Check for a valid SX before proceeding; fixes Bugs#99350 and dupes [99348,99356,99397]. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@7533 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
389b9599fc
commit
2e7979127b
20
ChangeLog
20
ChangeLog
@ -1,3 +1,23 @@
|
||||
2002-11-23 Joshua Sled <jsled@asynchronous.org>
|
||||
|
||||
* src/app-utils/prefs.scm (gnc:make-number-range-option): Fix
|
||||
wording of pref-widget hints; fixes Bug#99389.
|
||||
|
||||
* src/gnome/glade/sched-xact.glade:
|
||||
* src/gnome/dialog-sx-from-trans.c:
|
||||
* src/gnome/druid-loan.c (gnc_ui_sx_loan_druid_create):
|
||||
* src/gnome-utils/gnc-frequency.c (gnc_frequency_init):
|
||||
* src/gnome/dialog-scheduledxaction.c
|
||||
(gnc_ui_scheduled_xaction_editor_dialog_create):
|
||||
GnomeDateEdit -> GNCDateEdit; Fixes Bug#99357.
|
||||
|
||||
* src/gnome/dialog-scheduledxaction.c
|
||||
(gnc_ui_scheduled_xaction_editor_dialog_create): Removed
|
||||
delete-event handling duplicated by close signal from GnomeDialog;
|
||||
fixes Bug#99399.
|
||||
(sxed_close_event): Check for a valid SX before proceeding; fixes
|
||||
Bugs#99350 and dupes [99348,99356,99397].
|
||||
|
||||
2002-11-23 Christian Stimming <stimming@tuhh.de>
|
||||
|
||||
* src/import-export/hbci/gnc-hbci-gettrans.c: Use the new generic
|
||||
|
@ -570,21 +570,21 @@ without one.")
|
||||
(gnc:make-simple-boolean-option
|
||||
(N_ "Scheduled Transactions")
|
||||
(N_ "Auto-Create new Scheduled Transactions by default")
|
||||
"b" (N_ "Should new SchedXactions have the 'Auto Create' flag set by default?")
|
||||
"b" (N_ "Should new Scheduled Transactions have the 'Auto Create' flag set by default?")
|
||||
#f ))
|
||||
|
||||
(gnc:register-configuration-option
|
||||
(gnc:make-simple-boolean-option
|
||||
(N_ "Scheduled Transactions")
|
||||
(N_ "Notify on new, auto-created Scheduled Transactions")
|
||||
"c" (N_ "Should new SchedXactions with the 'AutoCreate' flag set also be set to notify?")
|
||||
"c" (N_ "Should new Scheduled Transactions with the 'AutoCreate' flag set also be set to notify?")
|
||||
#t ))
|
||||
|
||||
(gnc:register-configuration-option
|
||||
(gnc:make-number-range-option
|
||||
(N_ "Scheduled Transactions")
|
||||
(N_ "Default number of days in advance to create")
|
||||
"d" (N_ "Default number of days in advance to create new SXes")
|
||||
"d" (N_ "Default number of days in advance to create new Scheduled Transactions.")
|
||||
0 ; default
|
||||
0 ; min
|
||||
99999 ; max
|
||||
@ -596,7 +596,7 @@ without one.")
|
||||
(gnc:make-number-range-option
|
||||
(N_ "Scheduled Transactions")
|
||||
(N_ "Default number of days in advance to remind")
|
||||
"e" (N_ "Default number of days in advance to remind on new SXes")
|
||||
"e" (N_ "Default number of days in advance to remind on new Scheduled Transactions.")
|
||||
0 ; default
|
||||
0 ; min
|
||||
99999 ; max
|
||||
|
@ -7,12 +7,6 @@
|
||||
* This file was part of the Gnome Library. It was modifed by
|
||||
* Dave Peticolas <dave@krondo.com> for use in GnuCash.
|
||||
*
|
||||
* 2001.05.13T1647 [PDT], #gnucash:
|
||||
* <jsled> dave_p: So the header for gnc-dateedit.h is a bit light
|
||||
* on _why_ such a thing was done... any help?
|
||||
* <dave_p> jsled: gnome date edit isn't i18n'd properly. also, we
|
||||
* added the register date hotkeys.
|
||||
*
|
||||
* GnuCash is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Library General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
@ -34,6 +28,7 @@
|
||||
@NOTATION@
|
||||
*/
|
||||
|
||||
|
||||
#ifndef GNC_DATE_EDIT_H
|
||||
#define GNC_DATE_EDIT_H
|
||||
|
||||
@ -57,6 +52,13 @@ typedef enum {
|
||||
#define GNC_DATE_EDIT_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, gnc_date_edit_get_type(), GNCDateEditClass)
|
||||
#define GNC_IS_DATE_EDIT(obj) GTK_CHECK_TYPE (obj, gnc_date_edit_get_type ())
|
||||
|
||||
/**
|
||||
* * 2001.05.13T1647 [PDT], #gnucash:
|
||||
* <jsled> dave_p: So the header for gnc-dateedit.h is a bit light
|
||||
* on _why_ such a thing was done... any help?
|
||||
* <dave_p> jsled: gnome date edit isn't i18n'd properly. also, we
|
||||
* added the register date hotkeys.
|
||||
**/
|
||||
typedef struct {
|
||||
GtkHBox hbox;
|
||||
|
||||
|
@ -50,7 +50,7 @@ static gint gnc_frequency_signals[LAST_SIGNAL] = { 0 };
|
||||
static void gnc_frequency_class_init( GNCFrequencyClass *klass );
|
||||
|
||||
static void freq_option_value_changed( GtkMenuShell *b, gpointer d );
|
||||
static void start_date_changed( GnomeDateEdit *gde, gpointer d );
|
||||
static void start_date_changed( GNCDateEdit *gde, gpointer d );
|
||||
static void spin_changed_helper( GtkAdjustment *adj, gpointer d );
|
||||
|
||||
static void weekly_days_changed( GtkButton *b, gpointer d );
|
||||
@ -188,8 +188,15 @@ gnc_frequency_init( GNCFrequency *gf )
|
||||
gf->nb = GTK_NOTEBOOK(o);
|
||||
o = glade_xml_get_widget( gf->gxml, "freq_option" );
|
||||
gf->freqOpt = GTK_OPTION_MENU(o);
|
||||
o = glade_xml_get_widget( gf->gxml, "sxe_start_date" );
|
||||
gf->startDate = GNOME_DATE_EDIT(o);
|
||||
gf->startDate = GNC_DATE_EDIT(gnc_date_edit_new( time(NULL), FALSE, FALSE ));
|
||||
/* Add the new widget to the table. */
|
||||
{
|
||||
GtkWidget *table = glade_xml_get_widget( gf->gxml, "gncfreq_table" );
|
||||
gtk_table_attach( GTK_TABLE(table), GTK_WIDGET(gf->startDate),
|
||||
1, 2, 1, 2,
|
||||
( GTK_EXPAND | GTK_FILL ), 0,
|
||||
0, 0 );
|
||||
}
|
||||
vb = GTK_VBOX( glade_xml_get_widget( gf->gxml, "gncfreq_vbox" ) );
|
||||
gf->vb = vb;
|
||||
gtk_container_add( GTK_CONTAINER(&gf->widget), GTK_WIDGET(gf->vb) );
|
||||
@ -286,7 +293,7 @@ gnc_frequency_setup( GNCFrequency *gf, FreqSpec *fs, GDate *startDate )
|
||||
tmpTT = mktime( tmpTm );
|
||||
g_free( tmpTm );
|
||||
}
|
||||
gnome_date_edit_set_time( gf->startDate, tmpTT );
|
||||
gnc_date_edit_set_time( gf->startDate, tmpTT );
|
||||
|
||||
switch ( uift ) {
|
||||
case UIFREQ_NONE:
|
||||
@ -303,7 +310,7 @@ gnc_frequency_setup( GNCFrequency *gf, FreqSpec *fs, GDate *startDate )
|
||||
return;
|
||||
}
|
||||
g_date_to_struct_tm( &theDate, tmpTm );
|
||||
gnome_date_edit_set_time( gf->startDate, mktime(tmpTm) );
|
||||
gnc_date_edit_set_time( gf->startDate, mktime(tmpTm) );
|
||||
g_free( tmpTm );
|
||||
}
|
||||
break;
|
||||
@ -468,7 +475,7 @@ gnc_frequency_setup( GNCFrequency *gf, FreqSpec *fs, GDate *startDate )
|
||||
"quarterly_day" ),
|
||||
glade_xml_get_widget( gf->gxml,
|
||||
"quarterly_occur" ),
|
||||
3, gnome_date_edit_get_date( gf->startDate ) );
|
||||
3, gnc_date_edit_get_date( gf->startDate ) );
|
||||
}
|
||||
break;
|
||||
case UIFREQ_TRI_ANUALLY:
|
||||
@ -490,7 +497,7 @@ gnc_frequency_setup( GNCFrequency *gf, FreqSpec *fs, GDate *startDate )
|
||||
"triyearly_day" ),
|
||||
glade_xml_get_widget( gf->gxml,
|
||||
"triyearly_occur" ),
|
||||
4, gnome_date_edit_get_date( gf->startDate ) );
|
||||
4, gnc_date_edit_get_date( gf->startDate ) );
|
||||
}
|
||||
break;
|
||||
case UIFREQ_SEMI_YEARLY:
|
||||
@ -512,7 +519,7 @@ gnc_frequency_setup( GNCFrequency *gf, FreqSpec *fs, GDate *startDate )
|
||||
"semiyearly_day" ),
|
||||
glade_xml_get_widget( gf->gxml,
|
||||
"semiyearly_occur" ),
|
||||
6, gnome_date_edit_get_date( gf->startDate ) );
|
||||
6, gnc_date_edit_get_date( gf->startDate ) );
|
||||
}
|
||||
break;
|
||||
case UIFREQ_YEARLY:
|
||||
@ -535,7 +542,7 @@ gnc_frequency_setup( GNCFrequency *gf, FreqSpec *fs, GDate *startDate )
|
||||
o = glade_xml_get_widget( gf->gxml, "yearly_spin" );
|
||||
gtk_spin_button_set_value( GTK_SPIN_BUTTON(o),
|
||||
(int)rint(floor(monthlyMult / 12)) );
|
||||
tmpTT = gnome_date_edit_get_date( gf->startDate );
|
||||
tmpTT = gnc_date_edit_get_date( gf->startDate );
|
||||
tmpTm = localtime( &tmpTT );
|
||||
o = glade_xml_get_widget( gf->gxml, "yearly_month" );
|
||||
gtk_option_menu_set_history( GTK_OPTION_MENU(o), monthOffset );
|
||||
@ -575,7 +582,7 @@ gnc_frequency_save_state( GNCFrequency *gf, FreqSpec *fs, GDate *outStartDate )
|
||||
refreshes. :( */
|
||||
gnc_suspend_gui_refresh();
|
||||
|
||||
tmpTimeT = gnome_date_edit_get_date( gf->startDate );
|
||||
tmpTimeT = gnc_date_edit_get_date( gf->startDate );
|
||||
gd = g_date_new();
|
||||
g_date_set_time( gd, tmpTimeT );
|
||||
if ( outStartDate != NULL ) {
|
||||
@ -702,7 +709,7 @@ gnc_frequency_save_state( GNCFrequency *gf, FreqSpec *fs, GDate *outStartDate )
|
||||
o = glade_xml_get_widget( gf->gxml, "semimonthly_second" );
|
||||
day = gnc_option_menu_get_active( GTK_WIDGET(o) )+1;
|
||||
tmpFS = xaccFreqSpecMalloc(gnc_get_current_book ());
|
||||
tmpTimeT = gnome_date_edit_get_date( gf->startDate );
|
||||
tmpTimeT = gnc_date_edit_get_date( gf->startDate );
|
||||
gd = g_date_new();
|
||||
g_date_set_time( gd, tmpTimeT );
|
||||
tmpTm = g_new0( struct tm, 1 );
|
||||
@ -796,7 +803,7 @@ monthly_sel_changed( GtkButton *b, gpointer d )
|
||||
"monthly_day" );
|
||||
dayOfMonth = gnc_option_menu_get_active( GTK_WIDGET(o) ) + 1;
|
||||
|
||||
tmptt = gnome_date_edit_get_date( gf->startDate );
|
||||
tmptt = gnc_date_edit_get_date( gf->startDate );
|
||||
tmptm = localtime( &tmptt );
|
||||
while ( ! g_date_valid_dmy( dayOfMonth,
|
||||
tmptm->tm_mon + 1,
|
||||
@ -805,7 +812,7 @@ monthly_sel_changed( GtkButton *b, gpointer d )
|
||||
}
|
||||
tmptm->tm_mday = dayOfMonth;
|
||||
tmptt = mktime( tmptm );
|
||||
gnome_date_edit_set_time( gf->startDate, tmptt );
|
||||
gnc_date_edit_set_time( gf->startDate, tmptt );
|
||||
|
||||
gtk_signal_emit_by_name( GTK_OBJECT(d), "changed", NULL );
|
||||
}
|
||||
@ -821,7 +828,7 @@ semimonthly_sel_changed( GtkButton *b, gpointer d )
|
||||
|
||||
gf = (GNCFrequency*)d;
|
||||
|
||||
tmptt = gnome_date_edit_get_date( gf->startDate );
|
||||
tmptt = gnc_date_edit_get_date( gf->startDate );
|
||||
tmptm = localtime( &tmptt );
|
||||
|
||||
o = glade_xml_get_widget( gf->gxml, "semimonthly_first" );
|
||||
@ -838,7 +845,7 @@ semimonthly_sel_changed( GtkButton *b, gpointer d )
|
||||
tmptm->tm_mday -= 1;
|
||||
}
|
||||
tmptt = mktime( tmptm );
|
||||
gnome_date_edit_set_time( gf->startDate, tmptt );
|
||||
gnc_date_edit_set_time( gf->startDate, tmptt );
|
||||
|
||||
gtk_signal_emit_by_name( GTK_OBJECT(gf), "changed", NULL );
|
||||
}
|
||||
@ -886,14 +893,14 @@ year_range_sels_changed( GNCFrequency *gf,
|
||||
occur = gnc_option_menu_get_active( occurW );
|
||||
day = gnc_option_menu_get_active( dayOfMonthW ) + 1;
|
||||
|
||||
tmpTT = gnome_date_edit_get_date( gf->startDate );
|
||||
tmpTT = gnc_date_edit_get_date( gf->startDate );
|
||||
tmpTm = localtime( &tmpTT );
|
||||
tmpTm->tm_mday = day;
|
||||
// jump the month to the closest appropriate month.
|
||||
// FIXME: this could probably be made more "appropriate".
|
||||
tmpTm->tm_mon += occur - (tmpTm->tm_mon % monthsInRange);
|
||||
tmpTT = mktime( tmpTm );
|
||||
gnome_date_edit_set_time( gf->startDate, tmpTT );
|
||||
gnc_date_edit_set_time( gf->startDate, tmpTT );
|
||||
|
||||
gtk_signal_emit_by_name( GTK_OBJECT(gf), "changed", NULL );
|
||||
}
|
||||
@ -908,7 +915,7 @@ yearly_sel_changed( GtkButton *b, gpointer d )
|
||||
|
||||
gf = (GNCFrequency*)d;
|
||||
|
||||
tmptt = gnome_date_edit_get_date( gf->startDate );
|
||||
tmptt = gnc_date_edit_get_date( gf->startDate );
|
||||
tmptm = localtime( &tmptt );
|
||||
|
||||
o = glade_xml_get_widget( gf->gxml, "yearly_month" );
|
||||
@ -926,7 +933,7 @@ yearly_sel_changed( GtkButton *b, gpointer d )
|
||||
}
|
||||
|
||||
tmptt = mktime( tmptm );
|
||||
gnome_date_edit_set_time( gf->startDate, tmptt );
|
||||
gnc_date_edit_set_time( gf->startDate, tmptt );
|
||||
|
||||
gtk_signal_emit_by_name( GTK_OBJECT(gf), "changed", NULL );
|
||||
}
|
||||
@ -948,7 +955,6 @@ freq_option_value_changed( GtkMenuShell *b, gpointer d )
|
||||
int optIdx;
|
||||
UIFreqType uift;
|
||||
time_t startDate, tmpDate;
|
||||
GnomeDateEdit *gde;
|
||||
struct tm *tmpTm;
|
||||
GtkWidget *o;
|
||||
|
||||
@ -958,8 +964,7 @@ freq_option_value_changed( GtkMenuShell *b, gpointer d )
|
||||
|
||||
/* setup initial values for new page, as possible. */
|
||||
uift = PAGES[optIdx].uiFTVal;
|
||||
gde = GNOME_DATE_EDIT(glade_xml_get_widget( gf->gxml, "sxe_start_date" ));
|
||||
startDate = gnome_date_edit_get_date( gde );
|
||||
startDate = gnc_date_edit_get_date( gf->startDate );
|
||||
tmpTm = localtime( &startDate );
|
||||
|
||||
switch ( uift ) {
|
||||
@ -1034,7 +1039,7 @@ year_range_menu_helper( GtkWidget *dayOptMenu,
|
||||
}
|
||||
|
||||
static void
|
||||
start_date_changed( GnomeDateEdit *gde, gpointer d )
|
||||
start_date_changed( GNCDateEdit *gde, gpointer d )
|
||||
{
|
||||
GNCFrequency *gf;
|
||||
GtkWidget *o;
|
||||
@ -1045,7 +1050,7 @@ start_date_changed( GnomeDateEdit *gde, gpointer d )
|
||||
|
||||
gf = (GNCFrequency*)d;
|
||||
|
||||
dateFromGDE = gnome_date_edit_get_date( gde );
|
||||
dateFromGDE = gnc_date_edit_get_date( gde );
|
||||
|
||||
page = gtk_notebook_get_current_page( gf->nb );
|
||||
uift = PAGES[page].uiFTVal;
|
||||
|
@ -25,6 +25,7 @@
|
||||
#define GNC_FREQUENCY_H
|
||||
|
||||
#include <gnome.h>
|
||||
#include "gnc-date-edit.h"
|
||||
#include "FreqSpec.h"
|
||||
#include "dialog-utils.h"
|
||||
|
||||
@ -46,7 +47,7 @@ typedef struct _GNCFrequency {
|
||||
GtkVBox *vb;
|
||||
GtkNotebook *nb;
|
||||
GtkOptionMenu *freqOpt;
|
||||
GnomeDateEdit *startDate;
|
||||
GNCDateEdit *startDate;
|
||||
GladeXML *gxml;
|
||||
} GNCFrequency;
|
||||
|
||||
|
@ -76,7 +76,7 @@ static short module = MOD_SX;
|
||||
#define ADVANCE_DAYS_SPIN "advance_days"
|
||||
#define REMIND_OPT "remind_opt"
|
||||
#define REMIND_DAYS_SPIN "remind_days"
|
||||
#define END_DATE_DATEENTRY "sxe_end_date"
|
||||
#define END_DATE_BOX "end_date_hbox"
|
||||
#define END_GNOME_NUMENTRY "end_gnome_nentry"
|
||||
#define REMAIN_GNOME_NUMENTRY "remain_gnome_nentry"
|
||||
#define REMAIN_ENTRY "remain_nentry"
|
||||
@ -147,7 +147,7 @@ struct _SchedXactionEditorDialog
|
||||
GtkToggleButton *optEndCount;
|
||||
GnomeNumberEntry *endCountEntry;
|
||||
GnomeNumberEntry *endRemainEntry;
|
||||
GnomeDateEdit *endDateEntry;
|
||||
GNCDateEdit *endDateEntry;
|
||||
|
||||
char *sxGUIDstr;
|
||||
|
||||
@ -286,10 +286,6 @@ static
|
||||
void
|
||||
editor_cancel_button_clicked( GtkButton *b, SchedXactionEditorDialog *sxed )
|
||||
{
|
||||
|
||||
if ( !sxed_confirmed_cancel( sxed ) ) {
|
||||
return;
|
||||
}
|
||||
/* close */
|
||||
gnc_close_gui_component_by_data( DIALOG_SCHEDXACTION_EDITOR_CM_CLASS,
|
||||
sxed );
|
||||
@ -347,6 +343,7 @@ editor_ok_button_clicked( GtkButton *b, SchedXactionEditorDialog *sxed )
|
||||
sxList = g_list_append( sxList, sxed->sx );
|
||||
gnc_book_set_schedxactions( book, sxList );
|
||||
sxed->sx = NULL;
|
||||
sxed->newsxP = FALSE;
|
||||
}
|
||||
|
||||
/* cleanup */
|
||||
@ -402,8 +399,8 @@ gnc_sxed_check_changed( SchedXactionEditorDialog *sxed )
|
||||
}
|
||||
sxEndDate = *xaccSchedXactionGetEndDate( sxed->sx );
|
||||
g_date_set_time( &dlgEndDate,
|
||||
gnome_date_edit_get_date( sxed->
|
||||
endDateEntry ) );
|
||||
gnc_date_edit_get_date( sxed->
|
||||
endDateEntry ) );
|
||||
|
||||
if ( g_date_compare( &sxEndDate, &dlgEndDate ) != 0 ) {
|
||||
return TRUE;
|
||||
@ -791,8 +788,8 @@ gnc_sxed_check_consistent( SchedXactionEditorDialog *sxed )
|
||||
g_date_clear( &endDate, 1 );
|
||||
if ( gtk_toggle_button_get_active(sxed->optEndDate) ) {
|
||||
g_date_set_time( &endDate,
|
||||
gnome_date_edit_get_date( sxed->
|
||||
endDateEntry ) );
|
||||
gnc_date_edit_get_date( sxed->
|
||||
endDateEntry ) );
|
||||
}
|
||||
|
||||
/* Now, see if the user is attempting to create a SX that can't exist
|
||||
@ -847,7 +844,9 @@ gnc_sxed_save_sx( SchedXactionEditorDialog *sxed )
|
||||
|
||||
if ( gtk_toggle_button_get_active(sxed->optEndDate) ) {
|
||||
/* get the end date data */
|
||||
g_date_set_time( &gdate, gnome_date_edit_get_date( sxed->endDateEntry ) );
|
||||
g_date_set_time( &gdate,
|
||||
gnc_date_edit_get_date(
|
||||
sxed->endDateEntry ) );
|
||||
xaccSchedXactionSetEndDate( sxed->sx, &gdate );
|
||||
/* set the num occurances data */
|
||||
xaccSchedXactionSetNumOccur( sxed->sx, 0 );
|
||||
@ -968,9 +967,6 @@ scheduledxaction_editor_dialog_destroy(GtkObject *object, gpointer data)
|
||||
if (sxed == NULL)
|
||||
return;
|
||||
|
||||
DEBUG( "(gsr)%p, (gsr->window)%p",
|
||||
sxed->gsr, sxed->gsr->window );
|
||||
|
||||
gnc_unregister_gui_component_by_data
|
||||
(DIALOG_SCHEDXACTION_EDITOR_CM_CLASS, sxed);
|
||||
|
||||
@ -1143,19 +1139,18 @@ sxed_close_event( GnomeDialog *dlg, gpointer ud )
|
||||
{
|
||||
SchedXactionEditorDialog *sxed = (SchedXactionEditorDialog*)ud;
|
||||
|
||||
/* We've already processed the SX, likely because of "ok" being
|
||||
* clicked. */
|
||||
if ( sxed->sx == NULL ) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if ( ! sxed_confirmed_cancel( sxed ) ) {
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
sxed_delete_event( GtkWidget *widget, GdkEvent *evt, gpointer ud )
|
||||
{
|
||||
sxed_close_handler( (SchedXactionEditorDialog*)ud );
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static
|
||||
void
|
||||
gnc_sxed_get_widgets( SchedXactionEditorDialog *sxed )
|
||||
@ -1194,9 +1189,6 @@ gnc_sxed_get_widgets( SchedXactionEditorDialog *sxed )
|
||||
w = glade_xml_get_widget( sxed->gxml, REMAIN_GNOME_NUMENTRY );
|
||||
sxed->endRemainEntry = GNOME_NUMBER_ENTRY(w);
|
||||
|
||||
w = glade_xml_get_widget( sxed->gxml, END_DATE_DATEENTRY );
|
||||
sxed->endDateEntry = GNOME_DATE_EDIT(w);
|
||||
|
||||
}
|
||||
|
||||
SchedXactionEditorDialog *
|
||||
@ -1223,7 +1215,6 @@ gnc_ui_scheduled_xaction_editor_dialog_create( SchedXactionDialog *sxd,
|
||||
{ "rb_enddate", "toggled", endgroup_rb_toggled, GINT_TO_POINTER(END_DATE_OPTION) },
|
||||
{ "rb_num_occur", "toggled", endgroup_rb_toggled, GINT_TO_POINTER(NUM_OCCUR_OPTION) },
|
||||
|
||||
{ END_DATE_DATEENTRY, "date-changed", sxed_excal_update_adapt, NULL },
|
||||
{ REMAIN_ENTRY , "changed", sxed_excal_update_adapt, NULL },
|
||||
|
||||
{ "autocreate_opt", "toggled", autocreate_toggled, NULL },
|
||||
@ -1262,6 +1253,22 @@ gnc_ui_scheduled_xaction_editor_dialog_create( SchedXactionDialog *sxd,
|
||||
sxed->markId = -1;
|
||||
}
|
||||
|
||||
/* Setup the end-date GNC widget */
|
||||
{
|
||||
GtkWidget *endDateBox =
|
||||
glade_xml_get_widget( sxed->gxml, END_DATE_BOX );
|
||||
sxed->endDateEntry =
|
||||
GNC_DATE_EDIT(gnc_date_edit_new( time(NULL),
|
||||
FALSE, FALSE ));
|
||||
gtk_signal_connect( GTK_OBJECT(sxed->endDateEntry),
|
||||
"date-changed",
|
||||
GTK_SIGNAL_FUNC( sxed_excal_update_adapt ),
|
||||
sxed );
|
||||
gtk_box_pack_start( GTK_BOX(endDateBox),
|
||||
GTK_WIDGET(sxed->endDateEntry),
|
||||
TRUE, TRUE, 0 );
|
||||
}
|
||||
|
||||
/* NOTE: this must occur before processing the widget list, defined
|
||||
* above, so the gpointers stored with the advance_ and remind_opts
|
||||
* are correct. */
|
||||
@ -1275,8 +1282,6 @@ gnc_ui_scheduled_xaction_editor_dialog_create( SchedXactionDialog *sxd,
|
||||
|
||||
gtk_signal_connect( GTK_OBJECT(sxed->dialog), "close",
|
||||
GTK_SIGNAL_FUNC(sxed_close_event), 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_FUNC(scheduledxaction_editor_dialog_destroy),
|
||||
sxed );
|
||||
@ -1323,8 +1328,6 @@ gnc_ui_scheduled_xaction_editor_dialog_create( SchedXactionDialog *sxd,
|
||||
gtk_widget_show_all(sxed->dialog);
|
||||
|
||||
gnc_ledger_display_refresh( sxed->ledger );
|
||||
DEBUG( "(sxed)%p, (->window)%p (->gsr)%p",
|
||||
sxed, sxed->dialog, sxed->gsr );
|
||||
|
||||
return sxed;
|
||||
}
|
||||
@ -1451,7 +1454,7 @@ schedXact_editor_populate( SchedXactionEditorDialog *sxed )
|
||||
g_date_to_struct_tm( gd, tmpTm );
|
||||
tmpDate = mktime( tmpTm );
|
||||
g_free( tmpTm );
|
||||
gnome_date_edit_set_time( sxed->endDateEntry, tmpDate );
|
||||
gnc_date_edit_set_time( sxed->endDateEntry, tmpDate );
|
||||
|
||||
set_endgroup_toggle_states( sxed, END_DATE );
|
||||
} else if ( xaccSchedXactionHasOccurDef( sxed->sx ) ) {
|
||||
@ -2125,7 +2128,7 @@ gnc_sxed_update_cal( SchedXactionEditorDialog *sxed )
|
||||
time_t tt;
|
||||
struct tm *tmpTm;
|
||||
endType = DATE_END;
|
||||
tt = gnome_date_edit_get_date( sxed->endDateEntry );
|
||||
tt = gnc_date_edit_get_date( sxed->endDateEntry );
|
||||
tmpTm = g_new0( struct tm, 1 );
|
||||
*tmpTm = *(localtime( &tt ));
|
||||
g_date_set_day( &endDate, tmpTm->tm_mday );
|
||||
|
@ -34,6 +34,7 @@
|
||||
#include "dialog-utils.h"
|
||||
#include "gnc-book.h"
|
||||
#include "gnc-book-p.h"
|
||||
#include "gnc-date-edit.h"
|
||||
#include "gnc-engine-util.h"
|
||||
#include "gnc-ui-util.h"
|
||||
#include "gnc-dense-cal.h"
|
||||
@ -46,18 +47,22 @@
|
||||
#define SXFTD_NEVER_END_BUTTON "never_end_button"
|
||||
#define SXFTD_END_ON_DATE_BUTTON "end_on_date_button"
|
||||
#define SXFTD_N_OCCURRENCES_BUTTON "n_occurrences_button"
|
||||
#define SXFTD_PARAM_TABLE "param_table"
|
||||
#define SXFTD_NAME_ENTRY "name_entry"
|
||||
#define SXFTD_N_OCCURRENCES_ENTRY "n_occurrences_entry"
|
||||
#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"
|
||||
#define SXFTD_EX_CAL_FRAME "ex_cal_frame"
|
||||
#define SXFTD_END_DATE_BOX "end_date_hbox"
|
||||
|
||||
#define SXFTD_EXCAL_NUM_MONTHS 4
|
||||
#define SXFTD_EXCAL_MONTHS_PER_COL 4
|
||||
|
||||
static short module = MOD_SX;
|
||||
|
||||
/** start_date_edit, end_date_edit, param_table, end_date_hbox */
|
||||
|
||||
static void sxftd_ok_clicked(GtkWidget *w, gpointer user_data);
|
||||
static void sxftd_freq_option_changed( GtkWidget *w, gpointer user_data );
|
||||
static void sxftd_advanced_clicked(GtkWidget *w, gpointer user_data);
|
||||
@ -89,6 +94,8 @@ typedef struct
|
||||
GDate **cal_marks;
|
||||
gint mark_id;
|
||||
|
||||
GNCDateEdit *startDateGDE, *endDateGDE;
|
||||
|
||||
} SXFromTransInfo;
|
||||
|
||||
typedef struct
|
||||
@ -119,10 +126,8 @@ sxfti_attach_callbacks(SXFromTransInfo *sxfti)
|
||||
{
|
||||
/* Whenever any of the controls change, we want to update the
|
||||
* calendar. */
|
||||
{ SXFTD_START_DATE_EDIT, "date-changed", sxftd_update_excal_adapt },
|
||||
{ SXFTD_NEVER_END_BUTTON, "clicked", sxftd_update_excal_adapt },
|
||||
{ SXFTD_END_ON_DATE_BUTTON, "clicked", sxftd_update_excal_adapt },
|
||||
{ SXFTD_END_DATE_EDIT, "date-changed", sxftd_update_excal_adapt },
|
||||
{ SXFTD_N_OCCURRENCES_BUTTON, "clicked", sxftd_update_excal_adapt },
|
||||
{ SXFTD_N_OCCURRENCES_ENTRY, "changed", sxftd_update_excal_adapt },
|
||||
|
||||
@ -168,10 +173,7 @@ sxftd_get_end_info(SXFromTransInfo *sxfti)
|
||||
time_t end_tt;
|
||||
retval.type = END_ON_DATE;
|
||||
g_date_clear( &(retval.end_date), 1 );
|
||||
|
||||
w = glade_xml_get_widget(sxfti->gxml, SXFTD_END_DATE_EDIT);
|
||||
end_tt = gnome_date_edit_get_date(GNOME_DATE_EDIT(w));
|
||||
|
||||
end_tt = gnc_date_edit_get_date(sxfti->endDateGDE);
|
||||
g_date_set_time( &(retval.end_date), end_tt);
|
||||
return retval;
|
||||
}
|
||||
@ -351,13 +353,42 @@ sxftd_init( SXFromTransInfo *sxfti )
|
||||
}
|
||||
}
|
||||
|
||||
/* Setup the start and end dates as GNCDateEdits */
|
||||
{
|
||||
GtkWidget *paramTable = glade_xml_get_widget( sxfti->gxml,
|
||||
SXFTD_PARAM_TABLE );
|
||||
sxfti->startDateGDE =
|
||||
GNC_DATE_EDIT( gnc_date_edit_new( time( NULL ),
|
||||
FALSE, FALSE ) );
|
||||
gtk_table_attach( GTK_TABLE(paramTable),
|
||||
GTK_WIDGET( sxfti->startDateGDE ),
|
||||
1, 2, 2, 3,
|
||||
(GTK_EXPAND | GTK_FILL),
|
||||
GTK_FILL,
|
||||
0, 0 );
|
||||
gtk_signal_connect( GTK_OBJECT( sxfti->startDateGDE ), "date-changed",
|
||||
GTK_SIGNAL_FUNC( sxftd_update_excal_adapt ),
|
||||
sxfti );
|
||||
}
|
||||
{
|
||||
GtkWidget *endDateBox = glade_xml_get_widget( sxfti->gxml,
|
||||
SXFTD_END_DATE_BOX );
|
||||
sxfti->endDateGDE =
|
||||
GNC_DATE_EDIT( gnc_date_edit_new( time( NULL ),
|
||||
FALSE, FALSE ) );
|
||||
gtk_box_pack_start( GTK_BOX( endDateBox ),
|
||||
GTK_WIDGET( sxfti->endDateGDE ),
|
||||
FALSE, TRUE, 0 );
|
||||
gtk_signal_connect( GTK_OBJECT( sxfti->endDateGDE ), "date-changed",
|
||||
GTK_SIGNAL_FUNC( sxftd_update_excal_adapt ),
|
||||
sxfti );
|
||||
}
|
||||
|
||||
/* Get the name from the transaction, try that as the initial SX name. */
|
||||
transName = xaccTransGetDescription( sxfti->trans );
|
||||
xaccSchedXactionSetName( sxfti->sx, transName );
|
||||
|
||||
/* Setup the initial start date for user display/confirmation */
|
||||
w = glade_xml_get_widget( sxfti->gxml, SXFTD_START_DATE_EDIT );
|
||||
|
||||
/* compute good initial date. */
|
||||
start_tt = xaccTransGetDate( sxfti->trans );
|
||||
g_date_set_time( &date, start_tt );
|
||||
@ -365,12 +396,11 @@ sxftd_init( SXFromTransInfo *sxfti )
|
||||
sxftd_update_fs( sxfti, &date, fs );
|
||||
xaccFreqSpecGetNextInstance( fs, &date, &nextDate );
|
||||
|
||||
w = glade_xml_get_widget( sxfti->gxml, SXFTD_START_DATE_EDIT );
|
||||
tmpTm = g_new0( struct tm, 1 );
|
||||
g_date_to_struct_tm( &nextDate, tmpTm );
|
||||
start_tt = mktime( tmpTm );
|
||||
g_free( tmpTm );
|
||||
gnome_date_edit_set_time( GNOME_DATE_EDIT(w), start_tt );
|
||||
gnc_date_edit_set_time( sxfti->startDateGDE, start_tt );
|
||||
|
||||
w = glade_xml_get_widget( sxfti->gxml, SXFTD_NAME_ENTRY );
|
||||
pos = 0;
|
||||
@ -413,8 +443,7 @@ sxftd_compute_sx(SXFromTransInfo *sxfti)
|
||||
xaccSchedXactionSetName(sx, name);
|
||||
g_free(name);
|
||||
|
||||
w = glade_xml_get_widget( sxfti->gxml, SXFTD_START_DATE_EDIT );
|
||||
g_date_set_time( &date, gnome_date_edit_get_date( GNOME_DATE_EDIT(w) ) );
|
||||
g_date_set_time( &date, gnc_date_edit_get_date( sxfti->startDateGDE ) );
|
||||
|
||||
fs = xaccFreqSpecMalloc(gnc_get_current_book ());
|
||||
sxftd_update_fs( sxfti, &date, fs );
|
||||
@ -506,7 +535,6 @@ static void
|
||||
sxftd_freq_option_changed( GtkWidget *w, gpointer user_data )
|
||||
{
|
||||
SXFromTransInfo *sxfti = (SXFromTransInfo*)user_data;
|
||||
GtkWidget *start_date;
|
||||
GDate date, nextDate;
|
||||
time_t tmp_tt;
|
||||
struct tm *tmpTm;
|
||||
@ -519,12 +547,11 @@ sxftd_freq_option_changed( GtkWidget *w, gpointer user_data )
|
||||
sxftd_update_fs( sxfti, &date, fs );
|
||||
xaccFreqSpecGetNextInstance( fs, &date, &nextDate );
|
||||
|
||||
start_date = glade_xml_get_widget( sxfti->gxml, SXFTD_START_DATE_EDIT );
|
||||
tmpTm = g_new0( struct tm, 1 );
|
||||
g_date_to_struct_tm( &nextDate, tmpTm );
|
||||
tmp_tt = mktime( tmpTm );
|
||||
g_free( tmpTm );
|
||||
gnome_date_edit_set_time( GNOME_DATE_EDIT(start_date), tmp_tt );
|
||||
gnc_date_edit_set_time( sxfti->startDateGDE, tmp_tt );
|
||||
|
||||
xaccFreqSpecFree( fs );
|
||||
sxftd_update_example_cal( sxfti );
|
||||
@ -619,7 +646,6 @@ static
|
||||
void
|
||||
sxftd_update_example_cal( SXFromTransInfo *sxfti )
|
||||
{
|
||||
GtkWidget *start_date;
|
||||
struct tm *tmpTm;
|
||||
time_t tmp_tt;
|
||||
GDate date, startDate;
|
||||
@ -633,8 +659,7 @@ sxftd_update_example_cal( SXFromTransInfo *sxfti )
|
||||
fs = xaccFreqSpecMalloc( gnc_get_current_book() );
|
||||
get = sxftd_get_end_info( sxfti );
|
||||
|
||||
start_date = glade_xml_get_widget( sxfti->gxml, SXFTD_START_DATE_EDIT );
|
||||
tmp_tt = gnome_date_edit_get_date( GNOME_DATE_EDIT(start_date) );
|
||||
tmp_tt = gnc_date_edit_get_date( sxfti->startDateGDE );
|
||||
tmpTm = g_new0( struct tm, 1 );
|
||||
*tmpTm = *localtime( &tmp_tt );
|
||||
/* go one day before what's in the box so we can get the correct start
|
||||
|
@ -3512,8 +3512,6 @@ create_autoCreate_ledger( sxSinceLastData *sxsld )
|
||||
4,
|
||||
(CREATE_TOOLBAR | CREATE_POPUP),
|
||||
CAP_SCHEDULE ) );
|
||||
DEBUG( "(ac gsr)%p", sxsld->ac_gsr );
|
||||
|
||||
vbox = glade_xml_get_widget( sxsld->gxml, AUTO_CREATE_VBOX );
|
||||
toolbar = gnc_split_reg_get_toolbar( sxsld->ac_gsr );
|
||||
|
||||
@ -3549,7 +3547,6 @@ create_created_ledger( sxSinceLastData *sxsld )
|
||||
( CREATE_TOOLBAR | CREATE_POPUP ),
|
||||
CAP_SCHEDULE ) );
|
||||
|
||||
DEBUG( "(created gsr)%p", sxsld->created_gsr );
|
||||
vbox = glade_xml_get_widget( sxsld->gxml, CREATED_VBOX );
|
||||
toolbar = gnc_split_reg_get_toolbar( sxsld->created_gsr );
|
||||
|
||||
@ -3573,7 +3570,6 @@ sxsld_jump_to_real_txn( GNCSplitReg *gsr, gpointer ud )
|
||||
Account *leader;
|
||||
Split *split;
|
||||
sxSinceLastData *sxsld = (sxSinceLastData*)ud;
|
||||
DEBUG( "FIXME: Should jump to the actual, not the fake, txn." );
|
||||
reg = gnc_ledger_display_get_split_register( sxsld
|
||||
->to_create_ledger );
|
||||
|
||||
@ -3659,7 +3655,6 @@ create_to_create_ledger( sxSinceLastData *sxsld )
|
||||
GTK_SIGNAL_FUNC( sxsld_jump_to_real_txn ),
|
||||
sxsld );
|
||||
|
||||
DEBUG( "(to_create gsr)%p", sxsld->to_create_gsr );
|
||||
txn_reg_frame = glade_xml_get_widget( sxsld->gxml, TO_CREATE_TXN_REG_FRAME );
|
||||
gtk_container_add( GTK_CONTAINER( txn_reg_frame ),
|
||||
GTK_WIDGET( sxsld->to_create_gsr ) );
|
||||
|
@ -61,7 +61,7 @@
|
||||
# define ORIG_PRINC_ENTRY "orig_princ_ent"
|
||||
# define IRATE_SPIN "irate_spin"
|
||||
# define VAR_CONTAINER "type_freq_frame"
|
||||
# define START_DATE "start_gde"
|
||||
//# define START_DATE "start_gde"
|
||||
# define LENGTH_SPIN "len_spin"
|
||||
# define LENGTH_OPT "len_opt"
|
||||
# define REMAIN_SPIN "rem_spin"
|
||||
@ -216,7 +216,7 @@ typedef struct LoanDruidData_ {
|
||||
GtkOptionMenu *prmType;
|
||||
GtkFrame *prmVarFrame;
|
||||
GNCFrequency *prmVarGncFreq;
|
||||
GnomeDateEdit *prmStartDateGDE;
|
||||
GNCDateEdit *prmStartDateGDE;
|
||||
GtkSpinButton *prmLengthSpin;
|
||||
GtkOptionMenu *prmLengthType;
|
||||
GtkSpinButton *prmRemainSpin;
|
||||
@ -353,6 +353,19 @@ gnc_ui_sx_loan_druid_create(void)
|
||||
}
|
||||
}
|
||||
|
||||
/* The GNCDateEdit */
|
||||
{
|
||||
ldd->prmStartDateGDE =
|
||||
GNC_DATE_EDIT(
|
||||
gnc_date_edit_new( time(NULL),
|
||||
FALSE, FALSE ) );
|
||||
gtk_table_attach( ldd->prmTable,
|
||||
GTK_WIDGET( ldd->prmStartDateGDE ),
|
||||
1, 2, 4, 5,
|
||||
(GTK_EXPAND | GTK_FILL),
|
||||
GTK_FILL, 0, 0 );
|
||||
}
|
||||
|
||||
gtk_widget_set_sensitive( GTK_WIDGET(ldd->prmVarFrame), FALSE );
|
||||
|
||||
{
|
||||
@ -644,8 +657,8 @@ gnc_loan_druid_get_widgets( LoanDruidData *ldd )
|
||||
GET_CASTED_WIDGET( GTK_SPIN_BUTTON, IRATE_SPIN );
|
||||
ldd->prmVarFrame =
|
||||
GET_CASTED_WIDGET( GTK_FRAME, VAR_CONTAINER );
|
||||
ldd->prmStartDateGDE =
|
||||
GET_CASTED_WIDGET( GNOME_DATE_EDIT, START_DATE );
|
||||
/*ldd->prmStartDateGDE =
|
||||
GET_CASTED_WIDGET( GNOME_DATE_EDIT, START_DATE );*/
|
||||
ldd->prmLengthSpin =
|
||||
GET_CASTED_WIDGET( GTK_SPIN_BUTTON, LENGTH_SPIN );
|
||||
ldd->prmLengthType =
|
||||
@ -860,7 +873,7 @@ ld_info_save( GnomeDruidPage *gdp, gpointer arg1, gpointer ud )
|
||||
time_t tmpTT;
|
||||
struct tm *tmpTm;
|
||||
|
||||
tmpTT = gnome_date_edit_get_date( ldd->prmStartDateGDE );
|
||||
tmpTT = gnc_date_edit_get_date( ldd->prmStartDateGDE );
|
||||
tmpTm = localtime( &tmpTT );
|
||||
g_date_set_dmy( ldd->ld.startDate,
|
||||
tmpTm->tm_mday,
|
||||
@ -904,8 +917,8 @@ ld_info_prep( GnomeDruidPage *gdp, gpointer arg1, gpointer ud )
|
||||
tmpTm = g_new0( struct tm, 1 );
|
||||
|
||||
g_date_to_struct_tm( ldd->ld.startDate, tmpTm );
|
||||
gnome_date_edit_set_time( ldd->prmStartDateGDE,
|
||||
mktime(tmpTm) );
|
||||
gnc_date_edit_set_time( ldd->prmStartDateGDE,
|
||||
mktime(tmpTm) );
|
||||
g_free( tmpTm );
|
||||
}
|
||||
|
||||
@ -1624,7 +1637,7 @@ ld_calc_upd_rem_payments( GtkWidget *w, gpointer ud )
|
||||
|
||||
g_date_clear( &start, 1 );
|
||||
g_date_clear( &now, 1 );
|
||||
g_date_set_time( &start, gnome_date_edit_get_date( ldd->prmStartDateGDE ) );
|
||||
g_date_set_time( &start, gnc_date_edit_get_date( ldd->prmStartDateGDE ) );
|
||||
g_date_set_time( &now, time(NULL) );
|
||||
for ( i=0; g_date_compare( &start, &now ) < 0; i++ ) {
|
||||
g_date_add_months( &start, 1 );
|
||||
|
@ -470,7 +470,7 @@
|
||||
|
||||
<widget>
|
||||
<class>GtkHBox</class>
|
||||
<name>hbox160</name>
|
||||
<name>end_date_hbox</name>
|
||||
<homogeneous>False</homogeneous>
|
||||
<spacing>0</spacing>
|
||||
|
||||
@ -492,18 +492,7 @@
|
||||
</widget>
|
||||
|
||||
<widget>
|
||||
<class>GnomeDateEdit</class>
|
||||
<name>sxe_end_date</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>False</fill>
|
||||
</child>
|
||||
<class>Placeholder</class>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
@ -740,7 +729,7 @@
|
||||
|
||||
<widget>
|
||||
<class>GtkTable</class>
|
||||
<name>table1</name>
|
||||
<name>gncfreq_table</name>
|
||||
<rows>2</rows>
|
||||
<columns>2</columns>
|
||||
<homogeneous>False</homogeneous>
|
||||
@ -837,30 +826,6 @@ Yearly
|
||||
<yfill>False</yfill>
|
||||
</child>
|
||||
</widget>
|
||||
|
||||
<widget>
|
||||
<class>GnomeDateEdit</class>
|
||||
<name>sxe_start_date</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>
|
||||
<left_attach>1</left_attach>
|
||||
<right_attach>2</right_attach>
|
||||
<top_attach>1</top_attach>
|
||||
<bottom_attach>2</bottom_attach>
|
||||
<xpad>0</xpad>
|
||||
<ypad>0</ypad>
|
||||
<xexpand>True</xexpand>
|
||||
<yexpand>False</yexpand>
|
||||
<xshrink>False</xshrink>
|
||||
<yshrink>False</yshrink>
|
||||
<xfill>True</xfill>
|
||||
<yfill>False</yfill>
|
||||
</child>
|
||||
</widget>
|
||||
</widget>
|
||||
|
||||
<widget>
|
||||
@ -3362,7 +3327,7 @@ December
|
||||
|
||||
<widget>
|
||||
<class>GtkTable</class>
|
||||
<name>table2</name>
|
||||
<name>param_table</name>
|
||||
<rows>3</rows>
|
||||
<columns>2</columns>
|
||||
<homogeneous>False</homogeneous>
|
||||
@ -3503,30 +3468,6 @@ Yearly
|
||||
<yfill>False</yfill>
|
||||
</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>
|
||||
<left_attach>1</left_attach>
|
||||
<right_attach>2</right_attach>
|
||||
<top_attach>2</top_attach>
|
||||
<bottom_attach>3</bottom_attach>
|
||||
<xpad>0</xpad>
|
||||
<ypad>0</ypad>
|
||||
<xexpand>True</xexpand>
|
||||
<yexpand>False</yexpand>
|
||||
<xshrink>False</xshrink>
|
||||
<yshrink>False</yshrink>
|
||||
<xfill>True</xfill>
|
||||
<yfill>False</yfill>
|
||||
</child>
|
||||
</widget>
|
||||
</widget>
|
||||
|
||||
<widget>
|
||||
@ -3565,7 +3506,7 @@ Yearly
|
||||
|
||||
<widget>
|
||||
<class>GtkHBox</class>
|
||||
<name>hbox163</name>
|
||||
<name>end_date_hbox</name>
|
||||
<homogeneous>False</homogeneous>
|
||||
<spacing>0</spacing>
|
||||
<child>
|
||||
@ -3590,18 +3531,7 @@ Yearly
|
||||
</widget>
|
||||
|
||||
<widget>
|
||||
<class>GnomeDateEdit</class>
|
||||
<name>end_date_edit</name>
|
||||
<show_time>False</show_time>
|
||||
<use_24_format>True</use_24_format>
|
||||
<week_start_monday>False</week_start_monday>
|
||||
<lower_hour>0</lower_hour>
|
||||
<upper_hour>23</upper_hour>
|
||||
<child>
|
||||
<padding>0</padding>
|
||||
<expand>False</expand>
|
||||
<fill>False</fill>
|
||||
</child>
|
||||
<class>Placeholder</class>
|
||||
</widget>
|
||||
</widget>
|
||||
|
||||
@ -4666,13 +4596,7 @@ years
|
||||
</child>
|
||||
|
||||
<widget>
|
||||
<class>GnomeDateEdit</class>
|
||||
<name>start_gde</name>
|
||||
<show_time>False</show_time>
|
||||
<use_24_format>False</use_24_format>
|
||||
<week_start_monday>False</week_start_monday>
|
||||
<lower_hour>7</lower_hour>
|
||||
<upper_hour>19</upper_hour>
|
||||
<class>Placeholder</class>
|
||||
</widget>
|
||||
</widget>
|
||||
|
||||
|
@ -485,14 +485,6 @@ gsr_create_toolbar( GNCSplitReg *gsr )
|
||||
}
|
||||
}
|
||||
|
||||
static
|
||||
void
|
||||
gsr_foobar( GtkWidget *w, gpointer ud )
|
||||
{
|
||||
DEBUG( "Happiness is being destroyed (widget)%p, (ud)%p",
|
||||
w, ud );
|
||||
}
|
||||
|
||||
static
|
||||
void
|
||||
gsr_create_table( GNCSplitReg *gsr )
|
||||
@ -521,10 +513,6 @@ gsr_create_table( GNCSplitReg *gsr )
|
||||
GTK_SIGNAL_FUNC(gsr_redraw_all_cb), gsr);
|
||||
gtk_signal_connect (GTK_OBJECT(gsr->reg), "redraw_help",
|
||||
GTK_SIGNAL_FUNC(gsr_emit_help_changed), gsr);
|
||||
|
||||
|
||||
gtk_signal_connect (GTK_OBJECT(gsr->reg), "destroy",
|
||||
GTK_SIGNAL_FUNC(gsr_foobar), gsr);
|
||||
}
|
||||
|
||||
static
|
||||
@ -808,8 +796,6 @@ gnc_split_reg_ld_destroy( GNCLedgerDisplay *ledger )
|
||||
gnc_table_save_state (reg->table);
|
||||
|
||||
gtk_widget_hide_all( gsr->window );
|
||||
DEBUG( "destroying (gsr)%p (->window)%p with ledger %p",
|
||||
gsr, gsr->window, ledger );
|
||||
gtk_widget_destroy( gsr->window );
|
||||
}
|
||||
gnc_ledger_display_set_user_data (ledger, NULL);
|
||||
@ -2116,9 +2102,6 @@ gnc_split_reg_get_parent( GNCLedgerDisplay *ledger )
|
||||
if (gsr == NULL)
|
||||
return NULL;
|
||||
|
||||
DEBUG( "(ledger)%p parent: (gsr->window)%p",
|
||||
ledger, gsr->window );
|
||||
|
||||
return gsr->window;
|
||||
}
|
||||
|
||||
|
@ -939,9 +939,6 @@ regWindowLedger( GNCLedgerDisplay *ledger )
|
||||
gnc_ledger_display_refresh( regData->ledger );
|
||||
}
|
||||
|
||||
DEBUG( "(regData)%p (->window)%p (->gsr)%p (->ledger)%p",
|
||||
regData, regData->window, regData->gsr, regData->ledger );
|
||||
|
||||
return regData;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user