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

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

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

revision 1854 by bh, Wed Oct 22 09:38:36 2003 UTC revision 1861 by jan, Fri Oct 24 16:03:03 2003 UTC
# Line 60  class ProjFrame(NonModalNonParentDialog) Line 60  class ProjFrame(NonModalNonParentDialog)
60              ("tmerc", _("Transverse Mercator"), TMPanel),              ("tmerc", _("Transverse Mercator"), TMPanel),
61              ("utm", _("Universal Transverse Mercator"), UTMPanel),              ("utm", _("Universal Transverse Mercator"), UTMPanel),
62              ("lcc", _("Lambert Conic Conformal"), LCCPanel),              ("lcc", _("Lambert Conic Conformal"), LCCPanel),
63              ("latlong", _("Geographic"), GeoPanel)]              ("latlong", _("Geographic"), GeoPanel),
64                ("longlat", _("Geographic"), GeoPanel)]#longlat is an alias of proj
65          self.receiver = receiver          self.receiver = receiver
66          self.haveTried = False          self.haveTried = False
67          self.curProjPanel = None          self.curProjPanel = None
# Line 463  class ProjFrame(NonModalNonParentDialog) Line 464  class ProjFrame(NonModalNonParentDialog)
464                      self.projchoice.Select(0)                      self.projchoice.Select(0)
465                      self.projchoice.Disable()                      self.projchoice.Disable()
466                      self._show_proj_panel(UnknownProjPanel)                      self._show_proj_panel(UnknownProjPanel)
467                        assert self.curProjPanel is not None
468                        self.curProjPanel.SetProjection(proj)
469          else:          else:
470              self.projfilepath.SetLabel(_("Multiple Projections selected"))              self.projfilepath.SetLabel(_("Multiple Projections selected"))
471    
# Line 655  class UnknownProjPanel(ProjPanel): Line 658  class UnknownProjPanel(ProjPanel):
658      def __init__(self, parent, receiver):      def __init__(self, parent, receiver):
659          ProjPanel.__init__(self, parent)          ProjPanel.__init__(self, parent)
660    
661            self.__text = _("Thuban does not know the parameters\n"
662                            "for the current projection and cannot\n"
663                            "display a configuration panel.\n\n"
664                            "The unidentified set of parameters is:\n\n")
665    
666            self.__textbox = wxTextCtrl(self, -1, self.__text, size=(100,200),
667                                style=wxTE_READONLY|wxTE_MULTILINE|wxTE_LINEWRAP)
668          self._DoLayout()          self._DoLayout()
669    
670      def _DoLayout(self):      def _DoLayout(self):
671          sizer = wxBoxSizer(wxVERTICAL)          sizer = wxBoxSizer(wxVERTICAL)
672    
673          sizer.Add(wxStaticText(self, -1,          sizer.Add(self.__textbox, 0, wxALL|wxEXPAND, 4)
                                _("Thuban does not know the parameters\n"  
                                  "for the current projection and cannot\n"  
                                  "display a configuration panel.")))  
674    
675          ProjPanel._DoLayout(self, sizer)          ProjPanel._DoLayout(self, sizer)
676    
# Line 671  class UnknownProjPanel(ProjPanel): Line 678  class UnknownProjPanel(ProjPanel):
678          return "Unknown"          return "Unknown"
679    
680      def SetProjection(self, proj):      def SetProjection(self, proj):
681          pass          """Append the available parameters to the info text."""
682            text = self.__text
683            for param in proj.GetAllParameters():
684                text = text + '%s\n' % param
685            self.__textbox.SetValue(text)
686    
687      def GetParameters(self):      def GetParameters(self):
688          return None          return None

Legend:
Removed from v.1854  
changed lines
  Added in v.1861

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26