merged r19899 through r20053 of trunk

svn: r20056
This commit is contained in:
Benny Malengier
2012-07-23 13:42:56 +00:00
93 changed files with 27664 additions and 25532 deletions

View File

@@ -1063,13 +1063,13 @@ class GrampsPreferences(ConfigureDialog):
self.add_spinner(table,
_('Date about range'),
0, 'behavior.date-about-range', (20, 80))
0, 'behavior.date-about-range', (1, 80))
self.add_spinner(table,
_('Date after range'),
1, 'behavior.date-after-range', (20, 80))
1, 'behavior.date-after-range', (1, 80))
self.add_spinner(table,
_('Date before range'),
2, 'behavior.date-before-range', (20, 80))
2, 'behavior.date-before-range', (1, 80))
self.add_spinner(table,
_('Maximum age probably alive'),
3, 'behavior.max-age-prob-alive', (80, 140))

View File

@@ -932,7 +932,7 @@ class ShowResults(ManagedWindow):
gid = source.get_gramps_id()
elif self.namespace == 'Citation':
citation = self.db.get_citation_from_handle(handle)
name = citation.get_title()
name = citation.get_page()
gid = citation.get_gramps_id()
elif self.namespace == 'Place':
place = self.db.get_place_from_handle(handle)
@@ -966,7 +966,7 @@ class ShowResults(ManagedWindow):
elif self.namespace == 'Source':
sortname = self.db.get_source_from_handle(handle).get_title()
elif self.namespace == 'Citation':
sortname = self.db.get_citation_from_handle(handle).get_title()
sortname = self.db.get_citation_from_handle(handle).get_page()
elif self.namespace == 'Place':
sortname = self.db.get_place_from_handle(handle).get_title()
elif self.namespace == 'Media':

View File

@@ -3,6 +3,7 @@
#
# Copyright (C) 2007 Brian G. Matherly
# Copyright (C) 2010 Jakim Friant
# Copyright (C) 2012 Paul Franklin
#
# 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
@@ -173,7 +174,10 @@ class DocReportDialog(ReportDialog):
ext = ""
else:
spath = self.get_default_directory()
base = "%s.%s" % (self.report_name, ext)
if self.options.get_output():
base = os.path.basename(self.options.get_output())
else:
base = "%s.%s" % (self.report_name, ext)
spath = os.path.normpath(os.path.join(spath, base))
self.target_fileentry.set_filename(spath)

View File

@@ -6,6 +6,7 @@
# Copyright (C) 2009 Gary Burton
# Contribution 2009 by Bob Ham <rah@bash.sh>
# Copyright (C) 2010 Jakim Friant
# Copyright (C) 2012 Paul Franklin
#
# 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
@@ -165,7 +166,10 @@ class GraphvizReportDialog(ReportDialog):
ext = ""
else:
spath = self.get_default_directory()
base = "%s%s" % (self.report_name, ext)
if self.options.get_output():
base = os.path.basename(self.options.get_output())
else:
base = "%s%s" % (self.report_name, ext)
spath = os.path.normpath(os.path.join(spath, base))
self.target_fileentry.set_filename(spath)

View File

@@ -5,6 +5,7 @@
# Copyright (C) 2007-2008 Brian G. Matherly
# Copyright (C) 2008 Peter Landgren
# Copyright (C) 2010 Jakim Friant
# Copyright (C) 2012 Paul Franklin
#
# 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
@@ -35,6 +36,7 @@ Paragraph/Font style editor
from gen.ggettext import sgettext as _
import logging
log = logging.getLogger(".")
import re
#------------------------------------------------------------------------
#
@@ -215,8 +217,13 @@ class StyleEditor(object):
self.top.get_object('bgcolor').connect('color-set', self.bg_color_set)
self.top.get_object("style_name").set_text(name)
names = self.style.get_paragraph_style_names()
names.reverse()
def _alphanumeric_sort(iterable):
""" sort the given iterable in the way that humans expect """
convert = lambda text: int(text) if text.isdigit() else text
sort_key = lambda k: [convert(c) for c in re.split('([0-9]+)', k)]
return sorted(iterable, key=sort_key)
names = _alphanumeric_sort(self.style.get_paragraph_style_names())
for p_name in names:
self.plist.add([p_name], self.style.get_paragraph_style(p_name))
self.plist.select_row(0)

View File

@@ -1577,13 +1577,13 @@ class ViewManager(CLIManager):
self.uistate.progress.show()
self.uistate.push_message(self.dbstate, _("Making backup..."))
if include.get_active():
from ExportPkg import PackageWriter
from exportpkg import PackageWriter
writer = PackageWriter(self.dbstate.db, filename,
User(error=ErrorDialog,
callback=self.pulse_progressbar))
writer.export()
else:
from ExportXml import XmlWriter
from exportxml import XmlWriter
writer = XmlWriter(self.dbstate.db,
User(error=ErrorDialog,
callback=self.pulse_progressbar),

View File

@@ -331,6 +331,10 @@ class NavigationView(PageView):
defperson = self.dbstate.db.get_default_person()
if defperson:
self.change_active(defperson.get_handle())
else:
from gui.dialog import WarningDialog
WarningDialog(_("No Home Person"),
_("You need to set a 'default person' to go to."))
def jump(self):
"""