From 4a41bfa1a00ec806c011866102639d4f9820b982 Mon Sep 17 00:00:00 2001 From: Alex Roitman Date: Sat, 21 Aug 2004 04:33:55 +0000 Subject: [PATCH] * src/data/gramps.schemas: Add /apps/gramps/interface/size-checked key. * src/GrampsCfg.py (get_screen_size_checked, save_screen_size_checked): Add functions. * src/gramps_main.py: Enable sidebar depending on the screen if the screen size has not been checked yet. * src/ChooseParents.py: Set the size request depending on the screen. * src/Marriage.py: Set the size request depending on the screen. * src/gramps.glade (marriageEditor): Unset the height request for the event list. svn: r3459 --- ChangeLog | 10 ++++++++++ src/ChooseParents.py | 8 ++++++-- src/Marriage.py | 7 +++++++ src/gramps.glade | 2 -- 4 files changed, 23 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index b86fca507..8edc26a23 100644 --- a/ChangeLog +++ b/ChangeLog @@ -68,6 +68,16 @@ Set both ancestor and descendant filters to be inclusive. * src/plugins/Ancestors.py (person_name): Use translated name type. + * src/data/gramps.schemas: Add /apps/gramps/interface/size-checked key. + * src/GrampsCfg.py (get_screen_size_checked, + save_screen_size_checked): Add functions. + * src/gramps_main.py: Enable sidebar depending on the screen + if the screen size has not been checked yet. + * src/ChooseParents.py: Set the size request depending on the screen. + * src/Marriage.py: Set the size request depending on the screen. + * src/gramps.glade (marriageEditor): Unset the height request + for the event list. + 2004-08-20 Tim Waugh * src/RelLib.py (Event.are_equal): Fixed comparison with None. diff --git a/src/ChooseParents.py b/src/ChooseParents.py index 64bfd7940..265fa0523 100644 --- a/src/ChooseParents.py +++ b/src/ChooseParents.py @@ -42,6 +42,7 @@ import os # #------------------------------------------------------------------------- import gtk.glade +import gtk.gdk import gnome #------------------------------------------------------------------------- @@ -126,6 +127,7 @@ class ChooseParents: self.father_rel = self.glade.get_widget("frel") self.prel = self.glade.get_widget("prel_combo") self.title = self.glade.get_widget("chooseTitle") + self.father_list = self.glade.get_widget("father_list") self.mother_list = self.glade.get_widget("mother_list") self.flabel = self.glade.get_widget("flabel") self.mlabel = self.glade.get_widget("mlabel") @@ -135,6 +137,10 @@ class ChooseParents: self.build_father_list() self.build_mother_list() + if gtk.gdk.screen_height() > 700: + self.father_list.set_size_request(-1,150) + self.mother_list.set_size_request(-1,150) + for (f,mr,fr) in self.person.get_parent_family_handle_list(): if f == self.family: self.mother_rel.set_text(_(mr)) @@ -167,14 +173,12 @@ class ChooseParents: self.top.show() def build_father_list(self): - self.father_list = self.glade.get_widget("father_list") self.father_selection = self.father_list.get_selection() self.father_selection.connect('changed',self.father_list_select_row) self.add_columns(self.father_list) self.redrawf() def build_mother_list(self): - self.mother_list = self.glade.get_widget("mother_list") self.mother_selection = self.mother_list.get_selection() self.mother_selection.connect('changed',self.mother_list_select_row) self.add_columns(self.mother_list) diff --git a/src/Marriage.py b/src/Marriage.py index 4f80d65dd..0098da617 100644 --- a/src/Marriage.py +++ b/src/Marriage.py @@ -29,6 +29,7 @@ import string # #------------------------------------------------------------------------- import gtk +import gtk.gdk import gtk.glade import gnome import gobject @@ -142,6 +143,12 @@ class Marriage: self.event_list = self.get_widget("marriageEventList") + if gtk.gdk.screen_height() > 700: + self.event_list.set_size_request(500,250) + else: + self.event_list.set_size_request(500,-1) + + # widgets self.complete = self.get_widget('complete') self.date_field = self.get_widget("marriageDate") diff --git a/src/gramps.glade b/src/gramps.glade index c7ee92d65..9252eb15a 100644 --- a/src/gramps.glade +++ b/src/gramps.glade @@ -13520,8 +13520,6 @@ Other - 500 - 250 True True True