* src/ChooseParents.py: readonly fixes

* src/EditPerson.py: readonly fixes
* src/EditPlace.py: readonly fixes
* src/EditSource.py: readonly fixes
* src/FamilyView.py: readonly fixes
* src/ImageSelect.py: readonly fixes
* src/Marriage.py: readonly fixes


svn: r4062
This commit is contained in:
Don Allingham 2005-02-20 01:02:15 +00:00
parent 1ea0356d99
commit 25c2598147
10 changed files with 2777 additions and 179 deletions

View File

@ -1,4 +1,13 @@
2005-02-19 Don Allingham <dallingham@users.sourceforge.net> 2005-02-19 Don Allingham <dallingham@users.sourceforge.net>
* src/ChooseParents.py: readonly fixes
* src/EditPerson.py: readonly fixes
* src/EditPlace.py: readonly fixes
* src/EditSource.py: readonly fixes
* src/FamilyView.py: readonly fixes
* src/ImageSelect.py: readonly fixes
* src/Marriage.py: readonly fixes
* src/EditPerson.py: add privacy marker * src/EditPerson.py: add privacy marker
* src/GrampBSDDB.py: record database version, handle person privacy flag * src/GrampBSDDB.py: record database version, handle person privacy flag
* src/RelLIb.py: Privacy flag for person (inherit from DataObj instead of SourceNote) * src/RelLIb.py: Privacy flag for person (inherit from DataObj instead of SourceNote)

View File

@ -635,9 +635,11 @@ class ModifyParents:
self.family = self.db.get_family_from_handle(family_handle) self.family = self.db.get_family_from_handle(family_handle)
self.family_update = family_update self.family_update = family_update
self.full_update = full_update self.full_update = full_update
self.father = self.db.get_person_from_handle(self.family.get_father_handle()) fid = self.family.get_father_handle()
self.mother = self.db.get_person_from_handle(self.family.get_mother_handle()) mid = self.family.get_mother_handle()
self.father = self.db.get_person_from_handle(fid)
self.mother = self.db.get_person_from_handle(mid)
self.glade = gtk.glade.XML(const.gladeFile,"modparents","gramps") self.glade = gtk.glade.XML(const.gladeFile,"modparents","gramps")
self.top = self.glade.get_widget("modparents") self.top = self.glade.get_widget("modparents")
@ -699,6 +701,11 @@ class ModifyParents:
if parent_window: if parent_window:
self.top.set_transient_for(parent_window) self.top.set_transient_for(parent_window)
self.glade.get_widget('fcombo').set_sensitive(False)
self.glade.get_widget('mcombo').set_sensitive(False)
self.glade.get_widget('ok').set_sensitive(False)
self.val = self.top.run() self.val = self.top.run()
if self.val == gtk.RESPONSE_OK: if self.val == gtk.RESPONSE_OK:
self.save_parents_clicked() self.save_parents_clicked()

View File

@ -1810,8 +1810,9 @@ class EditPerson:
item = gtk.TearoffMenuItem() item = gtk.TearoffMenuItem()
item.show() item.show()
menu.append(item) menu.append(item)
msg = _("Make the selected name the preferred name") if not self.db.readonly:
Utils.add_menuitem(menu,msg,None,self.change_name) msg = _("Make the selected name the preferred name")
Utils.add_menuitem(menu,msg,None,self.change_name)
menu.popup(None,None,None,event.button,event.time) menu.popup(None,None,None,event.button,event.time)
def on_aka_update_clicked(self,obj): def on_aka_update_clicked(self,obj):

View File

@ -96,17 +96,30 @@ class EditPlace:
self.glry = ImageSelect.Gallery(place, self.db.commit_place, self.path, self.glry = ImageSelect.Gallery(place, self.db.commit_place, self.path,
self.iconlist, self.db, self,self.top) self.iconlist, self.db, self,self.top)
mode = not self.parent.db.readonly
self.title = self.top_window.get_widget("place_title") self.title = self.top_window.get_widget("place_title")
self.title.set_editable(mode)
self.city = self.top_window.get_widget("city") self.city = self.top_window.get_widget("city")
self.city.set_editable(mode)
self.parish = self.top_window.get_widget("parish") self.parish = self.top_window.get_widget("parish")
self.parish.set_editable(mode)
self.county = self.top_window.get_widget("county") self.county = self.top_window.get_widget("county")
self.county.set_editable(mode)
self.state = self.top_window.get_widget("state") self.state = self.top_window.get_widget("state")
self.state.set_editable(mode)
self.phone = self.top_window.get_widget("phone") self.phone = self.top_window.get_widget("phone")
self.phone.set_editable(mode)
self.postal = self.top_window.get_widget("postal") self.postal = self.top_window.get_widget("postal")
self.postal.set_editable(mode)
self.country = self.top_window.get_widget("country") self.country = self.top_window.get_widget("country")
self.country.set_editable(mode)
self.longitude = self.top_window.get_widget("longitude") self.longitude = self.top_window.get_widget("longitude")
self.longitude.set_editable(mode)
self.latitude = self.top_window.get_widget("latitude") self.latitude = self.top_window.get_widget("latitude")
self.latitude.set_editable(mode)
self.note = self.top_window.get_widget("place_note") self.note = self.top_window.get_widget("place_note")
self.note.set_editable(mode)
self.web_list = self.top_window.get_widget("web_list") self.web_list = self.top_window.get_widget("web_list")
self.web_url = self.top_window.get_widget("web_url") self.web_url = self.top_window.get_widget("web_url")
@ -117,10 +130,12 @@ class EditPlace:
self.top_window.get_widget('changed').set_text(place.get_change_display()) self.top_window.get_widget('changed').set_text(place.get_change_display())
# event display # event display
self.web_model = gtk.ListStore(gobject.TYPE_STRING,gobject.TYPE_STRING) self.web_model = gtk.ListStore(str,str)
self.build_columns(self.web_list, [(_('Path'),150), (_('Description'),150)]) self.build_columns(self.web_list, [(_('Path'),150),
(_('Description'),150)])
self.web_list.set_model(self.web_model) self.web_list.set_model(self.web_model)
self.web_list.get_selection().connect('changed',self.on_web_list_select_row) self.web_list.get_selection().connect('changed',
self.on_web_list_select_row)
self.loc_edit = self.top_window.get_widget("loc_edit") self.loc_edit = self.top_window.get_widget("loc_edit")
self.loc_list = self.top_window.get_widget("loc_list") self.loc_list = self.top_window.get_widget("loc_list")
@ -135,8 +150,7 @@ class EditPlace:
self.ulist = place.get_url_list()[:] self.ulist = place.get_url_list()[:]
self.llist = place.get_alternate_locations()[:] self.llist = place.get_alternate_locations()[:]
self.loc_model = gtk.ListStore(gobject.TYPE_STRING,gobject.TYPE_STRING, self.loc_model = gtk.ListStore(str,str,str,str)
gobject.TYPE_STRING,gobject.TYPE_STRING)
self.build_columns(self.loc_list, [(_('City'),150), (_('County'),100), self.build_columns(self.loc_list, [(_('City'),150), (_('County'),100),
(_('State'),100), (_('Country'),50)]) (_('State'),100), (_('Country'),50)])
self.loc_list.set_model(self.loc_model) self.loc_list.set_model(self.loc_model)
@ -174,6 +188,9 @@ class EditPlace:
else: else:
self.flowed.set_active(1) self.flowed.set_active(1)
self.flowed.set_sensitive(mode)
self.preform.set_sensitive(mode)
if self.place.get_media_list(): if self.place.get_media_list():
Utils.bold_label(self.gallery_label) Utils.bold_label(self.gallery_label)
@ -197,13 +214,15 @@ class EditPlace:
"on_apply_clicked" : self.on_place_apply_clicked, "on_apply_clicked" : self.on_place_apply_clicked,
}) })
self.sourcetab = Sources.SourceTab(self.srcreflist,self, self.sourcetab = Sources.SourceTab(
self.top_window,self.top,self.slist, self.srcreflist,self,
self.top_window.get_widget('add_src'), self.top_window,self.top,self.slist,
self.top_window.get_widget('edit_src'), self.top_window.get_widget('add_src'),
self.top_window.get_widget('del_src')) self.top_window.get_widget('edit_src'),
self.top_window.get_widget('del_src'),
self.parent.db.readonly)
if self.place.get_handle() == None: if self.place.get_handle() == None or self.parent.db.readonly:
self.top_window.get_widget("add_photo").set_sensitive(0) self.top_window.get_widget("add_photo").set_sensitive(0)
self.top_window.get_widget("delete_photo").set_sensitive(0) self.top_window.get_widget("delete_photo").set_sensitive(0)
@ -216,6 +235,9 @@ class EditPlace:
self.web_list.connect('drag_data_received', self.web_list.connect('drag_data_received',
self.url_dest_drag_data_received) self.url_dest_drag_data_received)
for name in ['del_name','add_name','sel_photo','add_url','del_url']:
self.top_window.get_widget(name).set_sensitive(mode)
self.redraw_url_list() self.redraw_url_list()
self.redraw_location_list() self.redraw_location_list()
self.display_references() self.display_references()

View File

@ -55,7 +55,8 @@ import NameDisplay
class EditSource: class EditSource:
def __init__(self,source,db,parent,parent_window=None,func=None): def __init__(self,source,db,parent,parent_window=None,
func=None,readonly=False):
if source: if source:
self.source = source self.source = source
else: else:
@ -78,6 +79,7 @@ class EditSource:
self.ref_not_loaded = 1 self.ref_not_loaded = 1
self.lists_changed = 0 self.lists_changed = 0
self.gallery_ok = 0 self.gallery_ok = 0
mode = not self.db.readonly
self.top_window = gtk.glade.XML(const.gladeFile,"sourceEditor","gramps") self.top_window = gtk.glade.XML(const.gladeFile,"sourceEditor","gramps")
self.top = self.top_window.get_widget("sourceEditor") self.top = self.top_window.get_widget("sourceEditor")
@ -92,20 +94,33 @@ class EditSource:
self.pubinfo = self.top_window.get_widget("pubinfo") self.pubinfo = self.top_window.get_widget("pubinfo")
self.abbrev = self.top_window.get_widget("abbrev") self.abbrev = self.top_window.get_widget("abbrev")
self.note = self.top_window.get_widget("source_note") self.note = self.top_window.get_widget("source_note")
self.note.set_editable(mode)
self.notes_buffer = self.note.get_buffer() self.notes_buffer = self.note.get_buffer()
self.gallery_label = self.top_window.get_widget("gallerySourceEditor") self.gallery_label = self.top_window.get_widget("gallerySourceEditor")
self.refs_label = self.top_window.get_widget("refsSourceEditor") self.refs_label = self.top_window.get_widget("refsSourceEditor")
self.notes_label = self.top_window.get_widget("notesSourceEditor") self.notes_label = self.top_window.get_widget("notesSourceEditor")
self.flowed = self.top_window.get_widget("source_flowed") self.flowed = self.top_window.get_widget("source_flowed")
self.flowed.set_sensitive(mode)
self.preform = self.top_window.get_widget("source_preform") self.preform = self.top_window.get_widget("source_preform")
self.preform.set_sensitive(mode)
self.refinfo = self.top_window.get_widget("refinfo") self.refinfo = self.top_window.get_widget("refinfo")
self.title = self.top_window.get_widget("source_title") self.title = self.top_window.get_widget("source_title")
self.title.set_text(source.get_title()) self.title.set_text(source.get_title())
self.title.set_editable(mode)
self.author.set_text(source.get_author()) self.author.set_text(source.get_author())
self.author.set_editable(mode)
self.pubinfo.set_text(source.get_publication_info()) self.pubinfo.set_text(source.get_publication_info())
self.pubinfo.set_editable(mode)
self.abbrev.set_text(source.get_abbreviation()) self.abbrev.set_text(source.get_abbreviation())
self.abbrev.set_editable(mode)
self.top_window.get_widget('del_data').set_sensitive(mode)
self.top_window.get_widget('add_data').set_sensitive(mode)
self.top_window.get_widget('add_photo').set_sensitive(mode)
self.top_window.get_widget('sel_photo').set_sensitive(mode)
self.top_window.get_widget('delete_photo').set_sensitive(mode)
if source.get_note(): if source.get_note():
self.notes_buffer.set_text(source.get_note()) self.notes_buffer.set_text(source.get_note())
@ -133,9 +148,9 @@ class EditSource:
"on_add_data_clicked" : self.on_add_data_clicked, "on_add_data_clicked" : self.on_add_data_clicked,
}) })
if self.source.get_handle() == None: if self.source.get_handle() == None or self.db.readonly:
self.top_window.get_widget("edit_photo").set_sensitive(0) self.top_window.get_widget("edit_photo").set_sensitive(False)
self.top_window.get_widget("delete_photo").set_sensitive(0) self.top_window.get_widget("delete_photo").set_sensitive(False)
self.datalist = self.top_window.get_widget('datalist') self.datalist = self.top_window.get_widget('datalist')
colno = 0 colno = 0
@ -165,6 +180,8 @@ class EditSource:
if parent_window: if parent_window:
self.top.set_transient_for(parent_window) self.top.set_transient_for(parent_window)
self.top_window.get_widget('ok').set_sensitive(not self.db.readonly)
self.display_references() self.display_references()
if parent_window: if parent_window:
self.top.set_transient_for(parent_window) self.top.set_transient_for(parent_window)
@ -181,7 +198,6 @@ class EditSource:
focus_cell=None, focus_cell=None,
start_editing=True) start_editing=True)
self.top_window.get_widget('ok').set_sensitive(not self.db.readonly)
def on_delete_data_clicked(self,widget): def on_delete_data_clicked(self,widget):
(model,node) = self.data_sel.get_selected() (model,node) = self.data_sel.get_selected()

View File

@ -365,16 +365,18 @@ class FamilyView:
back_sensitivity = self.parent.hindex > 0 back_sensitivity = self.parent.hindex > 0
fwd_sensitivity = self.parent.hindex + 1 < len(self.parent.history) fwd_sensitivity = self.parent.hindex + 1 < len(self.parent.history)
entries = [ entries = [
(gtk.STOCK_GO_BACK,self.parent.back_clicked,back_sensitivity), (gtk.STOCK_GO_BACK,self.parent.back_clicked,back_sensitivity,False),
(gtk.STOCK_GO_FORWARD,self.parent.fwd_clicked,fwd_sensitivity), (gtk.STOCK_GO_FORWARD,self.parent.fwd_clicked,fwd_sensitivity,False),
#FIXME: revert to stock item when German gtk translation is fixed #FIXME: revert to stock item when German gtk translation is fixed
#(gtk.STOCK_HOME,self.parent.on_home_clicked,1), #(gtk.STOCK_HOME,self.parent.on_home_clicked,1),
(_("Home"),self.parent.on_home_clicked,1), (_("Home"),self.parent.on_home_clicked,1,False),
(_("Add Bookmark"),self.parent.on_add_bookmark_activate,1), (_("Add Bookmark"),self.parent.on_add_bookmark_activate,1,True),
] ]
menu = gtk.Menu() menu = gtk.Menu()
menu.set_title(_('People Menu')) menu.set_title(_('People Menu'))
for stock_id,callback,sensitivity in entries: for stock_id,callback,sensitivity,ro in entries:
if ro and self.parent.db.readonly:
continue
item = gtk.ImageMenuItem(stock_id) item = gtk.ImageMenuItem(stock_id)
#FIXME: remove when German gtk translation is fixed #FIXME: remove when German gtk translation is fixed
if stock_id == _("Home"): if stock_id == _("Home"):
@ -422,17 +424,19 @@ class FamilyView:
back_sensitivity = self.parent.hindex > 0 back_sensitivity = self.parent.hindex > 0
fwd_sensitivity = self.parent.hindex + 1 < len(self.parent.history) fwd_sensitivity = self.parent.hindex + 1 < len(self.parent.history)
entries = [ entries = [
(gtk.STOCK_GO_BACK,self.parent.back_clicked,back_sensitivity), (gtk.STOCK_GO_BACK,self.parent.back_clicked,back_sensitivity,False),
(gtk.STOCK_GO_FORWARD,self.parent.fwd_clicked,fwd_sensitivity), (gtk.STOCK_GO_FORWARD,self.parent.fwd_clicked,fwd_sensitivity,False),
#FIXME: revert to stock item when German gtk translation is fixed (gtk.STOCK_HOME,self.parent.on_home_clicked,1,False),
#(gtk.STOCK_HOME,self.parent.on_home_clicked,1), (None,None,0,True),
(_("Home"),self.parent.on_home_clicked,1), (_("Add parents"),self.add_parents_clicked,1,True),
(None,None,0),
(_("Add parents"),self.add_parents_clicked,1),
] ]
menu = gtk.Menu() menu = gtk.Menu()
menu.set_title(_('People Menu')) menu.set_title(_('People Menu'))
for stock_id,callback,sensitivity in entries:
for (stock_id,callback,sensitivity,ro) in entries:
if self.parent.db.readonly and ro:
continue
item = gtk.ImageMenuItem(stock_id) item = gtk.ImageMenuItem(stock_id)
#FIXME: remove when German gtk translation is fixed #FIXME: remove when German gtk translation is fixed
if stock_id == _("Home"): if stock_id == _("Home"):
@ -452,23 +456,18 @@ class FamilyView:
back_sensitivity = self.parent.hindex > 0 back_sensitivity = self.parent.hindex > 0
fwd_sensitivity = self.parent.hindex + 1 < len(self.parent.history) fwd_sensitivity = self.parent.hindex + 1 < len(self.parent.history)
entries = [ entries = [
(gtk.STOCK_GO_BACK,self.parent.back_clicked,back_sensitivity), (gtk.STOCK_GO_BACK,self.parent.back_clicked,back_sensitivity,False),
(gtk.STOCK_GO_FORWARD,self.parent.fwd_clicked,fwd_sensitivity), (gtk.STOCK_GO_FORWARD,self.parent.fwd_clicked,fwd_sensitivity,False),
#FIXME: revert to stock item when German gtk translation is fixed (gtk.STOCK_HOME,self.parent.on_home_clicked,1,False),
#(gtk.STOCK_HOME,self.parent.on_home_clicked,1), (None,None,0,True),
(_("Home"),self.parent.on_home_clicked,1), (_("Add parents"),self.add_sp_parents,1,True),
(None,None,0),
(_("Add parents"),self.add_sp_parents,1),
] ]
menu = gtk.Menu() menu = gtk.Menu()
menu.set_title(_('People Menu')) menu.set_title(_('People Menu'))
for stock_id,callback,sensitivity in entries: for stock_id,callback,sensitivity,ro in entries:
if ro and self.parent.db.readonly:
continue
item = gtk.ImageMenuItem(stock_id) item = gtk.ImageMenuItem(stock_id)
#FIXME: remove when German gtk translation is fixed
if stock_id == _("Home"):
im = gtk.image_new_from_stock(gtk.STOCK_HOME,gtk.ICON_SIZE_MENU)
im.show()
item.set_image(im)
if callback: if callback:
item.connect("activate",callback) item.connect("activate",callback)
item.set_sensitive(sensitivity) item.set_sensitive(sensitivity)
@ -527,8 +526,9 @@ class FamilyView:
(_("Edit the selected child"),self.edit_child_callback), (_("Edit the selected child"),self.edit_child_callback),
(_("Remove the selected child"),self.remove_child_clicked), (_("Remove the selected child"),self.remove_child_clicked),
] ]
for msg,callback in entries: if not self.parent.db.readonly:
Utils.add_menuitem(menu,msg,handle,callback) for msg,callback in entries:
Utils.add_menuitem(menu,msg,handle,callback)
menu.popup(None,None,None,event.button,event.time) menu.popup(None,None,None,event.button,event.time)
def edit_child_callback(self,obj): def edit_child_callback(self,obj):
@ -599,8 +599,9 @@ class FamilyView:
(_("Edit the selected spouse"), self.edit_spouse_callback), (_("Edit the selected spouse"), self.edit_spouse_callback),
(_("Set the selected spouse as the preferred spouse"), self.set_preferred_spouse), (_("Set the selected spouse as the preferred spouse"), self.set_preferred_spouse),
] ]
for msg,callback in entries: if not self.parent.db.readonly:
Utils.add_menuitem(menu,msg,None,callback) for msg,callback in entries:
Utils.add_menuitem(menu,msg,None,callback)
menu.popup(None,None,None,event.button,event.time) menu.popup(None,None,None,event.button,event.time)
def set_preferred_spouse(self,obj): def set_preferred_spouse(self,obj):
@ -1158,8 +1159,9 @@ class FamilyView:
(_("Add parents"), self.add_parents_clicked), (_("Add parents"), self.add_parents_clicked),
(_("Remove parents"),self.del_parents_clicked), (_("Remove parents"),self.del_parents_clicked),
] ]
for msg,callback in entries: if not self.parent.db.readonly:
Utils.add_menuitem(menu,msg,family,callback) for msg,callback in entries:
Utils.add_menuitem(menu,msg,family,callback)
menu.popup(None,None,None,event.button,event.time) menu.popup(None,None,None,event.button,event.time)
def build_sp_parents_menu(self,family,event): def build_sp_parents_menu(self,family,event):
@ -1196,8 +1198,9 @@ class FamilyView:
(_("Add parents"), self.add_sp_parents), (_("Add parents"), self.add_sp_parents),
(_("Remove parents"),self.del_sp_parents), (_("Remove parents"),self.del_sp_parents),
] ]
for msg,callback in entries: if not self.parent.db.readonly:
Utils.add_menuitem(menu,msg,family,callback) for msg,callback in entries:
Utils.add_menuitem(menu,msg,family,callback)
menu.popup(None,None,None,event.button,event.time) menu.popup(None,None,None,event.button,event.time)
def edit_ap_relationships(self,obj): def edit_ap_relationships(self,obj):

View File

@ -169,7 +169,7 @@ class GrampsBSDDB(GrampsDbBase):
self.undodb = db.DB() self.undodb = db.DB()
self.undodb.open(self.undolog, db.DB_RECNO, db.DB_CREATE) self.undodb.open(self.undolog, db.DB_RECNO, db.DB_CREATE)
if self.metadata.get('version') == None: if not self.readonly and self.metadata.get('version') == None:
self.metadata['version'] = _DBVERSION self.metadata['version'] = _DBVERSION
self.metadata = self.dbopen(name, "meta") self.metadata = self.dbopen(name, "meta")

View File

@ -895,13 +895,17 @@ class GlobalMediaProperties:
self.date_object = Date.Date() self.date_object = Date.Date()
self.path = self.db.get_save_path() self.path = self.db.get_save_path()
self.change_dialog = gtk.glade.XML(const.imageselFile,"change_global","gramps") self.change_dialog = gtk.glade.XML(const.imageselFile,
"change_global","gramps")
mode = not self.db.readonly
title = _('Media Properties Editor') title = _('Media Properties Editor')
self.window = self.change_dialog.get_widget('change_global') self.window = self.change_dialog.get_widget('change_global')
self.date_entry = self.change_dialog.get_widget('date') self.date_entry = self.change_dialog.get_widget('date')
self.date_entry.set_editable(mode)
self.pdmap = {} self.pdmap = {}
self.add_places = [] self.add_places = []
for key in self.db.get_place_handles(): for key in self.db.get_place_handles():
@ -909,6 +913,8 @@ class GlobalMediaProperties:
self.pdmap[p[0]] = key self.pdmap[p[0]] = key
self.place = self.change_dialog.get_widget('place') self.place = self.change_dialog.get_widget('place')
self.place.set_editable(mode)
self.place_list = self.pdmap.keys() self.place_list = self.pdmap.keys()
self.place_list.sort() self.place_list.sort()
build_dropdown(self.place,self.place_list) build_dropdown(self.place,self.place_list)
@ -925,11 +931,19 @@ class GlobalMediaProperties:
self.change_dialog.get_widget('title'),title) self.change_dialog.get_widget('title'),title)
self.descr_window = self.change_dialog.get_widget("description") self.descr_window = self.change_dialog.get_widget("description")
self.descr_window.set_editable(mode)
self.notes = self.change_dialog.get_widget("notes") self.notes = self.change_dialog.get_widget("notes")
self.date_check = DateEdit.DateEdit(self.date_object, self.notes.set_editable(mode)
self.date_entry,
self.change_dialog.get_widget("date_edit"), self.date_edit = self.change_dialog.get_widget("date_edit")
self.window) self.date_edit.set_sensitive(mode)
self.date_check = DateEdit.DateEdit(
self.date_object,
self.date_entry,
self.date_edit,
self.window)
self.pixmap = self.change_dialog.get_widget("pixmap") self.pixmap = self.change_dialog.get_widget("pixmap")
self.attr_type = self.change_dialog.get_widget("attr_type") self.attr_type = self.change_dialog.get_widget("attr_type")
@ -942,7 +956,9 @@ class GlobalMediaProperties:
self.notes_label = self.change_dialog.get_widget("notesGlobal") self.notes_label = self.change_dialog.get_widget("notesGlobal")
self.refs_label = self.change_dialog.get_widget("refsGlobal") self.refs_label = self.change_dialog.get_widget("refsGlobal")
self.flowed = self.change_dialog.get_widget("global_flowed") self.flowed = self.change_dialog.get_widget("global_flowed")
self.flowed.set_sensitive(mode)
self.preform = self.change_dialog.get_widget("global_preform") self.preform = self.change_dialog.get_widget("global_preform")
self.preform.set_sensitive(mode)
titles = [(_('Attribute'),0,150),(_('Value'),1,100)] titles = [(_('Attribute'),0,150),(_('Value'),1,100)]
@ -1002,6 +1018,10 @@ class GlobalMediaProperties:
"on_global_delete_event" : self.on_delete_event, "on_global_delete_event" : self.on_delete_event,
}) })
for name in ['gl_del_src','gl_add_src','add_attr','del_attr','ok']:
self.change_dialog.get_widget(name).set_sensitive(mode)
self.redraw_attr_list() self.redraw_attr_list()
self.display_refs() self.display_refs()
if parent_window: if parent_window:

View File

@ -380,7 +380,7 @@ class Marriage:
if lds_ord == None: if lds_ord == None:
lds_ord = RelLib.LdsOrd() lds_ord = RelLib.LdsOrd()
self.family.set_lds_sealing(lds_ord) self.family.set_lds_sealing(lds_ord)
NoteEdit.NoteEditor(lds_ord,self,self.window) NoteEdit.NoteEditor(lds_ord,self,self.window,readonly=self.db.readonly)
def on_up_clicked(self,obj): def on_up_clicked(self,obj):
model,node = self.etree.get_selected() model,node = self.etree.get_selected()

File diff suppressed because it is too large Load Diff