[Gnucash-changes] r13295 - gnucash/trunk - Pop up a warning dialog
if the user has no valid post-to accounts. Fixes #331730.
Derek Atkins
warlord at cvs.gnucash.org
Sun Feb 19 11:22:21 EST 2006
Author: warlord
Date: 2006-02-19 11:22:21 -0500 (Sun, 19 Feb 2006)
New Revision: 13295
Trac: http://svn.gnucash.org/trac/changeset/13295
Modified:
gnucash/trunk/ChangeLog
gnucash/trunk/src/business/business-gnome/dialog-payment.c
Log:
Pop up a warning dialog if the user has no valid post-to accounts. Fixes #331730.
Modified: gnucash/trunk/ChangeLog
===================================================================
--- gnucash/trunk/ChangeLog 2006-02-19 15:23:15 UTC (rev 13294)
+++ gnucash/trunk/ChangeLog 2006-02-19 16:22:21 UTC (rev 13295)
@@ -6,6 +6,10 @@
did in TransLog.c
Fixes #331620.
+ * src/business/business-gnome/dialog-payment.c:
+ Pop up a warning dialog if the user has no valid post-to accounts.
+ Fixes #331730.
+
2006-02-18 Derek Atkins <derek at ihtfp.com>
* intl-scm/xgettext.scm: remove the absolute path from filenames
Modified: gnucash/trunk/src/business/business-gnome/dialog-payment.c
===================================================================
--- gnucash/trunk/src/business/business-gnome/dialog-payment.c 2006-02-19 15:23:15 UTC (rev 13294)
+++ gnucash/trunk/src/business/business-gnome/dialog-payment.c 2006-02-19 16:22:21 UTC (rev 13295)
@@ -309,6 +309,26 @@
/* Show it all */
gtk_widget_show_all (pw->dialog);
+ /* Warn the user if they have no valid post-to accounts */
+ {
+ const gchar *text;
+ const char *acct_type;
+
+ text = gtk_entry_get_text(GTK_ENTRY((GTK_COMBO(pw->post_combo))->entry));
+ if (!text || safe_strcmp (text, "") == 0) {
+
+ /* XXX: I know there's only one type here */
+ acct_type = xaccAccountGetTypeStr(GPOINTER_TO_INT(pw->acct_types->data));
+ gnc_warning_dialog(pw->dialog,
+ _("You have no valid \"Post To\" accounts. "
+ "Please create an account of type \"%s\" "
+ "before you continue to process this payment. "
+ "Perhaps you want to create an Invoice or "
+ "Bill first?"),
+ acct_type);
+ }
+ }
+
return pw;
}
More information about the gnucash-changes
mailing list