* src/ImageSelect.py

Fixed typo in on_drag_begin

* src/RelLib.py
Check for the existance of the witness member of an Event. ZODB
stores an object, so elements read in from old databases may not
have the element, which can cause a traceback.


* 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: r1663
This commit is contained in:
Don Allingham 2003-06-07 14:11:52 +00:00
parent d160f97666
commit 6bbbf046d1
2 changed files with 6 additions and 2 deletions

View File

@ -253,7 +253,7 @@ class Gallery(ImageSelect):
""" """
def on_drag_begin(self,obj,context): def on_drag_begin(self,obj,context):
if const.dnd_iamges: if const.dnd_images:
mtype = self.sel_obj.getReference().getMimeType() mtype = self.sel_obj.getReference().getMimeType()
name = Utils.thumb_path(self.db.getSavePath(),self.sel_obj.getReference()) name = Utils.thumb_path(self.db.getSavePath(),self.sel_obj.getReference())
pix = gtk.gdk.pixbuf_new_from_file(name) pix = gtk.gdk.pixbuf_new_from_file(name)

View File

@ -1361,7 +1361,11 @@ class Event(DataObj):
self.name = source.name self.name = source.name
self.cause = source.cause self.cause = source.cause
if source.witness: if source.witness:
# old ZODB database may not have this element
try:
self.witness = source.witness[:] self.witness = source.witness[:]
except:
self.witness = None
else: else:
self.witness = None self.witness = None
else: else: