From 9408e706d0080bd0fdd5670c609c5254841e5b11 Mon Sep 17 00:00:00 2001 From: Don Allingham Date: Sat, 30 Sep 2006 03:56:29 +0000 Subject: [PATCH] * src/FilterEditor/_EditRule.py: limit source name in menu display to 40 characters (#451) svn: r7337 --- gramps2/ChangeLog | 2 ++ gramps2/src/FilterEditor/_EditRule.py | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index 0aea12c7f..830da37bf 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -1,4 +1,6 @@ 2006-09-29 Don Allingham + * src/FilterEditor/_EditRule.py: limit source name in menu display + to 40 characters (#451) * src/GrampsDb/_ReadGedcom.py: Handle the Place/Address combination for events diff --git a/gramps2/src/FilterEditor/_EditRule.py b/gramps2/src/FilterEditor/_EditRule.py index 0877984e5..f20e639c0 100644 --- a/gramps2/src/FilterEditor/_EditRule.py +++ b/gramps2/src/FilterEditor/_EditRule.py @@ -184,7 +184,10 @@ class MySource(gtk.ComboBox): for src_handle in self.db.get_source_handles(sort_handles=True): src = self.db.get_source_from_handle(src_handle) self.slist.append(src.get_gramps_id()) - store.append(row=["%s [%s]" % (src.get_title(),src.get_gramps_id())]) + title = src.get_title() + if len(title) > 44: + title = title[:40] + "..." + store.append(row=["%s [%s]" % (title,src.get_gramps_id())]) self.set_active(0) self.show()