2004-08-24 Tim Waugh <twaugh@redhat.com>

* src/MediaView.py (MediaView.on_select_row): Use the correct
        column for DB handle.
        (MediaView.on_select_row): Display GRAMPS ID, not DB handle.
        (MediaView.build_context_menu): Use the correct column for DB
        handle.
        (MediaView.on_edit_clicked): Likewise.
        (MediaView.on_delete_clicked): Likewise.


svn: r3506
This commit is contained in:
Tim Waugh 2004-08-24 18:05:18 +00:00
parent 6221d356e6
commit a0fd5337d7
2 changed files with 14 additions and 6 deletions

View File

@ -1,4 +1,12 @@
2004-08-24 Tim Waugh <twaugh@redhat.com>
* src/MediaView.py (MediaView.on_select_row): Use the correct
column for DB handle.
(MediaView.on_select_row): Display GRAMPS ID, not DB handle.
(MediaView.build_context_menu): Use the correct column for DB
handle.
(MediaView.on_edit_clicked): Likewise.
(MediaView.on_delete_clicked): Likewise.
* src/WriteXML.py: Write out 'default' tag on people node for
compatibility with GRAMPS 1.0.x.

View File

@ -162,8 +162,8 @@ class MediaView:
store,node = self.selection.get_selected()
if not node:
return
handle = store.get_value(node,1)
handle = store.get_value(node,5)
mobj = self.db.get_object_from_handle(handle)
mtype = mobj.get_mime_type()
@ -179,7 +179,7 @@ class MediaView:
if not pexists:
fexists = 0
self.mid.set_text(mobj.get_handle())
self.mid.set_text(mobj.get_gramps_id())
self.mtype.set_text(type_name)
self.mdesc.set_text(mobj.get_description())
if len(path) == 0 or fexists == 0:
@ -212,7 +212,7 @@ class MediaView:
store,node = self.selection.get_selected()
if node:
handle = store.get_value(node,1)
handle = store.get_value(node,5)
obj = self.db.get_object_from_handle(handle)
self.obj = obj
mime_type = obj.get_mime_type()
@ -278,7 +278,7 @@ class MediaView:
list_store, node = self.selection.get_selected()
if node:
handle = list_store.get_value(node,1)
handle = list_store.get_value(node,5)
obj = self.db.get_object_from_handle(handle)
ImageSelect.GlobalMediaProperties(self.db,obj,self.load_media,
self,self.topWindow)
@ -288,7 +288,7 @@ class MediaView:
if not node:
return
handle = store.get_value(node,1)
handle = store.get_value(node,5)
mobj = self.db.get_object_from_handle(handle)
if self.is_object_used(mobj):
ans = ImageSelect.DeleteMediaQuery(mobj,self.db,self.build_tree)