diff options
Diffstat (limited to 'wx+')
-rw-r--r-- | wx+/file_drop.h | 1 | ||||
-rw-r--r-- | wx+/grid.cpp | 2 | ||||
-rw-r--r-- | wx+/shell_execute.h | 2 | ||||
-rw-r--r-- | wx+/toggle_button.h | 34 |
4 files changed, 12 insertions, 27 deletions
diff --git a/wx+/file_drop.h b/wx+/file_drop.h index 7b6020ac..0916b0cb 100644 --- a/wx+/file_drop.h +++ b/wx+/file_drop.h @@ -7,6 +7,7 @@ #ifndef FILE_DROP_H_INCLUDED #define FILE_DROP_H_INCLUDED +#include <wx/window.h> #include <wx/event.h> #include <wx/dnd.h> diff --git a/wx+/grid.cpp b/wx+/grid.cpp index 750c4241..67d01fef 100644 --- a/wx+/grid.cpp +++ b/wx+/grid.cpp @@ -1865,7 +1865,7 @@ void Grid::SetScrollbar(int orientation, int position, int thumbSize, int range, } #endif - //get rid of scrollbars, but preserve scrolling behavior! +//get rid of scrollbars, but preserve scrolling behavior! #ifdef FFS_WIN #ifdef __MINGW32__ //MinGW is clueless... #define WM_MOUSEHWHEEL 0x020E diff --git a/wx+/shell_execute.h b/wx+/shell_execute.h index acf84794..a069fdb3 100644 --- a/wx+/shell_execute.h +++ b/wx+/shell_execute.h @@ -102,7 +102,7 @@ void shellExecute(const Zstring& command, ExecutionType type = EXEC_TYPE_ASYNC) wxMessageBox(_("Invalid command line:") + L"\n" + utfCvrtTo<wxString>(command)); } else - async([=] { /*int rv = */ ::system(command.c_str()); }); + async([=] { int rv = ::system(command.c_str()); (void)rv; }); //unfortunately we are not allowed to show a wxMessageBox from a worker thread #endif } diff --git a/wx+/toggle_button.h b/wx+/toggle_button.h index 666f291d..548def1d 100644 --- a/wx+/toggle_button.h +++ b/wx+/toggle_button.h @@ -28,8 +28,7 @@ public: void init(const wxBitmap& activeBmp, const wxBitmap& inactiveBmp, - const wxString& activeTooltip, - const wxString& inactiveTooltip = wxString()); + const wxString& tooltip); void setActive(bool value); bool isActive() const { return active; } @@ -38,11 +37,8 @@ public: private: bool active; - wxBitmap m_activeBmp; - wxString m_activeTooltip; - - wxBitmap m_inactiveBmp; - wxString m_inactiveTooltip; + wxBitmap activeBmp_; + wxBitmap inactiveBmp_; }; @@ -61,15 +57,13 @@ private: inline void ToggleButton::init(const wxBitmap& activeBmp, const wxBitmap& inactiveBmp, - const wxString& activeTooltip, - const wxString& inactiveTooltip) + const wxString& tooltip) { - m_activeBmp = activeBmp; - m_activeTooltip = activeTooltip; - m_inactiveBmp = inactiveBmp; - m_inactiveTooltip = inactiveTooltip.empty() ? activeTooltip : inactiveTooltip; + SetToolTip(tooltip); + + activeBmp_ = activeBmp; + inactiveBmp_ = inactiveBmp; - //load resources setActive(active); } @@ -78,17 +72,7 @@ inline void ToggleButton::setActive(bool value) { active = value; - - if (active) - { - SetBitmapLabel(m_activeBmp); - SetToolTip(m_activeTooltip); - } - else - { - SetBitmapLabel(m_inactiveBmp); - SetToolTip(m_inactiveTooltip); - } + SetBitmapLabel(active ? activeBmp_ : inactiveBmp_); } #endif // TOGGLEBUTTON_H_INCLUDED |