* src/gramps_main.py (on_export_activate): Switch to new Exporter.

* src/WriteXML.py: Change registration. Return 1 on success and
0 when on failure.
* src/Utils.py (get_new_filename): Add function.
* src/DbPrompter.py (get_new_filename): Remove function.
* src/Exporter.py: Add to CVS.
* src/Makefile.am: Ship Exporter.py.
* src/Plugins.py (register_export): Change to the new scheme.


svn: r3254
This commit is contained in:
Alex Roitman
2004-07-09 18:19:47 +00:00
parent c75caa9b05
commit 4491c62a4a
8 changed files with 279 additions and 36 deletions

View File

@ -545,3 +545,16 @@ def create_id():
s += chr(val%57+65)
val = int(val/57)
return s
#-------------------------------------------------------------------------
#
#
#
#-------------------------------------------------------------------------
_NEW_NAME_PATTERN = '~/Untitled_%d.%s'
def get_new_filename(ext):
ix = 1
while os.path.isfile(os.path.expanduser(_NEW_NAME_PATTERN % (ix,ext) )):
ix = ix + 1
return os.path.expanduser(_NEW_NAME_PATTERN % (ix,ext))