2007-02-25 Don Allingham <don@gramps-project.org>

* src/DataViews/__init__.py: Add NoteView
	* src/DataViews/_NoteView.py: Added
	* src/Config/_GrampsConfigKeys.py: Added new keys to handle note dialog 
	width
	* src/Editors/__init__.py: Add _EditNote.py
	* src/Editors/_EditNote.py: Added
	* src/DisplayTabs/_NoteTab.py: Updated to the new list format
	* src/GrampsWidgets.py: Add checkbox support
	* src/glade/gramps.glade: Added edit_note
	* data/gramps.schemas.in: new keys



svn: r8240
This commit is contained in:
Don Allingham
2007-02-26 01:39:16 +00:00
parent 7ee2ff3f5c
commit 18984b840e
11 changed files with 485 additions and 15 deletions

View File

@@ -33,9 +33,12 @@ from gettext import gettext as _
#
#-------------------------------------------------------------------------
import Spell
import Errors
from DisplayTabs import log
from _NoteModel import NoteModel
from _EmbeddedList import EmbeddedList
from Editors import EditNote
#-------------------------------------------------------------------------
#
@@ -69,7 +72,11 @@ class NoteTab(EmbeddedList):
return ((1, 0), (1, 1))
def add_button_clicked(self, obj):
pass
note = RelLib.Note()
try:
EditNote(self.dbstate, self.uistate, [], note)
except Errors.WindowActiveError:
pass
def add_callback(self, name):
self.get_data().append(name)
@@ -77,9 +84,13 @@ class NoteTab(EmbeddedList):
self.rebuild()
def edit_button_clicked(self, obj):
note = self.get_selected()
if note:
print note
handle = self.get_selected()
if handle:
note = self.dbstate.db.get_note_from_handle(handle)
try:
EditNote(self.dbstate, self.uistate, [], note)
except Errors.WindowActiveError:
pass
def edit_callback(self, name):
self.changed = True