[Gnucash-changes] r13381 - gnucash/trunk - Don't allow placeholder be selected for importing transactions. Fixes bug#327891.

Christian Stimming cstim at cvs.gnucash.org
Fri Feb 24 17:09:48 EST 2006


Author: cstim
Date: 2006-02-24 17:09:47 -0500 (Fri, 24 Feb 2006)
New Revision: 13381
Trac: http://svn.gnucash.org/trac/changeset/13381

Modified:
   gnucash/trunk/ChangeLog
   gnucash/trunk/src/import-export/import-account-matcher.c
Log:
Don't allow placeholder be selected for importing transactions. Fixes bug#327891.




Modified: gnucash/trunk/ChangeLog
===================================================================
--- gnucash/trunk/ChangeLog	2006-02-24 21:59:29 UTC (rev 13380)
+++ gnucash/trunk/ChangeLog	2006-02-24 22:09:47 UTC (rev 13381)
@@ -1,5 +1,9 @@
 2006-02-24  Christian Stimming  <stimming at tuhh.de>
 
+	* src/import-export/import-account-matcher.c: Don't allow
+	placeholder be selected for importing transactions. Fixes
+	bug#327891.
+
 	* src/import-export/mt940/gnc-mt940-import.c: Get MT940 importer
 	compile again (experimental; requires aqbanking-1.9.7). It is not
 	yet tested with actual files. Bug#325170.

Modified: gnucash/trunk/src/import-export/import-account-matcher.c
===================================================================
--- gnucash/trunk/src/import-export/import-account-matcher.c	2006-02-24 21:59:29 UTC (rev 13380)
+++ gnucash/trunk/src/import-export/import-account-matcher.c	2006-02-24 22:09:47 UTC (rev 13381)
@@ -202,6 +202,16 @@
 	 case GTK_RESPONSE_OK:
 	  retval = gnc_tree_view_account_get_selected_account(picker->account_tree);
 	  DEBUG("Selected account %p, %s", retval, xaccAccountGetName(retval));
+
+	  /* See if the selected account is a placeholder. */
+	  if (xaccAccountGetPlaceholder (retval)) {
+	    gnc_error_dialog (/* FIXME: add parent*/ NULL,
+			      _("The account %s does not allow transactions."),
+			      xaccAccountGetName (retval));
+	    response = GNC_RESPONSE_NEW;
+	    break;
+	  }
+
 	  if( account_online_id_value != NULL)
 	    {
 	      gnc_import_set_acc_online_id(retval, account_online_id_value);



More information about the gnucash-changes mailing list