/[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 1056 by frank, Tue May 27 11:29:46 2003 UTC revision 1070 by bh, Tue May 27 15:09:31 2003 UTC
# Line 29  import Thuban.version Line 29  import Thuban.version
29  from Thuban import _  from Thuban import _
30  from Thuban.Model.session import create_empty_session  from Thuban.Model.session import create_empty_session
31  from Thuban.Model.layer import Layer, RasterLayer  from Thuban.Model.layer import Layer, RasterLayer
 from Thuban.Model.color import Color  
 from Thuban.Model.proj import Projection  
32    
33  import view  import view
34  import tree  import tree
 import proj4dialog  
35  import tableview, identifyview  import tableview, identifyview
36  from Thuban.UI.classifier import Classifier  from Thuban.UI.classifier import Classifier
37  import legend  import legend
# Line 669  class MainWindow(DockFrame): Line 666  class MainWindow(DockFrame):
666                  self.ShowTableView(table)                  self.ShowTableView(table)
667    
668      def TableClose(self):      def TableClose(self):
669          print "TableClose: not implemented"          tables = self.application.session.UnreferencedTables()
670    
671            dlg = wxMultipleChoiceDialog(self, _("Pick the tables to close:"),
672                                         _("Close Table"),
673                                         [t.Title() for t in tables],
674                                         size = (400, 300), style=wxRESIZE_BORDER)
675            if dlg.ShowModal() == wxID_OK:
676                for i in dlg.GetValue():
677                    self.application.session.RemoveTable(tables[i])
678    
679    
680      def TableShow(self):      def TableShow(self):
681          """Offer a multi-selection dialog for tables to be displayed          """Offer a multi-selection dialog for tables to be displayed
# Line 925  _method_command("layer_unjointable", _(" Line 931  _method_command("layer_unjointable", _("
931    
932  # Table menu  # Table menu
933  _method_command("table_open", _("&Open..."), "TableOpen")  _method_command("table_open", _("&Open..."), "TableOpen")
934  _method_command("table_close", _("&Close"), "TableClose")  _method_command("table_close", _("&Close"), "TableClose",
935           sensitive = lambda context: bool(context.session.UnreferencedTables()))
936  _method_command("table_show", _("&Show"), "TableShow")  _method_command("table_show", _("&Show"), "TableShow")
937  _method_command("table_join", _("&Join..."), "TableJoin")  _method_command("table_join", _("&Join..."), "TableJoin")
938    

Legend:
Removed from v.1056  
changed lines
  Added in v.1070

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26