Fix some errors in conversion of some function names

Some function names did not get converted to a price equivalent and
reorder some statements.
This commit is contained in:
Robert Fewell 2017-12-01 11:34:21 +00:00
parent 16845c3a20
commit 3c18b80634
4 changed files with 9 additions and 10 deletions

View File

@ -607,9 +607,9 @@ CsvImpPriceAssist::CsvImpPriceAssist ()
/* Add in the date format combo box and hook it up to an event handler. */ /* Add in the date format combo box and hook it up to an event handler. */
date_format_combo = GTK_COMBO_BOX_TEXT(gtk_combo_box_text_new()); date_format_combo = GTK_COMBO_BOX_TEXT(gtk_combo_box_text_new());
for (int i = 0; i < num_date_formats; i++) for (int i = 0; i < num_date_formats_price; i++)
{ {
gtk_combo_box_text_append_text (date_format_combo, _(date_format_user[i])); gtk_combo_box_text_append_text (date_format_combo, _(date_format_user_price[i]));
} }
gtk_combo_box_set_active (GTK_COMBO_BOX(date_format_combo), 0); gtk_combo_box_set_active (GTK_COMBO_BOX(date_format_combo), 0);
g_signal_connect (G_OBJECT(date_format_combo), "changed", g_signal_connect (G_OBJECT(date_format_combo), "changed",
@ -622,9 +622,9 @@ CsvImpPriceAssist::CsvImpPriceAssist ()
/* Add in the currency format combo box and hook it up to an event handler. */ /* Add in the currency format combo box and hook it up to an event handler. */
currency_format_combo = GTK_COMBO_BOX_TEXT(gtk_combo_box_text_new()); currency_format_combo = GTK_COMBO_BOX_TEXT(gtk_combo_box_text_new());
for (int i = 0; i < num_currency_formats; i++) for (int i = 0; i < num_currency_formats_price; i++)
{ {
gtk_combo_box_text_append_text (currency_format_combo, _(currency_format_user[i])); gtk_combo_box_text_append_text (currency_format_combo, _(currency_format_user_price[i]));
} }
/* Default will the locale */ /* Default will the locale */
gtk_combo_box_set_active (GTK_COMBO_BOX(currency_format_combo), 0); gtk_combo_box_set_active (GTK_COMBO_BOX(currency_format_combo), 0);

View File

@ -284,9 +284,9 @@ void GncPriceImport::settings (const CsvTransSettings& settings)
/* First apply file format as this may recreate the tokenizer */ /* First apply file format as this may recreate the tokenizer */
file_format (settings.m_file_format); file_format (settings.m_file_format);
/* Only then apply the other settings */ /* Only then apply the other settings */
m_settings = settings;
from_commodity (m_settings.m_from_commodity); from_commodity (m_settings.m_from_commodity);
to_currency (m_settings.m_to_currency); to_currency (m_settings.m_to_currency);
m_settings = settings;
encoding (m_settings.m_encoding); encoding (m_settings.m_encoding);
if (file_format() == GncImpFileFormat::CSV) if (file_format() == GncImpFileFormat::CSV)

View File

@ -46,12 +46,12 @@ extern "C" {
#include <boost/optional.hpp> #include <boost/optional.hpp>
/* A set of currency formats that the user sees. */ /* A set of currency formats that the user sees. */
extern const int num_currency_formats; extern const int num_currency_formats_price;
extern const gchar* currency_format_user[]; extern const gchar* currency_format_user_price[];
/* A set of date formats that the user sees. */ /* A set of date formats that the user sees. */
extern const int num_date_formats; extern const int num_date_formats_price;
extern const gchar* date_format_user[]; extern const gchar* date_format_user_price[];
/** Tuple to hold /** Tuple to hold
* - a tokenized line of input * - a tokenized line of input

View File

@ -90,7 +90,6 @@ public:
void set_date_format (int date_format) { m_date_format = date_format ;} void set_date_format (int date_format) { m_date_format = date_format ;}
void set_currency_format (int currency_format) { m_currency_format = currency_format ;} void set_currency_format (int currency_format) { m_currency_format = currency_format ;}
void reset (GncPricePropType prop_type); void reset (GncPricePropType prop_type);
std::string verify_essentials (void);
Result create_price (QofBook* book, GNCPriceDB *pdb, bool over); Result create_price (QofBook* book, GNCPriceDB *pdb, bool over);
gnc_commodity* get_from_commodity () { if (m_from_commodity) return *m_from_commodity; else return nullptr; } gnc_commodity* get_from_commodity () { if (m_from_commodity) return *m_from_commodity; else return nullptr; }