Skip to content

Commit

Permalink
Smaller cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerhard Stein committed Aug 24, 2024
1 parent 94dc12e commit 1ec5586
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion src/billsdepositspanel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,7 @@ const wxString mmBillsDepositsPanel::GetFrequency(const Model_Billsdeposits::Dat
return text;
}

const int mmBillsDepositsPanel::GetNumRepeats(const Model_Billsdeposits::Data* item) const
int mmBillsDepositsPanel::GetNumRepeats(const Model_Billsdeposits::Data* item) const
{
int repeats = item->REPEATS % BD_REPEATS_MULTIPLEX_BASE; // DeMultiplex the Auto Executable fields.
int numRepeats = item->NUMOCCURRENCES;
Expand Down
2 changes: 1 addition & 1 deletion src/billsdepositspanel.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ class mmBillsDepositsPanel : public mmPanelBase
int col_sort();

const wxString GetFrequency(const Model_Billsdeposits::Data* item) const;
const int GetNumRepeats(const Model_Billsdeposits::Data* item) const;
int GetNumRepeats(const Model_Billsdeposits::Data* item) const;
const wxString GetRemainingDays(const Model_Billsdeposits::Data* item) const;

wxString BuildPage() const;
Expand Down
10 changes: 5 additions & 5 deletions src/mmSimpleDialogs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1197,7 +1197,7 @@ mmTagTextCtrl::mmTagTextCtrl(wxWindow* parent, wxWindowID id,
Bind(wxEVT_PAINT, &mmTagTextCtrl::OnPaint, this);
textCtrl_->Bind(wxEVT_KILL_FOCUS, &mmTagTextCtrl::OnKillFocus, this);
textCtrl_->Bind(wxEVT_CHAR_HOOK, &mmTagTextCtrl::OnKeyPressed, this);
textCtrl_->Bind(wxEVT_STC_ZOOM, [this](wxStyledTextEvent& event) {
textCtrl_->Bind(wxEVT_STC_ZOOM, [this](wxStyledTextEvent& ) {
// Disable zoom
textCtrl_->SetEvtHandlerEnabled(false);
textCtrl_->SetZoom(0);
Expand Down Expand Up @@ -1226,15 +1226,15 @@ mmTagTextCtrl::mmTagTextCtrl(wxWindow* parent, wxWindowID id,
createDropButton(btnSize);

btn_dropdown_->Bind(wxEVT_BUTTON, &mmTagTextCtrl::OnDropDown, this);
btn_dropdown_->Bind(wxEVT_NAVIGATION_KEY, [this](wxNavigationKeyEvent& event) { textCtrl_->SetFocus(); });
btn_dropdown_->Bind(wxEVT_NAVIGATION_KEY, [this](wxNavigationKeyEvent& ) { textCtrl_->SetFocus(); });

#ifndef __WXMAC__
// Event handlers for custom control painting in Windows & Linux
Bind(wxEVT_ENTER_WINDOW, &mmTagTextCtrl::OnMouseCaptureChange, this);
Bind(wxEVT_LEAVE_WINDOW, &mmTagTextCtrl::OnMouseCaptureChange, this);
textCtrl_->Bind(wxEVT_ENTER_WINDOW, &mmTagTextCtrl::OnMouseCaptureChange, this);
textCtrl_->Bind(wxEVT_LEAVE_WINDOW, &mmTagTextCtrl::OnMouseCaptureChange, this);
textCtrl_->Bind(wxEVT_SIZE, [this](wxSizeEvent& event) {textCtrl_->Refresh(); });
textCtrl_->Bind(wxEVT_SIZE, [this](wxSizeEvent& ) {textCtrl_->Refresh(); });
btn_dropdown_->Bind(wxEVT_LEAVE_WINDOW, &mmTagTextCtrl::OnMouseCaptureChange, this);
btn_dropdown_->Bind(wxEVT_SET_FOCUS, &mmTagTextCtrl::OnFocusChange, this);
btn_dropdown_->Bind(wxEVT_ENTER_WINDOW, &mmTagTextCtrl::OnMouseCaptureChange, this);
Expand Down Expand Up @@ -1416,7 +1416,7 @@ void mmTagTextCtrl::OnFocusChange(wxFocusEvent& event)
event.Skip();
}

void mmTagTextCtrl::OnDropDown(wxCommandEvent& event)
void mmTagTextCtrl::OnDropDown(wxCommandEvent& )
{
#ifndef __WXMAC__
if (!popupWindow_->dismissedByButton_)
Expand Down Expand Up @@ -1703,7 +1703,7 @@ void mmTagTextCtrl::OnPaint(wxPaintEvent& event)
event.Skip();
}

void mmTagTextCtrl::OnPaintButton(wxPaintEvent& event)
void mmTagTextCtrl::OnPaintButton(wxPaintEvent& )
{
wxPaintDC dc(btn_dropdown_);

Expand Down
4 changes: 2 additions & 2 deletions src/mmSimpleDialogs.h
Original file line number Diff line number Diff line change
Expand Up @@ -439,8 +439,8 @@ class mmTagTextCtrl : public wxPanel
void OnPaste(wxStyledTextEvent& event);
void OnKillFocus(wxFocusEvent& event);
void OnPaint(wxPaintEvent& event);
void OnPaintButton(wxPaintEvent& event);
void OnDropDown(wxCommandEvent& event);
void OnPaintButton(wxPaintEvent&);
void OnDropDown(wxCommandEvent&);
void OnKeyPressed(wxKeyEvent& event);
void OnPopupCheckboxSelected(wxCommandEvent& event);
void OnMouseCaptureChange(wxMouseEvent& event);
Expand Down
2 changes: 1 addition & 1 deletion src/mmTextCtrl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ EVT_TEXT_ENTER(wxID_ANY, mmTextCtrl::OnTextEntered)
EVT_KILL_FOCUS(mmTextCtrl::OnKillFocus)
wxEND_EVENT_TABLE()

void mmTextCtrl::OnTextEntered(wxCommandEvent& event)
void mmTextCtrl::OnTextEntered(wxCommandEvent& )
{
Calculate( (m_alt_precision != -1) ? m_alt_precision
: Model_Currency::precision(m_currency));
Expand Down
2 changes: 1 addition & 1 deletion src/mmTextCtrl.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class mmTextCtrl : public wxTextCtrl
private:
int m_alt_precision = -1;
bool ignore_focus_;
void OnTextEntered(wxCommandEvent& event);
void OnTextEntered(wxCommandEvent&);
void OnKillFocus(wxFocusEvent& event);
const Model_Currency::Data* m_currency = nullptr;
wxDECLARE_EVENT_TABLE();
Expand Down
10 changes: 5 additions & 5 deletions src/payeedialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ void mmEditPayeeDialog::OnMoveUp(wxCommandEvent& /*event*/)
//wxGrid row and cell selections do not overlap, so need to get both and combine them
wxArrayInt selectedRows = m_patternTable->GetSelectedRows();
wxGridCellCoordsArray selectedCells = m_patternTable->GetSelectedCells();
for (int i = 0; i < selectedCells.GetCount(); i++) {
for (int i = 0; i < static_cast<int>(selectedCells.GetCount()); i++) {
int row = selectedCells[i].GetRow();
if(selectedRows.Index(row) == wxNOT_FOUND)
selectedRows.Add(row);
Expand All @@ -272,7 +272,7 @@ void mmEditPayeeDialog::OnMoveUp(wxCommandEvent& /*event*/)
}

//Loop over all rows
for (int i = 0; i < selectedRows.GetCount(); i++) {
for (int i = 0; i < static_cast<int>(selectedRows.GetCount()); i++) {
// reselect the row (cleared by cursor move)
m_patternTable->SelectRow(selectedRows[i], true);
// we only want to move the cell up if the row above is not selected (so that selected blocks stay in order)
Expand Down Expand Up @@ -308,7 +308,7 @@ void mmEditPayeeDialog::OnMoveDown(wxCommandEvent& /*event*/)
//wxGrid row and cell selections do not overlap, so need to get both and combine them
wxArrayInt selectedRows = m_patternTable->GetSelectedRows();
wxGridCellCoordsArray selectedCells = m_patternTable->GetSelectedCells();
for (int i = 0; i < selectedCells.GetCount(); i++) {
for (int i = 0; i < static_cast<int>(selectedCells.GetCount()); i++) {
int row = selectedCells[i].GetRow();
if (selectedRows.Index(row) == wxNOT_FOUND)
selectedRows.Add(row);
Expand Down Expand Up @@ -440,9 +440,9 @@ mmPayeeDialog::~mmPayeeDialog()

mmPayeeDialog::mmPayeeDialog(wxWindow* parent, bool payee_choose, const wxString& name, const wxString& payee_selected) :
m_payee_choose(payee_choose)
, m_sort(PAYEE_NAME)
, m_lastSort(PAYEE_NAME)
, m_init_selected_payee(payee_selected)
, m_sort(PAYEE_NAME)
, m_lastSort(PAYEE_NAME)
{
ColName_[PAYEE_NAME] = _("Name");
ColName_[PAYEE_HIDDEN] = _("Hidden");
Expand Down
2 changes: 1 addition & 1 deletion src/relocatetagdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ void relocateTagDialog::OnFocusChange(wxChildFocusEvent& event)
event.Skip();
}

void relocateTagDialog::OnTextUpdated(wxCommandEvent& event)
void relocateTagDialog::OnTextUpdated(wxCommandEvent& )
{
IsOkOk();
}
2 changes: 1 addition & 1 deletion src/relocatetagdialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class relocateTagDialog : public wxDialog
void IsOkOk();
void OnOk(wxCommandEvent& event);
void OnCancel(wxCommandEvent& event);
void OnTextUpdated(wxCommandEvent& event);
void OnTextUpdated(wxCommandEvent&);

void OnFocusChange(wxChildFocusEvent& event);

Expand Down

0 comments on commit 1ec5586

Please sign in to comment.