From 7bd31dd4f12013772686bbcf9fa4526164ba8586 Mon Sep 17 00:00:00 2001 From: Benny Malengier Date: Tue, 26 Feb 2008 12:35:42 +0000 Subject: [PATCH] 2008-02-26 Benny Malengier * src/ScratchPad.py: bug when dragging sourceref #1833 * src/GrampsDisplay.py: remove whitespace 2008-02-24 Benny Malengier svn: r10125 --- ChangeLog | 6 +++++- src/GrampsDisplay.py | 4 +--- src/ScratchPad.py | 16 ++++++++++++---- 3 files changed, 18 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7aeabe032..dd58820cc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2008-02-26 Benny Malengier + * src/ScratchPad.py: bug when dragging sourceref #1833 + * src/GrampsDisplay.py: remove whitespace + 2008-02-26 Peter Landgren * src/plugins/FanChart.py: Fix for printing in landscape issue #1753 @@ -102,7 +106,7 @@ * src/DataViews/GrampletView.py (GrampletView.restore_gramplet): Fixed restore minimized gramplet -2008-02-24 NOT Douglas S. Blank +2008-02-24 Benny Malengier * src/ViewManager.py: * src/DbLoader.py: Remove os.chdir, no longer needed for relative path diff --git a/src/GrampsDisplay.py b/src/GrampsDisplay.py index eab5f8292..fc910b447 100644 --- a/src/GrampsDisplay.py +++ b/src/GrampsDisplay.py @@ -67,9 +67,7 @@ def help(target, webpage='', section=''): # url(const.URL_MANUAL+'en/') # 3.0 Beta, direct to the wiki 3.0 Manual - - - + if not webpage: link = const.URL_WIKISTRING + const.URL_MANUAL_PAGE + EXTENSION else: diff --git a/src/ScratchPad.py b/src/ScratchPad.py index a83c0b2c4..6cd59feed 100644 --- a/src/ScratchPad.py +++ b/src/ScratchPad.py @@ -28,7 +28,6 @@ import cPickle as pickle import os from xml.sax.saxutils import escape -from gettext import gettext as _ from time import strftime as strftime try: @@ -57,6 +56,7 @@ import TreeTips import DateHandler import GrampsDisplay import ManagedWindow +from TransUtils import sgettext as _ from DdTargets import DdTargets @@ -480,10 +480,18 @@ class ScratchPadSourceRef(ScratchPadGrampsTypeWrapper): srctxtlist = [ note for note in notelist if note.get_type() == gen.lib.NoteType.SOURCE_TEXT] + page = self._obj.get_page() + if not page: + page = _('not available|NA') + text = "" if len(srctxtlist) > 0: - self._value = srctxtlist[0].get_text() - else: - self._value = u"" + text = " ".join(srctxtlist[0].get().split()) + if len(text) > 60: + text = text[:60]+"..." + self._value = _("Volume/Page: %(pag)s -- %(sourcetext)s") % { + 'pag' : page, + 'sourcetext' : text, + } def tooltip(self): global escape