From 75e6a8e478eb892e7d87981e26b70f52e3e9e87f Mon Sep 17 00:00:00 2001 From: Sven Augustin Date: Wed, 30 Nov 2022 19:30:38 +0100 Subject: [PATCH] moved AlarmMixin to separate file --- slic/gui/widgets/alarm.py | 11 +++++++++++ slic/gui/widgets/tools.py | 9 --------- 2 files changed, 11 insertions(+), 9 deletions(-) create mode 100644 slic/gui/widgets/alarm.py diff --git a/slic/gui/widgets/alarm.py b/slic/gui/widgets/alarm.py new file mode 100644 index 00000000..9781888f --- /dev/null +++ b/slic/gui/widgets/alarm.py @@ -0,0 +1,11 @@ +import wx + + +class AlarmMixin: + + def alarm(self, obj=None): + obj = obj or self + wx.GetTopLevelParent(obj).Raise() + + + diff --git a/slic/gui/widgets/tools.py b/slic/gui/widgets/tools.py index 736503ed..0101bf8b 100644 --- a/slic/gui/widgets/tools.py +++ b/slic/gui/widgets/tools.py @@ -4,15 +4,6 @@ import wx WX_DEFAULT_RESIZABLE_DIALOG_STYLE = wx.DEFAULT_DIALOG_STYLE|wx.RESIZE_BORDER|wx.MINIMIZE_BOX|wx.MAXIMIZE_BOX - -class AlarmMixin: - - def alarm(self, obj=None): - obj = obj or self - wx.GetTopLevelParent(obj).Raise() - - - def post_event(event, source): evt = wx.PyCommandEvent(event.typeId, source.GetId()) wx.PostEvent(source, evt)