r14558 - gnucash/branches/2.0 - Change cmdline warning into an actual user's error dialog

Derek Atkins warlord at cvs.gnucash.org
Tue Jul 25 18:22:47 EDT 2006


Author: warlord
Date: 2006-07-25 18:22:46 -0400 (Tue, 25 Jul 2006)
New Revision: 14558
Trac: http://svn.gnucash.org/trac/changeset/14558

Modified:
   gnucash/branches/2.0/
   gnucash/branches/2.0/ChangeLog
   gnucash/branches/2.0/src/report/report-system/report.scm
Log:
  Change cmdline warning into an actual user's error dialog
  when user attempts to save a report with the same name as
  an existing report.

Merge from r14546




Property changes on: gnucash/branches/2.0
___________________________________________________________________
Name: svk:merge
   - d2ab10a8-8a95-4986-baff-8d511d9f15b2:/local/gnucash/branches/2.0:12926
   + d2ab10a8-8a95-4986-baff-8d511d9f15b2:/local/gnucash/branches/2.0:12927

Modified: gnucash/branches/2.0/ChangeLog
===================================================================
--- gnucash/branches/2.0/ChangeLog	2006-07-25 22:22:31 UTC (rev 14557)
+++ gnucash/branches/2.0/ChangeLog	2006-07-25 22:22:46 UTC (rev 14558)
@@ -10,6 +10,13 @@
 	doubts the fiscal correctness of this account chart for small
 	businesses.
 
+2006-07-20  Christian Stimming <stimming at tuhh.de>
+
+	* src/report/report-system/report.scm:
+	  Change cmdline warning into an actual user's error dialog
+	  when user attempts to save a report with the same name as
+	  an existing report.
+
 2006-07-18  Christian Stimming <stimming at tuhh.de>
 
 	* configure.in:

Modified: gnucash/branches/2.0/src/report/report-system/report.scm
===================================================================
--- gnucash/branches/2.0/src/report/report-system/report.scm	2006-07-25 22:22:31 UTC (rev 14557)
+++ gnucash/branches/2.0/src/report/report-system/report.scm	2006-07-25 22:22:46 UTC (rev 14558)
@@ -98,8 +98,10 @@
 	      (hash-set! *gnc:_report-templates_*
 			 (gnc:report-template-name report-rec) report-rec)
 	      (begin
-		(gnc:error "Refusing to add custom report with the same name as an existing report.")
-		(gnc:error "Please edit your saved-reports file and delete the section for: " name)
+		;; FIXME: We should pass the top-level window
+		;; instead of the #f to gnc:error-dialog, but I
+		;; have no idea where to get it from.
+		(gnc:error-dialog #f (string-append (_ "A custom report with this name already exists. Either rename the report to store it with a different name, or edit your saved-reports file and delete the section with the following name: ") name ))
 		)))
         (gnc:warn "gnc:define-report: bad report"))))
 



More information about the gnucash-changes mailing list