2007-04-17 Don Allingham <don@gramps-project.org>
* src/Editors/_EditRepository.py: fix double click save bug * src/Editors/_EditSource.py: fix double click save bug * src/Editors/_EditEvent.py: fix double click save bug * src/Editors/_EditPlace.py: fix double click save bug * src/Editors/_EditFamily.py (EditFamily.save): fix potential double click of Family Editor dialog svn: r8399
This commit is contained in:
parent
2d6e4daadb
commit
d9d1080283
@ -1,3 +1,11 @@
|
|||||||
|
2007-04-17 Don Allingham <don@gramps-project.org>
|
||||||
|
* src/Editors/_EditRepository.py: fix double click save bug
|
||||||
|
* src/Editors/_EditSource.py: fix double click save bug
|
||||||
|
* src/Editors/_EditEvent.py: fix double click save bug
|
||||||
|
* src/Editors/_EditPlace.py: fix double click save bug
|
||||||
|
* src/Editors/_EditFamily.py (EditFamily.save): fix potential double click of Family
|
||||||
|
Editor dialog
|
||||||
|
|
||||||
2007-04-16 Martin Hawlisch <Martin.Hawlisch@gmx.de>
|
2007-04-16 Martin Hawlisch <Martin.Hawlisch@gmx.de>
|
||||||
* src/ViewManager.py (create_pages): fix off-by-one error when
|
* src/ViewManager.py (create_pages): fix off-by-one error when
|
||||||
preselecting last view
|
preselecting last view
|
||||||
|
@ -103,12 +103,9 @@ class EditEvent(EditPrimary):
|
|||||||
self.window.resize(width, height)
|
self.window.resize(width, height)
|
||||||
|
|
||||||
def _connect_signals(self):
|
def _connect_signals(self):
|
||||||
self.top.get_widget('button111').connect('clicked',self.close)
|
self.define_cancel_button(self.top.get_widget('button111'))
|
||||||
self.top.get_widget('button126').connect('clicked',self.help_clicked)
|
self.define_help_button(self.top.get_widget('button126'), 'adv_ev')
|
||||||
|
self.define_ok_button(self.top.get_widget('ok'), self.save)
|
||||||
ok = self.top.get_widget('ok')
|
|
||||||
ok.set_sensitive(not self.db.readonly)
|
|
||||||
ok.connect('clicked',self.save)
|
|
||||||
|
|
||||||
def _setup_fields(self):
|
def _setup_fields(self):
|
||||||
|
|
||||||
@ -214,10 +211,12 @@ class EditEvent(EditPrimary):
|
|||||||
GrampsDisplay.help('adv-ev')
|
GrampsDisplay.help('adv-ev')
|
||||||
|
|
||||||
def save(self,*obj):
|
def save(self,*obj):
|
||||||
|
self.ok_button.set_sensitive(False)
|
||||||
if self.object_is_empty():
|
if self.object_is_empty():
|
||||||
ErrorDialog(_("Cannot save event"),
|
ErrorDialog(_("Cannot save event"),
|
||||||
_("No data exists for this event. Please "
|
_("No data exists for this event. Please "
|
||||||
"enter data or cancel the edit."))
|
"enter data or cancel the edit."))
|
||||||
|
self.ok_button.set_sensitive(True)
|
||||||
return
|
return
|
||||||
|
|
||||||
t = self.obj.get_type()
|
t = self.obj.get_type()
|
||||||
@ -225,6 +224,7 @@ class EditEvent(EditPrimary):
|
|||||||
ErrorDialog(
|
ErrorDialog(
|
||||||
_("Cannot save event"),
|
_("Cannot save event"),
|
||||||
_("The event type cannot be empty"))
|
_("The event type cannot be empty"))
|
||||||
|
self.ok_button.set_sensitive(True)
|
||||||
return
|
return
|
||||||
|
|
||||||
if self.obj.handle == None:
|
if self.obj.handle == None:
|
||||||
|
@ -774,6 +774,7 @@ class EditFamily(EditPrimary):
|
|||||||
|
|
||||||
def save(self,*obj):
|
def save(self,*obj):
|
||||||
|
|
||||||
|
self.ok_button.set_sensitive(False)
|
||||||
if not self.added:
|
if not self.added:
|
||||||
original = self.db.get_family_from_handle(self.obj.handle)
|
original = self.db.get_family_from_handle(self.obj.handle)
|
||||||
else:
|
else:
|
||||||
@ -791,6 +792,7 @@ class EditFamily(EditPrimary):
|
|||||||
QuestionDialog.ErrorDialog(_("A father cannot be his own child"),
|
QuestionDialog.ErrorDialog(_("A father cannot be his own child"),
|
||||||
_("%s is listed as both the father and child "
|
_("%s is listed as both the father and child "
|
||||||
"of the family.") % name)
|
"of the family.") % name)
|
||||||
|
self.ok_button.set_sensitive(True)
|
||||||
return
|
return
|
||||||
elif self.obj.get_mother_handle() in child_list:
|
elif self.obj.get_mother_handle() in child_list:
|
||||||
|
|
||||||
@ -800,6 +802,7 @@ class EditFamily(EditPrimary):
|
|||||||
QuestionDialog.ErrorDialog(_("A mother cannot be her own child"),
|
QuestionDialog.ErrorDialog(_("A mother cannot be her own child"),
|
||||||
_("%s is listed as both the mother and child "
|
_("%s is listed as both the mother and child "
|
||||||
"of the family.") % name)
|
"of the family.") % name)
|
||||||
|
self.ok_button.set_sensitive(True)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
|
@ -194,6 +194,7 @@ class EditPlace(EditPrimary):
|
|||||||
Config.sync()
|
Config.sync()
|
||||||
|
|
||||||
def save(self,*obj):
|
def save(self,*obj):
|
||||||
|
self.ok_button.set_sensitive(False)
|
||||||
title = self.obj.get_title()
|
title = self.obj.get_title()
|
||||||
|
|
||||||
trans = self.db.transaction_begin()
|
trans = self.db.transaction_begin()
|
||||||
|
@ -141,11 +141,13 @@ class EditRepository(EditPrimary):
|
|||||||
self.define_ok_button(self.glade.get_widget('ok'), self.save)
|
self.define_ok_button(self.glade.get_widget('ok'), self.save)
|
||||||
|
|
||||||
def save(self,*obj):
|
def save(self,*obj):
|
||||||
|
self.ok_button.set_sensitive(False)
|
||||||
if self.object_is_empty():
|
if self.object_is_empty():
|
||||||
from QuestionDialog import ErrorDialog
|
from QuestionDialog import ErrorDialog
|
||||||
ErrorDialog(_("Cannot save repository"),
|
ErrorDialog(_("Cannot save repository"),
|
||||||
_("No data exists for this repository. Please "
|
_("No data exists for this repository. Please "
|
||||||
"enter data or cancel the edit."))
|
"enter data or cancel the edit."))
|
||||||
|
self.ok_button.set_sensitive(True)
|
||||||
return
|
return
|
||||||
|
|
||||||
trans = self.db.transaction_begin()
|
trans = self.db.transaction_begin()
|
||||||
|
@ -160,12 +160,15 @@ class EditSource(EditPrimary):
|
|||||||
return (_('Edit Source'), self.get_menu_title())
|
return (_('Edit Source'), self.get_menu_title())
|
||||||
|
|
||||||
def save(self,*obj):
|
def save(self,*obj):
|
||||||
|
|
||||||
|
self.ok_button.set_sensitive(False)
|
||||||
if self.object_is_empty():
|
if self.object_is_empty():
|
||||||
from QuestionDialog import ErrorDialog
|
from QuestionDialog import ErrorDialog
|
||||||
|
|
||||||
ErrorDialog(_("Cannot save source"),
|
ErrorDialog(_("Cannot save source"),
|
||||||
_("No data exists for this source. Please "
|
_("No data exists for this source. Please "
|
||||||
"enter data or cancel the edit."))
|
"enter data or cancel the edit."))
|
||||||
|
self.ok_button.set_sensitive(True)
|
||||||
return
|
return
|
||||||
|
|
||||||
trans = self.db.transaction_begin()
|
trans = self.db.transaction_begin()
|
||||||
|
Loading…
Reference in New Issue
Block a user