[Patches] [ python-Patches-1718043 ] textView code cleanup
SourceForge.net
noreply at sourceforge.net
Sun May 13 10:28:17 CEST 2007
Patches item #1718043, was opened at 2007-05-13 11:27
Message generated for change (Settings changed) made by taleinat
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1718043&group_id=5470
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: IDLE
Group: None
Status: Open
Resolution: None
>Priority: 3
Private: No
Submitted By: Tal Einat (taleinat)
Assigned to: Nobody/Anonymous (nobody)
Summary: textView code cleanup
Initial Comment:
I refactored textView a bit:
1) Moved file/text logic out of the TextViewer class. The constructor is now called with the text to be shown, instead of being called with either a filename or text, which made calls to it ugly.
2) Moved duplicate logic found in TextViewer and aboutDialog.py into a utility function, textView.view_file.
3) Created new utility function, textView.view_text (also used by view_file).
4) Updated test code to test both utility functions.
Changed EditorWindow.py and aboutDialog.py to use these new utility functions (improved readability).
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1718043&group_id=5470
More information about the Patches
mailing list