#!/usr/local/bin/python2.7
# -*- coding: ISO-8859-15 -*-
#
# generated by wxGlade c1d4ec279e8e+ on Mon Oct 13 12:27:00 2014
#

import wx

# begin wxGlade: dependencies
import gettext
# end wxGlade

# begin wxGlade: extracode
import config
import os

_icon_path = os.path.join(config.icons_path, 'icon.xpm')
# end wxGlade


class wxGladePreferencesUI(wx.Dialog):
    def __init__(self, *args, **kwds):
        # begin wxGlade: wxGladePreferencesUI.__init__
        kwds["style"] = wx.DEFAULT_DIALOG_STYLE
        wx.Dialog.__init__(self, *args, **kwds)
        self.notebook_1 = wx.Notebook(self, wx.ID_ANY)
        self.notebook_1_pane_1 = wx.Panel(self.notebook_1, wx.ID_ANY)
        self.use_menu_icons = wx.CheckBox(self.notebook_1_pane_1, wx.ID_ANY, _("Use icons in menu items"))
        self.frame_tool_win = wx.CheckBox(self.notebook_1_pane_1, wx.ID_ANY, _("Show properties and tree windows as small frames"))
        self.show_progress = wx.CheckBox(self.notebook_1_pane_1, wx.ID_ANY, _("Show progress dialog when loading wxg files"))
        self.remember_geometry = wx.CheckBox(self.notebook_1_pane_1, wx.ID_ANY, _("Remember position and size of wxGlade windows"))
        self.show_sizer_handle = wx.CheckBox(self.notebook_1_pane_1, wx.ID_ANY, _("Show \"handles\" of sizers"))
        self.use_kde_dialogs = wx.CheckBox(self.notebook_1_pane_1, wx.ID_ANY, _("Use native file dialogs on KDE"))
        self.show_completion = wx.CheckBox(self.notebook_1_pane_1, wx.ID_ANY, _("Show success message for code generation"))
        self.open_save_path = wx.TextCtrl(self.notebook_1_pane_1, wx.ID_ANY, "")
        self.codegen_path = wx.TextCtrl(self.notebook_1_pane_1, wx.ID_ANY, "")
        self.number_history = wx.SpinCtrl(self.notebook_1_pane_1, wx.ID_ANY, "4", min=0, max=100)
        self.buttons_per_row = wx.SpinCtrl(self.notebook_1_pane_1, wx.ID_ANY, "5", min=1, max=100)
        self.notebook_1_pane_2 = wx.Panel(self.notebook_1, wx.ID_ANY)
        self.use_dialog_units = wx.CheckBox(self.notebook_1_pane_2, wx.ID_ANY, _("Use dialog units by default for size properties"))
        self.codegen_backup = wx.CheckBox(self.notebook_1_pane_2, wx.ID_ANY, _("Create backup files for generated source"))
        self.allow_duplicate_names = wx.CheckBox(self.notebook_1_pane_2, wx.ID_ANY, _("Allow duplicate widget names"))
        self.default_border = wx.CheckBox(self.notebook_1_pane_2, wx.ID_ANY, _("Default border width for widgets"))
        self.default_border_size = wx.SpinCtrl(self.notebook_1_pane_2, wx.ID_ANY, "", min=0, max=20)
        self.log_debug_info = wx.CheckBox(self.notebook_1_pane_2, wx.ID_ANY, _("Log additional debug information"))
        self.autosave = wx.CheckBox(self.notebook_1_pane_2, wx.ID_ANY, _("Auto save wxg files every "))
        self.autosave_delay = wx.SpinCtrl(self.notebook_1_pane_2, wx.ID_ANY, "120", min=30, max=300)
        self.write_timestamp = wx.CheckBox(self.notebook_1_pane_2, wx.ID_ANY, _("Insert timestamp on generated source files"))
        self.write_generated_from = wx.CheckBox(self.notebook_1_pane_2, wx.ID_ANY, _("Insert .wxg file name on generated source files"))
        self.wxg_backup = wx.CheckBox(self.notebook_1_pane_2, wx.ID_ANY, _("Create backup wxg files"))
        self.backup_suffix = wx.RadioBox(self.notebook_1_pane_2, wx.ID_ANY, _("Backup options"), choices=[_("append ~ to filename"), _("append .bak to filename")], majorDimension=2, style=wx.RA_SPECIFY_COLS)
        self.local_widget_path = wx.TextCtrl(self.notebook_1_pane_2, wx.ID_ANY, "")
        self.choose_widget_path = wx.Button(self.notebook_1_pane_2, wx.ID_ANY, _("..."), style=wx.BU_EXACTFIT)
        self.sizer_6_staticbox = wx.StaticBox(self.notebook_1_pane_2, wx.ID_ANY, _("Local widget path"))
        self.ok = wx.Button(self, wx.ID_OK, "")
        self.cancel = wx.Button(self, wx.ID_CANCEL, "")

        self.__set_properties()
        self.__do_layout()
        # end wxGlade

    def __set_properties(self):
        # begin wxGlade: wxGladePreferencesUI.__set_properties
        self.SetTitle(_("wxGlade: preferences"))
        _icon = wx.EmptyIcon()
        _icon.CopyFromBitmap(wx.Bitmap(_icon_path, wx.BITMAP_TYPE_ANY))
        self.SetIcon(_icon)
        self.use_menu_icons.SetValue(1)
        self.frame_tool_win.SetValue(1)
        self.show_progress.SetValue(1)
        self.remember_geometry.SetValue(1)
        self.show_sizer_handle.SetValue(1)
        self.use_kde_dialogs.SetValue(1)
        self.show_completion.SetValue(1)
        self.open_save_path.SetMinSize((196, -1))
        self.codegen_path.SetMinSize((196, -1))
        self.number_history.SetMinSize((196, -1))
        self.buttons_per_row.SetMinSize((196, -1))
        self.codegen_backup.SetValue(1)
        self.allow_duplicate_names.Hide()
        self.log_debug_info.SetToolTipString(_("Write additional debug information to the log file."))
        self.write_timestamp.SetValue(1)
        self.wxg_backup.SetValue(1)
        self.backup_suffix.SetSelection(0)
        self.ok.SetDefault()
        # end wxGlade

    def __do_layout(self):
        # begin wxGlade: wxGladePreferencesUI.__do_layout
        sizer_1 = wx.BoxSizer(wx.VERTICAL)
        sizer_2 = wx.BoxSizer(wx.HORIZONTAL)
        sizer_5 = wx.BoxSizer(wx.VERTICAL)
        self.sizer_6_staticbox.Lower()
        sizer_6 = wx.StaticBoxSizer(self.sizer_6_staticbox, wx.HORIZONTAL)
        sizer_7_copy = wx.BoxSizer(wx.HORIZONTAL)
        sizer_7 = wx.BoxSizer(wx.HORIZONTAL)
        sizer_3 = wx.BoxSizer(wx.VERTICAL)
        sizer_4 = wx.FlexGridSizer(4, 2, 0, 0)
        sizer_3.Add(self.use_menu_icons, 0, wx.ALL | wx.EXPAND, 5)
        sizer_3.Add(self.frame_tool_win, 0, wx.ALL | wx.EXPAND, 5)
        sizer_3.Add(self.show_progress, 0, wx.ALL | wx.EXPAND, 5)
        sizer_3.Add(self.remember_geometry, 0, wx.ALL | wx.EXPAND, 5)
        sizer_3.Add(self.show_sizer_handle, 0, wx.ALL | wx.EXPAND, 5)
        sizer_3.Add(self.use_kde_dialogs, 0, wx.ALL | wx.EXPAND, 5)
        sizer_3.Add(self.show_completion, 0, wx.ALL | wx.EXPAND, 5)
        label_1 = wx.StaticText(self.notebook_1_pane_1, wx.ID_ANY, _("Initial path for \nfile opening/saving dialogs:"))
        sizer_4.Add(label_1, 0, wx.ALL, 5)
        sizer_4.Add(self.open_save_path, 1, wx.ALIGN_CENTER_VERTICAL | wx.ALL, 5)
        label_2_copy = wx.StaticText(self.notebook_1_pane_1, wx.ID_ANY, _("Initial path for \ncode generation file dialogs:"))
        sizer_4.Add(label_2_copy, 0, wx.ALL, 5)
        sizer_4.Add(self.codegen_path, 1, wx.ALIGN_CENTER_VERTICAL | wx.ALL, 5)
        label_2 = wx.StaticText(self.notebook_1_pane_1, wx.ID_ANY, _("Number of items in file history"))
        sizer_4.Add(label_2, 0, wx.ALL, 5)
        sizer_4.Add(self.number_history, 1, wx.ALIGN_CENTER_VERTICAL | wx.ALL, 5)
        label_2_copy_1 = wx.StaticText(self.notebook_1_pane_1, wx.ID_ANY, _("Number of buttons per row\nin the main palette"))
        sizer_4.Add(label_2_copy_1, 0, wx.ALL, 5)
        sizer_4.Add(self.buttons_per_row, 1, wx.ALIGN_CENTER_VERTICAL | wx.ALL, 5)
        sizer_4.AddGrowableCol(1)
        sizer_3.Add(sizer_4, 0, wx.EXPAND, 3)
        self.notebook_1_pane_1.SetSizer(sizer_3)
        sizer_5.Add(self.use_dialog_units, 0, wx.ALL | wx.EXPAND, 5)
        sizer_5.Add(self.codegen_backup, 0, wx.ALL | wx.EXPAND, 5)
        sizer_5.Add(self.allow_duplicate_names, 0, wx.ALL | wx.EXPAND, 5)
        sizer_7.Add(self.default_border, 0, wx.ALIGN_CENTER_VERTICAL | wx.ALL, 5)
        sizer_7.Add(self.default_border_size, 0, wx.ALL, 5)
        sizer_5.Add(sizer_7, 0, wx.EXPAND, 0)
        sizer_5.Add(self.log_debug_info, 0, wx.ALL | wx.EXPAND, 5)
        sizer_7_copy.Add(self.autosave, 0, wx.ALIGN_CENTER_VERTICAL | wx.BOTTOM | wx.LEFT | wx.TOP, 5)
        sizer_7_copy.Add(self.autosave_delay, 0, wx.ALL, 5)
        label_3 = wx.StaticText(self.notebook_1_pane_2, wx.ID_ANY, _(" seconds"))
        sizer_7_copy.Add(label_3, 0, wx.ALIGN_CENTER_VERTICAL | wx.BOTTOM | wx.FIXED_MINSIZE | wx.TOP, 5)
        sizer_5.Add(sizer_7_copy, 0, wx.EXPAND, 0)
        sizer_5.Add(self.write_timestamp, 0, wx.ALL | wx.EXPAND, 5)
        sizer_5.Add(self.write_generated_from, 0, wx.ALL | wx.EXPAND, 5)
        sizer_5.Add(self.wxg_backup, 0, wx.ALL | wx.EXPAND, 5)
        sizer_5.Add(self.backup_suffix, 0, wx.ALL | wx.EXPAND, 5)
        sizer_6.Add(self.local_widget_path, 1, wx.ALL, 3)
        sizer_6.Add(self.choose_widget_path, 0, wx.ALIGN_CENTER_VERTICAL | wx.ALL, 3)
        sizer_5.Add(sizer_6, 0, wx.ALL | wx.EXPAND, 5)
        self.notebook_1_pane_2.SetSizer(sizer_5)
        self.notebook_1.AddPage(self.notebook_1_pane_1, _("Interface"))
        self.notebook_1.AddPage(self.notebook_1_pane_2, _("Other"))
        sizer_1.Add(self.notebook_1, 1, wx.ALL | wx.EXPAND, 5)
        sizer_2.Add(self.ok, 0, wx.ALL, 5)
        sizer_2.Add(self.cancel, 0, wx.ALL, 5)
        sizer_1.Add(sizer_2, 0, wx.ALIGN_RIGHT | wx.ALL, 10)
        self.SetSizer(sizer_1)
        sizer_1.Fit(self)
        self.Layout()
        self.Centre()
        # end wxGlade

# end of class wxGladePreferencesUI
