* src/Config/_GrampsConfigKeys.py: add saving of family editor size, disabling of
defaulting to last viwe * src/ViewManager.py: allow disabling of defaulting to last view * src/GrampsCfg.py: allow disabling of defaulting to last view * src/ViewManager.py: allow disabling of defaulting to last view * data/gramps.schemas.in: allow disabling of defaulting to last view svn: r7617
This commit is contained in:
@@ -30,6 +30,7 @@ CUSTOM_MARKER_COLOR = ('preferences','custom-marker-color', 2)
|
||||
FAMILY_WARN = ('preferences','family-warn', 0)
|
||||
HIDE_EP_MSG = ('preferences','hide-ep-msg', 0)
|
||||
LAST_VIEW = ('preferences','last-view', 1)
|
||||
USE_LAST_VIEW = ('preferences','use-last-view', 1)
|
||||
FAMILY_SIBLINGS = ('preferences','family-siblings', 0)
|
||||
AUTOLOAD = ('behavior','autoload', 0)
|
||||
SPELLCHECK = ('behavior','spellcheck', 0)
|
||||
@@ -39,8 +40,8 @@ DATE_FORMAT = ('preferences','date-format', 1)
|
||||
DONT_ASK = ('interface','dont-ask', 0)
|
||||
HEIGHT = ('interface','height', 1)
|
||||
WIDTH = ('interface','width', 1)
|
||||
FAM_HEIGHT = ('interface','height', 1)
|
||||
FAM_WIDTH = ('interface','width', 1)
|
||||
FAMILY_HEIGHT = ('interface','family_height', 1)
|
||||
FAMILY_WIDTH = ('interface','family_width', 1)
|
||||
FILTER = ('interface','filter', 0)
|
||||
FPREFIX = ('preferences','fprefix', 2)
|
||||
EPREFIX = ('preferences','eprefix', 2)
|
||||
@@ -92,6 +93,7 @@ default_value = {
|
||||
FAMILY_WARN : True,
|
||||
HIDE_EP_MSG : False,
|
||||
LAST_VIEW : 0,
|
||||
USE_LAST_VIEW : True,
|
||||
FAMILY_SIBLINGS : True,
|
||||
AUTOLOAD : False,
|
||||
SPELLCHECK : False,
|
||||
@@ -101,8 +103,8 @@ default_value = {
|
||||
DONT_ASK : False,
|
||||
HEIGHT : 500,
|
||||
WIDTH : 775,
|
||||
FAM_HEIGHT : 500,
|
||||
FAM_WIDTH : 700,
|
||||
FAMILY_HEIGHT : 500,
|
||||
FAMILY_WIDTH : 700,
|
||||
FILTER : False,
|
||||
FPREFIX : 'F%04d',
|
||||
EPREFIX : 'E%04d',
|
||||
|
||||
@@ -506,6 +506,8 @@ class GrampsPreferences(ManagedWindow.ManagedWindow):
|
||||
5, Config.RELATION_SHADE)
|
||||
self.add_checkbox(table, _('Display edit buttons on Relationship View'),
|
||||
6, Config.RELEDITBTN)
|
||||
self.add_checkbox(table, _('Remember last view displayed'),
|
||||
7, Config.USE_LAST_VIEW)
|
||||
|
||||
return table
|
||||
|
||||
|
||||
@@ -665,8 +665,12 @@ class ViewManager:
|
||||
self.buttons.append(button)
|
||||
self.button_handlers.append(handler_id)
|
||||
|
||||
current = Config.get(Config.LAST_VIEW)
|
||||
if current > len(self.pages):
|
||||
use_current = Config.get(Config.USE_LAST_VIEW)
|
||||
if use_current:
|
||||
current = Config.get(Config.LAST_VIEW)
|
||||
if current > len(self.pages):
|
||||
current = 0
|
||||
else:
|
||||
current = 0
|
||||
|
||||
self.active_page = self.pages[current]
|
||||
|
||||
Reference in New Issue
Block a user