* src/Assistant.py: Cosmeti c changes.
* src/Exporter.py: Start converting to Assistant. * src/ViewManager.py: Add handler for Export; add hot keys for import and export. svn: r5704
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# Gramps - a GTK+/GNOME based genealogy program
|
||||
#
|
||||
# Copyright (C) 2005 Donald N. Allingham
|
||||
# Copyright (C) 2005-2006 Donald N. Allingham
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@@ -311,13 +311,13 @@ class ViewManager:
|
||||
self.actiongroup.add_actions([
|
||||
# Name Stock Icon Label
|
||||
('SaveAs', gtk.STOCK_SAVE_AS, '_Save As'),
|
||||
('Export', gtk.STOCK_SAVE_AS, '_Export'),
|
||||
('Export', gtk.STOCK_SAVE_AS, '_Export', "<control>e", None, self.export_data),
|
||||
('Abandon', gtk.STOCK_REVERT_TO_SAVED, '_Abandon changes and quit'),
|
||||
('Undo', gtk.STOCK_UNDO, '_Undo', '<control>z' ),
|
||||
('CmpMerge', None, '_Compare and merge'),
|
||||
('FastMerge', None, '_Fast merge'),
|
||||
('ScratchPad', gtk.STOCK_PASTE, '_ScratchPad', None, None, self.scratchpad),
|
||||
('Import', gtk.STOCK_CONVERT, '_Import', None, None, self.import_data),
|
||||
('Import', gtk.STOCK_CONVERT, '_Import', "<control>i", None, self.import_data),
|
||||
('Reports', gtk.STOCK_DND_MULTIPLE, '_Reports', None, None, self.reports_clicked),
|
||||
('Tools', gtk.STOCK_EXECUTE, '_Tools', None, None, self.tools_clicked),
|
||||
('EditMenu', None, '_Edit'),
|
||||
@@ -821,6 +821,10 @@ class ViewManager:
|
||||
while gtk.events_pending():
|
||||
gtk.main_iteration()
|
||||
|
||||
def export_data(self,obj):
|
||||
import Exporter
|
||||
Exporter.Exporter(self.state,self.uistate)
|
||||
|
||||
def import_data(self,obj):
|
||||
choose = gtk.FileChooserDialog(_('GRAMPS: Import database'),
|
||||
self.uistate.window,
|
||||
|
Reference in New Issue
Block a user