Revision: 3567
http://moneymanagerex.svn.sourceforge.net/moneymanagerex/?rev=3567&view=rev
Author: vomikan
Date: 2013-03-11 14:48:58 +0000 (Mon, 11 Mar 2013)
Log Message:
-----------
UI update
Modified Paths:
--------------
trunk/mmex/src/univcsvdialog.cpp
Modified: trunk/mmex/src/univcsvdialog.cpp
===================================================================
--- trunk/mmex/src/univcsvdialog.cpp 2013-03-11 10:53:19 UTC (rev 3566)
+++ trunk/mmex/src/univcsvdialog.cpp 2013-03-11 14:48:58 UTC (rev 3567)
@@ -5,12 +5,12 @@
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
@@ -71,15 +71,15 @@
}
mmUnivCSVDialog::mmUnivCSVDialog(
- mmCoreDB* core,
- wxWindow* parent,
+ mmCoreDB* core,
+ wxWindow* parent,
bool is_importer,
- wxWindowID id,
- const wxString& caption,
- const wxPoint& pos,
- const wxSize& size,
+ wxWindowID id,
+ const wxString& caption,
+ const wxPoint& pos,
+ const wxSize& size,
long style
-) :
+) :
core_(core),
is_importer_(is_importer),
delimit_(wxT(",")),
@@ -101,10 +101,10 @@
Create(parent, id, caption, pos, size, style);
}
-bool mmUnivCSVDialog::Create(wxWindow* parent, wxWindowID id,
- const wxString& caption,
- const wxPoint& pos,
- const wxSize& size,
+bool mmUnivCSVDialog::Create(wxWindow* parent, wxWindowID id,
+ const wxString& caption,
+ const wxPoint& pos,
+ const wxSize& size,
long style)
{
SetExtraStyle(GetExtraStyle()|wxWS_EX_BLOCK_EVENTS);
@@ -122,7 +122,7 @@
}
void mmUnivCSVDialog::CreateControls()
-{
+{
wxSizerFlags flags, flagsExpand;
flags.Align(wxALIGN_LEFT|wxALIGN_TOP).Border(wxLEFT|wxRIGHT|wxTOP, 5);
flagsExpand.Align(wxALIGN_LEFT|wxALIGN_TOP).Border(wxLEFT|wxRIGHT|wxTOP, 5);
@@ -130,15 +130,17 @@
// Define the staticBox font and set it as wxFONTWEIGHT_BOLD
wxFont staticBoxFontSetting = this->GetFont();
staticBoxFontSetting.SetWeight(wxFONTWEIGHT_BOLD);
-
+
+ wxBoxSizer* itemBoxSizer0 = new wxBoxSizer(wxVERTICAL);
+ this->SetSizer(itemBoxSizer0);
wxBoxSizer* itemBoxSizer1 = new wxBoxSizer(wxHORIZONTAL);
- this->SetSizer(itemBoxSizer1);
+ itemBoxSizer0->Add(itemBoxSizer1, 7, wxGROW|wxALL, 0);
wxBoxSizer* itemBoxSizer2 = new wxBoxSizer(wxVERTICAL);
itemBoxSizer1->Add(itemBoxSizer2, 8, wxGROW|wxALL, 5);
wxBoxSizer* itemBoxSizer11 = new wxBoxSizer(wxVERTICAL);
itemBoxSizer1->Add(itemBoxSizer11, 5, wxGROW|wxALL, 5);
- wxStaticText* itemStaticText3 = new wxStaticText(this, wxID_STATIC,
+ wxStaticText* itemStaticText3 = new wxStaticText(this, wxID_STATIC,
_("Specify the order of fields in the CSV file"));
itemBoxSizer2->Add(itemStaticText3, flags);
itemStaticText3->SetFont(staticBoxFontSetting);
@@ -147,14 +149,14 @@
itemBoxSizer2->Add(itemBoxSizer3, 1, wxGROW|wxALL, 5);
//CSV fields candicate
- csvFieldCandicate_ = new wxListBox(this, ID_LISTBOX_CANDICATE,
+ csvFieldCandicate_ = new wxListBox(this, ID_LISTBOX_CANDICATE,
wxDefaultPosition, wxDefaultSize, 0, NULL, wxLB_SINGLE|wxLB_NEEDED_SB);
itemBoxSizer3->Add(csvFieldCandicate_, 1, wxGROW|wxALL, 1);
for(std::map<int, wxString>::const_iterator it = CSVFieldName_.begin(); it != CSVFieldName_.end(); it ++)
csvFieldCandicate_->Append(it->second, new mmListBoxItem(it->first, it->second));
//Add Remove Area
- wxPanel* itemPanel_AddRemove = new wxPanel(this, ID_PANEL10,
+ wxPanel* itemPanel_AddRemove = new wxPanel(this, ID_PANEL10,
wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL);
itemBoxSizer3->Add(itemPanel_AddRemove, flags);
@@ -168,19 +170,19 @@
//Remove button
m_button_remove_ = new wxButton(itemPanel_AddRemove, wxID_REMOVE);
itemBoxSizer_AddRemove->Add(m_button_remove_, flags);
-
+
//Standard MMEX CSV
wxButton* itemButton_standard = new wxButton(itemPanel_AddRemove, wxID_STANDARD, _("&MMEX format"));
itemBoxSizer_AddRemove->Add(itemButton_standard, flags);
itemButton_standard->SetToolTip(_("MMEX standard format"));
//ListBox of attribute order
- csvListBox_ = new wxListBox(this, ID_LISTBOX,
+ csvListBox_ = new wxListBox(this, ID_LISTBOX,
wxDefaultPosition, wxDefaultSize, 0, NULL, wxLB_SINGLE|wxLB_NEEDED_SB);
itemBoxSizer3->Add(csvListBox_, 1, wxGROW|wxALL, 1);
//Arranger Area
- wxPanel* itemPanel_Arranger = new wxPanel(this, ID_PANEL10,
+ wxPanel* itemPanel_Arranger = new wxPanel(this, ID_PANEL10,
wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL);
itemBoxSizer3->Add(itemPanel_Arranger, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 1);
@@ -196,7 +198,7 @@
wxButton* itemButton_MoveDown = new wxButton(itemPanel_Arranger, wxID_DOWN, _("&Down"));
itemBoxSizer_Arranger->Add(itemButton_MoveDown, flags);
itemButton_MoveDown -> SetToolTip (_("Move &Down"));
-
+
//Load Template button
wxButton* itemButton_Load = new wxButton(itemPanel_Arranger, wxID_OPEN, _("&Open"));
itemBoxSizer_Arranger->Add(itemButton_Load, flags);
@@ -256,7 +258,7 @@
itemBoxSizer8->Add(itemStaticText66, flags);
itemStaticText66->SetFont(staticBoxFontSetting);
//itemStaticText66->Enable(!this->is_importer_);
-
+
wxString default_date_format = core_->dbInfoSettings_->GetStringSetting(wxT("DATEFORMAT"), mmex::DEFDATEFORMAT);
choiceDateFormat_ = new wxChoice(itemPanel7, ID_DIALOG_OPTIONS_DATE_FORMAT);
for(size_t i = 0; i < date_format_mask().Count(); ++i)
@@ -271,9 +273,9 @@
wxString choices[] = { _("Comma"), _("Semicolon"), _("TAB"), _("User Defined")};
int num = sizeof(choices) / sizeof(wxString);
m_radio_box_ = new wxRadioBox(this, wxID_RADIO_BOX, wxT(""), wxDefaultPosition, wxDefaultSize, num, choices, 4, wxRA_SPECIFY_COLS);
-
+
delimit_ = core_->dbInfoSettings_->GetStringSetting(wxT("DELIMITER"), mmex::DEFDELIMTER);
-
+
textDelimiter4 = new wxTextCtrl( this, ID_UD_DELIMIT, delimit_, wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER);
textDelimiter4->SetToolTip(_("Specify the delimiter to use when importing/exporting CSV files"));
textDelimiter4->SetMaxLength(1);
@@ -294,58 +296,59 @@
wxStaticBox* importExportStaticBox = new wxStaticBox(this, wxID_ANY, _("CSV Delimiter"));
importExportStaticBox->SetFont(staticBoxFontSetting);
wxStaticBoxSizer* importExportStaticBoxSizer = new wxStaticBoxSizer(importExportStaticBox, wxHORIZONTAL);
-
+
itemBoxSizer2->Add(importExportStaticBoxSizer, 0, wxALL|wxEXPAND, 5);
-
+
importExportStaticBoxSizer->Add(m_radio_box_, 0, wxALL|wxEXPAND, 3);
importExportStaticBoxSizer->Add(textDelimiter4, 0, wxALIGN_BOTTOM|wxALL, 8);
- // Preview
+ // Preview
wxStaticBoxSizer* m_staticbox = new wxStaticBoxSizer(new wxStaticBox(this, wxID_ANY, _T("&Preview")), wxVERTICAL);
-
- m_list_ctrl_ = new wxListCtrl(this, wxID_ANY, wxDefaultPosition, wxSize(-1, 100), wxLC_REPORT);
+
+ m_list_ctrl_ = new wxListCtrl(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT);
m_staticbox->Add(m_list_ctrl_, 1, wxGROW|wxALL, 5);
- itemBoxSizer2->Add(m_staticbox, 0, wxALL|wxEXPAND, 5);
+ itemBoxSizer0->Add(m_staticbox, 3, wxALL|wxEXPAND, 5);
//Import File button
- wxPanel* itemPanel5 = new wxPanel(this, ID_PANEL10,
+ wxPanel* itemPanel5 = new wxPanel(this, ID_PANEL10,
wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL);
- itemBoxSizer2->Add(itemPanel5, 0, wxALIGN_RIGHT|wxALL, 1);
+ itemBoxSizer0->Add(itemPanel5, 0, wxALIGN_RIGHT|wxALL, 1);
wxBoxSizer* itemBoxSizer6 = new wxBoxSizer(wxHORIZONTAL);
itemPanel5->SetSizer(itemBoxSizer6);
if (this->is_importer_)
{
- wxButton* itemButton_Import = new wxButton(itemPanel5, ID_UNIVCSVBUTTON_IMPORT, _("&Import"),
+ wxButton* itemButton_Import = new wxButton(itemPanel5, ID_UNIVCSVBUTTON_IMPORT, _("&Import"),
wxDefaultPosition, wxDefaultSize, 0);
- itemBoxSizer6->Add(itemButton_Import, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
+ itemBoxSizer6->Add(itemButton_Import, 0, wxALIGN_CENTER|wxALL, 5);
itemButton_Import -> SetToolTip (_("Import File"));
}
else
{
- wxButton* itemButton_Export = new wxButton(itemPanel5, ID_UNIVCSVBUTTON_EXPORT, _("&Export"),
+ wxButton* itemButton_Export = new wxButton(itemPanel5, ID_UNIVCSVBUTTON_EXPORT, _("&Export"),
wxDefaultPosition, wxDefaultSize, 0);
- itemBoxSizer6->Add(itemButton_Export, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
+ itemBoxSizer6->Add(itemButton_Export, 0, wxALIGN_CENTER|wxALL, 5);
itemButton_Export -> SetToolTip (_("Export File"));
}
wxButton* itemCancelButton = new wxButton(itemPanel5, wxID_CANCEL, _("&Cancel"));
- itemBoxSizer6->Add(itemCancelButton, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
+ itemBoxSizer6->Add(itemCancelButton, 0, wxALIGN_CENTER|wxALL, 5);
itemCancelButton->SetFocus();
-
- //Log viewer
+
+ //Log viewer
wxBoxSizer* itemBoxSizer22 = new wxBoxSizer(wxVERTICAL);
-
+
itemBoxSizer11->Add(itemBoxSizer22, 1, wxGROW|wxALL, 0);
-
+
log_field_ = new wxTextCtrl( this, wxID_STATIC, wxT(""), wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxHSCROLL );
itemBoxSizer22->Add(log_field_, 1, wxGROW|wxALL, 5);
-
- wxButton* itemClearButton = new wxButton(this, wxID_CLEAR);
- itemBoxSizer22->Add(itemClearButton, 0, wxALIGN_LEFT|wxALL, 5);
- itemClearButton->Connect(wxID_CLEAR, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(mmUnivCSVDialog::OnButtonClear), NULL, this);
-
+
+ wxButton* itemClearButton = new wxButton(this, wxID_CLEAR, _("Clear"));
+ itemBoxSizer22->Add(itemClearButton, 0, wxALIGN_CENTER|wxALL, 5);
+ itemClearButton->Connect(wxID_CLEAR, wxEVT_COMMAND_BUTTON_CLICKED
+ , wxCommandEventHandler(mmUnivCSVDialog::OnButtonClear), NULL, this);
+
}
bool mmUnivCSVDialog::ShowToolTips()
@@ -374,7 +377,7 @@
csvListBox_->Append(item->getName(), new mmListBoxItem(item->getIndex(), item->getName()));
csvFieldOrder_.push_back(item->getIndex());
- if (item->getIndex() != UNIV_CSV_DONTCARE)
+ if (item->getIndex() != UNIV_CSV_DONTCARE)
{
csvFieldCandicate_->Delete(index);
if (index < (int)csvFieldCandicate_->GetCount())
@@ -442,7 +445,7 @@
void mmUnivCSVDialog::OnLoad(wxCommandEvent& /*event*/)
{
- wxString fileName = wxFileSelector(_("Choose Universal CSV format file to load"),
+ wxString fileName = wxFileSelector(_("Choose Universal CSV format file to load"),
wxEmptyString, wxEmptyString, wxEmptyString, wxT("CSV Template(*.mcv)|*.mcv"), wxFD_FILE_MUST_EXIST);
if (!fileName.empty())
{
@@ -485,7 +488,7 @@
//Saves the field order to a template file
void mmUnivCSVDialog::OnSave(wxCommandEvent& /*event*/)
{
- wxString fileName = wxFileSelector(_("Choose Universal CSV format file to save"),
+ wxString fileName = wxFileSelector(_("Choose Universal CSV format file to save"),
wxEmptyString, wxEmptyString, wxEmptyString, wxT("CSV Template(*.mcv)|*.mcv"), wxFD_SAVE);
if (!fileName.empty())
{
@@ -517,9 +520,9 @@
void mmUnivCSVDialog::OnImport(wxCommandEvent& /*event*/)
{
// date, amount, payee are required
- if (!isIndexPresent(UNIV_CSV_DATE) ||
+ if (!isIndexPresent(UNIV_CSV_DATE) ||
!isIndexPresent(UNIV_CSV_PAYEE) ||
- (!isIndexPresent(UNIV_CSV_AMOUNT) && (!isIndexPresent(UNIV_CSV_WITHDRAWAL) ||
+ (!isIndexPresent(UNIV_CSV_AMOUNT) && (!isIndexPresent(UNIV_CSV_WITHDRAWAL) ||
!isIndexPresent(UNIV_CSV_DEPOSIT))))
{
wxMessageBox(_("Incorrect fields specified for CSV import! Requires at least Date, Amount and Payee."),
@@ -533,11 +536,11 @@
if (fromAccountID_ > 0)
{
-
+
boost::shared_ptr<mmCurrency> pCurrencyPtr = core_->accountList_.getCurrencyWeakPtr(fromAccountID_).lock();
wxASSERT(pCurrencyPtr);
mmex::CurrencyFormatter::instance().loadSettings(*pCurrencyPtr);
-
+
wxString fileName = m_text_ctrl_->GetValue();
wxFileName csv_file(fileName);
if (fileName.IsEmpty() || !csv_file.FileExists())
@@ -559,7 +562,7 @@
wxFileOutputStream outputLog(logFile.GetFullPath());
wxTextOutputStream log(outputLog);
-
+
/* date, payeename, amount(+/-), Number, status, category : subcategory, notes */
long countNumTotal = 0;
long countImported = 0;
@@ -602,17 +605,17 @@
val_ = 0.0;
line = csv2tab_separated_values(line, delimit_);
- wxStringTokenizer tkz(line, wxT("\t"), wxTOKEN_RET_EMPTY_ALL);
+ wxStringTokenizer tkz(line, wxT("\t"), wxTOKEN_RET_EMPTY_ALL);
int numTokens = (int)tkz.CountTokens();
if (numTokens < (int)csvFieldOrder_.size())
{
- log << _("Line : ") << wxString::Format(wxT("%ld"), countNumTotal)
+ log << _("Line : ") << wxString::Format(wxT("%ld"), countNumTotal)
<< _(" file contains insufficient number of tokens") << endl;
- *log_field_ << _("Line : ") << wxString::Format(wxT("%ld"), countNumTotal)
+ *log_field_ << _("Line : ") << wxString::Format(wxT("%ld"), countNumTotal)
<< _(" file contains insufficient number of tokens") << wxT("\n");
continue;
}
-
+
std::vector<wxString> tokens;
while (tkz.HasMoreTokens())
{
@@ -622,7 +625,7 @@
for (size_t i = 0; i < csvFieldOrder_.size(); ++i)
{
- if (tokens.size() >= i)
+ if (tokens.size() >= i)
{
parseToken(csvFieldOrder_[i], tokens[i]);
}
@@ -633,7 +636,7 @@
{
log << _("Line : ") << wxString::Format(wxT("%ld"), countNumTotal)
<< _(" One of the following fields: Date, Payee, Amount, Type is missing, skipping") << endl;
- *log_field_ << _("Line : ") << wxString::Format(wxT("%ld"), countNumTotal)
+ *log_field_ << _("Line : ") << wxString::Format(wxT("%ld"), countNumTotal)
<< _(" One of the following fields: Date, Payee, Amount, Type is missing, skipping") << wxT("\n");
continue;
}
@@ -665,11 +668,11 @@
// if (pCategory->parent_.lock())
// {
// categID_ = pCategory->parent_.lock()->categID_;
- // subCategID_ = pCategory->categID_;
+ // subCategID_ = pCategory->categID_;
// }
// else
// {
- // categID_ = pCategory->categID_;
+ // categID_ = pCategory->categID_;
// subCategID_ = -1;
// }
//}
@@ -701,12 +704,12 @@
*log_field_ << _("Line : ") << wxString::Format(wxT("%ld"), countNumTotal) << _(" imported OK.") << wxT("\n");
}
- progressDlg->Destroy();
+ progressDlg->Destroy();
//FIXME: %ld
- wxString msg = wxString::Format(_("Total Lines : %d"), countNumTotal);
+ wxString msg = wxString::Format(_("Total Lines : %d"), countNumTotal);
msg << wxT ("\n");
- msg << wxString::Format(_("Total Imported : %d"), countImported);
+ msg << wxString::Format(_("Total Imported : %d"), countImported);
msg << wxT ("\n\n");
msg << wxString::Format(_("Log file written to : %s"), logFile.GetFullPath().c_str());
msg << wxT ("\n\n");
@@ -717,16 +720,16 @@
if (countImported > 0)
msg << _ ("Imported transactions have been flagged so you can review them.");
-
+
// Since all database transactions are only in memory,
if (!canceledbyuser)
{
- // we need to save them to the database.
+ // we need to save them to the database.
db_->Commit();
importSuccessful_ = true;
msg << _("Transactions saved to database in account: ") << acctName;
}
- else
+ else
{
// we need to remove the transactions from the transaction list
while (countImported > 0)
@@ -766,7 +769,7 @@
wxString fileName = wxFileSelector(_("Choose CSV data file to Export"),
wxEmptyString, wxEmptyString, wxEmptyString, chooseExt, wxFD_SAVE | wxFD_OVERWRITE_PROMPT);
if (fileName.empty()) return;
-
+
correctEmptyFileExt(wxT("csv"),fileName);
wxFileOutputStream output(fileName);
@@ -822,7 +825,7 @@
wxString amount_tmp;
mmex::formatDoubleToCurrencyEdit(-value, amount_tmp);
-
+
buffer = wxT("");
for (std::vector<int>::const_iterator sit = csvFieldOrder_.begin(); sit != csvFieldOrder_.end(); ++ sit)
{
@@ -863,7 +866,7 @@
default:
break;
}
-
+
buffer << delimit;
}
@@ -898,9 +901,9 @@
else if (item_name == _("Date")) {
date_position = index;
}
-
+
}
-
+
//TODO re use code in OnImport & OnExport
if (this->is_importer_)
{
@@ -938,7 +941,7 @@
if (col >= m_list_ctrl_->GetColumnCount())
break;
- else
+ else
{
m_list_ctrl_->SetItem(itemIndex, col, token);
}
@@ -974,12 +977,12 @@
int fAccountID = pBankTransaction->accountID_;
int tAccountID = pBankTransaction->toAccountID_;
const wxString amtSeparator = core_->accountList_.getAccountCurrencyDecimalChar(fromAccountID);
-
+
double value = pBankTransaction->amt_;
double tovalue = 0;
wxString toamount = wxT("");
double value_temp = value;
-
+
if (type == wxT("Transfer"))
{
const wxString fromAccount = core_->accountList_.GetAccountName(fAccountID);
@@ -1000,11 +1003,11 @@
}
else if (type == wxT("Withdrawal"))
value = -value;
-
+
wxString amount = adjustedExportAmount(amtSeparator, wxString()<<value);
mmex::formatCurrencyToDouble(amount, value);
mmex::formatDoubleToCurrencyEdit(value, amount);
-
+
wxString amount_tmp;
mmex::formatDoubleToCurrencyEdit(-value, amount_tmp);
@@ -1057,12 +1060,12 @@
}
if (col >= m_list_ctrl_->GetColumnCount())
break;
- else
+ else
{
if (col == date_position) text = mmParseDisplayStringToDate(text, date_format).Format(date_format);
m_list_ctrl_->SetItem(itemIndex, col, text);
}
-
+
}
if (++ count >= 10) break;
++ row;
@@ -1101,7 +1104,7 @@
wxString item_name = item->getName();
csvListBox_->Delete(index);
- csvListBox_->Insert(item_name, index + 1, new mmListBoxItem(item_index, item_name));
+ csvListBox_->Insert(item_name, index + 1, new mmListBoxItem(item_index, item_name));
csvListBox_->SetSelection(index + 1, true);
std::swap(csvFieldOrder_[index + 1], csvFieldOrder_[index]);
@@ -1112,7 +1115,7 @@
void mmUnivCSVDialog::OnStandard(wxCommandEvent& /*event*/)
{
- csvListBox_->Clear();
+ csvListBox_->Clear();
csvFieldOrder_.clear();
int standard[] = {UNIV_CSV_DATE, UNIV_CSV_PAYEE, UNIV_CSV_AMOUNT, UNIV_CSV_CATEGORY, UNIV_CSV_SUBCATEGORY, UNIV_CSV_TRANSNUM, UNIV_CSV_NOTES, UNIV_CSV_TOAMOUNT};
for (size_t i = 0; i < sizeof(standard)/sizeof(UNIV_CSV_DATE); ++ i)
@@ -1127,7 +1130,7 @@
{
csvFieldCandicate_->Append(CSVFieldName_[rest[i]], new mmListBoxItem(rest[i], CSVFieldName_[rest[i]]));
}
-
+
update_preview();
}
@@ -1135,13 +1138,13 @@
{
wxString fileName = m_text_ctrl_->GetValue();
- fileName = wxFileSelector(_("Choose CSV data file to import"),
+ fileName = wxFileSelector(_("Choose CSV data file to import"),
wxEmptyString, fileName, wxEmptyString, wxT("*.csv"), wxFD_FILE_MUST_EXIST);
if (!fileName.IsEmpty())
{
m_text_ctrl_->SetValue(fileName);
-
+
wxTextFile tFile(fileName);
if (!tFile.Open())
{
@@ -1209,7 +1212,7 @@
}
textDelimiter4->SetEvtHandlerEnabled(false);
- textDelimiter4->SetValue(delimit_);
+ textDelimiter4->SetValue(delimit_);
textDelimiter4->SetEvtHandlerEnabled(true);
event.Skip();
@@ -1218,7 +1221,7 @@
void mmUnivCSVDialog::parseToken(int index, wxString& token)
{
- if (token.Trim().IsEmpty()) return;
+ if (token.Trim().IsEmpty()) return;
wxString date_format = DisplayDate2FormatDate(choiceDateFormat_->GetStringSelection());
switch (index)
@@ -1262,7 +1265,7 @@
case UNIV_CSV_SUBCATEGORY:
if (categID_ == -1)
return;
-
+
subCategID_ = core_->categoryList_.GetSubCategoryID(categID_, token);
if (subCategID_ == -1)
subCategID_ = core_->categoryList_.AddSubCategory(categID_, token);
@@ -1279,7 +1282,7 @@
case UNIV_CSV_DONTCARE:
// do nothing
break;
-
+
case UNIV_CSV_DEPOSIT:
if (!token.ToDouble(&val_)) return;
if (val_ <= 0.0) return;
@@ -1310,7 +1313,7 @@
void mmUnivCSVDialog::OnFileNameChanged(wxCommandEvent& event)
{
wxString file_name = m_text_ctrl_->GetValue();
- if (file_name.Contains(wxT("\n")) || file_name.Contains(wxT("file://")))
+ if (file_name.Contains(wxT("\n")) || file_name.Contains(wxT("file://")))
{
file_name.Replace(wxT("\n"), wxT(""));
@@ -1319,11 +1322,11 @@
file_name.Trim();
#endif
m_text_ctrl_->SetEvtHandlerEnabled(false);
- m_text_ctrl_->SetValue(file_name);
+ m_text_ctrl_->SetValue(file_name);
m_text_ctrl_->SetEvtHandlerEnabled(true);
}
event.Skip();
-
+
wxFileName csv_file(file_name);
if (csv_file.FileExists())
this->update_preview();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|