From 37896a0dd336eb5a055105933f1271f190ce915b Mon Sep 17 00:00:00 2001 From: Don Allingham Date: Sat, 7 Jun 2003 03:02:42 +0000 Subject: [PATCH] * src/AutoComp.py Don't build popdown lists if the number of elements exceeds 250. Otherwise, the menus will become unusable, and just consume tons of memory. * src/VersionControl.py Sort revision numbers based on numerical value instead of ASCII value. * src/VersionControl.py Check return values of all subprocesses svn: r1662 --- gramps2/src/AutoComp.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gramps2/src/AutoComp.py b/gramps2/src/AutoComp.py index 8c464f813..3c45acc57 100644 --- a/gramps2/src/AutoComp.py +++ b/gramps2/src/AutoComp.py @@ -145,10 +145,11 @@ class AutoCombo(AutoCompBase): widget.entry.connect("insert-text",self.insert_text) self.vals = [""] self.inb = 0 - if len(plist) > 0: + if plist and len(plist) < 250: widget.set_popdown_strings(plist) else: widget.set_popdown_strings([""]) + widget.get_children()[1].hide() def setval(self,widget): """Callback task called on the button release""" @@ -165,7 +166,7 @@ class AutoCombo(AutoCompBase): """ self.inb = 1 - if len(self.vals) > 0: + if self.vals and len(self.vals) < 250: if self.vals[0] == "": self.entry.set_popdown_strings([self.entry.entry.get_text()]) else: