From: Kevin A. <ka...@us...> - 2004-10-05 23:35:33
|
Update of /cvsroot/pythoncard/PythonCard/tools/findfiles In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17000/tools/findfiles Modified Files: findfiles.py findfiles.rsrc.py Log Message: added chkOpenWithResourceEditor button revised layout; I hate sizers! Index: findfiles.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/tools/findfiles/findfiles.py,v retrieving revision 1.84 retrieving revision 1.85 diff -C2 -d -r1.84 -r1.85 *** findfiles.py 5 Oct 2004 23:03:11 -0000 1.84 --- findfiles.py 5 Oct 2004 23:35:14 -0000 1.85 *************** *** 76,80 **** def sizerLayout(self): sizer1 = wx.BoxSizer(wx.VERTICAL) ! sizer2 = wx.FlexGridSizer(5, 4, 3, 10) sizer3 = wx.BoxSizer(wx.HORIZONTAL) --- 76,80 ---- def sizerLayout(self): sizer1 = wx.BoxSizer(wx.VERTICAL) ! sizer2 = wx.FlexGridSizer(3, 4, 3, 10) sizer3 = wx.BoxSizer(wx.HORIZONTAL) *************** *** 86,92 **** --- 86,95 ---- comp = self.components + w, h = comp.lblSearchFor.size + sizer3.Add((w + 10, 5), 0) # spacer sizer3.Add(comp.chkCaseSensitive, 0, chkSizerAttrs, 20) sizer3.Add(comp.chkSearchSubdirectories, 0, chkSizerAttrs, 20) #sizer3.Add(comp.chkVerbose, 0, chkSizerAttrs, 20) + sizer3.Add(comp.chkOpenWithResourceEditor, 0, chkSizerAttrs, 20) sizer3.Add(comp.btnViewFile, 0, chkSizerAttrs, 20) *************** *** 106,119 **** sizer2.Add((5, 5), 0) # spacer - sizer2.Add((5, 5), 0) # spacer - sizer2.Add((5, 5), 0) # spacer - sizer2.Add((5, 5), 0) # spacer - sizer2.Add((5, 5), 0) # spacer - - sizer2.Add((5, 5), 0) # spacer - sizer2.Add(sizer3, 0, vertFlags) - sizer1.Add(sizer2, 0, vertFlags) sizer1.Add((5, 5), 0) # spacer sizer1.Add(comp.listResults, 1, wx.EXPAND) --- 109,116 ---- sizer2.Add((5, 5), 0) # spacer sizer1.Add(sizer2, 0, vertFlags) sizer1.Add((5, 5), 0) # spacer + sizer1.Add(sizer3, 0, vertFlags) + sizer1.Add((5, 5), 0) # spacer sizer1.Add(comp.listResults, 1, wx.EXPAND) *************** *** 387,403 **** # the list of extensions and associated programs to # open with should be user settable ! ## if os.path.splitext(filename)[-1] in ['.py', '.pyw']: ! # KEA 2004-09-30 ! # just use the codeEditor, it is a better text editor anyway ! # though I will probably add an option to open the file with ! # the resourceEditor as well ! program = os.path.join("..", "codeEditor", "codeEditor.pyw") ! if not os.path.exists(program): ! program = os.path.join("..", "codeEditor", "codeEditor.py") ! ## else: ! ## program = os.path.join("..", "textEditor", "textEditor.pyw") ! ## if not os.path.exists(program): ! ## program = os.path.join("..", "textEditor", "textEditor.py") ! # throw an exception if textEditor can't be found? log.debug('program: ' + program) --- 384,396 ---- # the list of extensions and associated programs to # open with should be user settable ! if self.components.chkOpenWithResourceEditor.checked and filename.endswith('.rsrc.py'): ! program = os.path.join("..", "resourceEditor", "resourceEditor.pyw") ! if not os.path.exists(program): ! program = os.path.join("..", "resourceEditor", "resourceEditor.py") ! else: ! program = os.path.join("..", "codeEditor", "codeEditor.pyw") ! if not os.path.exists(program): ! program = os.path.join("..", "codeEditor", "codeEditor.py") ! # throw an exception if program can't be found? log.debug('program: ' + program) Index: findfiles.rsrc.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/tools/findfiles/findfiles.rsrc.py,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** findfiles.rsrc.py 5 Oct 2004 21:49:07 -0000 1.25 --- findfiles.rsrc.py 5 Oct 2004 23:35:14 -0000 1.26 *************** *** 132,138 **** }, {'type':'Button', 'name':'btnViewFile', ! 'position':(341, 90), 'label':'Open Selected File', }, --- 132,145 ---- }, + {'type':'CheckBox', + 'name':'chkOpenWithResourceEditor', + 'position':(341, 90), + 'checked':0, + 'label':'Open .rsrc.py files with resourceEditor', + }, + {'type':'Button', 'name':'btnViewFile', ! 'position':(541, 90), 'label':'Open Selected File', }, |