Skip to content

Commit 2a67e7e

Browse files
authored
[GraphView] Improve search (#471)
1 parent 9c3c17c commit 2a67e7e

File tree

2 files changed

+176
-196
lines changed

2 files changed

+176
-196
lines changed

GraphView/graphview.py

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@
126126
#-------------------------------------------------------------------------
127127
import sys
128128
sys.path.append(os.path.abspath(os.path.dirname(__file__)))
129-
from search_widget import SearchWidget, Popover, ListBoxRow, get_person_tooltip
129+
from search_widget import SearchWidget, Popover, ListBoxRow
130130

131131

132132
#-------------------------------------------------------------------------
@@ -196,6 +196,14 @@ def __init__(self, pdata, dbstate, uistate, nav_group=0):
196196
self.define_print_actions()
197197
self.uistate.connect('font-changed', self.font_changed)
198198

199+
def on_delete(self):
200+
"""
201+
Method called on shutdown.
202+
See PageView class (../gramps/gui/views/pageview.py).
203+
"""
204+
# stop search to allow close app properly
205+
self.graph_widget.search_widget.stop_search()
206+
199207
def font_changed(self):
200208
self.graph_widget.font_changed(self.get_active())
201209
#self.goto_handle(None)
@@ -1135,14 +1143,10 @@ def load_bookmarks(self):
11351143
person_image = self.get_person_image(person, 32, 32)
11361144
if person_image:
11371145
hbox.pack_start(person_image, False, True, 2)
1138-
row = ListBoxRow(description=bkmark, label=name)
1146+
row = ListBoxRow(person_handle=bkmark, label=name,
1147+
db=self.dbstate.db)
11391148
row.add(hbox)
11401149

1141-
# add tooltip
1142-
tooltip = get_person_tooltip(person, self.dbstate.db)
1143-
if tooltip:
1144-
row.set_tooltip_text(tooltip)
1145-
11461150
if present is not None:
11471151
found = True
11481152
count += 1

0 commit comments

Comments
 (0)