r17525 - gnucash/trunk/src/gnome - Correctly set price sources in price editor dialog by reading it from the gui.

Andreas Köhler andi5 at cvs.gnucash.org
Mon Sep 15 09:13:49 EDT 2008


Author: andi5
Date: 2008-09-15 09:13:48 -0400 (Mon, 15 Sep 2008)
New Revision: 17525
Trac: http://svn.gnucash.org/trac/changeset/17525

Modified:
   gnucash/trunk/src/gnome/dialog-price-editor.c
Log:
Correctly set price sources in price editor dialog by reading it from the gui.

On trunk, the price tied to a price editor dialog is not initialized with a
source string anymore, so correctly read it from the gui before
committing the price.

Modified: gnucash/trunk/src/gnome/dialog-price-editor.c
===================================================================
--- gnucash/trunk/src/gnome/dialog-price-editor.c	2008-09-15 13:13:40 UTC (rev 17524)
+++ gnucash/trunk/src/gnome/dialog-price-editor.c	2008-09-15 13:13:48 UTC (rev 17525)
@@ -162,6 +162,7 @@
 {
   gnc_commodity *commodity;
   gnc_commodity *currency;
+  const char *source;
   const char *type;
   gnc_numeric value;
   Timespec date;
@@ -182,6 +183,8 @@
   date.tv_sec = gnc_date_edit_get_date (GNC_DATE_EDIT (pedit_dialog->date_edit));
   date.tv_nsec = 0;
 
+  source = gtk_entry_get_text (GTK_ENTRY (pedit_dialog->source_entry));
+
   type = type_index_to_string
     (gtk_combo_box_get_active (GTK_COMBO_BOX (pedit_dialog->type_combobox)));
 
@@ -195,6 +198,7 @@
   gnc_price_set_commodity (pedit_dialog->price, commodity);
   gnc_price_set_currency (pedit_dialog->price, currency);
   gnc_price_set_time (pedit_dialog->price, date);
+  gnc_price_set_source (pedit_dialog->price, source);
   gnc_price_set_typestr (pedit_dialog->price, type);
   gnc_price_set_value (pedit_dialog->price, value);
   gnc_price_commit_edit (pedit_dialog->price);



More information about the gnucash-changes mailing list