2007-03-24 04:48:32 +05:30
|
|
|
#
|
2002-10-20 19:55:16 +05:30
|
|
|
# Gramps - a GTK+/GNOME based genealogy program
|
|
|
|
#
|
2006-04-24 03:48:01 +05:30
|
|
|
# Copyright (C) 2000-2006 Donald N. Allingham
|
2009-02-28 02:41:10 +05:30
|
|
|
# Copyright (C) 2009 Gary Burton
|
2002-10-20 19:55:16 +05:30
|
|
|
#
|
|
|
|
# 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
|
|
|
|
# the Free Software Foundation; either version 2 of the License, or
|
|
|
|
# (at your option) any later version.
|
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this program; if not, write to the Free Software
|
|
|
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
|
|
#
|
|
|
|
|
2003-11-13 00:15:07 +05:30
|
|
|
# $Id$
|
|
|
|
|
2002-10-20 19:55:16 +05:30
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
#
|
|
|
|
# python modules
|
|
|
|
#
|
|
|
|
#-------------------------------------------------------------------------
|
2010-01-18 10:12:17 +05:30
|
|
|
from gen.ggettext import gettext as _
|
2006-01-09 16:58:44 +05:30
|
|
|
import logging
|
|
|
|
log = logging.getLogger(".")
|
2002-10-20 19:55:16 +05:30
|
|
|
|
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
#
|
|
|
|
# GTK/Gnome modules
|
|
|
|
#
|
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
import gtk
|
|
|
|
|
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
#
|
|
|
|
# gramps modules
|
|
|
|
#
|
|
|
|
#-------------------------------------------------------------------------
|
2007-10-08 22:11:39 +05:30
|
|
|
import gen.lib
|
2009-12-15 11:26:12 +05:30
|
|
|
from editprimary import EditPrimary
|
2009-12-16 11:41:06 +05:30
|
|
|
from displaytabs import (GrampsTab, LocationEmbedList, SourceEmbedList,
|
2008-02-08 20:59:28 +05:30
|
|
|
GalleryTab, NoteTab, WebEmbedList, PlaceBackRefList)
|
2009-12-14 08:50:19 +05:30
|
|
|
from gui.widgets import MonitoredEntry, PrivacyButton
|
2008-02-08 20:59:28 +05:30
|
|
|
from Errors import ValidationError
|
2007-03-14 03:42:10 +05:30
|
|
|
from PlaceUtils import conv_lat_lon
|
2008-02-09 06:37:23 +05:30
|
|
|
from QuestionDialog import ErrorDialog
|
2009-05-15 01:45:59 +05:30
|
|
|
from glade import Glade
|
2009-05-08 01:38:27 +05:30
|
|
|
|
2007-12-20 19:19:41 +05:30
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
#
|
|
|
|
# Classes
|
|
|
|
#
|
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
|
|
|
|
class MainLocTab(GrampsTab):
|
|
|
|
"""
|
|
|
|
This class provides the tabpage of the main location tab
|
|
|
|
"""
|
|
|
|
|
|
|
|
def __init__(self, dbstate, uistate, track, name, widget):
|
|
|
|
"""
|
|
|
|
@param dbstate: The database state. Contains a reference to
|
|
|
|
the database, along with other state information. The GrampsTab
|
|
|
|
uses this to access the database and to pass to and created
|
|
|
|
child windows (such as edit dialogs).
|
|
|
|
@type dbstate: DbState
|
|
|
|
@param uistate: The UI state. Used primarily to pass to any created
|
|
|
|
subwindows.
|
|
|
|
@type uistate: DisplayState
|
|
|
|
@param track: The window tracking mechanism used to manage windows.
|
|
|
|
This is only used to pass to generted child windows.
|
|
|
|
@type track: list
|
|
|
|
@param name: Notebook label name
|
|
|
|
@type name: str/unicode
|
|
|
|
@param widget: widget to be shown in the tab
|
|
|
|
@type widge: gtk widget
|
|
|
|
"""
|
|
|
|
GrampsTab.__init__(self, dbstate, uistate, track, name)
|
|
|
|
eventbox = gtk.EventBox()
|
|
|
|
eventbox.add(widget)
|
|
|
|
self.pack_start(eventbox)
|
|
|
|
self._set_label(show_image=False)
|
2008-02-16 04:08:47 +05:30
|
|
|
eventbox.connect('key_press_event', self.key_pressed)
|
2007-12-20 19:19:41 +05:30
|
|
|
self.show_all()
|
|
|
|
|
|
|
|
def is_empty(self):
|
|
|
|
"""
|
|
|
|
Override base class
|
|
|
|
"""
|
|
|
|
return False
|
|
|
|
|
2002-10-20 19:55:16 +05:30
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
#
|
|
|
|
# EditPlace
|
|
|
|
#
|
|
|
|
#-------------------------------------------------------------------------
|
2006-03-04 12:04:48 +05:30
|
|
|
class EditPlace(EditPrimary):
|
2002-10-20 19:55:16 +05:30
|
|
|
|
2008-02-08 20:59:28 +05:30
|
|
|
def __init__(self, dbstate, uistate, track, place, callback=None):
|
2006-03-04 12:04:48 +05:30
|
|
|
EditPrimary.__init__(self, dbstate, uistate, track, place,
|
2008-02-09 06:37:23 +05:30
|
|
|
dbstate.db.get_place_from_handle,
|
|
|
|
dbstate.db.get_place_from_gramps_id, callback)
|
2005-09-16 09:37:53 +05:30
|
|
|
|
2006-04-01 01:16:41 +05:30
|
|
|
def empty_object(self):
|
2007-10-08 22:11:39 +05:30
|
|
|
return gen.lib.Place()
|
2006-04-01 01:16:41 +05:30
|
|
|
|
2006-03-01 10:38:11 +05:30
|
|
|
def _local_init(self):
|
2009-10-08 06:42:51 +05:30
|
|
|
self.width_key = 'interface.place-width'
|
|
|
|
self.height_key = 'interface.place-height'
|
2009-05-08 01:38:27 +05:30
|
|
|
|
2009-05-15 01:45:59 +05:30
|
|
|
self.top = Glade()
|
2006-02-23 08:43:15 +05:30
|
|
|
|
2009-05-15 01:45:59 +05:30
|
|
|
self.set_window(self.top.toplevel, None,
|
2007-03-24 04:48:32 +05:30
|
|
|
self.get_menu_title())
|
2009-05-08 01:38:27 +05:30
|
|
|
tblmloc = self.top.get_object('table19')
|
|
|
|
notebook = self.top.get_object('notebook3')
|
2007-12-20 19:19:41 +05:30
|
|
|
#recreate start page as GrampsTab
|
|
|
|
notebook.remove_page(0)
|
|
|
|
self.mloc = MainLocTab(self.dbstate, self.uistate, self.track,
|
2008-02-16 04:08:47 +05:30
|
|
|
_('_Location'), tblmloc)
|
2009-02-28 02:41:10 +05:30
|
|
|
self.track_ref_for_deletion("mloc")
|
|
|
|
|
2006-02-23 08:43:15 +05:30
|
|
|
|
2006-11-27 02:48:30 +05:30
|
|
|
def get_menu_title(self):
|
2006-12-10 09:54:11 +05:30
|
|
|
if self.obj and self.obj.get_handle():
|
2006-11-27 02:48:30 +05:30
|
|
|
title = self.obj.get_title()
|
|
|
|
dialog_title = _('Place: %s') % title
|
|
|
|
else:
|
|
|
|
dialog_title = _('New Place')
|
|
|
|
return dialog_title
|
|
|
|
|
2006-02-23 08:43:15 +05:30
|
|
|
def _connect_signals(self):
|
2009-05-08 01:38:27 +05:30
|
|
|
self.define_ok_button(self.top.get_object('ok'), self.save)
|
|
|
|
self.define_cancel_button(self.top.get_object('cancel'))
|
|
|
|
self.define_help_button(self.top.get_object('help'))
|
2006-02-23 08:43:15 +05:30
|
|
|
|
2009-08-05 16:02:05 +05:30
|
|
|
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._do_close)
|
|
|
|
self._add_db_signal('place-delete', self.check_for_close)
|
|
|
|
|
2006-02-23 08:43:15 +05:30
|
|
|
def _setup_fields(self):
|
2006-03-01 10:38:11 +05:30
|
|
|
mloc = self.obj.get_main_location()
|
2006-02-23 08:43:15 +05:30
|
|
|
|
2009-05-08 01:38:27 +05:30
|
|
|
self.title = MonitoredEntry(self.top.get_object("place_title"),
|
2008-02-09 06:37:23 +05:30
|
|
|
self.obj.set_title, self.obj.get_title,
|
|
|
|
self.db.readonly)
|
2006-02-23 08:43:15 +05:30
|
|
|
|
2009-05-08 01:38:27 +05:30
|
|
|
self.street = MonitoredEntry(self.top.get_object("street"),
|
2008-02-09 06:37:23 +05:30
|
|
|
mloc.set_street, mloc.get_street,
|
|
|
|
self.db.readonly)
|
2006-09-24 10:07:59 +05:30
|
|
|
|
2009-05-08 01:38:27 +05:30
|
|
|
self.city = MonitoredEntry(self.top.get_object("city"),
|
2008-02-09 06:37:23 +05:30
|
|
|
mloc.set_city, mloc.get_city,
|
|
|
|
self.db.readonly)
|
2006-02-23 08:43:15 +05:30
|
|
|
|
2009-05-08 01:38:27 +05:30
|
|
|
self.gid = MonitoredEntry(self.top.get_object("gid"),
|
2008-02-09 06:37:23 +05:30
|
|
|
self.obj.set_gramps_id,
|
|
|
|
self.obj.get_gramps_id, self.db.readonly)
|
2006-05-05 18:55:24 +05:30
|
|
|
|
2009-05-08 01:38:27 +05:30
|
|
|
self.privacy = PrivacyButton(self.top.get_object("private"), self.obj,
|
2008-02-09 06:37:23 +05:30
|
|
|
self.db.readonly)
|
2006-08-30 05:15:07 +05:30
|
|
|
|
2009-05-08 01:38:27 +05:30
|
|
|
self.parish = MonitoredEntry(self.top.get_object("parish"),
|
2008-02-09 06:37:23 +05:30
|
|
|
mloc.set_parish, mloc.get_parish,
|
|
|
|
self.db.readonly)
|
2006-02-23 08:43:15 +05:30
|
|
|
|
2009-05-08 01:38:27 +05:30
|
|
|
self.county = MonitoredEntry(self.top.get_object("county"),
|
2008-02-09 06:37:23 +05:30
|
|
|
mloc.set_county, mloc.get_county,
|
|
|
|
self.db.readonly)
|
2006-02-23 08:43:15 +05:30
|
|
|
|
2009-05-08 01:38:27 +05:30
|
|
|
self.state = MonitoredEntry(self.top.get_object("state"),
|
2008-02-09 06:37:23 +05:30
|
|
|
mloc.set_state, mloc.get_state,
|
|
|
|
self.db.readonly)
|
2006-02-23 08:43:15 +05:30
|
|
|
|
2009-05-08 01:38:27 +05:30
|
|
|
self.phone = MonitoredEntry(self.top.get_object("phone"),
|
2008-02-09 06:37:23 +05:30
|
|
|
mloc.set_phone, mloc.get_phone,
|
|
|
|
self.db.readonly)
|
2006-02-23 08:43:15 +05:30
|
|
|
|
2009-05-08 01:38:27 +05:30
|
|
|
self.postal = MonitoredEntry(self.top.get_object("postal"),
|
2008-02-09 06:37:23 +05:30
|
|
|
mloc.set_postal_code,
|
|
|
|
mloc.get_postal_code, self.db.readonly)
|
2006-02-23 08:43:15 +05:30
|
|
|
|
2009-05-08 01:38:27 +05:30
|
|
|
self.country = MonitoredEntry(self.top.get_object("country"),
|
2008-02-09 06:37:23 +05:30
|
|
|
mloc.set_country, mloc.get_country,
|
|
|
|
self.db.readonly)
|
2007-03-14 03:42:10 +05:30
|
|
|
|
2006-02-23 08:43:15 +05:30
|
|
|
self.longitude = MonitoredEntry(
|
2009-05-08 01:38:27 +05:30
|
|
|
self.top.get_object("lon_entry"),
|
2006-03-01 10:38:11 +05:30
|
|
|
self.obj.set_longitude, self.obj.get_longitude,
|
2006-02-23 08:43:15 +05:30
|
|
|
self.db.readonly)
|
2007-03-24 04:48:32 +05:30
|
|
|
self.longitude.connect("validate", self._validate_coordinate, "lon")
|
2009-01-28 17:18:20 +05:30
|
|
|
#force validation now with initial entry
|
2009-05-08 01:38:27 +05:30
|
|
|
self.top.get_object("lon_entry").validate(force=True)
|
2006-02-23 08:43:15 +05:30
|
|
|
|
|
|
|
self.latitude = MonitoredEntry(
|
2009-05-08 01:38:27 +05:30
|
|
|
self.top.get_object("lat_entry"),
|
2006-03-01 10:38:11 +05:30
|
|
|
self.obj.set_latitude, self.obj.get_latitude,
|
2006-02-23 08:43:15 +05:30
|
|
|
self.db.readonly)
|
2007-03-24 04:48:32 +05:30
|
|
|
self.latitude.connect("validate", self._validate_coordinate, "lat")
|
2009-01-28 17:18:20 +05:30
|
|
|
#force validation now with initial entry
|
2009-05-08 01:38:27 +05:30
|
|
|
self.top.get_object("lat_entry").validate(force=True)
|
2005-07-09 01:54:54 +05:30
|
|
|
|
2007-03-14 03:42:10 +05:30
|
|
|
def _validate_coordinate(self, widget, text, typedeg):
|
2007-03-18 01:37:11 +05:30
|
|
|
if (typedeg == 'lat') and not conv_lat_lon(text, "0", "ISO-D"):
|
2009-12-13 21:26:35 +05:30
|
|
|
return ValidationError(_(u"Invalid latitude (syntax: 18\u00b09'") +
|
|
|
|
_('48.21"S, -18.2412 or -18:9:48.21)'))
|
2007-03-18 01:37:11 +05:30
|
|
|
elif (typedeg == 'lon') and not conv_lat_lon("0", text, "ISO-D"):
|
2009-12-13 21:26:35 +05:30
|
|
|
return ValidationError(_(u"Invalid longitude (syntax: 18\u00b09'") +
|
|
|
|
_('48.21"E, -18.2412 or -18:9:48.21)'))
|
2007-03-24 04:48:32 +05:30
|
|
|
|
2008-02-08 20:59:28 +05:30
|
|
|
def build_menu_names(self, place):
|
2006-11-27 02:48:30 +05:30
|
|
|
return (_('Edit Place'), self.get_menu_title())
|
2005-12-23 05:13:32 +05:30
|
|
|
|
2006-02-06 00:30:25 +05:30
|
|
|
def _create_tabbed_pages(self):
|
|
|
|
"""
|
2008-02-24 19:25:55 +05:30
|
|
|
Create the notebook tabs and inserts them into the main
|
2006-02-06 00:30:25 +05:30
|
|
|
window.
|
|
|
|
|
|
|
|
"""
|
2009-05-08 01:38:27 +05:30
|
|
|
notebook = self.top.get_object('notebook3')
|
2006-02-06 00:30:25 +05:30
|
|
|
|
2007-12-20 19:19:41 +05:30
|
|
|
self._add_tab(notebook, self.mloc)
|
|
|
|
|
2009-02-28 02:41:10 +05:30
|
|
|
self.loc_list = LocationEmbedList(self.dbstate,
|
|
|
|
self.uistate,
|
|
|
|
self.track,
|
|
|
|
self.obj.alt_loc)
|
|
|
|
self._add_tab(notebook, self.loc_list)
|
|
|
|
self.track_ref_for_deletion("loc_list")
|
2006-03-01 10:38:11 +05:30
|
|
|
|
2009-02-28 02:41:10 +05:30
|
|
|
self.srcref_list = SourceEmbedList(self.dbstate,
|
|
|
|
self.uistate,
|
|
|
|
self.track,
|
|
|
|
self.obj)
|
|
|
|
self._add_tab(notebook, self.srcref_list)
|
|
|
|
self.track_ref_for_deletion("srcref_list")
|
2006-03-01 10:38:11 +05:30
|
|
|
|
2009-02-28 02:41:10 +05:30
|
|
|
self.note_tab = NoteTab(self.dbstate,
|
|
|
|
self.uistate,
|
|
|
|
self.track,
|
|
|
|
self.obj.get_note_list(),
|
|
|
|
self.get_menu_title(),
|
|
|
|
notetype=gen.lib.NoteType.PLACE)
|
|
|
|
self._add_tab(notebook, self.note_tab)
|
|
|
|
self.track_ref_for_deletion("note_tab")
|
2006-03-01 10:38:11 +05:30
|
|
|
|
2009-02-28 02:41:10 +05:30
|
|
|
self.gallery_tab = GalleryTab(self.dbstate,
|
|
|
|
self.uistate,
|
|
|
|
self.track,
|
|
|
|
self.obj.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.obj.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.obj.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")
|
2003-11-19 23:30:58 +05:30
|
|
|
|
2007-12-20 19:19:41 +05:30
|
|
|
self._setup_notebook_tabs(notebook)
|
2007-01-16 12:42:10 +05:30
|
|
|
|
2006-03-01 10:38:11 +05:30
|
|
|
def _cleanup_on_exit(self):
|
2009-02-28 02:41:10 +05:30
|
|
|
self.backref_tab.close()
|
2002-10-20 19:55:16 +05:30
|
|
|
|
2008-02-08 20:59:28 +05:30
|
|
|
def save(self, *obj):
|
2007-04-08 09:54:38 +05:30
|
|
|
self.ok_button.set_sensitive(False)
|
2008-02-09 06:37:23 +05:30
|
|
|
if self.object_is_empty():
|
|
|
|
ErrorDialog(_("Cannot save place"),
|
|
|
|
_("No data exists for this place. Please "
|
|
|
|
"enter data or cancel the edit."))
|
|
|
|
self.ok_button.set_sensitive(True)
|
|
|
|
return
|
|
|
|
|
|
|
|
(uses_dupe_id, id) = self._uses_duplicate_id()
|
|
|
|
if uses_dupe_id:
|
|
|
|
prim_object = self.get_from_gramps_id(id)
|
|
|
|
name = prim_object.get_title()
|
|
|
|
msg1 = _("Cannot save place. ID already exists.")
|
2009-11-18 01:44:53 +05:30
|
|
|
msg2 = _("You have attempted to use the existing Gramps ID with "
|
2008-02-09 06:37:23 +05:30
|
|
|
"value %(id)s. This value is already used by '"
|
|
|
|
"%(prim_object)s'. Please enter a different ID or leave "
|
|
|
|
"blank to get the next available ID value.") % {
|
|
|
|
'id' : id, 'prim_object' : name }
|
|
|
|
ErrorDialog(msg1, msg2)
|
|
|
|
self.ok_button.set_sensitive(True)
|
|
|
|
return
|
2005-07-09 01:54:54 +05:30
|
|
|
|
2004-08-13 10:04:07 +05:30
|
|
|
trans = self.db.transaction_begin()
|
2008-02-08 19:10:04 +05:30
|
|
|
if not self.obj.get_handle():
|
2008-02-08 20:59:28 +05:30
|
|
|
self.db.add_place(self.obj, trans)
|
2008-02-08 19:10:04 +05:30
|
|
|
msg = _("Add Place (%s)") % self.obj.get_title()
|
|
|
|
else:
|
|
|
|
if not self.obj.get_gramps_id():
|
|
|
|
self.obj.set_gramps_id(self.db.find_next_place_gramps_id())
|
|
|
|
self.db.commit_place(self.obj, trans)
|
|
|
|
msg = _("Edit Place (%s)") % self.obj.get_title()
|
|
|
|
self.db.transaction_commit(trans, msg)
|
2004-03-30 10:20:24 +05:30
|
|
|
|
2006-05-18 01:02:19 +05:30
|
|
|
if self.callback:
|
|
|
|
self.callback(self.obj)
|
2006-04-22 08:53:57 +05:30
|
|
|
self.close()
|
2004-02-26 09:04:19 +05:30
|
|
|
|
2002-10-20 19:55:16 +05:30
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
#
|
|
|
|
# DeletePlaceQuery
|
|
|
|
#
|
|
|
|
#-------------------------------------------------------------------------
|
2009-05-21 22:49:50 +05:30
|
|
|
class DeletePlaceQuery(object):
|
2002-10-20 19:55:16 +05:30
|
|
|
|
2008-02-08 20:59:28 +05:30
|
|
|
def __init__(self, dbstate, uistate, place, person_list, family_list,
|
|
|
|
event_list):
|
2007-01-23 09:07:13 +05:30
|
|
|
self.db = dbstate.db
|
|
|
|
self.uistate = uistate
|
2006-03-01 10:38:11 +05:30
|
|
|
self.obj = place
|
2007-01-23 09:07:13 +05:30
|
|
|
self.person_list = person_list
|
|
|
|
self.family_list = family_list
|
|
|
|
self.event_list = event_list
|
2002-10-20 19:55:16 +05:30
|
|
|
|
|
|
|
def query_response(self):
|
2004-08-13 10:04:07 +05:30
|
|
|
trans = self.db.transaction_begin()
|
2005-06-05 09:31:56 +05:30
|
|
|
self.db.disable_signals()
|
2004-03-30 10:20:24 +05:30
|
|
|
|
2006-03-01 10:38:11 +05:30
|
|
|
place_handle = self.obj.get_handle()
|
2005-04-04 05:57:06 +05:30
|
|
|
|
2007-01-23 09:07:13 +05:30
|
|
|
for handle in self.person_list:
|
2005-04-04 05:57:06 +05:30
|
|
|
person = self.db.get_person_from_handle(handle)
|
2008-02-08 20:59:28 +05:30
|
|
|
person.remove_handle_references('Place', place_handle)
|
|
|
|
self.db.commit_person(person, trans)
|
2005-04-04 05:57:06 +05:30
|
|
|
|
2007-01-23 09:07:13 +05:30
|
|
|
for handle in self.family_list:
|
2005-04-04 05:57:06 +05:30
|
|
|
family = self.db.get_family_from_handle(handle)
|
2008-02-08 20:59:28 +05:30
|
|
|
family.remove_handle_references('Place', place_handle)
|
|
|
|
self.db.commit_family(family, trans)
|
2005-04-04 05:57:06 +05:30
|
|
|
|
2007-01-23 09:07:13 +05:30
|
|
|
for handle in self.event_list:
|
2005-04-04 05:57:06 +05:30
|
|
|
event = self.db.get_event_from_handle(handle)
|
2008-02-08 20:59:28 +05:30
|
|
|
event.remove_handle_references('Place', place_handle)
|
|
|
|
self.db.commit_event(event, trans)
|
2002-10-21 06:48:07 +05:30
|
|
|
|
2005-06-05 09:31:56 +05:30
|
|
|
self.db.enable_signals()
|
2008-02-08 20:59:28 +05:30
|
|
|
self.db.remove_place(place_handle, trans)
|
2007-01-23 09:07:13 +05:30
|
|
|
self.db.transaction_commit(
|
|
|
|
trans,_("Delete Place (%s)") % self.obj.get_title())
|