From 48f759e0070944a33a5776543e226af6bcd2f3eb Mon Sep 17 00:00:00 2001 From: Jinhao Date: Tue, 29 May 2018 04:12:53 +0800 Subject: [PATCH 1/2] remove deprecated code --- include/nana/gui/widgets/listbox.hpp | 3 --- source/gui/detail/bedrock_windows.cpp | 27 ------------------- source/gui/place.cpp | 7 ++--- source/gui/widgets/skeletons/content_view.cpp | 6 ----- 4 files changed, 2 insertions(+), 41 deletions(-) diff --git a/include/nana/gui/widgets/listbox.hpp b/include/nana/gui/widgets/listbox.hpp index 1fe6aeca..36a38f65 100644 --- a/include/nana/gui/widgets/listbox.hpp +++ b/include/nana/gui/widgets/listbox.hpp @@ -1215,9 +1215,6 @@ namespace nana unsigned suspension_width{ 8 }; ///< def= . the trigger will set this to the width if ("...") unsigned text_margin{ 5 }; ///< def= 5. Additional or extended with added (before) to the text width to determine the cell width. cell_w = text_w + ext_w +1 - //deprecated - //unsigned header_height { 25 }; ///< def=25 . header height header_size - unsigned item_height_ex{ 6 }; ///< Set !=0 !!!! def=6. item_height = text_height + item_height_ex unsigned header_splitter_area_before{ 2 }; ///< def=2. But 4 is better... IMO unsigned header_splitter_area_after{ 3 }; ///< def=3. But 4 is better... diff --git a/source/gui/detail/bedrock_windows.cpp b/source/gui/detail/bedrock_windows.cpp index e402a25e..d8769fd9 100644 --- a/source/gui/detail/bedrock_windows.cpp +++ b/source/gui/detail/bedrock_windows.cpp @@ -408,16 +408,7 @@ namespace detail if (msg.message == WM_QUIT) break; if ((WM_KEYFIRST <= msg.message && msg.message <= WM_KEYLAST) || !::IsDialogMessage(native_handle, &msg)) { -#if 0 - auto menu_wd = get_menu(reinterpret_cast(msg.hwnd), true); - if (menu_wd) interior_helper_for_menu(msg, menu_wd); - - ::TranslateMessage(&msg); //deprecated - ::DispatchMessage(&msg); -#else process_msg(this, msg); -#endif - wd_manager().remove_trash_handle(tid); } } @@ -429,15 +420,7 @@ namespace detail { if (-1 != ::GetMessage(&msg, 0, 0, 0)) { -#if 0 - auto menu_wd = get_menu(reinterpret_cast(msg.hwnd), true); - if (menu_wd) interior_helper_for_menu(msg, menu_wd); - - ::TranslateMessage(&msg); - ::DispatchMessage(&msg); -#else process_msg(this, msg); -#endif } wd_manager().call_safe_place(tid); @@ -452,17 +435,7 @@ namespace detail while(context->window_count) { if(-1 != ::GetMessage(&msg, 0, 0, 0)) - { -#if 0 - auto menu_wd = get_menu(reinterpret_cast(msg.hwnd), true); - if(menu_wd) interior_helper_for_menu(msg, menu_wd); - - ::TranslateMessage(&msg); - ::DispatchMessage(&msg); -#else process_msg(this, msg); -#endif - } wd_manager().call_safe_place(tid); wd_manager().remove_trash_handle(tid); diff --git a/source/gui/place.cpp b/source/gui/place.cpp index 5a9982c6..192fbf98 100644 --- a/source/gui/place.cpp +++ b/source/gui/place.cpp @@ -2583,9 +2583,8 @@ namespace nana : public division { public: - div_switchable(std::string && name, implement* /*impl*/) noexcept: - division(kind::switchable, std::move(name))//, - //impl_(impl) //deprecated + div_switchable(std::string && name, implement*) noexcept: + division(kind::switchable, std::move(name)) {} private: void collocate(window wd) override @@ -2613,8 +2612,6 @@ namespace nana } } } - private: - //implement * const impl_; //deprecated }; place::implement::~implement() diff --git a/source/gui/widgets/skeletons/content_view.cpp b/source/gui/widgets/skeletons/content_view.cpp index b7d8f722..27899183 100644 --- a/source/gui/widgets/skeletons/content_view.cpp +++ b/source/gui/widgets/skeletons/content_view.cpp @@ -68,12 +68,6 @@ namespace nana { bool drag_started{ false }; point origin; - /* - scrolls enabled_scrolls{scrolls::both}; //deprecated - nana::scroll horz; - nana::scroll vert; - */ - std::shared_ptr cv_scroll; timer tmr; From 6a66b03663631f663a713cc38a81d7796cd52ec3 Mon Sep 17 00:00:00 2001 From: Jinhao Date: Tue, 29 May 2018 04:14:01 +0800 Subject: [PATCH 2/2] fix a syntax error --- source/audio/detail/audio_device.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/audio/detail/audio_device.cpp b/source/audio/detail/audio_device.cpp index 73a0ee8b..cf7f4966 100644 --- a/source/audio/detail/audio_device.cpp +++ b/source/audio/detail/audio_device.cpp @@ -65,7 +65,7 @@ namespace nana{namespace audio bool audio_device::empty() const { -#if defined(NANA_POSIX) && not defined(NANA_LINUX) +#if defined(NANA_POSIX) && !defined(NANA_LINUX) return (-1 == handle_); #else return (nullptr == handle_); @@ -305,7 +305,7 @@ namespace nana{namespace audio }//end namespace audio }//end namespace nana -#if defined(NANA_POSIX) && not defined(NANA_LINUX) +#if defined(NANA_POSIX) && !defined(NANA_LINUX) // parse input securely, no-overruns or overflows. static bool match(char *&cursor, const char *pattern, const char *tail) {