store last export type
svn: r8866
This commit is contained in:
parent
33ca7e7df8
commit
39eee89295
@ -1,3 +1,7 @@
|
|||||||
|
2007-08-25 Benny Malengier <bm@cage.ugent.be>
|
||||||
|
* src/Config/_GrampsConfigKeys.py : store last export type
|
||||||
|
* src/ExportAssistant.py : use last export type
|
||||||
|
|
||||||
2007-08-25 Brian Matherly <brian@gramps-project.org>
|
2007-08-25 Brian Matherly <brian@gramps-project.org>
|
||||||
* src/ReportBase/_ReportUtils.py: 0001121: Output relationship type
|
* src/ReportBase/_ReportUtils.py: 0001121: Output relationship type
|
||||||
correctly in Detailed descendant and ancestor reports (improved)
|
correctly in Detailed descendant and ancestor reports (improved)
|
||||||
|
@ -111,6 +111,7 @@ PAPER_PREFERENCE = ('preferences', 'paper-preference', 2)
|
|||||||
RECENT_FILE = ('paths', 'recent-file', 2)
|
RECENT_FILE = ('paths', 'recent-file', 2)
|
||||||
RECENT_IMPORT_DIR = ('paths', 'recent-import-dir', 2)
|
RECENT_IMPORT_DIR = ('paths', 'recent-import-dir', 2)
|
||||||
RECENT_EXPORT_DIR = ('paths', 'recent-export-dir', 2)
|
RECENT_EXPORT_DIR = ('paths', 'recent-export-dir', 2)
|
||||||
|
RECENT_EXPORT_TYPE = ('behavior', 'recent-export-type', 1)
|
||||||
NAME_FORMAT = ('preferences', 'name-format', 1)
|
NAME_FORMAT = ('preferences', 'name-format', 1)
|
||||||
REPORT_DIRECTORY = ('paths', 'report-directory', 2)
|
REPORT_DIRECTORY = ('paths', 'report-directory', 2)
|
||||||
RESEARCHER_ADDR = ('researcher', 'researcher-addr', 2)
|
RESEARCHER_ADDR = ('researcher', 'researcher-addr', 2)
|
||||||
@ -213,6 +214,7 @@ default_value = {
|
|||||||
RECENT_FILE : '',
|
RECENT_FILE : '',
|
||||||
RECENT_IMPORT_DIR : '',
|
RECENT_IMPORT_DIR : '',
|
||||||
RECENT_EXPORT_DIR : '',
|
RECENT_EXPORT_DIR : '',
|
||||||
|
RECENT_EXPORT_TYPE : 1,
|
||||||
NAME_FORMAT : 1,
|
NAME_FORMAT : 1,
|
||||||
REPORT_DIRECTORY : './',
|
REPORT_DIRECTORY : './',
|
||||||
RESEARCHER_ADDR : '',
|
RESEARCHER_ADDR : '',
|
||||||
|
@ -180,6 +180,8 @@ class ExportAssistant(gtk.Assistant, ManagedWindow.ManagedWindow) :
|
|||||||
tip = gtk.Tooltips()
|
tip = gtk.Tooltips()
|
||||||
|
|
||||||
group = None
|
group = None
|
||||||
|
recent_type = Config.get(Config.RECENT_EXPORT_TYPE)
|
||||||
|
|
||||||
for ix in range(len(self.exportformats)):
|
for ix in range(len(self.exportformats)):
|
||||||
title = self.exportformats[ix][1]
|
title = self.exportformats[ix][1]
|
||||||
description= self.exportformats[ix][2]
|
description= self.exportformats[ix][2]
|
||||||
@ -190,6 +192,8 @@ class ExportAssistant(gtk.Assistant, ManagedWindow.ManagedWindow) :
|
|||||||
self.format_buttons.append(button)
|
self.format_buttons.append(button)
|
||||||
table.attach(button,0,2,2*ix,2*ix+1)
|
table.attach(button,0,2,2*ix,2*ix+1)
|
||||||
tip.set_tip(button,description)
|
tip.set_tip(button,description)
|
||||||
|
if ix == recent_type :
|
||||||
|
button.set_active(True)
|
||||||
|
|
||||||
box.add(table)
|
box.add(table)
|
||||||
|
|
||||||
@ -214,8 +218,6 @@ class ExportAssistant(gtk.Assistant, ManagedWindow.ManagedWindow) :
|
|||||||
|
|
||||||
self.append_page(page)
|
self.append_page(page)
|
||||||
self.set_page_header_image(page, self.logo)
|
self.set_page_header_image(page, self.logo)
|
||||||
ix = self.get_selected_format_index()
|
|
||||||
self.set_page_title(page, self.exportformats[ix][3][0])
|
|
||||||
self.set_page_complete(page, False)
|
self.set_page_complete(page, False)
|
||||||
self.set_page_type(page, gtk.ASSISTANT_PAGE_CONTENT)
|
self.set_page_type(page, gtk.ASSISTANT_PAGE_CONTENT)
|
||||||
|
|
||||||
@ -240,6 +242,7 @@ class ExportAssistant(gtk.Assistant, ManagedWindow.ManagedWindow) :
|
|||||||
'''
|
'''
|
||||||
option = self.get_selected_format_index()
|
option = self.get_selected_format_index()
|
||||||
vbox = self.get_nth_page(_ExportAssistant_pages['options'])
|
vbox = self.get_nth_page(_ExportAssistant_pages['options'])
|
||||||
|
self.set_page_title(vbox, self.exportformats[option][3][0])
|
||||||
# remove present content of the vbox
|
# remove present content of the vbox
|
||||||
vbox.foreach(vbox.remove)
|
vbox.foreach(vbox.remove)
|
||||||
# add new content
|
# add new content
|
||||||
@ -518,6 +521,7 @@ class ExportAssistant(gtk.Assistant, ManagedWindow.ManagedWindow) :
|
|||||||
sys.getfilesystemencoding())
|
sys.getfilesystemencoding())
|
||||||
Config.set(Config.RECENT_EXPORT_DIR,os.path.split(filename)[0])
|
Config.set(Config.RECENT_EXPORT_DIR,os.path.split(filename)[0])
|
||||||
ix = self.get_selected_format_index()
|
ix = self.get_selected_format_index()
|
||||||
|
Config.set(Config.RECENT_EXPORT_TYPE, ix)
|
||||||
if self.exportformats[ix][3]:
|
if self.exportformats[ix][3]:
|
||||||
success = self.exportformats[ix][0](self.dbstate.db,
|
success = self.exportformats[ix][0](self.dbstate.db,
|
||||||
filename,self.person,
|
filename,self.person,
|
||||||
|
Loading…
Reference in New Issue
Block a user