From 6a93295bcfa3565578ad5de3ed5a279ec1ece9bc Mon Sep 17 00:00:00 2001 From: Jinhao Date: Wed, 22 Jul 2015 01:17:02 +0800 Subject: [PATCH] refactor some functions of button --- include/nana/gui/widgets/button.hpp | 2 -- source/gui/widgets/button.cpp | 7 +------ 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/include/nana/gui/widgets/button.hpp b/include/nana/gui/widgets/button.hpp index 45596ca0..3c0eaf7d 100644 --- a/include/nana/gui/widgets/button.hpp +++ b/include/nana/gui/widgets/button.hpp @@ -101,8 +101,6 @@ namespace nana{ bool transparent() const; button& edge_effects(bool enable); - private: - void _m_shortkey(); private: //Overrides widget virtual functions void _m_complete_creation() override; diff --git a/source/gui/widgets/button.cpp b/source/gui/widgets/button.cpp index 42721820..e68d9a3b 100644 --- a/source/gui/widgets/button.cpp +++ b/source/gui/widgets/button.cpp @@ -501,16 +501,11 @@ namespace nana{ namespace drawerbase return *this; } - void button::_m_shortkey() - { - get_drawer_trigger().emit_click(); - } - void button::_m_complete_creation() { events().shortkey.connect_unignorable([this] { - _m_shortkey(); + get_drawer_trigger().emit_click(); }); }