Add right-click support for media in detail views

svn: r23277
This commit is contained in:
Doug Blank 2013-10-08 12:02:55 +00:00
parent c6585a8fac
commit 1b6232e380
2 changed files with 8 additions and 0 deletions

View File

@ -131,6 +131,7 @@ class PersonDetails(Gramplet):
Display empty details when no person is selected.
"""
self.photo.set_image(None)
self.photo.set_uistate(None, None)
self.name.set_text(_('No active person'))
self.clear_table()
@ -245,7 +246,10 @@ class PersonDetails(Gramplet):
if mime_type and mime_type.startswith("image"):
self.photo.set_image(full_path, mime_type,
media_ref.get_rectangle())
self.photo.set_uistate(self.uistate, object_handle)
else:
self.photo.set_image(None)
self.photo.set_uistate(None, None)
else:
self.photo.set_image(None)
self.photo.set_uistate(None, None)

View File

@ -130,6 +130,7 @@ class PlaceDetails(Gramplet):
Display empty details when no repository is selected.
"""
self.photo.set_image(None)
self.photo.set_uistate(None, None)
self.title.set_text('')
self.clear_table()
@ -159,7 +160,10 @@ class PlaceDetails(Gramplet):
if mime_type and mime_type.startswith("image"):
self.photo.set_image(full_path, mime_type,
media_ref.get_rectangle())
self.photo.set_uistate(self.uistate, object_handle)
else:
self.photo.set_image(None)
self.photo.set_uistate(None, None)
else:
self.photo.set_image(None)
self.photo.set_uistate(None, None)