* src/MediaView.py: Skip empty selections.

svn: r5621
This commit is contained in:
Alex Roitman 2005-12-23 02:00:35 +00:00
parent 6fafacf793
commit 79a520b949
2 changed files with 9 additions and 1 deletions

View File

@ -1,6 +1,7 @@
2005-12-22 Alex Roitman <shura@gramps-project.org>
* test/RunAllTests.py: Change header.
* src/EventEdit.py: Fix build_ methods.
* src/MediaView.py: Skip empty selections.
2005-12-22 Don Allingham <don@gramps-project.org>
* src/DisplayState.py: window management improvements

View File

@ -105,6 +105,8 @@ class MediaView(PageView.ListView):
def row_change(self,obj):
handle = self.first_selected()
if not handle:
return
obj = self.dbstate.db.get_object_from_handle(handle)
pix = ImgManip.get_thumbnail_image(obj.get_path())
self.image.set_from_pixbuf(pix)
@ -136,6 +138,7 @@ class MediaView(PageView.ListView):
def on_double_click(self,obj,event):
handle = self.first_selected()
if handle:
place = self.dbstate.db.get_place_from_handle(handle)
#EditPlace.EditPlace(place,self.dbstate, self.uistate)
@ -147,6 +150,8 @@ class MediaView(PageView.ListView):
def remove(self,obj):
handle = self.first_selected()
if not handle:
return
the_lists = Utils.get_media_referents(handle,self.dbstate.db)
ans = ImageSelect.DeleteMediaQuery(handle,self.dbstate.db,the_lists)
@ -163,6 +168,8 @@ class MediaView(PageView.ListView):
def edit(self,obj):
handle = self.first_selected()
if not handle:
return
obj = self.dbstate.db.get_object_from_handle(handle)
if obj.get_mime_type():