* src/MediaView.py: add mediaobj to DND types
* src/plugins/ScratchPad.py: fill out rest of media details (type,value) svn: r5089
This commit is contained in:
parent
ee20b5d115
commit
e72ca98e22
@ -5,6 +5,8 @@
|
|||||||
* src/plugins/NavWebPage.py: fix paths in surname page
|
* src/plugins/NavWebPage.py: fix paths in surname page
|
||||||
* src/Sources.py: Limit the source title to 40 characters
|
* src/Sources.py: Limit the source title to 40 characters
|
||||||
* src/MergePeople.py: correctly handle selection of first person
|
* src/MergePeople.py: correctly handle selection of first person
|
||||||
|
* src/MediaView.py: add mediaobj to DND types
|
||||||
|
* src/plugins/ScratchPad.py: fill out rest of media details (type,value)
|
||||||
|
|
||||||
2005-08-15 Alex Roitman <shura@gramps-project.org>
|
2005-08-15 Alex Roitman <shura@gramps-project.org>
|
||||||
* NEWS: Update.
|
* NEWS: Update.
|
||||||
|
@ -89,6 +89,7 @@ class MediaView:
|
|||||||
self.list.set_model(self.model)
|
self.list.set_model(self.model)
|
||||||
|
|
||||||
DND_TARGETS = [
|
DND_TARGETS = [
|
||||||
|
('mediaobj', 0, 0),
|
||||||
('STRING', 0, 0),
|
('STRING', 0, 0),
|
||||||
('text/plain',0,0),
|
('text/plain',0,0),
|
||||||
('text/uri-list',0,2),
|
('text/uri-list',0,2),
|
||||||
|
@ -423,8 +423,9 @@ class ScratchMediaObj(ScratchPadWrapper):
|
|||||||
ScratchPadWrapper.__init__(self,model,obj)
|
ScratchPadWrapper.__init__(self,model,obj)
|
||||||
self._type = _("Media Object")
|
self._type = _("Media Object")
|
||||||
|
|
||||||
self._title = ""
|
mobj = self._db.get_object_from_handle(obj)
|
||||||
self._value = ""
|
self._title = mobj.get_description()
|
||||||
|
self._value = mobj.get_path()
|
||||||
|
|
||||||
def tooltip(self):
|
def tooltip(self):
|
||||||
global escape
|
global escape
|
||||||
@ -677,6 +678,7 @@ class ScratchPadListView:
|
|||||||
return
|
return
|
||||||
|
|
||||||
# Find a wrapper class
|
# Find a wrapper class
|
||||||
|
|
||||||
possible_wrappers = [target for target in context.targets \
|
possible_wrappers = [target for target in context.targets \
|
||||||
if target in self._target_type_to_wrapper_class_map.keys()]
|
if target in self._target_type_to_wrapper_class_map.keys()]
|
||||||
|
|
||||||
@ -685,6 +687,7 @@ class ScratchPadListView:
|
|||||||
return
|
return
|
||||||
|
|
||||||
# Just select the first match.
|
# Just select the first match.
|
||||||
|
|
||||||
wrapper_class = self._target_type_to_wrapper_class_map[str(possible_wrappers[0])]
|
wrapper_class = self._target_type_to_wrapper_class_map[str(possible_wrappers[0])]
|
||||||
|
|
||||||
o = wrapper_class(self._gramps_model,sel_data)
|
o = wrapper_class(self._gramps_model,sel_data)
|
||||||
|
Loading…
Reference in New Issue
Block a user