/[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 312 by bh, Wed Sep 11 13:59:37 2002 UTC revision 321 by bh, Fri Sep 13 14:21:48 2002 UTC
# Line 112  class MainWindow(wxFrame): Line 112  class MainWindow(wxFrame):
112          return menu_bar          return menu_bar
113    
114      def build_menu(self, menudesc):      def build_menu(self, menudesc):
115          """Build and return a wxMenu from a menudescription"""          """Return a wxMenu built from the menu description menudesc"""
116          wxmenu = wxMenu()          wxmenu = wxMenu()
117          last = None          last = None
118          for item in menudesc.items:          for item in menudesc.items:
             # here the items must all be Menu instances themselves  
119              if item is None:              if item is None:
120                  # a separator. Only add one if the last item was not a                  # a separator. Only add one if the last item was not a
121                  # separator                  # separator
# Line 220  class MainWindow(wxFrame): Line 219  class MainWindow(wxFrame):
219          """Run a modal message box with the given text, title and flags          """Run a modal message box with the given text, title and flags
220          and return the result"""          and return the result"""
221          dlg = wxMessageDialog(self, text, title, flags)          dlg = wxMessageDialog(self, text, title, flags)
222            dlg.CenterOnParent()
223          result = dlg.ShowModal()          result = dlg.ShowModal()
224          dlg.Destroy()          dlg.Destroy()
225          return result          return result
# Line 251  class MainWindow(wxFrame): Line 251  class MainWindow(wxFrame):
251              text = "(%10.10g, %10.10g)" % pos              text = "(%10.10g, %10.10g)" % pos
252          else:          else:
253              text = ""              text = ""
254            self.set_position_text(text)
255    
256        def set_position_text(self, text):
257            """Set the statusbar text showing the current position.
258    
259            By default the text is shown in field 0 of the status bar.
260            Override this method in derived classes to put it into a
261            different field of the statusbar.
262            """
263          self.SetStatusText(text)          self.SetStatusText(text)
264    
265      def save_modified_session(self, can_veto = 1):      def save_modified_session(self, can_veto = 1):

Legend:
Removed from v.312  
changed lines
  Added in v.321

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26