1 |
# Copyright (c) 2001, 2003, 2004 by Intevation GmbH vim:encoding=latin-1: |
# Copyright (c) 2001, 2003, 2004 by Intevation GmbH vim:encoding=iso-8859-15: |
2 |
# Authors: |
# Authors: |
3 |
# Martin Müller <[email protected]> |
# Martin Müller <[email protected]> |
4 |
# Bernhard Herzog <[email protected]> |
# Bernhard Herzog <[email protected]> |
163 |
self.Layout() |
self.Layout() |
164 |
|
|
165 |
def end_dialog(self, result): |
def end_dialog(self, result): |
166 |
"""If the dialog is closed with OK, set chosen layer as layer |
"""If the dialog is closed with OK, set chosen layer as layer |
167 |
to be opened. |
to be opened. |
168 |
""" |
""" |
169 |
self.result = result |
self.result = result |
231 |
# The button box between the connections list box and the table |
# The button box between the connections list box and the table |
232 |
# list box |
# list box |
233 |
buttons = wx.FlexGridSizer(3, 1, 0, 0) |
buttons = wx.FlexGridSizer(3, 1, 0, 0) |
234 |
buttons.Add(20, 80, 0, wx.EXPAND, 0) |
buttons.Add((20, 80), 0, wx.EXPAND, 0) |
235 |
retrieve_button = wx.Button(self, ID_DBCHOOSE_RETRIEVE, _("Retrieve")) |
retrieve_button = wx.Button(self, ID_DBCHOOSE_RETRIEVE, _("Retrieve")) |
236 |
wx.EVT_BUTTON(self, ID_DBCHOOSE_RETRIEVE, self.OnRetrieve) |
wx.EVT_BUTTON(self, ID_DBCHOOSE_RETRIEVE, self.OnRetrieve) |
237 |
buttons.Add(retrieve_button, 0, wx.ALL |
buttons.Add(retrieve_button, 0, wx.ALL |
238 |
|wx.ALIGN_CENTER_HORIZONTAL|wx.ALIGN_CENTER_VERTICAL, 4) |
|wx.ALIGN_CENTER_HORIZONTAL|wx.ALIGN_CENTER_VERTICAL, 4) |
239 |
buttons.Add(20, 80, 0, wx.EXPAND, 0) |
buttons.Add((20, 80), 0, wx.EXPAND, 0) |
240 |
main_sizer.Add(buttons, 0, wx.EXPAND, 0) |
main_sizer.Add(buttons, 0, wx.EXPAND, 0) |
241 |
|
|
242 |
# The list box with the tables |
# The list box with the tables |
276 |
|
|
277 |
|
|
278 |
def GetTable(self): |
def GetTable(self): |
279 |
"""Return the chosen DB connection, the table to be opened, |
"""Return the chosen DB connection, the table to be opened, |
280 |
the connection string for ogr and the ID column. |
the connection string for ogr and the ID column. |
281 |
""" |
""" |
282 |
i = self.lb_tables.GetSelection() |
i = self.lb_tables.GetSelection() |
366 |
# The standard button box at the bottom of the dialog |
# The standard button box at the bottom of the dialog |
367 |
buttons = wx.FlexGridSizer(1, 2, 0, 0) |
buttons = wx.FlexGridSizer(1, 2, 0, 0) |
368 |
ok_button = wx.Button(self, ID_DBCHOOSE_OK, _("OK")) |
ok_button = wx.Button(self, ID_DBCHOOSE_OK, _("OK")) |
369 |
wx.EVT_BUTTON(self, ID_DBCHOOSE_OK, self.OnOK) |
self.Bind(wx.EVT_BUTTON, self.OnOK, ok_button) |
370 |
buttons.Add(ok_button, 0, wx.ALL|wx.ALIGN_RIGHT, 4) |
buttons.Add(ok_button, 0, wx.ALL|wx.ALIGN_RIGHT, 4) |
371 |
cancel_button = wx.Button(self, ID_DBCHOOSE_CANCEL, _("Cancel")) |
cancel_button = wx.Button(self, ID_DBCHOOSE_CANCEL, _("Cancel")) |
372 |
wx.EVT_BUTTON(self, ID_DBCHOOSE_CANCEL, self.OnCancel) |
self.Bind(wx.EVT_BUTTON, self.OnCancel, cancel_button) |
373 |
buttons.Add(cancel_button, 0, wx.ALL, 4) |
buttons.Add(cancel_button, 0, wx.ALL, 4) |
374 |
top.Add(buttons, 1, wx.ALL|wx.ALIGN_CENTER_HORIZONTAL, 4) |
top.Add(buttons, 1, wx.ALL|wx.ALIGN_CENTER_HORIZONTAL, 4) |
375 |
|
|