/[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 235 by bh, Tue Jul 23 10:56:29 2002 UTC revision 264 by jan, Fri Aug 16 17:06:38 2002 UTC
# Line 41  bitmapext = ".xpm" Line 41  bitmapext = ".xpm"
41  class MainWindow(wxFrame):  class MainWindow(wxFrame):
42    
43      def __init__(self, parent, ID, title, application, interactor,      def __init__(self, parent, ID, title, application, interactor,
44                   initial_message = None):                   initial_message = None, size = wxSize(-1, -1)):
45          wxFrame.__init__(self, parent, ID, title, wxDefaultPosition,          wxFrame.__init__(self, parent, ID, title, wxDefaultPosition, size)
                          wxSize(400, 300))  
46    
47          self.application = application          self.application = application
48          self.interactor = interactor          self.interactor = interactor
# Line 525  def _has_selected_layer(context): Line 524  def _has_selected_layer(context):
524      """Return true if a layer is selected in the context"""      """Return true if a layer is selected in the context"""
525      return context.mainwindow.has_selected_layer()      return context.mainwindow.has_selected_layer()
526    
527    def _has_tree_window_shown(context):
528        """Return true if the tree window is shown"""
529        return context.mainwindow.get_open_dialog("session_tree") is None
530    
531  # File menu  # File menu
532  _method_command("new_session", "&New Session", "NewSession")  _method_command("new_session", "&New Session", "NewSession")
533  _method_command("open_session", "&Open Session", "OpenSession")  _method_command("open_session", "&Open Session", "OpenSession")
534  _method_command("save_session", "&Save Session", "SaveSession")  _method_command("save_session", "&Save Session", "SaveSession")
535  _method_command("save_session_as", "Save Session &As", "SaveSessionAs")  _method_command("save_session_as", "Save Session &As", "SaveSessionAs")
536  _method_command("show_session_tree", "Show Session &Tree", "ShowSessionTree")  _method_command("show_session_tree", "Show Session &Tree", "ShowSessionTree",
537                    sensitive = _has_tree_window_shown)
538  _method_command("exit", "&Exit", "Exit")  _method_command("exit", "&Exit", "Exit")
539    
540  # Help menu  # Help menu

Legend:
Removed from v.235  
changed lines
  Added in v.264

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26