From 2e1132bec002864d22e9ff32e548a585028c22e3 Mon Sep 17 00:00:00 2001 From: Paul Culley Date: Mon, 4 Nov 2019 18:44:23 -0600 Subject: [PATCH] Allow Tools with Notbook tabs to expand to fill the window (#944) Fixes #10762 User "petpil" (Gramps Bugtracker) noted that the Calculate Estimated Dates addon would not expand the size of its window content when the window was stretched. That addon used the ToolManagedWindowBatch which uses a Gtk Notebook to support several tabs. He also submitted a patch which fixes the problem. The Gtk.Container.add method originally used apparently did not have expand/fill settings to allow the expansion. The Gtk.Box.pack_start used instead does. I tested this with all the users of ToolManagedWindowBatch and ToolManagedWindow which inherit from ToolManagedWindowBase, and did not see any bad/unexpected side effects. The Calculate Estimated Dates addon was the only one that really could use this, as it was the only one which I spotted using a potentially large widget in the notebook tab. --- gramps/gui/plug/_windows.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gramps/gui/plug/_windows.py b/gramps/gui/plug/_windows.py index 6e1af3b40..067793198 100644 --- a/gramps/gui/plug/_windows.py +++ b/gramps/gui/plug/_windows.py @@ -768,7 +768,7 @@ class ToolManagedWindowBase(ManagedWindow): self.notebook = Gtk.Notebook() self.notebook.set_border_width(6) - self.window.get_content_area().add(self.notebook) + self.window.get_content_area().pack_start(self.notebook, True, True, 0) self.results_text = Gtk.TextView() self.results_text.connect('button-press-event',