From 329e8b6f3db3ba9c75de661e570982f332e42ab9 Mon Sep 17 00:00:00 2001 From: Alex Roitman Date: Sat, 19 Feb 2005 19:05:48 +0000 Subject: [PATCH] * src/ArgHandler.py: Command line support for geneweb import and export; Fix command line exports for gedcom, XML, and package. * src/Exporter.py (help): Point to correct manual section. * src/const.py.in: Add a constant for geneweb mime type name. * src/plugins/WriteFtree.py: Support wizard and fix command line mode. * src/plugins/writeftree.glade: Support export wizard. * src/plugins/WritePkg.py: Support wizard and fix command line mode. * src/plugins/ImportGeneWeb.py: Comment out debugging messages. * src/plugins/WriteGeneWeb.py: Support for command-line export. svn: r4054 --- ChangeLog | 11 ++ src/ArgHandler.py | 88 ++++++------- src/Exporter.py | 9 +- src/const.py.in | 9 +- src/plugins/ImportGeneWeb.py | 108 ++++++++-------- src/plugins/WriteFtree.py | 238 ++++++++++++++++++----------------- src/plugins/WriteGeneWeb.py | 22 ++-- src/plugins/WritePkg.py | 35 +++--- src/plugins/writeftree.glade | 126 ++++++------------- 9 files changed, 297 insertions(+), 349 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2d8a88169..c49e101d8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2005-02-19 Alex Roitman + * src/ArgHandler.py: Command line support for geneweb import + and export; Fix command line exports for gedcom, XML, and package. + * src/Exporter.py (help): Point to correct manual section. + * src/const.py.in: Add a constant for geneweb mime type name. + * src/plugins/WriteFtree.py: Support wizard and fix command line mode. + * src/plugins/writeftree.glade: Support export wizard. + * src/plugins/WritePkg.py: Support wizard and fix command line mode. + * src/plugins/ImportGeneWeb.py: Comment out debugging messages. + * src/plugins/WriteGeneWeb.py: Support for command-line export. + 2005-02-18 Don Allingham * src/EditPerson.py: more readonly patches * src/EventEdit.py: more readonly patches diff --git a/src/ArgHandler.py b/src/ArgHandler.py index 87dafc514..502ec68b0 100644 --- a/src/ArgHandler.py +++ b/src/ArgHandler.py @@ -152,7 +152,7 @@ class ArgHandler: if opt_ix do nothing, leave as is pass - def select_clicked(): # File is lost => select a file to replace the lost one def fs_close_window(obj): @@ -150,7 +152,7 @@ class PackageWriter: fs_top.destroy() #--------------------------------------------------------------- - t = TarFile.TarFile(filename) + t = TarFile.TarFile(self.filename) mtime = time.time() # Write media files first, since the database may be modified @@ -190,18 +192,17 @@ class PackageWriter: g.close() t.close() + return 1 #------------------------------------------------------------------------- # # Register the plugin # #------------------------------------------------------------------------- -_mime_type = 'application/x-gramps-package' -_filter = gtk.FileFilter() -_filter.set_name(_('GRAMPS packages')) -_filter.add_mime_type(_mime_type) -_ext_list = ('.gpkg',) +_title = _('GRAM_PS package') +_description = _('GRAMPS package is an archived XML database together with the media object files.') +_config = None +_filename = 'gpkg' from PluginMgr import register_export - -register_export(writeData,_filter,_ext_list) +register_export(writeData,_title,_description,_config,_filename) diff --git a/src/plugins/writeftree.glade b/src/plugins/writeftree.glade index 25e341e60..6e3e733d2 100644 --- a/src/plugins/writeftree.glade +++ b/src/plugins/writeftree.glade @@ -13,6 +13,11 @@ 480 True False + True + False + False + GDK_WINDOW_TYPE_HINT_DIALOG + GDK_GRAVITY_NORTH_WEST False @@ -34,6 +39,7 @@ gtk-cancel True GTK_RELIEF_NORMAL + True 0 @@ -47,6 +53,7 @@ gtk-ok True GTK_RELIEF_NORMAL + True 0 @@ -60,6 +67,7 @@ gtk-help True GTK_RELIEF_NORMAL + True -11 @@ -104,48 +112,16 @@ 12 True - 5 + 3 3 False 6 12 - + True - ftree_export - 10 - Export GEDCOM - False - True - - - - True - True - True - True - 0 - - True - * - False - - - - - 1 - 3 - 1 - 2 - - - - - - - True - <b>Filename</b> + <b>Options</b> False True GTK_JUSTIFY_LEFT @@ -166,51 +142,6 @@ - - - True - <b>Options</b> - False - True - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - - - 0 - 3 - 2 - 3 - fill - - - - - - - True - True - _Restrict data on living people - True - GTK_RELIEF_NORMAL - True - False - True - - - 1 - 3 - 4 - 5 - fill - - - - True @@ -225,16 +156,13 @@ 0 0 filter - - - 1 2 - 3 - 4 - fill + 1 + 2 + shrink|fill @@ -254,8 +182,30 @@ 2 3 - 3 - 4 + 1 + 2 + + + + + + + True + True + _Restrict data on living people + True + GTK_RELIEF_NORMAL + True + True + False + True + + + 1 + 3 + 2 + 3 + fill