def _OnApply(self, event): try: val = self.if_dir.GetValue() if val != DIR_CURRENT_ST: getSettings().setValue('output_dir', val) except AttributeError, msg: pass
def _StartSearch(self, event): sourceFiles = self.content if len(sourceFiles) < 1: dlg = wxMessageDialog(self, "No source file specified.\n\n" "Please provide at least one file in the\n" "list of source files.", "No source file", wxOK | wxICON_ERROR) dlg.ShowModal() dlg.Destroy() return dis_sigs = [] for i in range(0, len(self.sigcontent)): if not self.signaturelist.IsChecked(i): dis_sigs.append(self.sigcontent[i]) from FESettings import getSettings if getSettings().getValue('naming_digits') and getSettings().getValue('naming_digits'): # they only come together digits = int(getSettings().getValue('naming_digits')) start = int(getSettings().getValue('naming_start') ) settings = ExecutionSettings(disabled_signatures = dis_sigs, sourceFiles = sourceFiles, dest_folder=self.dest_folder, signatures = signatures.getCopyOfAllSignauteres(), output_level = 0, output_frequency=10000, digits = digits, counterstart = start) else: settings = ExecutionSettings(disabled_signatures = dis_sigs, sourceFiles = sourceFiles, dest_folder=self.dest_folder, signatures = signatures.getCopyOfAllSignauteres(), output_level = 0, output_frequency=10000) progressDialog = ProgressDialog.ProgressDialog(self, -1, "Progress of Search", settings)
def _startImageGenerator(self, event): print "Starting module Image Generator..." parameters = {} from FESettings import getSettings if getSettings().getValue('ig_default_core'): parameters['default_core'] = getSettings().getValue('ig_default_core') if getSettings().getValue('ig_output_dir') and getSettings().getValue('ig_output_filename'): parameters['output_dir'] = os.path.join(getSettings().getValue('ig_output_dir'), getSettings().getValue('ig_output_filename')) imageGenerator = ImageGenerator.ImageGenerator(callback = self, parentControl = self) imageGenerator.start(parameters = parameters)
def _putGeneralOptionsContent(self): panel_top = wx.Panel(self.panel_swap, -1) label_outputdir = wxStaticText (panel_top, -1, "Output Directory") panel_dir = wxPanel(panel_top, -1) try: self.if_dir.Reparent(panel_dir) except AttributeError, msg: if getSettings().getValue('output_dir'): self.if_dir = wxTextCtrl(panel_dir, -1, getSettings().getValue('output_dir')) else: self.if_dir = wxTextCtrl(panel_dir, -1, DIR_CURRENT_ST) self.if_dir.SetEditable(false)
def _putFiletypeOptionsContent(self): panel_top = wx.Panel(self.panel_swap, -1) label_signatures = wxStaticText (panel_top, -1 , "Select file types enabled by default") try: #self.signaturelist.Reparent(panel_top) oldList = self.signaturelist self.signaturelist = wxCheckListBox(panel_top, -1, style = wxLC_REPORT|wxSUNKEN_BORDER) self.signaturelist.Set(self.sigcontent) for i in range(len(self.sigcontent)): self.signaturelist.Check(i, oldList.IsChecked(i)) except AttributeError, msg: self.signaturelist = wxCheckListBox(panel_top, -1, style = wxLC_REPORT|wxSUNKEN_BORDER) thesignatures = FileExtractorCore.getAvailableSignatures() self.sigDict = {} for sig in thesignatures: name = sig[signatures.name] self.sigDict[name] = sig self.sigcontent = self.sigDict.keys() self.signaturelist.Set(self.sigcontent) st = getSettings().getValue('signatues_off') d = {} if st: for x in st.split('|'): d[x.strip()] = x.strip() for i in range(0, len(self.sigcontent)): if d.has_key(self.signaturelist.GetString(i)): self.signaturelist.Check(i, false) else: self.signaturelist.Check(i)
def _putImageGeneratorOptionsContent(self): panel_top = wx.Panel(self.panel_swap, -1) lCore = wx.StaticText(panel_top, -1, "Choose default core") ## choicesCore = CoreManager.getInstance().getListOfCoreNames() choicesCore = imagegenerator.CoreManager.getInstance().getListOfCoreNames() ## choicesCore = ['Win32 dd clone', 'Linux / Unix'] try: self._chCore.Reparent(panel_top) except AttributeError, msg: self._chCore = wx.Choice(panel_top, 721, choices = choicesCore) self._chCore.SetSelection(0) if getSettings().getValue('ig_default_core'): for i in range(len(choicesCore)): if choicesCore[i] == getSettings().getValue('ig_default_core'): self._chCore.SetSelection(i)
def _putFilenameOptionsContent(self): panel_top = wx.Panel(self.panel_swap, -1) lDigits = wxStaticText (panel_top, -1 , "Number of numeric digits in the filename") if getSettings().getValue('naming_digits'): initial = int(getSettings().getValue('naming_digits')) else: initial = 5 self.spinDigits = wx.SpinCtrl (panel_top, 801, str(initial), min = 1, max=100, initial = initial) lStart = wxStaticText (panel_top, -1 , "Number to start with") if getSettings().getValue('naming_start'): start = int(getSettings().getValue('naming_start')) else: start = 0 self.spinStart = wx.SpinCtrl (panel_top, 802, str(start), min = 0, max=10000, initial = start) self.nameExample = wx.TextCtrl(panel_top, -1, "Example: ", style = wx.TE_READONLY ) self.nameExample.Enable(0) self.nameExample.SetBackgroundColour(self.GetBackgroundColour()) self._updateNameExample() panel_fill0 = wx.Panel(panel_top, -1) ## panel_fill0.SetBackgroundColour(wx.RED) panel_fill = wx.Panel(panel_top, -1) ## panel_fill.SetBackgroundColour(wx.RED) topBox = wxBoxSizer(wxVERTICAL) topBox.Add(lDigits,1, wx.ALIGN_BOTTOM | wx.ALIGN_LEFT) topBox.Add(self.spinDigits, 1, wx.EXPAND, wx.TOP) topBox.Add(panel_fill0, 1, wx.EXPAND) topBox.Add(lStart, 1, wx.ALIGN_BOTTOM | wx.ALIGN_LEFT) topBox.Add(self.spinStart, 1, wx.EXPAND, wx.TOP) topBox.Add(panel_fill, 1, wx.EXPAND) topBox.Add(self.nameExample, 1, wx.EXPAND) panel_top.SetAutoLayout(True) panel_top.SetSizer(topBox) panel_top.Layout() self.content_swap_box.Add(panel_top, 1, wx.EXPAND) EVT_SPINCTRL(self, 801, self._updateNameExample) EVT_SPINCTRL(self, 802, self._updateNameExample) self._lastChild = panel_top
pass try: val = '' for x in range(0, self.signaturelist.GetCount()): name = self.signaturelist.GetString(x) if not self.signaturelist.IsChecked(x): val += " %s |" %(name) getSettings().setValue('signatues_off', val) except AttributeError, msg: pass try: val = self.if_dir_img.GetValue() if val != DIR_CURRENT_ST: getSettings().setValue('ig_output_dir', val) except AttributeError, msg: pass try: val = self._chCore.GetStringSelection() getSettings().setValue('ig_default_core', val) getSettings().setValue('ig_location_dd', tools.determineDDPathFromCoreName(val)) except AttributeError, msg: pass try: val = self.spinDigits.GetValue() getSettings().setValue('naming_digits', val) except AttributeError, msg: pass
def __init__(self, parent): AbstractFileExtractorWizardPage.__init__(self, parent, None, None,"newicons/wizard_heading_1.png") contentPane = self.getContentPane() font_headings = wx.Font(9, wx.DEFAULT, wx.NORMAL, wx.BOLD) lSources = wx.StaticText(contentPane, -1, "Choose your source device") lSources.SetFont(font_headings) panel_info = wx.Panel(contentPane, -1) choicesSources = [] self._cbSources = wx.ComboBox(panel_info, -1, choices = choicesSources) bmDir = wx.Bitmap(os.path.join(FESettings.PATH_ICONS, "info.png"), wx.BITMAP_TYPE_PNG); panel_fill = wx.Panel(panel_info, -1) ## panel_fill.SetBackgroundColour(wx.RED) bInfoSources = wx.BitmapButton(panel_info, _ID_INFO_SOURCES, bmDir, size=(28,28)) box = wx.BoxSizer(wx.HORIZONTAL) box.Add(self._cbSources, 16, wx.ALIGN_CENTER) box.Add(panel_fill, 1, wx.EXPAND) box.Add(bInfoSources, 3, wx.ALIGN_CENTER) panel_info.SetAutoLayout(True) panel_info.SetSizer(box) panel_info.Layout() lOutputDir = wx.StaticText (contentPane, -1, "Choose your output directory") lOutputDir.SetFont(font_headings) panel_dir = wx.Panel(contentPane, -1) if getSettings().getValue('output_dir'): import tools self.if_dir = wx.TextCtrl(panel_dir, -1, tools.determineAbsPath(getSettings().getValue('output_dir'))) else: self.if_dir = wx.TextCtrl(panel_dir, -1, 'Working Directory') self.if_dir.SetEditable(False) bmDir = wx.Bitmap(os.path.join(FESettings.PATH_ICONS, "browse.png"), wx.BITMAP_TYPE_PNG); panel_fill = wx.Panel(panel_dir, -1) bChooseDir = wx.BitmapButton(panel_dir, _ID_B_DIR, bmDir, size=(28,28)) box = wx.BoxSizer(wx.HORIZONTAL) box.Add(self.if_dir, 16, wx.ALIGN_CENTER) box.Add(panel_fill, 1, wx.ALIGN_CENTER) box.Add(bChooseDir, 3, wx.ALIGN_CENTER) panel_dir.SetAutoLayout(True) panel_dir.SetSizer(box) panel_dir.Layout() panel_fill1 = wx.Panel(contentPane, -1) panel_fill2 = wx.Panel(contentPane, -1) panel_fill3 = wx.Panel(contentPane, -1) box = wx.BoxSizer(wx.VERTICAL) box.Add(panel_fill1, 3, wx.EXPAND) box.Add(lSources, 2, wx.EXPAND) box.Add(panel_info, 2, wx.EXPAND) box.Add(panel_fill2, 2, wx.EXPAND) box.Add(lOutputDir, 2, wx.EXPAND) box.Add(panel_dir, 2, wx.EXPAND) box.Add(panel_fill3, 7, wx.EXPAND) contentPane.SetAutoLayout(True) contentPane.SetSizer(box) contentPane.Layout()
def __init__(self, parent, ID, title): """ Instantiate a FileExtractorFrame. A wxFrame will be created with the size L{wxSize}(600,400). The position is default position, indicated by the keyword wxDefaultPosition. The events for the buttons and menu items are registered as well. After execution of this constructor your application should initialise the help dialog using 'L{initHelp}()' and display the frame 'frame.Show()' / 'app.SetTopWindow(frame). When using the provided application class (L{FileExtractorSimpleApp}), these steps are done by the module. Keyword arguments: @param parent: The parent window (passed to super class constructor L{wxPython.wx.wxFrame.__init__}) @type parent: L{wxPython.wx.wxFrame} @param ID: The id of the wxControl (passed to super class constructor L{wxPython.wx.wxFrame.__init__}) @type ID: C{int} @param title: The title of the frame (passed to super class constructor L{wxPython.wx.wxFrame.__init__}) @type title: C{String} """ import wx wx.InitAllImageHandlers() # load settings from FESettings import getSettings getSettings().load() wxFrame.__init__(self, parent, ID, title, wxDefaultPosition, wxSize(600, 500)) from FESettings import getSettings if getSettings().getValue('output_dir'): self.dest_folder = getSettings().getValue('output_dir') else: self.dest_folder = "./" self.CreateStatusBar() self.SetStatusText("FileExtractor initialised ...") appLogo = wx.Icon(os.path.join(FESettings.PATH_ICONS, "fileextractor.png"), wx.BITMAP_TYPE_PNG); self.SetIcon(appLogo) panel_outer = wxPanel(self, -1) panel_left = wxPanel(panel_outer, -1) panel_right = wxPanel(panel_outer, -1) label_sources = wxStaticText (panel_left, -1 , "Source File(s)") self.filelist = wxListBox(panel_left, -1, style = wxLC_REPORT|wxSUNKEN_BORDER) self.content = [] self.filelist.Set(self.content) panel_buttons = wxPanel(panel_left, -1) #b1 = wxButton(panel_buttons, _ID_B_ADD, "Add") #b2 = wxButton(panel_buttons, _ID_B_REMOVE, "Remove") panel_fill = wxPanel(panel_buttons, -1) bmAdd = wx.Bitmap(os.path.join(FESettings.PATH_ICONS, "edit_add.png"), wx.BITMAP_TYPE_PNG); b1 = wxBitmapButton(panel_buttons, _ID_B_ADD, bmAdd, size=(30,25)) bmRem = wx.Bitmap(os.path.join(FESettings.PATH_ICONS, "edit_remove.png"), wx.BITMAP_TYPE_PNG); b2 = wxBitmapButton(panel_buttons, _ID_B_REMOVE, bmRem, size=(30,25)) box = wxBoxSizer(wxHORIZONTAL) box.Add(panel_fill, 1, wxALIGN_CENTER | wxEXPAND) box.Add(b1, 1, wxALIGN_CENTER ) box.Add(b2, 1, wxALIGN_CENTER ) panel_buttons.SetAutoLayout(True) panel_buttons.SetSizer(box) panel_buttons.Layout() bmLogo = wx.Bitmap(os.path.join(FESettings.PATH_ICONS, "felogo2.png"), wx.BITMAP_TYPE_PNG); sbmLogo = wxStaticBitmap(panel_left, 567, bmLogo, size = (250, 140)) panel_fill = wxPanel(panel_left, -1) #panel_fill1 = wxPanel(panel_left, -1) box = wxBoxSizer(wxVERTICAL) box.Add(label_sources, 1, wxALIGN_CENTER_VERTICAL | wxALIGN_CENTER_HORIZONTAL) box.Add(self.filelist, 6, wxEXPAND) box.Add(panel_buttons, 2, wxEXPAND ) #| wxALIGN_CENTER_VERTICAL) box.Add(panel_fill, 1, wxEXPAND) box.Add(sbmLogo, 8, wxALIGN_CENTER_VERTICAL | wxALIGN_CENTER_HORIZONTAL) panel_left.SetAutoLayout(True) panel_left.SetSizer(box) panel_left.Layout() # and now the right panel label_signatures = wxStaticText (panel_right, -1 , "Select File Types") self.signaturelist = wxCheckListBox(panel_right, -1, style = wxLC_REPORT|wxSUNKEN_BORDER) thesignatures = FileExtractorCore.getAvailableSignatures() self.sigDict = {} for sig in thesignatures: name = sig[signatures.name] self.sigDict[name] = sig self.sigcontent = self.sigDict.keys() self.signaturelist.Set(self.sigcontent) ## for i in range(0, len(self.sigcontent)): ## self.signaturelist.Check(i) st = getSettings().getValue('signatues_off') d = {} if st: for x in st.split('|'): d[x.strip()] = x.strip() for i in range(0, len(self.sigcontent)): if d.has_key(self.signaturelist.GetString(i)): self.signaturelist.Check(i, false) else: self.signaturelist.Check(i) bmInfo = wx.Bitmap(os.path.join(FESettings.PATH_ICONS, "info.png"), wx.BITMAP_TYPE_PNG); bInfo = wxBitmapButton(panel_right, _ID_B_INFO, bmInfo, size=(60,20)) #bInfo = wxButton(panel_right, _ID_B_INFO, "Info") label_outputdir = wxStaticText (panel_right, -1, "Output Directory") panel_dir = wxPanel(panel_right, -1) if getSettings().getValue('output_dir'): self.if_dir = wxTextCtrl(panel_dir, -1, getSettings().getValue('output_dir')) else: self.if_dir = wxTextCtrl(panel_dir, -1, 'Working Directory') self.if_dir.SetEditable(false) #bChooseDir = wxButton(panel_dir, _ID_B_DIR, "Change Directory") bmDir = wx.Bitmap(os.path.join(FESettings.PATH_ICONS, "browse.png"), wx.BITMAP_TYPE_PNG); panel_fill = wxPanel(panel_dir, -1) bChooseDir = wxBitmapButton(panel_dir, _ID_B_DIR, bmDir, size=(30,30)) box = wxBoxSizer(wxHORIZONTAL) box.Add(self.if_dir, 16, wxALIGN_CENTER) box.Add(panel_fill, 1, wxALIGN_CENTER) box.Add(bChooseDir, 3, wxALIGN_CENTER) panel_dir.SetAutoLayout(True) panel_dir.SetSizer(box) panel_dir.Layout() ## pFill1 = wxPanel(panel_right, -1) pFill2 = wxPanel(panel_right, -1) pFill3 = wxPanel(panel_right, -1) panel_start = wxPanel(panel_right, -1) panel_fills1 = wxPanel(panel_start, -1) ## panel_fills2 = wxPanel(panel_start, -1) bmStart = wx.Bitmap(os.path.join(FESettings.PATH_ICONS, "start4.png"), wx.BITMAP_TYPE_PNG); bStartSearch = wxBitmapButton(panel_start, _ID_B_START, bmStart, size=(105,22)) #bStartSearch = wxButton(panel_start, _ID_B_START, "Start Search") boxs = wxBoxSizer(wxHORIZONTAL) boxs.Add(panel_fills1, 7, wxEXPAND) boxs.Add(bStartSearch, 7, wxEXPAND | wxALIGN_RIGHT) ## boxs.Add(panel_fills2, 1, wxEXPAND) panel_start.SetAutoLayout(True) panel_start.SetSizer(boxs) panel_start.Layout() boxr = wxBoxSizer(wxVERTICAL) boxr.Add(label_signatures, 1, wxALIGN_CENTER_VERTICAL | wxALIGN_CENTER_HORIZONTAL) boxr.Add(self.signaturelist, 10, wxEXPAND) ## boxr.Add(pFill1, 1, wxEXPAND) boxr.Add(bInfo, 2, wxALIGN_CENTER_VERTICAL | wxALIGN_RIGHT) boxr.Add(pFill2, 1, wxEXPAND) boxr.Add(label_outputdir, 1, wxALIGN_BOTTOM| wxALIGN_CENTER_HORIZONTAL) boxr.Add(panel_dir, 2, wxEXPAND | wxALIGN_CENTER_VERTICAL | wxALIGN_LEFT) boxr.Add(pFill3, 1, wxEXPAND) boxr.Add(panel_start, 2, wxEXPAND) panel_right.SetAutoLayout(True) panel_right.SetSizer(boxr) panel_right.Layout() # layout for outer window panel_fill_hor1 = wxPanel(panel_outer, -1) panel_fill_hor2 = wxPanel(panel_outer, -1) panel_fill_hor3 = wxPanel(panel_outer, -1) box = wxBoxSizer(wxHORIZONTAL) box.Add(panel_fill_hor1, 1, wxEXPAND) box.Add(panel_left, 10, wxEXPAND) box.Add(panel_fill_hor2, 1, wxEXPAND) box.Add(panel_right, 10, wxEXPAND) box.Add(panel_fill_hor3, 1, wxEXPAND) panel_outer.SetAutoLayout(True) panel_outer.SetSizer(box) panel_outer.Layout() pFill1 = wxPanel(self, -1) pFill2 = wxPanel(self, -1) ## pFill3 = wxPanel(self, -1) boxo = wxBoxSizer(wxVERTICAL) boxo.Add(pFill1, 1, wxEXPAND) boxo.Add(panel_outer, 20, wxEXPAND) boxo.Add(pFill2, 1, wxEXPAND) ## boxo.Add(panel_start, 1, wxEXPAND) ## boxo.Add(pFill3, 1, wxEXPAND) self.SetAutoLayout(True) self.SetSizer(boxo) self.Layout() fileMenu = wx.Menu() addItem = wx.MenuItem(fileMenu, _ID_ADD, "&Add Source File", "Add Source File to be searched in") bm = wx.Bitmap(os.path.join(FESettings.PATH_ICONS, "small/edit_add.png"), wx.BITMAP_TYPE_PNG); addItem.SetBitmap(bm) fileMenu.AppendItem(addItem) startItem = wx.MenuItem(fileMenu, _ID_START, "&Start Searching", "Go and find your files") bm = wx.Bitmap(os.path.join(FESettings.PATH_ICONS, "small/start.png"), wx.BITMAP_TYPE_PNG); startItem.SetBitmap(bm) fileMenu.AppendItem(startItem) fileMenu.AppendSeparator() prefItem = wx.MenuItem(fileMenu, _ID_OPTIONS, "&Options", "Apply Settings for the program") bm = wx.Bitmap(os.path.join(FESettings.PATH_ICONS, "small/configure.png"), wx.BITMAP_TYPE_PNG); prefItem.SetBitmap(bm) fileMenu.AppendItem(prefItem) fileMenu.AppendSeparator() exitItem = wx.MenuItem(fileMenu, _ID_EXIT, "E&xit", "Terminate the program") bmExit = wx.Bitmap(os.path.join(FESettings.PATH_ICONS, "small/exit.png"), wx.BITMAP_TYPE_PNG); exitItem.SetBitmap(bmExit) fileMenu.AppendItem(exitItem) menuBar = wxMenuBar() menuBar.Append(fileMenu, "&File"); toolsMenu = wxMenu() imageItem = wx.MenuItem(toolsMenu, _ID_IMAGEGENERATOR, "&ImageGenerator...", "Create an image file") bm = wx.Bitmap(os.path.join(FESettings.PATH_ICONS, "small/tools_image.png"), wx.BITMAP_TYPE_PNG); imageItem.SetBitmap(bm) toolsMenu.AppendItem(imageItem) menuBar.Append(toolsMenu, "&Tools") helpMenu = wxMenu() helpItem = wx.MenuItem(helpMenu, _ID_CONTENT, "&Content", "How to use this Program in detail") bm = wx.Bitmap(os.path.join(FESettings.PATH_ICONS, "small/help.png"), wx.BITMAP_TYPE_PNG); helpItem.SetBitmap(bm) helpMenu.AppendItem(helpItem) helpMenu.AppendSeparator() aboutItem = wx.MenuItem(helpMenu, _ID_ABOUT, "&About", "Basic Information about this program") bm = wx.Bitmap(os.path.join(FESettings.PATH_ICONS, "small/info.png"), wx.BITMAP_TYPE_PNG); aboutItem.SetBitmap(bm) helpMenu.AppendItem(aboutItem) menuBar.Append(helpMenu, "&Help") self.SetMenuBar(menuBar) EVT_MENU(self, _ID_ABOUT, self._OnAbout) EVT_MENU(self, _ID_EXIT, self._TimeToQuit) EVT_MENU(self, _ID_ADD, self._AddSourceFile) EVT_MENU(self, _ID_START, self._StartSearch) EVT_MENU(self, _ID_CONTENT, self._showHelp) EVT_MENU(self, _ID_OPTIONS, self._OnSettings) if _MODULE_IMAGE_GENERATOR: EVT_MENU(self, _ID_IMAGEGENERATOR, self._startImageGenerator) else: EVT_MENU(self, _ID_IMAGEGENERATOR, self._NotAvailable) EVT_BUTTON(self, _ID_B_ADD, self._AddSourceFile) EVT_BUTTON(self, _ID_B_REMOVE, self._RemoveSourceFile) EVT_BUTTON(self, _ID_B_INFO, self._InfoSignature) EVT_BUTTON(self, _ID_B_DIR, self._ChangeOutputDir) EVT_BUTTON(self, _ID_B_START, self._StartSearch) # # toolbar # ## import wx ## wx.InitAllImageHandlers() #toolbar = self.CreateToolBar(style = wxNO_BORDER | wxTB_HORIZONTAL) toolbar = self.CreateToolBar(style = wxRAISED_BORDER | wxTB_TEXT | wxTB_HORIZONTAL) self.ToolBar = toolbar toolbar.SetToolBitmapSize((21,21)) # 1. global bmExit = wx.Bitmap(os.path.join(FESettings.PATH_ICONS, "exit.png"), wx.BITMAP_TYPE_PNG); toolbar.DoAddTool(id = 1001, bitmap = bmExit, label="Exit", shortHelp = "Quit FileExtractor") toolbar.AddSeparator() # 2. Actions bmAdd = wx.Bitmap(os.path.join(FESettings.PATH_ICONS, "edit_add.png"), wx.BITMAP_TYPE_PNG); toolbar.DoAddTool(id = 1002, bitmap = bmAdd, label="Add", shortHelp = "Add Source File") bmRem = wx.Bitmap(os.path.join(FESettings.PATH_ICONS, "edit_remove.png"), wx.BITMAP_TYPE_PNG); toolbar.DoAddTool(id = 1003, bitmap = bmRem, label="Remove", shortHelp = "Remove Source File") bmStart = wx.Bitmap(os.path.join(FESettings.PATH_ICONS, "start.png"), wx.BITMAP_TYPE_PNG); toolbar.DoAddTool(id = 1004, bitmap = bmStart, label="Start", shortHelp = "Start recovery") toolbar.AddSeparator() # 3. Tools bmImage = wx.Bitmap(os.path.join(FESettings.PATH_ICONS, "tools_image.png"), wx.BITMAP_TYPE_PNG); toolbar.DoAddTool(id = 1005, bitmap = bmImage, label="Image", shortHelp = "Image your data source") toolbar.AddSeparator() # 4. Configure bmConf = wx.Bitmap(os.path.join(FESettings.PATH_ICONS, "configure.png"), wx.BITMAP_TYPE_PNG); toolbar.DoAddTool(id = 1006, bitmap = bmConf, label="Configure", shortHelp = "Configure FileExtractor") toolbar.AddSeparator() # 5. Help bmHelp = wx.Bitmap(os.path.join(FESettings.PATH_ICONS, "help.png"), wx.BITMAP_TYPE_PNG); toolbar.DoAddTool(id = 1007, bitmap = bmHelp, label="Help", shortHelp = "FileExtractor Help") toolbar.AddSeparator() toolbar.Realize() EVT_TOOL(self, 1001, self._TimeToQuit) EVT_TOOL(self, 1002, self._AddSourceFile) EVT_TOOL(self, 1003, self._RemoveSourceFile) EVT_TOOL(self, 1004, self._StartSearch) if _MODULE_IMAGE_GENERATOR: EVT_TOOL(self, 1005, self._startImageGenerator) else: EVT_TOOL(self, 1005, self._NotAvailable) EVT_TOOL(self, 1006, self._OnSettings) EVT_TOOL(self, 1007, self._showHelp)