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
This commit is contained in:
David Hampton
2003-09-21 02:50:08 +00:00
parent 102eaee9d5
commit ad92d2d9f3
3 changed files with 147 additions and 30 deletions

View File

@@ -1,3 +1,19 @@
2003-09-20 David Hampton <hampton@employees.org>
* 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 <hampton@employees.org>
* configure.in:

View File

@@ -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 );

View File

@@ -574,7 +574,7 @@
</child>
<child>
<widget class="GtkEntry" id="end_gnome_nentry">
<widget class="GtkEntry" id="end_nentry">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="editable">True</property>
@@ -614,7 +614,7 @@
</child>
<child>
<widget class="GtkEntry" id="remain_gnome_nentry">
<widget class="GtkEntry" id="remain_nentry">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="editable">True</property>
@@ -4744,13 +4744,59 @@
<property name="window_placement">GTK_CORNER_TOP_LEFT</property>
<child>
<widget class="GtkTreeView" id="sched_xact_list">
<widget class="GtkCList" id="sched_xact_list">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="headers_visible">True</property>
<property name="rules_hint">False</property>
<property name="reorderable">False</property>
<property name="enable_search">True</property>
<property name="n_columns">3</property>
<property name="column_widths">127,140,80</property>
<property name="selection_mode">GTK_SELECTION_SINGLE</property>
<property name="show_titles">True</property>
<property name="shadow_type">GTK_SHADOW_IN</property>
<child>
<widget class="GtkLabel" id="label847750">
<property name="label" translatable="yes">Name</property>
<property name="use_underline">False</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_CENTER</property>
<property name="wrap">False</property>
<property name="selectable">False</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
</widget>
</child>
<child>
<widget class="GtkLabel" id="label847751">
<property name="label" translatable="yes">Frequency</property>
<property name="use_underline">False</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_CENTER</property>
<property name="wrap">False</property>
<property name="selectable">False</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
</widget>
</child>
<child>
<widget class="GtkLabel" id="label847752">
<property name="label" translatable="yes">Next Occurrence</property>
<property name="use_underline">False</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_CENTER</property>
<property name="wrap">False</property>
<property name="selectable">False</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
</widget>
</child>
</widget>
</child>
</widget>
@@ -6740,7 +6786,7 @@ If you make a mistake or want to make changes later, you can edit
the created Scheduled Transactions directly.</property>
<property name="title_color">#ffffffffffff</property>
<property name="text_color">#000000000000</property>
<property name="background_color">#191919197070</property>
<property name="background_color">#666666669998</property>
<property name="logo_background_color">#ffffffffffff</property>
<property name="textbox_color">#ffffffffffff</property>
</widget>
@@ -6750,8 +6796,8 @@ the created Scheduled Transactions directly.</property>
<widget class="GnomeDruidPageStandard" id="loan_info_pg">
<property name="visible">True</property>
<property name="title" translatable="yes">Loan Information</property>
<property name="title_foreground">#dab0083bd8c8</property>
<property name="background">#f128083be9eb</property>
<property name="title_foreground">#ffffffffffff</property>
<property name="background">#666666669998</property>
<property name="logo_background">#1df0081d0001</property>
<child internal-child="vbox">
@@ -7179,8 +7225,8 @@ the created Scheduled Transactions directly.</property>
<widget class="GnomeDruidPageStandard" id="loan_opts_pg">
<property name="visible">True</property>
<property name="title" translatable="yes">Options</property>
<property name="title_foreground">#87a0083cd8c8</property>
<property name="background">#9a70083ce9eb</property>
<property name="title_foreground">#ffffffffffff</property>
<property name="background">#666666669998</property>
<property name="logo_background">#1df0081d0001</property>
<child internal-child="vbox">
@@ -7329,8 +7375,8 @@ the created Scheduled Transactions directly.</property>
<widget class="GnomeDruidPageStandard" id="repayment_pg">
<property name="visible">True</property>
<property name="title" translatable="yes">Repayment</property>
<property name="title_foreground">#c160083cd8c8</property>
<property name="background">#cec0083ce9eb</property>
<property name="title_foreground">#ffffffffffff</property>
<property name="background">#666666669998</property>
<property name="logo_background">#1df0081d0001</property>
<child internal-child="vbox">
@@ -7599,8 +7645,8 @@ the created Scheduled Transactions directly.</property>
<widget class="GnomeDruidPageStandard" id="payment_pg">
<property name="visible">True</property>
<property name="title" translatable="yes">Repayment Type</property>
<property name="title_foreground">#2618083dd8c8</property>
<property name="background">#0e20083de9eb</property>
<property name="title_foreground">#ffffffffffff</property>
<property name="background">#666666669998</property>
<property name="logo_background">#1df0081d0001</property>
<child internal-child="vbox">
@@ -7764,6 +7810,20 @@ the created Scheduled Transactions directly.</property>
<property name="yalign">0.5</property>
<property name="xscale">1</property>
<property name="yscale">1</property>
<child>
<widget class="GtkEntry" id="pay_amt_ent">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="editable">True</property>
<property name="visibility">True</property>
<property name="max_length">0</property>
<property name="text" translatable="yes"></property>
<property name="has_frame">True</property>
<property name="invisible_char" translatable="yes">*</property>
<property name="activates_default">False</property>
</widget>
</child>
</widget>
<packing>
<property name="left_attach">1</property>
@@ -8009,8 +8069,8 @@ the created Scheduled Transactions directly.</property>
<widget class="GnomeDruidPageStandard" id="review_pg">
<property name="visible">True</property>
<property name="title" translatable="yes">Review</property>
<property name="title_foreground">#b458083dd8c8</property>
<property name="background">#b1b0083de9eb</property>
<property name="title_foreground">#ffffffffffff</property>
<property name="background">#666666669998</property>
<property name="logo_background">#1df0081d0001</property>
<child internal-child="vbox">
@@ -8260,6 +8320,16 @@ the created Scheduled Transactions directly.</property>
</child>
</widget>
</child>
<child>
<widget class="GnomeDruidPageEdge" id="commit_pg">
<property name="visible">True</property>
<property name="position">GNOME_EDGE_FINISH</property>
<property name="text" translatable="yes">Press apply to commit these changes.</property>
<property name="background_color">#666666669998</property>
<property name="logo_background_color">#666666669998</property>
</widget>
</child>
</widget>
</child>
</widget>