* 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
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
#
|
||||
# Gramps - a GTK+/GNOME based genealogy program
|
||||
#
|
||||
# Copyright (C) 2001 Donald N. Allingham
|
||||
# Copyright (C) 2001-2003 Donald N. Allingham
|
||||
#
|
||||
# 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
|
||||
@ -88,6 +88,7 @@ class SourceView:
|
||||
gobject.TYPE_STRING)
|
||||
self.list.set_model(self.model)
|
||||
self.list.get_column(0).clicked()
|
||||
self.topWindow = self.glade.get_widget("gramps")
|
||||
|
||||
def change_db(self,db):
|
||||
self.db = db
|
||||
@ -117,12 +118,12 @@ class SourceView:
|
||||
store,iter = self.selection.get_selected()
|
||||
id = store.get_value(iter,1)
|
||||
source = self.db.getSource(id)
|
||||
EditSource.EditSource(source,self.db,self.update_display)
|
||||
EditSource.EditSource(source,self.db,self.topWindow,self.update_display)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
def on_add_clicked(self,obj):
|
||||
EditSource.EditSource(RelLib.Source(),self.db,self.new_after_edit)
|
||||
EditSource.EditSource(RelLib.Source(),self.db,self.topWindow,self.new_after_edit)
|
||||
|
||||
def on_delete_clicked(self,obj):
|
||||
|
||||
@ -141,7 +142,7 @@ class SourceView:
|
||||
'will remove it from the database and from all '
|
||||
'records that reference it.'),
|
||||
_('_Delete Source'),
|
||||
ans.query_response)
|
||||
ans.query_response,self.topWindow)
|
||||
else:
|
||||
self.db.removeSource(source.getId())
|
||||
Utils.modified()
|
||||
@ -191,7 +192,7 @@ class SourceView:
|
||||
if iter:
|
||||
id = list_store.get_value(iter,1)
|
||||
source = self.db.getSource(id)
|
||||
EditSource.EditSource(source, self.db, self.update_display)
|
||||
EditSource.EditSource(source, self.db, self.topWindow, self.update_display)
|
||||
|
||||
def new_after_edit(self,source):
|
||||
self.db.addSource(source)
|
||||
|
Reference in New Issue
Block a user