Revert changes for 7231; didn't fix main issue

This commit is contained in:
Doug Blank 2013-11-27 12:50:17 -05:00
parent 29ebeb47a2
commit 33c9e7e043

View File

@ -27,14 +27,12 @@ from gramps.gui.utils import edit_object
from gramps.gen.const import GRAMPS_LOCALE as glocale
_ = glocale.translation.gettext
from gi.repository import Gtk
import threading
class Backlinks(Gramplet):
"""
Displays the back references for an object.
"""
def init(self):
self.lock = threading.Lock()
self.gui.WIDGET = self.build_gui()
self.gui.get_container_widget().remove(self.gui.textview)
self.gui.get_container_widget().add(self.gui.WIDGET)
@ -56,16 +54,11 @@ class Backlinks(Gramplet):
"""
Display the back references for an object.
"""
locked = self.lock.acquire(False)
if locked:
for classname, handle in \
self.dbstate.db.find_backlink_handles(active_handle):
name = navigation_label(self.dbstate.db, classname, handle)[0]
self.model.add((_(classname), name, handle, classname))
self.set_has_data(self.model.count > 0)
self.lock.release()
else:
pass # skipped because already updating
for classname, handle in \
self.dbstate.db.find_backlink_handles(active_handle):
name = navigation_label(self.dbstate.db, classname, handle)[0]
self.model.add((_(classname), name, handle, classname))
self.set_has_data(self.model.count > 0)
def get_has_data(self, active_handle):
"""