gnucash maint: Fix rename failure for gnc_xfer_dialog_set_exchange_rate.

John Ralls jralls at code.gnucash.org
Thu Sep 17 19:05:12 EDT 2015


Updated	 via  https://github.com/Gnucash/gnucash/commit/766cf48f (commit)
	from  https://github.com/Gnucash/gnucash/commit/6e6eba35 (commit)



commit 766cf48f45fd649d3db0d2993ee745da019c376e
Author: John Ralls <jralls at ceridwen.us>
Date:   Thu Sep 17 16:00:42 2015 -0700

    Fix rename failure for gnc_xfer_dialog_set_exchange_rate.

diff --git a/src/business/business-gnome/dialog-invoice.c b/src/business/business-gnome/dialog-invoice.c
index 10c4d75..0a24b69 100644
--- a/src/business/business-gnome/dialog-invoice.c
+++ b/src/business/business-gnome/dialog-invoice.c
@@ -878,7 +878,7 @@ gnc_invoice_post(InvoiceWindow *iw, struct post_invoice_params *post_params)
             {
                 exch_rate = gnc_numeric_div ((gnc_numeric){1, 1}, exch_rate,
                             GNC_DENOM_AUTO, GNC_HOW_RND_ROUND_HALF_UP);
-                gnc_xfer_dialog_set_exchange_rate (xfer, exch_rate);
+                gnc_xfer_dialog_set_price_edit (xfer, exch_rate);
             }
         }
 
diff --git a/src/gnome-utils/dialog-transfer.c b/src/gnome-utils/dialog-transfer.c
index 4a3ed05..0c57cb3 100644
--- a/src/gnome-utils/dialog-transfer.c
+++ b/src/gnome-utils/dialog-transfer.c
@@ -160,7 +160,6 @@ static Account *gnc_transfer_dialog_get_selected_account (XferDialog *dialog,
 static void gnc_transfer_dialog_set_selected_account (XferDialog *dialog,
                                                       Account *account,
                                                       XferDirection direction);
-static void _gnc_xfer_dialog_set_price_edit(XferDialog*, gnc_numeric);
 
 void gnc_xfer_description_insert_cb(GtkEditable *editable,
                                     const gchar *insert_text,
@@ -336,7 +335,7 @@ gnc_xfer_dialog_update_price (XferDialog *xferData)
     gnc_price_unref(pr.price);
 
     /* and set the price entry */
-    _gnc_xfer_dialog_set_price_edit(xferData, price_value);
+    gnc_xfer_dialog_set_price_edit(xferData, price_value);
 
     /* And then update the to_amount */
     gnc_xfer_update_to_amount (xferData);
@@ -390,7 +389,7 @@ gnc_xfer_dialog_set_price_auto (XferDialog *xferData,
     if (!currency_active)
     {
         GtkEntry *entry;
-        _gnc_xfer_dialog_set_price_edit(xferData, gnc_numeric_zero());
+        gnc_xfer_dialog_set_price_edit(xferData, gnc_numeric_zero());
         entry = GTK_ENTRY(gnc_amount_edit_gtk_entry
                           (GNC_AMOUNT_EDIT(xferData->price_edit)));
         gtk_entry_set_text(entry, "");
@@ -1411,7 +1410,7 @@ void gnc_xfer_dialog_set_date_sensitive(XferDialog *xferData,
 }
 
 void
-_gnc_xfer_dialog_set_price_edit(XferDialog *xferData, gnc_numeric price_value)
+gnc_xfer_dialog_set_price_edit(XferDialog *xferData, gnc_numeric price_value)
 {
     if (xferData == NULL)
         return;
@@ -1856,7 +1855,7 @@ gnc_xfer_dialog_fetch (GtkButton *button, XferDialog *xferData)
         gnc_numeric price_value = gnc_price_get_value(pr.price);
         if (pr.reverse)
             price_value = gnc_numeric_invert(price_value);
-         _gnc_xfer_dialog_set_price_edit(xferData, price_value);
+         gnc_xfer_dialog_set_price_edit(xferData, price_value);
         gnc_price_unref (pr.price);
     }
 
@@ -2496,7 +2495,7 @@ gboolean gnc_xfer_dialog_run_exchange_dialog(
      */
 
     /* Set the exchange rate */
-    _gnc_xfer_dialog_set_price_edit(xfer, dialog_rate);
+    gnc_xfer_dialog_set_price_edit(xfer, dialog_rate);
 
     /* and run it... */
     if (gnc_xfer_dialog_run_until_done(xfer) == FALSE)
diff --git a/src/gnome-utils/dialog-transfer.h b/src/gnome-utils/dialog-transfer.h
index 7a8d6b3..4b4bc84 100644
--- a/src/gnome-utils/dialog-transfer.h
+++ b/src/gnome-utils/dialog-transfer.h
@@ -141,9 +141,11 @@ void gnc_xfer_dialog_set_date(XferDialog *xferData, time64 set_time);
 /** Set the "sensitive" state of the date field to the given value */
 void gnc_xfer_dialog_set_date_sensitive(XferDialog *xferData, gboolean is_sensitive);
 
-/** Set the exchange rate.  If exchange-rate is 0, then do nothing */
-void gnc_xfer_dialog_set_exchange_rate(XferDialog *xferData,
-                                       gnc_numeric exchange_rate);
+/** Set the dialog's exchange rate edit.  If price_value is 0, then do
+ *  nothing.
+ */
+void gnc_xfer_dialog_set_price_edit(XferDialog *xferData,
+				    gnc_numeric price_value);
 
 /** Indicate whether the dialog should quickfill based on the "To" account,
  * rather than the default which is the "From" account.



Summary of changes:
 src/business/business-gnome/dialog-invoice.c |  2 +-
 src/gnome-utils/dialog-transfer.c            | 11 +++++------
 src/gnome-utils/dialog-transfer.h            |  8 +++++---
 3 files changed, 11 insertions(+), 10 deletions(-)



More information about the gnucash-changes mailing list