From d8d345772c4c92ced0656a91189e47f5b464cf80 Mon Sep 17 00:00:00 2001 From: Nick Hall Date: Sat, 12 Jan 2013 00:03:16 +0000 Subject: [PATCH] 6306: Remove focus from the help button in detached gramplet windows svn: r21080 --- gramps/gui/widgets/grampletbar.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/gramps/gui/widgets/grampletbar.py b/gramps/gui/widgets/grampletbar.py index db32d5dc8..76cffe198 100644 --- a/gramps/gui/widgets/grampletbar.py +++ b/gramps/gui/widgets/grampletbar.py @@ -594,10 +594,18 @@ class DetachedWindow(ManagedWindow): self.notebook = Gtk.Notebook() self.notebook.set_show_tabs(False) self.notebook.set_show_border(False) + self.notebook.connect('page-added', self.page_added) self.notebook.show() self.window.vbox.pack_start(self.notebook, True, True, 0) self.show() + def page_added(self, notebook, gramplet, page_num): + """ + Called when the gramplet is added to the notebook. This takes the + focus from the help button (bug #6306). + """ + gramplet.grab_focus() + def handle_response(self, object, response): """ Callback for taking care of button clicks.