22 |
|
|
23 |
from Thuban.Model.resource import get_user_proj_file, get_system_proj_file, \ |
from Thuban.Model.resource import get_user_proj_file, get_system_proj_file, \ |
24 |
read_proj_file, write_proj_file, \ |
read_proj_file, write_proj_file, \ |
25 |
DEFAULT_PROJ_FILE, EPSG_PROJ_FILE |
DEFAULT_PROJ_FILE, EPSG_PROJ_FILE, \ |
26 |
|
EPSG_DEPRECATED_PROJ_FILE |
27 |
from Thuban.UI.dialogs import NonModalNonParentDialog |
from Thuban.UI.dialogs import NonModalNonParentDialog |
28 |
|
|
29 |
from common import ThubanBeginBusyCursor, ThubanEndBusyCursor |
from common import ThubanBeginBusyCursor, ThubanEndBusyCursor |
118 |
EVT_BUTTON(self, ID_PROJ_REMOVE, self._OnRemove) |
EVT_BUTTON(self, ID_PROJ_REMOVE, self._OnRemove) |
119 |
buttons.Add(self.button_remove, 1, wxALL|wxEXPAND, 4) |
buttons.Add(self.button_remove, 1, wxALL|wxEXPAND, 4) |
120 |
|
|
121 |
self.check_epsg = wxCheckBox(self, -1, _("Show EPSG")) |
buttons.Add(20, 20, 0, wxEXPAND, 0) |
122 |
|
label = wxStaticText(self, -1, _("Show EPSG:")) |
123 |
|
buttons.Add(label, 0, wxLEFT|wxRIGHT|wxTOP, 4) |
124 |
|
self.check_epsg = wxCheckBox(self, -1, _("Normal")) |
125 |
EVT_CHECKBOX(self, self.check_epsg.GetId(), self._OnShowEPSG) |
EVT_CHECKBOX(self, self.check_epsg.GetId(), self._OnShowEPSG) |
126 |
buttons.Add(self.check_epsg, 1, wxALL|wxEXPAND, 4) |
buttons.Add(self.check_epsg, 1, wxALL|wxEXPAND, 4) |
127 |
|
self.check_epsg_depr = wxCheckBox(self, -1, _("Deprecated")) |
128 |
|
EVT_CHECKBOX(self, self.check_epsg_depr.GetId(), self._OnShowEPSG) |
129 |
|
buttons.Add(self.check_epsg_depr, 1, wxALL|wxEXPAND, 4) |
130 |
|
|
131 |
# The file path |
# The file path |
132 |
self.projfilepath = wxStaticText(self, -1, "") |
self.projfilepath = wxStaticText(self, -1, "") |
368 |
If the button is checked add the EPSG_PROJ_FILE to the list of |
If the button is checked add the EPSG_PROJ_FILE to the list of |
369 |
projfiles shown by the projection list. Otherwise remove it |
projfiles shown by the projection list. Otherwise remove it |
370 |
""" |
""" |
371 |
|
proj_files = [self.load_user_proj(), |
372 |
|
self.load_system_proj(DEFAULT_PROJ_FILE)] |
373 |
if self.check_epsg.IsChecked(): |
if self.check_epsg.IsChecked(): |
374 |
proj_files = [self.load_user_proj(), |
proj_files.append(self.load_system_proj(EPSG_PROJ_FILE)) |
375 |
self.load_system_proj(DEFAULT_PROJ_FILE), |
if self.check_epsg_depr.IsChecked(): |
376 |
self.load_system_proj(EPSG_PROJ_FILE)] |
proj_files.append(self.load_system_proj(EPSG_DEPRECATED_PROJ_FILE)) |
|
else: |
|
|
proj_files = [self.load_user_proj(), |
|
|
self.load_system_proj(DEFAULT_PROJ_FILE)] |
|
377 |
self.projection_list.SetProjFiles(proj_files) |
self.projection_list.SetProjFiles(proj_files) |
378 |
|
|
379 |
def _OnProjName(self, event): |
def _OnProjName(self, event): |