[Zope-CVS] CVS: Products/ExternalEditor - CHANGES.txt:1.48
README.txt:1.12 zopeedit.py:1.46
Casey Duncan
casey at zope.com
Mon May 3 15:13:05 EDT 2004
Update of /cvs-repository/Products/ExternalEditor
In directory cvs.zope.org:/tmp/cvs-serv18401
Modified Files:
CHANGES.txt README.txt zopeedit.py
Log Message:
Add long_file_name and file_name_separator config options
=== Products/ExternalEditor/CHANGES.txt 1.47 => 1.48 ===
--- Products/ExternalEditor/CHANGES.txt:1.47 Sat Apr 24 17:21:34 2004
+++ Products/ExternalEditor/CHANGES.txt Mon May 3 15:13:03 2004
@@ -1,10 +1,12 @@
External Editor Change Log
Next release
+
+ - Added "long_file_name" and "file_name_separator" config options.
- Fixed bug which happened under Win32 when editing an Excel file
using the Excel plugin where the symptom was a "Call was
- rejected by callee" COM error.
+ rejected by callee" COM error. Thanks to Chris McDonough.
4/23/04 - 0.7.2 Release
=== Products/ExternalEditor/README.txt 1.11 => 1.12 ===
--- Products/ExternalEditor/README.txt:1.11 Mon Mar 31 17:26:17 2003
+++ Products/ExternalEditor/README.txt Mon May 3 15:13:04 2004
@@ -167,7 +167,19 @@
better handling of images and can improve syntax highlighting.
temp_dir -- (path) Path to store local copies of object data being
- edited. Defaults to operating system temp directory.
+ edited. Defaults to operating system temp directory. *Note: this setting
+ has no apparent effect on Windows* 8^(
+
+ long_file_name -- (1 or 0) Whether to include the whole path to the
+ object including the hostname in the file name (the default) or just the
+ id of the object being edited. Turn this option off for shorter file
+ names in your editors, and for editors that don't like long names.
+
+ file_name_separator -- (string) Character or characters used to separate
+ path elements in long files names used by external editor. Defaults to
+ a comma (,). This must be a legal character for use in file names on
+ your platorm (i.e., don't use a path separator character!). This option
+ is ignored if 'long_file_name' is set to 0.
Sections
=== Products/ExternalEditor/zopeedit.py 1.45 => 1.46 ===
--- Products/ExternalEditor/zopeedit.py:1.45 Fri Apr 23 12:09:42 2004
+++ Products/ExternalEditor/zopeedit.py Mon May 3 15:13:04 2004
@@ -126,10 +126,15 @@
self.host)
# Write the body of the input file to a separate file
- content_file = urllib.unquote('-%s%s' % (self.host, self.path))\
- .replace('/', ',').replace(':',',').replace(' ','_')
+ if int(self.options.get('long_file_name', 1)):
+ sep = self.options.get('file_name_separator', ',')
+ content_file = urllib.unquote('-%s%s' % (self.host, self.path))
+ content_file = content_file.replace(
+ '/', sep).replace(':',sep).replace(' ','_')
+ else:
+ content_file = '-' + urllib.unquote(self.path.split('/')[-1])
+
extension = self.options.get('extension')
-
if extension and not content_file.endswith(extension):
content_file = content_file + extension
More information about the Zope-CVS
mailing list