Skip to content

Commit

Permalink
Fix some errors in conversion of some function names
Browse files Browse the repository at this point in the history
Some function names did not get converted to a price equivalent and
reorder some statements.
  • Loading branch information
Bob-IT committed Dec 10, 2017
1 parent 16845c3 commit 3c18b80
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 10 deletions.
8 changes: 4 additions & 4 deletions gnucash/import-export/csv-imp/assistant-csv-price-import.cpp
Expand Up @@ -607,9 +607,9 @@ CsvImpPriceAssist::CsvImpPriceAssist ()

/* 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());
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);
g_signal_connect (G_OBJECT(date_format_combo), "changed",
Expand All @@ -622,9 +622,9 @@ CsvImpPriceAssist::CsvImpPriceAssist ()

/* 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());
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 */
gtk_combo_box_set_active (GTK_COMBO_BOX(currency_format_combo), 0);
Expand Down
2 changes: 1 addition & 1 deletion gnucash/import-export/csv-imp/gnc-price-import.cpp
Expand Up @@ -284,9 +284,9 @@ void GncPriceImport::settings (const CsvTransSettings& settings)
/* First apply file format as this may recreate the tokenizer */
file_format (settings.m_file_format);
/* Only then apply the other settings */
m_settings = settings;
from_commodity (m_settings.m_from_commodity);
to_currency (m_settings.m_to_currency);
m_settings = settings;
encoding (m_settings.m_encoding);

if (file_format() == GncImpFileFormat::CSV)
Expand Down
8 changes: 4 additions & 4 deletions gnucash/import-export/csv-imp/gnc-price-import.hpp
Expand Up @@ -46,12 +46,12 @@ extern "C" {
#include <boost/optional.hpp>

/* A set of currency formats that the user sees. */
extern const int num_currency_formats;
extern const gchar* currency_format_user[];
extern const int num_currency_formats_price;
extern const gchar* currency_format_user_price[];

/* A set of date formats that the user sees. */
extern const int num_date_formats;
extern const gchar* date_format_user[];
extern const int num_date_formats_price;
extern const gchar* date_format_user_price[];

/** Tuple to hold
* - a tokenized line of input
Expand Down
1 change: 0 additions & 1 deletion gnucash/import-export/csv-imp/gnc-price-props.hpp
Expand Up @@ -90,7 +90,6 @@ struct GncImportPrice
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 reset (GncPricePropType prop_type);
std::string verify_essentials (void);
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; }
Expand Down

0 comments on commit 3c18b80

Please sign in to comment.