2006-12-30 Don Allingham <don@gramps-project.org>

* src/DataViews/_RelationView.py:  Add edit button to view, shorten names of 
	buttons
	* src/GrampsDb/_GrampsGEDDB.py: properly handle bookmark list



svn: r7858
This commit is contained in:
Don Allingham 2006-12-30 17:49:08 +00:00
parent 5c41b7dba3
commit 7b9dec0fce
4 changed files with 23 additions and 30 deletions

View File

@ -1,3 +1,8 @@
2006-12-30 Don Allingham <don@gramps-project.org>
* src/DataViews/_RelationView.py: Add edit button to view, shorten names of
buttons
* src/GrampsDb/_GrampsGEDDB.py: properly handle bookmark list
2006-12-28 Don Allingham <don@gramps-project.org> 2006-12-28 Don Allingham <don@gramps-project.org>
* src/docgen/PdfDoc.py: convert image name to str from unicode * src/docgen/PdfDoc.py: convert image name to str from unicode
due to a ReportLab bug. due to a ReportLab bug.

View File

@ -83,22 +83,12 @@ program and source code freely.
3. Does it work with Windows (tm)? 3. Does it work with Windows (tm)?
No. GRAMPS uses the GTK and GNOME libraries. While the GTK libraries Yes, but it is not offically supported by the GRAMPS project.
have been ported to Windows, the GNOME libraries have not.
This, however, may change in the future.
4. Does it work with the Mac? 4. Does it work with the Mac?
The Fink project (http://fink.sf.net) has ported an old version of Several people have managed to get GRAMPS to work under OSX using the darwin ports.
GRAMPS (0.8.0) to OSX. The Mac OSX port is not directly supported by
the GRAMPS project, primarily because none of the GRAMPS developers
have access to Mac OSX.
The GNOME 2 version of GRAMPS (0.9.x) does not appear to have been
ported by the Fink project. Please contact the Fink project for more
information.
5. Does it work with KDE? 5. Does it work with KDE?
@ -108,12 +98,11 @@ Yes, as long as the required GNOME libraries are installed.
6. Do I really have to have GNOME installed? 6. Do I really have to have GNOME installed?
Yes, but you do not have to be running the GNOME desktop. Yes, but you do not have to be running the GNOME desktop.
n
7. What version of GNOME do I need? 7. What version of GNOME do I need?
The latest versions of gramps (0.9.0 and higher) require GNOME 2.0 or higher. The latest versions of gramps require GNOME 2.8 or higher.
Previous versions required GNOME 1.X.
8. Is GRAMPS compatible with other genealogical software (GenApps)? 8. Is GRAMPS compatible with other genealogical software (GenApps)?

View File

@ -255,6 +255,7 @@ class RelationshipView(PageView.PersonNavView):
</placeholder> </placeholder>
</menu> </menu>
<menu action="EditMenu"> <menu action="EditMenu">
<menuitem action="Edit"/>
<menuitem action="AddParents"/> <menuitem action="AddParents"/>
<menuitem action="AddSpouse"/> <menuitem action="AddSpouse"/>
<menuitem action="ShareFamily"/> <menuitem action="ShareFamily"/>
@ -279,6 +280,7 @@ class RelationshipView(PageView.PersonNavView):
<toolitem action="HomePerson"/> <toolitem action="HomePerson"/>
</placeholder> </placeholder>
<placeholder name="CommonEdit"> <placeholder name="CommonEdit">
<toolitem action="Edit"/>
<toolitem action="AddParents"/> <toolitem action="AddParents"/>
<toolitem action="ShareFamily"/> <toolitem action="ShareFamily"/>
<toolitem action="AddSpouse"/> <toolitem action="AddSpouse"/>
@ -304,11 +306,13 @@ class RelationshipView(PageView.PersonNavView):
self.family_action = gtk.ActionGroup(self.title + '/Family') self.family_action = gtk.ActionGroup(self.title + '/Family')
self.family_action.add_actions([ self.family_action.add_actions([
('AddSpouse', 'gramps-spouse', _('Add Spouse'), None , ('Edit', gtk.STOCK_EDIT, _('Edit'), None ,
_("Edits the active person"), self.edit_active),
('AddSpouse', 'gramps-spouse', _('Spouse'), None ,
_("Adds a new relationship"), self.add_spouse), _("Adds a new relationship"), self.add_spouse),
('AddParents', 'gramps-parents', _('Add Parents'), None , ('AddParents', 'gramps-parents', _('Add'), None ,
_("Adds a new set of parents"), self.add_parents), _("Adds a new set of parents"), self.add_parents),
('ShareFamily', 'gramps-sharefamily', _('Share Parents'), None , ('ShareFamily', 'gramps-sharefamily', _('Share'), None ,
_("Adds an existing set of parents"), self.select_parents), _("Adds an existing set of parents"), self.select_parents),
]) ])
@ -980,12 +984,7 @@ class RelationshipView(PageView.PersonNavView):
def edit_button_press(self, obj, event, handle): def edit_button_press(self, obj, event, handle):
if event.type == gtk.gdk.BUTTON_PRESS and event.button == 1: if event.type == gtk.gdk.BUTTON_PRESS and event.button == 1:
from Editors import EditPerson self.edit_person(obj, handle)
person = self.dbstate.db.get_person_from_handle(handle)
try:
EditPerson(self.dbstate, self.uistate, [], person)
except Errors.WindowActiveError:
pass
def edit_person(self, obj, handle): def edit_person(self, obj, handle):
from Editors import EditPerson from Editors import EditPerson
@ -1035,6 +1034,10 @@ class RelationshipView(PageView.PersonNavView):
except Errors.WindowActiveError: except Errors.WindowActiveError:
pass pass
def edit_active(self, obj):
phandle = self.dbstate.get_active_person().handle
self.edit_person(obj, phandle)
def select_family(self, obj, event, handle): def select_family(self, obj, event, handle):
if event.type == gtk.gdk.BUTTON_PRESS and event.button == 1: if event.type == gtk.gdk.BUTTON_PRESS and event.button == 1:
from Selectors import selector_factory from Selectors import selector_factory

View File

@ -51,18 +51,14 @@ class GrampsGEDDB(GrampsInMemDB):
GrampsInMemDB.load(self,name,callback,mode) GrampsInMemDB.load(self,name,callback,mode)
importData(self,name,callback,use_trans=False) importData(self,name,callback,use_trans=False)
self.bookmarks = self.metadata.get('bookmarks') self.bookmarks = GrampsDbBookmarks(self.metadata.get('bookmarks',[]))
if self.bookmarks == None:
self.bookmarks = []
self.db_is_open = True self.db_is_open = True
return 1 return 1
def load_from(self, other_database, filename, callback): def load_from(self, other_database, filename, callback):
db_copy(other_database,self,callback) db_copy(other_database,self,callback)
GrampsInMemDB.load(self,filename,callback) GrampsInMemDB.load(self,filename,callback)
self.bookmarks = self.metadata.get('bookmarks') self.bookmarks = GrampsDbBookmarks(self.metadata.get('bookmarks',[]))
if self.bookmarks == None:
self.bookmarks = []
self.db_is_open = True self.db_is_open = True
writer = GedcomWriter(self,self.get_default_person(), writer = GedcomWriter(self,self.get_default_person(),
callback=callback) callback=callback)