* gramps.spec.in: pkill gconfd to fix settings
svn: r3959
This commit is contained in:
parent
0ca604ac37
commit
dceb6c2851
@ -1,3 +1,6 @@
|
|||||||
|
2005-01-24 Don Allingham <dallingham@users.sourceforge.net>
|
||||||
|
* gramps.spec.in: pkill gconfd to fix settings
|
||||||
|
|
||||||
2005-01-24 Alex Roitman <shura@alex.neuro.umn.edu>
|
2005-01-24 Alex Roitman <shura@alex.neuro.umn.edu>
|
||||||
* src/Report.py: Fix adding styles and calling doc.init().
|
* src/Report.py: Fix adding styles and calling doc.init().
|
||||||
* src/BaseDoc.py: Restructure header; Replace tabs with spaces.
|
* src/BaseDoc.py: Restructure header; Replace tabs with spaces.
|
||||||
|
@ -95,6 +95,7 @@ GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source` \
|
|||||||
/usr/bin/update-desktop-database %{_datadir}/applications &> /dev/null
|
/usr/bin/update-desktop-database %{_datadir}/applications &> /dev/null
|
||||||
/usr/bin/update-mime-database %{_datadir}/mime &> /dev/null
|
/usr/bin/update-mime-database %{_datadir}/mime &> /dev/null
|
||||||
if which scrollkeeper-update>/dev/null 2>&1; then scrollkeeper-update; fi
|
if which scrollkeeper-update>/dev/null 2>&1; then scrollkeeper-update; fi
|
||||||
|
pkill gconfd
|
||||||
|
|
||||||
%postun
|
%postun
|
||||||
if which scrollkeeper-update>/dev/null 2>&1; then scrollkeeper-update; fi
|
if which scrollkeeper-update>/dev/null 2>&1; then scrollkeeper-update; fi
|
||||||
|
@ -74,31 +74,34 @@ class OptionList:
|
|||||||
def set_options(self,options):
|
def set_options(self,options):
|
||||||
"""
|
"""
|
||||||
Sets the whole bunch of options for the OptionList.
|
Sets the whole bunch of options for the OptionList.
|
||||||
|
@param options: list of options to set.
|
||||||
options: list of options to set.
|
@type options: list
|
||||||
"""
|
"""
|
||||||
self.options = options
|
self.options = options
|
||||||
|
|
||||||
def get_options(self):
|
def get_options(self):
|
||||||
"""
|
"""
|
||||||
Returns the whole bunch of options for the OptionList.
|
Returns the whole bunch of options for the OptionList.
|
||||||
|
@returns: list of options
|
||||||
|
@rtype: list
|
||||||
"""
|
"""
|
||||||
return self.options
|
return self.options
|
||||||
|
|
||||||
def set_option(self,name,value):
|
def set_option(self,name,value):
|
||||||
"""
|
"""
|
||||||
Sets a particular option in the OptionList.
|
Sets a particular option in the OptionList.
|
||||||
|
@param name: name of the option to set.
|
||||||
name: name of the option to set.
|
@type name: str
|
||||||
value: value of the option to set.
|
@param value: value of the option to set.
|
||||||
|
@type str
|
||||||
"""
|
"""
|
||||||
self.options[name] = value
|
self.options[name] = value
|
||||||
|
|
||||||
def remove_option(self,name):
|
def remove_option(self,name):
|
||||||
"""
|
"""
|
||||||
Removes a particular option from the OptionList.
|
Removes a particular option from the OptionList.
|
||||||
|
@param name: name of the option to remove.
|
||||||
name: name of the option to remove.
|
@type name: str
|
||||||
"""
|
"""
|
||||||
if self.options.has_key(name):
|
if self.options.has_key(name):
|
||||||
del self.options[name]
|
del self.options[name]
|
||||||
@ -106,76 +109,92 @@ class OptionList:
|
|||||||
def get_option(self,name):
|
def get_option(self,name):
|
||||||
"""
|
"""
|
||||||
Returns the value of a particular option in the OptionList.
|
Returns the value of a particular option in the OptionList.
|
||||||
|
@param name: name of the option to retrieve
|
||||||
|
@type name: str
|
||||||
|
@returns: value associated with the passed option
|
||||||
|
@rtype: str
|
||||||
"""
|
"""
|
||||||
return self.options.get(name,None)
|
return self.options.get(name,None)
|
||||||
|
|
||||||
def set_style_name(self,style_name):
|
def set_style_name(self,style_name):
|
||||||
"""
|
"""
|
||||||
Sets the style name for the OptionList.
|
Sets the style name for the OptionList.
|
||||||
|
@param style_name: name of the style to set.
|
||||||
style_name: name of the style to set.
|
@type style_name: str
|
||||||
"""
|
"""
|
||||||
self.style_name = style_name
|
self.style_name = style_name
|
||||||
|
|
||||||
def get_style_name(self):
|
def get_style_name(self):
|
||||||
"""
|
"""
|
||||||
Returns the style name of the OptionList.
|
Returns the style name of the OptionList.
|
||||||
|
@returns: string representing the style name
|
||||||
|
@rtype: str
|
||||||
"""
|
"""
|
||||||
return self.style_name
|
return self.style_name
|
||||||
|
|
||||||
def set_paper_name(self,paper_name):
|
def set_paper_name(self,paper_name):
|
||||||
"""
|
"""
|
||||||
Sets the paper name for the OptionList.
|
Sets the paper name for the OptionList.
|
||||||
|
@param paper_name: name of the paper to set.
|
||||||
style_name: name of the paper to set.
|
@type paper_name: str
|
||||||
"""
|
"""
|
||||||
self.paper_name = paper_name
|
self.paper_name = paper_name
|
||||||
|
|
||||||
def get_paper_name(self):
|
def get_paper_name(self):
|
||||||
"""
|
"""
|
||||||
Returns the paper name of the OptionList.
|
Returns the paper name of the OptionList.
|
||||||
|
@returns: returns the paper name
|
||||||
|
@rtype: str
|
||||||
"""
|
"""
|
||||||
return self.paper_name
|
return self.paper_name
|
||||||
|
|
||||||
def set_orientation(self,orientation):
|
def set_orientation(self,orientation):
|
||||||
"""
|
"""
|
||||||
Sets the orientation for the OptionList.
|
Sets the orientation for the OptionList.
|
||||||
|
@param orientation: orientation to set. Possible values are
|
||||||
orientation: orientation to set.
|
BaseDoc.PAPER_LANDSCAPE or BaseDoc.PAPER_PORTRAIT
|
||||||
|
@type orientation: int
|
||||||
"""
|
"""
|
||||||
self.orientation = orientation
|
self.orientation = orientation
|
||||||
|
|
||||||
def get_orientation(self):
|
def get_orientation(self):
|
||||||
"""
|
"""
|
||||||
Returns the orientation for the OptionList.
|
Returns the orientation for the OptionList.
|
||||||
|
@returns: returns the selected orientation. Valid values are
|
||||||
|
BaseDoc.PAPER_LANDSCAPE or BaseDoc.PAPER_PORTRAIT
|
||||||
|
@rtype: int
|
||||||
"""
|
"""
|
||||||
return self.orientation
|
return self.orientation
|
||||||
|
|
||||||
def set_template_name(self,template_name):
|
def set_template_name(self,template_name):
|
||||||
"""
|
"""
|
||||||
Sets the template name for the OptionList.
|
Sets the template name for the OptionList.
|
||||||
|
@param template_name: name of the template to set.
|
||||||
template_name: name of the template to set.
|
@type template_name: str
|
||||||
"""
|
"""
|
||||||
self.template_name = template_name
|
self.template_name = template_name
|
||||||
|
|
||||||
def get_template_name(self):
|
def get_template_name(self):
|
||||||
"""
|
"""
|
||||||
Returns the template name of the OptionList.
|
Returns the template name of the OptionList.
|
||||||
|
@returns: template name
|
||||||
|
@rtype: str
|
||||||
"""
|
"""
|
||||||
return self.template_name
|
return self.template_name
|
||||||
|
|
||||||
def set_format_name(self,format_name):
|
def set_format_name(self,format_name):
|
||||||
"""
|
"""
|
||||||
Sets the format name for the OptionList.
|
Sets the format name for the OptionList.
|
||||||
|
@param format_name: name of the format to set.
|
||||||
format_name: name of the format to set.
|
@type format_name: str
|
||||||
"""
|
"""
|
||||||
self.format_name = format_name
|
self.format_name = format_name
|
||||||
|
|
||||||
def get_format_name(self):
|
def get_format_name(self):
|
||||||
"""
|
"""
|
||||||
Returns the format name of the OptionList.
|
Returns the format name of the OptionList.
|
||||||
|
@returns: returns the format name
|
||||||
|
@rtype: str
|
||||||
"""
|
"""
|
||||||
return self.format_name
|
return self.format_name
|
||||||
|
|
||||||
@ -197,8 +216,8 @@ class OptionListCollection:
|
|||||||
"""
|
"""
|
||||||
Creates an OptionListCollection instance from the list defined
|
Creates an OptionListCollection instance from the list defined
|
||||||
in the specified file.
|
in the specified file.
|
||||||
|
@param filename: XML file that contains option definitions
|
||||||
filename: XML file that contains option definitions
|
@type filename: str
|
||||||
"""
|
"""
|
||||||
|
|
||||||
if not filename or not os.path.isfile(filename):
|
if not filename or not os.path.isfile(filename):
|
||||||
@ -216,55 +235,70 @@ class OptionListCollection:
|
|||||||
def get_option_list_map(self):
|
def get_option_list_map(self):
|
||||||
"""
|
"""
|
||||||
Returns the map of reports names to option lists.
|
Returns the map of reports names to option lists.
|
||||||
|
@returns: Returns the map of reports names to option lists.
|
||||||
|
@rtype: dictionary
|
||||||
"""
|
"""
|
||||||
return self.option_list_map
|
return self.option_list_map
|
||||||
|
|
||||||
def get_option_list(self,name):
|
def get_option_list(self,name):
|
||||||
"""
|
"""
|
||||||
Returns the option_list associated with the report name
|
Returns the option_list associated with the report name
|
||||||
|
@param name: name associated with the desired report.
|
||||||
name: name associated with the desired report.
|
@type name: str
|
||||||
|
@returns: returns the option list associated with the name,
|
||||||
|
or None of no such option exists
|
||||||
|
@rtype: str
|
||||||
"""
|
"""
|
||||||
return self.option_list_map.get(name,None)
|
return self.option_list_map.get(name,None)
|
||||||
|
|
||||||
def get_report_names(self):
|
def get_report_names(self):
|
||||||
"Returns a list of all the report names in the OptionListCollection"
|
"""
|
||||||
|
Returns a list of all the report names in the OptionListCollection
|
||||||
|
@returns: returns the list of report names
|
||||||
|
@rtype: list
|
||||||
|
"""
|
||||||
return self.option_list_map.keys()
|
return self.option_list_map.keys()
|
||||||
|
|
||||||
def set_option_list(self,name,option_list):
|
def set_option_list(self,name,option_list):
|
||||||
"""
|
"""
|
||||||
Adds or replaces an option_list in the OptionListCollection.
|
Adds or replaces an option_list in the OptionListCollection.
|
||||||
|
@param name: name assocated with the report to add or replace.
|
||||||
name: name assocated with the report to add or replace.
|
@type name: str
|
||||||
option_list: option_list
|
@param option_list: list of options
|
||||||
|
@type option_list: str
|
||||||
"""
|
"""
|
||||||
self.option_list_map[name] = option_list
|
self.option_list_map[name] = option_list
|
||||||
|
|
||||||
def set_last_paper_name(self,paper_name):
|
def set_last_paper_name(self,paper_name):
|
||||||
"""
|
"""
|
||||||
Sets the last paper name used for the any report in this collection.
|
Sets the last paper name used for the any report in this collection.
|
||||||
|
@param paper_name: name of the paper to set.
|
||||||
paper_name: name of the paper to set.
|
@type paper_name: str
|
||||||
"""
|
"""
|
||||||
self.last_paper_name = paper_name
|
self.last_paper_name = paper_name
|
||||||
|
|
||||||
def get_last_paper_name(self):
|
def get_last_paper_name(self):
|
||||||
"""
|
"""
|
||||||
Returns the last paper name used for the any report in this collection.
|
Returns the last paper name used for the any report in this collection.
|
||||||
|
@returns: returns the name of the paper
|
||||||
|
@rtype: str
|
||||||
"""
|
"""
|
||||||
return self.last_paper_name
|
return self.last_paper_name
|
||||||
|
|
||||||
def set_last_orientation(self,orientation):
|
def set_last_orientation(self,orientation):
|
||||||
"""
|
"""
|
||||||
Sets the last orientation used for the any report in this collection.
|
Sets the last orientation used for the any report in this collection.
|
||||||
|
@param orientation: orientation to set.
|
||||||
orientation: orientation to set.
|
@type orientation: int
|
||||||
"""
|
"""
|
||||||
self.last_orientation = orientation
|
self.last_orientation = orientation
|
||||||
|
|
||||||
def get_last_orientation(self):
|
def get_last_orientation(self):
|
||||||
"""
|
"""
|
||||||
Returns the last orientation used for the any report in this collection.
|
Returns the last orientation used for the any report in this
|
||||||
|
collection.
|
||||||
|
@returns: last orientation used
|
||||||
|
@rtype: int
|
||||||
"""
|
"""
|
||||||
return self.last_orientation
|
return self.last_orientation
|
||||||
|
|
||||||
@ -676,7 +710,7 @@ class ReportOptions:
|
|||||||
self.options_help
|
self.options_help
|
||||||
This is a dictionary whose keys are option names
|
This is a dictionary whose keys are option names
|
||||||
and values are 3- or 4- lists or tuples:
|
and values are 3- or 4- lists or tuples:
|
||||||
('=example","Short description",VALUES,DO_PREPEND)
|
('=example",'Short description',VALUES,DO_PREPEND)
|
||||||
The VALUES is either a single string (in that case
|
The VALUES is either a single string (in that case
|
||||||
the DO_PREPEND does not matter) or a list/tuple of
|
the DO_PREPEND does not matter) or a list/tuple of
|
||||||
strings to list. In that case, if DO_PREPEND evaluates
|
strings to list. In that case, if DO_PREPEND evaluates
|
||||||
|
@ -66,9 +66,9 @@ def draw_pie_chart(doc, center_x, center_y, radius, data, start=0):
|
|||||||
@type center_x: float
|
@type center_x: float
|
||||||
@param center_y: y coordinate in centimeters where the center of the pie
|
@param center_y: y coordinate in centimeters where the center of the pie
|
||||||
chart should be. 0 is the top edge of the document
|
chart should be. 0 is the top edge of the document
|
||||||
@param center_y: float
|
@type center_y: float
|
||||||
@type radius: radius of the pie chart. The pie charts width and height will
|
@param radius: radius of the pie chart. The pie charts width and height
|
||||||
be twice this value.
|
will be twice this value.
|
||||||
@type radius: float
|
@type radius: float
|
||||||
@param data: List of tuples containing the data to be plotted. The values
|
@param data: List of tuples containing the data to be plotted. The values
|
||||||
are (graphics_format, value), where graphics_format is a BaseDoc
|
are (graphics_format, value), where graphics_format is a BaseDoc
|
||||||
@ -99,10 +99,10 @@ def draw_legend(doc, start_x, start_y, data):
|
|||||||
@type doc: BaseDoc derived class
|
@type doc: BaseDoc derived class
|
||||||
@param start_x: x coordinate in centimeters where the left hand corner
|
@param start_x: x coordinate in centimeters where the left hand corner
|
||||||
of the legend is placed. 0 is the left hand edge of the document.
|
of the legend is placed. 0 is the left hand edge of the document.
|
||||||
@type center_x: float
|
@type start_x: float
|
||||||
@param center_y: y coordinate in centimeters where the top of the legend
|
@param start_y: y coordinate in centimeters where the top of the legend
|
||||||
should be. 0 is the top edge of the document
|
should be. 0 is the top edge of the document
|
||||||
@param center_y: float
|
@type start_y: float
|
||||||
@param data: List of tuples containing the data to be used to create the
|
@param data: List of tuples containing the data to be used to create the
|
||||||
legend. In order to be compatible with the graph plots, the first and
|
legend. In order to be compatible with the graph plots, the first and
|
||||||
third values of the tuple used. The format is (graphics_format, value,
|
third values of the tuple used. The format is (graphics_format, value,
|
||||||
@ -131,7 +131,7 @@ def draw_vertical_bar_graph(doc, format, start_x, start_y, height, width, data):
|
|||||||
@type start_x: float
|
@type start_x: float
|
||||||
@param start_y: y coordinate in centimeters where the top of the chart
|
@param start_y: y coordinate in centimeters where the top of the chart
|
||||||
should be. 0 is the top edge of the document
|
should be. 0 is the top edge of the document
|
||||||
@param start_y: float
|
@type start_y: float
|
||||||
@param height: height of the graph in centimeters
|
@param height: height of the graph in centimeters
|
||||||
@type height: float
|
@type height: float
|
||||||
@param width: width of the graph in centimeters
|
@param width: width of the graph in centimeters
|
||||||
@ -172,7 +172,7 @@ def estimate_age(db, person):
|
|||||||
@param db: GRAMPS database to which the Person object belongs
|
@param db: GRAMPS database to which the Person object belongs
|
||||||
@type db: GrampsDbBase
|
@type db: GrampsDbBase
|
||||||
@param person: Person object to calculate the age of
|
@param person: Person object to calculate the age of
|
||||||
@type db: Person
|
@type person: Person
|
||||||
@returns: tuple containing the lower and upper bounds of the
|
@returns: tuple containing the lower and upper bounds of the
|
||||||
person's age, or (-1,-1) if it could not be determined.
|
person's age, or (-1,-1) if it could not be determined.
|
||||||
@rtype: tuple
|
@rtype: tuple
|
||||||
@ -234,7 +234,7 @@ def sanitize_person(db,person):
|
|||||||
@type db: GrampsDbBase
|
@type db: GrampsDbBase
|
||||||
@param person: source Person object that will be copied with
|
@param person: source Person object that will be copied with
|
||||||
privacy records removed
|
privacy records removed
|
||||||
@type db: Person
|
@type person: Person
|
||||||
@returns: 'cleansed' Person object
|
@returns: 'cleansed' Person object
|
||||||
@rtype: Person
|
@rtype: Person
|
||||||
"""
|
"""
|
||||||
|
Loading…
Reference in New Issue
Block a user