/[thuban]/branches/WIP-pyshapelib-bramz/Thuban/UI/mainwindow.py
ViewVC logotype

Diff of /branches/WIP-pyshapelib-bramz/Thuban/UI/mainwindow.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 579 by jonathan, Fri Mar 28 17:07:06 2003 UTC revision 580 by jonathan, Mon Mar 31 18:32:22 2003 UTC
# Line 101  class MainWindow(DockFrame): Line 101  class MainWindow(DockFrame):
101    
102          self.init_dialogs()          self.init_dialogs()
103    
104          EVT_CLOSE(self, self.OnClose)          EVT_CLOSE(self, self._OnClose)
105    
106      def Subscribe(self, channel, *args):      def Subscribe(self, channel, *args):
107          """Subscribe a function to a message channel.          """Subscribe a function to a message channel.
# Line 389  class MainWindow(DockFrame): Line 389  class MainWindow(DockFrame):
389      def Exit(self):      def Exit(self):
390          self.Close(false)          self.Close(false)
391    
392      def OnClose(self, event):      def _OnClose(self, event):
393          result = self.save_modified_session(can_veto = event.CanVeto())          result = self.save_modified_session(can_veto = event.CanVeto())
394          if result == wxID_CANCEL:          if result == wxID_CANCEL:
395              event.Veto()              event.Veto()
# Line 398  class MainWindow(DockFrame): Line 398  class MainWindow(DockFrame):
398              # wx's destroy event, but that isn't implemented for wxGTK              # wx's destroy event, but that isn't implemented for wxGTK
399              # yet.              # yet.
400              self.canvas.Unsubscribe(VIEW_POSITION, self.view_position_changed)              self.canvas.Unsubscribe(VIEW_POSITION, self.view_position_changed)
401                DockFrame._OnClose(self, event)
402              self.Destroy()              self.Destroy()
403    
404      def SetMap(self, map):      def SetMap(self, map):
# Line 610  class MainWindow(DockFrame): Line 611  class MainWindow(DockFrame):
611              title = "Legend: %s" % self.Map().Title()              title = "Legend: %s" % self.Map().Title()
612              dialog = self.CreateDock(name, -1, title, wxLAYOUT_LEFT)              dialog = self.CreateDock(name, -1, title, wxLAYOUT_LEFT)
613              legend.LegendPanel(dialog, None, self)              legend.LegendPanel(dialog, None, self)
614                dialog.Dock()
615    
616          dialog.GetPanel().SetMap(self.Map())          dialog.GetPanel().SetMap(self.Map())
617          dialog.Show()          dialog.Show()

Legend:
Removed from v.579  
changed lines
  Added in v.580

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26