9795: remember the last location of windows [partial: the editrefs]
This commit is contained in:
parent
4e812c738b
commit
ca105fb73a
@ -192,15 +192,11 @@ register('interface.address-height', 450)
|
||||
register('interface.address-width', 650)
|
||||
register('interface.attribute-height', 350)
|
||||
register('interface.attribute-width', 600)
|
||||
register('interface.child-ref-height', 450)
|
||||
register('interface.child-ref-width', 600)
|
||||
register('interface.dont-ask', False)
|
||||
register('interface.view-categories',
|
||||
["Dashboard", "People", "Relationships", "Families",
|
||||
"Ancestry", "Events", "Places", "Geography", "Sources",
|
||||
"Citations", "Repositories", "Media", "Notes"])
|
||||
register('interface.event-ref-height', 450)
|
||||
register('interface.event-ref-width', 600)
|
||||
register('interface.filter', False)
|
||||
register('interface.fullscreen', False)
|
||||
register('interface.grampletbar-close', False)
|
||||
@ -216,8 +212,6 @@ register('interface.main-window-horiz-position', 15)
|
||||
register('interface.main-window-vert-position', 10)
|
||||
register('interface.main-window-width', 775)
|
||||
register('interface.mapservice', 'OpenStreetMap')
|
||||
register('interface.media-ref-height', 450)
|
||||
register('interface.media-ref-width', 600)
|
||||
register('interface.name-height', 350)
|
||||
register('interface.name-width', 600)
|
||||
register('interface.open-with-default-viewer', False)
|
||||
@ -227,20 +221,12 @@ register('interface.pedview-show-marriage', False)
|
||||
register('interface.pedview-tree-size', 5)
|
||||
register('interface.pedview-tree-direction', 2)
|
||||
register('interface.pedview-show-unknown-people', False)
|
||||
register('interface.person-ref-height', 350)
|
||||
register('interface.person-ref-width', 600)
|
||||
register('interface.place-name-height', 100)
|
||||
register('interface.place-name-width', 450)
|
||||
register('interface.place-ref-height', 450)
|
||||
register('interface.place-ref-width', 600)
|
||||
register('interface.relcalc-height', 400)
|
||||
register('interface.relcalc-width', 600)
|
||||
register('interface.repo-ref-height', 450)
|
||||
register('interface.repo-ref-width', 600)
|
||||
register('interface.sidebar-text', True)
|
||||
register('interface.size-checked', False)
|
||||
register('interface.source-ref-height', 450)
|
||||
register('interface.source-ref-width', 600)
|
||||
register('interface.statusbar', 1)
|
||||
register('interface.toolbar-on', True)
|
||||
register('interface.url-height', 150)
|
||||
|
@ -21,8 +21,7 @@
|
||||
#
|
||||
|
||||
"""
|
||||
The EditChildRef module provides the EditChildRef class. This provides a
|
||||
mechanism for the user to edit address information.
|
||||
The EditChildRef module provides the EditChildRef class.
|
||||
"""
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
@ -78,28 +77,27 @@ _RIGHT_BUTTON = 3
|
||||
#-------------------------------------------------------------------------
|
||||
class EditChildRef(EditSecondary):
|
||||
"""
|
||||
Displays a dialog that allows the user to edit an address.
|
||||
Displays a dialog that allows the user to edit a child reference.
|
||||
"""
|
||||
|
||||
def __init__(self, name, dbstate, uistate, track, childref, callback):
|
||||
"""
|
||||
Displays the dialog box.
|
||||
|
||||
parent - The class that called the ChildRef editor.
|
||||
addr - The address that is to be edited
|
||||
childref - The child reference that is to be edited
|
||||
"""
|
||||
self.name = name
|
||||
EditSecondary.__init__(self, dbstate, uistate, track,
|
||||
childref, callback)
|
||||
|
||||
def _local_init(self):
|
||||
self.width_key = 'interface.child-ref-width'
|
||||
self.height_key = 'interface.child-ref-height'
|
||||
|
||||
self.top = Glade()
|
||||
self.set_window(self.top.toplevel,
|
||||
self.top.get_object("title"),
|
||||
self.name,
|
||||
_('Child Reference Editor'))
|
||||
self.setup_configs('interface.child-ref', 600, 450)
|
||||
|
||||
self.ok_button = self.top.get_object('ok')
|
||||
self.edit_button = self.top.get_object('edit')
|
||||
|
@ -69,13 +69,13 @@ class EditEventRef(EditReference):
|
||||
self._init_event()
|
||||
|
||||
def _local_init(self):
|
||||
self.width_key = 'interface.event-ref-width'
|
||||
self.height_key = 'interface.event-ref-height'
|
||||
|
||||
self.top = Glade()
|
||||
self.set_window(self.top.toplevel,
|
||||
self.top.get_object('eer_title'),
|
||||
_('Event Reference Editor'))
|
||||
self.setup_configs('interface.event-ref', 600, 450)
|
||||
|
||||
self.define_warn_box(self.top.get_object("eer_warning"))
|
||||
self.define_expander(self.top.get_object("eer_expander"))
|
||||
self.share_btn = self.top.get_object('share_place')
|
||||
|
@ -86,13 +86,13 @@ class EditMediaRef(EditReference):
|
||||
self._update_addmedia)
|
||||
|
||||
def _local_init(self):
|
||||
self.width_key = 'interface.media-ref-width'
|
||||
self.height_key = 'interface.media-ref-height'
|
||||
self.top = Glade()
|
||||
|
||||
self.top = Glade()
|
||||
self.set_window(self.top.toplevel,
|
||||
self.top.get_object('title'),
|
||||
_('Media Reference Editor'))
|
||||
self.setup_configs('interface.media-ref', 600, 450)
|
||||
|
||||
self.define_warn_box(self.top.get_object("warn_box"))
|
||||
self.top.get_object("label427").set_text(_("Y coordinate|Y"))
|
||||
self.top.get_object("label428").set_text(_("Y coordinate|Y"))
|
||||
|
@ -21,8 +21,7 @@
|
||||
#
|
||||
|
||||
"""
|
||||
The EditPersonRef module provides the EditPersonRef class. This provides a
|
||||
mechanism for the user to edit address information.
|
||||
The EditPersonRef module provides the EditPersonRef class.
|
||||
"""
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
@ -77,24 +76,23 @@ class EditPersonRef(EditSecondary):
|
||||
Displays a dialog that allows the user to edit a person reference.
|
||||
"""
|
||||
|
||||
def __init__(self, dbstate, uistate, track, addr, callback):
|
||||
def __init__(self, dbstate, uistate, track, personref, callback):
|
||||
"""
|
||||
Displays the dialog box.
|
||||
|
||||
parent - The class that called the PersonRef editor.
|
||||
addr - The address that is to be edited
|
||||
personref - The person reference that is to be edited
|
||||
"""
|
||||
EditSecondary.__init__(self, dbstate, uistate, track, addr, callback)
|
||||
EditSecondary.__init__(self, dbstate, uistate, track,
|
||||
personref, callback)
|
||||
|
||||
def _local_init(self):
|
||||
self.width_key = 'interface.person-ref-width'
|
||||
self.height_key = 'interface.person-ref-height'
|
||||
|
||||
self.top = Glade()
|
||||
|
||||
self.set_window(self.top.toplevel,
|
||||
self.top.get_object("title"),
|
||||
_('Person Reference Editor'))
|
||||
self.setup_configs('interface.person-ref', 600, 350)
|
||||
|
||||
self.person_label = self.top.get_object('person')
|
||||
|
||||
#allow for drop:
|
||||
@ -226,7 +224,7 @@ class EditPersonRef(EditSecondary):
|
||||
def save(self,*obj):
|
||||
"""
|
||||
Called when the OK button is pressed. Gets data from the
|
||||
form and updates the Address data structure.
|
||||
form and updates the data structure.
|
||||
"""
|
||||
|
||||
if self.obj.ref:
|
||||
|
@ -53,10 +53,11 @@ class EditPlaceRef(EditReference):
|
||||
update)
|
||||
|
||||
def _local_init(self):
|
||||
self.width_key = 'interface.place-ref-width'
|
||||
self.height_key = 'interface.place-ref-height'
|
||||
|
||||
self.top = Glade()
|
||||
self.set_window(self.top.toplevel, None, _('Place Reference Editor'))
|
||||
self.setup_configs('interface.place-ref', 600, 450)
|
||||
|
||||
self.define_warn_box(self.top.get_object("warning"))
|
||||
self.define_expander(self.top.get_object("expander"))
|
||||
#self.place_name_label = self.top.get_object('place_name_label')
|
||||
|
@ -29,7 +29,7 @@ from gi.repository import Gtk
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# gramps modules
|
||||
# Gramps modules
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
from gramps.gen.const import GRAMPS_LOCALE as glocale
|
||||
|
@ -53,13 +53,12 @@ class EditRepoRef(EditReference):
|
||||
source_ref, update)
|
||||
|
||||
def _local_init(self):
|
||||
self.width_key = 'interface.repo-ref-width'
|
||||
self.height_key = 'interface.repo-ref-height'
|
||||
|
||||
self.top = Glade()
|
||||
self.set_window(self.top.toplevel,
|
||||
self.top.get_object('repo_title'),
|
||||
_('Repository Reference Editor'))
|
||||
self.setup_configs('interface.repo-ref', 600, 450)
|
||||
|
||||
self.define_warn_box(self.top.get_object("warn_box"))
|
||||
self.define_expander(self.top.get_object("src_expander"))
|
||||
|
@ -19,6 +19,11 @@
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# Gramps modules
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
from ..managedwindow import ManagedWindow
|
||||
from ..display import display_help
|
||||
from gramps.gen.config import config
|
||||
|
Loading…
Reference in New Issue
Block a user