Run update-copyright.py.
[hooke.git] / hooke / ui / gui / panel / plot.py
index 602ee650024f5c3c6b5820c941e6a75dc385e4d9..966a9ff5185d5371d96258933e0ce589736a2baf 100644 (file)
@@ -1,22 +1,19 @@
-# Copyright (C) 2010 Massimo Sandal <devicerandom@gmail.com>
-#                    Rolf Schmidt <rschmidt@alcor.concordia.ca>
-#                    W. Trevor King <wking@drexel.edu>
+# Copyright (C) 2010-2012 W. Trevor King <wking@drexel.edu>
 #
 # This file is part of Hooke.
 #
-# Hooke is free software: you can redistribute it and/or modify it
-# under the terms of the GNU Lesser General Public License as
-# published by the Free Software Foundation, either version 3 of the
-# License, or (at your option) any later version.
+# Hooke is free software: you can redistribute it and/or modify it under the
+# terms of the GNU Lesser General Public License as published by the Free
+# Software Foundation, either version 3 of the License, or (at your option) any
+# later version.
 #
-# Hooke is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-# or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General
-# Public License for more details.
+# Hooke is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more
+# details.
 #
-# You should have received a copy of the GNU Lesser General Public
-# License along with Hooke.  If not, see
-# <http://www.gnu.org/licenses/>.
+# You should have received a copy of the GNU Lesser General Public License
+# along with Hooke.  If not, see <http://www.gnu.org/licenses/>.
 
 """Plot panel for Hooke.
 
@@ -117,7 +114,7 @@ class PlotPanel (Panel, wx.Panel):
         self._c['canvas'] = FigureCanvas(
             parent=self, id=wx.ID_ANY, figure=self._c['figure'])
 
-        self._set_color(wx.NamedColor('WHITE'))
+        self._set_color(wx.NamedColour('WHITE'))
         sizer = wx.BoxSizer(wx.VERTICAL)
         sizer.Add(self._c['canvas'], 1, wx.LEFT | wx.TOP | wx.GROW)
         self._setup_toolbar(sizer=sizer)  # comment out to remove plot toolbar.
@@ -156,7 +153,7 @@ class PlotPanel (Panel, wx.Panel):
         elif wx.Platform == '__WXMSW__':
             # On Windows platform, default window size is incorrect, so set
             # toolbar width to figure width.
-            tw, th = toolbar.GetSizeTuple()
+            tw, th = self._c['toolbar'].GetSizeTuple()
             fw, fh = self._c['canvas'].GetSizeTuple()
             # By adding toolbar in sizer, we are able to put it at the bottom
             # of the frame - so appearance is closer to GTK version.
@@ -215,7 +212,7 @@ class PlotPanel (Panel, wx.Panel):
 
     def _on_mouse_move(self, event):
         if 'toolbar' in self._c:
-            if event.guiEvent.m_shiftDown:
+            if event.guiEvent.shiftDown:
                 self._c['toolbar'].set_cursor(wx.CURSOR_RIGHT_ARROW)
             else:
                 self._c['toolbar'].set_cursor(wx.CURSOR_ARROW)