/[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 903 by jonathan, Wed May 14 11:16:28 2003 UTC revision 1190 by jonathan, Thu Jun 12 17:01:37 2003 UTC
# Line 1  Line 1 
1  # Copyright (c) 2003 by Intevation GmbH  # Copyright (c) 2003 by Intevation GmbH
2  # Authors:  # Authors:
3  # Jonathan Coles <[email protected]>  # Jonathan Coles <[email protected]>
4    # Frank Koormann <[email protected]>
5  #  #
6  # This program is free software under the GPL (>=v2)  # This program is free software under the GPL (>=v2)
7  # Read the file COPYING coming with Thuban for details.  # Read the file COPYING coming with Thuban for details.
# Line 12  from Thuban import _ Line 13  from Thuban import _
13    
14  from Thuban.Model.proj import Projection, ProjFile  from Thuban.Model.proj import Projection, ProjFile
15    
16  from Thuban.Model.resource import GetUserProjFiles, GetSystemProjFiles, \  from Thuban.Model.resource import get_user_proj_files, get_system_proj_files, \
17                                    ReadProjFile, WriteProjFile                                    read_proj_file, write_proj_file
18  from Thuban.UI.dialogs import NonModalDialog  from Thuban.UI.dialogs import NonModalNonParentDialog
19    
20    
21  ID_PROJ_ADVANCED  = 4001  ID_PROJ_ADVANCED  = 4001
# Line 32  ID_PROJ_PROJNAME  = 4014 Line 33  ID_PROJ_PROJNAME  = 4014
33  CLIENT_PROJ = 0  CLIENT_PROJ = 0
34  CLIENT_PROJFILE = 1  CLIENT_PROJFILE = 1
35    
36  class ProjFrame(NonModalDialog):  class ProjFrame(NonModalNonParentDialog):
37    
38      def __init__(self, parent, name, title, receiver):      def __init__(self, parent, name, title, receiver):
39          """Initialize the projection dialog.          """Initialize the projection dialog.
# Line 56  class ProjFrame(NonModalDialog): Line 57  class ProjFrame(NonModalDialog):
57          self.projPanels.append(          self.projPanels.append(
58              ("latlong", _("Geographic"), GeoPanel))              ("latlong", _("Geographic"), GeoPanel))
59    
60          NonModalDialog.__init__(self, parent, name, title)          NonModalNonParentDialog.__init__(self, parent, name, title)
61          # originally generate by wxGlade          # originally generate by wxGlade
62          self.panel_1 = wxPanel(self, -1)          self.panel_1 = wxPanel(self, -1)
63          self.panel_edit = wxPanel(self, -1)          self.panel_edit = wxPanel(self, -1)
         self.panel_buttons = wxPanel(self, -1)  
64          self.label_5 = wxStaticText(self.panel_1, -1,          self.label_5 = wxStaticText(self.panel_1, -1,
65                          _("Available Projections:"))                          _("Available Projections:"))
66    
67            # Projection List specific actions (Import/Export/Remove)
68            self.button_import = wxButton(self.panel_1, ID_PROJ_IMPORT,
69                                          _("Import..."))
70            self.button_export = wxButton(self.panel_1, ID_PROJ_EXPORT,
71                                          _("Export..."))
72            self.button_remove = wxButton(self.panel_1, ID_PROJ_REMOVE,
73                                          _("Remove"))
74    
75            # The Projection List
76          self.availprojs = wxListBox(self.panel_1, ID_PROJ_AVAIL,          self.availprojs = wxListBox(self.panel_1, ID_PROJ_AVAIL,
77                                      style=wxLB_EXTENDED|wxLB_SORT)                                      style=wxLB_EXTENDED|wxLB_SORT)
78          self.projfilepath = wxStaticText(self.panel_1, -1, "")          self.projfilepath = wxStaticText(self.panel_1, -1, "")
79    
80            # Projection Specific Entries (Name/Projection)
81          self.label_2 = wxStaticText(self.panel_edit, -1, _("Name:"))          self.label_2 = wxStaticText(self.panel_edit, -1, _("Name:"))
82          self.projname = wxTextCtrl(self.panel_edit, ID_PROJ_PROJNAME, "")          self.projname = wxTextCtrl(self.panel_edit, ID_PROJ_PROJNAME, "")
83          self.label_3 = wxStaticText(self.panel_edit, -1, _("Projection:"))          self.label_3 = wxStaticText(self.panel_edit, -1, _("Projection:"))
84          self.projchoice = wxChoice(self.panel_edit, ID_PROJ_PROJCHOICE)          self.projchoice = wxChoice(self.panel_edit, ID_PROJ_PROJCHOICE)
85          self.button_import = wxButton(self.panel_1, ID_PROJ_IMPORT,  
86                                        _("Import..."))          # Projection Specific actions (New/Save/Add)
         self.button_export = wxButton(self.panel_1, ID_PROJ_EXPORT,  
                                       _("Export..."))  
         self.button_remove = wxButton(self.panel_1, ID_PROJ_REMOVE, _("Remove"))  
87          self.button_new = wxButton(self.panel_edit, ID_PROJ_NEW, _("New"))          self.button_new = wxButton(self.panel_edit, ID_PROJ_NEW, _("New"))
         self.button_save = wxButton(self.panel_edit, ID_PROJ_SAVE,_("Save"))  
88          self.button_add = wxButton(self.panel_edit, ID_PROJ_ADDTOLIST,          self.button_add = wxButton(self.panel_edit, ID_PROJ_ADDTOLIST,
89                                        _("Add to List"))                                        _("Add to List"))
90          self.button_try = wxButton(self.panel_buttons, wxID_APPLY, _("Try"))          self.button_save = wxButton(self.panel_edit, ID_PROJ_SAVE,_("Update"))
91          self.button_revert = wxButton(self.panel_buttons, ID_PROJ_REVERT,  
92            # Main Action buttons (Try/Revert/OK/Close)
93            self.button_try = wxButton(self, wxID_APPLY, _("Try"))
94            self.button_revert = wxButton(self, ID_PROJ_REVERT,
95                                        _("Revert"))                                        _("Revert"))
96          self.button_ok = wxButton(self.panel_buttons, wxID_OK, _("OK"))          self.button_ok = wxButton(self, wxID_OK, _("OK"))
97          self.button_ok.SetDefault()          self.button_ok.SetDefault()
98          self.button_close = wxButton(self.panel_buttons, wxID_CANCEL,          self.button_close = wxButton(self, wxID_CANCEL,
99                                       _("Close"))                                       _("Close"))
100    
101          self.__set_properties()          self.__set_properties()
102          self.__do_layout()          self.__do_layout()
103    
104          # wxGlade          # wxGlade
105    
106            # Fill the projection choice list.
107            for proj, name, clazz in self.projPanels:
108                self.projchoice.Append(name, [clazz, None])
109    
110          self.originalProjection = self.receiver.GetProjection()          self.originalProjection = self.receiver.GetProjection()
111    
112          self.__DoOnProjAvail()          self.__DoOnProjAvail()
# Line 113  class ProjFrame(NonModalDialog): Line 129  class ProjFrame(NonModalDialog):
129    
130          EVT_TEXT(self, ID_PROJ_PROJNAME, self._OnProjName)          EVT_TEXT(self, ID_PROJ_PROJNAME, self._OnProjName)
131    
   
132      def OnApply(self, event):      def OnApply(self, event):
133          self.__SetProjection()          self.__SetProjection()
134          self.haveTried = True          self.haveTried = True
# Line 133  class ProjFrame(NonModalDialog): Line 148  class ProjFrame(NonModalDialog):
148              self.receiver.SetProjection(self.originalProjection)              self.receiver.SetProjection(self.originalProjection)
149              self.haveTried = False              self.haveTried = False
150    
   
151      def _OnNew(self, event):      def _OnNew(self, event):
152    
153          # clear all selections          # clear all selections
# Line 164  class ProjFrame(NonModalDialog): Line 178  class ProjFrame(NonModalDialog):
178          if newproj is not None:          if newproj is not None:
179              projfile.Replace(proj, newproj)              projfile.Replace(proj, newproj)
180              try:              try:
181                  WriteProjFile(projfile)                  write_proj_file(projfile)
182              except IOError, (errno, errstr):              except IOError, (errno, errstr):
183                  self.__ShowError(projfile.GetFilename(), errstr)                  self.__ShowError(projfile.GetFilename(), errstr)
184              self.availprojs.SetClientData(sel[0], [newproj, projfile])              self.availprojs.SetClientData(sel[0], [newproj, projfile])
185    
186                self.__FillAvailList( selectProj = newproj.GetName())
187    
188      def _OnAddToList(self, event):      def _OnAddToList(self, event):
189    
190          proj = self.__GetProjection()          proj = self.__GetProjection()
191          if proj is not None:          if proj is not None:
192              self.__usrProjFile.Add(proj)              self.__usrProjFile.Add(proj)
193              try:              try:
194                  WriteProjFile(self.__usrProjFile)                  write_proj_file(self.__usrProjFile)
195              except IOError, (errno, errstr):              except IOError, (errno, errstr):
196                  self.__ShowError(self.__userProjFile.GetFilename(), errstr)                  self.__ShowError(self.__userProjFile.GetFilename(), errstr)
197    
198              self.__FillAvailList()              self.__FillAvailList( selectProj = proj.GetName())
199    
200      def _OnProjAvail(self, event):      def _OnProjAvail(self, event):
201          self.__DoOnProjAvail()          self.__DoOnProjAvail()
# Line 192  class ProjFrame(NonModalDialog): Line 208  class ProjFrame(NonModalDialog):
208              path = dlg.GetPath()              path = dlg.GetPath()
209    
210              try:              try:
211                  projFile = ReadProjFile(path)                  projFile = read_proj_file(path)
212                  for proj in projFile.GetProjections():                  for proj in projFile.GetProjections():
213                      self.__usrProjFile.Add(proj)                      self.__usrProjFile.Add(proj)
214                  WriteProjFile(self.__usrProjFile)                  write_proj_file(self.__usrProjFile)
215              except IOError, (errno, errstr):              except IOError, (errno, errstr):
216                  self.__ShowError(dlg.GetPath(), errstr)                  self.__ShowError(dlg.GetPath(), errstr)
217    
# Line 222  class ProjFrame(NonModalDialog): Line 238  class ProjFrame(NonModalDialog):
238                      projFile.Add(proj)                      projFile.Add(proj)
239    
240              try:              try:
241                  WriteProjFile(projFile)                  write_proj_file(projFile)
242              except IOError, (errno, errstr):              except IOError, (errno, errstr):
243                  self.__ShowError(dlg.GetPath(), errstr)                  self.__ShowError(dlg.GetPath(), errstr)
244    
# Line 257  class ProjFrame(NonModalDialog): Line 273  class ProjFrame(NonModalDialog):
273                  projfile.Remove(proj)                  projfile.Remove(proj)
274    
275          try:          try:
276              WriteProjFile(projfile)              write_proj_file(projfile)
277          except IOError, (errno, errstr):          except IOError, (errno, errstr):
278              self.__ShowError(projfile.GetFilename(), errstr)              self.__ShowError(projfile.GetFilename(), errstr)
279    
# Line 355  class ProjFrame(NonModalDialog): Line 371  class ProjFrame(NonModalDialog):
371              if proj is None:              if proj is None:
372                  # user selected <None>                  # user selected <None>
373                  self.projname.Clear()                  self.projname.Clear()
374                                    self.projfilepath.SetLabel(_("Projection File: "))
375              else:              else:
376                            
377                  if projfile is not None:                  if projfile is not None:
378                      self.projfilepath.SetLabel(projfile.GetFilename())                      self.projfilepath.SetLabel(_("Projection File: ") +
379                            os.path.basename(projfile.GetFilename()))
380                  else:                  else:
381                      # only None if the currently used projection is selected                      # only None if the currently used projection is selected
382                      self.projfilepath.SetLabel("")                      self.projfilepath.SetLabel(_("Projection File: "))
383    
384                  self.projname.SetValue(proj.GetName())                  self.projname.SetValue(proj.GetName())
385    
# Line 458  class ProjFrame(NonModalDialog): Line 475  class ProjFrame(NonModalDialog):
475    
476          return None          return None
477    
478      def __FillAvailList(self, selectCurrent = False):      def __FillAvailList(self, selectCurrent = False, selectProj = None):
479          """Populate the list of available projections.          """Populate the list of available projections.
480                    
481          selectCurrent -- if True, select the projection used by          selectCurrent -- if True, select the projection used by
482                           the receiver, otherwise select nothing.                           the receiver, otherwise select nothing.
483            selectProj    -- if set, select the projection found under the
484                             specified name. This overwrites any other
485                             selection estimate.
486          """          """
487    
488          self.availprojs.Clear()          self.availprojs.Clear()
489    
490          #          #
         # We add the current projection to the list first so that  
         # we are sure that it's at index 0. That way we can  
         # set the selection with confidence. The problem is the  
         # the list is automatically sorted when an item is appended  
         # and the index of where it was inserted is not returned.  
         #  
         proj = self.receiver.GetProjection()  
         if proj is not None:  
             self.availprojs.Append(_("%s (current)") % proj.GetName(),  
                                    [proj, None])  
             if selectCurrent:  
                 self.availprojs.SetSelection(0)  
                 self.availprojs.SetFirstItem(0)  
   
         #  
491          # the list can never be empty. there will always be          # the list can never be empty. there will always be
492          # at least this one item          # at least this one item
493          #          #
494          self.availprojs.Append("<None>", (None, None))          self.availprojs.Append("<None>", (None, None))
495    
496          # proj is only None when <None> should be selected          projfile = get_system_proj_files()
         if proj is None and selectCurrent:  
             self.availprojs.SetSelection(0)  
             self.availprojs.SetFirstItem(0)  
   
         projfile = GetSystemProjFiles()  
497          projfile = projfile[0]          projfile = projfile[0]
498          for proj in projfile.GetProjections():          for proj in projfile.GetProjections():
499              self.availprojs.Append(proj.GetName(), [proj, projfile])              self.availprojs.Append(proj.GetName(), [proj, projfile])
500          self.__sysProjFile = projfile          self.__sysProjFile = projfile
501    
502          projfile = GetUserProjFiles()          projfile = get_user_proj_files()
503          projfile = projfile[0]          projfile = projfile[0]
504          for proj in projfile.GetProjections():          for proj in projfile.GetProjections():
505              self.availprojs.Append(proj.GetName(), [proj, projfile])              self.availprojs.Append(proj.GetName(), [proj, projfile])
506          self.__usrProjFile = projfile          self.__usrProjFile = projfile
507    
508          for proj, name, clazz in self.projPanels:          #
509              self.projchoice.Append(name, [clazz, None])          # We add the current projection to the list at last.
510            # Since the list is resorted immediately a following FindString()
511            # determines the index correctly.
512            #
513            proj = self.receiver.GetProjection()
514            if proj is not None:
515                proj_item = _("%s (current)") % proj.GetName()
516                self.availprojs.Append(proj_item, [proj, None])
517                if selectCurrent:
518                    self.availprojs.SetSelection(
519                            self.availprojs.FindString(proj_item)
520                        )
521            else:
522                if selectCurrent:
523                    self.availprojs.SetSelection(
524                            self.availprojs.FindString("<None>")
525                        )
526            if selectProj:
527                self.availprojs.SetSelection(
528                            self.availprojs.FindString(selectProj)
529                        )
530    
531                    
532    
533      def __set_properties(self):      def __set_properties(self):
534    
# Line 523  class ProjFrame(NonModalDialog): Line 545  class ProjFrame(NonModalDialog):
545          self.topBox = wxBoxSizer(wxVERTICAL)          self.topBox = wxBoxSizer(wxVERTICAL)
546          self.sizer_panel = wxBoxSizer(wxVERTICAL)          self.sizer_panel = wxBoxSizer(wxVERTICAL)
547          sizer_6 = wxBoxSizer(wxHORIZONTAL)          sizer_6 = wxBoxSizer(wxHORIZONTAL)
548            self.sizer_mainbttns = wxBoxSizer(wxHORIZONTAL)
549          self.sizer_mainctrls = wxBoxSizer(wxHORIZONTAL)          self.sizer_mainctrls = wxBoxSizer(wxHORIZONTAL)
550          self.sizer_edit = wxStaticBoxSizer(wxStaticBox(self.panel_edit, -1, _("Edit")), wxHORIZONTAL)          self.sizer_edit = wxStaticBoxSizer(wxStaticBox(self.panel_edit, -1, _("Edit")), wxHORIZONTAL)
551          sizer_11 = wxBoxSizer(wxVERTICAL)          sizer_11 = wxBoxSizer(wxVERTICAL)
# Line 541  class ProjFrame(NonModalDialog): Line 564  class ProjFrame(NonModalDialog):
564          grid_sizer_1.Add(20, 20, 0, wxEXPAND, 0)          grid_sizer_1.Add(20, 20, 0, wxEXPAND, 0)
565          grid_sizer_1.Add(self.availprojs, 1, wxALL|wxEXPAND|wxADJUST_MINSIZE, 4)          grid_sizer_1.Add(self.availprojs, 1, wxALL|wxEXPAND|wxADJUST_MINSIZE, 4)
566          grid_sizer_1.Add(sizer_15, 0, wxALL|wxEXPAND, 4)          grid_sizer_1.Add(sizer_15, 0, wxALL|wxEXPAND, 4)
567          grid_sizer_1.Add(self.projfilepath, 0, wxALL|wxADJUST_MINSIZE, 4)          grid_sizer_1.Add(self.projfilepath, 0, wxEXPAND|wxALL|wxADJUST_MINSIZE, 4)
568          grid_sizer_1.AddGrowableRow(1)          grid_sizer_1.AddGrowableRow(1)
569          grid_sizer_1.AddGrowableCol(0)          grid_sizer_1.AddGrowableCol(0)
570    
# Line 549  class ProjFrame(NonModalDialog): Line 572  class ProjFrame(NonModalDialog):
572          sizer_13.Add(self.label_2, 0, wxALL|wxALIGN_CENTER_VERTICAL, 4)          sizer_13.Add(self.label_2, 0, wxALL|wxALIGN_CENTER_VERTICAL, 4)
573          sizer_13.Add(self.projname, 1, wxALL, 4)          sizer_13.Add(self.projname, 1, wxALL, 4)
574          self.sizer_projctrls.Add(sizer_13, 0, wxEXPAND, 0)          self.sizer_projctrls.Add(sizer_13, 0, wxEXPAND, 0)
575          sizer_14.Add(self.label_3, 0, wxALL, 4)          sizer_14.Add(self.label_3, 0, wxALL|wxALIGN_CENTER_VERTICAL, 4)
576          sizer_14.Add(self.projchoice, 1, wxALL|wxEXPAND|wxADJUST_MINSIZE, 4)          sizer_14.Add(self.projchoice, 1, wxALL|wxALIGN_CENTER_VERTICAL, 4)
577          self.sizer_projctrls.Add(sizer_14, 0, wxEXPAND, 0)          self.sizer_projctrls.Add(sizer_14, 0, wxEXPAND, 0)
578          self.sizer_edit.Add(self.sizer_projctrls, 1, wxEXPAND, 0)          self.sizer_edit.Add(self.sizer_projctrls, 1, wxEXPAND, 0)
579          sizer_11.Add(self.button_new, 0, wxALL|wxEXPAND, 4)          sizer_11.Add(self.button_new, 0, wxEXPAND|wxALL, 4)
580          sizer_11.Add(self.button_save, 0, wxALL|wxEXPAND, 4)          sizer_11.Add(self.button_add, 0, wxEXPAND|wxALL, 4)
581          sizer_11.Add(self.button_add, 0, wxALL|wxEXPAND, 4)          sizer_11.Add(20, 20, 0, wxEXPAND, 0)
582            sizer_11.Add(self.button_save, 0, wxEXPAND|wxALL|wxALIGN_BOTTOM, 4)
583          self.sizer_edit.Add(sizer_11, 0, wxALL|wxEXPAND, 4)          self.sizer_edit.Add(sizer_11, 0, wxALL|wxEXPAND, 4)
584    
585          sizer_6.Add(20, 20, 1, wxEXPAND, 0)          sizer_6.Add(self.button_try, 0, wxRIGHT| wxEXPAND, 10)
586          sizer_6.Add(self.button_try, 0, wxALL, 4)          sizer_6.Add(self.button_revert, 0, wxRIGHT| wxEXPAND, 10)
587          sizer_6.Add(20, 20, 1, 0, 0)          sizer_6.Add(self.button_ok, 0, wxRIGHT| wxEXPAND, 10)
588          sizer_6.Add(self.button_revert, 0, wxALL, 4)          sizer_6.Add(self.button_close, 0, wxRIGHT| wxEXPAND, 10)
         sizer_6.Add(20, 20, 1, 0, 0)  
         sizer_6.Add(self.button_ok, 0, wxALL, 4)  
         sizer_6.Add(20, 20, 1, 0, 0)  
         sizer_6.Add(self.button_close, 0, wxALL, 4)  
         sizer_6.Add(20, 20, 1, wxEXPAND, 0)  
589    
590          self.panel_1.SetAutoLayout(1)          self.panel_1.SetAutoLayout(1)
591          self.panel_1.SetSizer(grid_sizer_1)          self.panel_1.SetSizer(grid_sizer_1)
# Line 578  class ProjFrame(NonModalDialog): Line 597  class ProjFrame(NonModalDialog):
597          self.sizer_edit.Fit(self.panel_edit)          self.sizer_edit.Fit(self.panel_edit)
598          self.sizer_edit.SetSizeHints(self.panel_edit)          self.sizer_edit.SetSizeHints(self.panel_edit)
599    
         self.panel_buttons.SetAutoLayout(1)  
         self.panel_buttons.SetSizer(sizer_6)  
         sizer_6.Fit(self.panel_buttons)  
         sizer_6.SetSizeHints(self.panel_buttons)  
   
600          self.sizer_mainctrls.Add(self.panel_1, 0,          self.sizer_mainctrls.Add(self.panel_1, 0,
601              wxALL|wxEXPAND|wxADJUST_MINSIZE, 0)              wxALL|wxEXPAND|wxADJUST_MINSIZE, 0)
602          self.sizer_mainctrls.Add(self.panel_edit, 1,          self.sizer_mainctrls.Add(self.panel_edit, 1,
603              wxALL|wxEXPAND|wxADJUST_MINSIZE, 0)              wxALL|wxEXPAND|wxADJUST_MINSIZE, 0)
604    
605            self.sizer_mainbttns.Add(sizer_6, 0,
606                wxALL|wxEXPAND|wxADJUST_MINSIZE, 10)
607    
608          self.topBox.Add(self.sizer_mainctrls, 1, wxALL|wxEXPAND, 4)          self.topBox.Add(self.sizer_mainctrls, 1, wxALL|wxEXPAND, 4)
609          self.topBox.Add(self.panel_buttons, 0, wxEXPAND, 0)          self.topBox.Add(self.sizer_mainbttns, 0, wxALIGN_RIGHT|wxBOTTOM, 0)
610    
611          self.SetAutoLayout(1)          self.SetAutoLayout(1)
612          self.SetSizer(self.topBox)          self.SetSizer(self.topBox)
# Line 624  class ProjPanel(wxPanel): Line 641  class ProjPanel(wxPanel):
641    
642          panelSizer = wxBoxSizer(wxVERTICAL)          panelSizer = wxBoxSizer(wxVERTICAL)
643    
         if childPanel is not None:  
             panelSizer.Add(childPanel, 0, wxEXPAND, 0)  
               
644          sizer = wxBoxSizer(wxHORIZONTAL)          sizer = wxBoxSizer(wxHORIZONTAL)
645          sizer.Add(wxStaticText(self, -1, _("Ellipsoid:")), 0, wxALL, 4)          sizer.Add(wxStaticText(self, -1, _("Ellipsoid:")), 0,
646          sizer.Add(self.__ellps, 1, wxALL|wxEXPAND|wxADJUST_MINSIZE, 4)                                      wxALL|wxALIGN_CENTER_VERTICAL, 4)
647            sizer.Add(self.__ellps, 1, wxALL|wxALIGN_CENTER_VERTICAL, 4)
648          panelSizer.Add(sizer, 0, wxALL|wxEXPAND, 4)          panelSizer.Add(sizer, 0, wxALL|wxEXPAND, 4)
649    
650            if childPanel is not None:
651                panelSizer.Add(childPanel, 0, wxEXPAND, 0)
652                
653          self.SetAutoLayout(1)          self.SetAutoLayout(1)
654          self.SetSizer(panelSizer)          self.SetSizer(panelSizer)
655          panelSizer.Fit(self)          panelSizer.Fit(self)
# Line 697  class TMPanel(ProjPanel): Line 715  class TMPanel(ProjPanel):
715    
716          self.__latitude = wxTextCtrl(self, ID_TMPANEL_LAT)          self.__latitude = wxTextCtrl(self, ID_TMPANEL_LAT)
717          self.__longitude = wxTextCtrl(self, ID_TMPANEL_LONG)          self.__longitude = wxTextCtrl(self, ID_TMPANEL_LONG)
718            self.__scale = wxTextCtrl(self, ID_TMPANEL_SCALE)
719          self.__falseEast = wxTextCtrl(self, ID_TMPANEL_FASLE_EAST)          self.__falseEast = wxTextCtrl(self, ID_TMPANEL_FASLE_EAST)
720          self.__falseNorth = wxTextCtrl(self, ID_TMPANEL_FALSE_NORTH)          self.__falseNorth = wxTextCtrl(self, ID_TMPANEL_FALSE_NORTH)
         self.__scale = wxTextCtrl(self, ID_TMPANEL_SCALE)  
721    
722          self._DoLayout()          self._DoLayout()
723    
# Line 836  class LCCPanel(ProjPanel): Line 854  class LCCPanel(ProjPanel):
854          sizer.Add(wxStaticText(self, -1,          sizer.Add(wxStaticText(self, -1,
855              _("Latitude of second standard parallel:")))              _("Latitude of second standard parallel:")))
856          sizer.Add(self.__sspLatitude, 0, wxALL, 4)          sizer.Add(self.__sspLatitude, 0, wxALL, 4)
         sizer.Add(wxStaticText(self, -1, _("Latitude of origin:")))  
         sizer.Add(self.__originLat, 0, wxALL, 4)  
857          sizer.Add(wxStaticText(self, -1, _("Central Meridian:")))          sizer.Add(wxStaticText(self, -1, _("Central Meridian:")))
858          sizer.Add(self.__meridian, 0, wxALL, 4)          sizer.Add(self.__meridian, 0, wxALL, 4)
859            sizer.Add(wxStaticText(self, -1, _("Latitude of origin:")))
860            sizer.Add(self.__originLat, 0, wxALL, 4)
861          sizer.Add(wxStaticText(self, -1, _("False Easting:")))          sizer.Add(wxStaticText(self, -1, _("False Easting:")))
862          sizer.Add(self.__falseEast, 0, wxALL, 4)          sizer.Add(self.__falseEast, 0, wxALL, 4)
863          sizer.Add(wxStaticText(self, -1, _("False Northing:")))          sizer.Add(wxStaticText(self, -1, _("False Northing:")))
# Line 888  class GeoPanel(ProjPanel): Line 906  class GeoPanel(ProjPanel):
906      def __init__(self, parent, receiver):      def __init__(self, parent, receiver):
907          ProjPanel.__init__(self, parent)          ProjPanel.__init__(self, parent)
908    
909          self.__choices = [(_("Radians"), "1"),          self.__choices = [(_("Degrees"), "0.017453"),
910                            (_("Degrees"), "0.017453")]                            (_("Radians"), "1")]
911    
912          self.__scale = wxChoice(self, -1)          self.__scale = wxChoice(self, -1)
913          for choice, value in self.__choices:          for choice, value in self.__choices:
# Line 923  class GeoPanel(ProjPanel): Line 941  class GeoPanel(ProjPanel):
941          sizer = wxBoxSizer(wxHORIZONTAL)          sizer = wxBoxSizer(wxHORIZONTAL)
942    
943          sizer.Add(wxStaticText(self, -1, _("Source Data is in: ")),          sizer.Add(wxStaticText(self, -1, _("Source Data is in: ")),
944                    0, wxALL, 4)                    0, wxALL|wxALIGN_CENTER_VERTICAL, 4)
945          sizer.Add(self.__scale, 1, wxEXPAND|wxALL, 4)          sizer.Add(self.__scale, 1, wxEXPAND|wxALL, 4)
946    
947          self.__scale.SetSelection(0)          self.__scale.SetSelection(0)

Legend:
Removed from v.903  
changed lines
  Added in v.1190

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26