Add right-click support for media in detail views
svn: r23277
This commit is contained in:
parent
c6585a8fac
commit
1b6232e380
@ -131,6 +131,7 @@ class PersonDetails(Gramplet):
|
|||||||
Display empty details when no person is selected.
|
Display empty details when no person is selected.
|
||||||
"""
|
"""
|
||||||
self.photo.set_image(None)
|
self.photo.set_image(None)
|
||||||
|
self.photo.set_uistate(None, None)
|
||||||
self.name.set_text(_('No active person'))
|
self.name.set_text(_('No active person'))
|
||||||
self.clear_table()
|
self.clear_table()
|
||||||
|
|
||||||
@ -245,7 +246,10 @@ class PersonDetails(Gramplet):
|
|||||||
if mime_type and mime_type.startswith("image"):
|
if mime_type and mime_type.startswith("image"):
|
||||||
self.photo.set_image(full_path, mime_type,
|
self.photo.set_image(full_path, mime_type,
|
||||||
media_ref.get_rectangle())
|
media_ref.get_rectangle())
|
||||||
|
self.photo.set_uistate(self.uistate, object_handle)
|
||||||
else:
|
else:
|
||||||
self.photo.set_image(None)
|
self.photo.set_image(None)
|
||||||
|
self.photo.set_uistate(None, None)
|
||||||
else:
|
else:
|
||||||
self.photo.set_image(None)
|
self.photo.set_image(None)
|
||||||
|
self.photo.set_uistate(None, None)
|
||||||
|
@ -130,6 +130,7 @@ class PlaceDetails(Gramplet):
|
|||||||
Display empty details when no repository is selected.
|
Display empty details when no repository is selected.
|
||||||
"""
|
"""
|
||||||
self.photo.set_image(None)
|
self.photo.set_image(None)
|
||||||
|
self.photo.set_uistate(None, None)
|
||||||
self.title.set_text('')
|
self.title.set_text('')
|
||||||
self.clear_table()
|
self.clear_table()
|
||||||
|
|
||||||
@ -159,7 +160,10 @@ class PlaceDetails(Gramplet):
|
|||||||
if mime_type and mime_type.startswith("image"):
|
if mime_type and mime_type.startswith("image"):
|
||||||
self.photo.set_image(full_path, mime_type,
|
self.photo.set_image(full_path, mime_type,
|
||||||
media_ref.get_rectangle())
|
media_ref.get_rectangle())
|
||||||
|
self.photo.set_uistate(self.uistate, object_handle)
|
||||||
else:
|
else:
|
||||||
self.photo.set_image(None)
|
self.photo.set_image(None)
|
||||||
|
self.photo.set_uistate(None, None)
|
||||||
else:
|
else:
|
||||||
self.photo.set_image(None)
|
self.photo.set_image(None)
|
||||||
|
self.photo.set_uistate(None, None)
|
||||||
|
Loading…
Reference in New Issue
Block a user