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 |
|
|
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 |
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 |
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 |
|
|
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 |
|
|