From 0f9c3012be457359488177357fd76c970367e152 Mon Sep 17 00:00:00 2001 From: Paul Franklin Date: Mon, 21 Nov 2016 13:11:26 -0800 Subject: [PATCH] enable book selector dialog to remember its size --- gramps/gen/config.py | 2 ++ gramps/gui/glade/book.glade | 2 -- gramps/gui/plug/report/_bookdialog.py | 5 +++++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/gramps/gen/config.py b/gramps/gen/config.py index ee655d873..41f0a7b48 100644 --- a/gramps/gen/config.py +++ b/gramps/gen/config.py @@ -187,6 +187,8 @@ register('interface.address-height', 450) register('interface.address-width', 650) register('interface.attribute-height', 350) register('interface.attribute-width', 600) +register('interface.book-selector-height', 600) +register('interface.book-selector-width', 700) register('interface.child-ref-height', 450) register('interface.child-ref-width', 600) register('interface.citation-height', 450) diff --git a/gramps/gui/glade/book.glade b/gramps/gui/glade/book.glade index f6ab59496..bd50a5f89 100644 --- a/gramps/gui/glade/book.glade +++ b/gramps/gui/glade/book.glade @@ -3,8 +3,6 @@ - 600 - 600 False Book center diff --git a/gramps/gui/plug/report/_bookdialog.py b/gramps/gui/plug/report/_bookdialog.py index d5a4df6e6..04b11d04a 100644 --- a/gramps/gui/plug/report/_bookdialog.py +++ b/gramps/gui/plug/report/_bookdialog.py @@ -296,6 +296,8 @@ class BookOptions(ReportOptions): self.options_dict = { 'bookname' : '', } + # TODO since the CLI code for the "book" generates its own "help" now, + # the GUI code would be faster if it didn't list all the possible books self.options_help = { 'bookname' : ("=name", _("Name of the book. MANDATORY"), BookList('books.xml', dbase).get_book_names(), @@ -329,6 +331,9 @@ class BookSelector(ManagedWindow): title_label = self.xml.get_object('title') self.set_window(window, title_label, self.title) + self.height_key = 'interface.book-selector-height' + self.width_key = 'interface.book-selector-width' + self._set_size() window.show() self.xml.connect_signals({ "on_add_clicked" : self.on_add_clicked,