[Gnucash-changes] r13860 - gnucash/trunk - Center the progress
dialog on the qif import druid. Fixes #336188.
David Hampton
hampton at cvs.gnucash.org
Wed Apr 26 00:49:25 EDT 2006
Author: hampton
Date: 2006-04-26 00:49:24 -0400 (Wed, 26 Apr 2006)
New Revision: 13860
Trac: http://svn.gnucash.org/trac/changeset/13860
Modified:
gnucash/trunk/ChangeLog
gnucash/trunk/src/gnome/glade/progress.glade
gnucash/trunk/src/import-export/qif-import/druid-qif-import.c
gnucash/trunk/src/import-export/qif-import/qif-file.scm
gnucash/trunk/src/import-export/qif-import/qif-merge-groups.scm
gnucash/trunk/src/import-export/qif-import/qif-to-gnc.scm
Log:
Center the progress dialog on the qif import druid. Fixes #336188.
Modified: gnucash/trunk/ChangeLog
===================================================================
--- gnucash/trunk/ChangeLog 2006-04-26 04:14:04 UTC (rev 13859)
+++ gnucash/trunk/ChangeLog 2006-04-26 04:49:24 UTC (rev 13860)
@@ -1,5 +1,12 @@
2006-04-25 David Hampton <hampton at employees.org>
+ * src/import-export/qif-import/qif-to-gnc.scm:
+ * src/import-export/qif-import/qif-merge-groups.scm:
+ * src/import-export/qif-import/qif-file.scm:
+ * src/import-export/qif-import/druid-qif-import.c:
+ * src/gnome/glade/progress.glade: Center the progress dialog on
+ the qif import druid. Fixes #336188.
+
* src/engine/gnc-pricedb.c:
* src/engine/gnc-commodity.c: Mark the collections as clean after
the default items have been created. Fixes #337185.
Modified: gnucash/trunk/src/gnome/glade/progress.glade
===================================================================
--- gnucash/trunk/src/gnome/glade/progress.glade 2006-04-26 04:14:04 UTC (rev 13859)
+++ gnucash/trunk/src/gnome/glade/progress.glade 2006-04-26 04:49:24 UTC (rev 13860)
@@ -16,7 +16,7 @@
<property name="decorated">True</property>
<property name="skip_taskbar_hint">False</property>
<property name="skip_pager_hint">False</property>
- <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
+ <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
<property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
<child>
Modified: gnucash/trunk/src/import-export/qif-import/druid-qif-import.c
===================================================================
--- gnucash/trunk/src/import-export/qif-import/druid-qif-import.c 2006-04-26 04:14:04 UTC (rev 13859)
+++ gnucash/trunk/src/import-export/qif-import/druid-qif-import.c 2006-04-26 04:49:24 UTC (rev 13860)
@@ -433,16 +433,18 @@
SCM check_from_acct = scm_c_eval_string("qif-file:check-from-acct");
SCM default_acct = scm_c_eval_string("qif-file:path-to-accountname");
SCM qif_file_parse_results = scm_c_eval_string("qif-file:parse-fields-results");
+ SCM window_type = scm_c_eval_string ("<gnc:UIWidget>");
SCM date_formats;
SCM scm_filename;
SCM scm_qiffile;
SCM imported_files = SCM_EOL;
SCM load_return, parse_return;
-
+ SCM window;
int ask_date_format = FALSE;
/* get the file name */
path_to_load = gtk_entry_get_text(GTK_ENTRY(wind->filename_entry));
+ window = gw_wcp_assimilate_ptr(wind->window, window_type);
/* check a few error conditions before we get started */
if(strlen(path_to_load) == 0) {
@@ -482,8 +484,8 @@
scm_gc_protect_object(wind->selected_file);
/* load the file */
- load_return = scm_call_3(qif_file_load, SCM_CAR(imported_files),
- scm_filename, wind->ticker_map);
+ load_return = scm_call_4(qif_file_load, SCM_CAR(imported_files),
+ scm_filename, wind->ticker_map, window);
/* a list returned is (#f error-message) for an error,
* (#t error-message) for a warning, or just #f for an
@@ -1104,8 +1106,10 @@
SCM qif_to_gnc = scm_c_eval_string("qif-import:qif-to-gnc");
SCM find_duplicates = scm_c_eval_string("gnc:group-find-duplicates");
+ SCM window_type = scm_c_eval_string ("<gnc:UIWidget>");
SCM retval;
SCM current_xtn;
+ SCM window;
GnomeDruidPage * gtkpage;
QIFDruidPage * page;
@@ -1150,13 +1154,15 @@
/* call a scheme function to do the work. The return value is an
* account group containing all the new accounts and transactions */
+ window = gw_wcp_assimilate_ptr(wind->window, window_type);
retval = scm_apply(qif_to_gnc,
- SCM_LIST6(wind->imported_files,
+ SCM_LIST7(wind->imported_files,
wind->acct_map_info,
wind->cat_map_info,
wind->memo_map_info,
wind->stock_hash,
- scm_makfrom0str(currname)),
+ scm_makfrom0str(currname),
+ window),
SCM_EOL);
gnc_unset_busy_cursor(NULL);
@@ -1177,9 +1183,9 @@
/* now detect duplicate transactions */
gnc_set_busy_cursor(NULL, TRUE);
- retval = scm_call_2(find_duplicates,
+ retval = scm_call_3(find_duplicates,
scm_c_eval_string("(gnc:get-current-group)"),
- wind->imported_account_group);
+ wind->imported_account_group, window);
gnc_unset_busy_cursor(NULL);
scm_gc_unprotect_object(wind->match_transactions);
Modified: gnucash/trunk/src/import-export/qif-import/qif-file.scm
===================================================================
--- gnucash/trunk/src/import-export/qif-import/qif-file.scm 2006-04-26 04:14:04 UTC (rev 13859)
+++ gnucash/trunk/src/import-export/qif-import/qif-file.scm 2006-04-26 04:49:24 UTC (rev 13860)
@@ -23,7 +23,7 @@
(let ((match (regexp-exec qif-bad-numeric-rexp input)))
(if match #f #t)))
-(define (qif-file:read-file self path ticker-map)
+(define (qif-file:read-file self path ticker-map window)
(false-if-exception
(let* ((qstate-type #f)
(current-xtn #f)
@@ -51,7 +51,7 @@
(if (> file-size 10000)
(begin
- (set! progress-dialog (gnc:progress-dialog-new #f #f))
+ (set! progress-dialog (gnc:progress-dialog-new window #f))
(gnc:progress-dialog-set-title progress-dialog (_ "Progress"))
(gnc:progress-dialog-set-heading progress-dialog
(_ "Loading QIF file..."))))
Modified: gnucash/trunk/src/import-export/qif-import/qif-merge-groups.scm
===================================================================
--- gnucash/trunk/src/import-export/qif-import/qif-merge-groups.scm 2006-04-26 04:14:04 UTC (rev 13859)
+++ gnucash/trunk/src/import-export/qif-import/qif-merge-groups.scm 2006-04-26 04:49:24 UTC (rev 13860)
@@ -30,7 +30,7 @@
;; them in a list.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(define (gnc:group-find-duplicates old-group new-group)
+(define (gnc:group-find-duplicates old-group new-group window)
;; 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.
@@ -42,7 +42,7 @@
(if (> work-to-do 100)
(begin
- (set! progress-dialog (gnc:progress-dialog-new #f #f))
+ (set! progress-dialog (gnc:progress-dialog-new window #f))
(gnc:progress-dialog-set-title progress-dialog (_ "Progress"))
(gnc:progress-dialog-set-heading progress-dialog
(_ "Finding duplicate transactions..."))))
Modified: gnucash/trunk/src/import-export/qif-import/qif-to-gnc.scm
===================================================================
--- gnucash/trunk/src/import-export/qif-import/qif-to-gnc.scm 2006-04-26 04:14:04 UTC (rev 13859)
+++ gnucash/trunk/src/import-export/qif-import/qif-to-gnc.scm 2006-04-26 04:49:24 UTC (rev 13860)
@@ -174,7 +174,7 @@
(define (qif-import:qif-to-gnc qif-files-list
qif-acct-map qif-cat-map
qif-memo-map stock-map
- default-currency-name)
+ default-currency-name window)
(gnc:backtrace-if-exception
(lambda ()
(let* ((old-group (gnc:get-current-group))
@@ -296,7 +296,7 @@
(if (> work-to-do 100)
(begin
- (set! progress-dialog (gnc:progress-dialog-new #f #f))
+ (set! progress-dialog (gnc:progress-dialog-new window #f))
(gnc:progress-dialog-set-title progress-dialog (_ "Progress"))
(gnc:progress-dialog-set-heading progress-dialog
(_ "Importing transactions..."))))
More information about the gnucash-changes
mailing list