From: Kevin A. <ka...@us...> - 2004-05-05 18:07:18
|
Update of /cvsroot/pythoncard/PythonCard/tools/codeEditor In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11898 Modified Files: codeEditor.py Log Message: replaced lambda with standard setChecked method Index: codeEditor.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/tools/codeEditor/codeEditor.py,v retrieving revision 1.112 retrieving revision 1.113 diff -C2 -d -r1.112 -r1.113 *** codeEditor.py 5 May 2004 16:53:50 -0000 1.112 --- codeEditor.py 5 May 2004 18:07:09 -0000 1.113 *************** *** 321,327 **** path = os.path.join(self.configPath, USERCONFIG) self.config = util.readAndEvalFile(path) - menuBar = self.GetMenuBar() - checkMenuItem = lambda menu, menuItem, checked, _menuBar=menuBar: \ - _menuBar.FindItemById(_menuBar.FindMenuItem(menu, menuItem)).Check(checked) if self.config != {}: if 'position' in self.config: --- 321,324 ---- *************** *** 336,355 **** if 'view_white_space' in self.config: self.components.document.SetViewWhiteSpace(self.config['view_white_space']) ! checkMenuItem('View', 'Whitespace', self.config['view_white_space']) if 'indentation_guides' in self.config: self.components.document.SetIndentationGuides(self.config['indentation_guides']) ! checkMenuItem('View', 'Indentation guides', self.config['indentation_guides']) if 'right_edge_guide' in self.config: self.components.document.SetEdgeMode(self.config['right_edge_guide']) ! checkMenuItem('View', 'Right edge indicator', self.config['right_edge_guide']) if 'view_EOL' in self.config: self.components.document.SetViewEOL(self.config['view_EOL']) ! checkMenuItem('View', 'End-of-line markers', self.config['view_EOL']) if 'line_numbers' in self.config: self.components.document.lineNumbersVisible = self.config['line_numbers'] ! checkMenuItem('View', 'Line Numbers', self.config['line_numbers']) if 'folding' in self.config: self.components.document.codeFoldingVisible = self.config['folding'] ! checkMenuItem('View', 'Code Folding', self.config['folding']) if 'macros' in self.config: --- 333,352 ---- if 'view_white_space' in self.config: self.components.document.SetViewWhiteSpace(self.config['view_white_space']) ! self.menuBar.setChecked('menuViewWhitespace', self.config['view_white_space']) if 'indentation_guides' in self.config: self.components.document.SetIndentationGuides(self.config['indentation_guides']) ! self.menuBar.setChecked('menuViewIndentationGuides', self.config['indentation_guides']) if 'right_edge_guide' in self.config: self.components.document.SetEdgeMode(self.config['right_edge_guide']) ! self.menuBar.setChecked('menuViewRightEdgeIndicator', self.config['right_edge_guide']) if 'view_EOL' in self.config: self.components.document.SetViewEOL(self.config['view_EOL']) ! self.menuBar.setChecked('menuViewEndOfLineMarkers', self.config['view_EOL']) if 'line_numbers' in self.config: self.components.document.lineNumbersVisible = self.config['line_numbers'] ! self.menuBar.setChecked('menuViewLineNumbers', self.config['line_numbers']) if 'folding' in self.config: self.components.document.codeFoldingVisible = self.config['folding'] ! self.menuBar.setChecked('menuViewCodeFolding', self.config['folding']) if 'macros' in self.config: |