From 9dd05ae31163b96c2ebffb7249f5b82ed95d83f2 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Mon, 4 Jun 2018 21:47:45 -0700 Subject: [PATCH] Merge pull request #878 from RobinD42/fix-issue875 Add missing wx.adv.EVT_CALENDAR_WEEK_CLICKED (cherry picked from commit e1732ee271cf768f3cbc1351772588fa3f77e826) --- CHANGES.rst | 2 ++ docs/sphinx/itemToModuleMap.json | 2 +- etg/calctrl.py | 3 ++- unittests/test_calctrl.py | 16 +++++++++++++++- 4 files changed, 20 insertions(+), 3 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 6050c46a..80b59497 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -160,6 +160,8 @@ Changes in this release include the following: * Fixed all implementations of the PGProperty.StringToValue and IntToValue methods to treat the value parameter as a return value. (#742) +* Add missing wx.adv.EVT_CALENDAR_WEEK_CLICKED (#875) + diff --git a/docs/sphinx/itemToModuleMap.json b/docs/sphinx/itemToModuleMap.json index dab71915..860b35d3 100644 --- a/docs/sphinx/itemToModuleMap.json +++ b/docs/sphinx/itemToModuleMap.json @@ -816,7 +816,7 @@ "DirProperty":"wx.propgrid.", "DirSelector":"wx.", "DirSelectorPromptStr":"wx.", -"Direction":"wx.DataObject.", +"Direction":"wx.", "DisableAsserts":"wx.", "Display":"wx.", "DisplayChangedEvent":"wx.", diff --git a/etg/calctrl.py b/etg/calctrl.py index 69454351..6d6cbfbd 100644 --- a/etg/calctrl.py +++ b/etg/calctrl.py @@ -43,10 +43,11 @@ def run(): EVT_CALENDAR_SEL_CHANGED = wx.PyEventBinder( wxEVT_CALENDAR_SEL_CHANGED, 1) EVT_CALENDAR_WEEKDAY_CLICKED = wx.PyEventBinder( wxEVT_CALENDAR_WEEKDAY_CLICKED, 1) EVT_CALENDAR_PAGE_CHANGED = wx.PyEventBinder( wxEVT_CALENDAR_PAGE_CHANGED, 1) + EVT_CALENDAR_WEEK_CLICKED = wx.PyEventBinder( wxEVT_CALENDAR_WEEK_CLICKED, 1) """) - # These are deprecated, get rid of them later... module.addPyCode("""\ + # These are deprecated, will be removed later... EVT_CALENDAR_DAY = wx.PyEventBinder( wxEVT_CALENDAR_DAY_CHANGED, 1) EVT_CALENDAR_MONTH = wx.PyEventBinder( wxEVT_CALENDAR_MONTH_CHANGED, 1) EVT_CALENDAR_YEAR = wx.PyEventBinder( wxEVT_CALENDAR_YEAR_CHANGED, 1) diff --git a/unittests/test_calctrl.py b/unittests/test_calctrl.py index 074cc18e..4e2717ab 100644 --- a/unittests/test_calctrl.py +++ b/unittests/test_calctrl.py @@ -66,13 +66,27 @@ class calctrl_Tests(wtc.WidgetTestCase): - def test_calevt(self): + def test_calevt1(self): evt = wx.adv.CalendarEvent() evt.SetDate(wx.DateTime.Today()) d = evt.PyGetDate() assert isinstance(d, datetime.datetime) + def test_calevt2(self): + wx.adv.EVT_CALENDAR + wx.adv.EVT_CALENDAR_SEL_CHANGED + wx.adv.EVT_CALENDAR_WEEKDAY_CLICKED + wx.adv.EVT_CALENDAR_PAGE_CHANGED + wx.adv.EVT_CALENDAR_WEEK_CLICKED + + wx.adv.wxEVT_CALENDAR_SEL_CHANGED + wx.adv.wxEVT_CALENDAR_PAGE_CHANGED + wx.adv.wxEVT_CALENDAR_DOUBLECLICKED + wx.adv.wxEVT_CALENDAR_WEEKDAY_CLICKED + wx.adv.wxEVT_CALENDAR_WEEK_CLICKED + + #--------------------------------------------------------------------------- if __name__ == '__main__':