Bill Gribble's qif merge patch.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@3601 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Dave Peticolas 2001-02-05 23:06:26 +00:00
parent 07de0fee2a
commit 68ef8e0156
16 changed files with 1247 additions and 198 deletions

View File

@ -1,3 +1,34 @@
2001-02-05 Bill Gribble <grib@billgribble.com>
* src/scm/qif-import/qif-merge-groups.scm: new file. Utilities
for detecting duplicate transactions in two account groups.
* src/scm/qif-import/qif-quick-import.scm: new file (unfinished).
A start at a "quick import" facility that will import a single
QIF file with very little interaction.
* src/engine/Group.c: be sure to free account split list and
set to NULL on merge
* src/engine/Query.c: add a new API to get Transactions from a
query instead of splits. you have to specify whether you want
transactions with one split matching the query or all splits
matching the query. More options later.
* src/gnome/druid-qif-import.c : add a few slots to the
QIF window struct and add the extra pages to the dialog to
allow review and selection of duplicate transactions
* src/guile/gnc.gwp: wrap new Query functions and enums; wrap
gnc:group-concat-group
* src/scm/gnc-numeric.scm: add gnc-numeric enumerated types.
They need to be bitwise combined so don't use g-wrap enum
features.
* src/scm/qif-import/qif-to-gnc.scm: change semantics slightly to
put new xtns in a new Group and return it before committing.
2001-02-05 Christian Stimming <stimming@tuhh.de>
* src/scm/html-utilities.scm: Added sorting of accounts according

View File

@ -37,7 +37,7 @@ LDADD = \
${GHTTP_LIBS} \
${GUPPI_LIBS} \
${DB_LIBS} \
${INTLLIBS}
${INTLLIBS}
gnucash_SOURCES = \
MultiLedger.c \

View File

@ -917,7 +917,7 @@ xaccGroupMergeAccounts (AccountGroup *grp)
/* consolidate transactions */
lp = acc_b->splits;
for (lp = acc_b->splits; lp; lp = lp->next)
{
Split *split = lp->data;
@ -928,6 +928,9 @@ xaccGroupMergeAccounts (AccountGroup *grp)
xaccAccountInsertSplit (acc_a, split);
}
g_list_free(acc_b->splits);
acc_b->splits = NULL;
/* move back one before removal */
node_b = node_b->prev;

View File

@ -64,9 +64,12 @@ struct _querystruct {
/* cache the results so we don't have to run the whole search
* again until it's really necessary */
int changed;
int changed;
query_run_t last_run_type;
AccountGroup * acct_group;
GList * split_list;
GList * xtn_list;
};
/*******************************************************************
@ -1084,6 +1087,74 @@ xaccQueryGetSplits(Query * q) {
return matching_splits;
}
/********************************************************************
* xaccQueryGetTransactions
* Get transactions matching the query terms, specifying whether
* we require some or all splits to match
********************************************************************/
static void
query_match_all_filter_func(gpointer key, gpointer value, gpointer user_data) {
Transaction * t = key;
int num_matches = GPOINTER_TO_INT(value);
GList ** matches = user_data;
if(num_matches == xaccTransCountSplits(t)) {
*matches = g_list_prepend(*matches, t);
}
}
static void
query_match_any_filter_func(gpointer key, gpointer value, gpointer user_data) {
Transaction * t = key;
GList ** matches = user_data;
*matches = g_list_prepend(*matches, t);
}
GList *
xaccQueryGetTransactions (Query * q, query_run_t runtype) {
GList * splits = xaccQueryGetSplits(q);
GList * current = NULL;
GList * retval = NULL;
GHashTable * trans_hash = g_hash_table_new(g_direct_hash, g_direct_equal);
Transaction * trans = NULL;
gpointer val = NULL;
int count = 0;
/* iterate over matching splits, incrementing a match-count in
* the hash table */
for(current = splits; current; current=current->next) {
trans = xaccSplitGetParent((Split *)(current->data));
/* don't waste time looking up unless we need the count
* information */
if(runtype == QUERY_MATCH_ALL) {
val = g_hash_table_lookup(trans_hash, trans);
count = GPOINTER_TO_INT(val);
}
g_hash_table_insert(trans_hash, trans, GINT_TO_POINTER(count + 1));
}
/* now pick out the transactions that match */
if(runtype == QUERY_MATCH_ALL) {
g_hash_table_foreach(trans_hash, query_match_all_filter_func,
&retval);
}
else {
g_hash_table_foreach(trans_hash, query_match_any_filter_func,
&retval);
}
/* ATM we rerun the xtn filter every time. Need to add checks and
* updates for using cached results. */
q->last_run_type = runtype;
q->xtn_list = retval;
g_hash_table_destroy(trans_hash);
return retval;
}
/********************************************************************
* xaccQueryAddPredicate

View File

@ -114,6 +114,15 @@ typedef enum {
BALANCE_UNBALANCED = 1 << 1
} balance_match_t;
/* query_run_t describes whether to require all splits or
* any to match for a transaction to be returned by
* xaccQueryGetTransactions */
typedef enum {
QUERY_MATCH_ALL=1,
QUERY_MATCH_ANY=2
} query_run_t;
typedef struct _querystruct Query;
typedef struct {
@ -146,8 +155,8 @@ typedef struct {
pr_type_t term_type;
int sense;
acct_match_t how;
GList *accounts;
GList *account_guids;
GList *accounts;
GList *account_guids;
} AccountPredicateData;
typedef struct {
@ -223,6 +232,7 @@ GList * xaccQueryGetTerms(Query * q);
/* after the query has been set up, call this to run the query */
GList * xaccQueryGetSplits(Query * q);
GList * xaccQueryGetTransactions(Query * q, query_run_t type);
/* handy for debugging */
void xaccQueryPrint(Query *q);

View File

@ -60,12 +60,22 @@ struct _qifimportwindow {
GtkWidget * cat_list;
GtkWidget * currency_picker;
GtkWidget * currency_entry;
GtkWidget * new_transaction_list;
GtkWidget * old_transaction_list;
GtkWidget * start_page;
GtkWidget * loaded_files_page;
GtkWidget * load_file_page;
GtkWidget * date_format_page;
GtkWidget * account_name_page;
GtkWidget * commodity_page;
GtkWidget * account_doc_page;
GtkWidget * account_match_page;
GtkWidget * category_doc_page;
GtkWidget * category_match_page;
GtkWidget * currency_page;
GtkWidget * commodity_doc_page;
GtkWidget * match_doc_page;
GtkWidget * match_duplicates_page;
GtkWidget * end_page;
GList * pages;
@ -81,6 +91,10 @@ struct _qifimportwindow {
SCM gnc_acct_info;
SCM stock_hash;
SCM imported_account_group;
SCM match_transactions;
int selected_transaction;
};
struct _qifdruidpage {
@ -132,7 +146,10 @@ gnc_ui_qif_import_druid_make(void) {
retval->acct_display_info = SCM_BOOL_F;
retval->acct_map_info = SCM_BOOL_F;
retval->stock_hash = SCM_BOOL_F;
retval->imported_account_group = SCM_BOOL_F;
retval->match_transactions = SCM_BOOL_F;
retval->selected_transaction = 0;
retval->druid = gtk_object_get_data(wobj, "qif_import_druid");
retval->filename_entry = gtk_object_get_data(wobj, "qif_filename_entry");
retval->acct_entry = gtk_object_get_data(wobj, "qif_account_entry");
@ -143,12 +160,29 @@ gnc_ui_qif_import_druid_make(void) {
retval->currency_entry = gtk_object_get_data(wobj, "currency_entry");
retval->acct_list = gtk_object_get_data(wobj, "account_page_list");
retval->cat_list = gtk_object_get_data(wobj, "category_page_list");
retval->new_transaction_list =
gtk_object_get_data(wobj, "new_transaction_list");
retval->old_transaction_list =
gtk_object_get_data(wobj, "old_transaction_list");
retval->start_page = gtk_object_get_data(wobj, "start_page");
retval->load_file_page = gtk_object_get_data(wobj, "load_file_page");
retval->loaded_files_page = gtk_object_get_data(wobj, "loaded_files_page");
retval->commodity_page = gtk_object_get_data(wobj, "commodity_page");
retval->account_name_page = gtk_object_get_data(wobj, "account_name_page");
retval->date_format_page = gtk_object_get_data(wobj, "date_format_page");
retval->account_name_page = gtk_object_get_data(wobj, "account_name_page");
retval->account_doc_page = gtk_object_get_data(wobj, "account_doc_page");
retval->account_match_page =
gtk_object_get_data(wobj, "account_match_page");
retval->category_doc_page = gtk_object_get_data(wobj, "category_doc_page");
retval->category_match_page =
gtk_object_get_data(wobj, "category_match_page");
retval->currency_page = gtk_object_get_data(wobj, "currency_page");
retval->commodity_doc_page =
gtk_object_get_data(wobj, "commodity_doc_page");
retval->match_doc_page =
gtk_object_get_data(wobj, "match_doc_page");
retval->match_duplicates_page =
gtk_object_get_data(wobj, "match_duplicates_page");
retval->end_page = gtk_object_get_data(wobj, "end_page");
retval->pages = NULL;
@ -174,6 +208,8 @@ gnc_ui_qif_import_druid_make(void) {
scm_protect_object(retval->acct_display_info);
scm_protect_object(retval->acct_map_info);
scm_protect_object(retval->stock_hash);
scm_protect_object(retval->imported_account_group);
scm_protect_object(retval->match_transactions);
/* set a default currency for new accounts */
gnc_ui_update_commodity_picker(retval->currency_picker,
@ -207,7 +243,9 @@ gnc_ui_qif_import_druid_destroy (QIFImportWindow * window) {
scm_unprotect_object(window->acct_display_info);
scm_unprotect_object(window->acct_map_info);
scm_unprotect_object(window->stock_hash);
scm_unprotect_object(window->imported_account_group);
scm_unprotect_object(window->match_transactions);
g_free(window);
}
@ -964,12 +1002,12 @@ gnc_ui_qif_import_categories_next_cb(GnomeDruidPage * page,
* to the end page */
if(gh_call1(any_stock, wind->acct_map_info) == SCM_BOOL_T) {
gnome_druid_set_page(GNOME_DRUID(wind->druid),
GNOME_DRUID_PAGE(wind->commodity_page));
GNOME_DRUID_PAGE(wind->commodity_doc_page));
return TRUE;
}
else {
gnome_druid_set_page(GNOME_DRUID(wind->druid),
GNOME_DRUID_PAGE(wind->end_page));
GNOME_DRUID_PAGE(wind->match_doc_page));
return TRUE;
}
}
@ -993,7 +1031,7 @@ gnc_ui_qif_import_currency_next_cb(GnomeDruidPage * page,
}
else {
gnome_druid_set_page(GNOME_DRUID(wind->druid),
GNOME_DRUID_PAGE(wind->end_page));
GNOME_DRUID_PAGE(wind->match_doc_page));
return TRUE;
}
}
@ -1045,7 +1083,7 @@ gnc_ui_qif_import_commodity_prepare_cb(GnomeDruidPage * page,
SCM comm_ptr_token;
gnc_commodity * commodity;
GnomeDruidPage * back_page = GNOME_DRUID_PAGE(wind->commodity_page);
GnomeDruidPage * back_page = GNOME_DRUID_PAGE(wind->commodity_doc_page);
QIFDruidPage * new_page;
/* only set up once */
@ -1194,32 +1232,37 @@ make_qif_druid_page(gnc_commodity * comm) {
/****************************************************************
* qif_import_finish_cb
* qif_import_convert_cb
* do the work of actually translating QIF xtns to GNC xtns.
****************************************************************/
void
gnc_ui_qif_import_finish_cb(GnomeDruidPage * gpage,
gpointer arg1,
gpointer user_data) {
SCM save_map_prefs = gh_eval_str("qif-import:save-map-prefs");
gboolean
gnc_ui_qif_import_convert_cb(GnomeDruidPage * gpage,
gpointer arg1,
gpointer user_data) {
SCM qif_to_gnc = gh_eval_str("qif-import:qif-to-gnc");
SCM retval;
SCM find_duplicates = gh_eval_str("gnc:group-find-duplicates");
SCM retval, matches;
SCM current_xtn;
QIFImportWindow * wind =
gtk_object_get_data(GTK_OBJECT(user_data), "qif_window_struct");
QIFDruidPage * page;
GList * pageptr;
Transaction * gnc_xtn;
Split * gnc_split;
char * mnemonic = NULL;
char * namespace = NULL;
char * fullname = NULL;
gchar * row_text[4] = { NULL, NULL, NULL, NULL };
int rownum;
/* get the default currency */
char * currname = gtk_entry_get_text(GTK_ENTRY(wind->currency_entry));
gnc_suspend_gui_refresh ();
/* busy cursor */
gnc_suspend_gui_refresh ();
gnc_set_busy_cursor(NULL);
/* get any changes to the imported stocks */
@ -1237,31 +1280,191 @@ gnc_ui_qif_import_finish_cb(GnomeDruidPage * gpage,
gnc_commodity_table_insert(gnc_engine_commodities(), page->commodity);
}
/* call a scheme function to do the work */
/* call a scheme function to do the work. The return value is an
* account group containing all the new accounts and transactions */
retval = gh_apply(qif_to_gnc,
SCM_LIST5(wind->imported_files,
wind->acct_map_info,
wind->cat_map_info,
wind->stock_hash,
gh_str02scm(currname)));
gnc_unset_busy_cursor(NULL);
if(retval == SCM_BOOL_F) {
gnc_error_dialog_parented(GTK_WINDOW(wind->window),
_("An error occurred while importing "
"QIF transactions into Gnucash. Your data "
"may be in an inconsistent state."));
"QIF transactions into Gnucash. Your "
"accounts are unchanged."));
scm_unprotect_object(wind->imported_account_group);
wind->imported_account_group = SCM_BOOL_F;
scm_protect_object(wind->imported_account_group);
}
else {
/* write out mapping info before destroying the window */
gh_call2(save_map_prefs, wind->acct_map_info, wind->cat_map_info);
}
scm_unprotect_object(wind->imported_account_group);
wind->imported_account_group = retval;
scm_protect_object(wind->imported_account_group);
gnc_unset_busy_cursor(NULL);
gnc_resume_gui_refresh ();
/* now detect duplicate transactions */
gnc_set_busy_cursor(NULL);
retval = gh_call2(find_duplicates,
gh_eval_str("(gnc:get-current-group)"),
wind->imported_account_group);
gnc_unset_busy_cursor(NULL);
scm_unprotect_object(wind->match_transactions);
wind->match_transactions = retval;
scm_protect_object(wind->match_transactions);
/* skip to the last page if we couldn't find duplicates
* in the new group */
if((retval == SCM_BOOL_F) ||
(gh_null_p(retval))) {
gnome_druid_set_page(GNOME_DRUID(wind->druid),
GNOME_DRUID_PAGE(wind->end_page));
gnc_resume_gui_refresh();
return TRUE;
}
/* otherwise, make up the display for the duplicates page */
gtk_clist_clear(GTK_CLIST(wind->new_transaction_list));
gtk_clist_freeze(GTK_CLIST(wind->new_transaction_list));
while(!gh_null_p(retval)) {
current_xtn = gh_caar(retval);
gnc_xtn = (Transaction *)gw_wcp_get_ptr(current_xtn);
gnc_split = xaccTransGetSplit(gnc_xtn, 0);
row_text[0] = gnc_print_date(xaccTransRetDatePostedTS(gnc_xtn));
row_text[1] = xaccTransGetDescription(gnc_xtn);
if(xaccTransCountSplits(gnc_xtn) > 2) {
row_text[2] = g_strdup(_("(split)"));
}
else {
row_text[2] =
xaccPrintAmount(gnc_numeric_abs(xaccSplitGetValue(gnc_split)),
gnc_account_value_print_info
(xaccSplitGetAccount(gnc_split), TRUE));
}
rownum = gtk_clist_append(GTK_CLIST(wind->new_transaction_list),
row_text);
retval = gh_cdr(retval);
}
gtk_clist_thaw(GTK_CLIST(wind->new_transaction_list));
gtk_clist_select_row(GTK_CLIST(wind->new_transaction_list), 0, 0);
}
gnc_resume_gui_refresh();
return FALSE;
}
static void
refresh_old_transactions(QIFImportWindow * wind, int selection) {
SCM possible_matches;
SCM current_xtn;
SCM selected;
Transaction * gnc_xtn;
Split * gnc_split;
gchar * row_text[4] = { NULL, NULL, NULL, NULL };
int rownum;
gtk_clist_clear(GTK_CLIST(wind->old_transaction_list));
gtk_clist_freeze(GTK_CLIST(wind->old_transaction_list));
if(wind->match_transactions != SCM_BOOL_F) {
possible_matches = gh_cdr(gh_list_ref
(wind->match_transactions,
gh_int2scm(wind->selected_transaction)));
gh_call2(gh_eval_str("qif-import:refresh-match-selection"),
possible_matches, gh_int2scm(selection));
while(!gh_null_p(possible_matches)) {
current_xtn = gh_car(possible_matches);
gnc_xtn = (Transaction *)gw_wcp_get_ptr(gh_car(current_xtn));
selected = gh_cdr(current_xtn);
gnc_split = xaccTransGetSplit(gnc_xtn, 0);
row_text[0] = gnc_print_date(xaccTransRetDatePostedTS(gnc_xtn));
row_text[1] = xaccTransGetDescription(gnc_xtn);
if(xaccTransCountSplits(gnc_xtn) > 2) {
row_text[2] = g_strdup(_("(split)"));
}
else {
row_text[2] =
xaccPrintAmount(gnc_numeric_abs(xaccSplitGetValue(gnc_split)),
gnc_account_value_print_info
(xaccSplitGetAccount(gnc_split), TRUE));
}
if(selected != SCM_BOOL_F) {
row_text[3] = "*";
}
else {
row_text[3] = NULL;
}
rownum = gtk_clist_append(GTK_CLIST(wind->old_transaction_list),
row_text);
possible_matches = gh_cdr(possible_matches);
}
}
gtk_clist_thaw(GTK_CLIST(wind->old_transaction_list));
}
void
gnc_ui_qif_import_duplicate_new_select_cb(GtkCList * clist, int row, int col,
GdkEvent * ev, gpointer user_data) {
QIFImportWindow * wind =
gtk_object_get_data(GTK_OBJECT(user_data), "qif_window_struct");
wind->selected_transaction = row;
refresh_old_transactions(wind, -1);
}
void
gnc_ui_qif_import_duplicate_old_select_cb(GtkCList * clist, int row, int col,
GdkEvent * ev, gpointer user_data) {
QIFImportWindow * wind =
gtk_object_get_data(GTK_OBJECT(user_data), "qif_window_struct");
refresh_old_transactions(wind, row);
}
void
gnc_ui_qif_import_finish_cb(GnomeDruidPage * gpage,
gpointer arg1,
gpointer user_data) {
SCM save_map_prefs = gh_eval_str("qif-import:save-map-prefs");
SCM cat_and_merge = gh_eval_str("gnc:group-catenate-and-merge");
SCM prune_xtns = gh_eval_str("gnc:prune-matching-transactions");
QIFImportWindow * wind =
gtk_object_get_data(GTK_OBJECT(user_data), "qif_window_struct");
gnc_suspend_gui_refresh();
/* prune the old transactions marked as dupes */
gh_call1(prune_xtns, wind->match_transactions);
/* actually add in the new transactions. */
gh_call2(cat_and_merge,
gh_eval_str("(gnc:get-current-group)"),
wind->imported_account_group);
gnc_resume_gui_refresh();
/* write out mapping info before destroying the window */
gh_call2(save_map_prefs, wind->acct_map_info, wind->cat_map_info);
gnc_ui_qif_import_druid_destroy(wind);
}
void
gnc_ui_qif_import_cancel_cb (GnomeDruid * druid,
gpointer user_data) {
@ -1281,3 +1484,4 @@ gncFileQIFImport (void)
/* pop up the QIF File Import dialog box */
gnc_ui_qif_import_druid_make();
}

View File

@ -198,3 +198,24 @@ gnc_help_window_search_button_cb (GtkButton *button,
void
gnc_help_window_search_help_button_cb (GtkButton *button,
gpointer user_data);
gboolean
gnc_ui_qif_import_convert_cb (GnomeDruidPage *gnomedruidpage,
gpointer arg1,
gpointer user_data);
void
gnc_ui_qif_import_duplicate_new_select_cb
(GtkCList *clist,
gint row,
gint column,
GdkEvent *event,
gpointer user_data);
void
gnc_ui_qif_import_duplicate_old_select_cb
(GtkCList *clist,
gint row,
gint column,
GdkEvent *event,
gpointer user_data);

View File

@ -198,7 +198,7 @@ create_QIF_Import_Account_Picker (void)
gtk_button_box_set_spacing (GTK_BUTTON_BOX (hbuttonbox1), 8);
gnome_dialog_append_button (GNOME_DIALOG (QIF_Import_Account_Picker), GNOME_STOCK_BUTTON_OK);
button1 = g_list_last (GNOME_DIALOG (QIF_Import_Account_Picker)->buttons)->data;
button1 = GTK_WIDGET (g_list_last (GNOME_DIALOG (QIF_Import_Account_Picker)->buttons)->data);
gtk_widget_ref (button1);
gtk_object_set_data_full (GTK_OBJECT (QIF_Import_Account_Picker), "button1", button1,
(GtkDestroyNotify) gtk_widget_unref);
@ -206,7 +206,7 @@ create_QIF_Import_Account_Picker (void)
GTK_WIDGET_SET_FLAGS (button1, GTK_CAN_DEFAULT);
gnome_dialog_append_button (GNOME_DIALOG (QIF_Import_Account_Picker), GNOME_STOCK_BUTTON_CANCEL);
button2 = g_list_last (GNOME_DIALOG (QIF_Import_Account_Picker)->buttons)->data;
button2 = GTK_WIDGET (g_list_last (GNOME_DIALOG (QIF_Import_Account_Picker)->buttons)->data);
gtk_widget_ref (button2);
gtk_object_set_data_full (GTK_OBJECT (QIF_Import_Account_Picker), "button2", button2,
(GtkDestroyNotify) gtk_widget_unref);
@ -737,7 +737,7 @@ create_Print_Check_Dialog (void)
gtk_button_box_set_spacing (GTK_BUTTON_BOX (dialog_action_area6), 8);
gnome_dialog_append_button (GNOME_DIALOG (Print_Check_Dialog), GNOME_STOCK_BUTTON_OK);
button21 = g_list_last (GNOME_DIALOG (Print_Check_Dialog)->buttons)->data;
button21 = GTK_WIDGET (g_list_last (GNOME_DIALOG (Print_Check_Dialog)->buttons)->data);
gtk_widget_ref (button21);
gtk_object_set_data_full (GTK_OBJECT (Print_Check_Dialog), "button21", button21,
(GtkDestroyNotify) gtk_widget_unref);
@ -745,7 +745,7 @@ create_Print_Check_Dialog (void)
GTK_WIDGET_SET_FLAGS (button21, GTK_CAN_DEFAULT);
gnome_dialog_append_button (GNOME_DIALOG (Print_Check_Dialog), GNOME_STOCK_BUTTON_CANCEL);
button22 = g_list_last (GNOME_DIALOG (Print_Check_Dialog)->buttons)->data;
button22 = GTK_WIDGET (g_list_last (GNOME_DIALOG (Print_Check_Dialog)->buttons)->data);
gtk_widget_ref (button22);
gtk_object_set_data_full (GTK_OBJECT (Print_Check_Dialog), "button22", button22,
(GtkDestroyNotify) gtk_widget_unref);
@ -753,7 +753,7 @@ create_Print_Check_Dialog (void)
GTK_WIDGET_SET_FLAGS (button22, GTK_CAN_DEFAULT);
gnome_dialog_append_button (GNOME_DIALOG (Print_Check_Dialog), GNOME_STOCK_BUTTON_HELP);
button23 = g_list_last (GNOME_DIALOG (Print_Check_Dialog)->buttons)->data;
button23 = GTK_WIDGET (g_list_last (GNOME_DIALOG (Print_Check_Dialog)->buttons)->data);
gtk_widget_ref (button23);
gtk_object_set_data_full (GTK_OBJECT (Print_Check_Dialog), "button23", button23,
(GtkDestroyNotify) gtk_widget_unref);
@ -1772,7 +1772,7 @@ create_Find_Transactions (void)
gnome_dialog_append_button_with_pixmap (GNOME_DIALOG (Find_Transactions),
_("Find"), GNOME_STOCK_PIXMAP_SEARCH);
button26 = g_list_last (GNOME_DIALOG (Find_Transactions)->buttons)->data;
button26 = GTK_WIDGET (g_list_last (GNOME_DIALOG (Find_Transactions)->buttons)->data);
gtk_widget_ref (button26);
gtk_object_set_data_full (GTK_OBJECT (Find_Transactions), "button26", button26,
(GtkDestroyNotify) gtk_widget_unref);
@ -1780,7 +1780,7 @@ create_Find_Transactions (void)
GTK_WIDGET_SET_FLAGS (button26, GTK_CAN_DEFAULT);
gnome_dialog_append_button (GNOME_DIALOG (Find_Transactions), GNOME_STOCK_BUTTON_CANCEL);
button27 = g_list_last (GNOME_DIALOG (Find_Transactions)->buttons)->data;
button27 = GTK_WIDGET (g_list_last (GNOME_DIALOG (Find_Transactions)->buttons)->data);
gtk_widget_ref (button27);
gtk_object_set_data_full (GTK_OBJECT (Find_Transactions), "button27", button27,
(GtkDestroyNotify) gtk_widget_unref);
@ -1788,7 +1788,7 @@ create_Find_Transactions (void)
GTK_WIDGET_SET_FLAGS (button27, GTK_CAN_DEFAULT);
gnome_dialog_append_button (GNOME_DIALOG (Find_Transactions), GNOME_STOCK_BUTTON_HELP);
button28 = g_list_last (GNOME_DIALOG (Find_Transactions)->buttons)->data;
button28 = GTK_WIDGET (g_list_last (GNOME_DIALOG (Find_Transactions)->buttons)->data);
gtk_widget_ref (button28);
gtk_object_set_data_full (GTK_OBJECT (Find_Transactions), "button28", button28,
(GtkDestroyNotify) gtk_widget_unref);
@ -2325,7 +2325,7 @@ create_Budget_Dialog (void)
gtk_button_box_set_spacing (GTK_BUTTON_BOX (dialog_action_area9), 8);
gnome_dialog_append_button (GNOME_DIALOG (Budget_Dialog), GNOME_STOCK_BUTTON_OK);
ok_button = g_list_last (GNOME_DIALOG (Budget_Dialog)->buttons)->data;
ok_button = GTK_WIDGET (g_list_last (GNOME_DIALOG (Budget_Dialog)->buttons)->data);
gtk_widget_ref (ok_button);
gtk_object_set_data_full (GTK_OBJECT (Budget_Dialog), "ok_button", ok_button,
(GtkDestroyNotify) gtk_widget_unref);
@ -2333,7 +2333,7 @@ create_Budget_Dialog (void)
GTK_WIDGET_SET_FLAGS (ok_button, GTK_CAN_DEFAULT);
gnome_dialog_append_button (GNOME_DIALOG (Budget_Dialog), GNOME_STOCK_BUTTON_APPLY);
apply_button = g_list_last (GNOME_DIALOG (Budget_Dialog)->buttons)->data;
apply_button = GTK_WIDGET (g_list_last (GNOME_DIALOG (Budget_Dialog)->buttons)->data);
gtk_widget_ref (apply_button);
gtk_object_set_data_full (GTK_OBJECT (Budget_Dialog), "apply_button", apply_button,
(GtkDestroyNotify) gtk_widget_unref);
@ -2341,7 +2341,7 @@ create_Budget_Dialog (void)
GTK_WIDGET_SET_FLAGS (apply_button, GTK_CAN_DEFAULT);
gnome_dialog_append_button (GNOME_DIALOG (Budget_Dialog), GNOME_STOCK_BUTTON_CANCEL);
cancel_button = g_list_last (GNOME_DIALOG (Budget_Dialog)->buttons)->data;
cancel_button = GTK_WIDGET (g_list_last (GNOME_DIALOG (Budget_Dialog)->buttons)->data);
gtk_widget_ref (cancel_button);
gtk_object_set_data_full (GTK_OBJECT (Budget_Dialog), "cancel_button", cancel_button,
(GtkDestroyNotify) gtk_widget_unref);
@ -2349,7 +2349,7 @@ create_Budget_Dialog (void)
GTK_WIDGET_SET_FLAGS (cancel_button, GTK_CAN_DEFAULT);
gnome_dialog_append_button (GNOME_DIALOG (Budget_Dialog), GNOME_STOCK_BUTTON_HELP);
help_button = g_list_last (GNOME_DIALOG (Budget_Dialog)->buttons)->data;
help_button = GTK_WIDGET (g_list_last (GNOME_DIALOG (Budget_Dialog)->buttons)->data);
gtk_widget_ref (help_button);
gtk_object_set_data_full (GTK_OBJECT (Budget_Dialog), "help_button", help_button,
(GtkDestroyNotify) gtk_widget_unref);
@ -2900,7 +2900,7 @@ create_Financial_Calculator_Dialog (void)
gtk_button_box_set_spacing (GTK_BUTTON_BOX (dialog_action_area10), 8);
gnome_dialog_append_button (GNOME_DIALOG (Financial_Calculator_Dialog), _("Schedule"));
schedule_button = g_list_last (GNOME_DIALOG (Financial_Calculator_Dialog)->buttons)->data;
schedule_button = GTK_WIDGET (g_list_last (GNOME_DIALOG (Financial_Calculator_Dialog)->buttons)->data);
gtk_widget_ref (schedule_button);
gtk_object_set_data_full (GTK_OBJECT (Financial_Calculator_Dialog), "schedule_button", schedule_button,
(GtkDestroyNotify) gtk_widget_unref);
@ -2908,7 +2908,7 @@ create_Financial_Calculator_Dialog (void)
GTK_WIDGET_SET_FLAGS (schedule_button, GTK_CAN_DEFAULT);
gnome_dialog_append_button (GNOME_DIALOG (Financial_Calculator_Dialog), GNOME_STOCK_BUTTON_CLOSE);
close_button = g_list_last (GNOME_DIALOG (Financial_Calculator_Dialog)->buttons)->data;
close_button = GTK_WIDGET (g_list_last (GNOME_DIALOG (Financial_Calculator_Dialog)->buttons)->data);
gtk_widget_ref (close_button);
gtk_object_set_data_full (GTK_OBJECT (Financial_Calculator_Dialog), "close_button", close_button,
(GtkDestroyNotify) gtk_widget_unref);
@ -3114,7 +3114,7 @@ create_Amortization_Schedule_Dialog (void)
gtk_button_box_set_spacing (GTK_BUTTON_BOX (dialog_action_area11), 8);
gnome_dialog_append_button (GNOME_DIALOG (Amortization_Schedule_Dialog), GNOME_STOCK_BUTTON_OK);
button60 = g_list_last (GNOME_DIALOG (Amortization_Schedule_Dialog)->buttons)->data;
button60 = GTK_WIDGET (g_list_last (GNOME_DIALOG (Amortization_Schedule_Dialog)->buttons)->data);
gtk_widget_ref (button60);
gtk_object_set_data_full (GTK_OBJECT (Amortization_Schedule_Dialog), "button60", button60,
(GtkDestroyNotify) gtk_widget_unref);
@ -3122,7 +3122,7 @@ create_Amortization_Schedule_Dialog (void)
GTK_WIDGET_SET_FLAGS (button60, GTK_CAN_DEFAULT);
gnome_dialog_append_button (GNOME_DIALOG (Amortization_Schedule_Dialog), GNOME_STOCK_BUTTON_APPLY);
button61 = g_list_last (GNOME_DIALOG (Amortization_Schedule_Dialog)->buttons)->data;
button61 = GTK_WIDGET (g_list_last (GNOME_DIALOG (Amortization_Schedule_Dialog)->buttons)->data);
gtk_widget_ref (button61);
gtk_object_set_data_full (GTK_OBJECT (Amortization_Schedule_Dialog), "button61", button61,
(GtkDestroyNotify) gtk_widget_unref);
@ -3130,7 +3130,7 @@ create_Amortization_Schedule_Dialog (void)
GTK_WIDGET_SET_FLAGS (button61, GTK_CAN_DEFAULT);
gnome_dialog_append_button (GNOME_DIALOG (Amortization_Schedule_Dialog), GNOME_STOCK_BUTTON_CANCEL);
button62 = g_list_last (GNOME_DIALOG (Amortization_Schedule_Dialog)->buttons)->data;
button62 = GTK_WIDGET (g_list_last (GNOME_DIALOG (Amortization_Schedule_Dialog)->buttons)->data);
gtk_widget_ref (button62);
gtk_object_set_data_full (GTK_OBJECT (Amortization_Schedule_Dialog), "button62", button62,
(GtkDestroyNotify) gtk_widget_unref);
@ -3242,7 +3242,7 @@ create_Commodity_Selector_Dialog (void)
gtk_button_box_set_spacing (GTK_BUTTON_BOX (dialog_action_area12), 8);
gnome_dialog_append_button (GNOME_DIALOG (Commodity_Selector_Dialog), GNOME_STOCK_BUTTON_OK);
button63 = g_list_last (GNOME_DIALOG (Commodity_Selector_Dialog)->buttons)->data;
button63 = GTK_WIDGET (g_list_last (GNOME_DIALOG (Commodity_Selector_Dialog)->buttons)->data);
gtk_widget_ref (button63);
gtk_object_set_data_full (GTK_OBJECT (Commodity_Selector_Dialog), "button63", button63,
(GtkDestroyNotify) gtk_widget_unref);
@ -3250,7 +3250,7 @@ create_Commodity_Selector_Dialog (void)
GTK_WIDGET_SET_FLAGS (button63, GTK_CAN_DEFAULT);
gnome_dialog_append_button (GNOME_DIALOG (Commodity_Selector_Dialog), _("New..."));
button64 = g_list_last (GNOME_DIALOG (Commodity_Selector_Dialog)->buttons)->data;
button64 = GTK_WIDGET (g_list_last (GNOME_DIALOG (Commodity_Selector_Dialog)->buttons)->data);
gtk_widget_ref (button64);
gtk_object_set_data_full (GTK_OBJECT (Commodity_Selector_Dialog), "button64", button64,
(GtkDestroyNotify) gtk_widget_unref);
@ -3258,7 +3258,7 @@ create_Commodity_Selector_Dialog (void)
GTK_WIDGET_SET_FLAGS (button64, GTK_CAN_DEFAULT);
gnome_dialog_append_button (GNOME_DIALOG (Commodity_Selector_Dialog), GNOME_STOCK_BUTTON_CANCEL);
button65 = g_list_last (GNOME_DIALOG (Commodity_Selector_Dialog)->buttons)->data;
button65 = GTK_WIDGET (g_list_last (GNOME_DIALOG (Commodity_Selector_Dialog)->buttons)->data);
gtk_widget_ref (button65);
gtk_object_set_data_full (GTK_OBJECT (Commodity_Selector_Dialog), "button65", button65,
(GtkDestroyNotify) gtk_widget_unref);
@ -3446,7 +3446,7 @@ create_New_Commodity_Dialog (void)
gtk_button_box_set_spacing (GTK_BUTTON_BOX (dialog_action_area13), 8);
gnome_dialog_append_button (GNOME_DIALOG (New_Commodity_Dialog), GNOME_STOCK_BUTTON_OK);
button66 = g_list_last (GNOME_DIALOG (New_Commodity_Dialog)->buttons)->data;
button66 = GTK_WIDGET (g_list_last (GNOME_DIALOG (New_Commodity_Dialog)->buttons)->data);
gtk_widget_ref (button66);
gtk_object_set_data_full (GTK_OBJECT (New_Commodity_Dialog), "button66", button66,
(GtkDestroyNotify) gtk_widget_unref);
@ -3454,7 +3454,7 @@ create_New_Commodity_Dialog (void)
GTK_WIDGET_SET_FLAGS (button66, GTK_CAN_DEFAULT);
gnome_dialog_append_button (GNOME_DIALOG (New_Commodity_Dialog), GNOME_STOCK_BUTTON_CANCEL);
button67 = g_list_last (GNOME_DIALOG (New_Commodity_Dialog)->buttons)->data;
button67 = GTK_WIDGET (g_list_last (GNOME_DIALOG (New_Commodity_Dialog)->buttons)->data);
gtk_widget_ref (button67);
gtk_object_set_data_full (GTK_OBJECT (New_Commodity_Dialog), "button67", button67,
(GtkDestroyNotify) gtk_widget_unref);
@ -3462,7 +3462,7 @@ create_New_Commodity_Dialog (void)
GTK_WIDGET_SET_FLAGS (button67, GTK_CAN_DEFAULT);
gnome_dialog_append_button (GNOME_DIALOG (New_Commodity_Dialog), GNOME_STOCK_BUTTON_HELP);
button68 = g_list_last (GNOME_DIALOG (New_Commodity_Dialog)->buttons)->data;
button68 = GTK_WIDGET (g_list_last (GNOME_DIALOG (New_Commodity_Dialog)->buttons)->data);
gtk_widget_ref (button68);
gtk_object_set_data_full (GTK_OBJECT (New_Commodity_Dialog), "button68", button68,
(GtkDestroyNotify) gtk_widget_unref);
@ -3770,7 +3770,7 @@ create_Account_Dialog (void)
gtk_button_box_set_spacing (GTK_BUTTON_BOX (dialog_action_area12), 8);
gnome_dialog_append_button (GNOME_DIALOG (Account_Dialog), GNOME_STOCK_BUTTON_OK);
button63 = g_list_last (GNOME_DIALOG (Account_Dialog)->buttons)->data;
button63 = GTK_WIDGET (g_list_last (GNOME_DIALOG (Account_Dialog)->buttons)->data);
gtk_widget_ref (button63);
gtk_object_set_data_full (GTK_OBJECT (Account_Dialog), "button63", button63,
(GtkDestroyNotify) gtk_widget_unref);
@ -3778,7 +3778,7 @@ create_Account_Dialog (void)
GTK_WIDGET_SET_FLAGS (button63, GTK_CAN_DEFAULT);
gnome_dialog_append_button (GNOME_DIALOG (Account_Dialog), GNOME_STOCK_BUTTON_CANCEL);
cancel_button = g_list_last (GNOME_DIALOG (Account_Dialog)->buttons)->data;
cancel_button = GTK_WIDGET (g_list_last (GNOME_DIALOG (Account_Dialog)->buttons)->data);
gtk_widget_ref (cancel_button);
gtk_object_set_data_full (GTK_OBJECT (Account_Dialog), "cancel_button", cancel_button,
(GtkDestroyNotify) gtk_widget_unref);
@ -3786,7 +3786,7 @@ create_Account_Dialog (void)
GTK_WIDGET_SET_FLAGS (cancel_button, GTK_CAN_DEFAULT);
gnome_dialog_append_button (GNOME_DIALOG (Account_Dialog), GNOME_STOCK_BUTTON_HELP);
button72 = g_list_last (GNOME_DIALOG (Account_Dialog)->buttons)->data;
button72 = GTK_WIDGET (g_list_last (GNOME_DIALOG (Account_Dialog)->buttons)->data);
gtk_widget_ref (button72);
gtk_object_set_data_full (GTK_OBJECT (Account_Dialog), "button72", button72,
(GtkDestroyNotify) gtk_widget_unref);
@ -3869,11 +3869,11 @@ create_QIF_Import_Druid (void)
{
GtkWidget *QIF_Import_Druid;
GtkWidget *qif_import_druid;
GtkWidget *druidpagestart1;
GdkColor druidpagestart1_bg_color = { 0, 39321, 49087, 39321 };
GdkColor druidpagestart1_textbox_color = { 0, 65535, 65535, 65535 };
GdkColor druidpagestart1_logo_bg_color = { 0, 65535, 65535, 65535 };
GdkColor druidpagestart1_title_color = { 0, 65535, 65535, 65535 };
GtkWidget *start_page;
GdkColor start_page_bg_color = { 0, 39321, 49087, 39321 };
GdkColor start_page_textbox_color = { 0, 65535, 65535, 65535 };
GdkColor start_page_logo_bg_color = { 0, 65535, 65535, 65535 };
GdkColor start_page_title_color = { 0, 65535, 65535, 65535 };
GtkWidget *load_file_page;
GdkColor load_file_page_bg_color = { 0, 39321, 49087, 39578 };
GdkColor load_file_page_logo_bg_color = { 0, 65535, 65535, 65535 };
@ -3914,16 +3914,16 @@ create_QIF_Import_Druid (void)
GtkWidget *hbox68;
GtkWidget *button69;
GtkWidget *button70;
GtkWidget *druidpagestandard9;
GdkColor druidpagestandard9_bg_color = { 0, 39321, 49087, 39321 };
GdkColor druidpagestandard9_logo_bg_color = { 0, 65535, 65535, 65535 };
GdkColor druidpagestandard9_title_color = { 0, 65535, 65535, 65535 };
GtkWidget *account_doc_page;
GdkColor account_doc_page_bg_color = { 0, 39321, 49087, 39321 };
GdkColor account_doc_page_logo_bg_color = { 0, 65535, 65535, 65535 };
GdkColor account_doc_page_title_color = { 0, 65535, 65535, 65535 };
GtkWidget *druid_vbox13;
GtkWidget *label830;
GtkWidget *druidpagestandard3;
GdkColor druidpagestandard3_bg_color = { 0, 39321, 49087, 39321 };
GdkColor druidpagestandard3_logo_bg_color = { 0, 65535, 65535, 65535 };
GdkColor druidpagestandard3_title_color = { 0, 65535, 65535, 65535 };
GtkWidget *account_match_page;
GdkColor account_match_page_bg_color = { 0, 39321, 49087, 39321 };
GdkColor account_match_page_logo_bg_color = { 0, 65535, 65535, 65535 };
GdkColor account_match_page_title_color = { 0, 65535, 65535, 65535 };
GtkWidget *druid_vbox3;
GtkWidget *scrolledwindow11;
GtkWidget *account_page_list;
@ -3931,16 +3931,16 @@ create_QIF_Import_Druid (void)
GtkWidget *label835;
GtkWidget *label836;
GtkWidget *label828;
GtkWidget *druidpagestandard10;
GdkColor druidpagestandard10_bg_color = { 0, 39321, 49087, 39578 };
GdkColor druidpagestandard10_logo_bg_color = { 0, 65535, 65535, 65535 };
GdkColor druidpagestandard10_title_color = { 0, 65535, 65535, 65535 };
GtkWidget *category_doc_page;
GdkColor category_doc_page_bg_color = { 0, 39321, 49087, 39578 };
GdkColor category_doc_page_logo_bg_color = { 0, 65535, 65535, 65535 };
GdkColor category_doc_page_title_color = { 0, 65535, 65535, 65535 };
GtkWidget *druid_vbox18;
GtkWidget *label840;
GtkWidget *druidpagestandard4;
GdkColor druidpagestandard4_bg_color = { 0, 39578, 49087, 39578 };
GdkColor druidpagestandard4_logo_bg_color = { 0, 65535, 65535, 65535 };
GdkColor druidpagestandard4_title_color = { 0, 65535, 65535, 65535 };
GtkWidget *category_match_page;
GdkColor category_match_page_bg_color = { 0, 39578, 49087, 39578 };
GdkColor category_match_page_logo_bg_color = { 0, 65535, 65535, 65535 };
GdkColor category_match_page_title_color = { 0, 65535, 65535, 65535 };
GtkWidget *druid_vbox4;
GtkWidget *scrolledwindow12;
GtkWidget *category_page_list;
@ -3957,12 +3957,37 @@ create_QIF_Import_Druid (void)
GtkWidget *currency_combo;
GtkWidget *currency_entry;
GtkWidget *label832;
GtkWidget *commodity_page;
GdkColor commodity_page_bg_color = { 0, 39321, 49087, 39578 };
GdkColor commodity_page_logo_bg_color = { 0, 65535, 65535, 65535 };
GdkColor commodity_page_title_color = { 0, 65535, 65535, 65535 };
GtkWidget *commodity_doc_page;
GdkColor commodity_doc_page_bg_color = { 0, 39321, 49087, 39578 };
GdkColor commodity_doc_page_logo_bg_color = { 0, 65535, 65535, 65535 };
GdkColor commodity_doc_page_title_color = { 0, 65535, 65535, 65535 };
GtkWidget *druid_vbox17;
GtkWidget *label833;
GtkWidget *match_doc_page;
GdkColor match_doc_page_bg_color = { 0, 39321, 49087, 39578 };
GdkColor match_doc_page_logo_bg_color = { 0, 65535, 65535, 65535 };
GdkColor match_doc_page_title_color = { 0, 65535, 65535, 65535 };
GtkWidget *druid_vbox34;
GtkWidget *label847694;
GtkWidget *match_duplicates_page;
GdkColor match_duplicates_page_bg_color = { 0, 39321, 49087, 39578 };
GdkColor match_duplicates_page_logo_bg_color = { 0, 65535, 65535, 65535 };
GdkColor match_duplicates_page_title_color = { 0, 65535, 65535, 65535 };
GtkWidget *druid_vbox35;
GtkWidget *hbox94;
GtkWidget *frame45;
GtkWidget *scrolledwindow22;
GtkWidget *new_transaction_list;
GtkWidget *label847700;
GtkWidget *label847701;
GtkWidget *label847702;
GtkWidget *frame46;
GtkWidget *scrolledwindow23;
GtkWidget *old_transaction_list;
GtkWidget *label847703;
GtkWidget *label847704;
GtkWidget *label847705;
GtkWidget *label847706;
GtkWidget *end_page;
GdkColor end_page_bg_color = { 0, 39578, 49087, 39578 };
GdkColor end_page_textbox_color = { 0, 65535, 65535, 65535 };
@ -3982,19 +4007,19 @@ create_QIF_Import_Druid (void)
gtk_widget_show (qif_import_druid);
gtk_container_add (GTK_CONTAINER (QIF_Import_Druid), qif_import_druid);
druidpagestart1 = gnome_druid_page_start_new ();
gtk_widget_ref (druidpagestart1);
gtk_object_set_data_full (GTK_OBJECT (QIF_Import_Druid), "druidpagestart1", druidpagestart1,
start_page = gnome_druid_page_start_new ();
gtk_widget_ref (start_page);
gtk_object_set_data_full (GTK_OBJECT (QIF_Import_Druid), "start_page", start_page,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (druidpagestart1);
gnome_druid_append_page (GNOME_DRUID (qif_import_druid), GNOME_DRUID_PAGE (druidpagestart1));
gnome_druid_set_page (GNOME_DRUID (qif_import_druid), GNOME_DRUID_PAGE (druidpagestart1));
gnome_druid_page_start_set_bg_color (GNOME_DRUID_PAGE_START (druidpagestart1), &druidpagestart1_bg_color);
gnome_druid_page_start_set_textbox_color (GNOME_DRUID_PAGE_START (druidpagestart1), &druidpagestart1_textbox_color);
gnome_druid_page_start_set_logo_bg_color (GNOME_DRUID_PAGE_START (druidpagestart1), &druidpagestart1_logo_bg_color);
gnome_druid_page_start_set_title_color (GNOME_DRUID_PAGE_START (druidpagestart1), &druidpagestart1_title_color);
gnome_druid_page_start_set_title (GNOME_DRUID_PAGE_START (druidpagestart1), _("Import QIF files"));
gnome_druid_page_start_set_text (GNOME_DRUID_PAGE_START (druidpagestart1), _("Gnucash can import financial data from QIF (Quicken \nInterchange Format) files written by Quicken/Quickbooks,\nMS Money, Moneydance, and many other programs. \n\nThe import process has several steps. Your GnuCash\naccounts will not be changed until you click \"Finish\"\nat the end of the process. \n\nClick \"Next\" to start loading your QIF data, or \"Cancel\"\nto abort the process. "));
gtk_widget_show (start_page);
gnome_druid_append_page (GNOME_DRUID (qif_import_druid), GNOME_DRUID_PAGE (start_page));
gnome_druid_set_page (GNOME_DRUID (qif_import_druid), GNOME_DRUID_PAGE (start_page));
gnome_druid_page_start_set_bg_color (GNOME_DRUID_PAGE_START (start_page), &start_page_bg_color);
gnome_druid_page_start_set_textbox_color (GNOME_DRUID_PAGE_START (start_page), &start_page_textbox_color);
gnome_druid_page_start_set_logo_bg_color (GNOME_DRUID_PAGE_START (start_page), &start_page_logo_bg_color);
gnome_druid_page_start_set_title_color (GNOME_DRUID_PAGE_START (start_page), &start_page_title_color);
gnome_druid_page_start_set_title (GNOME_DRUID_PAGE_START (start_page), _("Import QIF files"));
gnome_druid_page_start_set_text (GNOME_DRUID_PAGE_START (start_page), _("Gnucash can import financial data from QIF (Quicken \nInterchange Format) files written by Quicken/Quickbooks,\nMS Money, Moneydance, and many other programs. \n\nThe import process has several steps. Your GnuCash\naccounts will not be changed until you click \"Finish\"\nat the end of the process. \n\nClick \"Next\" to start loading your QIF data, or \"Cancel\"\nto abort the process. "));
load_file_page = gnome_druid_page_standard_new_with_vals ("", NULL);
gtk_widget_ref (load_file_page);
@ -4214,18 +4239,18 @@ create_QIF_Import_Druid (void)
gtk_widget_show (button70);
gtk_box_pack_start (GTK_BOX (hbox68), button70, TRUE, TRUE, 0);
druidpagestandard9 = gnome_druid_page_standard_new_with_vals ("", NULL);
gtk_widget_ref (druidpagestandard9);
gtk_object_set_data_full (GTK_OBJECT (QIF_Import_Druid), "druidpagestandard9", druidpagestandard9,
account_doc_page = gnome_druid_page_standard_new_with_vals ("", NULL);
gtk_widget_ref (account_doc_page);
gtk_object_set_data_full (GTK_OBJECT (QIF_Import_Druid), "account_doc_page", account_doc_page,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show_all (druidpagestandard9);
gnome_druid_append_page (GNOME_DRUID (qif_import_druid), GNOME_DRUID_PAGE (druidpagestandard9));
gnome_druid_page_standard_set_bg_color (GNOME_DRUID_PAGE_STANDARD (druidpagestandard9), &druidpagestandard9_bg_color);
gnome_druid_page_standard_set_logo_bg_color (GNOME_DRUID_PAGE_STANDARD (druidpagestandard9), &druidpagestandard9_logo_bg_color);
gnome_druid_page_standard_set_title_color (GNOME_DRUID_PAGE_STANDARD (druidpagestandard9), &druidpagestandard9_title_color);
gnome_druid_page_standard_set_title (GNOME_DRUID_PAGE_STANDARD (druidpagestandard9), _("Your accounts and stock holdings"));
gtk_widget_show_all (account_doc_page);
gnome_druid_append_page (GNOME_DRUID (qif_import_druid), GNOME_DRUID_PAGE (account_doc_page));
gnome_druid_page_standard_set_bg_color (GNOME_DRUID_PAGE_STANDARD (account_doc_page), &account_doc_page_bg_color);
gnome_druid_page_standard_set_logo_bg_color (GNOME_DRUID_PAGE_STANDARD (account_doc_page), &account_doc_page_logo_bg_color);
gnome_druid_page_standard_set_title_color (GNOME_DRUID_PAGE_STANDARD (account_doc_page), &account_doc_page_title_color);
gnome_druid_page_standard_set_title (GNOME_DRUID_PAGE_STANDARD (account_doc_page), _("Your accounts and stock holdings"));
druid_vbox13 = GNOME_DRUID_PAGE_STANDARD (druidpagestandard9)->vbox;
druid_vbox13 = GNOME_DRUID_PAGE_STANDARD (account_doc_page)->vbox;
gtk_widget_ref (druid_vbox13);
gtk_object_set_data_full (GTK_OBJECT (QIF_Import_Druid), "druid_vbox13", druid_vbox13,
(GtkDestroyNotify) gtk_widget_unref);
@ -4239,18 +4264,18 @@ create_QIF_Import_Druid (void)
gtk_box_pack_start (GTK_BOX (druid_vbox13), label830, FALSE, FALSE, 0);
gtk_label_set_justify (GTK_LABEL (label830), GTK_JUSTIFY_LEFT);
druidpagestandard3 = gnome_druid_page_standard_new_with_vals ("", NULL);
gtk_widget_ref (druidpagestandard3);
gtk_object_set_data_full (GTK_OBJECT (QIF_Import_Druid), "druidpagestandard3", druidpagestandard3,
account_match_page = gnome_druid_page_standard_new_with_vals ("", NULL);
gtk_widget_ref (account_match_page);
gtk_object_set_data_full (GTK_OBJECT (QIF_Import_Druid), "account_match_page", account_match_page,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show_all (druidpagestandard3);
gnome_druid_append_page (GNOME_DRUID (qif_import_druid), GNOME_DRUID_PAGE (druidpagestandard3));
gnome_druid_page_standard_set_bg_color (GNOME_DRUID_PAGE_STANDARD (druidpagestandard3), &druidpagestandard3_bg_color);
gnome_druid_page_standard_set_logo_bg_color (GNOME_DRUID_PAGE_STANDARD (druidpagestandard3), &druidpagestandard3_logo_bg_color);
gnome_druid_page_standard_set_title_color (GNOME_DRUID_PAGE_STANDARD (druidpagestandard3), &druidpagestandard3_title_color);
gnome_druid_page_standard_set_title (GNOME_DRUID_PAGE_STANDARD (druidpagestandard3), _("Match QIF accounts with Gnucash accounts"));
gtk_widget_show_all (account_match_page);
gnome_druid_append_page (GNOME_DRUID (qif_import_druid), GNOME_DRUID_PAGE (account_match_page));
gnome_druid_page_standard_set_bg_color (GNOME_DRUID_PAGE_STANDARD (account_match_page), &account_match_page_bg_color);
gnome_druid_page_standard_set_logo_bg_color (GNOME_DRUID_PAGE_STANDARD (account_match_page), &account_match_page_logo_bg_color);
gnome_druid_page_standard_set_title_color (GNOME_DRUID_PAGE_STANDARD (account_match_page), &account_match_page_title_color);
gnome_druid_page_standard_set_title (GNOME_DRUID_PAGE_STANDARD (account_match_page), _("Match QIF accounts with Gnucash accounts"));
druid_vbox3 = GNOME_DRUID_PAGE_STANDARD (druidpagestandard3)->vbox;
druid_vbox3 = GNOME_DRUID_PAGE_STANDARD (account_match_page)->vbox;
gtk_widget_ref (druid_vbox3);
gtk_object_set_data_full (GTK_OBJECT (QIF_Import_Druid), "druid_vbox3", druid_vbox3,
(GtkDestroyNotify) gtk_widget_unref);
@ -4303,18 +4328,18 @@ create_QIF_Import_Druid (void)
gtk_widget_show (label828);
gtk_box_pack_start (GTK_BOX (druid_vbox3), label828, FALSE, FALSE, 3);
druidpagestandard10 = gnome_druid_page_standard_new_with_vals ("", NULL);
gtk_widget_ref (druidpagestandard10);
gtk_object_set_data_full (GTK_OBJECT (QIF_Import_Druid), "druidpagestandard10", druidpagestandard10,
category_doc_page = gnome_druid_page_standard_new_with_vals ("", NULL);
gtk_widget_ref (category_doc_page);
gtk_object_set_data_full (GTK_OBJECT (QIF_Import_Druid), "category_doc_page", category_doc_page,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show_all (druidpagestandard10);
gnome_druid_append_page (GNOME_DRUID (qif_import_druid), GNOME_DRUID_PAGE (druidpagestandard10));
gnome_druid_page_standard_set_bg_color (GNOME_DRUID_PAGE_STANDARD (druidpagestandard10), &druidpagestandard10_bg_color);
gnome_druid_page_standard_set_logo_bg_color (GNOME_DRUID_PAGE_STANDARD (druidpagestandard10), &druidpagestandard10_logo_bg_color);
gnome_druid_page_standard_set_title_color (GNOME_DRUID_PAGE_STANDARD (druidpagestandard10), &druidpagestandard10_title_color);
gnome_druid_page_standard_set_title (GNOME_DRUID_PAGE_STANDARD (druidpagestandard10), _("Income and expense categories"));
gtk_widget_show_all (category_doc_page);
gnome_druid_append_page (GNOME_DRUID (qif_import_druid), GNOME_DRUID_PAGE (category_doc_page));
gnome_druid_page_standard_set_bg_color (GNOME_DRUID_PAGE_STANDARD (category_doc_page), &category_doc_page_bg_color);
gnome_druid_page_standard_set_logo_bg_color (GNOME_DRUID_PAGE_STANDARD (category_doc_page), &category_doc_page_logo_bg_color);
gnome_druid_page_standard_set_title_color (GNOME_DRUID_PAGE_STANDARD (category_doc_page), &category_doc_page_title_color);
gnome_druid_page_standard_set_title (GNOME_DRUID_PAGE_STANDARD (category_doc_page), _("Income and expense categories"));
druid_vbox18 = GNOME_DRUID_PAGE_STANDARD (druidpagestandard10)->vbox;
druid_vbox18 = GNOME_DRUID_PAGE_STANDARD (category_doc_page)->vbox;
gtk_widget_ref (druid_vbox18);
gtk_object_set_data_full (GTK_OBJECT (QIF_Import_Druid), "druid_vbox18", druid_vbox18,
(GtkDestroyNotify) gtk_widget_unref);
@ -4328,18 +4353,18 @@ create_QIF_Import_Druid (void)
gtk_box_pack_start (GTK_BOX (druid_vbox18), label840, FALSE, FALSE, 0);
gtk_label_set_justify (GTK_LABEL (label840), GTK_JUSTIFY_LEFT);
druidpagestandard4 = gnome_druid_page_standard_new_with_vals ("", NULL);
gtk_widget_ref (druidpagestandard4);
gtk_object_set_data_full (GTK_OBJECT (QIF_Import_Druid), "druidpagestandard4", druidpagestandard4,
category_match_page = gnome_druid_page_standard_new_with_vals ("", NULL);
gtk_widget_ref (category_match_page);
gtk_object_set_data_full (GTK_OBJECT (QIF_Import_Druid), "category_match_page", category_match_page,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show_all (druidpagestandard4);
gnome_druid_append_page (GNOME_DRUID (qif_import_druid), GNOME_DRUID_PAGE (druidpagestandard4));
gnome_druid_page_standard_set_bg_color (GNOME_DRUID_PAGE_STANDARD (druidpagestandard4), &druidpagestandard4_bg_color);
gnome_druid_page_standard_set_logo_bg_color (GNOME_DRUID_PAGE_STANDARD (druidpagestandard4), &druidpagestandard4_logo_bg_color);
gnome_druid_page_standard_set_title_color (GNOME_DRUID_PAGE_STANDARD (druidpagestandard4), &druidpagestandard4_title_color);
gnome_druid_page_standard_set_title (GNOME_DRUID_PAGE_STANDARD (druidpagestandard4), _("Match QIF categories with Gnucash accounts"));
gtk_widget_show_all (category_match_page);
gnome_druid_append_page (GNOME_DRUID (qif_import_druid), GNOME_DRUID_PAGE (category_match_page));
gnome_druid_page_standard_set_bg_color (GNOME_DRUID_PAGE_STANDARD (category_match_page), &category_match_page_bg_color);
gnome_druid_page_standard_set_logo_bg_color (GNOME_DRUID_PAGE_STANDARD (category_match_page), &category_match_page_logo_bg_color);
gnome_druid_page_standard_set_title_color (GNOME_DRUID_PAGE_STANDARD (category_match_page), &category_match_page_title_color);
gnome_druid_page_standard_set_title (GNOME_DRUID_PAGE_STANDARD (category_match_page), _("Match QIF categories with Gnucash accounts"));
druid_vbox4 = GNOME_DRUID_PAGE_STANDARD (druidpagestandard4)->vbox;
druid_vbox4 = GNOME_DRUID_PAGE_STANDARD (category_match_page)->vbox;
gtk_widget_ref (druid_vbox4);
gtk_object_set_data_full (GTK_OBJECT (QIF_Import_Druid), "druid_vbox4", druid_vbox4,
(GtkDestroyNotify) gtk_widget_unref);
@ -4438,18 +4463,18 @@ create_QIF_Import_Druid (void)
gtk_widget_show (label832);
gtk_box_pack_end (GTK_BOX (druid_vbox16), label832, FALSE, FALSE, 0);
commodity_page = gnome_druid_page_standard_new_with_vals ("", NULL);
gtk_widget_ref (commodity_page);
gtk_object_set_data_full (GTK_OBJECT (QIF_Import_Druid), "commodity_page", commodity_page,
commodity_doc_page = gnome_druid_page_standard_new_with_vals ("", NULL);
gtk_widget_ref (commodity_doc_page);
gtk_object_set_data_full (GTK_OBJECT (QIF_Import_Druid), "commodity_doc_page", commodity_doc_page,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show_all (commodity_page);
gnome_druid_append_page (GNOME_DRUID (qif_import_druid), GNOME_DRUID_PAGE (commodity_page));
gnome_druid_page_standard_set_bg_color (GNOME_DRUID_PAGE_STANDARD (commodity_page), &commodity_page_bg_color);
gnome_druid_page_standard_set_logo_bg_color (GNOME_DRUID_PAGE_STANDARD (commodity_page), &commodity_page_logo_bg_color);
gnome_druid_page_standard_set_title_color (GNOME_DRUID_PAGE_STANDARD (commodity_page), &commodity_page_title_color);
gnome_druid_page_standard_set_title (GNOME_DRUID_PAGE_STANDARD (commodity_page), _("Tradable commodities"));
gtk_widget_show_all (commodity_doc_page);
gnome_druid_append_page (GNOME_DRUID (qif_import_druid), GNOME_DRUID_PAGE (commodity_doc_page));
gnome_druid_page_standard_set_bg_color (GNOME_DRUID_PAGE_STANDARD (commodity_doc_page), &commodity_doc_page_bg_color);
gnome_druid_page_standard_set_logo_bg_color (GNOME_DRUID_PAGE_STANDARD (commodity_doc_page), &commodity_doc_page_logo_bg_color);
gnome_druid_page_standard_set_title_color (GNOME_DRUID_PAGE_STANDARD (commodity_doc_page), &commodity_doc_page_title_color);
gnome_druid_page_standard_set_title (GNOME_DRUID_PAGE_STANDARD (commodity_doc_page), _("Tradable commodities"));
druid_vbox17 = GNOME_DRUID_PAGE_STANDARD (commodity_page)->vbox;
druid_vbox17 = GNOME_DRUID_PAGE_STANDARD (commodity_doc_page)->vbox;
gtk_widget_ref (druid_vbox17);
gtk_object_set_data_full (GTK_OBJECT (QIF_Import_Druid), "druid_vbox17", druid_vbox17,
(GtkDestroyNotify) gtk_widget_unref);
@ -4463,6 +4488,157 @@ create_QIF_Import_Druid (void)
gtk_box_pack_start (GTK_BOX (druid_vbox17), label833, FALSE, FALSE, 0);
gtk_label_set_justify (GTK_LABEL (label833), GTK_JUSTIFY_LEFT);
match_doc_page = gnome_druid_page_standard_new_with_vals ("", NULL);
gtk_widget_ref (match_doc_page);
gtk_object_set_data_full (GTK_OBJECT (QIF_Import_Druid), "match_doc_page", match_doc_page,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show_all (match_doc_page);
gnome_druid_append_page (GNOME_DRUID (qif_import_druid), GNOME_DRUID_PAGE (match_doc_page));
gnome_druid_page_standard_set_bg_color (GNOME_DRUID_PAGE_STANDARD (match_doc_page), &match_doc_page_bg_color);
gnome_druid_page_standard_set_logo_bg_color (GNOME_DRUID_PAGE_STANDARD (match_doc_page), &match_doc_page_logo_bg_color);
gnome_druid_page_standard_set_title_color (GNOME_DRUID_PAGE_STANDARD (match_doc_page), &match_doc_page_title_color);
gnome_druid_page_standard_set_title (GNOME_DRUID_PAGE_STANDARD (match_doc_page), _("Match duplicate transactions"));
druid_vbox34 = GNOME_DRUID_PAGE_STANDARD (match_doc_page)->vbox;
gtk_widget_ref (druid_vbox34);
gtk_object_set_data_full (GTK_OBJECT (QIF_Import_Druid), "druid_vbox34", druid_vbox34,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (druid_vbox34);
label847694 = gtk_label_new (_("If you are importing a QIF file downloaded from a bank or other financial\ninstitution, some of the information in the QIF file may duplicate information\nalready in your GnuCash accounts. GnuCash will try to detect duplicates \nof existing transactions. \n\nOn the next page, you will be asked to confirm that an existing transaction\nmatches an imported transaction. Imported transactions are shown on the\nleft side of the page, and possible matches for the selected left-hand\ntransaction are shown to the right. There may be several old transactions \nthat could match an imported transaction; you will be able to select the \ncorrect one by clicking in the \"Dup?\" column of the correct transaction.\n\nYou can control the rules used by GnuCash to find duplicate transcations \nin the \"QIF Import\" section of the GnuCash Preferences dialog.\n\nClick \"Next\" to find duplicate transactions. "));
gtk_widget_ref (label847694);
gtk_object_set_data_full (GTK_OBJECT (QIF_Import_Druid), "label847694", label847694,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (label847694);
gtk_box_pack_start (GTK_BOX (druid_vbox34), label847694, FALSE, FALSE, 0);
gtk_label_set_justify (GTK_LABEL (label847694), GTK_JUSTIFY_LEFT);
match_duplicates_page = gnome_druid_page_standard_new_with_vals ("", NULL);
gtk_widget_ref (match_duplicates_page);
gtk_object_set_data_full (GTK_OBJECT (QIF_Import_Druid), "match_duplicates_page", match_duplicates_page,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show_all (match_duplicates_page);
gnome_druid_append_page (GNOME_DRUID (qif_import_druid), GNOME_DRUID_PAGE (match_duplicates_page));
gnome_druid_page_standard_set_bg_color (GNOME_DRUID_PAGE_STANDARD (match_duplicates_page), &match_duplicates_page_bg_color);
gnome_druid_page_standard_set_logo_bg_color (GNOME_DRUID_PAGE_STANDARD (match_duplicates_page), &match_duplicates_page_logo_bg_color);
gnome_druid_page_standard_set_title_color (GNOME_DRUID_PAGE_STANDARD (match_duplicates_page), &match_duplicates_page_title_color);
gnome_druid_page_standard_set_title (GNOME_DRUID_PAGE_STANDARD (match_duplicates_page), _("Select possible duplicates"));
druid_vbox35 = GNOME_DRUID_PAGE_STANDARD (match_duplicates_page)->vbox;
gtk_widget_ref (druid_vbox35);
gtk_object_set_data_full (GTK_OBJECT (QIF_Import_Druid), "druid_vbox35", druid_vbox35,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (druid_vbox35);
hbox94 = gtk_hbox_new (TRUE, 0);
gtk_widget_ref (hbox94);
gtk_object_set_data_full (GTK_OBJECT (QIF_Import_Druid), "hbox94", hbox94,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (hbox94);
gtk_box_pack_start (GTK_BOX (druid_vbox35), hbox94, TRUE, TRUE, 0);
frame45 = gtk_frame_new (_("Imported transactions with duplicates"));
gtk_widget_ref (frame45);
gtk_object_set_data_full (GTK_OBJECT (QIF_Import_Druid), "frame45", frame45,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (frame45);
gtk_box_pack_start (GTK_BOX (hbox94), frame45, TRUE, TRUE, 0);
scrolledwindow22 = gtk_scrolled_window_new (NULL, NULL);
gtk_widget_ref (scrolledwindow22);
gtk_object_set_data_full (GTK_OBJECT (QIF_Import_Druid), "scrolledwindow22", scrolledwindow22,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (scrolledwindow22);
gtk_container_add (GTK_CONTAINER (frame45), scrolledwindow22);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow22), GTK_POLICY_NEVER, GTK_POLICY_NEVER);
new_transaction_list = gtk_clist_new (3);
gtk_widget_ref (new_transaction_list);
gtk_object_set_data_full (GTK_OBJECT (QIF_Import_Druid), "new_transaction_list", new_transaction_list,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (new_transaction_list);
gtk_container_add (GTK_CONTAINER (scrolledwindow22), new_transaction_list);
gtk_clist_set_column_width (GTK_CLIST (new_transaction_list), 0, 53);
gtk_clist_set_column_width (GTK_CLIST (new_transaction_list), 1, 172);
gtk_clist_set_column_width (GTK_CLIST (new_transaction_list), 2, 56);
gtk_clist_column_titles_show (GTK_CLIST (new_transaction_list));
label847700 = gtk_label_new (_("Date"));
gtk_widget_ref (label847700);
gtk_object_set_data_full (GTK_OBJECT (QIF_Import_Druid), "label847700", label847700,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (label847700);
gtk_clist_set_column_widget (GTK_CLIST (new_transaction_list), 0, label847700);
label847701 = gtk_label_new (_("Description"));
gtk_widget_ref (label847701);
gtk_object_set_data_full (GTK_OBJECT (QIF_Import_Druid), "label847701", label847701,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (label847701);
gtk_clist_set_column_widget (GTK_CLIST (new_transaction_list), 1, label847701);
label847702 = gtk_label_new (_("Amount"));
gtk_widget_ref (label847702);
gtk_object_set_data_full (GTK_OBJECT (QIF_Import_Druid), "label847702", label847702,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (label847702);
gtk_clist_set_column_widget (GTK_CLIST (new_transaction_list), 2, label847702);
frame46 = gtk_frame_new (_("Possible duplicates for selected new transaction"));
gtk_widget_ref (frame46);
gtk_object_set_data_full (GTK_OBJECT (QIF_Import_Druid), "frame46", frame46,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (frame46);
gtk_box_pack_start (GTK_BOX (hbox94), frame46, TRUE, TRUE, 0);
scrolledwindow23 = gtk_scrolled_window_new (NULL, NULL);
gtk_widget_ref (scrolledwindow23);
gtk_object_set_data_full (GTK_OBJECT (QIF_Import_Druid), "scrolledwindow23", scrolledwindow23,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (scrolledwindow23);
gtk_container_add (GTK_CONTAINER (frame46), scrolledwindow23);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow23), GTK_POLICY_NEVER, GTK_POLICY_NEVER);
old_transaction_list = gtk_clist_new (4);
gtk_widget_ref (old_transaction_list);
gtk_object_set_data_full (GTK_OBJECT (QIF_Import_Druid), "old_transaction_list", old_transaction_list,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (old_transaction_list);
gtk_container_add (GTK_CONTAINER (scrolledwindow23), old_transaction_list);
gtk_clist_set_column_width (GTK_CLIST (old_transaction_list), 0, 50);
gtk_clist_set_column_width (GTK_CLIST (old_transaction_list), 1, 133);
gtk_clist_set_column_width (GTK_CLIST (old_transaction_list), 2, 55);
gtk_clist_set_column_width (GTK_CLIST (old_transaction_list), 3, 32);
gtk_clist_column_titles_show (GTK_CLIST (old_transaction_list));
label847703 = gtk_label_new (_("Date"));
gtk_widget_ref (label847703);
gtk_object_set_data_full (GTK_OBJECT (QIF_Import_Druid), "label847703", label847703,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (label847703);
gtk_clist_set_column_widget (GTK_CLIST (old_transaction_list), 0, label847703);
label847704 = gtk_label_new (_("Description"));
gtk_widget_ref (label847704);
gtk_object_set_data_full (GTK_OBJECT (QIF_Import_Druid), "label847704", label847704,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (label847704);
gtk_clist_set_column_widget (GTK_CLIST (old_transaction_list), 1, label847704);
label847705 = gtk_label_new (_("Amount"));
gtk_widget_ref (label847705);
gtk_object_set_data_full (GTK_OBJECT (QIF_Import_Druid), "label847705", label847705,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (label847705);
gtk_clist_set_column_widget (GTK_CLIST (old_transaction_list), 2, label847705);
label847706 = gtk_label_new (_("Dup?"));
gtk_widget_ref (label847706);
gtk_object_set_data_full (GTK_OBJECT (QIF_Import_Druid), "label847706", label847706,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (label847706);
gtk_clist_set_column_widget (GTK_CLIST (old_transaction_list), 3, label847706);
end_page = gnome_druid_page_finish_new ();
gtk_widget_ref (end_page);
gtk_object_set_data_full (GTK_OBJECT (QIF_Import_Druid), "end_page", end_page,
@ -4507,16 +4683,16 @@ create_QIF_Import_Druid (void)
gtk_signal_connect (GTK_OBJECT (button70), "clicked",
GTK_SIGNAL_FUNC (gnc_ui_qif_import_unload_file_cb),
QIF_Import_Druid);
gtk_signal_connect (GTK_OBJECT (druidpagestandard3), "prepare",
gtk_signal_connect (GTK_OBJECT (account_match_page), "prepare",
GTK_SIGNAL_FUNC (gnc_ui_qif_import_accounts_prepare_cb),
QIF_Import_Druid);
gtk_signal_connect (GTK_OBJECT (account_page_list), "select_row",
GTK_SIGNAL_FUNC (gnc_ui_qif_import_account_line_select_cb),
QIF_Import_Druid);
gtk_signal_connect (GTK_OBJECT (druidpagestandard4), "prepare",
gtk_signal_connect (GTK_OBJECT (category_match_page), "prepare",
GTK_SIGNAL_FUNC (gnc_ui_qif_import_categories_prepare_cb),
QIF_Import_Druid);
gtk_signal_connect (GTK_OBJECT (druidpagestandard4), "next",
gtk_signal_connect (GTK_OBJECT (category_match_page), "next",
GTK_SIGNAL_FUNC (gnc_ui_qif_import_categories_next_cb),
QIF_Import_Druid);
gtk_signal_connect (GTK_OBJECT (category_page_list), "select_row",
@ -4525,9 +4701,18 @@ create_QIF_Import_Druid (void)
gtk_signal_connect (GTK_OBJECT (currency_page), "next",
GTK_SIGNAL_FUNC (gnc_ui_qif_import_currency_next_cb),
QIF_Import_Druid);
gtk_signal_connect (GTK_OBJECT (commodity_page), "prepare",
gtk_signal_connect (GTK_OBJECT (commodity_doc_page), "prepare",
GTK_SIGNAL_FUNC (gnc_ui_qif_import_commodity_prepare_cb),
QIF_Import_Druid);
gtk_signal_connect (GTK_OBJECT (match_doc_page), "next",
GTK_SIGNAL_FUNC (gnc_ui_qif_import_convert_cb),
QIF_Import_Druid);
gtk_signal_connect (GTK_OBJECT (new_transaction_list), "select_row",
GTK_SIGNAL_FUNC (gnc_ui_qif_import_duplicate_new_select_cb),
QIF_Import_Druid);
gtk_signal_connect (GTK_OBJECT (old_transaction_list), "select_row",
GTK_SIGNAL_FUNC (gnc_ui_qif_import_duplicate_old_select_cb),
QIF_Import_Druid);
gtk_signal_connect (GTK_OBJECT (end_page), "finish",
GTK_SIGNAL_FUNC (gnc_ui_qif_import_finish_cb),
QIF_Import_Druid);
@ -4924,7 +5109,7 @@ create_Transfer_Dialog (void)
gtk_button_box_set_spacing (GTK_BUTTON_BOX (dialog_action_area13), 8);
gnome_dialog_append_button (GNOME_DIALOG (Transfer_Dialog), GNOME_STOCK_BUTTON_OK);
button66 = g_list_last (GNOME_DIALOG (Transfer_Dialog)->buttons)->data;
button66 = GTK_WIDGET (g_list_last (GNOME_DIALOG (Transfer_Dialog)->buttons)->data);
gtk_widget_ref (button66);
gtk_object_set_data_full (GTK_OBJECT (Transfer_Dialog), "button66", button66,
(GtkDestroyNotify) gtk_widget_unref);
@ -4932,7 +5117,7 @@ create_Transfer_Dialog (void)
GTK_WIDGET_SET_FLAGS (button66, GTK_CAN_DEFAULT);
gnome_dialog_append_button (GNOME_DIALOG (Transfer_Dialog), GNOME_STOCK_BUTTON_CANCEL);
button68 = g_list_last (GNOME_DIALOG (Transfer_Dialog)->buttons)->data;
button68 = GTK_WIDGET (g_list_last (GNOME_DIALOG (Transfer_Dialog)->buttons)->data);
gtk_widget_ref (button68);
gtk_object_set_data_full (GTK_OBJECT (Transfer_Dialog), "button68", button68,
(GtkDestroyNotify) gtk_widget_unref);
@ -5386,7 +5571,7 @@ create_New_Style_Sheet_Dialog (void)
gtk_button_box_set_spacing (GTK_BUTTON_BOX (dialog_action_area15), 8);
gnome_dialog_append_button (GNOME_DIALOG (New_Style_Sheet_Dialog), GNOME_STOCK_BUTTON_OK);
button73 = g_list_last (GNOME_DIALOG (New_Style_Sheet_Dialog)->buttons)->data;
button73 = GTK_WIDGET (g_list_last (GNOME_DIALOG (New_Style_Sheet_Dialog)->buttons)->data);
gtk_widget_ref (button73);
gtk_object_set_data_full (GTK_OBJECT (New_Style_Sheet_Dialog), "button73", button73,
(GtkDestroyNotify) gtk_widget_unref);
@ -5394,7 +5579,7 @@ create_New_Style_Sheet_Dialog (void)
GTK_WIDGET_SET_FLAGS (button73, GTK_CAN_DEFAULT);
gnome_dialog_append_button (GNOME_DIALOG (New_Style_Sheet_Dialog), GNOME_STOCK_BUTTON_CANCEL);
button75 = g_list_last (GNOME_DIALOG (New_Style_Sheet_Dialog)->buttons)->data;
button75 = GTK_WIDGET (g_list_last (GNOME_DIALOG (New_Style_Sheet_Dialog)->buttons)->data);
gtk_widget_ref (button75);
gtk_object_set_data_full (GTK_OBJECT (New_Style_Sheet_Dialog), "button75", button75,
(GtkDestroyNotify) gtk_widget_unref);
@ -5611,7 +5796,7 @@ create_Tax_Information_Dialog (void)
gtk_button_box_set_spacing (GTK_BUTTON_BOX (dialog_action_area14), 8);
gnome_dialog_append_button (GNOME_DIALOG (Tax_Information_Dialog), GNOME_STOCK_BUTTON_OK);
button73 = g_list_last (GNOME_DIALOG (Tax_Information_Dialog)->buttons)->data;
button73 = GTK_WIDGET (g_list_last (GNOME_DIALOG (Tax_Information_Dialog)->buttons)->data);
gtk_widget_ref (button73);
gtk_object_set_data_full (GTK_OBJECT (Tax_Information_Dialog), "button73", button73,
(GtkDestroyNotify) gtk_widget_unref);
@ -5619,7 +5804,7 @@ create_Tax_Information_Dialog (void)
GTK_WIDGET_SET_FLAGS (button73, GTK_CAN_DEFAULT);
gnome_dialog_append_button (GNOME_DIALOG (Tax_Information_Dialog), GNOME_STOCK_BUTTON_APPLY);
button74 = g_list_last (GNOME_DIALOG (Tax_Information_Dialog)->buttons)->data;
button74 = GTK_WIDGET (g_list_last (GNOME_DIALOG (Tax_Information_Dialog)->buttons)->data);
gtk_widget_ref (button74);
gtk_object_set_data_full (GTK_OBJECT (Tax_Information_Dialog), "button74", button74,
(GtkDestroyNotify) gtk_widget_unref);
@ -5627,7 +5812,7 @@ create_Tax_Information_Dialog (void)
GTK_WIDGET_SET_FLAGS (button74, GTK_CAN_DEFAULT);
gnome_dialog_append_button (GNOME_DIALOG (Tax_Information_Dialog), GNOME_STOCK_BUTTON_CANCEL);
button75 = g_list_last (GNOME_DIALOG (Tax_Information_Dialog)->buttons)->data;
button75 = GTK_WIDGET (g_list_last (GNOME_DIALOG (Tax_Information_Dialog)->buttons)->data);
gtk_widget_ref (button75);
gtk_object_set_data_full (GTK_OBJECT (Tax_Information_Dialog), "button75", button75,
(GtkDestroyNotify) gtk_widget_unref);
@ -5732,7 +5917,7 @@ create_Duplicate_Transaction_Dialog (void)
gtk_button_box_set_spacing (GTK_BUTTON_BOX (dialog_action_area15), 8);
gnome_dialog_append_button (GNOME_DIALOG (Duplicate_Transaction_Dialog), GNOME_STOCK_BUTTON_OK);
button76 = g_list_last (GNOME_DIALOG (Duplicate_Transaction_Dialog)->buttons)->data;
button76 = GTK_WIDGET (g_list_last (GNOME_DIALOG (Duplicate_Transaction_Dialog)->buttons)->data);
gtk_widget_ref (button76);
gtk_object_set_data_full (GTK_OBJECT (Duplicate_Transaction_Dialog), "button76", button76,
(GtkDestroyNotify) gtk_widget_unref);
@ -5740,7 +5925,7 @@ create_Duplicate_Transaction_Dialog (void)
GTK_WIDGET_SET_FLAGS (button76, GTK_CAN_DEFAULT);
gnome_dialog_append_button (GNOME_DIALOG (Duplicate_Transaction_Dialog), GNOME_STOCK_BUTTON_CANCEL);
button77 = g_list_last (GNOME_DIALOG (Duplicate_Transaction_Dialog)->buttons)->data;
button77 = GTK_WIDGET (g_list_last (GNOME_DIALOG (Duplicate_Transaction_Dialog)->buttons)->data);
gtk_widget_ref (button77);
gtk_object_set_data_full (GTK_OBJECT (Duplicate_Transaction_Dialog), "button77", button77,
(GtkDestroyNotify) gtk_widget_unref);

View File

@ -2991,6 +2991,7 @@ Exactly
<can_default>True</can_default>
<can_focus>True</can_focus>
<label>Add</label>
<relief>GTK_RELIEF_NORMAL</relief>
</widget>
<widget>
@ -3000,6 +3001,7 @@ Exactly
<can_default>True</can_default>
<can_focus>True</can_focus>
<label>Delete</label>
<relief>GTK_RELIEF_NORMAL</relief>
</widget>
</widget>
@ -3020,6 +3022,7 @@ Exactly
<tooltip>Move the selected item up</tooltip>
<can_focus>True</can_focus>
<label></label>
<relief>GTK_RELIEF_NORMAL</relief>
<child>
<padding>0</padding>
<expand>False</expand>
@ -3033,6 +3036,7 @@ Exactly
<tooltip>Move the selected item down</tooltip>
<can_focus>True</can_focus>
<label></label>
<relief>GTK_RELIEF_NORMAL</relief>
<child>
<padding>0</padding>
<expand>False</expand>
@ -3186,6 +3190,7 @@ No Total
<name>match_button</name>
<can_focus>True</can_focus>
<label>Matching Transactions...</label>
<relief>GTK_RELIEF_NORMAL</relief>
<child>
<padding>0</padding>
<expand>True</expand>
@ -3607,6 +3612,7 @@ Contingency
<tooltip>Clear the entry</tooltip>
<can_focus>True</can_focus>
<label>Clear</label>
<relief>GTK_RELIEF_NORMAL</relief>
<child>
<padding>0</padding>
<expand>False</expand>
@ -3620,6 +3626,7 @@ Contingency
<name>payment_periods_calc_button</name>
<can_focus>True</can_focus>
<label>Calculate</label>
<relief>GTK_RELIEF_NORMAL</relief>
<child>
<padding>0</padding>
<expand>False</expand>
@ -3691,6 +3698,7 @@ Contingency
<tooltip>Clear the entry</tooltip>
<can_focus>True</can_focus>
<label>Clear</label>
<relief>GTK_RELIEF_NORMAL</relief>
<child>
<padding>0</padding>
<expand>False</expand>
@ -3704,6 +3712,7 @@ Contingency
<name>interest_rate_calc_button</name>
<can_focus>True</can_focus>
<label>Calculate</label>
<relief>GTK_RELIEF_NORMAL</relief>
<child>
<padding>0</padding>
<expand>False</expand>
@ -3775,6 +3784,7 @@ Contingency
<tooltip>Clear the entry</tooltip>
<can_focus>True</can_focus>
<label>Clear</label>
<relief>GTK_RELIEF_NORMAL</relief>
<child>
<padding>0</padding>
<expand>False</expand>
@ -3788,6 +3798,7 @@ Contingency
<name>present_value_calc_button</name>
<can_focus>True</can_focus>
<label>Calculate</label>
<relief>GTK_RELIEF_NORMAL</relief>
<child>
<padding>0</padding>
<expand>False</expand>
@ -3859,6 +3870,7 @@ Contingency
<tooltip>Clear the entry</tooltip>
<can_focus>True</can_focus>
<label>Clear</label>
<relief>GTK_RELIEF_NORMAL</relief>
<child>
<padding>0</padding>
<expand>False</expand>
@ -3872,6 +3884,7 @@ Contingency
<name>periodic_payment_calc_button</name>
<can_focus>True</can_focus>
<label>Calculate</label>
<relief>GTK_RELIEF_NORMAL</relief>
<child>
<padding>0</padding>
<expand>False</expand>
@ -3943,6 +3956,7 @@ Contingency
<tooltip>Clear the entry</tooltip>
<can_focus>True</can_focus>
<label>Clear</label>
<relief>GTK_RELIEF_NORMAL</relief>
<child>
<padding>0</padding>
<expand>False</expand>
@ -3956,6 +3970,7 @@ Contingency
<name>future_value_calc_button</name>
<can_focus>True</can_focus>
<label>Calculate</label>
<relief>GTK_RELIEF_NORMAL</relief>
<child>
<padding>0</padding>
<expand>False</expand>
@ -5625,7 +5640,7 @@ Click &quot;Back&quot; to review your currency selections.</text>
<widget>
<class>GnomeDruidPageStart</class>
<name>druidpagestart1</name>
<name>start_page</name>
<title>Import QIF files</title>
<text>Gnucash can import financial data from QIF (Quicken
Interchange Format) files written by Quicken/Quickbooks,
@ -5749,6 +5764,7 @@ worry if your data is in multiple files.
<last_modification_time>Wed, 30 Aug 2000 17:33:50 GMT</last_modification_time>
</signal>
<label>Select...</label>
<relief>GTK_RELIEF_NORMAL</relief>
<child>
<padding>3</padding>
<expand>False</expand>
@ -5782,7 +5798,7 @@ worry if your data is in multiple files.
<child>
<padding>0</padding>
<expand>True</expand>
<fill>True</fill>
<fill>False</fill>
</child>
<widget>
@ -6062,6 +6078,7 @@ of the QIF import process. </label>
<last_modification_time>Wed, 30 Aug 2000 15:32:12 GMT</last_modification_time>
</signal>
<label>Load another file</label>
<relief>GTK_RELIEF_NORMAL</relief>
<child>
<padding>0</padding>
<expand>True</expand>
@ -6080,6 +6097,7 @@ of the QIF import process. </label>
<last_modification_time>Wed, 30 Aug 2000 15:34:33 GMT</last_modification_time>
</signal>
<label>Unload selected file</label>
<relief>GTK_RELIEF_NORMAL</relief>
<child>
<padding>0</padding>
<expand>True</expand>
@ -6092,7 +6110,7 @@ of the QIF import process. </label>
<widget>
<class>GnomeDruidPageStandard</class>
<name>druidpagestandard9</name>
<name>account_doc_page</name>
<title>Your accounts and stock holdings</title>
<title_color>255,255,255</title_color>
<background_color>153,191,153</background_color>
@ -6144,7 +6162,7 @@ page so you can change them if you want to, but it is safe to leave them alone.
<widget>
<class>GnomeDruidPageStandard</class>
<name>druidpagestandard3</name>
<name>account_match_page</name>
<signal>
<name>prepare</name>
<handler>gnc_ui_qif_import_accounts_prepare_cb</handler>
@ -6259,7 +6277,7 @@ page so you can change them if you want to, but it is safe to leave them alone.
<widget>
<class>GnomeDruidPageStandard</class>
<name>druidpagestandard10</name>
<name>category_doc_page</name>
<title>Income and expense categories</title>
<title_color>255,255,255</title_color>
<background_color>153,191,154</background_color>
@ -6307,7 +6325,7 @@ within GnuCash.</label>
<widget>
<class>GnomeDruidPageStandard</class>
<name>druidpagestandard4</name>
<name>category_match_page</name>
<signal>
<name>prepare</name>
<handler>gnc_ui_qif_import_categories_prepare_cb</handler>
@ -6524,7 +6542,7 @@ mutual funds in the imported data.</label>
<widget>
<class>GnomeDruidPageStandard</class>
<name>commodity_page</name>
<name>commodity_doc_page</name>
<signal>
<name>prepare</name>
<handler>gnc_ui_qif_import_commodity_prepare_cb</handler>
@ -6580,6 +6598,269 @@ or listing for its type.
</widget>
</widget>
<widget>
<class>GnomeDruidPageStandard</class>
<name>match_doc_page</name>
<signal>
<name>next</name>
<handler>gnc_ui_qif_import_convert_cb</handler>
<data>QIF_Import_Druid</data>
<last_modification_time>Sat, 03 Feb 2001 19:33:19 GMT</last_modification_time>
</signal>
<title>Match duplicate transactions</title>
<title_color>255,255,255</title_color>
<background_color>153,191,154</background_color>
<logo_background_color>255,255,255</logo_background_color>
<widget>
<class>GtkVBox</class>
<child_name>GnomeDruidPageStandard:vbox</child_name>
<name>druid-vbox34</name>
<homogeneous>False</homogeneous>
<spacing>0</spacing>
<child>
<padding>0</padding>
<expand>True</expand>
<fill>True</fill>
</child>
<widget>
<class>GtkLabel</class>
<name>label847694</name>
<label>If you are importing a QIF file downloaded from a bank or other financial
institution, some of the information in the QIF file may duplicate information
already in your GnuCash accounts. GnuCash will try to detect duplicates
of existing transactions.
On the next page, you will be asked to confirm that an existing transaction
matches an imported transaction. Imported transactions are shown on the
left side of the page, and possible matches for the selected left-hand
transaction are shown to the right. There may be several old transactions
that could match an imported transaction; you will be able to select the
correct one by clicking in the &quot;Dup?&quot; column of the correct transaction.
You can control the rules used by GnuCash to find duplicate transcations
in the &quot;QIF Import&quot; section of the GnuCash Preferences dialog.
Click &quot;Next&quot; to find duplicate transactions. </label>
<justify>GTK_JUSTIFY_LEFT</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>False</fill>
</child>
</widget>
</widget>
</widget>
<widget>
<class>GnomeDruidPageStandard</class>
<name>match_duplicates_page</name>
<title>Select possible duplicates</title>
<title_color>255,255,255</title_color>
<background_color>153,191,154</background_color>
<logo_background_color>255,255,255</logo_background_color>
<widget>
<class>GtkVBox</class>
<child_name>GnomeDruidPageStandard:vbox</child_name>
<name>druid-vbox35</name>
<homogeneous>False</homogeneous>
<spacing>0</spacing>
<child>
<padding>0</padding>
<expand>True</expand>
<fill>True</fill>
</child>
<widget>
<class>GtkHBox</class>
<name>hbox94</name>
<homogeneous>True</homogeneous>
<spacing>0</spacing>
<child>
<padding>0</padding>
<expand>True</expand>
<fill>True</fill>
</child>
<widget>
<class>GtkFrame</class>
<name>frame45</name>
<label>Imported transactions with duplicates</label>
<label_xalign>0</label_xalign>
<shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
<child>
<padding>0</padding>
<expand>True</expand>
<fill>True</fill>
</child>
<widget>
<class>GtkScrolledWindow</class>
<name>scrolledwindow22</name>
<hscrollbar_policy>GTK_POLICY_NEVER</hscrollbar_policy>
<vscrollbar_policy>GTK_POLICY_NEVER</vscrollbar_policy>
<hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
<vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
<widget>
<class>GtkCList</class>
<name>new_transaction_list</name>
<can_focus>True</can_focus>
<signal>
<name>select_row</name>
<handler>gnc_ui_qif_import_duplicate_new_select_cb</handler>
<data>QIF_Import_Druid</data>
<last_modification_time>Mon, 05 Feb 2001 18:28:49 GMT</last_modification_time>
</signal>
<columns>3</columns>
<column_widths>53,172,56</column_widths>
<selection_mode>GTK_SELECTION_SINGLE</selection_mode>
<show_titles>True</show_titles>
<shadow_type>GTK_SHADOW_IN</shadow_type>
<widget>
<class>GtkLabel</class>
<child_name>CList:title</child_name>
<name>label847700</name>
<label>Date</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>0.5</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
</widget>
<widget>
<class>GtkLabel</class>
<child_name>CList:title</child_name>
<name>label847701</name>
<label>Description</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>0.5</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
</widget>
<widget>
<class>GtkLabel</class>
<child_name>CList:title</child_name>
<name>label847702</name>
<label>Amount</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>0.5</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
</widget>
</widget>
</widget>
</widget>
<widget>
<class>GtkFrame</class>
<name>frame46</name>
<label>Possible duplicates for selected new transaction</label>
<label_xalign>0</label_xalign>
<shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
<child>
<padding>0</padding>
<expand>True</expand>
<fill>True</fill>
</child>
<widget>
<class>GtkScrolledWindow</class>
<name>scrolledwindow23</name>
<hscrollbar_policy>GTK_POLICY_NEVER</hscrollbar_policy>
<vscrollbar_policy>GTK_POLICY_NEVER</vscrollbar_policy>
<hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
<vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
<widget>
<class>GtkCList</class>
<name>old_transaction_list</name>
<can_focus>True</can_focus>
<signal>
<name>select_row</name>
<handler>gnc_ui_qif_import_duplicate_old_select_cb</handler>
<data>QIF_Import_Druid</data>
<last_modification_time>Mon, 05 Feb 2001 18:29:59 GMT</last_modification_time>
</signal>
<columns>4</columns>
<column_widths>50,133,55,32</column_widths>
<selection_mode>GTK_SELECTION_SINGLE</selection_mode>
<show_titles>True</show_titles>
<shadow_type>GTK_SHADOW_IN</shadow_type>
<widget>
<class>GtkLabel</class>
<child_name>CList:title</child_name>
<name>label847703</name>
<label>Date</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>0.5</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
</widget>
<widget>
<class>GtkLabel</class>
<child_name>CList:title</child_name>
<name>label847704</name>
<label>Description</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>0.5</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
</widget>
<widget>
<class>GtkLabel</class>
<child_name>CList:title</child_name>
<name>label847705</name>
<label>Amount</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>0.5</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
</widget>
<widget>
<class>GtkLabel</class>
<child_name>CList:title</child_name>
<name>label847706</name>
<label>Dup?</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>0.5</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
</widget>
</widget>
</widget>
</widget>
</widget>
</widget>
</widget>
<widget>
<class>GnomeDruidPageFinish</class>
<name>end_page</name>
@ -7346,6 +7627,7 @@ Click &quot;Cancel&quot; to abort the QIF import process.</text>
<can_default>True</can_default>
<can_focus>True</can_focus>
<stock_button>GNOME_STOCK_BUTTON_OK</stock_button>
<relief>GTK_RELIEF_NORMAL</relief>
</widget>
<widget>
@ -7355,6 +7637,7 @@ Click &quot;Cancel&quot; to abort the QIF import process.</text>
<can_default>True</can_default>
<can_focus>True</can_focus>
<stock_button>GNOME_STOCK_BUTTON_CANCEL</stock_button>
<relief>GTK_RELIEF_NORMAL</relief>
</widget>
</widget>
</widget>
@ -7567,6 +7850,7 @@ words.
<last_modification_time>Fri, 15 Dec 2000 18:13:53 GMT</last_modification_time>
</signal>
<label>Search</label>
<relief>GTK_RELIEF_NORMAL</relief>
<child>
<padding>0</padding>
<expand>True</expand>
@ -7585,6 +7869,7 @@ words.
<last_modification_time>Fri, 15 Dec 2000 18:14:21 GMT</last_modification_time>
</signal>
<label>Help</label>
<relief>GTK_RELIEF_NORMAL</relief>
<child>
<padding>0</padding>
<expand>True</expand>
@ -8066,6 +8351,7 @@ words.
<border_width>3</border_width>
<can_focus>True</can_focus>
<label>Select Subaccounts</label>
<relief>GTK_RELIEF_NORMAL</relief>
<child>
<padding>0</padding>
<expand>False</expand>
@ -8079,6 +8365,7 @@ words.
<border_width>3</border_width>
<can_focus>True</can_focus>
<label>Unselect Subaccounts</label>
<relief>GTK_RELIEF_NORMAL</relief>
<child>
<padding>0</padding>
<expand>False</expand>
@ -8536,6 +8823,7 @@ words.
<name>new_button</name>
<can_focus>True</can_focus>
<label>New...</label>
<relief>GTK_RELIEF_NORMAL</relief>
<child>
<padding>0</padding>
<expand>True</expand>
@ -8548,6 +8836,7 @@ words.
<name>delete_button</name>
<can_focus>True</can_focus>
<label>Delete</label>
<relief>GTK_RELIEF_NORMAL</relief>
<child>
<padding>0</padding>
<expand>True</expand>

View File

@ -22,6 +22,28 @@
(gnc:support "gnc-numeric.scm")
;; use 'logor' in guile to bit-combine RND and DENOM flags.
(define GNC-RND-FLOOR 1)
(define GNC-RND-CEIL 2)
(define GNC-RND-TRUNC 3)
(define GNC-RND-PROMOTE 4)
(define GNC-RND-ROUND-HALF-DOWN 5)
(define GNC-RND-ROUND-HALF-UP 6)
(define GNC-RND-ROUND 7)
(define GNC-RND-NEVER 8)
(define GNC-DENOM-AUTO 0)
(define GNC-DENOM-REDUCE 32)
(define GNC-DENOM-FIXED 64)
(define GNC-DENOM-LCD 48)
(define GNC-ERROR-OK 0)
(define GNC-ERROR-ARG -1)
(define GNC-ERROR-OVERFLOW -2)
(define GNC-ERROR-DENOM-DIFF -3)
(define GNC-ERROR-REMAINDER -4)
(define <gnc-numeric>
(make-record-type "<gnc-numeric>"
'(num denom)))
@ -38,6 +60,9 @@
(define gnc:gnc-numeric-denom
(record-accessor <gnc-numeric> 'denom))
(define (gnc:numeric-denom-reciprocal arg)
(- arg))

View File

@ -6,6 +6,7 @@ gncscm_DATA = \
qif-file.scm \
qif-guess-map.scm \
qif-import.scm \
qif-merge-groups.scm \
qif-objects.scm \
qif-parse.scm \
qif-to-gnc.scm \

View File

@ -538,3 +538,19 @@
bin))
(vector->list hash-table))
(list newhash (sort names string<?))))
(define (qif-import:refresh-match-selection matches item)
(if (> item -1)
(let ((i 0))
(for-each-in-order
(lambda (match)
(if (= i item)
(if (cdr match)
(set-cdr! match #f)
(set-cdr! match #t))
(set-cdr! match #f))
(set! i (+ 1 i)))
matches))))

View File

@ -9,12 +9,13 @@
(gnc:support "qif-import/qif-import.scm")
(gnc:depend "qif-import/simple-obj.scm")
(gnc:depend "qif-import/qif-objects.scm") ;; class definitions
(gnc:depend "qif-import/qif-parse.scm") ;; string-to-value, date parsing
(gnc:depend "qif-import/qif-objects.scm") ;; class definitions
(gnc:depend "qif-import/qif-parse.scm") ;; string-to-value, date parsing
(gnc:depend "qif-import/qif-utils.scm")
(gnc:depend "qif-import/qif-file.scm") ;; actual file reading
(gnc:depend "qif-import/qif-dialog-utils.scm") ;; build displays for dialog
(gnc:depend "qif-import/qif-guess-map.scm") ;; build QIF->gnc acct mappings
(gnc:depend "qif-import/qif-to-gnc.scm") ;; conv QIF xtns/acct to GNC xtns/acct
(gnc:depend "qif-import/qif-file.scm") ;; actual file reading
(gnc:depend "qif-import/qif-dialog-utils.scm") ;; build displays for dialog
(gnc:depend "qif-import/qif-guess-map.scm") ;; build QIF->gnc acct mappings
(gnc:depend "qif-import/qif-to-gnc.scm") ;; conv QIF xtns/acct to GNC
(gnc:depend "qif-import/qif-merge-groups.scm") ;; merge into user's acct

View File

@ -0,0 +1,157 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; qif-merge-groups.scm
;;; eliminate duplicate xtns in a new (imported) account group
;;;
;;; Copyright 2001 Bill Gribble <grib@billgribble.com>
;;; $Id$
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(gnc:support "qif-import/qif-merge-groups.scm")
(gnc:depend "report-utilities.scm")
(define (gnc:group-get-transactions group)
(let ((query (gnc:malloc-query))
(xtns #f))
;; we want to find all transactions with every split inside the
;; account group.
(gnc:query-add-account-match
query
(gnc:list->glist (gnc:group-get-subaccounts group))
'acct-match-any 'query-or)
(gnc:query-set-group query group)
(set! xtns (gnc:query-get-transactions query 'query-match-all))
;; lose the query
(gnc:free-query query)
xtns))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; gnc:group-find-duplicates
;; detect redundant splits/xtns from 'new' and return
;; them in a list.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(define (gnc:group-find-duplicates old-group new-group)
;; get all the transactions in the new group, then iterate over them
;; trying to find matches in the new group. If there are matches,
;; push the matches onto a list.
(let* ((new-xtns
(gnc:glist->list (gnc:group-get-transactions new-group)
<gnc:Transaction*>))
(separator (string-ref (gnc:account-separator-char) 0))
(matches '()))
;; for each transaction in the new group, build a query that could
;; match possibly similar transactions.
(for-each
(lambda (xtn)
(let ((query (gnc:malloc-query)))
(gnc:query-set-group query old-group)
;; the date should be close to the same.. +/- a week.
(let ((date (gnc:transaction-get-date-posted xtn)))
(gnc:query-add-date-match-timepair
query #t (decdate date WeekDelta) #t (incdate date WeekDelta)
'query-and))
;; for each split in the transaction, add a term to match the
;; properties of one split
(let ((q-splits (gnc:malloc-query)))
(gnc:query-set-group q-splits old-group)
(for-each
(lambda (split)
(let ((sq (gnc:malloc-query)))
(gnc:query-set-group sq old-group)
;; we want to match the account in the old group that
;; has the same name as an account in the new group. If
;; there's not one (new account), the match will be NULL
;; and we know the query won't find anything. optimize
;; this later.
(gnc:query-add-single-account-match
sq
(gnc:get-account-from-full-name
old-group (gnc:account-get-full-name
(gnc:split-get-account split)) separator)
'query-and)
;; we want the amount for the split to match the amount
;; the old-group split. We should really check for
;; fuzziness.
(d-gnc:query-add-amount-match
sq (gnc:numeric-to-double (gnc:split-get-value split))
'amt-sgn-match-either 'amt-match-exactly
'query-and)
;; now merge into the split query. Reminder: q-splits
;; is set up to match any split that matches any split
;; in the current xtn; every split in an old transaction
;; must pass that filter.
(let ((q-new (gnc:query-merge q-splits sq 'query-or)))
(gnc:free-query q-splits)
(gnc:free-query sq)
(set! q-splits q-new))))
(gnc:transaction-get-splits xtn))
;; now q-splits will match any split that is the same as one
;; split in the old-group xtn. Merge it in.
(let ((q-new (gnc:query-merge query q-splits 'query-and)))
(gnc:free-query query)
(gnc:free-query q-splits)
(set! query q-new)))
;; now that we have built a query, get transactions in the old
;; account group that matches it.
(let ((old-xtns
(gnc:glist->list (gnc:query-get-transactions
query 'query-match-all)
<gnc:Transaction*>)))
(set! old-xtns (map
(lambda (elt)
(cons elt #f)) old-xtns))
;; if anything matched the query, push it onto the matches list
;; along with the transaction
(if (not (null? old-xtns))
(set! matches (cons (cons xtn old-xtns) matches))))
(gnc:free-query query)))
new-xtns)
;; return the matches
matches))
(define (gnc:prune-matching-transactions match-list)
(for-each
(lambda (match)
(let ((new-xtn (car match))
(matches (cdr match))
(do-delete #f))
(for-each
(lambda (old)
(if (cdr old)
(set! do-delete #t)))
matches)
(if do-delete
(begin
(gnc:transaction-begin-edit new-xtn)
(gnc:transaction-destroy new-xtn)
(gnc:transaction-commit-edit new-xtn)))))
match-list))
(define (gnc:group-catenate-and-merge old-group new-group)
;; stuff the new accounts into the old group and merge the accounts
(gnc:group-concat-group old-group new-group)
(gnc:free-account-group new-group)
(gnc:group-merge-accounts old-group))
diff -u /dev/null 'gnucash-1.5/src/scm/qif-import/qif-quick-import.scm'

View File

@ -0,0 +1,40 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; qif-quick-import.scm
;;; import 1 file, accepting all defaults and not modifying
;;; saved preferences
;;;
;;; Copyright 2001 Bill Gribble <grib@billgribble.com>
;;; $Id$
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(gnc:support "qif-import/qif-merge-groups.scm")
(gnc:depend "report-utilities.scm")
(define (qif-import:quick-import qif-filename)
(false-if-exception
(call-with-current-continuation
(lambda (exit)
;; read the file
(let ((read-success (qif-file:read-file qif-file filename)))
(if (not read-success)
(exit (cons #f "An error occurred while reading the QIF file."))))
;; parse fields. Take the default (first) date format if the
;; file is ambiguous -- FIXME
(let ((parse-success (qif-file:parse-fields qif-file)))
(if (not parse-success)
(exit (cons #f "An error occurred while parsing the QIF file.")))
(if (and (list? parse-success)
(car parse-success))
(qif-import:reparse-dates qif-file (caadr parse-return))))
;; load the account, category, and stock map information.
;; load into a GNC account group
;; check for duplicate transactions
;; catenate and merge the transactions
))))
diff -u 'tmp/gnucash/src/scm/qif-import/qif-to-gnc.scm' 'gnucash-1.5/src/scm/qif-import/qif-to-gnc.scm'

View File

@ -3,16 +3,13 @@
;;; this is where QIF transactions are transformed into a
;;; Gnucash account tree.
;;;
;;; Bill Gribble <grib@billgribble.com> 20 Feb 2000
;;; Copyright 2000-2001 Bill Gribble <grib@billgribble.com>
;;; $Id$
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(gnc:support "qif-import/qif-to-gnc.scm")
(define gnc:*default-denom* 100000)
(define GNC-RND-ROUND 7)
(define GNC-DENOM-REDUCE 32)
(define GNC-DENOM-LCD 48)
(define (gnc:qif-fuzzy= num-1 num-2)
(< (abs (- num-1 num-2)) .00000001))
@ -24,24 +21,24 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(define (qif-import:find-or-make-acct acct-info currency security
gnc-acct-hash acct-group)
gnc-acct-hash old-group new-group)
(let* ((separator (string-ref (gnc:account-separator-char) 0))
(gnc-name (qif-map-entry:gnc-name acct-info))
(existing-account (hash-ref gnc-acct-hash gnc-name))
(same-gnc-account
(gnc:get-account-from-full-name acct-group gnc-name separator))
(gnc:get-account-from-full-name old-group gnc-name separator))
(allowed-types
(qif-map-entry:allowed-types acct-info))
(make-new-acct #f)
(incompatible-acct #f))
(define (make-unique-name-variant long-name short-name)
(if (gnc:get-account-from-full-name acct-group long-name separator)
(if (gnc:get-account-from-full-name old-group long-name separator)
(let loop ((count 2))
(let ((test-name
(string-append long-name (sprintf #f " %a" count))))
(if (gnc:get-account-from-full-name
acct-group test-name separator)
old-group test-name separator)
(loop (+ 1 count))
test-name)))
short-name))
@ -122,7 +119,7 @@
(set! parent-acct (qif-import:find-or-make-acct
pinfo currency security
gnc-acct-hash acct-group)))
gnc-acct-hash old-group new-group)))
(begin
(set! acct-name gnc-name)))
@ -157,7 +154,7 @@
(gnc:account-commit-edit new-acct)
(if parent-acct
(gnc:account-insert-subaccount parent-acct new-acct)
(gnc:group-insert-account acct-group new-acct))
(gnc:group-insert-account new-group new-acct))
(hash-set! gnc-acct-hash gnc-name new-acct)
new-acct))))
@ -174,7 +171,8 @@
qif-acct-map qif-cat-map stock-map
default-currency-name)
(false-if-exception
(let* ((account-group (gnc:get-current-group))
(let* ((old-group (gnc:get-current-group))
(new-group (gnc:malloc-account-group))
(gnc-acct-hash (make-hash-table 20))
(separator (string-ref (gnc:account-separator-char) 0))
(default-currency
@ -249,17 +247,16 @@
(cond ((and equity? security) ;; a "retained holdings" acct
(qif-import:find-or-make-acct acctinfo
security security
gnc-acct-hash account-group))
gnc-acct-hash
old-group new-group))
(security
(qif-import:find-or-make-acct
acctinfo
default-currency security
gnc-acct-hash account-group))
acctinfo default-currency security
gnc-acct-hash old-group new-group))
(#t
(qif-import:find-or-make-acct
acctinfo
default-currency default-currency
gnc-acct-hash account-group)))))
acctinfo default-currency default-currency
gnc-acct-hash old-group new-group)))))
sorted-accounts-list)
;; before trying to mark transactions, prune down the list of
@ -321,12 +318,12 @@
;; create and fill in the GNC transaction
(let ((gnc-xtn (gnc:transaction-create)))
(gnc:transaction-begin-edit gnc-xtn)
;; build the transaction
(qif-import:qif-xtn-to-gnc-xtn
xtn qif-file gnc-xtn gnc-acct-hash
qif-acct-map qif-cat-map)
;; rebalance and commit everything
(gnc:transaction-commit-edit gnc-xtn)))))
(qif-file:xtns qif-file)))
@ -336,11 +333,8 @@
(if progress-dialog
(gnc:progress-dialog-destroy progress-dialog))
;; now take the new account tree and merge it in with the
;; existing gnucash account tree.
(gnc:group-merge-accounts account-group))))
new-group)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; qif-import:qif-xtn-to-gnc-xtn
;; translate a single transaction to a set of gnucash splits and
@ -1027,3 +1021,4 @@
(d-gnc:split-set-share-price
split (d-gnc:split-get-share-price last-split)))
(if (< i numsplits) (loop (+ 1 i) ith-split)))))))