/[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 1167 by jonathan, Thu Jun 12 12:42:34 2003 UTC revision 1542 by bh, Fri Aug 1 16:13:49 2003 UTC
# Line 5  Line 5 
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.
8                                                                                    
9    """Projection dialog"""
10    
11    __version__ = "$Revision$"
12    # $Source$
13    # $Id$
14    
15  import os, sys, math  import os, sys, math
16  from wxPython.wx import *  from wxPython.wx import *
17    
# Line 129  class ProjFrame(NonModalNonParentDialog) Line 135  class ProjFrame(NonModalNonParentDialog)
135    
136          EVT_TEXT(self, ID_PROJ_PROJNAME, self._OnProjName)          EVT_TEXT(self, ID_PROJ_PROJNAME, self._OnProjName)
137    
   
138      def OnApply(self, event):      def OnApply(self, event):
139          self.__SetProjection()          self.__SetProjection()
140          self.haveTried = True          self.haveTried = True
# Line 149  class ProjFrame(NonModalNonParentDialog) Line 154  class ProjFrame(NonModalNonParentDialog)
154              self.receiver.SetProjection(self.originalProjection)              self.receiver.SetProjection(self.originalProjection)
155              self.haveTried = False              self.haveTried = False
156    
   
157      def _OnNew(self, event):      def _OnNew(self, event):
158    
159          # clear all selections          # clear all selections
# Line 373  class ProjFrame(NonModalNonParentDialog) Line 377  class ProjFrame(NonModalNonParentDialog)
377              if proj is None:              if proj is None:
378                  # user selected <None>                  # user selected <None>
379                  self.projname.Clear()                  self.projname.Clear()
380                                    self.projfilepath.SetLabel(_("Projection File: "))
381              else:              else:
382                            
383                  if projfile is not None:                  if projfile is not None:
384                      self.projfilepath.SetLabel(projfile.GetFilename())                      self.projfilepath.SetLabel(_("Projection File: ") +
385                            os.path.basename(projfile.GetFilename()))
386                  else:                  else:
387                      # only None if the currently used projection is selected                      # only None if the currently used projection is selected
388                      self.projfilepath.SetLabel("")                      self.projfilepath.SetLabel(_("Projection File: "))
389    
390                  self.projname.SetValue(proj.GetName())                  self.projname.SetValue(proj.GetName())
391    
# Line 565  class ProjFrame(NonModalNonParentDialog) Line 570  class ProjFrame(NonModalNonParentDialog)
570          grid_sizer_1.Add(20, 20, 0, wxEXPAND, 0)          grid_sizer_1.Add(20, 20, 0, wxEXPAND, 0)
571          grid_sizer_1.Add(self.availprojs, 1, wxALL|wxEXPAND|wxADJUST_MINSIZE, 4)          grid_sizer_1.Add(self.availprojs, 1, wxALL|wxEXPAND|wxADJUST_MINSIZE, 4)
572          grid_sizer_1.Add(sizer_15, 0, wxALL|wxEXPAND, 4)          grid_sizer_1.Add(sizer_15, 0, wxALL|wxEXPAND, 4)
573          grid_sizer_1.Add(self.projfilepath, 0, wxALL|wxADJUST_MINSIZE, 4)          grid_sizer_1.Add(self.projfilepath, 0, wxEXPAND|wxALL|wxADJUST_MINSIZE, 4)
574          grid_sizer_1.AddGrowableRow(1)          grid_sizer_1.AddGrowableRow(1)
575          grid_sizer_1.AddGrowableCol(0)          grid_sizer_1.AddGrowableCol(0)
576    

Legend:
Removed from v.1167  
changed lines
  Added in v.1542

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26