diff --git a/gramps2/src/GrampsCfg.py b/gramps2/src/GrampsCfg.py index 960565ca4..61fbac5ad 100644 --- a/gramps2/src/GrampsCfg.py +++ b/gramps2/src/GrampsCfg.py @@ -208,6 +208,12 @@ def get_startup(): def save_startup(val): set_int("/apps/gramps/behavior/startup",val,(0,1)) +def get_screen_size_checked(): + return get_bool("/apps/gramps/interface/size-checked") + +def save_screen_size_checked(val): + set_bool("/apps/gramps/interface/size-checked",val) + def get_autoload(): return get_bool("/apps/gramps/behavior/autoload") diff --git a/gramps2/src/data/gramps.schemas b/gramps2/src/data/gramps.schemas index 0d885895f..a54c3bcb1 100644 --- a/gramps2/src/data/gramps.schemas +++ b/gramps2/src/data/gramps.schemas @@ -434,6 +434,21 @@ + + /schemas/apps/gramps/interface/size-checked + /apps/gramps/interface/size-checked + gramps + bool + 0 + + Screen size has been checked + If set to 1, this key indicates that the screen size + has already been checked and the initial interface decision + made. No action will be taken if the screen is too smal, + since the user may have overridden our settings. + + + /schemas/apps/gramps/interface/statusbar /apps/gramps/interface/statusbar diff --git a/gramps2/src/gramps_main.py b/gramps2/src/gramps_main.py index 4163006b8..7d3721f1f 100755 --- a/gramps2/src/gramps_main.py +++ b/gramps2/src/gramps_main.py @@ -387,6 +387,11 @@ class Gramps: self.enable_filter(GrampsCfg.get_filter()) self.toolbar_btn.set_active(GrampsCfg.get_toolbar_on()) self.enable_toolbar(GrampsCfg.get_toolbar_on()) + + if not GrampsCfg.get_screen_size_checked(): + GrampsCfg.save_screen_size_checked(1) + if gtk.gdk.screen_width() <= 900: + GrampsCfg.save_view(0) self.sidebar_btn.set_active(GrampsCfg.get_view()) self.enable_sidebar(GrampsCfg.get_view())