2008-02-27 Raphael Ackermann <raphael.ackermann@gmail.com>

* src/Editors/_EditNote.py: empty_object() add extratype to object
	0001476: Opening the new note dialog/editor and cancelling shouldn't ask 
	to save changes. there are no changes 

svn: r10133
This commit is contained in:
Raphael Ackermann 2008-02-28 00:29:51 +00:00
parent 1f63f72caa
commit 896ecd2949
2 changed files with 11 additions and 4 deletions

View File

@ -1,3 +1,8 @@
2008-02-27 Raphael Ackermann <raphael.ackermann@gmail.com>
* src/Editors/_EditNote.py: empty_object() add extratype to object
0001476: Opening the new note dialog/editor and cancelling shouldn't ask
to save changes. there are no changes
2008-02-27 Raphael Ackermann <raphael.ackermann@gmail.com> 2008-02-27 Raphael Ackermann <raphael.ackermann@gmail.com>
* src/DbManager.py: rename glade variable to glade_xml_file * src/DbManager.py: rename glade variable to glade_xml_file

View File

@ -53,7 +53,7 @@ from Editors._EditPrimary import EditPrimary
from DisplayTabs import GrampsTab, NoteBackRefList from DisplayTabs import GrampsTab, NoteBackRefList
from GrampsWidgets import (MonitoredDataType, MonitoredCheckbox, from GrampsWidgets import (MonitoredDataType, MonitoredCheckbox,
MonitoredEntry, PrivacyButton) MonitoredEntry, PrivacyButton)
from gen.lib import Note import gen.lib
from QuestionDialog import ErrorDialog from QuestionDialog import ErrorDialog
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
@ -147,9 +147,11 @@ class EditNote(EditPrimary):
"""Return an empty Note object for comparison for changes. """Return an empty Note object for comparison for changes.
It is used by the base class (EditPrimary). It is used by the base class (EditPrimary).
""" """
return Note() empty_note = gen.lib.Note();
if self.extratype:
empty_note.set_type(self.extratype[0])
return empty_note
def get_menu_title(self): def get_menu_title(self):
if self.obj.get_handle(): if self.obj.get_handle():
@ -203,7 +205,7 @@ class EditNote(EditPrimary):
self.build_interface() self.build_interface()
def _setup_fields(self): def _setup_fields(self):
"""Get control widgets and attached them to Note's attributes.""" """Get control widgets and attach them to Note's attributes."""
self.type_selector = MonitoredDataType( self.type_selector = MonitoredDataType(
self.top.get_widget('type'), self.top.get_widget('type'),
self.obj.set_type, self.obj.set_type,