* src/gramps_main.py: Disable "add bookmark" menu entry on readonly database and only enable it in person/family/pedigree view.

svn: r5001
This commit is contained in:
Martin Hawlisch 2005-08-02 14:37:10 +00:00
parent 10960055c5
commit a53db06f26
2 changed files with 9 additions and 0 deletions

View File

@ -1,6 +1,8 @@
2005-08-02 Martin Hawlisch <Martin.Hawlisch@gmx.de>
* src/Bookmarks.py (edit): Dont crash if bookmark list contains
nonexisting person.
* src/gramps_main.py: Disable "add bookmark" menu entry on readonly
database and only enable it in person/family/pedigree view.
2005-08-01 Don Allingham <don@gramps-project.org>
* src/NavWebPage.py: fix references to places

View File

@ -1337,6 +1337,7 @@ class Gramps(GrampsDBCallback.GrampsDBCallback):
self.gtop.get_widget('merge').set_sensitive(not self.db.readonly)
self.gtop.get_widget('fast_merge1').set_sensitive(not self.db.readonly)
self.gtop.get_widget('default_person1').set_sensitive(not self.db.readonly)
self.gtop.get_widget('add_bookmark').set_sensitive(not self.db.readonly)
self.gtop.get_widget('edit_bookmarks').set_sensitive(not self.db.readonly)
self.gtop.get_widget('tools_menu').set_sensitive(not self.db.readonly)
self.gtop.get_widget('tools').set_sensitive(not self.db.readonly)
@ -1693,23 +1694,29 @@ class Gramps(GrampsDBCallback.GrampsDBCallback):
self.enable_buttons(1)
self.people_view.goto_active_person()
self.merge_button.set_sensitive(1)
self.gtop.get_widget('add_bookmark').set_sensitive(not self.db.readonly)
elif page == FAMILY_VIEW1 or page == FAMILY_VIEW2:
self.enable_buttons(1)
self.merge_button.set_sensitive(0)
self.family_view.load_family()
self.gtop.get_widget('add_bookmark').set_sensitive(not self.db.readonly)
elif page == PEDIGREE_VIEW:
self.enable_buttons(0)
self.merge_button.set_sensitive(0)
self.pedigree_view.load_canvas(self.active_person)
self.gtop.get_widget('add_bookmark').set_sensitive(not self.db.readonly)
elif page == SOURCE_VIEW:
self.enable_buttons(1)
self.merge_button.set_sensitive(1)
self.gtop.get_widget('add_bookmark').set_sensitive(0)
elif page == PLACE_VIEW:
self.enable_buttons(1)
self.merge_button.set_sensitive(1)
self.gtop.get_widget('add_bookmark').set_sensitive(0)
elif page == MEDIA_VIEW:
self.enable_buttons(1)
self.merge_button.set_sensitive(0)
self.gtop.get_widget('add_bookmark').set_sensitive(0)
def on_apply_filter_clicked(self,obj):
self.people_view.apply_filter_clicked()