Skip to content

Commit

Permalink
report bug to github feature done
Browse files Browse the repository at this point in the history
related issues: #382 #509 #511
  • Loading branch information
lixun910 committed Nov 9, 2016
1 parent 950ef7c commit dc5daa6
Show file tree
Hide file tree
Showing 18 changed files with 167 additions and 161 deletions.
12 changes: 6 additions & 6 deletions DataViewer/DataViewerEditFieldPropertiesDlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,7 @@ void DataViewerEditFieldPropertiesDlg::OnCellChanging( wxGridEvent& ev )

if (col_type == GdaConst::string_type) {
if (new_val < min_v || max_v < new_val) {
wxString msg = wxString::Format(_("The length of a string field must be at least %s and at most %s. Keeping original value."), min_v, max_v);
wxString msg = wxString::Format(_("The length of a string field must be at least %d and at most %d. Keeping original value."), min_v, max_v);
wxMessageDialog dlg(this, msg, _("Error"), wxOK|wxICON_ERROR);
dlg.ShowModal();
ev.Veto();
Expand All @@ -590,7 +590,7 @@ void DataViewerEditFieldPropertiesDlg::OnCellChanging( wxGridEvent& ev )

} else if (col_type == GdaConst::long64_type) {
if (new_val < min_v || max_v < new_val) {
wxString msg = wxString::Format(_("The length of an integral numeric field must be at least %s and at most %s. Keeping original value."), min_v, max_v);
wxString msg = wxString::Format(_("The length of an integral numeric field must be at least %d and at most %d. Keeping original value."), min_v, max_v);
wxMessageDialog dlg(this, msg, _("Error"), wxOK|wxICON_ERROR);
dlg.ShowModal();
ev.Veto();
Expand All @@ -602,7 +602,7 @@ void DataViewerEditFieldPropertiesDlg::OnCellChanging( wxGridEvent& ev )
} else {
// table_int->GetColType(cid) == GdaConst::double_type
if (new_val < min_v || max_v < new_val) {
wxString msg = wxString::Format(_("The length of an non-integral numeric field must be at least %s and at most %s. Keeping original value."), min_v, max_v);
wxString msg = wxString::Format(_("The length of an non-integral numeric field must be at least %d and at most %d. Keeping original value."), min_v, max_v);
wxMessageDialog dlg(this, msg, _("Error"), wxOK|wxICON_ERROR);
dlg.ShowModal();
ev.Veto();
Expand All @@ -628,7 +628,7 @@ void DataViewerEditFieldPropertiesDlg::OnCellChanging( wxGridEvent& ev )
min_v = GdaConst::min_dbf_double_decimals;
max_v = GdaConst::max_dbf_double_decimals;
if (new_val < min_v || max_v < new_val) {
wxString msg = wxString::Format(_("The number of decimal places for a non-integral numeric field must be at least %s and at most %s. Keeping original value."), min_v, max_v);
wxString msg = wxString::Format(_("The number of decimal places for a non-integral numeric field must be at least %d and at most %d. Keeping original value."), min_v, max_v);
wxMessageDialog dlg(this, msg, _("Error"), wxOK|wxICON_ERROR);
dlg.ShowModal();
ev.Veto();
Expand All @@ -654,7 +654,7 @@ void DataViewerEditFieldPropertiesDlg::OnCellChanging( wxGridEvent& ev )
min_v = 0;
max_v = GdaConst::max_dbf_double_decimals;
if (new_val < min_v || max_v < new_val) {
wxString msg = wxString::Format(_("The number of displayed decimal places for a non-integral numeric field must be at least %s and at most %s. Keeping original value."), min_v, max_v);
wxString msg = wxString::Format(_("The number of displayed decimal places for a non-integral numeric field must be at least %d and at most %d. Keeping original value."), min_v, max_v);
wxMessageDialog dlg(this, msg, _("Error"), wxOK|wxICON_ERROR);
dlg.ShowModal();
ev.Veto();
Expand Down Expand Up @@ -709,7 +709,7 @@ void DataViewerEditFieldPropertiesDlg::OnGridComboBox(wxCommandEvent& ev )
ev.Skip();

wxLogMessage("In DataViewerEditFieldPropertiesDlg::OnGridComboBox");
wxLogMessage(wxString::Format("%s", sel));
wxLogMessage(wxString::Format("%d", sel));
}

void DataViewerEditFieldPropertiesDlg::OnCellEditorCreated( wxGridEditorCreatedEvent& ev )
Expand Down
2 changes: 1 addition & 1 deletion DataViewer/MergeTableDlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ void MergeTableDlg::CheckKeys(wxString key_name, vector<wxString>& key_vec,
}

if (key_vec.size() != key_map.size()) {
wxString msg = wxString::Format(_("Chosen table merge key field contains undefined or duplicate values. Key fields must contain valid unique values.\n\nDuplicated values are: \n"), key_name);
wxString msg = wxString::Format(_("Chosen table merge key field %s contains undefined or duplicate values. Key fields must contain valid unique values.\n\nDuplicated values are: \n"), key_name);
int count = 0;
for (it=dupKeys.begin(); it!=dupKeys.end();it++) {
msg << it->first << "\n";
Expand Down
4 changes: 2 additions & 2 deletions DialogTools/AdjustYAxisDlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ AdjustYAxisDlg::AdjustYAxisDlg(double min_val_s,
: o_min_val(min_val_s), o_max_val(max_val_s)
{

wxLogMessage(wxString::Format("AdjustYAxisDlg with new min_val %s and max_val %s", min_val_s, max_val_s));
wxLogMessage(wxString::Format("AdjustYAxisDlg with new min_val %f and max_val %f", min_val_s, max_val_s));

s_min_val << min_val_s;
s_max_val << max_val_s;
Expand Down Expand Up @@ -131,7 +131,7 @@ AxisLabelPrecisionDlg::AxisLabelPrecisionDlg(int precision_s,
const wxSize& size,
long style)
{
wxLogMessage(wxString::Format("AxisLabelPrecisionDlg with precision = %s.", precision_s));
wxLogMessage(wxString::Format("AxisLabelPrecisionDlg with precision = %d.", precision_s));

precision = precision_s;

Expand Down
6 changes: 4 additions & 2 deletions DialogTools/AutoUpdateDlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ AutoUpdateDlg::AutoUpdateDlg(wxWindow* parent,
wxString url_update_description = AutoUpdate::GetUpdateUrl(checklist);

wxString update_text;
update_text << "A newer version of GeoDa is found. Do you want to update to version ";
update_text << _("A newer version of GeoDa is found. Do you want to update to version ");
update_text << version;
update_text << "?";

Expand Down Expand Up @@ -349,7 +349,7 @@ void AutoUpdateDlg::OnOkClick( wxCommandEvent& event )

int n = (int)lines.size();
int jobs = (n-2) / 3 + 1; // skip first and second lines
wxProgressDialog progressDlg("", "Downloading updates...",
wxProgressDialog progressDlg("", _("Downloading updates..."),
jobs, this, wxPD_APP_MODAL | wxPD_AUTO_HIDE);
progressDlg.Update(1);
if (n > 2 && (n-2) % 3 == 0) {
Expand Down Expand Up @@ -424,11 +424,13 @@ void AutoUpdateDlg::OnOkClick( wxCommandEvent& event )

void AutoUpdateDlg::OnCancelClick( wxCommandEvent& event )
{
wxLogMessage("Cancel AutoUpdateDlg");
EndDialog(wxID_CANCEL);
}

void AutoUpdateDlg::OnSkipClick( wxCommandEvent& event )
{
wxLogMessage("Skip AutoUpdateDlg");
EndDialog(wxID_NO);
}
wxString AutoUpdateDlg::GetVersion()
Expand Down
2 changes: 1 addition & 1 deletion DialogTools/AutoUpdateDlg.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class AutoUpdateDlg: public wxDialog
public:
AutoUpdateDlg(wxWindow* parent, bool showSkip = false,
wxWindowID id = wxID_ANY,
const wxString& title = "GeoDa Update Dialog",
const wxString& title = _("GeoDa Update Dialog"),
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxSize(580,220));

Expand Down
7 changes: 4 additions & 3 deletions DialogTools/CatClassifDlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -922,8 +922,6 @@ void CatClassifPanel::OnBreaksChoice(wxCommandEvent& event)
CatClassification::BreakValsType bv_type = GetBreakValsTypeChoice();
cc_data.break_vals_type = bv_type;

wxLogMessage(wxString::Format(_("choice: %s"), bv_type));

// Verify that cc data is self-consistent and correct if not. This
// will result in all breaks, colors and names being initialized.
CatClassification::CorrectCatClassifFromTable(cc_data, table_int);
Expand Down Expand Up @@ -979,7 +977,7 @@ void CatClassifPanel::OnNumCatsChoice(wxCommandEvent& event)
brk_slider->Enable(true);
}

wxLogMessage(wxString::Format("choice: %s", new_num_cats));
wxLogMessage(wxString::Format("choice: %d", new_num_cats));

CatClassification::BreakValsType new_cat_typ = GetBreakValsTypeChoice();
if (new_cat_typ == CatClassification::hinge_15_break_vals ||
Expand Down Expand Up @@ -1026,6 +1024,9 @@ void CatClassifPanel::OnAssocVarChoice(wxCommandEvent& ev)
wxLogMessage("CatClassifPanel::OnAssocVarChoice");

wxString cur_fc_str = assoc_var_choice->GetStringSelection();

wxLogMessage(cur_fc_str);

bool is_tm_var = table_int->IsColTimeVariant(cur_fc_str);
assoc_var_tm_choice->Enable(is_tm_var);
if (is_tm_var && assoc_var_tm_choice->GetSelection() == wxNOT_FOUND) {
Expand Down
4 changes: 2 additions & 2 deletions DialogTools/CreatingWeightDlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ void CreatingWeightDlg::CreateWeights()
return;
}
if (m_threshold_val*m_thres_delta_factor < m_thres_min) {
wxString msg = wxString::Format(_("The currently entered threshold value of %s is less than %s which is the minimum value for which there will be no neighborless observations (isolates). \n\nPress Yes to proceed anyhow, press No to abort."), m_threshold_val, m_thres_min);
wxString msg = wxString::Format(_("The currently entered threshold value of %f is less than %f which is the minimum value for which there will be no neighborless observations (isolates). \n\nPress Yes to proceed anyhow, press No to abort."), m_threshold_val, m_thres_min);
wxMessageDialog dlg(this, msg, _("Warning"),
wxYES_NO | wxNO_DEFAULT | wxICON_QUESTION );
if (dlg.ShowModal() != wxID_YES)
Expand Down Expand Up @@ -347,7 +347,7 @@ void CreatingWeightDlg::CreateWeights()
done = true;

} else {
wxString s = wxString::Format(_("Error: Maximum number of neighbors %s exceeded."), m_num_obs-1);
wxString s = wxString::Format(_("Error: Maximum number of neighbors %d exceeded."), m_num_obs-1);
wxMessageBox(s);
}
}
Expand Down
6 changes: 3 additions & 3 deletions DialogTools/FieldNewCalcSpecialDlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ void FieldNewCalcSpecialDlg::Apply()
} else if (col_type == GdaConst::string_type) {
std::vector<wxString> data(n_rows, wxEmptyString);
for (int i=0; i<n_rows; i++) {
data[i] = wxString::Format(wxT("%f"), X());
data[i] = wxString::Format("%f", X());
}
table_int->SetColData(result_col, time_list[t], data);

Expand All @@ -194,7 +194,7 @@ void FieldNewCalcSpecialDlg::Apply()
table_int->SetColData(result_col, time_list[t], data);
} else if (col_type == GdaConst::string_type) {
std::vector<wxString> data(n_rows, wxEmptyString);
for (int i=0; i<n_rows; i++) data[i] = wxString::Format(wxT("%f"), X());
for (int i=0; i<n_rows; i++) data[i] = wxString::Format("%f", X());
table_int->SetColData(result_col, time_list[t], data);
}
table_int->SetColUndefined(result_col, time_list[t], undefined);
Expand All @@ -212,7 +212,7 @@ void FieldNewCalcSpecialDlg::Apply()
table_int->SetColData(result_col, time_list[t], data);
} else if (col_type == GdaConst::string_type) {
std::vector<wxString> data(n_rows, wxEmptyString);
for (int i=0; i<n_rows; i++) data[i] = wxString::Format(wxT("%d"), i+1);
for (int i=0; i<n_rows; i++) data[i] = wxString::Format("%d", i+1);
table_int->SetColData(result_col, time_list[t], data);
}
table_int->SetColUndefined(result_col, time_list[t], undefined);
Expand Down
2 changes: 1 addition & 1 deletion DialogTools/LocaleSetupDlg.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class LocaleSetupDlg: public wxDialog
LocaleSetupDlg(wxWindow* parent,
bool need_reopen = true,
wxWindowID id = wxID_ANY,
const wxString& title = "Setup Locale of GeoDa Table",
const wxString& title = _("Setup Locale of GeoDa Table"),
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize );

Expand Down
7 changes: 0 additions & 7 deletions DialogTools/PCPDlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ void PCPDlg::OnIncAllClick( wxCommandEvent& ev)

void PCPDlg::OnIncOneClick( wxCommandEvent& ev)
{
wxLogMessage("Click PCPDlg::OnIncOneClick");
if (m_exclude_list->GetSelection() >= 0) {
wxString k = m_exclude_list->GetString(m_exclude_list->GetSelection());
m_include_list->Append(k);
Expand All @@ -112,13 +111,11 @@ void PCPDlg::OnIncOneClick( wxCommandEvent& ev)

void PCPDlg::OnIncListDClick( wxCommandEvent& ev)
{
wxLogMessage("Click PCPDlg::OnIncListDClick");
OnExclOneClick(ev);
}

void PCPDlg::OnExclAllClick( wxCommandEvent& ev)
{
wxLogMessage("Click PCPDlg::OnExclAllClick");
for (int i=0, iend=m_include_list->GetCount(); i<iend; i++) {
m_exclude_list->Append(m_include_list->GetString(i));
}
Expand All @@ -128,7 +125,6 @@ void PCPDlg::OnExclAllClick( wxCommandEvent& ev)

void PCPDlg::OnExclOneClick( wxCommandEvent& ev)
{
wxLogMessage("Click PCPDlg::OnExclOneClick");
if (m_include_list->GetSelection() >= 0) {
m_exclude_list->
Append(m_include_list->GetString(m_include_list->GetSelection()));
Expand All @@ -139,7 +135,6 @@ void PCPDlg::OnExclOneClick( wxCommandEvent& ev)

void PCPDlg::OnExclListDClick( wxCommandEvent& ev)
{
wxLogMessage("Click PCPDlg::OnExclListDClick");
OnIncOneClick(ev);
}

Expand Down Expand Up @@ -189,7 +184,5 @@ void PCPDlg::OnCancelClick( wxCommandEvent& event )

void PCPDlg::UpdateOkButton()
{
wxLogMessage("Click PCPDlg::UpdateOkButton");

FindWindow(XRCID("wxID_OK"))->Enable(m_include_list->GetCount() >= 2);
}
14 changes: 0 additions & 14 deletions DialogTools/RegressionDlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -841,8 +841,6 @@ void RegressionDlg::OnSaveToTxtFileClick( wxCommandEvent& event )

void RegressionDlg::OnCListVarinDoubleClicked( wxCommandEvent& event )
{
wxLogMessage("Click RegressionDlg::OnCListVarinDoubleClicked");

if (lastSelection == 1) {
OnCButton1Click(event);
} else {
Expand All @@ -852,15 +850,11 @@ void RegressionDlg::OnCListVarinDoubleClicked( wxCommandEvent& event )

void RegressionDlg::OnCListVaroutDoubleClicked( wxCommandEvent& event )
{
wxLogMessage("Click RegressionDlg::OnCListVaroutDoubleClicked");

OnCButton3Click(event);
}

void RegressionDlg::OnCButton1Click( wxCommandEvent& event )
{
wxLogMessage("Click RegressionDlg::OnCButton1Click");

if (m_varlist->GetCount() > 0) {
if (m_varlist->GetSelection() >= 0) {
wxString temp = m_dependent->GetValue();
Expand All @@ -880,8 +874,6 @@ void RegressionDlg::OnCButton1Click( wxCommandEvent& event )

void RegressionDlg::OnCButton2Click( wxCommandEvent& event )
{
wxLogMessage("Click RegressionDlg::OnCButton2Click");

if (m_varlist->GetCount() > 0) {
if (m_varlist->GetSelection() >= 0) {
int cur_sel = m_varlist->GetSelection();
Expand Down Expand Up @@ -924,8 +916,6 @@ void RegressionDlg::OnCResetClick( wxCommandEvent& event )

void RegressionDlg::OnCButton3Click( wxCommandEvent& event )
{
wxLogMessage("Click RegressionDlg::OnCButton3Click");

if (m_independentlist->GetCount() > 0) {
if(m_independentlist->GetSelection() >= 0) {
int cur_sel = m_independentlist->GetSelection();
Expand All @@ -946,8 +936,6 @@ void RegressionDlg::OnCButton3Click( wxCommandEvent& event )

void RegressionDlg::OnCButton4Click( wxCommandEvent& event )
{
wxLogMessage("Click RegressionDlg::OnCButton4Click");

for (unsigned int i=0; i<m_varlist->GetCount(); i++) {
m_independentlist->Append(m_varlist->GetString(i));
}
Expand All @@ -961,8 +949,6 @@ void RegressionDlg::OnCButton4Click( wxCommandEvent& event )

void RegressionDlg::OnCButton5Click( wxCommandEvent& event )
{
wxLogMessage("Click RegressionDlg::OnCButton5Click");

for (unsigned int i=0; i<m_independentlist->GetCount(); i++) {
m_varlist->Append(m_independentlist->GetString(i));
}
Expand Down
Loading

0 comments on commit dc5daa6

Please sign in to comment.