* src/DataViews/_PedigreeView.py,

* src/DataViews/_RelationView.py,
* src/Editors/_EditLdsOrd.py,
* src/Editors/_EditSourceRef.py,
* src/Editors/_EditAttribute.py,
* src/Editors/_EditPerson.py,
* src/Editors/_EditEventRef.py,
* src/Editors/_EditName.py,
* src/DisplayTabs/_ButtonTab.py: Hide some more controls when readonly



svn: r7801
This commit is contained in:
Martin Hawlisch 2006-12-14 15:32:33 +00:00
parent 488f618a04
commit 8059e67938
10 changed files with 38 additions and 18 deletions

View File

@ -2,6 +2,16 @@
* src/Selectors/_SelectPerson.py: Enable markup for bith date column
to enable birth fallback in italics (closes #763)
* src/DataViews/_PedigreeView.py,
* src/DataViews/_RelationView.py,
* src/Editors/_EditLdsOrd.py,
* src/Editors/_EditSourceRef.py,
* src/Editors/_EditAttribute.py,
* src/Editors/_EditPerson.py,
* src/Editors/_EditEventRef.py,
* src/Editors/_EditName.py,
* src/DisplayTabs/_ButtonTab.py: Hide some more controls when readonly
2006-12-13 Alex Roitman <shura@gramps-project.org>
* src/Filters/Rules/Family/_RegExpFatherName.py: Add new module.
* src/Filters/Rules/Family/_RegExpMotherName.py: Add new module.

View File

@ -797,8 +797,9 @@ class PedigreeView(PageView.PersonNavView):
fam = lst[((i+1)/2)-1][2]
if fam:
fam_h = fam.get_handle()
pw.connect("button-press-event", self.missing_parent_button_press_cb,lst[((i+1)/2)-1][0].get_handle(),fam_h)
pw.force_mouse_over = True
if not self.dbstate.db.readonly:
pw.connect("button-press-event", self.missing_parent_button_press_cb,lst[((i+1)/2)-1][0].get_handle(),fam_h)
pw.force_mouse_over = True
if positions[i][0][2] > 1:
table_widget.attach(pw,x,x+w,y,y+h,gtk.FILL,gtk.FILL,0,0)
else:

View File

@ -646,7 +646,7 @@ class RelationshipView(PageView.PersonNavView):
call_fcn = self.add_family
del_fcn = self.delete_family
if not self.toolbar_visible:
if not self.toolbar_visible and not self.dbstate.db.readonly:
# Show edit-Buttons if toolbar is not visible
if self.reorder_sensitive:
add = GrampsWidgets.IconButton(self.reorder, None,
@ -668,10 +668,11 @@ class RelationshipView(PageView.PersonNavView):
gtk.STOCK_EDIT)
self.tooltips.set_tip(edit, edit_msg)
hbox.pack_start(edit, False)
delete = GrampsWidgets.IconButton(del_fcn, family.handle,
gtk.STOCK_REMOVE)
self.tooltips.set_tip(delete, del_msg)
hbox.pack_start(delete, False)
if not self.dbstate.db.readonly:
delete = GrampsWidgets.IconButton(del_fcn, family.handle,
gtk.STOCK_REMOVE)
self.tooltips.set_tip(delete, del_msg)
hbox.pack_start(delete, False)
self.attach.attach(hbox, _BTN_START, _BTN_STOP, self.row, self.row+1)
self.row += 1

View File

@ -102,6 +102,12 @@ class ButtonTab(GrampsTab):
else:
self.share_btn = None
if self.dbstate.db.readonly:
self.add_btn.set_sensitive(False)
self.del_btn.set_sensitive(False)
if share_button:
self.share_btn.set_sensitive(False)
vbox = gtk.VBox()
vbox.set_spacing(6)
vbox.pack_start(self.add_btn, False)
@ -159,7 +165,9 @@ class ButtonTab(GrampsTab):
# and 0 can be returned
if self.get_selected() != None:
self.edit_btn.set_sensitive(True)
self.del_btn.set_sensitive(True)
if not self.dbstate.db.readonly:
self.del_btn.set_sensitive(True)
else:
self.edit_btn.set_sensitive(False)
self.del_btn.set_sensitive(False)
if not self.dbstate.db.readonly:
self.del_btn.set_sensitive(False)

View File

@ -98,7 +98,7 @@ class EditAttribute(EditSecondary):
self.priv = PrivacyButton(
self.top.get_widget("private"),
self.obj)
self.obj, self.db.readonly)
self.type_selector = MonitoredDataType(
self.top.get_widget("attr_menu"),

View File

@ -94,7 +94,7 @@ class EditEventRef(EditReference):
self.ref_privacy = PrivacyButton(
self.top.get_widget('eer_ref_priv'),
self.source_ref)
self.source_ref, self.db.readonly)
self.descr_field = MonitoredEntry(
self.top.get_widget("eer_description"),
@ -120,7 +120,7 @@ class EditEventRef(EditReference):
self.ev_privacy = PrivacyButton(
self.top.get_widget("eer_ev_priv"),
self.source)
self.source, self.db.readonly)
self.role_selector = MonitoredDataType(
self.top.get_widget('eer_role_combo'),

View File

@ -173,7 +173,7 @@ class EditLdsOrd(EditSecondary):
self.priv = PrivacyButton(
self.top.get_widget("private"),
self.obj)
self.obj, self.db.readonly)
self.date_field = MonitoredDate(
self.top.get_widget("date"),

View File

@ -177,7 +177,8 @@ class EditName(EditSecondary):
)
self.privacy = PrivacyButton(
self.top.get_widget("priv"), self.obj)
self.top.get_widget("priv"), self.obj,
self.db.readonly)
def _create_tabbed_pages(self):
@ -247,5 +248,3 @@ class EditName(EditSecondary):
if self.callback:
self.callback(self.obj)
self.close()

View File

@ -173,7 +173,8 @@ class EditPerson(EditPrimary):
self.private = GrampsWidgets.PrivacyButton(
self.top.get_widget('private'),
self.obj)
self.obj,
self.db.readonly)
self.gender = GrampsWidgets.MonitoredMenu(
self.top.get_widget('gender'),

View File

@ -85,7 +85,7 @@ class EditSourceRef(EditReference):
def _setup_fields(self):
self.ref_privacy = PrivacyButton(
self.top.get_widget('privacy'), self.source_ref)
self.top.get_widget('privacy'), self.source_ref, self.db.readonly)
self.volume = MonitoredEntry(
self.top.get_widget("volume"), self.source_ref.set_page,