Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Remove some conditional branches in examples for wx<4. #11608

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 9, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 3 additions & 9 deletions examples/user_interfaces/embedding_in_wx4_sgskip.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,9 @@ def __init__(self, canvas, cankill):

# for simplicity I'm going to reuse a bitmap from wx, you'll
# probably want to add your own.
if 'phoenix' in wx.PlatformInfo:
self.AddTool(self.ON_CUSTOM, 'Click me',
_load_bitmap('back.png'),
'Activate custom contol')
self.Bind(wx.EVT_TOOL, self._on_custom, id=self.ON_CUSTOM)
else:
self.AddSimpleTool(self.ON_CUSTOM, _load_bitmap('back.png'),
'Click me', 'Activate custom contol')
self.Bind(wx.EVT_TOOL, self._on_custom, id=self.ON_CUSTOM)
self.AddTool(self.ON_CUSTOM, 'Click me', _load_bitmap('back.png'),
'Activate custom contol')
self.Bind(wx.EVT_TOOL, self._on_custom, id=self.ON_CUSTOM)

def _on_custom(self, evt):
# add some text to the axes in a random location in axes (0,1)
Expand Down
6 changes: 1 addition & 5 deletions examples/user_interfaces/embedding_in_wx5_sgskip.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,9 @@
"""

import wx
import wx.lib.agw.aui as aui
import wx.lib.mixins.inspection as wit

if 'phoenix' in wx.PlatformInfo:
import wx.lib.agw.aui as aui
else:
import wx.aui as aui

import matplotlib as mpl
from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg as FigureCanvas
from matplotlib.backends.backend_wxagg import NavigationToolbar2WxAgg as NavigationToolbar
Expand Down