2002-11-26 18:43:31 +05:30
|
|
|
#
|
|
|
|
# Gramps - a GTK+/GNOME based genealogy program
|
|
|
|
#
|
2003-11-19 23:30:58 +05:30
|
|
|
# Copyright (C) 2000-2003 Donald N. Allingham
|
2002-11-26 18:43:31 +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-19 23:30:58 +05:30
|
|
|
# $Id$
|
|
|
|
|
2002-11-26 18:43:31 +05:30
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
#
|
|
|
|
# GTK/Gnome modules
|
|
|
|
#
|
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
import gobject
|
|
|
|
import gtk
|
|
|
|
import gtk.glade
|
2003-11-19 23:30:58 +05:30
|
|
|
import gnome
|
2002-11-26 18:43:31 +05:30
|
|
|
|
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
#
|
|
|
|
# gramps modules
|
|
|
|
#
|
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
import const
|
|
|
|
import Utils
|
2003-01-10 10:51:32 +05:30
|
|
|
import RelLib
|
2003-08-17 07:44:33 +05:30
|
|
|
from gettext import gettext as _
|
2002-11-26 18:43:31 +05:30
|
|
|
|
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
#
|
|
|
|
# SourceSelector
|
|
|
|
#
|
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
|
|
|
|
class SourceSelector:
|
|
|
|
def __init__(self,srclist,parent,update=None):
|
|
|
|
self.db = parent.db
|
|
|
|
self.parent = parent
|
|
|
|
self.orig = srclist
|
|
|
|
self.list = []
|
|
|
|
for s in self.orig:
|
2003-01-10 10:51:32 +05:30
|
|
|
self.list.append(RelLib.SourceRef(s))
|
2002-11-26 18:43:31 +05:30
|
|
|
self.update=update
|
2003-08-17 07:44:33 +05:30
|
|
|
self.top = gtk.glade.XML(const.srcselFile,"sourcesel","gramps")
|
2003-09-14 02:12:57 +05:30
|
|
|
self.window = self.top.get_widget("sourcesel")
|
2003-03-05 11:31:31 +05:30
|
|
|
|
2003-09-14 02:12:57 +05:30
|
|
|
Utils.set_titles(self.window, self.top.get_widget('title'),
|
2003-03-06 11:42:51 +05:30
|
|
|
_('Source Reference Selection'))
|
2003-03-05 11:31:31 +05:30
|
|
|
|
2002-11-26 18:43:31 +05:30
|
|
|
self.top.signal_autoconnect({
|
|
|
|
"on_add_src_clicked" : self.add_src_clicked,
|
|
|
|
"on_del_src_clicked" : self.del_src_clicked,
|
2003-03-03 10:02:53 +05:30
|
|
|
"on_edit_src_clicked" : self.edit_src_clicked,
|
2003-11-19 23:30:58 +05:30
|
|
|
"on_help_srcsel_clicked" : self.on_help_clicked,
|
2002-11-26 18:43:31 +05:30
|
|
|
})
|
|
|
|
|
|
|
|
self.slist = self.top.get_widget("slist")
|
2003-03-24 09:21:07 +05:30
|
|
|
self.edit = self.top.get_widget('edit')
|
|
|
|
self.delete = self.top.get_widget('delete')
|
2002-11-26 18:43:31 +05:30
|
|
|
self.selection = self.slist.get_selection()
|
|
|
|
self.model = gtk.ListStore(gobject.TYPE_STRING, gobject.TYPE_STRING)
|
|
|
|
self.slist.set_model(self.model)
|
|
|
|
|
|
|
|
colno = 0
|
|
|
|
for title in [ (_('ID'),0,100), (_('Title'),1,150)]:
|
|
|
|
renderer = gtk.CellRendererText ()
|
2003-07-27 09:20:57 +05:30
|
|
|
renderer.set_fixed_height_from_font(1)
|
2002-11-26 18:43:31 +05:30
|
|
|
column = gtk.TreeViewColumn (title[0], renderer, text=colno)
|
|
|
|
colno = colno + 1
|
|
|
|
column.set_clickable (gtk.TRUE)
|
|
|
|
column.set_resizable(gtk.TRUE)
|
|
|
|
column.set_sort_column_id(title[1])
|
|
|
|
column.set_min_width(title[2])
|
|
|
|
self.slist.append_column (column)
|
|
|
|
|
2003-03-24 09:21:07 +05:30
|
|
|
self.selection.connect('changed',self.selection_changed)
|
|
|
|
|
|
|
|
self.delete.set_sensitive(gtk.FALSE)
|
|
|
|
self.edit.set_sensitive(gtk.FALSE)
|
2002-11-26 18:43:31 +05:30
|
|
|
self.redraw()
|
2003-09-14 02:12:57 +05:30
|
|
|
if self.parent:
|
|
|
|
self.window.set_transient_for(self.parent.window)
|
|
|
|
|
|
|
|
self.window.show()
|
2003-11-19 23:30:58 +05:30
|
|
|
self.val = self.window.run()
|
|
|
|
if self.val == gtk.RESPONSE_OK:
|
2003-09-14 02:12:57 +05:30
|
|
|
self.src_ok_clicked()
|
|
|
|
self.window.destroy()
|
2002-11-26 18:43:31 +05:30
|
|
|
|
2003-11-19 23:30:58 +05:30
|
|
|
def on_help_clicked(self,obj):
|
|
|
|
"""Display the relevant portion of GRAMPS manual"""
|
2003-12-02 09:57:23 +05:30
|
|
|
gnome.help_display('gramps-manual','gramps-edit-complete')
|
2003-11-19 23:30:58 +05:30
|
|
|
self.val = self.window.run()
|
|
|
|
|
2003-03-24 09:21:07 +05:30
|
|
|
def selection_changed(self,obj):
|
|
|
|
(store,iter) = self.selection.get_selected()
|
|
|
|
if iter:
|
|
|
|
self.delete.set_sensitive(gtk.TRUE)
|
|
|
|
self.edit.set_sensitive(gtk.TRUE)
|
|
|
|
else:
|
|
|
|
self.delete.set_sensitive(gtk.FALSE)
|
|
|
|
self.edit.set_sensitive(gtk.FALSE)
|
|
|
|
|
2002-11-26 18:43:31 +05:30
|
|
|
def redraw(self):
|
|
|
|
self.model.clear()
|
|
|
|
for s in self.list:
|
|
|
|
base = s.getBase()
|
|
|
|
iter = self.model.append()
|
|
|
|
self.model.set(iter,0,base.getId(),1,base.getTitle())
|
|
|
|
|
2003-09-14 02:12:57 +05:30
|
|
|
def src_ok_clicked(self):
|
2002-11-26 18:43:31 +05:30
|
|
|
del self.orig[:]
|
|
|
|
for s in self.list:
|
|
|
|
self.orig.append(s)
|
|
|
|
if self.update:
|
|
|
|
self.update(self.orig)
|
|
|
|
|
|
|
|
def edit_src_clicked(self,obj):
|
|
|
|
store,iter = self.selection.get_selected()
|
|
|
|
if iter:
|
|
|
|
col = store.get_path(iter)
|
|
|
|
src = self.list[col[0]]
|
|
|
|
SourceEditor(src,self.db,self.update_clist,self)
|
|
|
|
|
|
|
|
def update_clist(self,inst,ref):
|
|
|
|
inst.redraw()
|
|
|
|
|
|
|
|
def add_src_clicked(self,obj):
|
2003-01-10 10:51:32 +05:30
|
|
|
src = RelLib.SourceRef()
|
2002-11-26 18:43:31 +05:30
|
|
|
SourceEditor(src,self.db,self.add_ref,self)
|
|
|
|
|
|
|
|
def del_src_clicked(self,obj):
|
|
|
|
(store,iter) = self.selection.get_selected()
|
|
|
|
if iter:
|
|
|
|
path = store.get_path(iter)
|
|
|
|
del self.list[path[0]]
|
|
|
|
self.redraw()
|
|
|
|
|
|
|
|
def add_ref(self,inst,ref):
|
|
|
|
self.parent.lists_changed = 1
|
|
|
|
inst.list.append(ref)
|
|
|
|
inst.redraw()
|
|
|
|
|
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
#
|
|
|
|
# SourceTab
|
|
|
|
#
|
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
class SourceTab:
|
2003-09-14 02:12:57 +05:30
|
|
|
def __init__(self,srclist,parent,top,window,clist,add_btn,edit_btn,del_btn):
|
2002-11-26 18:43:31 +05:30
|
|
|
self.db = parent.db
|
|
|
|
self.parent = parent
|
|
|
|
self.list = srclist
|
|
|
|
self.top = top
|
2003-09-14 02:12:57 +05:30
|
|
|
self.window = window
|
2002-11-26 18:43:31 +05:30
|
|
|
self.slist = clist
|
|
|
|
self.selection = clist.get_selection()
|
|
|
|
self.model = gtk.ListStore(gobject.TYPE_STRING, gobject.TYPE_STRING)
|
|
|
|
|
|
|
|
colno = 0
|
|
|
|
for title in [ (_('ID'),0,100), (_('Title'),1,150)]:
|
|
|
|
renderer = gtk.CellRendererText ()
|
|
|
|
column = gtk.TreeViewColumn (title[0], renderer, text=colno)
|
|
|
|
colno = colno + 1
|
|
|
|
column.set_clickable (gtk.TRUE)
|
|
|
|
column.set_resizable(gtk.TRUE)
|
|
|
|
column.set_sort_column_id(title[1])
|
|
|
|
column.set_min_width(title[2])
|
|
|
|
self.slist.append_column (column)
|
|
|
|
|
|
|
|
self.slist.set_model(self.model)
|
|
|
|
|
|
|
|
add_btn.connect('clicked', self.add_src_clicked)
|
2003-03-03 10:02:53 +05:30
|
|
|
edit_btn.connect('clicked', self.edit_src_clicked)
|
2002-11-26 18:43:31 +05:30
|
|
|
del_btn.connect('clicked', self.del_src_clicked)
|
|
|
|
self.slist.connect('button-press-event',self.double_click)
|
|
|
|
self.redraw()
|
|
|
|
|
|
|
|
def double_click(self,obj,event):
|
|
|
|
if event.type == gtk.gdk._2BUTTON_PRESS and event.button == 1:
|
|
|
|
self.edit_src_clicked(obj)
|
|
|
|
|
|
|
|
def redraw(self):
|
|
|
|
self.model.clear()
|
|
|
|
for s in self.list:
|
|
|
|
base = s.getBase()
|
|
|
|
iter = self.model.append()
|
|
|
|
self.model.set(iter,0,base.getId(),1,base.getTitle())
|
2003-11-13 00:15:07 +05:30
|
|
|
if self.list:
|
|
|
|
Utils.bold_label(self.parent.sources_label)
|
|
|
|
else:
|
|
|
|
Utils.unbold_label(self.parent.sources_label)
|
2002-11-26 18:43:31 +05:30
|
|
|
|
|
|
|
def update_clist(self,inst,ref):
|
|
|
|
inst.redraw()
|
|
|
|
self.parent.lists_changed = 1
|
|
|
|
|
|
|
|
def edit_src_clicked(self,obj):
|
|
|
|
store,iter = self.selection.get_selected()
|
|
|
|
if iter:
|
|
|
|
col = store.get_path(iter)
|
|
|
|
src = self.list[col[0]]
|
|
|
|
SourceEditor(src,self.db,self.update_clist,self)
|
|
|
|
|
|
|
|
def add_src_clicked(self,obj):
|
2003-01-10 10:51:32 +05:30
|
|
|
src = RelLib.SourceRef()
|
2002-11-26 18:43:31 +05:30
|
|
|
SourceEditor(src,self.db,self.add_ref,self)
|
|
|
|
|
|
|
|
def add_ref(self,inst,ref):
|
|
|
|
self.parent.lists_changed = 1
|
|
|
|
inst.list.append(ref)
|
|
|
|
inst.redraw()
|
|
|
|
|
|
|
|
def del_src_clicked(self,obj):
|
|
|
|
(store,iter) = self.selection.get_selected()
|
|
|
|
if iter:
|
|
|
|
path = store.get_path(iter)
|
|
|
|
del self.list[path[0]]
|
|
|
|
self.redraw()
|
|
|
|
|
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
#
|
|
|
|
# SourceEditor
|
|
|
|
#
|
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
class SourceEditor:
|
|
|
|
|
|
|
|
def __init__(self,srcref,database,update=None,parent=None):
|
|
|
|
|
|
|
|
self.db = database
|
|
|
|
self.parent = parent
|
|
|
|
self.update = update
|
|
|
|
self.source_ref = srcref
|
2003-08-17 07:44:33 +05:30
|
|
|
self.showSource = gtk.glade.XML(const.srcselFile, "sourceDisplay","gramps")
|
2003-03-06 11:42:51 +05:30
|
|
|
self.sourceDisplay = self.get_widget("sourceDisplay")
|
2003-03-05 11:31:31 +05:30
|
|
|
|
2003-03-06 11:42:51 +05:30
|
|
|
Utils.set_titles(self.sourceDisplay, self.showSource.get_widget('title'),
|
|
|
|
_('Source Information'))
|
2003-03-05 11:31:31 +05:30
|
|
|
|
2002-11-26 18:43:31 +05:30
|
|
|
self.showSource.signal_autoconnect({
|
|
|
|
"on_source_changed" : self.on_source_changed,
|
2003-03-24 09:21:07 +05:30
|
|
|
"on_add_src_clicked" : self.add_src_clicked,
|
2003-11-19 23:30:58 +05:30
|
|
|
"on_help_srcDisplay_clicked" : self.on_help_clicked,
|
2002-11-26 18:43:31 +05:30
|
|
|
})
|
|
|
|
self.source_field = self.get_widget("sourceList")
|
|
|
|
self.title_menu = self.get_widget("source_title")
|
|
|
|
self.title_menu.set_data("o",self)
|
|
|
|
self.conf_menu = self.get_widget("conf")
|
2003-03-24 09:21:07 +05:30
|
|
|
self.ok = self.get_widget("ok")
|
2002-11-26 18:43:31 +05:30
|
|
|
Utils.build_confidence_menu(self.conf_menu)
|
|
|
|
self.conf_menu.set_history(srcref.getConfidence())
|
2003-03-24 09:21:07 +05:30
|
|
|
self.list = []
|
2002-11-26 18:43:31 +05:30
|
|
|
|
2003-03-24 09:21:07 +05:30
|
|
|
self.title_menu.list.select_item(0)
|
|
|
|
self.title_menu.list.remove_items(self.title_menu.list.get_selection())
|
|
|
|
|
2002-11-26 18:43:31 +05:30
|
|
|
self.author_field = self.get_widget("sauthor")
|
|
|
|
self.pub_field = self.get_widget("spubinfo")
|
|
|
|
|
|
|
|
if self.source_ref:
|
|
|
|
self.active_source = self.source_ref.getBase()
|
|
|
|
else:
|
|
|
|
self.active_source = None
|
2003-03-24 09:21:07 +05:30
|
|
|
|
2003-04-20 09:22:54 +05:30
|
|
|
self.draw(self.active_source)
|
2003-03-24 09:21:07 +05:30
|
|
|
self.set_button()
|
2002-11-26 18:43:31 +05:30
|
|
|
self.sourceDisplay.show()
|
2003-09-14 02:12:57 +05:30
|
|
|
if self.parent:
|
|
|
|
self.sourceDisplay.set_transient_for(self.parent.window)
|
2003-11-19 23:30:58 +05:30
|
|
|
self.val = self.sourceDisplay.run()
|
|
|
|
if self.val == gtk.RESPONSE_OK:
|
2003-09-14 02:12:57 +05:30
|
|
|
self.on_sourceok_clicked()
|
|
|
|
self.sourceDisplay.destroy()
|
2002-11-26 18:43:31 +05:30
|
|
|
|
2003-11-19 23:30:58 +05:30
|
|
|
def on_help_clicked(self,obj):
|
|
|
|
"""Display the relevant portion of GRAMPS manual"""
|
|
|
|
gnome.help_display('gramps-manual','adv-si')
|
|
|
|
self.val = self.sourceDisplay.run()
|
|
|
|
|
2003-03-24 09:21:07 +05:30
|
|
|
def set_button(self):
|
|
|
|
if self.active_source:
|
|
|
|
self.ok.set_sensitive(1)
|
|
|
|
else:
|
|
|
|
self.ok.set_sensitive(0)
|
|
|
|
|
2002-11-26 18:43:31 +05:30
|
|
|
def get_widget(self,name):
|
|
|
|
"""returns the widget associated with the specified name"""
|
|
|
|
return self.showSource.get_widget(name)
|
|
|
|
|
2003-03-24 09:21:07 +05:30
|
|
|
def draw(self,sel = None):
|
|
|
|
self.title_menu.list.remove_items(self.list)
|
2002-11-26 18:43:31 +05:30
|
|
|
if self.source_ref:
|
2003-07-21 05:39:12 +05:30
|
|
|
spage = self.get_widget("spage")
|
|
|
|
spage.get_buffer().set_text(self.source_ref.getPage())
|
2002-11-26 18:43:31 +05:30
|
|
|
date = self.source_ref.getDate()
|
|
|
|
if date:
|
|
|
|
self.get_widget("sdate").set_text(date.getDate())
|
|
|
|
|
|
|
|
text = self.get_widget("stext")
|
|
|
|
text.get_buffer().set_text(self.source_ref.getText())
|
|
|
|
|
|
|
|
scom = self.get_widget("scomment")
|
|
|
|
scom.get_buffer().set_text(self.source_ref.getComments())
|
|
|
|
src = self.source_ref.getBase()
|
|
|
|
self.active_source = src
|
|
|
|
if src:
|
|
|
|
self.author_field.set_text(src.getAuthor())
|
|
|
|
self.pub_field.set_text(src.getPubInfo())
|
|
|
|
else:
|
|
|
|
self.author_field.set_text("")
|
|
|
|
self.pub_field.set_text("")
|
|
|
|
|
|
|
|
values = self.db.getSourceMap().values()
|
2003-07-22 10:15:05 +05:30
|
|
|
values.sort(by_title)
|
|
|
|
|
2002-11-26 18:43:31 +05:30
|
|
|
sel_child = None
|
2003-03-24 09:21:07 +05:30
|
|
|
self.list = []
|
|
|
|
self.active_source = sel
|
2002-11-26 18:43:31 +05:30
|
|
|
for src in values:
|
|
|
|
l = gtk.Label("%s [%s]" % (src.getTitle(),src.getId()))
|
|
|
|
l.show()
|
|
|
|
l.set_alignment(0,0.5)
|
|
|
|
c = gtk.ListItem()
|
|
|
|
c.add(l)
|
|
|
|
c.set_data("s",src)
|
|
|
|
c.show()
|
2003-03-24 09:21:07 +05:30
|
|
|
self.list.append(c)
|
2002-11-26 18:43:31 +05:30
|
|
|
if self.active_source == src:
|
|
|
|
sel_child = c
|
|
|
|
|
2003-04-20 09:22:54 +05:30
|
|
|
if len(self.list) > 0:
|
|
|
|
self.title_menu.list.append_items(self.list)
|
|
|
|
self.title_menu.set_sensitive(1)
|
|
|
|
if sel_child:
|
|
|
|
self.title_menu.list.select_child(sel_child)
|
|
|
|
else:
|
|
|
|
self.title_menu.set_sensitive(0)
|
2002-11-26 18:43:31 +05:30
|
|
|
|
2003-09-14 02:12:57 +05:30
|
|
|
def on_sourceok_clicked(self):
|
2003-03-24 09:21:07 +05:30
|
|
|
|
2002-11-26 18:43:31 +05:30
|
|
|
if self.active_source != self.source_ref.getBase():
|
|
|
|
self.source_ref.setBase(self.active_source)
|
|
|
|
|
2003-12-17 10:53:16 +05:30
|
|
|
date = unicode(self.get_widget("sdate").get_text())
|
2002-11-26 18:43:31 +05:30
|
|
|
conf = self.get_widget("conf").get_menu().get_active().get_data('a')
|
|
|
|
|
|
|
|
buffer = self.get_widget("scomment").get_buffer()
|
|
|
|
comments = buffer.get_text(buffer.get_start_iter(),
|
|
|
|
buffer.get_end_iter(),gtk.FALSE)
|
|
|
|
|
|
|
|
buffer = self.get_widget("stext").get_buffer()
|
|
|
|
text = buffer.get_text(buffer.get_start_iter(),
|
|
|
|
buffer.get_end_iter(),gtk.FALSE)
|
|
|
|
|
2003-07-21 05:39:12 +05:30
|
|
|
buffer = self.get_widget('spage').get_buffer()
|
|
|
|
page = buffer.get_text(buffer.get_start_iter(),
|
|
|
|
buffer.get_end_iter(),gtk.FALSE)
|
|
|
|
|
2002-11-26 18:43:31 +05:30
|
|
|
self.source_ref.setPage(page)
|
|
|
|
self.source_ref.getDate().set(date)
|
|
|
|
self.source_ref.setText(text)
|
|
|
|
self.source_ref.setComments(comments)
|
|
|
|
self.source_ref.setConfidence(conf)
|
|
|
|
|
|
|
|
if self.update:
|
|
|
|
self.update(self.parent,self.source_ref)
|
|
|
|
|
|
|
|
Utils.modified()
|
|
|
|
|
|
|
|
def on_source_changed(self,obj):
|
2003-03-24 09:21:07 +05:30
|
|
|
sel = obj.list.get_selection()
|
|
|
|
if sel:
|
|
|
|
self.active_source = sel[0].get_data("s")
|
|
|
|
|
|
|
|
if self.active_source:
|
|
|
|
self.author_field.set_text(self.active_source.getAuthor())
|
|
|
|
self.pub_field.set_text(self.active_source.getPubInfo())
|
|
|
|
self.set_button()
|
|
|
|
|
|
|
|
def update_display(self,source):
|
|
|
|
self.db.addSource(source)
|
|
|
|
self.draw(source)
|
|
|
|
# self.update(0)
|
2002-11-26 18:43:31 +05:30
|
|
|
|
2003-03-24 09:21:07 +05:30
|
|
|
def add_src_clicked(self,obj):
|
|
|
|
import EditSource
|
* src/SourceView.py (button_press,on_add_clicked,on_delete_clicked,
on_edit_clicked): Pass parent window to the child dialog.
* src/Sources.py (add_src_clicked): Likewise.
* src/EditSource.py (__init__): Add optional parent_window argument.
Make dialog modal and transient for its parent.
* src/gramps.glade (sourceEditor dialog): Delete unneeded handlers
for buttons.
* src/QuestionDialog.py (SaveDialog,QuestionDialog,OptionDialog,
ErrorDialog,WarningDialog,MissingMediaDialog): Set transient status
if parent is given.
* src/EventEdit.py (__init__): Make dialog modal and transient for
its parent.
* src/Witness.py: Make WittnessEditor dialog modal and transient for
its parent. Call SelectPerson with itself as a parent.
* src/SelectPerson.py (__init__): Make dialog transient for its parent.
* src/imagesel.glade: Define proper responses and delete unneeded handlers
for buttons. Make gtkFileEntry modal.
* src/dialog.glade (all dialogs): Define proper responses for buttons.
* src/EditPerson.py (on_add_aka_clicked, on_aka_update_clicked):
Call NameEdit with itself as a parent; (on_add_attr_clicked,
on_update_attr_clicked): Call AttributeEditor with itself as a parent;
(on_add_addr_clicked,on_update_addr_clicked): Call AddressEditor with
itself as a parent; (on_add_url_clicked,on_update_url_clicked): Call
UrlEditor with itself as a parent; (on_name_note_clicked,
on_ldsbap_note_clicked,on_ldsendow_note_clicked,
on_ldsseal_note_clicked): Call NoteEditor with itself as a parent.
* src/NameEdit.py (__init__): Make dialog modal and transient for
its parent.
* src/AttrEdit.py (__init__): Likewise.
* src/AddrEdit.py (__init__): Likewise.
* src/UrlEdit.py (__init__): Likewise.
* src/NoteEdit.py (__init__): Likewise.
svn: r2131
2003-09-15 09:41:30 +05:30
|
|
|
EditSource.EditSource(RelLib.Source(),self.db, self.sourceDisplay, self.update_display)
|
2002-11-26 18:43:31 +05:30
|
|
|
|
|
|
|
|
2003-07-22 10:15:05 +05:30
|
|
|
def by_title(first,second):
|
|
|
|
return cmp(first.getTitle(),second.getTitle())
|