2006-11-11 Don Allingham <don@gramps-project.org>
* src/Config/_GrampsConfigKeys.py: add saving of family editor size * src/Editors/_EditFamily.py: add saving of family editor size * src/DisplayTabs/_GalleryTab.py: Catch possible exception * src/glade/gramps.glade: add saving of family editor size * src/DbLoader.py: Display error message on RUNRECOVERY error * src/DisplayTabs/_AddrEmbedList.py: make labels more consistent (#513) svn: r7616
This commit is contained in:
@@ -303,19 +303,22 @@ class GalleryTab(ButtonTab):
|
||||
|
||||
# get the selected object, returning if not is defined
|
||||
|
||||
reflist = self.iconlist.get_selected_items()
|
||||
obj = self.media_list[reflist[0][0]]
|
||||
try:
|
||||
reflist = self.iconlist.get_selected_items()
|
||||
obj = self.media_list[reflist[0][0]]
|
||||
|
||||
if not obj:
|
||||
if not obj:
|
||||
return
|
||||
|
||||
# pickle the data, and build the tuple to be passed
|
||||
value = (self._DND_TYPE.drag_type, id(self), obj, self.find_index(obj))
|
||||
data = pickle.dumps(value)
|
||||
|
||||
# pass as a string (8 bits)
|
||||
sel_data.set(sel_data.target, 8, data)
|
||||
except IndexError:
|
||||
return
|
||||
|
||||
# pickle the data, and build the tuple to be passed
|
||||
value = (self._DND_TYPE.drag_type, id(self), obj, self.find_index(obj))
|
||||
data = pickle.dumps(value)
|
||||
|
||||
# pass as a string (8 bits)
|
||||
sel_data.set(sel_data.target, 8, data)
|
||||
|
||||
def drag_data_received(self, widget, context, x, y, sel_data, info, time):
|
||||
"""
|
||||
Handle the standard gtk interface for drag_data_received.
|
||||
|
Reference in New Issue
Block a user