* src/Marriage.py: disable buttons in readonly mode

* src/EditPerson.py: disable buttons in readonly mode
* src/Sources.py: disable buttons in readonly mode
* src/gramps.glade: name buttons


svn: r4044
This commit is contained in:
Don Allingham 2005-02-17 04:46:13 +00:00
parent 9af5c6fbb4
commit 08eadb1d9a
5 changed files with 612 additions and 21 deletions

View File

@ -1,5 +1,9 @@
2005-02-16 Don Allingham <dallingham@users.sourceforge.net>
* src/EditSource.py: commit events after deleting sources
* src/Marriage.py: disable buttons in readonly mode
* src/EditPerson.py: disable buttons in readonly mode
* src/Sources.py: disable buttons in readonly mode
* src/gramps.glade: name buttons
2005-02-16 Eero Tamminen <eerot@sf>
* src/plugins/GraphViz.py: 'pagesv' value comes from 'vpages'

View File

@ -464,14 +464,18 @@ class EditPerson:
self.redraw_event_list()
self.redraw_attr_list()
self.redraw_addr_list()
self.redraw_addr_list()
self.redraw_name_list()
self.redraw_url_list()
self.get_widget("notebook").set_current_page(0)
self.given.grab_focus()
self.add_itself_to_winsmenu()
self.get_widget('ok').set_sensitive(not self.db.readonly)
for i in ["ok", "add_aka", "aka_delete", "event_del",
"event_add", "attr_add", "attr_del", "addr_add",
"addr_del", "media_add", "media_sel", "media_del",
"add_url", "delete_url", "add_src", "del_src" ]:
self.get_widget(i).set_sensitive(not self.db.readonly)
self.window.show()

View File

@ -278,11 +278,23 @@ class Marriage:
self.top,self.window,self.slist,
self.top.get_widget('add_src'),
self.top.get_widget('edit_src'),
self.top.get_widget('del_src'))
self.top.get_widget('del_src'),
self.db.readonly)
self.redraw_event_list()
self.redraw_attr_list()
self.add_itself_to_winsmenu()
self.top.get_widget('ok').set_sensitive(not self.db.readonly)
mode = not self.db.readonly
self.top.get_widget('marriage_del').set_sensitive(mode)
self.top.get_widget('marriage_add').set_sensitive(mode)
self.top.get_widget('attr_del').set_sensitive(mode)
self.top.get_widget('attr_add').set_sensitive(mode)
self.top.get_widget('media_del').set_sensitive(mode)
self.top.get_widget('media_add').set_sensitive(mode)
self.top.get_widget('media_sel').set_sensitive(mode)
self.window.show()
def close_child_windows(self):

View File

@ -215,7 +215,8 @@ class SourceSelector:
#
#-------------------------------------------------------------------------
class SourceTab:
def __init__(self,srclist,parent,top,window,clist,add_btn,edit_btn,del_btn):
def __init__(self,srclist,parent,top,window,clist,add_btn,
edit_btn,del_btn,readonly=False):
self.db = parent.db
self.parent = parent
self.list = srclist
@ -225,6 +226,9 @@ class SourceTab:
self.selection = clist.get_selection()
self.model = gtk.ListStore(gobject.TYPE_STRING, gobject.TYPE_STRING)
add_btn.set_sensitive(not readonly)
del_btn.set_sensitive(not readonly)
colno = 0
for title in [ (_('ID'),0,100), (_('Title'),1,150)]:
renderer = gtk.CellRendererText ()

File diff suppressed because it is too large Load Diff