Example #1
0
    def __init__(self, parent):
        wx.Frame.__init__(self,
                          parent,
                          id=wx.ID_ANY,
                          title=_(u"Batch Processing"),
                          pos=wx.DefaultPosition,
                          size=wx.Size(900, 600),
                          style=wx.DEFAULT_FRAME_STYLE | wx.TAB_TRAVERSAL)

        self.SetSizeHints(wx.Size(900, 500), wx.DefaultSize)

        bSizer1 = wx.BoxSizer(wx.VERTICAL)

        self.m_panelMain = wx.Panel(self, wx.ID_ANY, wx.DefaultPosition,
                                    wx.DefaultSize, wx.TAB_TRAVERSAL)
        fgSizer1 = wx.FlexGridSizer(0, 1, 0, 0)
        fgSizer1.AddGrowableCol(0)
        fgSizer1.AddGrowableRow(0)
        fgSizer1.SetFlexibleDirection(wx.BOTH)
        fgSizer1.SetNonFlexibleGrowMode(wx.FLEX_GROWMODE_SPECIFIED)

        self.m_items = BatchList(self.m_panelMain, wx.ID_ANY,
                                 wx.DefaultPosition, wx.DefaultSize,
                                 wx.LC_ICON)
        fgSizer1.Add(self.m_items, 0, wx.ALL | wx.EXPAND, 5)

        self.m_panelSettings = wx.Panel(self.m_panelMain, wx.ID_ANY,
                                        wx.DefaultPosition, wx.DefaultSize,
                                        wx.TAB_TRAVERSAL)
        fgSizer2 = wx.FlexGridSizer(0, 1, 0, 0)
        fgSizer2.AddGrowableCol(0)
        fgSizer2.SetFlexibleDirection(wx.BOTH)
        fgSizer2.SetNonFlexibleGrowMode(wx.FLEX_GROWMODE_SPECIFIED)

        fgSizer3 = wx.FlexGridSizer(1, 0, 0, 0)
        fgSizer3.AddGrowableCol(5)
        fgSizer3.AddGrowableRow(0)
        fgSizer3.SetFlexibleDirection(wx.BOTH)
        fgSizer3.SetNonFlexibleGrowMode(wx.FLEX_GROWMODE_SPECIFIED)

        self.m_buttonAdd = wx.Button(self.m_panelSettings, wx.ID_ANY,
                                     _(u"Add"), wx.DefaultPosition,
                                     wx.DefaultSize, 0)

        self.m_buttonAdd.SetBitmap(
            wx.ArtProvider.GetBitmap(wx.ART_NORMAL_FILE, wx.ART_BUTTON))
        fgSizer3.Add(self.m_buttonAdd, 0, wx.ALL | wx.EXPAND, 5)

        self.m_buttonRemove = wx.Button(self.m_panelSettings, wx.ID_ANY,
                                        _(u"Remove"), wx.DefaultPosition,
                                        wx.DefaultSize, 0)

        self.m_buttonRemove.SetBitmap(
            wx.ArtProvider.GetBitmap(wx.ART_DELETE, wx.ART_BUTTON))
        self.m_buttonRemove.Enable(False)

        fgSizer3.Add(self.m_buttonRemove, 0, wx.ALL | wx.EXPAND, 5)

        self.m_buttonStreamSel = wx.Button(self.m_panelSettings, wx.ID_ANY,
                                           _(u"Select stream"),
                                           wx.DefaultPosition, wx.DefaultSize,
                                           0)

        self.m_buttonStreamSel.SetBitmap(
            wx.ArtProvider.GetBitmap(wx.ART_HELP_SETTINGS, wx.ART_BUTTON))
        self.m_buttonStreamSel.Enable(False)

        fgSizer3.Add(self.m_buttonStreamSel, 0, wx.ALL | wx.EXPAND, 5)

        self.m_buttonOutSel = wx.Button(self.m_panelSettings, wx.ID_ANY,
                                        _(u"Select output"),
                                        wx.DefaultPosition, wx.DefaultSize, 0)

        self.m_buttonOutSel.SetBitmap(
            wx.ArtProvider.GetBitmap(wx.ART_HELP_SETTINGS, wx.ART_BUTTON))
        self.m_buttonOutSel.Enable(False)

        fgSizer3.Add(self.m_buttonOutSel, 0, wx.ALL | wx.EXPAND, 5)

        self.m_buttonAutoSort = wx.Button(self.m_panelSettings, wx.ID_ANY,
                                          _(u"Auto sort"), wx.DefaultPosition,
                                          wx.DefaultSize, 0)
        self.m_buttonAutoSort.Enable(False)

        fgSizer3.Add(self.m_buttonAutoSort, 0, wx.ALL | wx.EXPAND, 5)

        self.m_panelAutoDrop = wx.Panel(self.m_panelSettings, wx.ID_ANY,
                                        wx.DefaultPosition, wx.DefaultSize,
                                        wx.BORDER_THEME | wx.TAB_TRAVERSAL)
        self.m_panelAutoDrop.SetBackgroundColour(
            wx.SystemSettings.GetColour(wx.SYS_COLOUR_WINDOW))

        fgSizer11 = wx.FlexGridSizer(0, 2, 0, 0)
        fgSizer11.AddGrowableCol(0)
        fgSizer11.AddGrowableRow(0)
        fgSizer11.SetFlexibleDirection(wx.BOTH)
        fgSizer11.SetNonFlexibleGrowMode(wx.FLEX_GROWMODE_SPECIFIED)

        self.m_staticText1 = wx.StaticText(
            self.m_panelAutoDrop, wx.ID_ANY,
            _(u"Drop files here to add sorted"), wx.DefaultPosition,
            wx.DefaultSize, wx.ALIGN_CENTER_HORIZONTAL | wx.ST_ELLIPSIZE_END)
        self.m_staticText1.Wrap(-1)

        fgSizer11.Add(self.m_staticText1, 0, wx.ALL | wx.EXPAND, 5)

        self.m_panelAutoDrop.SetSizer(fgSizer11)
        self.m_panelAutoDrop.Layout()
        fgSizer11.Fit(self.m_panelAutoDrop)
        fgSizer3.Add(self.m_panelAutoDrop, 1, wx.EXPAND | wx.ALL, 5)

        fgSizer2.Add(fgSizer3, 1, wx.EXPAND, 5)

        self.m_staticline1 = wx.StaticLine(self.m_panelSettings, wx.ID_ANY,
                                           wx.DefaultPosition, wx.DefaultSize,
                                           wx.LI_HORIZONTAL)
        fgSizer2.Add(self.m_staticline1, 0, wx.EXPAND | wx.ALL, 5)

        fgSizer4 = wx.FlexGridSizer(0, 4, 0, 0)
        fgSizer4.AddGrowableCol(2)
        fgSizer4.SetFlexibleDirection(wx.BOTH)
        fgSizer4.SetNonFlexibleGrowMode(wx.FLEX_GROWMODE_SPECIFIED)

        self.m_textLang = wx.StaticText(self.m_panelSettings, wx.ID_ANY,
                                        _(u"Language:"), wx.DefaultPosition,
                                        wx.DefaultSize, 0)
        self.m_textLang.Wrap(-1)

        fgSizer4.Add(
            self.m_textLang, 0, wx.ALIGN_RIGHT | wx.ALIGN_CENTER_VERTICAL
            | wx.TOP | wx.RIGHT | wx.LEFT, 5)

        fgSizer4.Add((0, 0), 1, wx.EXPAND, 5)

        m_choiceLangChoices = []
        self.m_choiceLang = ChoiceLang(self.m_panelSettings, wx.ID_ANY,
                                       wx.DefaultPosition, wx.DefaultSize,
                                       m_choiceLangChoices, 0)
        self.m_choiceLang.SetSelection(0)
        self.m_choiceLang.Enable(False)

        fgSizer4.Add(
            self.m_choiceLang, 0,
            wx.ALIGN_CENTER_VERTICAL | wx.EXPAND | wx.TOP | wx.RIGHT | wx.LEFT,
            5)

        fgSizer4.Add((0, 0), 1, wx.EXPAND, 5)

        self.m_textMaxDistLabel = wx.StaticText(self.m_panelSettings,
                                                wx.ID_ANY,
                                                _(u"Max adjustment:"),
                                                wx.DefaultPosition,
                                                wx.DefaultSize, 0)
        self.m_textMaxDistLabel.Wrap(-1)

        fgSizer4.Add(
            self.m_textMaxDistLabel, 0, wx.ALIGN_RIGHT
            | wx.ALIGN_CENTER_VERTICAL | wx.TOP | wx.RIGHT | wx.LEFT, 5)

        self.m_buttonMaxDistInfo = PopupInfoButton(
            self.m_panelSettings, wx.ID_ANY, wx.NullBitmap, wx.DefaultPosition,
            wx.DefaultSize, wx.BU_AUTODRAW | 0 | wx.BORDER_NONE)

        self.m_buttonMaxDistInfo.SetBitmap(
            wx.ArtProvider.GetBitmap(wx.ART_TIP, wx.ART_BUTTON))
        fgSizer4.Add(self.m_buttonMaxDistInfo, 0, wx.ALIGN_CENTER_VERTICAL, 5)

        self.m_sliderMaxDist = wx.Slider(self.m_panelSettings, wx.ID_ANY, 30,
                                         5, 180, wx.DefaultPosition,
                                         wx.Size(-1, -1), wx.SL_HORIZONTAL)
        fgSizer4.Add(
            self.m_sliderMaxDist, 0,
            wx.ALIGN_CENTER_VERTICAL | wx.EXPAND | wx.TOP | wx.RIGHT | wx.LEFT,
            5)

        self.m_textMaxDist = wx.StaticText(self.m_panelSettings, wx.ID_ANY,
                                           _(u"999 min"), wx.DefaultPosition,
                                           wx.DefaultSize, wx.ST_NO_AUTORESIZE)
        self.m_textMaxDist.Wrap(-1)

        fgSizer4.Add(
            self.m_textMaxDist, 0, wx.ALIGN_CENTER_HORIZONTAL
            | wx.ALIGN_CENTER_VERTICAL | wx.TOP | wx.RIGHT | wx.LEFT, 5)

        self.m_textEffortLabel = wx.StaticText(self.m_panelSettings, wx.ID_ANY,
                                               _(u"Effort:"),
                                               wx.DefaultPosition,
                                               wx.DefaultSize, 0)
        self.m_textEffortLabel.Wrap(-1)

        fgSizer4.Add(self.m_textEffortLabel, 0,
                     wx.ALIGN_RIGHT | wx.ALIGN_CENTER_VERTICAL | wx.ALL, 5)

        self.m_buttonEffortInfo = PopupInfoButton(
            self.m_panelSettings, wx.ID_ANY, wx.NullBitmap, wx.DefaultPosition,
            wx.DefaultSize, wx.BU_AUTODRAW | 0 | wx.BORDER_NONE)

        self.m_buttonEffortInfo.SetBitmap(
            wx.ArtProvider.GetBitmap(wx.ART_TIP, wx.ART_BUTTON))
        fgSizer4.Add(self.m_buttonEffortInfo, 0, wx.ALIGN_CENTER_VERTICAL, 5)

        self.m_sliderEffort = wx.Slider(self.m_panelSettings, wx.ID_ANY, 50,
                                        0, 100, wx.DefaultPosition,
                                        wx.Size(-1, -1), wx.SL_HORIZONTAL)
        fgSizer4.Add(self.m_sliderEffort, 0,
                     wx.ALIGN_CENTER_VERTICAL | wx.EXPAND | wx.ALL, 5)

        self.m_textEffort = wx.StaticText(self.m_panelSettings, wx.ID_ANY,
                                          _(u"0.50"), wx.DefaultPosition,
                                          wx.DefaultSize, wx.ST_NO_AUTORESIZE)
        self.m_textEffort.Wrap(-1)

        fgSizer4.Add(self.m_textEffort, 0, wx.ALL | wx.ALIGN_CENTER_VERTICAL,
                     5)

        fgSizer2.Add(fgSizer4, 1, wx.EXPAND, 5)

        self.m_panelSettings.SetSizer(fgSizer2)
        self.m_panelSettings.Layout()
        fgSizer2.Fit(self.m_panelSettings)
        fgSizer1.Add(self.m_panelSettings, 0, wx.EXPAND, 5)

        self.m_panelProgress = wx.Panel(self.m_panelMain, wx.ID_ANY,
                                        wx.DefaultPosition, wx.DefaultSize,
                                        wx.TAB_TRAVERSAL)
        self.m_panelProgress.Hide()

        fgSizer5 = wx.FlexGridSizer(0, 1, 0, 0)
        fgSizer5.AddGrowableCol(0)
        fgSizer5.SetFlexibleDirection(wx.BOTH)
        fgSizer5.SetNonFlexibleGrowMode(wx.FLEX_GROWMODE_SPECIFIED)

        self.m_panelSyncDone = wx.Panel(self.m_panelProgress, wx.ID_ANY,
                                        wx.DefaultPosition, wx.DefaultSize,
                                        wx.TAB_TRAVERSAL)
        self.m_panelSyncDone.Hide()

        fgSizer6 = wx.FlexGridSizer(0, 1, 0, 0)
        fgSizer6.AddGrowableCol(0)
        fgSizer6.SetFlexibleDirection(wx.BOTH)
        fgSizer6.SetNonFlexibleGrowMode(wx.FLEX_GROWMODE_SPECIFIED)

        fgSizer7 = wx.FlexGridSizer(1, 0, 0, 0)
        fgSizer7.SetFlexibleDirection(wx.BOTH)
        fgSizer7.SetNonFlexibleGrowMode(wx.FLEX_GROWMODE_SPECIFIED)

        self.m_buttonEditFailed = wx.Button(self.m_panelSyncDone, wx.ID_ANY,
                                            _(u"Edit failed tasks"),
                                            wx.DefaultPosition, wx.DefaultSize,
                                            0)
        fgSizer7.Add(self.m_buttonEditFailed, 0, wx.ALL, 5)

        self.m_buttonEditAll = wx.Button(self.m_panelSyncDone, wx.ID_ANY,
                                         _(u"Edit all tasks"),
                                         wx.DefaultPosition, wx.DefaultSize, 0)
        fgSizer7.Add(self.m_buttonEditAll, 0, wx.ALL, 5)

        self.m_buttonEditNew = wx.Button(self.m_panelSyncDone, wx.ID_ANY,
                                         _(u"New synchronization"),
                                         wx.DefaultPosition, wx.DefaultSize, 0)
        fgSizer7.Add(self.m_buttonEditNew, 0, wx.ALL, 5)

        fgSizer6.Add(fgSizer7, 1, wx.EXPAND, 5)

        self.m_staticline2 = wx.StaticLine(self.m_panelSyncDone, wx.ID_ANY,
                                           wx.DefaultPosition, wx.DefaultSize,
                                           wx.LI_HORIZONTAL)
        fgSizer6.Add(self.m_staticline2, 0, wx.EXPAND | wx.ALL, 5)

        self.m_panelSyncDone.SetSizer(fgSizer6)
        self.m_panelSyncDone.Layout()
        fgSizer6.Fit(self.m_panelSyncDone)
        fgSizer5.Add(self.m_panelSyncDone, 1, wx.EXPAND, 5)

        fgSizer8 = wx.FlexGridSizer(0, 2, 0, 0)
        fgSizer8.AddGrowableCol(1)
        fgSizer8.SetFlexibleDirection(wx.BOTH)
        fgSizer8.SetNonFlexibleGrowMode(wx.FLEX_GROWMODE_SPECIFIED)

        self.m_textStatus = wx.StaticText(self.m_panelProgress, wx.ID_ANY,
                                          _(u"Status:"), wx.DefaultPosition,
                                          wx.DefaultSize, 0)
        self.m_textStatus.Wrap(-1)

        fgSizer8.Add(self.m_textStatus, 0,
                     wx.ALIGN_CENTER_VERTICAL | wx.ALIGN_RIGHT | wx.ALL, 5)

        fgSizer9 = wx.FlexGridSizer(1, 0, 0, 0)
        fgSizer9.SetFlexibleDirection(wx.BOTH)
        fgSizer9.SetNonFlexibleGrowMode(wx.FLEX_GROWMODE_SPECIFIED)

        self.m_bitmapStatus = wx.StaticBitmap(self.m_panelProgress, wx.ID_ANY,
                                              wx.NullBitmap,
                                              wx.DefaultPosition,
                                              wx.DefaultSize, 0)
        self.m_bitmapStatus.Hide()

        fgSizer9.Add(self.m_bitmapStatus, 0,
                     wx.ALIGN_CENTER_VERTICAL | wx.TOP | wx.BOTTOM | wx.LEFT,
                     5)

        self.m_textStatusVal = wx.StaticText(self.m_panelProgress, wx.ID_ANY,
                                             wx.EmptyString,
                                             wx.DefaultPosition,
                                             wx.DefaultSize, 0)
        self.m_textStatusVal.Wrap(-1)

        fgSizer9.Add(self.m_textStatusVal, 0,
                     wx.ALIGN_CENTER_VERTICAL | wx.ALL, 5)

        fgSizer8.Add(fgSizer9, 1, wx.EXPAND, 5)

        self.m_textCurrentProgress = wx.StaticText(self.m_panelProgress,
                                                   wx.ID_ANY,
                                                   _(u"Current file:"),
                                                   wx.DefaultPosition,
                                                   wx.DefaultSize, 0)
        self.m_textCurrentProgress.Wrap(-1)

        fgSizer8.Add(
            self.m_textCurrentProgress, 0, wx.ALIGN_CENTER_VERTICAL
            | wx.ALIGN_RIGHT | wx.TOP | wx.RIGHT | wx.LEFT, 5)

        self.m_gaugeCurrentProgress = wx.Gauge(self.m_panelProgress, wx.ID_ANY,
                                               100, wx.DefaultPosition,
                                               wx.DefaultSize,
                                               wx.GA_HORIZONTAL)
        self.m_gaugeCurrentProgress.SetValue(0)
        fgSizer8.Add(
            self.m_gaugeCurrentProgress, 0,
            wx.ALIGN_CENTER_VERTICAL | wx.EXPAND | wx.TOP | wx.RIGHT | wx.LEFT,
            5)

        self.m_textTotalProgress = wx.StaticText(self.m_panelProgress,
                                                 wx.ID_ANY,
                                                 _(u"Total progress:"),
                                                 wx.DefaultPosition,
                                                 wx.DefaultSize, 0)
        self.m_textTotalProgress.Wrap(-1)

        fgSizer8.Add(self.m_textTotalProgress, 0,
                     wx.ALL | wx.ALIGN_CENTER_VERTICAL | wx.ALIGN_RIGHT, 5)

        self.m_gaugeTotalProgress = wx.Gauge(self.m_panelProgress, wx.ID_ANY,
                                             100, wx.DefaultPosition,
                                             wx.DefaultSize, wx.GA_HORIZONTAL)
        self.m_gaugeTotalProgress.SetValue(0)
        fgSizer8.Add(self.m_gaugeTotalProgress, 0,
                     wx.ALL | wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 5)

        fgSizer5.Add(fgSizer8, 1, wx.EXPAND, 5)

        self.m_panelProgress.SetSizer(fgSizer5)
        self.m_panelProgress.Layout()
        fgSizer5.Fit(self.m_panelProgress)
        fgSizer1.Add(self.m_panelProgress, 1, wx.EXPAND | wx.ALL, 5)

        self.m_staticline3 = wx.StaticLine(self.m_panelMain, wx.ID_ANY,
                                           wx.DefaultPosition, wx.DefaultSize,
                                           wx.LI_HORIZONTAL)
        fgSizer1.Add(self.m_staticline3, 0, wx.EXPAND | wx.ALL, 5)

        fgSizer10 = wx.FlexGridSizer(1, 0, 0, 0)
        fgSizer10.SetFlexibleDirection(wx.BOTH)
        fgSizer10.SetNonFlexibleGrowMode(wx.FLEX_GROWMODE_SPECIFIED)

        self.m_buttonClose = wx.Button(self.m_panelMain, wx.ID_CLOSE,
                                       _(u"Close"), wx.DefaultPosition,
                                       wx.DefaultSize, 0)
        fgSizer10.Add(self.m_buttonClose, 1, wx.ALL | wx.EXPAND, 5)

        self.m_buttonStop = wx.Button(self.m_panelMain, wx.ID_STOP, _(u"Stop"),
                                      wx.DefaultPosition, wx.DefaultSize, 0)
        self.m_buttonStop.Hide()

        fgSizer10.Add(self.m_buttonStop, 1, wx.ALL | wx.EXPAND, 5)

        self.m_buttonStart = wx.Button(self.m_panelMain, wx.ID_OK, _(u"Start"),
                                       wx.DefaultPosition, wx.DefaultSize, 0)

        self.m_buttonStart.SetDefault()
        self.m_buttonStart.Enable(False)

        fgSizer10.Add(self.m_buttonStart, 1, wx.ALL | wx.EXPAND, 5)

        fgSizer1.Add(fgSizer10, 0, wx.ALIGN_RIGHT, 5)

        self.m_panelMain.SetSizer(fgSizer1)
        self.m_panelMain.Layout()
        fgSizer1.Fit(self.m_panelMain)
        bSizer1.Add(self.m_panelMain, 1, wx.EXPAND, 5)

        self.SetSizer(bSizer1)
        self.Layout()
        self.m_menubar = wx.MenuBar(0)
        self.m_menuFile = wx.Menu()
        self.m_menuItemNew = wx.MenuItem(self.m_menuFile, wx.ID_ANY,
                                         _(u"&New") + u"\t" + u"CTRL+N",
                                         wx.EmptyString, wx.ITEM_NORMAL)
        self.m_menuItemNew.SetBitmap(
            wx.ArtProvider.GetBitmap(wx.ART_NEW, wx.ART_MENU))
        self.m_menuFile.Append(self.m_menuItemNew)

        self.m_menuFile.AppendSeparator()

        self.m_menuItemAddAuto = wx.MenuItem(
            self.m_menuFile, wx.ID_ANY,
            _(u"&Add files (auto sort)") + u"\t" + u"CTRL+O", wx.EmptyString,
            wx.ITEM_NORMAL)
        self.m_menuItemAddAuto.SetBitmap(
            wx.ArtProvider.GetBitmap(wx.ART_NORMAL_FILE, wx.ART_MENU))
        self.m_menuFile.Append(self.m_menuItemAddAuto)

        self.m_menuItemAddSubs = wx.MenuItem(
            self.m_menuFile, wx.ID_ANY,
            _(u"Add &subtitles") + u"\t" + u"F3", wx.EmptyString,
            wx.ITEM_NORMAL)
        self.m_menuItemAddSubs.SetBitmap(
            wx.ArtProvider.GetBitmap(wx.ART_NORMAL_FILE, wx.ART_MENU))
        self.m_menuFile.Append(self.m_menuItemAddSubs)

        self.m_menuItemAddRefs = wx.MenuItem(
            self.m_menuFile, wx.ID_ANY,
            _(u"Add &references") + u"\t" + u"F4", wx.EmptyString,
            wx.ITEM_NORMAL)
        self.m_menuItemAddRefs.SetBitmap(
            wx.ArtProvider.GetBitmap(wx.ART_NORMAL_FILE, wx.ART_MENU))
        self.m_menuFile.Append(self.m_menuItemAddRefs)

        self.m_menuItemAddFolder = wx.MenuItem(
            self.m_menuFile, wx.ID_ANY,
            _(u"Add &folder") + u"\t" + u"F2", wx.EmptyString, wx.ITEM_NORMAL)
        self.m_menuItemAddFolder.SetBitmap(
            wx.ArtProvider.GetBitmap(wx.ART_FOLDER, wx.ART_MENU))
        self.m_menuFile.Append(self.m_menuItemAddFolder)

        self.m_menuFile.AppendSeparator()

        self.m_menuItemImport = wx.MenuItem(self.m_menuFile, wx.ID_ANY,
                                            _(u"&Import list") + u"\t" + u"F9",
                                            wx.EmptyString, wx.ITEM_NORMAL)
        self.m_menuItemImport.SetBitmap(
            wx.ArtProvider.GetBitmap(wx.ART_FILE_OPEN, wx.ART_MENU))
        self.m_menuFile.Append(self.m_menuItemImport)

        self.m_menuItemExport = wx.MenuItem(
            self.m_menuFile, wx.ID_ANY,
            _(u"&Export list") + u"\t" + u"F10", wx.EmptyString,
            wx.ITEM_NORMAL)
        self.m_menuItemExport.SetBitmap(
            wx.ArtProvider.GetBitmap(wx.ART_FILE_SAVE, wx.ART_MENU))
        self.m_menuFile.Append(self.m_menuItemExport)

        self.m_menuFile.AppendSeparator()

        self.m_menuItemClose = wx.MenuItem(self.m_menuFile, wx.ID_ANY,
                                           _(u"&Close"), wx.EmptyString,
                                           wx.ITEM_NORMAL)
        self.m_menuItemClose.SetBitmap(
            wx.ArtProvider.GetBitmap(wx.ART_QUIT, wx.ART_MENU))
        self.m_menuFile.Append(self.m_menuItemClose)

        self.m_menubar.Append(self.m_menuFile, _(u"&File"))

        self.m_menuEdit = wx.Menu()
        self.m_menuItemAutoSort = wx.MenuItem(
            self.m_menuEdit, wx.ID_ANY,
            _(u"Au&to sort") + u"\t" + u"CTRL+S", wx.EmptyString,
            wx.ITEM_NORMAL)
        self.m_menuEdit.Append(self.m_menuItemAutoSort)
        self.m_menuItemAutoSort.Enable(False)

        self.m_menuItemRemove = wx.MenuItem(self.m_menuEdit, wx.ID_ANY,
                                            _(u"&Remove") + u"\t" + u"DELETE",
                                            wx.EmptyString, wx.ITEM_NORMAL)
        self.m_menuItemRemove.SetBitmap(
            wx.ArtProvider.GetBitmap(wx.ART_DELETE, wx.ART_MENU))
        self.m_menuEdit.Append(self.m_menuItemRemove)
        self.m_menuItemRemove.Enable(False)

        self.m_menuEdit.AppendSeparator()

        self.m_menuItemSelectAll = wx.MenuItem(
            self.m_menuEdit, wx.ID_ANY,
            _(u"Select &all") + u"\t" + u"CTRL+A", wx.EmptyString,
            wx.ITEM_NORMAL)
        self.m_menuEdit.Append(self.m_menuItemSelectAll)

        self.m_menuItemSelectSubs = wx.MenuItem(
            self.m_menuEdit, wx.ID_ANY,
            _(u"Select all &subtitles") + u"\t" + u"CTRL+1", wx.EmptyString,
            wx.ITEM_NORMAL)
        self.m_menuEdit.Append(self.m_menuItemSelectSubs)

        self.m_menuItemSelectRefs = wx.MenuItem(
            self.m_menuEdit, wx.ID_ANY,
            _(u"Select all &references") + u"\t" + u"CTRL+2", wx.EmptyString,
            wx.ITEM_NORMAL)
        self.m_menuEdit.Append(self.m_menuItemSelectRefs)

        self.m_menuItemSelectOuts = wx.MenuItem(
            self.m_menuEdit, wx.ID_ANY,
            _(u"Select all o&utputs") + u"\t" + u"CTRL+3", wx.EmptyString,
            wx.ITEM_NORMAL)
        self.m_menuEdit.Append(self.m_menuItemSelectOuts)

        self.m_menuEdit.AppendSeparator()

        self.m_menuItemStreamSel = wx.MenuItem(
            self.m_menuEdit, wx.ID_ANY,
            _(u"Set &input stream") + u"\t" + u"F5", wx.EmptyString,
            wx.ITEM_NORMAL)
        self.m_menuEdit.Append(self.m_menuItemStreamSel)
        self.m_menuItemStreamSel.Enable(False)

        self.m_menuItemOutSel = wx.MenuItem(
            self.m_menuEdit, wx.ID_ANY,
            _(u"Set &output location") + u"\t" + u"F6", wx.EmptyString,
            wx.ITEM_NORMAL)
        self.m_menuEdit.Append(self.m_menuItemOutSel)

        self.m_menuItemProps = wx.MenuItem(self.m_menuEdit, wx.ID_ANY,
                                           _(u"&Propeties") + u"\t" + u"F8",
                                           wx.EmptyString, wx.ITEM_NORMAL)
        self.m_menuItemProps.SetBitmap(
            wx.ArtProvider.GetBitmap(wx.ART_HELP_SETTINGS, wx.ART_MENU))
        self.m_menuEdit.Append(self.m_menuItemProps)
        self.m_menuItemProps.Enable(False)

        self.m_menubar.Append(self.m_menuEdit, _(u"&Edit"))

        self.m_menuHelp = wx.Menu()
        self.m_menuItemAbout = wx.MenuItem(self.m_menuHelp, wx.ID_ABOUT,
                                           _(u"&About"), wx.EmptyString,
                                           wx.ITEM_NORMAL)
        self.m_menuHelp.Append(self.m_menuItemAbout)

        self.m_menubar.Append(self.m_menuHelp, _(u"&Help"))

        self.SetMenuBar(self.m_menubar)

        # Connect Events
        self.Bind(wx.EVT_CLOSE, self.onClose)
        self.m_choiceLang.Bind(wx.EVT_CHOICE, self.onChoiceLangChoice)
        self.m_sliderMaxDist.Bind(wx.EVT_SCROLL, self.onSliderMaxDistScroll)
        self.m_sliderEffort.Bind(wx.EVT_SCROLL, self.onSliderEffortScroll)
        self.m_buttonEditFailed.Bind(wx.EVT_BUTTON,
                                     self.onButtonEditFailedClick)
        self.m_buttonEditAll.Bind(wx.EVT_BUTTON, self.onButtonEditAllClick)
        self.m_buttonEditNew.Bind(wx.EVT_BUTTON, self.onButtonEditNewClick)
        self.m_buttonClose.Bind(wx.EVT_BUTTON, self.onButtonCloseClick)
        self.m_buttonStop.Bind(wx.EVT_BUTTON, self.onButtonStopClick)
        self.m_buttonStart.Bind(wx.EVT_BUTTON, self.onButtonStartClick)
        self.Bind(wx.EVT_MENU,
                  self.onMenuNewClick,
                  id=self.m_menuItemNew.GetId())
        self.Bind(wx.EVT_MENU,
                  self.onMenuAddFolderClick,
                  id=self.m_menuItemAddFolder.GetId())
        self.Bind(wx.EVT_MENU,
                  self.onMenuImportClick,
                  id=self.m_menuItemImport.GetId())
        self.Bind(wx.EVT_MENU,
                  self.onMenuExportClick,
                  id=self.m_menuItemExport.GetId())
        self.Bind(wx.EVT_MENU,
                  self.onMenuPropsClick,
                  id=self.m_menuItemProps.GetId())
        self.Bind(wx.EVT_MENU,
                  self.onMenuAboutClick,
                  id=self.m_menuItemAbout.GetId())
Example #2
0
    def __init__(self, parent):
        wx.Frame.__init__(self,
                          parent,
                          id=wx.ID_ANY,
                          title=_(u"Batch Processing"),
                          pos=wx.DefaultPosition,
                          size=wx.Size(900, 600),
                          style=wx.DEFAULT_FRAME_STYLE | wx.TAB_TRAVERSAL)

        self.SetSizeHints(wx.Size(900, 500), wx.DefaultSize)

        bSizer1 = wx.BoxSizer(wx.VERTICAL)

        self.m_panelMain = wx.Panel(self, wx.ID_ANY, wx.DefaultPosition,
                                    wx.DefaultSize, wx.TAB_TRAVERSAL)
        fgSizer1 = wx.FlexGridSizer(0, 1, 0, 0)
        fgSizer1.AddGrowableCol(0)
        fgSizer1.AddGrowableRow(1)
        fgSizer1.SetFlexibleDirection(wx.BOTH)
        fgSizer1.SetNonFlexibleGrowMode(wx.FLEX_GROWMODE_SPECIFIED)

        fgSizer2 = wx.FlexGridSizer(0, 3, 0, 0)
        fgSizer2.AddGrowableCol(0)
        fgSizer2.AddGrowableCol(1)
        fgSizer2.AddGrowableCol(2)
        fgSizer2.SetFlexibleDirection(wx.VERTICAL)
        fgSizer2.SetNonFlexibleGrowMode(wx.FLEX_GROWMODE_SPECIFIED)

        self.m_textSubs = wx.StaticText(self.m_panelMain, wx.ID_ANY,
                                        _(u"Subtitles:"), wx.DefaultPosition,
                                        wx.DefaultSize, 0)
        self.m_textSubs.Wrap(-1)
        self.m_textSubs.SetFont(
            wx.Font(wx.NORMAL_FONT.GetPointSize(), wx.FONTFAMILY_DEFAULT,
                    wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_BOLD, False,
                    wx.EmptyString))

        fgSizer2.Add(self.m_textSubs, 0,
                     wx.TOP | wx.RIGHT | wx.LEFT | wx.EXPAND, 5)

        self.m_textRefs = wx.StaticText(self.m_panelMain, wx.ID_ANY,
                                        _(u"References:"), wx.DefaultPosition,
                                        wx.DefaultSize, 0)
        self.m_textRefs.Wrap(-1)
        self.m_textRefs.SetFont(
            wx.Font(wx.NORMAL_FONT.GetPointSize(), wx.FONTFAMILY_DEFAULT,
                    wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_BOLD, False,
                    wx.EmptyString))

        fgSizer2.Add(self.m_textRefs, 0,
                     wx.TOP | wx.RIGHT | wx.LEFT | wx.EXPAND, 5)

        self.m_textOuts = wx.StaticText(self.m_panelMain, wx.ID_ANY,
                                        _(u"Outputs:"), wx.DefaultPosition,
                                        wx.DefaultSize, 0)
        self.m_textOuts.Wrap(-1)
        self.m_textOuts.SetFont(
            wx.Font(wx.NORMAL_FONT.GetPointSize(), wx.FONTFAMILY_DEFAULT,
                    wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_BOLD, False,
                    wx.EmptyString))

        fgSizer2.Add(self.m_textOuts, 0,
                     wx.TOP | wx.RIGHT | wx.LEFT | wx.EXPAND, 5)

        self.m_toolBarSub = wx.ToolBar(self.m_panelMain, wx.ID_ANY,
                                       wx.DefaultPosition, wx.DefaultSize,
                                       wx.TB_HORIZONTAL)
        self.m_toolSubAdd = self.m_toolBarSub.AddLabelTool(
            wx.ID_ANY, _(u"Add files"),
            wx.ArtProvider.GetBitmap(wx.ART_PLUS,
                                     wx.ART_TOOLBAR), wx.NullBitmap,
            wx.ITEM_NORMAL, _(u"Add files"), wx.EmptyString, None)

        self.m_toolSubRemove = self.m_toolBarSub.AddLabelTool(
            wx.ID_ANY, _(u"Remove files"),
            wx.ArtProvider.GetBitmap(wx.ART_MINUS,
                                     wx.ART_TOOLBAR), wx.NullBitmap,
            wx.ITEM_NORMAL, _(u"Remove files"), wx.EmptyString, None)

        self.m_toolSubSelStream = self.m_toolBarSub.AddLabelTool(
            wx.ID_ANY, _(u"Select stream"),
            wx.ArtProvider.GetBitmap(wx.ART_LIST_VIEW,
                                     wx.ART_TOOLBAR), wx.NullBitmap,
            wx.ITEM_NORMAL, _(u"Select stream"), wx.EmptyString, None)

        self.m_toolBarSub.Realize()

        fgSizer2.Add(self.m_toolBarSub, 0, wx.EXPAND, 5)

        self.m_toolBarRef = wx.ToolBar(self.m_panelMain, wx.ID_ANY,
                                       wx.DefaultPosition, wx.DefaultSize,
                                       wx.TB_HORIZONTAL)
        self.m_toolRefAdd = self.m_toolBarRef.AddLabelTool(
            wx.ID_ANY, _(u"Add files"),
            wx.ArtProvider.GetBitmap(wx.ART_PLUS,
                                     wx.ART_TOOLBAR), wx.NullBitmap,
            wx.ITEM_NORMAL, _(u"Add files"), wx.EmptyString, None)

        self.m_toolRefRemove = self.m_toolBarRef.AddLabelTool(
            wx.ID_ANY, _(u"Remove files"),
            wx.ArtProvider.GetBitmap(wx.ART_MINUS,
                                     wx.ART_TOOLBAR), wx.NullBitmap,
            wx.ITEM_NORMAL, _(u"Remove files"), wx.EmptyString, None)

        self.m_toolRefSelStream = self.m_toolBarRef.AddLabelTool(
            wx.ID_ANY, _(u"Select stream"),
            wx.ArtProvider.GetBitmap(wx.ART_LIST_VIEW,
                                     wx.ART_TOOLBAR), wx.NullBitmap,
            wx.ITEM_NORMAL, _(u"Select stream"), wx.EmptyString, None)

        self.m_toolBarRef.Realize()

        fgSizer2.Add(self.m_toolBarRef, 0, wx.EXPAND, 5)

        self.m_toolBarOut = wx.ToolBar(self.m_panelMain, wx.ID_ANY,
                                       wx.DefaultPosition, wx.DefaultSize,
                                       wx.TB_HORIZONTAL)
        self.m_toolOutPattern = self.m_toolBarOut.AddLabelTool(
            wx.ID_ANY, _(u"Set file names"),
            wx.ArtProvider.GetBitmap(wx.ART_LIST_VIEW,
                                     wx.ART_TOOLBAR), wx.NullBitmap,
            wx.ITEM_NORMAL, _(u"Set file names"), wx.EmptyString, None)

        self.m_toolBarOut.Realize()

        fgSizer2.Add(self.m_toolBarOut, 0, wx.EXPAND, 5)

        fgSizer1.Add(fgSizer2, 1, wx.EXPAND, 5)

        self.m_items = MultiColumnView(self.m_panelMain, wx.ID_ANY,
                                       wx.DefaultPosition, wx.DefaultSize,
                                       wx.FULL_REPAINT_ON_RESIZE | wx.VSCROLL)
        self.m_items.SetScrollRate(5, 5)
        self.m_items.SetForegroundColour(
            wx.SystemSettings.GetColour(wx.SYS_COLOUR_WINDOWTEXT))
        self.m_items.SetBackgroundColour(
            wx.SystemSettings.GetColour(wx.SYS_COLOUR_WINDOW))

        fgSizer1.Add(self.m_items, 1,
                     wx.EXPAND | wx.BOTTOM | wx.RIGHT | wx.LEFT, 5)

        fgSizer3 = wx.FlexGridSizer(1, 0, 0, 0)
        fgSizer3.AddGrowableCol(1)
        fgSizer3.SetFlexibleDirection(wx.BOTH)
        fgSizer3.SetNonFlexibleGrowMode(wx.FLEX_GROWMODE_SPECIFIED)

        self.m_textSelectedLabel = wx.StaticText(self.m_panelMain, wx.ID_ANY,
                                                 _(u"selected:"),
                                                 wx.DefaultPosition,
                                                 wx.DefaultSize, 0)
        self.m_textSelectedLabel.Wrap(-1)
        fgSizer3.Add(self.m_textSelectedLabel, 0,
                     wx.ALIGN_CENTER_VERTICAL | wx.ALL | wx.ALIGN_RIGHT, 5)

        self.m_textSelected = wx.TextCtrl(self.m_panelMain, wx.ID_ANY,
                                          wx.EmptyString, wx.DefaultPosition,
                                          wx.DefaultSize, wx.TE_READONLY)
        fgSizer3.Add(self.m_textSelected, 0,
                     wx.ALL | wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 5)

        self.m_buttonSelStream = wx.Button(self.m_panelMain, wx.ID_ANY,
                                           _(u"Select Stream"),
                                           wx.DefaultPosition, wx.DefaultSize,
                                           0)
        self.m_buttonSelStream.Enable(False)

        fgSizer3.Add(self.m_buttonSelStream, 0,
                     wx.ALL | wx.ALIGN_CENTER_VERTICAL, 5)

        fgSizer1.Add(fgSizer3, 1, wx.EXPAND, 5)

        fgSizer4 = wx.FlexGridSizer(0, 1, 0, 0)
        fgSizer4.AddGrowableCol(0)
        fgSizer4.SetFlexibleDirection(wx.BOTH)
        fgSizer4.SetNonFlexibleGrowMode(wx.FLEX_GROWMODE_SPECIFIED)

        self.m_panelSettings = wx.Panel(self.m_panelMain, wx.ID_ANY,
                                        wx.DefaultPosition, wx.DefaultSize,
                                        wx.TAB_TRAVERSAL)
        fgSizer5 = wx.FlexGridSizer(0, 3, 0, 0)
        fgSizer5.AddGrowableCol(2)
        fgSizer5.SetFlexibleDirection(wx.BOTH)
        fgSizer5.SetNonFlexibleGrowMode(wx.FLEX_GROWMODE_SPECIFIED)

        fgSizer6 = wx.FlexGridSizer(0, 2, 0, 0)
        fgSizer6.AddGrowableCol(1)
        fgSizer6.SetFlexibleDirection(wx.BOTH)
        fgSizer6.SetNonFlexibleGrowMode(wx.FLEX_GROWMODE_SPECIFIED)

        self.m_textLang = wx.StaticText(self.m_panelSettings, wx.ID_ANY,
                                        _(u"Language:"), wx.DefaultPosition,
                                        wx.DefaultSize, 0)
        self.m_textLang.Wrap(-1)
        fgSizer6.Add(
            self.m_textLang, 0, wx.TOP | wx.RIGHT | wx.LEFT | wx.ALIGN_RIGHT
            | wx.ALIGN_CENTER_VERTICAL, 5)

        m_choiceLangChoices = []
        self.m_choiceLang = ChoiceLang(self.m_panelSettings, wx.ID_ANY,
                                       wx.DefaultPosition, wx.DefaultSize,
                                       m_choiceLangChoices, 0)
        self.m_choiceLang.SetSelection(0)
        self.m_choiceLang.Enable(False)

        fgSizer6.Add(
            self.m_choiceLang, 0,
            wx.ALIGN_CENTER_VERTICAL | wx.EXPAND | wx.TOP | wx.RIGHT | wx.LEFT,
            5)

        self.m_textEnc = wx.StaticText(self.m_panelSettings, wx.ID_ANY,
                                       _(u"Character encoding:"),
                                       wx.DefaultPosition, wx.DefaultSize, 0)
        self.m_textEnc.Wrap(-1)
        fgSizer6.Add(self.m_textEnc, 0,
                     wx.ALIGN_CENTER_VERTICAL | wx.ALIGN_RIGHT | wx.ALL, 5)

        m_choiceEncChoices = []
        self.m_choiceEnc = ChoiceCharEnc(self.m_panelSettings, wx.ID_ANY,
                                         wx.DefaultPosition, wx.DefaultSize,
                                         m_choiceEncChoices, 0)
        self.m_choiceEnc.SetSelection(0)
        self.m_choiceEnc.Enable(False)

        fgSizer6.Add(self.m_choiceEnc, 0,
                     wx.EXPAND | wx.ALIGN_CENTER_VERTICAL | wx.ALL, 5)

        fgSizer5.Add(fgSizer6, 1, wx.EXPAND, 5)

        self.m_staticline3 = wx.StaticLine(self.m_panelSettings, wx.ID_ANY,
                                           wx.DefaultPosition, wx.DefaultSize,
                                           wx.LI_VERTICAL)
        fgSizer5.Add(self.m_staticline3, 0, wx.EXPAND | wx.ALL, 5)

        fgSizer7 = wx.FlexGridSizer(0, 4, 0, 0)
        fgSizer7.AddGrowableCol(2)
        fgSizer7.SetFlexibleDirection(wx.BOTH)
        fgSizer7.SetNonFlexibleGrowMode(wx.FLEX_GROWMODE_SPECIFIED)

        self.m_textMaxDistLabel = wx.StaticText(self.m_panelSettings,
                                                wx.ID_ANY,
                                                _(u"Max adjustment:"),
                                                wx.DefaultPosition,
                                                wx.DefaultSize, 0)
        self.m_textMaxDistLabel.Wrap(-1)
        fgSizer7.Add(
            self.m_textMaxDistLabel, 0, wx.ALIGN_RIGHT
            | wx.ALIGN_CENTER_VERTICAL | wx.TOP | wx.RIGHT | wx.LEFT, 5)

        self.m_buttonMaxDistInfo = PopupInfoButton(
            self.m_panelSettings, wx.ID_ANY,
            wx.ArtProvider.GetBitmap(wx.ART_TIP, wx.ART_BUTTON),
            wx.DefaultPosition, wx.DefaultSize, wx.BU_AUTODRAW | wx.NO_BORDER)
        fgSizer7.Add(
            self.m_buttonMaxDistInfo, 0,
            wx.ALIGN_CENTER_HORIZONTAL | wx.ALIGN_CENTER_VERTICAL | wx.EXPAND,
            5)

        self.m_sliderMaxDist = wx.Slider(self.m_panelSettings, wx.ID_ANY, 30,
                                         5, 180, wx.DefaultPosition,
                                         wx.DefaultSize, wx.SL_HORIZONTAL)
        fgSizer7.Add(
            self.m_sliderMaxDist, 0,
            wx.ALIGN_CENTER_VERTICAL | wx.ALIGN_CENTER_HORIZONTAL | wx.EXPAND
            | wx.TOP | wx.RIGHT | wx.LEFT, 5)

        self.m_textMaxDist = wx.StaticText(self.m_panelSettings, wx.ID_ANY,
                                           _(u"999 min"), wx.DefaultPosition,
                                           wx.DefaultSize, wx.ST_NO_AUTORESIZE)
        self.m_textMaxDist.Wrap(-1)
        fgSizer7.Add(
            self.m_textMaxDist, 0, wx.ALIGN_CENTER_HORIZONTAL
            | wx.ALIGN_CENTER_VERTICAL | wx.TOP | wx.RIGHT | wx.LEFT, 5)

        self.m_textEffortLabel = wx.StaticText(self.m_panelSettings, wx.ID_ANY,
                                               _(u"Effort:"),
                                               wx.DefaultPosition,
                                               wx.DefaultSize, 0)
        self.m_textEffortLabel.Wrap(-1)
        fgSizer7.Add(self.m_textEffortLabel, 0,
                     wx.ALIGN_RIGHT | wx.ALIGN_CENTER_VERTICAL | wx.ALL, 5)

        self.m_buttonEffortInfo = PopupInfoButton(
            self.m_panelSettings, wx.ID_ANY,
            wx.ArtProvider.GetBitmap(wx.ART_TIP, wx.ART_BUTTON),
            wx.DefaultPosition, wx.DefaultSize, wx.BU_AUTODRAW | wx.NO_BORDER)
        fgSizer7.Add(
            self.m_buttonEffortInfo, 0,
            wx.ALIGN_CENTER_VERTICAL | wx.ALIGN_CENTER_HORIZONTAL | wx.EXPAND,
            5)

        self.m_sliderEffort = wx.Slider(self.m_panelSettings, wx.ID_ANY, 50, 0,
                                        100, wx.DefaultPosition,
                                        wx.DefaultSize, wx.SL_HORIZONTAL)
        fgSizer7.Add(
            self.m_sliderEffort, 0, wx.ALIGN_CENTER_HORIZONTAL
            | wx.ALIGN_CENTER_VERTICAL | wx.EXPAND | wx.ALL, 5)

        self.m_textEffort = wx.StaticText(self.m_panelSettings, wx.ID_ANY,
                                          _(u"0.50"), wx.DefaultPosition,
                                          wx.DefaultSize, wx.ST_NO_AUTORESIZE)
        self.m_textEffort.Wrap(-1)
        fgSizer7.Add(self.m_textEffort, 0, wx.ALL | wx.ALIGN_CENTER_VERTICAL,
                     5)

        fgSizer5.Add(fgSizer7, 1, wx.EXPAND, 5)

        self.m_panelSettings.SetSizer(fgSizer5)
        self.m_panelSettings.Layout()
        fgSizer5.Fit(self.m_panelSettings)
        fgSizer4.Add(self.m_panelSettings, 0, wx.EXPAND, 5)

        self.m_panelProgress = wx.Panel(self.m_panelMain, wx.ID_ANY,
                                        wx.DefaultPosition, wx.DefaultSize,
                                        wx.TAB_TRAVERSAL)
        self.m_panelProgress.Hide()

        fgSizer9 = wx.FlexGridSizer(0, 1, 0, 0)
        fgSizer9.AddGrowableCol(0)
        fgSizer9.AddGrowableRow(0)
        fgSizer9.SetFlexibleDirection(wx.BOTH)
        fgSizer9.SetNonFlexibleGrowMode(wx.FLEX_GROWMODE_SPECIFIED)

        self.m_textStatus = wx.StaticText(self.m_panelProgress, wx.ID_ANY,
                                          _(u"Initializing..."),
                                          wx.DefaultPosition, wx.DefaultSize,
                                          0)
        self.m_textStatus.Wrap(-1)
        fgSizer9.Add(self.m_textStatus, 0, wx.TOP | wx.RIGHT | wx.LEFT, 5)

        self.m_gaugeProgress = wx.Gauge(self.m_panelProgress, wx.ID_ANY, 100,
                                        wx.DefaultPosition, wx.DefaultSize,
                                        wx.GA_HORIZONTAL)
        self.m_gaugeProgress.SetValue(0)
        fgSizer9.Add(self.m_gaugeProgress, 0, wx.ALL | wx.EXPAND, 5)

        self.m_staticline2 = wx.StaticLine(self.m_panelProgress, wx.ID_ANY,
                                           wx.DefaultPosition, wx.DefaultSize,
                                           wx.LI_HORIZONTAL)
        fgSizer9.Add(self.m_staticline2, 0, wx.EXPAND | wx.ALL, 5)

        fgSizer10 = wx.FlexGridSizer(0, 2, 0, 0)
        fgSizer10.AddGrowableCol(0)
        fgSizer10.AddGrowableCol(1)
        fgSizer10.SetFlexibleDirection(wx.BOTH)
        fgSizer10.SetNonFlexibleGrowMode(wx.FLEX_GROWMODE_SPECIFIED)

        fgSizer11 = wx.FlexGridSizer(0, 1, 0, 0)
        fgSizer11.AddGrowableCol(0)
        fgSizer11.SetFlexibleDirection(wx.BOTH)
        fgSizer11.SetNonFlexibleGrowMode(wx.FLEX_GROWMODE_SPECIFIED)

        fgSizer12 = wx.FlexGridSizer(1, 0, 0, 0)
        fgSizer12.AddGrowableCol(2)
        fgSizer12.AddGrowableRow(0)
        fgSizer12.SetFlexibleDirection(wx.BOTH)
        fgSizer12.SetNonFlexibleGrowMode(wx.FLEX_GROWMODE_SPECIFIED)

        self.m_bitmapTick = wx.StaticBitmap(
            self.m_panelProgress, wx.ID_ANY,
            wx.ArtProvider.GetBitmap(wx.ART_TICK_MARK, wx.ART_MENU),
            wx.DefaultPosition, wx.DefaultSize, 0)
        self.m_bitmapTick.Hide()

        fgSizer12.Add(self.m_bitmapTick, 0, wx.EXPAND | wx.TOP | wx.LEFT, 5)

        self.m_bitmapCross = wx.StaticBitmap(
            self.m_panelProgress, wx.ID_ANY,
            wx.ArtProvider.GetBitmap(wx.ART_CROSS_MARK, wx.ART_MENU),
            wx.DefaultPosition, wx.DefaultSize, 0)
        self.m_bitmapCross.Hide()

        fgSizer12.Add(self.m_bitmapCross, 0, wx.TOP | wx.LEFT, 5)

        self.m_textFileStatus = wx.StaticText(self.m_panelProgress, wx.ID_ANY,
                                              _(u"Initializing..."),
                                              wx.DefaultPosition,
                                              wx.DefaultSize, 0)
        self.m_textFileStatus.Wrap(-1)
        fgSizer12.Add(self.m_textFileStatus, 0, wx.TOP | wx.RIGHT | wx.LEFT, 5)

        fgSizer11.Add(fgSizer12, 1, wx.EXPAND, 5)

        self.m_gaugeFileProgress = wx.Gauge(self.m_panelProgress, wx.ID_ANY,
                                            100, wx.DefaultPosition,
                                            wx.DefaultSize, wx.GA_HORIZONTAL)
        self.m_gaugeFileProgress.SetValue(0)
        fgSizer11.Add(self.m_gaugeFileProgress, 0, wx.ALL | wx.EXPAND, 5)

        fgSizer10.Add(fgSizer11, 1, wx.EXPAND, 5)

        self.m_panelError = wx.Panel(self.m_panelProgress, wx.ID_ANY,
                                     wx.DefaultPosition, wx.DefaultSize,
                                     wx.TAB_TRAVERSAL)
        self.m_panelError.Hide()

        fgSizer13 = wx.FlexGridSizer(0, 2, 0, 0)
        fgSizer13.AddGrowableCol(1)
        fgSizer13.AddGrowableRow(0)
        fgSizer13.SetFlexibleDirection(wx.BOTH)
        fgSizer13.SetNonFlexibleGrowMode(wx.FLEX_GROWMODE_SPECIFIED)

        self.m_bitmapErrorIcon = wx.StaticBitmap(
            self.m_panelError, wx.ID_ANY,
            wx.ArtProvider.GetBitmap(wx.ART_WARNING, wx.ART_CMN_DIALOG),
            wx.DefaultPosition, wx.DefaultSize, 0)
        fgSizer13.Add(
            self.m_bitmapErrorIcon, 0, wx.ALIGN_CENTER_VERTICAL
            | wx.ALIGN_RIGHT | wx.TOP | wx.BOTTOM | wx.LEFT, 5)

        fgSizer14 = wx.FlexGridSizer(0, 1, 0, 0)
        fgSizer14.AddGrowableCol(0)
        fgSizer14.AddGrowableRow(0)
        fgSizer14.AddGrowableRow(1)
        fgSizer14.SetFlexibleDirection(wx.BOTH)
        fgSizer14.SetNonFlexibleGrowMode(wx.FLEX_GROWMODE_SPECIFIED)

        self.m_textErrorMsg = wx.StaticText(self.m_panelError, wx.ID_ANY,
                                            wx.EmptyString, wx.DefaultPosition,
                                            wx.DefaultSize, 0)
        self.m_textErrorMsg.Wrap(-1)
        fgSizer14.Add(self.m_textErrorMsg, 0,
                      wx.ALIGN_CENTER_VERTICAL | wx.TOP | wx.RIGHT | wx.LEFT,
                      5)

        self.m_textErrorDetails = wx.StaticText(self.m_panelError, wx.ID_ANY,
                                                _(u"[details]"),
                                                wx.DefaultPosition,
                                                wx.DefaultSize, 0)
        self.m_textErrorDetails.Wrap(-1)
        self.m_textErrorDetails.SetForegroundColour(
            wx.SystemSettings.GetColour(wx.SYS_COLOUR_HIGHLIGHT))

        fgSizer14.Add(
            self.m_textErrorDetails, 0,
            wx.ALIGN_CENTER_VERTICAL | wx.BOTTOM | wx.RIGHT | wx.LEFT, 5)

        fgSizer13.Add(fgSizer14, 1, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 5)

        self.m_panelError.SetSizer(fgSizer13)
        self.m_panelError.Layout()
        fgSizer13.Fit(self.m_panelError)
        fgSizer10.Add(self.m_panelError, 0,
                      wx.ALIGN_BOTTOM | wx.EXPAND | wx.LEFT, 20)

        fgSizer9.Add(fgSizer10, 1, wx.EXPAND, 5)

        self.m_panelProgress.SetSizer(fgSizer9)
        self.m_panelProgress.Layout()
        fgSizer9.Fit(self.m_panelProgress)
        fgSizer4.Add(self.m_panelProgress, 1, wx.EXPAND | wx.ALL, 5)

        fgSizer1.Add(fgSizer4, 1, wx.EXPAND, 5)

        self.m_staticline1 = wx.StaticLine(self.m_panelMain, wx.ID_ANY,
                                           wx.DefaultPosition, wx.DefaultSize,
                                           wx.LI_HORIZONTAL)
        fgSizer1.Add(self.m_staticline1, 0, wx.EXPAND | wx.ALL, 5)

        fgSizer15 = wx.FlexGridSizer(1, 0, 0, 0)
        fgSizer15.SetFlexibleDirection(wx.BOTH)
        fgSizer15.SetNonFlexibleGrowMode(wx.FLEX_GROWMODE_SPECIFIED)

        self.m_buttonMenu = wx.Button(self.m_panelMain, wx.ID_ANY, _(u"Menu"),
                                      wx.DefaultPosition, wx.DefaultSize,
                                      wx.BU_EXACTFIT)
        self.m_menu = wx.Menu()
        self.m_menuItemAddFiles = wx.MenuItem(self.m_menu, wx.ID_ANY,
                                              _(u"Add files"), wx.EmptyString,
                                              wx.ITEM_NORMAL)
        self.m_menu.Append(self.m_menuItemAddFiles)

        self.m_menu.AppendSeparator()

        self.m_menuItemImportList = wx.MenuItem(self.m_menu, wx.ID_ANY,
                                                _(u"Import file list"),
                                                wx.EmptyString, wx.ITEM_NORMAL)
        self.m_menu.Append(self.m_menuItemImportList)

        self.m_menuItemExportList = wx.MenuItem(self.m_menu, wx.ID_ANY,
                                                _(u"Export file list"),
                                                wx.EmptyString, wx.ITEM_NORMAL)
        self.m_menu.Append(self.m_menuItemExportList)

        self.m_menu.AppendSeparator()

        self.m_menuItemClearList = wx.MenuItem(self.m_menu, wx.ID_ANY,
                                               _(u"Clear file list"),
                                               wx.EmptyString, wx.ITEM_NORMAL)
        self.m_menu.Append(self.m_menuItemClearList)

        self.m_buttonMenu.Bind(wx.EVT_RIGHT_DOWN,
                               self.m_buttonMenuOnContextMenu)

        fgSizer15.Add(self.m_buttonMenu, 1, wx.ALL | wx.EXPAND, 5)

        self.m_buttonClose = wx.Button(self.m_panelMain, wx.ID_CLOSE,
                                       _(u"Close"), wx.DefaultPosition,
                                       wx.DefaultSize, 0)
        fgSizer15.Add(self.m_buttonClose, 1, wx.ALL | wx.EXPAND, 5)

        self.m_buttonStart = wx.Button(self.m_panelMain, wx.ID_OK, _(u"Start"),
                                       wx.DefaultPosition, wx.DefaultSize, 0)
        self.m_buttonStart.SetDefault()
        self.m_buttonStart.Enable(False)

        fgSizer15.Add(self.m_buttonStart, 1, wx.ALL | wx.EXPAND, 5)

        fgSizer1.Add(fgSizer15, 0, wx.ALIGN_RIGHT, 5)

        self.m_panelMain.SetSizer(fgSizer1)
        self.m_panelMain.Layout()
        fgSizer1.Fit(self.m_panelMain)
        bSizer1.Add(self.m_panelMain, 1, wx.EXPAND, 5)

        self.SetSizer(bSizer1)
        self.Layout()
        self.m_menuItems = wx.Menu()
        self.m_menuItemsRemove = wx.MenuItem(self.m_menuItems, wx.ID_ANY,
                                             _(u"Remove"), wx.EmptyString,
                                             wx.ITEM_NORMAL)
        self.m_menuItems.Append(self.m_menuItemsRemove)

        self.m_menuItemsProps = wx.MenuItem(self.m_menuItems, wx.ID_ANY,
                                            _(u"Properties"), wx.EmptyString,
                                            wx.ITEM_NORMAL)
        self.m_menuItems.Append(self.m_menuItemsProps)

        self.Bind(wx.EVT_RIGHT_DOWN, self.BatchWinOnContextMenu)

        self.Centre(wx.BOTH)

        # Connect Events
        self.Bind(wx.EVT_CLOSE, self.onClose)
        self.Bind(wx.EVT_TOOL,
                  self.onSubAddClick,
                  id=self.m_toolSubAdd.GetId())
        self.Bind(wx.EVT_TOOL,
                  self.onSubRemoveClick,
                  id=self.m_toolSubRemove.GetId())
        self.Bind(wx.EVT_TOOL,
                  self.onSubSelStreamClick,
                  id=self.m_toolSubSelStream.GetId())
        self.Bind(wx.EVT_TOOL,
                  self.onRefAddClick,
                  id=self.m_toolRefAdd.GetId())
        self.Bind(wx.EVT_TOOL,
                  self.onRefRemoveClick,
                  id=self.m_toolRefRemove.GetId())
        self.Bind(wx.EVT_TOOL,
                  self.onRefSelStreamClick,
                  id=self.m_toolRefSelStream.GetId())
        self.Bind(wx.EVT_TOOL,
                  self.onOutPatternClick,
                  id=self.m_toolOutPattern.GetId())
        self.m_items.Bind(wx.EVT_LEFT_DCLICK, self.onItemsLeftDClick)
        self.m_buttonSelStream.Bind(wx.EVT_BUTTON, self.onButtonSelStreamClick)
        self.m_choiceLang.Bind(wx.EVT_CHOICE, self.onChoiceLangChoice)
        self.m_choiceEnc.Bind(wx.EVT_CHOICE, self.onChoiceEncChoice)
        self.m_sliderMaxDist.Bind(wx.EVT_SCROLL, self.onSliderMaxDistScroll)
        self.m_sliderEffort.Bind(wx.EVT_SCROLL, self.onSliderEffortScroll)
        self.m_textErrorDetails.Bind(wx.EVT_LEFT_UP,
                                     self.onTextErrorDetailsClick)
        self.m_buttonMenu.Bind(wx.EVT_BUTTON, self.onButtonMenuClick)
        self.Bind(wx.EVT_MENU,
                  self.onMenuItemAddFilesClick,
                  id=self.m_menuItemAddFiles.GetId())
        self.Bind(wx.EVT_MENU,
                  self.onMenuItemImportListClick,
                  id=self.m_menuItemImportList.GetId())
        self.Bind(wx.EVT_MENU,
                  self.onMenuItemExportListClick,
                  id=self.m_menuItemExportList.GetId())
        self.Bind(wx.EVT_MENU,
                  self.onMenuItemClearListClick,
                  id=self.m_menuItemClearList.GetId())
        self.m_buttonClose.Bind(wx.EVT_BUTTON, self.onButtonCloseClick)
        self.m_buttonStart.Bind(wx.EVT_BUTTON, self.onButtonStartClick)
        self.Bind(wx.EVT_MENU,
                  self.onMenuItemsRemoveClick,
                  id=self.m_menuItemsRemove.GetId())
        self.Bind(wx.EVT_MENU,
                  self.onMenuItemsPropsClick,
                  id=self.m_menuItemsProps.GetId())
Example #3
0
    def __init__(self, parent):
        wx.Frame.__init__(self,
                          parent,
                          id=wx.ID_ANY,
                          title=_(u"Subtitle Speech Synchronizer"),
                          pos=wx.DefaultPosition,
                          size=wx.Size(-1, -1),
                          style=wx.DEFAULT_FRAME_STYLE | wx.TAB_TRAVERSAL,
                          name=u"Subtitle Speech Synchronizer")

        self.SetSizeHints(wx.Size(-1, -1), wx.DefaultSize)

        bSizer1 = wx.BoxSizer(wx.VERTICAL)

        self.m_panelMain = wx.Panel(self, wx.ID_ANY, wx.DefaultPosition,
                                    wx.DefaultSize, wx.TAB_TRAVERSAL)
        bSizer2 = wx.BoxSizer(wx.VERTICAL)

        self.m_panel2 = wx.Panel(self.m_panelMain, wx.ID_ANY,
                                 wx.DefaultPosition, wx.DefaultSize,
                                 wx.TAB_TRAVERSAL)
        fgSizer1 = wx.FlexGridSizer(0, 1, 0, 0)
        fgSizer1.AddGrowableCol(0)
        fgSizer1.AddGrowableRow(5)
        fgSizer1.SetFlexibleDirection(wx.BOTH)
        fgSizer1.SetNonFlexibleGrowMode(wx.FLEX_GROWMODE_SPECIFIED)

        self.m_staticText3 = wx.StaticText(self.m_panel2, wx.ID_ANY,
                                           _(u"Subtitles:"),
                                           wx.DefaultPosition, wx.DefaultSize,
                                           0)
        self.m_staticText3.Wrap(-1)

        fgSizer1.Add(self.m_staticText3, 0,
                     wx.EXPAND | wx.TOP | wx.RIGHT | wx.LEFT, 5)

        self.m_panelSub = SubPanel(self.m_panel2, wx.ID_ANY,
                                   wx.DefaultPosition, wx.DefaultSize,
                                   wx.TAB_TRAVERSAL)
        fgSizer1.Add(self.m_panelSub, 1, wx.EXPAND | wx.ALL, 5)

        self.m_staticText31 = wx.StaticText(
            self.m_panel2, wx.ID_ANY,
            _(u"References (video or other subtitles):"), wx.DefaultPosition,
            wx.DefaultSize, 0)
        self.m_staticText31.Wrap(-1)

        fgSizer1.Add(self.m_staticText31, 0,
                     wx.TOP | wx.RIGHT | wx.LEFT | wx.EXPAND, 5)

        self.m_panelRef = RefPanel(self.m_panel2, wx.ID_ANY,
                                   wx.DefaultPosition, wx.DefaultSize,
                                   wx.TAB_TRAVERSAL)
        fgSizer1.Add(self.m_panelRef, 1, wx.EXPAND | wx.ALL, 5)

        fgSizer5 = wx.FlexGridSizer(1, 0, 0, 0)
        fgSizer5.AddGrowableCol(2)
        fgSizer5.AddGrowableRow(0)
        fgSizer5.SetFlexibleDirection(wx.BOTH)
        fgSizer5.SetNonFlexibleGrowMode(wx.FLEX_GROWMODE_SPECIFIED)

        self.m_staticText32 = wx.StaticText(self.m_panel2, wx.ID_ANY,
                                            _(u"Max adjustment:"),
                                            wx.DefaultPosition, wx.DefaultSize,
                                            0)
        self.m_staticText32.Wrap(-1)

        fgSizer5.Add(self.m_staticText32, 0, wx.ALL | wx.ALIGN_CENTER_VERTICAL,
                     5)

        self.m_buttonMaxDistInfo = PopupInfoButton(
            self.m_panel2, wx.ID_ANY, wx.NullBitmap, wx.DefaultPosition,
            wx.DefaultSize, wx.BU_AUTODRAW | 0 | wx.BORDER_NONE)

        self.m_buttonMaxDistInfo.SetBitmap(
            wx.ArtProvider.GetBitmap(wx.ART_TIP, wx.ART_BUTTON))
        fgSizer5.Add(self.m_buttonMaxDistInfo, 0,
                     wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 5)

        self.m_sliderMaxDist = wx.Slider(self.m_panel2, wx.ID_ANY, 30, 5, 180,
                                         wx.DefaultPosition, wx.DefaultSize,
                                         wx.SL_HORIZONTAL)
        fgSizer5.Add(self.m_sliderMaxDist, 0,
                     wx.ALL | wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 5)

        self.m_textMaxDist = wx.StaticText(self.m_panel2, wx.ID_ANY,
                                           _(u"999 min"), wx.DefaultPosition,
                                           wx.DefaultSize, wx.ST_NO_AUTORESIZE)
        self.m_textMaxDist.Wrap(-1)

        fgSizer5.Add(self.m_textMaxDist, 0,
                     wx.ALIGN_CENTER_VERTICAL | wx.ALL | wx.FIXED_MINSIZE, 5)

        fgSizer1.Add(fgSizer5, 1, wx.EXPAND | wx.TOP | wx.BOTTOM, 5)

        fgSizer1.Add((0, 0), 1, wx.EXPAND, 5)

        self.m_staticline1 = wx.StaticLine(self.m_panel2, wx.ID_ANY,
                                           wx.DefaultPosition, wx.DefaultSize,
                                           wx.LI_HORIZONTAL)
        fgSizer1.Add(self.m_staticline1, 0, wx.EXPAND | wx.ALL, 5)

        fgSizer8 = wx.FlexGridSizer(1, 0, 0, 0)
        fgSizer8.SetFlexibleDirection(wx.BOTH)
        fgSizer8.SetNonFlexibleGrowMode(wx.FLEX_GROWMODE_SPECIFIED)

        self.m_buttonMenu = wx.Button(self.m_panel2, wx.ID_ANY, _(u"Menu"),
                                      wx.DefaultPosition, wx.DefaultSize,
                                      wx.BU_EXACTFIT)
        self.m_buttonMenu.SetMinSize(wx.Size(30, -1))

        self.m_menu = wx.Menu()
        self.m_menuItemBatchProcessing = wx.MenuItem(self.m_menu, wx.ID_ANY,
                                                     _(u"Batch processing"),
                                                     wx.EmptyString,
                                                     wx.ITEM_NORMAL)
        self.m_menu.Append(self.m_menuItemBatchProcessing)

        self.m_menu.AppendSeparator()

        self.m_menuItemSettings = wx.MenuItem(self.m_menu, wx.ID_PROPERTIES,
                                              _(u"Settings"), wx.EmptyString,
                                              wx.ITEM_NORMAL)
        self.m_menu.Append(self.m_menuItemSettings)

        self.m_menuItemCheckUpdate = wx.MenuItem(self.m_menu, wx.ID_ANY,
                                                 _(u"Check for updates"),
                                                 wx.EmptyString,
                                                 wx.ITEM_NORMAL)
        self.m_menu.Append(self.m_menuItemCheckUpdate)

        self.m_menu.AppendSeparator()

        self.m_menuItemAbout = wx.MenuItem(self.m_menu, wx.ID_ABOUT,
                                           _(u"About"), wx.EmptyString,
                                           wx.ITEM_NORMAL)
        self.m_menu.Append(self.m_menuItemAbout)

        self.m_buttonMenu.Bind(wx.EVT_RIGHT_DOWN,
                               self.m_buttonMenuOnContextMenu)

        fgSizer8.Add(self.m_buttonMenu, 1, wx.ALL | wx.EXPAND, 5)

        self.m_buttonClose = wx.Button(self.m_panel2, wx.ID_CLOSE, _(u"Close"),
                                       wx.DefaultPosition, wx.DefaultSize, 0)
        fgSizer8.Add(self.m_buttonClose, 1, wx.ALL | wx.EXPAND, 5)

        self.m_buttonStart = wx.Button(self.m_panel2, wx.ID_OK, _(u"Start"),
                                       wx.DefaultPosition, wx.DefaultSize, 0)

        self.m_buttonStart.SetDefault()
        fgSizer8.Add(self.m_buttonStart, 1, wx.ALL | wx.EXPAND, 5)

        fgSizer1.Add(fgSizer8, 1, wx.ALIGN_RIGHT, 5)

        self.m_panel2.SetSizer(fgSizer1)
        self.m_panel2.Layout()
        fgSizer1.Fit(self.m_panel2)
        bSizer2.Add(self.m_panel2, 1, wx.EXPAND | wx.ALL, 5)

        self.m_panelMain.SetSizer(bSizer2)
        self.m_panelMain.Layout()
        bSizer2.Fit(self.m_panelMain)
        bSizer1.Add(self.m_panelMain, 1, wx.EXPAND, 5)

        self.SetSizer(bSizer1)
        self.Layout()
        bSizer1.Fit(self)

        # Connect Events
        self.Bind(wx.EVT_CLOSE, self.onClose)
        self.m_sliderMaxDist.Bind(wx.EVT_SCROLL, self.onSliderMaxDistScroll)
        self.m_buttonMenu.Bind(wx.EVT_BUTTON, self.onButtonMenuClick)
        self.Bind(wx.EVT_MENU,
                  self.onMenuItemBatchProcessingClick,
                  id=self.m_menuItemBatchProcessing.GetId())
        self.Bind(wx.EVT_MENU,
                  self.onMenuItemSettingsClick,
                  id=self.m_menuItemSettings.GetId())
        self.Bind(wx.EVT_MENU,
                  self.onMenuItemCheckUpdateClick,
                  id=self.m_menuItemCheckUpdate.GetId())
        self.Bind(wx.EVT_MENU,
                  self.onMenuItemAboutClick,
                  id=self.m_menuItemAbout.GetId())
        self.m_buttonClose.Bind(wx.EVT_BUTTON, self.onButtonCloseClick)
        self.m_buttonStart.Bind(wx.EVT_BUTTON, self.onButtonStartClick)
Example #4
0
	def __init__( self, parent ):
		wx.Dialog.__init__ ( self, parent, id = wx.ID_ANY, title = _(u"Settings"), pos = wx.DefaultPosition, size = wx.DefaultSize, style = wx.DEFAULT_DIALOG_STYLE )

		self.SetSizeHints( wx.Size( -1,-1 ), wx.DefaultSize )

		bSizer1 = wx.BoxSizer( wx.VERTICAL )

		self.m_panelMain = wx.Panel( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.TAB_TRAVERSAL )
		fgSizer3 = wx.FlexGridSizer( 0, 1, 0, 0 )
		fgSizer3.AddGrowableCol( 0 )
		fgSizer3.AddGrowableRow( 0 )
		fgSizer3.SetFlexibleDirection( wx.BOTH )
		fgSizer3.SetNonFlexibleGrowMode( wx.FLEX_GROWMODE_SPECIFIED )

		self.m_notebook = wx.Notebook( self.m_panelMain, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_panelGeneral = wx.Panel( self.m_notebook, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.TAB_TRAVERSAL )
		fgSizer4 = wx.FlexGridSizer( 0, 2, 0, 0 )
		fgSizer4.AddGrowableCol( 1 )
		fgSizer4.SetFlexibleDirection( wx.BOTH )
		fgSizer4.SetNonFlexibleGrowMode( wx.FLEX_GROWMODE_SPECIFIED )

		self.m_staticText1 = wx.StaticText( self.m_panelGeneral, wx.ID_ANY, _(u"Language:"), wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_staticText1.Wrap( -1 )

		fgSizer4.Add( self.m_staticText1, 0, wx.ALL|wx.ALIGN_RIGHT|wx.ALIGN_CENTER_VERTICAL, 5 )

		m_languageChoices = []
		self.m_language = ChoiceGuiLang( self.m_panelGeneral, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, m_languageChoices, 0 )
		self.m_language.SetSelection( 0 )
		fgSizer4.Add( self.m_language, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL|wx.EXPAND, 5 )

		self.m_staticText2 = wx.StaticText( self.m_panelGeneral, wx.ID_ANY, _(u"Output encoding:"), wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_staticText2.Wrap( -1 )

		fgSizer4.Add( self.m_staticText2, 0, wx.ALL|wx.ALIGN_RIGHT|wx.ALIGN_CENTER_VERTICAL, 5 )

		m_outputCharEncChoices = []
		self.m_outputCharEnc = ChoiceCharEnc( self.m_panelGeneral, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, m_outputCharEncChoices, 0 )
		self.m_outputCharEnc.SetSelection( 0 )
		fgSizer4.Add( self.m_outputCharEnc, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL|wx.EXPAND, 5 )

		self.m_staticText3 = wx.StaticText( self.m_panelGeneral, wx.ID_ANY, _(u"Output filename:"), wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_staticText3.Wrap( -1 )

		fgSizer4.Add( self.m_staticText3, 0, wx.ALL|wx.ALIGN_RIGHT|wx.ALIGN_CENTER_VERTICAL, 5 )

		self.m_appendLangCode = wx.CheckBox( self.m_panelGeneral, wx.ID_ANY, _(u"append language code"), wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_appendLangCode.SetValue(True)
		fgSizer4.Add( self.m_appendLangCode, 0, wx.ALL|wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 5 )

		self.m_textUpdates = wx.StaticText( self.m_panelGeneral, wx.ID_ANY, _(u"Updates:"), wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_textUpdates.Wrap( -1 )

		fgSizer4.Add( self.m_textUpdates, 0, wx.ALL|wx.ALIGN_RIGHT|wx.ALIGN_CENTER_VERTICAL, 5 )

		self.m_autoUpdate = wx.CheckBox( self.m_panelGeneral, wx.ID_ANY, _(u"download updates automatically"), wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_autoUpdate.SetValue(True)
		fgSizer4.Add( self.m_autoUpdate, 0, wx.ALIGN_CENTER_VERTICAL|wx.EXPAND|wx.ALL, 5 )


		fgSizer4.Add( ( 0, 0), 1, wx.EXPAND, 5 )

		self.m_askForUpdate = wx.CheckBox( self.m_panelGeneral, wx.ID_ANY, _(u"ask for update on exit"), wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_askForUpdate.SetValue(True)
		fgSizer4.Add( self.m_askForUpdate, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL|wx.EXPAND, 5 )

		self.m_staticText14 = wx.StaticText( self.m_panelGeneral, wx.ID_ANY, _(u"Show popups:"), wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_staticText14.Wrap( -1 )

		fgSizer4.Add( self.m_staticText14, 0, wx.ALL|wx.ALIGN_RIGHT|wx.ALIGN_CENTER_VERTICAL, 5 )

		self.m_showLanguageNotSelectedPopup1 = wx.CheckBox( self.m_panelGeneral, wx.ID_ANY, _(u"language not selected"), wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_showLanguageNotSelectedPopup1.SetValue(True)
		fgSizer4.Add( self.m_showLanguageNotSelectedPopup1, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL|wx.EXPAND, 5 )


		fgSizer4.Add( ( 0, 0), 1, wx.EXPAND, 5 )

		self.m_showOverwriteExistingFilesConfirmPopup = wx.CheckBox( self.m_panelGeneral, wx.ID_ANY, _(u"confirm file overwrite (in batch mode)"), wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_showOverwriteExistingFilesConfirmPopup.SetValue(True)
		fgSizer4.Add( self.m_showOverwriteExistingFilesConfirmPopup, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL|wx.EXPAND, 5 )


		self.m_panelGeneral.SetSizer( fgSizer4 )
		self.m_panelGeneral.Layout()
		fgSizer4.Fit( self.m_panelGeneral )
		self.m_notebook.AddPage( self.m_panelGeneral, _(u"General"), True )
		self.m_panelSynchro = wx.Panel( self.m_notebook, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.TAB_TRAVERSAL )
		fgSizer5 = wx.FlexGridSizer( 0, 3, 0, 0 )
		fgSizer5.AddGrowableCol( 1 )
		fgSizer5.SetFlexibleDirection( wx.BOTH )
		fgSizer5.SetNonFlexibleGrowMode( wx.FLEX_GROWMODE_SPECIFIED )

		self.m_staticText4 = wx.StaticText( self.m_panelSynchro, wx.ID_ANY, _(u"Max points distance:"), wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_staticText4.Wrap( -1 )

		fgSizer5.Add( self.m_staticText4, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALIGN_RIGHT|wx.ALL, 5 )

		self.m_maxPointDist = wx.SpinCtrlDouble( self.m_panelSynchro, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, wx.SP_ARROW_KEYS, 0, 1000, 2, 0.01 )
		self.m_maxPointDist.SetDigits( 2 )
		fgSizer5.Add( self.m_maxPointDist, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL|wx.EXPAND, 5 )

		self.m_buttonMaxPointDistInfo = PopupInfoButton( self.m_panelSynchro, wx.ID_ANY, wx.NullBitmap, wx.DefaultPosition, wx.DefaultSize, wx.BU_AUTODRAW|0|wx.BORDER_NONE )

		self.m_buttonMaxPointDistInfo.SetBitmap( wx.ArtProvider.GetBitmap( wx.ART_TIP, wx.ART_BUTTON ) )
		fgSizer5.Add( self.m_buttonMaxPointDistInfo, 0, wx.ALIGN_CENTER_VERTICAL|wx.EXPAND|wx.TOP|wx.BOTTOM|wx.RIGHT, 5 )

		self.m_staticText5 = wx.StaticText( self.m_panelSynchro, wx.ID_ANY, _(u"Min points no:"), wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_staticText5.Wrap( -1 )

		fgSizer5.Add( self.m_staticText5, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL|wx.ALIGN_RIGHT, 5 )

		self.m_minPointsNo = wx.SpinCtrl( self.m_panelSynchro, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, wx.SP_ARROW_KEYS, 0, 1000, 20 )
		fgSizer5.Add( self.m_minPointsNo, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL|wx.EXPAND, 5 )

		self.m_buttonMinPointsNoInfo = PopupInfoButton( self.m_panelSynchro, wx.ID_ANY, wx.NullBitmap, wx.DefaultPosition, wx.DefaultSize, wx.BU_AUTODRAW|0|wx.BORDER_NONE )

		self.m_buttonMinPointsNoInfo.SetBitmap( wx.ArtProvider.GetBitmap( wx.ART_TIP, wx.ART_BUTTON ) )
		fgSizer5.Add( self.m_buttonMinPointsNoInfo, 0, wx.ALIGN_CENTER_VERTICAL|wx.EXPAND|wx.TOP|wx.BOTTOM|wx.RIGHT, 5 )

		self.m_staticText6 = wx.StaticText( self.m_panelSynchro, wx.ID_ANY, _(u"Min word length (letters):"), wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_staticText6.Wrap( -1 )

		fgSizer5.Add( self.m_staticText6, 0, wx.ALL|wx.ALIGN_RIGHT|wx.ALIGN_CENTER_VERTICAL, 5 )

		self.m_minWordLen = wx.SpinCtrl( self.m_panelSynchro, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, wx.SP_ARROW_KEYS, 0, 1000, 5 )
		fgSizer5.Add( self.m_minWordLen, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL|wx.EXPAND, 5 )

		self.m_buttonMinWordLenInfo = PopupInfoButton( self.m_panelSynchro, wx.ID_ANY, wx.NullBitmap, wx.DefaultPosition, wx.DefaultSize, wx.BU_AUTODRAW|0|wx.BORDER_NONE )

		self.m_buttonMinWordLenInfo.SetBitmap( wx.ArtProvider.GetBitmap( wx.ART_TIP, wx.ART_BUTTON ) )
		fgSizer5.Add( self.m_buttonMinWordLenInfo, 0, wx.ALIGN_CENTER_VERTICAL|wx.EXPAND|wx.TOP|wx.BOTTOM|wx.RIGHT, 5 )

		self.m_staticText7 = wx.StaticText( self.m_panelSynchro, wx.ID_ANY, _(u"Min words similarity:"), wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_staticText7.Wrap( -1 )

		fgSizer5.Add( self.m_staticText7, 0, wx.ALL|wx.ALIGN_RIGHT|wx.ALIGN_CENTER_VERTICAL, 5 )

		self.m_minWordsSim = wx.SpinCtrlDouble( self.m_panelSynchro, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, wx.SP_ARROW_KEYS, 0, 1, 0.6, 0.01 )
		self.m_minWordsSim.SetDigits( 2 )
		fgSizer5.Add( self.m_minWordsSim, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL|wx.EXPAND, 5 )

		self.m_buttonMinWordSimInfo = PopupInfoButton( self.m_panelSynchro, wx.ID_ANY, wx.NullBitmap, wx.DefaultPosition, wx.DefaultSize, wx.BU_AUTODRAW|0|wx.BORDER_NONE )

		self.m_buttonMinWordSimInfo.SetBitmap( wx.ArtProvider.GetBitmap( wx.ART_TIP, wx.ART_BUTTON ) )
		fgSizer5.Add( self.m_buttonMinWordSimInfo, 0, wx.ALIGN_CENTER_VERTICAL|wx.EXPAND|wx.TOP|wx.BOTTOM|wx.RIGHT, 5 )

		self.m_staticText8 = wx.StaticText( self.m_panelSynchro, wx.ID_ANY, _(u"Min correlation factor:"), wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_staticText8.Wrap( -1 )

		fgSizer5.Add( self.m_staticText8, 0, wx.ALL|wx.ALIGN_RIGHT|wx.ALIGN_CENTER_VERTICAL, 5 )

		self.m_minCorrelation = wx.SpinCtrlDouble( self.m_panelSynchro, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, wx.SP_ARROW_KEYS, 0, 1, 0.9999, 1e-08 )
		self.m_minCorrelation.SetDigits( 4 )
		fgSizer5.Add( self.m_minCorrelation, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL|wx.EXPAND, 5 )

		self.m_buttonMinCorrelationInfo = PopupInfoButton( self.m_panelSynchro, wx.ID_ANY, wx.NullBitmap, wx.DefaultPosition, wx.DefaultSize, wx.BU_AUTODRAW|0|wx.BORDER_NONE )

		self.m_buttonMinCorrelationInfo.SetBitmap( wx.ArtProvider.GetBitmap( wx.ART_TIP, wx.ART_BUTTON ) )
		fgSizer5.Add( self.m_buttonMinCorrelationInfo, 0, wx.ALIGN_CENTER_VERTICAL|wx.EXPAND|wx.TOP|wx.BOTTOM|wx.RIGHT, 5 )

		self.m_staticText9 = wx.StaticText( self.m_panelSynchro, wx.ID_ANY, _(u"Min speech recognition score:"), wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_staticText9.Wrap( -1 )

		fgSizer5.Add( self.m_staticText9, 0, wx.ALL|wx.ALIGN_RIGHT|wx.ALIGN_CENTER_VERTICAL, 5 )

		self.m_minWordProb = wx.SpinCtrlDouble( self.m_panelSynchro, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, wx.SP_ARROW_KEYS, 0, 1, 0.3, 0.01 )
		self.m_minWordProb.SetDigits( 2 )
		fgSizer5.Add( self.m_minWordProb, 0, wx.ALL|wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 5 )

		self.m_buttonMinWordProbInfo = PopupInfoButton( self.m_panelSynchro, wx.ID_ANY, wx.NullBitmap, wx.DefaultPosition, wx.DefaultSize, wx.BU_AUTODRAW|0|wx.BORDER_NONE )

		self.m_buttonMinWordProbInfo.SetBitmap( wx.ArtProvider.GetBitmap( wx.ART_TIP, wx.ART_BUTTON ) )
		fgSizer5.Add( self.m_buttonMinWordProbInfo, 0, wx.ALIGN_CENTER_VERTICAL|wx.TOP|wx.BOTTOM|wx.RIGHT|wx.EXPAND, 5 )

		self.m_staticText16 = wx.StaticText( self.m_panelSynchro, wx.ID_ANY, _(u"Output timing offset:"), wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_staticText16.Wrap( -1 )

		fgSizer5.Add( self.m_staticText16, 0, wx.ALL|wx.ALIGN_RIGHT|wx.ALIGN_CENTER_VERTICAL, 5 )

		self.m_outTimeOffset = wx.SpinCtrlDouble( self.m_panelSynchro, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, wx.SP_ARROW_KEYS, -1e+07, 1e+07, 0, 0.1 )
		self.m_outTimeOffset.SetDigits( 3 )
		fgSizer5.Add( self.m_outTimeOffset, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL|wx.EXPAND, 5 )

		self.m_buttonOutTimeOffsetInfo = PopupInfoButton( self.m_panelSynchro, wx.ID_ANY, wx.NullBitmap, wx.DefaultPosition, wx.DefaultSize, wx.BU_AUTODRAW|0|wx.BORDER_NONE )

		self.m_buttonOutTimeOffsetInfo.SetBitmap( wx.ArtProvider.GetBitmap( wx.ART_TIP, wx.ART_BUTTON ) )
		fgSizer5.Add( self.m_buttonOutTimeOffsetInfo, 0, wx.ALIGN_CENTER_VERTICAL|wx.EXPAND|wx.TOP|wx.BOTTOM|wx.RIGHT, 5 )

		self.m_staticText10 = wx.StaticText( self.m_panelSynchro, wx.ID_ANY, _(u"Extractor jobs no:"), wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_staticText10.Wrap( -1 )

		fgSizer5.Add( self.m_staticText10, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL|wx.ALIGN_RIGHT, 5 )

		fgSizer9 = wx.FlexGridSizer( 1, 2, 0, 0 )
		fgSizer9.AddGrowableCol( 1 )
		fgSizer9.AddGrowableRow( 0 )
		fgSizer9.SetFlexibleDirection( wx.BOTH )
		fgSizer9.SetNonFlexibleGrowMode( wx.FLEX_GROWMODE_SPECIFIED )

		self.m_checkAutoJobsNo = wx.CheckBox( self.m_panelSynchro, wx.ID_ANY, _(u"auto"), wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_checkAutoJobsNo.SetValue(True)
		fgSizer9.Add( self.m_checkAutoJobsNo, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 )

		self.m_jobsNo = wx.SpinCtrl( self.m_panelSynchro, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, wx.SP_ARROW_KEYS, 1, 1000, 4 )
		self.m_jobsNo.Enable( False )

		fgSizer9.Add( self.m_jobsNo, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL|wx.EXPAND, 5 )


		fgSizer5.Add( fgSizer9, 1, wx.EXPAND, 5 )

		self.m_buttonJobsNoInfo = PopupInfoButton( self.m_panelSynchro, wx.ID_ANY, wx.NullBitmap, wx.DefaultPosition, wx.DefaultSize, wx.BU_AUTODRAW|0|wx.BORDER_NONE )

		self.m_buttonJobsNoInfo.SetBitmap( wx.ArtProvider.GetBitmap( wx.ART_TIP, wx.ART_BUTTON ) )
		fgSizer5.Add( self.m_buttonJobsNoInfo, 0, wx.ALIGN_CENTER_VERTICAL|wx.EXPAND|wx.TOP|wx.BOTTOM|wx.RIGHT, 5 )


		self.m_panelSynchro.SetSizer( fgSizer5 )
		self.m_panelSynchro.Layout()
		fgSizer5.Fit( self.m_panelSynchro )
		self.m_notebook.AddPage( self.m_panelSynchro, _(u"Synchronization"), False )
		self.m_panelDebug = wx.Panel( self.m_notebook, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.TAB_TRAVERSAL )
		fgSizer6 = wx.FlexGridSizer( 0, 1, 0, 0 )
		fgSizer6.AddGrowableCol( 0 )
		fgSizer6.AddGrowableRow( 4 )
		fgSizer6.SetFlexibleDirection( wx.BOTH )
		fgSizer6.SetNonFlexibleGrowMode( wx.FLEX_GROWMODE_SPECIFIED )

		self.m_debugOptions = wx.CheckBox( self.m_panelDebug, wx.ID_ANY, _(u"enable advanced debug options"), wx.DefaultPosition, wx.DefaultSize, 0 )
		fgSizer6.Add( self.m_debugOptions, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 )

		fgSizer14 = wx.FlexGridSizer( 0, 2, 0, 0 )
		fgSizer14.AddGrowableCol( 1 )
		fgSizer14.SetFlexibleDirection( wx.BOTH )
		fgSizer14.SetNonFlexibleGrowMode( wx.FLEX_GROWMODE_SPECIFIED )

		self.m_staticText11 = wx.StaticText( self.m_panelDebug, wx.ID_ANY, _(u"Logging level:"), wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_staticText11.Wrap( -1 )

		fgSizer14.Add( self.m_staticText11, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 )

		m_choiceLogLevelChoices = [ _(u"all"), _(u"debug"), _(u"info"), _(u"warning"), _(u"error"), _(u"critical") ]
		self.m_choiceLogLevel = wx.Choice( self.m_panelDebug, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, m_choiceLogLevelChoices, 0 )
		self.m_choiceLogLevel.SetSelection( 3 )
		fgSizer14.Add( self.m_choiceLogLevel, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 )


		fgSizer6.Add( fgSizer14, 1, wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 5 )

		fgSizer7 = wx.FlexGridSizer( 1, 3, 0, 0 )
		fgSizer7.AddGrowableCol( 1 )
		fgSizer7.AddGrowableRow( 0 )
		fgSizer7.SetFlexibleDirection( wx.BOTH )
		fgSizer7.SetNonFlexibleGrowMode( wx.FLEX_GROWMODE_SPECIFIED )

		self.m_checkLogToFile = wx.CheckBox( self.m_panelDebug, wx.ID_ANY, _(u"log to file"), wx.DefaultPosition, wx.DefaultSize, 0 )
		fgSizer7.Add( self.m_checkLogToFile, 0, wx.ALIGN_CENTER_VERTICAL|wx.TOP|wx.BOTTOM|wx.LEFT, 5 )

		self.m_textLogFilePath = wx.TextCtrl( self.m_panelDebug, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_textLogFilePath.Enable( False )

		fgSizer7.Add( self.m_textLogFilePath, 0, wx.ALIGN_CENTER_VERTICAL|wx.EXPAND|wx.TOP|wx.BOTTOM|wx.LEFT, 5 )

		self.m_buttonLogFileSelect = wx.BitmapButton( self.m_panelDebug, wx.ID_ANY, wx.NullBitmap, wx.DefaultPosition, wx.DefaultSize, wx.BU_AUTODRAW|0 )

		self.m_buttonLogFileSelect.SetBitmap( wx.ArtProvider.GetBitmap( wx.ART_FILE_OPEN, wx.ART_BUTTON ) )
		self.m_buttonLogFileSelect.Enable( False )

		fgSizer7.Add( self.m_buttonLogFileSelect, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 )


		fgSizer6.Add( fgSizer7, 1, wx.EXPAND|wx.RIGHT|wx.ALIGN_CENTER_VERTICAL, 5 )

		self.m_staticText12 = wx.StaticText( self.m_panelDebug, wx.ID_ANY, _(u"Filter out logs from modules (one per line):"), wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_staticText12.Wrap( -1 )

		fgSizer6.Add( self.m_staticText12, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 )

		self.m_textLogBlacklist = wx.TextCtrl( self.m_panelDebug, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, wx.TE_MULTILINE )
		fgSizer6.Add( self.m_textLogBlacklist, 0, wx.EXPAND|wx.BOTTOM|wx.RIGHT|wx.LEFT, 5 )


		self.m_panelDebug.SetSizer( fgSizer6 )
		self.m_panelDebug.Layout()
		fgSizer6.Fit( self.m_panelDebug )
		self.m_notebook.AddPage( self.m_panelDebug, _(u"Debug"), False )

		fgSizer3.Add( self.m_notebook, 1, wx.EXPAND|wx.ALL, 5 )

		fgSizer8 = wx.FlexGridSizer( 1, 0, 0, 0 )
		fgSizer8.SetFlexibleDirection( wx.BOTH )
		fgSizer8.SetNonFlexibleGrowMode( wx.FLEX_GROWMODE_SPECIFIED )

		self.m_buttonRestoreDefaults = wx.Button( self.m_panelMain, wx.ID_DEFAULT, _(u"Restore defaults"), wx.DefaultPosition, wx.DefaultSize, 0 )
		fgSizer8.Add( self.m_buttonRestoreDefaults, 0, wx.ALL, 5 )

		self.m_buttonCancel = wx.Button( self.m_panelMain, wx.ID_CANCEL, _(u"Cancel"), wx.DefaultPosition, wx.DefaultSize, 0 )
		fgSizer8.Add( self.m_buttonCancel, 0, wx.ALL, 5 )

		self.m_buttonOk = wx.Button( self.m_panelMain, wx.ID_OK, _(u"OK"), wx.DefaultPosition, wx.DefaultSize, 0 )

		self.m_buttonOk.SetDefault()
		fgSizer8.Add( self.m_buttonOk, 0, wx.ALL, 5 )


		fgSizer3.Add( fgSizer8, 1, wx.ALIGN_RIGHT, 5 )


		self.m_panelMain.SetSizer( fgSizer3 )
		self.m_panelMain.Layout()
		fgSizer3.Fit( self.m_panelMain )
		bSizer1.Add( self.m_panelMain, 1, wx.EXPAND |wx.ALL, 5 )


		self.SetSizer( bSizer1 )
		self.Layout()
		bSizer1.Fit( self )

		# Connect Events
		self.m_checkAutoJobsNo.Bind( wx.EVT_CHECKBOX, self.onCheckAutoJobsNoCheck )
		self.m_checkLogToFile.Bind( wx.EVT_CHECKBOX, self.onCheckLogToFileCheck )
		self.m_buttonLogFileSelect.Bind( wx.EVT_BUTTON, self.onButtonLogFileSelectClick )
		self.m_buttonRestoreDefaults.Bind( wx.EVT_BUTTON, self.onButtonRestoreDefaultsClick )