/[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 238 by bh, Wed Jul 24 10:19:46 2002 UTC revision 264 by jan, Fri Aug 16 17:06:38 2002 UTC
# Line 524  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.238  
changed lines
  Added in v.264

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26