8058: New place reference editor

This allows standard "add" and "share" buttons to be used in the place
reference embedded list.
This commit is contained in:
Nick Hall 2014-12-01 15:23:37 +00:00
parent 5bdb45416f
commit 8be5616802
3 changed files with 749 additions and 169 deletions

View File

@ -33,12 +33,13 @@ from gi.repository import GLib
# GRAMPS classes
#
#-------------------------------------------------------------------------
from gramps.gen.lib import PlaceRef
from gramps.gen.lib import Place, PlaceRef
from gramps.gen.errors import WindowActiveError
from ...dialog import ErrorDialog
from ...ddtargets import DdTargets
from .placerefmodel import PlaceRefModel
from .embeddedlist import EmbeddedList, TEXT_COL
from ...selectors import SelectorFactory
#-------------------------------------------------------------------------
#
@ -65,7 +66,7 @@ class PlaceRefEmbedList(EmbeddedList):
self.handle = handle
EmbeddedList.__init__(self, dbstate, uistate, track,
_('Enclosed By'), PlaceRefModel,
move_buttons=True)
share_button=True, move_buttons=True)
def get_data(self):
return self.data
@ -86,31 +87,49 @@ class PlaceRefEmbedList(EmbeddedList):
return skip
def add_button_clicked(self, obj):
placeref = PlaceRef()
ref = PlaceRef()
place = Place()
try:
from .. import EditPlaceRef
EditPlaceRef(self.dbstate, self.uistate, self.track,
placeref, self.handle, self.add_callback)
place, ref, self.add_callback)
except WindowActiveError:
pass
def add_callback(self, name):
def add_callback(self, ref, place):
ref.ref = place.handle
data = self.get_data()
data.append(name)
data.append(ref)
self.rebuild()
GLib.idle_add(self.tree.scroll_to_cell, len(data) - 1)
def edit_button_clicked(self, obj):
placeref = self.get_selected()
if placeref:
def share_button_clicked(self, obj):
SelectPlace = SelectorFactory('Place')
sel = SelectPlace(self.dbstate, self.uistate, self.track,
skip=self.get_skip_list(self.handle))
place = sel.run()
if place:
ref = PlaceRef()
try:
from .. import EditPlaceRef
EditPlaceRef(self.dbstate, self.uistate, self.track,
placeref, self.handle, self.edit_callback)
EditPlaceRef(self.dbstate, self.uistate, self.track,
place, ref, self.add_callback)
except WindowActiveError:
pass
def edit_callback(self, name):
def edit_button_clicked(self, obj):
ref = self.get_selected()
if ref:
place = self.dbstate.db.get_place_from_handle(ref.ref)
try:
from .. import EditPlaceRef
EditPlaceRef(self.dbstate, self.uistate, self.track,
place, ref, self.edit_callback)
except WindowActiveError:
pass
def edit_callback(self, ref, place):
self.rebuild()
def handle_extra_type(self, objtype, obj):
@ -119,11 +138,11 @@ class PlaceRefEmbedList(EmbeddedList):
_("The place you are adding is already enclosed by "
"this place"))
return
place = self.dbstate.db.get_place_from_handle(obj)
placeref = PlaceRef()
placeref.ref = obj
try:
from .. import EditPlaceRef
EditPlaceRef(self.dbstate, self.uistate, self.track,
placeref, self.handle, self.add_callback)
place, placeref, self.add_callback)
except WindowActiveError:
pass

View File

@ -2,7 +2,7 @@
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2000-2006 Donald N. Allingham
# Copyright (C) 2013 Nick Hall
# Copyright (C) 2015 Nick Hall
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -24,11 +24,17 @@
# Gramps modules
#
#-------------------------------------------------------------------------
from .editsecondary import EditSecondary
from .editreference import RefTab, EditReference
from ..glade import Glade
from ..widgets import MonitoredDate
from .objectentries import PlaceEntry
from ..dialog import ErrorDialog
from ..widgets import (MonitoredDate, MonitoredEntry, MonitoredDataType,
PrivacyButton, MonitoredTagList)
from .displaytabs import (PlaceRefEmbedList, AltNameEmbedList,
LocationEmbedList, CitationEmbedList,
GalleryTab, NoteTab, WebEmbedList, PlaceBackRefList)
from gramps.gen.lib import NoteType
from gramps.gen.db import DbTxn
from gramps.gen.errors import ValidationError
from gramps.gen.utils.place import conv_lat_lon
from gramps.gen.const import GRAMPS_LOCALE as glocale
_ = glocale.translation.gettext
@ -37,64 +43,212 @@ _ = glocale.translation.gettext
# EditPlaceRef class
#
#-------------------------------------------------------------------------
class EditPlaceRef(EditSecondary):
class EditPlaceRef(EditReference):
def __init__(self, dbstate, uistate, track, placeref, handle, callback):
self.handle = handle
EditSecondary.__init__(self, dbstate, uistate, track,
placeref, callback)
def __init__(self, state, uistate, track, place, place_ref, update):
EditReference.__init__(self, state, uistate, track, place, place_ref,
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.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')
#self.place_name_label.set_text(_('place|Name:'))
self.share_btn = self.top.get_object('select_place')
self.add_del_btn = self.top.get_object('add_del_place')
tblref = self.top.get_object('table64')
notebook = self.top.get_object('notebook_ref')
#recreate start page as GrampsTab
notebook.remove_page(0)
self.reftab = RefTab(self.dbstate, self.uistate, self.track,
_('General'), tblref)
tblref = self.top.get_object('table62')
notebook = self.top.get_object('notebook')
#recreate start page as GrampsTab
notebook.remove_page(0)
self.primtab = RefTab(self.dbstate, self.uistate, self.track,
_('_General'), tblref)
def _connect_signals(self):
self.define_cancel_button(self.top.get_object('cancel'))
self.ok_button = self.top.get_object('ok')
self.define_ok_button(self.ok_button, self.save)
self.define_help_button(self.top.get_object('help'))
def _connect_db_signals(self):
"""
Connect any signals that need to be connected.
Called by the init routine of the base class (_EditPrimary).
"""
self._add_db_signal('place-rebuild', self.close)
self._add_db_signal('place-delete', self.check_for_close)
def build_menu_names(self, placeref):
if self.source and self.source.get_handle():
title = self.source.get_title()
submenu_label = _('Place: %s') % title
else:
submenu_label = _('New Place')
return (_('Place Reference Editor'), submenu_label)
def _setup_fields(self):
self.date_field = MonitoredDate(self.top.get_object("date_entry"),
self.top.get_object("date_stat"),
self.obj.get_date_object(),
self.source_ref.get_date_object(),
self.uistate, self.track,
self.db.readonly)
self.place_field = PlaceEntry(self.dbstate, self.uistate, self.track,
self.top.get_object("place"),
self.top.get_object("place_event_box"),
self.obj.set_reference_handle,
self.obj.get_reference_handle,
self.add_del_btn, self.share_btn,
skip=self.get_skip_list(self.handle))
self.title = MonitoredEntry(self.top.get_object("place_title"),
self.source.set_title, self.source.get_title,
self.db.readonly)
self.name = MonitoredEntry(self.top.get_object("name_entry"),
self.source.set_name, self.source.get_name,
self.db.readonly)
self.gid = MonitoredEntry(self.top.get_object("gid"),
self.source.set_gramps_id,
self.source.get_gramps_id, self.db.readonly)
self.tags = MonitoredTagList(self.top.get_object("tag_label"),
self.top.get_object("tag_button"),
self.source.set_tag_list,
self.source.get_tag_list,
self.db,
self.uistate, self.track,
self.db.readonly)
def get_skip_list(self, handle):
todo = [handle]
skip = [handle]
while todo:
handle = todo.pop()
for child in self.db.find_backlink_handles(handle, ['Place']):
if child[1] not in skip:
todo.append(child[1])
skip.append(child[1])
return skip
self.privacy = PrivacyButton(self.top.get_object("private"), self.source,
self.db.readonly)
def _connect_signals(self):
self.define_cancel_button(self.top.get_object('cancel_button'))
self.ok_button = self.top.get_object('ok_button')
self.define_ok_button(self.ok_button, self.save)
self.define_help_button(self.top.get_object('help_button'))
self.place_type = MonitoredDataType(self.top.get_object("place_type"),
self.source.set_type,
self.source.get_type,
self.db.readonly,
self.db.get_place_types())
self.code = MonitoredEntry(
self.top.get_object("code_entry"),
self.source.set_code, self.source.get_code,
self.db.readonly)
self.longitude = MonitoredEntry(
self.top.get_object("lon_entry"),
self.source.set_longitude, self.source.get_longitude,
self.db.readonly)
self.longitude.connect("validate", self._validate_coordinate, "lon")
#force validation now with initial entry
self.top.get_object("lon_entry").validate(force=True)
self.latitude = MonitoredEntry(
self.top.get_object("lat_entry"),
self.source.set_latitude, self.source.get_latitude,
self.db.readonly)
self.latitude.connect("validate", self._validate_coordinate, "lat")
#force validation now with initial entry
self.top.get_object("lat_entry").validate(force=True)
def _validate_coordinate(self, widget, text, typedeg):
if (typedeg == 'lat') and not conv_lat_lon(text, "0", "ISO-D"):
return ValidationError(_("Invalid latitude (syntax: 18\u00b09'") +
_('48.21"S, -18.2412 or -18:9:48.21)'))
elif (typedeg == 'lon') and not conv_lat_lon("0", text, "ISO-D"):
return ValidationError(_("Invalid longitude (syntax: 18\u00b09'") +
_('48.21"E, -18.2412 or -18:9:48.21)'))
def _create_tabbed_pages(self):
"""
Create the notebook tabs and inserts them into the main
window.
"""
notebook = self.top.get_object('notebook')
notebook_ref = self.top.get_object('notebook_ref')
self._add_tab(notebook, self.primtab)
self._add_tab(notebook_ref, self.reftab)
self.track_ref_for_deletion("primtab")
self.track_ref_for_deletion("reftab")
self.placeref_list = PlaceRefEmbedList(self.dbstate,
self.uistate,
self.track,
self.source.get_placeref_list(),
self.source.handle)
self._add_tab(notebook, self.placeref_list)
self.track_ref_for_deletion("placeref_list")
self.alt_name_list = AltNameEmbedList(self.dbstate,
self.uistate,
self.track,
self.source.alt_names)
self._add_tab(notebook, self.alt_name_list)
self.track_ref_for_deletion("alt_name_list")
if len(self.source.alt_loc) > 0:
self.loc_list = LocationEmbedList(self.dbstate,
self.uistate,
self.track,
self.source.alt_loc)
self._add_tab(notebook, self.loc_list)
self.track_ref_for_deletion("loc_list")
self.citation_list = CitationEmbedList(self.dbstate,
self.uistate,
self.track,
self.source.get_citation_list())
self._add_tab(notebook, self.citation_list)
self.track_ref_for_deletion("citation_list")
self.note_tab = NoteTab(self.dbstate,
self.uistate,
self.track,
self.source.get_note_list(),
notetype=NoteType.PLACE)
self._add_tab(notebook, self.note_tab)
self.track_ref_for_deletion("note_tab")
self.gallery_tab = GalleryTab(self.dbstate,
self.uistate,
self.track,
self.source.get_media_list())
self._add_tab(notebook, self.gallery_tab)
self.track_ref_for_deletion("gallery_tab")
self.web_list = WebEmbedList(self.dbstate,
self.uistate,
self.track,
self.source.get_url_list())
self._add_tab(notebook, self.web_list)
self.track_ref_for_deletion("web_list")
self.backref_list = PlaceBackRefList(self.dbstate,
self.uistate,
self.track,
self.db.find_backlink_handles(self.source.handle))
self.backref_tab = self._add_tab(notebook, self.backref_list)
self.track_ref_for_deletion("backref_list")
self.track_ref_for_deletion("backref_tab")
self._setup_notebook_tabs(notebook)
def save(self, *obj):
self.ok_button.set_sensitive(False)
if not self.obj.ref:
ErrorDialog(_("Cannot save place reference"),
_("No place selected. Please select a place "
" or cancel the edit."))
self.ok_button.set_sensitive(True)
return
if self.callback:
self.callback(self.obj)
if self.source.handle:
with DbTxn(_("Modify Place"), self.db) as trans:
self.db.commit_place(self.source, trans)
else:
if self.check_for_duplicate_id('Place'):
return
with DbTxn(_("Add Place"), self.db) as trans:
self.db.add_place(self.source, trans)
self.source_ref.ref = self.source.handle
if self.update:
self.update(self.source_ref, self.source)
self.close()

View File

@ -5,20 +5,21 @@
<!-- interface-requires grampswidgets 0.0 -->
<object class="GtkDialog" id="editplaceref">
<property name="can_focus">False</property>
<property name="default_width">550</property>
<property name="default_width">600</property>
<property name="type_hint">dialog</property>
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox">
<object class="GtkBox" id="dialog-vbox11">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child internal-child="action_area">
<object class="GtkButtonBox" id="dialog-action_area">
<object class="GtkButtonBox" id="dialog-action_area11">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="layout_style">end</property>
<child>
<object class="GtkButton" id="cancel_button">
<property name="label">gtk-cancel</property>
<object class="GtkButton" id="help">
<property name="label">gtk-help</property>
<property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
@ -32,12 +33,12 @@
</packing>
</child>
<child>
<object class="GtkButton" id="ok_button">
<property name="label">gtk-ok</property>
<object class="GtkButton" id="cancel">
<property name="label">gtk-cancel</property>
<property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="has_default">True</property>
<property name="receives_default">True</property>
<property name="use_stock">True</property>
</object>
@ -48,8 +49,9 @@
</packing>
</child>
<child>
<object class="GtkButton" id="help_button">
<property name="label">gtk-help</property>
<object class="GtkButton" id="ok">
<property name="label">gtk-ok</property>
<property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
@ -71,26 +73,47 @@
</packing>
</child>
<child>
<object class="GtkVBox" id="vbox">
<object class="GtkLabel" id="label1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="xpad">6</property>
<property name="ypad">3</property>
<property name="label" translatable="yes">Reference information</property>
<property name="use_underline">True</property>
<property name="justify">center</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkNotebook" id="notebook_ref">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="border_width">6</property>
<child>
<object class="GtkTable" id="table">
<object class="GtkTable" id="table64">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">12</property>
<property name="n_rows">2</property>
<property name="n_columns">4</property>
<property name="column_spacing">12</property>
<property name="row_spacing">6</property>
<child>
<object class="GtkLabel" id="label1">
<object class="GtkLabel" id="label513">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Place:</property>
<property name="ypad">3</property>
<property name="label" translatable="yes">_Date:</property>
<property name="use_underline">True</property>
<property name="justify">right</property>
<property name="justify">center</property>
</object>
<packing>
<property name="x_options">GTK_FILL</property>
@ -98,29 +121,12 @@
</packing>
</child>
<child>
<object class="GtkLabel" id="label2">
<object class="ValidatableMaskedEntry" id="date_entry">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Date:</property>
<property name="use_underline">True</property>
<property name="can_focus">True</property>
</object>
<packing>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"/>
</packing>
</child>
<child>
<object class="GtkButton" id="select_place">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="receives_default">True</property>
<property name="relief">none</property>
</object>
<packing>
<property name="left_attach">2</property>
<property name="left_attach">1</property>
<property name="right_attach">3</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"/>
@ -131,108 +137,509 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="has_tooltip">True</property>
<property name="tooltip_text" translatable="yes">Invoke date editor</property>
<property name="relief">none</property>
<child>
<object class="GtkImage" id="date_stat_child">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="has_tooltip">True</property>
<property name="tooltip_text" translatable="yes">Show Date Editor</property>
<property name="icon_name">gramps-date</property>
<child internal-child="accessible">
<object class="AtkObject" id="date_stat_child-atkobject">
<property name="AtkObject::accessible-description" translatable="yes">Date</property>
</object>
</child>
</object>
</child>
<child internal-child="accessible">
<object class="AtkObject" id="date_stat-atkobject">
<property name="AtkObject::accessible-name" translatable="yes">Date</property>
</object>
</child>
<accelerator key="d" signal="activate" modifiers="GDK_CONTROL_MASK"/>
</object>
<packing>
<property name="left_attach">3</property>
<property name="right_attach">4</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"/>
</packing>
</child>
<child>
<object class="ValidatableMaskedEntry" id="date_entry">
<property name="height_request">27</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="tooltip_text" translatable="yes">Date range for which the link is valid.</property>
<property name="invisible_char">●</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">3</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="y_options"/>
</packing>
</child>
<child>
<object class="GtkButton" id="add_del_place">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="relief">none</property>
</object>
<packing>
<property name="left_attach">3</property>
<property name="right_attach">4</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"/>
</packing>
</child>
<child>
<object class="GtkEventBox" id="place_event_box">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkLabel" id="place">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
</object>
</child>
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"/>
</packing>
</child>
</object>
</child>
<child type="tab">
<object class="GtkLabel" id="label618">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">General</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
<property name="tab_fill">False</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkExpander" id="expander">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="border_width">6</property>
<property name="expanded">True</property>
<property name="spacing">6</property>
<child>
<object class="GtkNotebook" id="notebook">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="show_border">False</property>
<child>
<object class="GtkTable" id="table62">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">12</property>
<property name="n_rows">5</property>
<property name="n_columns">5</property>
<property name="column_spacing">12</property>
<property name="row_spacing">6</property>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<object class="GtkLabel" id="label501">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Title:</property>
<property name="use_underline">True</property>
<property name="justify">center</property>
</object>
<packing>
<property name="x_options">GTK_FILL</property>
<property name="y_options"/>
</packing>
</child>
<child>
<object class="GtkLabel" id="place_name_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Name:</property>
<property name="use_underline">True</property>
<property name="justify">center</property>
</object>
<packing>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"/>
</packing>
</child>
<child>
<object class="GtkLabel" id="label504">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="ypad">3</property>
<property name="label" translatable="yes">ID:</property>
<property name="use_underline">True</property>
<property name="justify">center</property>
</object>
<packing>
<property name="top_attach">3</property>
<property name="bottom_attach">4</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"/>
</packing>
</child>
<child>
<object class="GtkLabel" id="label657">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Latitude:</property>
<property name="use_underline">True</property>
</object>
<packing>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"/>
</packing>
</child>
<child>
<object class="GtkHBox" id="warning">
<property name="can_focus">False</property>
<property name="border_width">6</property>
<property name="spacing">12</property>
<child>
<object class="GtkImage" id="image2651">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="yalign">0</property>
<property name="stock">gtk-dialog-warning</property>
<property name="icon_size">6</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label521">
<property name="width_request">500</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="ypad">4</property>
<property name="label" translatable="yes">&lt;b&gt;Note:&lt;/b&gt; Any changes in the enclosing place information will be reflected in the place itself, for places that it encloses.</property>
<property name="use_markup">True</property>
<property name="justify">fill</property>
<property name="wrap">True</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="right_attach">4</property>
<property name="top_attach">4</property>
<property name="bottom_attach">5</property>
<property name="y_options">GTK_SHRINK</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Type:</property>
<property name="use_underline">True</property>
<property name="justify">center</property>
</object>
<packing>
<property name="left_attach">2</property>
<property name="right_attach">3</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"/>
</packing>
</child>
<child>
<object class="GtkLabel" id="label3">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Longitude:</property>
<property name="use_underline">True</property>
<property name="justify">center</property>
</object>
<packing>
<property name="left_attach">2</property>
<property name="right_attach">3</property>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"/>
</packing>
</child>
<child>
<object class="GtkComboBox" id="place_type">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="has_entry">True</property>
<child internal-child="entry">
<object class="GtkEntry" id="combobox-entry">
<property name="can_focus">False</property>
</object>
</child>
</object>
<packing>
<property name="left_attach">3</property>
<property name="right_attach">4</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="y_options"/>
</packing>
</child>
<child>
<object class="GtkToggleButton" id="private">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="relief">none</property>
<child>
<object class="GtkImage" id="image">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="icon_name">gtk-dialog-authentication</property>
<child internal-child="accessible">
<object class="AtkObject" id="image-atkobject">
<property name="AtkObject::accessible-description" translatable="yes">Privacy</property>
</object>
</child>
</object>
</child>
<child internal-child="accessible">
<object class="AtkObject" id="private-atkobject">
<property name="AtkObject::accessible-name" translatable="yes">Private</property>
</object>
</child>
<accelerator key="p" signal="activate" modifiers="GDK_CONTROL_MASK"/>
</object>
<packing>
<property name="left_attach">4</property>
<property name="right_attach">5</property>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
<property name="x_options"/>
<property name="y_options"/>
</packing>
</child>
<child>
<object class="UndoableEntry" id="place_title">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="tooltip_text" translatable="yes">Full title of this place.</property>
<property name="invisible_char">●</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">4</property>
<property name="y_options"/>
</packing>
</child>
<child>
<object class="UndoableEntry" id="name_entry">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="tooltip_text" translatable="yes">The name of this place.</property>
<property name="invisible_char">●</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="y_options"/>
</packing>
</child>
<child>
<object class="ValidatableMaskedEntry" id="lat_entry">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="tooltip_text" translatable="yes">Latitude (position above the Equator) of the place in decimal or degree notation.
Eg, valid values are 12.0154, 50°5221.92″N, N50°5221.92″ or 50:52:21.92
You can set these values via the Geography View by searching the place, or via a map service in the place view.</property>
<property name="invisible_char">●</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
<property name="y_options"/>
</packing>
</child>
<child>
<object class="ValidatableMaskedEntry" id="lon_entry">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="tooltip_text" translatable="yes">Longitude (position relative to the Prime, or Greenwich, Meridian) of the place in decimal or degree notation.
Eg, valid values are -124.3647, 124°5221.92″E, E124°5221.92″ or 124:52:21.92
You can set these values via the Geography View by searching the place, or via a map service in the place view.</property>
<property name="invisible_char">●</property>
</object>
<packing>
<property name="left_attach">3</property>
<property name="right_attach">4</property>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
<property name="y_options"/>
</packing>
</child>
<child>
<object class="GtkBox" id="box1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="spacing">6</property>
<child>
<object class="UndoableEntry" id="gid">
<property name="width_request">75</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="tooltip_text" translatable="yes">A unique ID to identify the place</property>
<property name="invisible_char">●</property>
<property name="width_chars">6</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label5">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Code:</property>
<property name="use_underline">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="UndoableEntry" id="code_entry">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="tooltip_text" translatable="yes">Code associated with this place. Eg Country Code or Postal Code.</property>
<property name="invisible_char">●</property>
<property name="width_chars">8</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">3</property>
<property name="bottom_attach">4</property>
<property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label4">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Tags:</property>
</object>
<packing>
<property name="left_attach">2</property>
<property name="right_attach">3</property>
<property name="top_attach">3</property>
<property name="bottom_attach">4</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"/>
</packing>
</child>
<child>
<object class="GtkLabel" id="tag_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="left_attach">3</property>
<property name="right_attach">4</property>
<property name="top_attach">3</property>
<property name="bottom_attach">4</property>
<property name="y_options"/>
</packing>
</child>
<child>
<object class="GtkButton" id="tag_button">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_stock">True</property>
</object>
<packing>
<property name="left_attach">4</property>
<property name="right_attach">5</property>
<property name="top_attach">3</property>
<property name="bottom_attach">4</property>
<property name="x_options"/>
<property name="y_options"/>
</packing>
</child>
</object>
<packing>
<property name="tab_fill">False</property>
</packing>
</child>
<child type="tab">
<object class="GtkHBox" id="general_tab">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="spacing">6</property>
<child>
<object class="GtkImage" id="image2634">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="stock">gtk-file</property>
<property name="icon_size">1</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label506">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">General</property>
<property name="justify">center</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="tab_fill">False</property>
</packing>
</child>
<child>
<placeholder/>
</child>
<child type="tab">
<placeholder/>
</child>
</object>
</child>
<child type="label">
<object class="GtkLabel" id="label520">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Shared information</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">3</property>
</packing>
</child>
</object>
</child>
<action-widgets>
<action-widget response="-6">cancel_button</action-widget>
<action-widget response="-5">ok_button</action-widget>
<action-widget response="-11">help_button</action-widget>
<action-widget response="0">help</action-widget>
<action-widget response="0">cancel</action-widget>
<action-widget response="0">ok</action-widget>
</action-widgets>
</object>
</interface>