From ad92d2d9f3657ed1a89639deb57ef7bc2e330cbd Mon Sep 17 00:00:00 2001 From: David Hampton Date: Sun, 21 Sep 2003 02:50:08 +0000 Subject: [PATCH] Fix up druid for changes in GnomeDruid between gnome1 and gnome2. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/branches/gnucash-gnome2-dev@9383 57a11ea4-9604-0410-9ed3-97b8803252fd --- ChangeLog | 16 +++++ src/gnome/druid-loan.c | 55 ++++++++++++---- src/gnome/glade/sched-xact.glade | 106 +++++++++++++++++++++++++------ 3 files changed, 147 insertions(+), 30 deletions(-) diff --git a/ChangeLog b/ChangeLog index 86b51ada30..947986af35 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,19 @@ +2003-09-20 David Hampton + + * src/gnome/druid-loan.c: + * src/gnome/glade/sched-xact.glade: Fix up druid for changes in + GnomeDruid between gnome1 and gnome2. + + * src/gnome-utils/gnc-dense-cal.c: Use deprecated routine to + prevent this code from crashing. Still need to be converted to + use pango routines. + + * src/gnome-utils/gnc-account-sel.c: Don't unregister the event + handler twice. + + * src/gnome-utils/dialog-utils.c: + * src/gnome-utils/gnc-html.c: Work around gcc 3.3.1 brokenness. + 2003-09-19 David Hampton * configure.in: diff --git a/src/gnome/druid-loan.c b/src/gnome/druid-loan.c index af01e9b1df..6129032166 100644 --- a/src/gnome/druid-loan.c +++ b/src/gnome/druid-loan.c @@ -37,6 +37,7 @@ #include "SX-book.h" #include "SX-book-p.h" #include "SX-ttinfo.h" +#include "druid-utils.h" #include "gnc-book.h" #include "gnc-amount-edit.h" #include "gnc-account-sel.h" @@ -63,7 +64,6 @@ #define PG_INTRO "loan_intro_pg" #define PG_INFO "loan_info_pg" # define PARAM_TABLE "param_table" -# define ORIG_PRINC_GNE "orig_princ_gne" # define ORIG_PRINC_ENTRY "orig_princ_ent" # define IRATE_SPIN "irate_spin" # define VAR_CONTAINER "type_freq_frame" @@ -81,7 +81,6 @@ # define FREQ_CONTAINER "freq_frame" #define PG_PAYMENT "payment_pg" # define PAY_TXN_TITLE "pay_txn_title" -# define PAY_AMT_GNE "pay_amt_gne" # define PAY_AMT_ENTRY "pay_amt_ent" # define PAY_TABLE "pay_table" # define PAY_USE_ESCROW "pay_use_escrow" @@ -97,6 +96,7 @@ # define REV_DATE_FRAME "rev_date_frame" # define REV_RANGE_OPT "rev_range_opt" # define REV_RANGE_TABLE "rev_date_range_table" +#define PG_COMMIT "commit_pg" #define OPT_VBOX_SPACING 2 @@ -279,7 +279,6 @@ typedef struct LoanDruidData_ { /* pay = payment[s] */ GtkEntry *payTxnName; - GtkEntry *payAmtGNE; GtkEntry *payAmtEntry; GNCAccountSel *payAcctFromGAS; GNCAccountSel *payAcctEscToGAS; @@ -388,7 +387,10 @@ static gboolean ld_pay_back ( GnomeDruidPage *gdp, gpointer arg1, gpointer ud ); static gboolean ld_rev_next ( GnomeDruidPage *gdp, gpointer arg1, gpointer ud ); static void ld_rev_prep ( GnomeDruidPage *gdp, gpointer arg1, gpointer ud ); static gboolean ld_rev_back ( GnomeDruidPage *gdp, gpointer arg1, gpointer ud ); -static void ld_rev_fin ( GnomeDruidPage *gdp, gpointer arg1, gpointer ud ); +static gboolean ld_com_next ( GnomeDruidPage *gdp, gpointer arg1, gpointer ud ); +static void ld_com_prep ( GnomeDruidPage *gdp, gpointer arg1, gpointer ud ); +static gboolean ld_com_back ( GnomeDruidPage *gdp, gpointer arg1, gpointer ud ); +static void ld_com_fin ( GnomeDruidPage *gdp, gpointer arg1, gpointer ud ); static void ld_create_sxes( LoanDruidData *ldd ); static gint ld_find_ttsplit_with_acct( gconstpointer elt, @@ -410,6 +412,7 @@ gnc_ui_sx_loan_druid_create(void) ldd->dialog = glade_xml_get_widget( ldd->gxml, LOAN_DRUID_WIN_GLADE_NAME ); ldd->druid = GNOME_DRUID(glade_xml_get_widget( ldd->gxml, LOAN_DRUID_GLADE_NAME )); + gnc_druid_set_colors (ldd->druid); /* get pointers to the various widgets */ gnc_loan_druid_get_widgets( ldd ); @@ -703,7 +706,8 @@ gnc_ui_sx_loan_druid_create(void) { PG_OPTS, ld_opts_tran, ld_opts_prep, ld_opts_tran, NULL }, { PG_REPAYMENT, ld_rep_next, ld_rep_prep, ld_rep_back, NULL }, { PG_PAYMENT, ld_pay_next, ld_pay_prep, ld_pay_back, NULL }, - { PG_REVIEW, ld_rev_next, ld_rev_prep, ld_rev_back, ld_rev_fin }, + { PG_REVIEW, ld_rev_next, ld_rev_prep, ld_rev_back, NULL }, + { PG_COMMIT, ld_com_next, ld_com_prep, ld_com_back, ld_com_fin }, { NULL } }; @@ -859,8 +863,6 @@ gnc_loan_druid_get_widgets( LoanDruidData *ldd ) /* pay = payment[s] */ ldd->payTxnName = GET_CASTED_WIDGET( GTK_ENTRY, PAY_TXN_TITLE ); - ldd->payAmtGNE = - GET_CASTED_WIDGET( GTK_ENTRY, PAY_AMT_GNE ); ldd->payAmtEntry = GET_CASTED_WIDGET( GTK_ENTRY, PAY_AMT_ENTRY ); ldd->payTable = @@ -1701,7 +1703,13 @@ static gboolean ld_rev_next( GnomeDruidPage *gdp, gpointer arg1, gpointer ud ) { - g_assert( FALSE ); + LoanDruidData *ldd; + + ldd = (LoanDruidData*)ud; + gnome_druid_set_page( ldd->druid, + GNOME_DRUID_PAGE( + glade_xml_get_widget( ldd->gxml, + PG_COMMIT ) ) ); return TRUE; } @@ -1716,7 +1724,6 @@ ld_rev_prep( GnomeDruidPage *gdp, gpointer arg1, gpointer ud ) int i; ldd = (LoanDruidData*)ud; - gnome_druid_set_show_finish( ldd->druid, TRUE ); /* Cleanup old clist */ if ( ldd->revCL != NULL ) { @@ -1792,8 +1799,6 @@ ld_rev_back( GnomeDruidPage *gdp, gpointer arg1, gpointer ud ) LoanDruidData *ldd = (LoanDruidData*)ud; int i; - gnome_druid_set_show_finish( ldd->druid, FALSE ); - /* Get the correct page based on the repayment state. */ /* go back through opts list and select next enabled options. */ for ( i = ldd->currentIdx; @@ -1815,9 +1820,35 @@ ld_rev_back( GnomeDruidPage *gdp, gpointer arg1, gpointer ud ) return TRUE; } +static +gboolean +ld_com_next( GnomeDruidPage *gdp, gpointer arg1, gpointer ud ) +{ + g_assert( FALSE ); + return TRUE; +} + static void -ld_rev_fin( GnomeDruidPage *gdp, gpointer arg1, gpointer ud ) +ld_com_prep( GnomeDruidPage *gdp, gpointer arg1, gpointer ud ) +{ +} + +static +gboolean +ld_com_back( GnomeDruidPage *gdp, gpointer arg1, gpointer ud ) +{ + LoanDruidData *ldd = (LoanDruidData*)ud; + gnome_druid_set_page( ldd->druid, + GNOME_DRUID_PAGE( + glade_xml_get_widget( ldd->gxml, + PG_REVIEW ) ) ); + return TRUE; +} + +static +void +ld_com_fin( GnomeDruidPage *gdp, gpointer arg1, gpointer ud ) { LoanDruidData *ldd = (LoanDruidData*)ud; ld_create_sxes( ldd ); diff --git a/src/gnome/glade/sched-xact.glade b/src/gnome/glade/sched-xact.glade index 2579d94815..9459584e5e 100644 --- a/src/gnome/glade/sched-xact.glade +++ b/src/gnome/glade/sched-xact.glade @@ -574,7 +574,7 @@ - + True True True @@ -614,7 +614,7 @@ - + True True True @@ -4744,13 +4744,59 @@ GTK_CORNER_TOP_LEFT - + True True - True - False - False - True + 3 + 127,140,80 + GTK_SELECTION_SINGLE + True + GTK_SHADOW_IN + + + + Name + False + False + GTK_JUSTIFY_CENTER + False + False + 0.5 + 0.5 + 0 + 0 + + + + + + Frequency + False + False + GTK_JUSTIFY_CENTER + False + False + 0.5 + 0.5 + 0 + 0 + + + + + + Next Occurrence + False + False + GTK_JUSTIFY_CENTER + False + False + 0.5 + 0.5 + 0 + 0 + + @@ -6740,7 +6786,7 @@ If you make a mistake or want to make changes later, you can edit the created Scheduled Transactions directly. #ffffffffffff #000000000000 - #191919197070 + #666666669998 #ffffffffffff #ffffffffffff @@ -6750,8 +6796,8 @@ the created Scheduled Transactions directly. True Loan Information - #dab0083bd8c8 - #f128083be9eb + #ffffffffffff + #666666669998 #1df0081d0001 @@ -7179,8 +7225,8 @@ the created Scheduled Transactions directly. True Options - #87a0083cd8c8 - #9a70083ce9eb + #ffffffffffff + #666666669998 #1df0081d0001 @@ -7329,8 +7375,8 @@ the created Scheduled Transactions directly. True Repayment - #c160083cd8c8 - #cec0083ce9eb + #ffffffffffff + #666666669998 #1df0081d0001 @@ -7599,8 +7645,8 @@ the created Scheduled Transactions directly. True Repayment Type - #2618083dd8c8 - #0e20083de9eb + #ffffffffffff + #666666669998 #1df0081d0001 @@ -7764,6 +7810,20 @@ the created Scheduled Transactions directly. 0.5 1 1 + + + + True + True + True + True + 0 + + True + * + False + + 1 @@ -8009,8 +8069,8 @@ the created Scheduled Transactions directly. True Review - #b458083dd8c8 - #b1b0083de9eb + #ffffffffffff + #666666669998 #1df0081d0001 @@ -8260,6 +8320,16 @@ the created Scheduled Transactions directly. + + + + True + GNOME_EDGE_FINISH + Press apply to commit these changes. + #666666669998 + #666666669998 + +