9795: remember the last location of windows [partial: main editors]
This commit is contained in:
parent
bbb8b5161d
commit
413da833ca
@ -192,25 +192,19 @@ register('interface.attribute-height', 350)
|
||||
register('interface.attribute-width', 600)
|
||||
register('interface.child-ref-height', 450)
|
||||
register('interface.child-ref-width', 600)
|
||||
register('interface.citation-height', 450)
|
||||
register('interface.citation-sel-height', 450)
|
||||
register('interface.citation-sel-width', 600)
|
||||
register('interface.citation-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-height', 450)
|
||||
register('interface.event-ref-height', 450)
|
||||
register('interface.event-ref-width', 600)
|
||||
register('interface.event-sel-height', 450)
|
||||
register('interface.event-sel-width', 600)
|
||||
register('interface.event-width', 600)
|
||||
register('interface.family-height', 500)
|
||||
register('interface.family-sel-height', 450)
|
||||
register('interface.family-sel-width', 600)
|
||||
register('interface.family-width', 700)
|
||||
register('interface.filter', False)
|
||||
register('interface.fullscreen', False)
|
||||
register('interface.grampletbar-close', False)
|
||||
@ -226,12 +220,10 @@ 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-height', 450)
|
||||
register('interface.media-ref-height', 450)
|
||||
register('interface.media-ref-width', 600)
|
||||
register('interface.media-sel-height', 450)
|
||||
register('interface.media-sel-width', 600)
|
||||
register('interface.media-width', 650)
|
||||
register('interface.merge-citation-height', 250)
|
||||
register('interface.merge-citation-width', 500)
|
||||
register('interface.merge-event-height', 250)
|
||||
@ -252,10 +244,8 @@ register('interface.merge-source-height', 250)
|
||||
register('interface.merge-source-width', 500)
|
||||
register('interface.name-height', 350)
|
||||
register('interface.name-width', 600)
|
||||
register('interface.note-height', 500)
|
||||
register('interface.note-sel-height', 450)
|
||||
register('interface.note-sel-width', 600)
|
||||
register('interface.note-width', 700)
|
||||
register('interface.open-with-default-viewer', False)
|
||||
register('interface.pedview-layout', 0)
|
||||
register('interface.pedview-show-images', True)
|
||||
@ -263,36 +253,28 @@ 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-height', 550)
|
||||
register('interface.person-ref-height', 350)
|
||||
register('interface.person-ref-width', 600)
|
||||
register('interface.person-sel-height', 450)
|
||||
register('interface.person-sel-width', 600)
|
||||
register('interface.person-width', 750)
|
||||
register('interface.place-height', 450)
|
||||
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.place-sel-height', 450)
|
||||
register('interface.place-sel-width', 600)
|
||||
register('interface.place-width', 650)
|
||||
register('interface.relcalc-height', 400)
|
||||
register('interface.relcalc-width', 600)
|
||||
register('interface.repo-height', 450)
|
||||
register('interface.repo-ref-height', 450)
|
||||
register('interface.repo-ref-width', 600)
|
||||
register('interface.repo-sel-height', 450)
|
||||
register('interface.repo-sel-width', 600)
|
||||
register('interface.repo-width', 650)
|
||||
register('interface.sidebar-text', True)
|
||||
register('interface.size-checked', False)
|
||||
register('interface.source-height', 450)
|
||||
register('interface.source-ref-height', 450)
|
||||
register('interface.source-ref-width', 600)
|
||||
register('interface.source-sel-height', 450)
|
||||
register('interface.source-sel-width', 600)
|
||||
register('interface.source-width', 600)
|
||||
register('interface.statusbar', 1)
|
||||
register('interface.toolbar-on', True)
|
||||
register('interface.url-height', 150)
|
||||
|
@ -142,12 +142,10 @@ class EditCitation(EditPrimary):
|
||||
and the glade interface. It is called by the base class L{EditPrimary},
|
||||
and overridden here.
|
||||
"""
|
||||
self.width_key = 'interface.citation-width'
|
||||
self.height_key = 'interface.citation-height'
|
||||
|
||||
self.glade = Glade()
|
||||
self.set_window(self.glade.toplevel, None,
|
||||
self.get_menu_title())
|
||||
self.setup_configs('interface.citation', 600, 450)
|
||||
|
||||
self.share_btn = self.glade.get_object('select_source')
|
||||
self.add_del_btn = self.glade.get_object('add_del_source')
|
||||
|
@ -105,12 +105,10 @@ class EditEvent(EditPrimary):
|
||||
key=lambda s: s.lower())
|
||||
|
||||
def _local_init(self):
|
||||
self.width_key = 'interface.event-width'
|
||||
self.height_key = 'interface.event-height'
|
||||
|
||||
self.top = Glade()
|
||||
self.set_window(self.top.toplevel, None,
|
||||
self.get_menu_title())
|
||||
self.setup_configs('interface.event', 600, 450)
|
||||
|
||||
self.place = self.top.get_object('place')
|
||||
self.share_btn = self.top.get_object('select_place')
|
||||
|
@ -505,11 +505,9 @@ class EditFamily(EditPrimary):
|
||||
return (_('Edit Family'), self.get_menu_title())
|
||||
|
||||
def build_interface(self):
|
||||
self.width_key = 'interface.family-width'
|
||||
self.height_key = 'interface.family-height'
|
||||
|
||||
self.top = Glade()
|
||||
self.set_window(self.top.toplevel, None, self.get_menu_title())
|
||||
self.setup_configs('interface.family', 700, 500)
|
||||
|
||||
# HACK: how to prevent hidden items from showing
|
||||
# when you use show_all?
|
||||
|
@ -103,12 +103,10 @@ class EditMedia(EditPrimary):
|
||||
|
||||
def _local_init(self):
|
||||
assert(self.obj)
|
||||
self.width_key = 'interface.media-width'
|
||||
self.height_key = 'interface.media-height'
|
||||
|
||||
self.glade = Glade()
|
||||
self.set_window(self.glade.toplevel,
|
||||
None, self.get_menu_title())
|
||||
self.setup_configs('interface.media', 650, 450)
|
||||
|
||||
def _connect_signals(self):
|
||||
self.define_cancel_button(self.glade.get_object('button91'))
|
||||
|
@ -174,13 +174,11 @@ class EditNote(EditPrimary):
|
||||
and overridden here.
|
||||
|
||||
"""
|
||||
self.width_key = 'interface.note-width'
|
||||
self.height_key = 'interface.note-height'
|
||||
|
||||
self.top = Glade()
|
||||
|
||||
win = self.top.toplevel
|
||||
self.set_window(win, None, self.get_menu_title())
|
||||
self.setup_configs('interface.note', 700, 500)
|
||||
|
||||
|
||||
vboxnote = self.top.get_object('vbox131')
|
||||
|
@ -176,8 +176,6 @@ class EditPerson(EditPrimary):
|
||||
This is called by the base class of EditPrimary, and overridden here.
|
||||
|
||||
"""
|
||||
self.width_key = 'interface.person-width'
|
||||
self.height_key = 'interface.person-height'
|
||||
self.pname = self.obj.get_primary_name()
|
||||
self.should_guess_gender = (not self.obj.get_gramps_id() and
|
||||
self.obj.get_gender () ==
|
||||
@ -191,6 +189,7 @@ class EditPerson(EditPrimary):
|
||||
|
||||
self.set_window(self.top.toplevel, None,
|
||||
self.get_menu_title())
|
||||
self.setup_configs('interface.person', 750, 550)
|
||||
|
||||
self.obj_photo = self.top.get_object("personPix")
|
||||
self.frame_photo = self.top.get_object("frame5")
|
||||
|
@ -84,11 +84,9 @@ class EditPlace(EditPrimary):
|
||||
return Place()
|
||||
|
||||
def _local_init(self):
|
||||
self.width_key = 'interface.place-width'
|
||||
self.height_key = 'interface.place-height'
|
||||
|
||||
self.top = Glade()
|
||||
self.set_window(self.top.toplevel, None, self.get_menu_title())
|
||||
self.setup_configs('interface.place', 650, 450)
|
||||
self.place_name_label = self.top.get_object('place_name_label')
|
||||
self.place_name_label.set_text(_('place|Name:'))
|
||||
|
||||
|
@ -24,8 +24,6 @@
|
||||
# Python modules
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
from gramps.gen.const import GRAMPS_LOCALE as glocale
|
||||
_ = glocale.translation.gettext
|
||||
import abc
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
@ -40,6 +38,8 @@ from gi.repository import Gtk
|
||||
# Gramps modules
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
from gramps.gen.const import GRAMPS_LOCALE as glocale
|
||||
_ = glocale.translation.gettext
|
||||
from ..managedwindow import ManagedWindow
|
||||
from gramps.gen.datehandler import displayer, parser
|
||||
from gramps.gen.display.name import displayer as name_displayer
|
||||
@ -84,7 +84,7 @@ class EditPrimary(ManagedWindow, DbGUIElement, metaclass=abc.ABCMeta):
|
||||
self.original = self.get_from_handle(self.obj.handle)
|
||||
|
||||
self._local_init()
|
||||
self._set_size()
|
||||
# self.set_size() is called by self._local_init()'s self.setup_configs
|
||||
self._create_tabbed_pages()
|
||||
self._setup_fields()
|
||||
self._connect_signals()
|
||||
|
@ -82,13 +82,11 @@ class EditRepository(EditPrimary):
|
||||
return title
|
||||
|
||||
def _local_init(self):
|
||||
self.width_key = 'interface.repo-width'
|
||||
self.height_key = 'interface.repo-height'
|
||||
|
||||
self.glade = Glade()
|
||||
|
||||
self.set_window(self.glade.toplevel, None,
|
||||
self.get_menu_title())
|
||||
self.setup_configs('interface.repo', 650, 450)
|
||||
|
||||
def build_menu_names(self, source):
|
||||
return (_('Edit Repository'), self.get_menu_title())
|
||||
|
@ -89,13 +89,12 @@ class EditSource(EditPrimary):
|
||||
return title
|
||||
|
||||
def _local_init(self):
|
||||
self.width_key = 'interface.source-width'
|
||||
self.height_key = 'interface.source-height'
|
||||
assert(self.obj)
|
||||
|
||||
self.glade = Glade()
|
||||
self.set_window(self.glade.toplevel, None,
|
||||
self.get_menu_title())
|
||||
self.setup_configs('interface.source', 600, 450)
|
||||
|
||||
def _connect_signals(self):
|
||||
self.define_ok_button(self.glade.get_object('ok'),self.save)
|
||||
|
@ -11,7 +11,6 @@
|
||||
</object>
|
||||
<object class="GtkDialog" id="editcitation">
|
||||
<property name="can_focus">False</property>
|
||||
<property name="default_width">600</property>
|
||||
<property name="type_hint">dialog</property>
|
||||
<child internal-child="vbox">
|
||||
<object class="GtkBox" id="vbox">
|
||||
|
@ -5,8 +5,6 @@
|
||||
<requires lib="grampswidgets" version="0.0"/>
|
||||
<object class="GtkDialog" id="editnote">
|
||||
<property name="can_focus">False</property>
|
||||
<property name="default_width">500</property>
|
||||
<property name="default_height">400</property>
|
||||
<property name="type_hint">dialog</property>
|
||||
<child internal-child="vbox">
|
||||
<object class="GtkBox" id="dialog-vbox21">
|
||||
|
@ -26,7 +26,6 @@
|
||||
<object class="GtkDialog" id="editperson">
|
||||
<property name="can_focus">False</property>
|
||||
<property name="has_focus">True</property>
|
||||
<property name="default_height">500</property>
|
||||
<property name="type_hint">dialog</property>
|
||||
<signal name="delete-event" handler="on_delete_event" swapped="no"/>
|
||||
<child internal-child="vbox">
|
||||
|
Loading…
Reference in New Issue
Block a user