* src/plugins/IndivComplete.py: Bring book item options in sync
with the standalone options. svn: r3647
This commit is contained in:
parent
cec7b8246a
commit
f8e6c8db28
@ -1,3 +1,7 @@
|
|||||||
|
2004-10-18 Julio Sanchez <julio.sanchez@gmail.com>
|
||||||
|
* src/plugins/IndivComplete.py: Bring book item options in sync
|
||||||
|
with the standalone options.
|
||||||
|
|
||||||
2004-10-18 Alex Roitman <shura@alex.neuro.umn.edu>
|
2004-10-18 Alex Roitman <shura@alex.neuro.umn.edu>
|
||||||
* src/docgen/OpenSpreadSheet.py (write_text): Escape special
|
* src/docgen/OpenSpreadSheet.py (write_text): Escape special
|
||||||
XML characters.
|
XML characters.
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
#
|
#
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
import os
|
import os
|
||||||
|
from gettext import gettext as _
|
||||||
|
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
@ -40,7 +41,6 @@ import Report
|
|||||||
import GenericFilter
|
import GenericFilter
|
||||||
import Errors
|
import Errors
|
||||||
from QuestionDialog import ErrorDialog
|
from QuestionDialog import ErrorDialog
|
||||||
from gettext import gettext as _
|
|
||||||
|
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
@ -55,10 +55,9 @@ import gtk
|
|||||||
#
|
#
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
_person_handle = ""
|
_person_handle = ""
|
||||||
_max_gen = 0
|
|
||||||
_pg_brk = 0
|
|
||||||
_filter_num = 0
|
_filter_num = 0
|
||||||
_options = ( _person_handle, _max_gen, _pg_brk, _filter_num )
|
_use_srcs = 0
|
||||||
|
_options = ( _person_id, _filter_num, _use_srcs )
|
||||||
|
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
@ -590,14 +589,12 @@ class IndivCompleteBareReportDialog(Report.BareReportDialog):
|
|||||||
|
|
||||||
Report.BareReportDialog.__init__(self,database,self.person)
|
Report.BareReportDialog.__init__(self,database,self.person)
|
||||||
|
|
||||||
self.max_gen = int(self.options[1])
|
self.filter_num = int(self.options[1])
|
||||||
self.pg_brk = int(self.options[2])
|
self.use_srcs = int(self.options[2])
|
||||||
self.filter_num = int(self.options[3])
|
|
||||||
self.new_person = None
|
self.new_person = None
|
||||||
|
|
||||||
self.generations_spinbox.set_value(self.max_gen)
|
|
||||||
self.pagebreak_checkbox.set_active(self.pg_brk)
|
|
||||||
self.filter_combo.set_history(self.filter_num)
|
self.filter_combo.set_history(self.filter_num)
|
||||||
|
self.use_srcs_checkbox.set_active(self.use_srcs)
|
||||||
|
|
||||||
self.window.run()
|
self.window.run()
|
||||||
|
|
||||||
@ -607,6 +604,11 @@ class IndivCompleteBareReportDialog(Report.BareReportDialog):
|
|||||||
def get_report_filters(self):
|
def get_report_filters(self):
|
||||||
return _get_report_filters(self.person)
|
return _get_report_filters(self.person)
|
||||||
|
|
||||||
|
def add_user_options(self):
|
||||||
|
self.use_srcs_checkbox = gtk.CheckButton(_('Include Source Information'))
|
||||||
|
self.use_srcs_checkbox.show()
|
||||||
|
self.add_option('',self.use_srcs_checkbox)
|
||||||
|
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
# Customization hooks
|
# Customization hooks
|
||||||
@ -638,9 +640,15 @@ class IndivCompleteBareReportDialog(Report.BareReportDialog):
|
|||||||
if self.new_person:
|
if self.new_person:
|
||||||
self.person = self.new_person
|
self.person = self.new_person
|
||||||
self.filter_num = self.filter_combo.get_history()
|
self.filter_num = self.filter_combo.get_history()
|
||||||
self.options = ( self.person.get_handle(), self.max_gen, self.pg_brk, self.filter_num )
|
self.use_srcs = self.use_srcs_checkbox.get_active()
|
||||||
|
self.options = ( self.person.getId(), self.filter_num, self.use_srcs )
|
||||||
self.style_name = self.selected_style.get_name()
|
self.style_name = self.selected_style.get_name()
|
||||||
|
|
||||||
|
def get_report_generations(self):
|
||||||
|
"""Return the default number of generations to start the
|
||||||
|
spinbox (zero to disable) and whether or not to include the
|
||||||
|
'page break between generations' check box"""
|
||||||
|
return (0, 0)
|
||||||
|
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
@ -653,15 +661,12 @@ def write_book_item(database,person,doc,options,newpage=0):
|
|||||||
try:
|
try:
|
||||||
if options[0]:
|
if options[0]:
|
||||||
person = database.get_person_from_handle(options[0])
|
person = database.get_person_from_handle(options[0])
|
||||||
max_gen = int(options[1])
|
filter_num = int(options[1])
|
||||||
pg_brk = int(options[2])
|
|
||||||
filter_num = int(options[3])
|
|
||||||
filters = _get_report_filters(person)
|
filters = _get_report_filters(person)
|
||||||
filter = filters[filter_num]
|
the_filter = filters[filter_num]
|
||||||
# act = self.use_srcs.get_active()
|
act = int(options[2])
|
||||||
|
|
||||||
return IndivComplete(database, person, None, doc, filter, 0, newpage)
|
return IndivComplete(database, person, None, doc, the_filter, act, newpage)
|
||||||
# return IndivComplete(database, person, None, doc, filter, act, newpage)
|
|
||||||
except Errors.ReportError, msg:
|
except Errors.ReportError, msg:
|
||||||
(m1,m2) = msg.messages()
|
(m1,m2) = msg.messages()
|
||||||
ErrorDialog(m1,m2)
|
ErrorDialog(m1,m2)
|
||||||
|
Loading…
Reference in New Issue
Block a user