# -*- coding: UTF-8 -*-
#
# generated by wxGlade
#

import wx

# begin wxGlade: dependencies
import gettext
# end wxGlade

# begin wxGlade: extracode
# end wxGlade


class wxgGreetingEditorDlg(wx.Dialog):
	def __init__(self, *args, **kwds):
		# begin wxGlade: wxgGreetingEditorDlg.__init__
		kwds["style"] = kwds.get("style", 0) | wx.DEFAULT_DIALOG_STYLE | wx.MAXIMIZE_BOX | wx.MINIMIZE_BOX | wx.RESIZE_BORDER
		wx.Dialog.__init__(self, *args, **kwds)
		self.SetSize((400, 300))
		self._TCTRL_message = wx.TextCtrl(self, wx.ID_ANY, "", style=wx.HSCROLL | wx.TE_MULTILINE)
		self._BTN_save = wx.Button(self, wx.ID_SAVE, "")
		self._BTN_cancel = wx.Button(self, wx.ID_CANCEL, "")

		self.__set_properties()
		self.__do_layout()

		self.Bind(wx.EVT_BUTTON, self._on_save_button_pressed, self._BTN_save)
		# end wxGlade

	def __set_properties(self):
		# begin wxGlade: wxgGreetingEditorDlg.__set_properties
		self.SetTitle(_("Database welcome message editor"))
		self.SetSize((400, 300))
		# end wxGlade

	def __do_layout(self):
		# begin wxGlade: wxgGreetingEditorDlg.__do_layout
		__szr_main = wx.BoxSizer(wx.VERTICAL)
		__szr_buttons = wx.BoxSizer(wx.HORIZONTAL)
		_lbl_instructions = wx.StaticText(self, wx.ID_ANY, _("Below you can edit the database welcome message shown at startup which allows you to identify the database you are connected to.\n\nTo disable that popup leave the message empty."), style=wx.ALIGN_CENTER)
		__szr_main.Add(_lbl_instructions, 0, wx.ALL | wx.EXPAND, 5)
		__szr_main.Add(self._TCTRL_message, 1, wx.ALL | wx.EXPAND, 5)
		__szr_buttons.Add((20, 20), 1, wx.EXPAND, 0)
		__szr_buttons.Add(self._BTN_save, 0, wx.EXPAND | wx.RIGHT, 3)
		__szr_buttons.Add(self._BTN_cancel, 0, wx.EXPAND | wx.LEFT, 3)
		__szr_buttons.Add((20, 20), 1, wx.EXPAND, 0)
		__szr_main.Add(__szr_buttons, 0, wx.ALL | wx.EXPAND, 4)
		self.SetSizer(__szr_main)
		self.Layout()
		self.Centre()
		# end wxGlade

	def _on_save_button_pressed(self, event):  # wxGlade: wxgGreetingEditorDlg.<event_handler>
		print("Event handler '_on_save_button_pressed' not implemented!")
		event.Skip()

# end of class wxgGreetingEditorDlg
