2006-08-29 Alex Roitman <shura@gramps-project.org>

* src/glade/gramps.glade: Add privacy controls to all editors.
	* src/Editors/_EditSource.py: Add privacy control.
	* src/Editors/_EditSourceRef.py: Add privacy control.
	* src/Editors/_EditPlace.py: Add privacy control.
	* src/Editors/_EditMedia.py: Add privacy control.
	* src/Editors/_EditMediaRef.py: Add privacy control.
	* src/Editors/_EditRepository.py: Add privacy control.
	* src/Editors/_EditRepoRef.py: Add privacy control.



svn: r7290
This commit is contained in:
Alex Roitman 2006-08-29 23:45:07 +00:00
parent 4c7aebf934
commit 222bd78857
9 changed files with 413 additions and 128 deletions

View File

@ -1,3 +1,13 @@
2006-08-29 Alex Roitman <shura@gramps-project.org>
* src/glade/gramps.glade: Add privacy controls to all editors.
* src/Editors/_EditSource.py: Add privacy control.
* src/Editors/_EditSourceRef.py: Add privacy control.
* src/Editors/_EditPlace.py: Add privacy control.
* src/Editors/_EditMedia.py: Add privacy control.
* src/Editors/_EditMediaRef.py: Add privacy control.
* src/Editors/_EditRepository.py: Add privacy control.
* src/Editors/_EditRepoRef.py: Add privacy control.
2006-08-29 Alex Roitman <shura@phy.ucsf.edu>
* NEWS: Update.

View File

@ -98,6 +98,10 @@ class EditMedia(EditPrimary):
self.obj.get_gramps_id,
self.db.readonly)
self.privacy = PrivacyButton(
self.glade.get_widget("private"),
self.obj, self.db.readonly)
pixmap = self.glade.get_widget("pixmap")
mtype = self.obj.get_mime_type()

View File

@ -91,7 +91,7 @@ class EditMediaRef(EditReference):
self.source.get_description,
self.db.readonly)
self.privacy = PrivacyButton(
self.ref_privacy = PrivacyButton(
self.top.get_widget("private"),
self.source_ref,
self.db.readonly)
@ -102,6 +102,11 @@ class EditMediaRef(EditReference):
self.source.get_gramps_id,
self.db.readonly)
self.privacy = PrivacyButton(
self.top.get_widget("privacy"),
self.source,
self.db.readonly)
self.path_obj = MonitoredEntry(
self.top.get_widget("path"),
self.source.set_path,

View File

@ -92,6 +92,10 @@ class EditPlace(EditPrimary):
self.obj.set_gramps_id,
self.obj.get_gramps_id, self.db.readonly)
self.privacy = PrivacyButton(
self.top.get_widget("private"),
self.obj, self.db.readonly)
self.parish = MonitoredEntry(
self.top.get_widget("parish"),
mloc.set_parish, mloc.get_parish, self.db.readonly)

View File

@ -81,7 +81,12 @@ class EditRepoRef(EditReference):
self.source.set_gramps_id,
self.source.get_gramps_id,
False)
self.privacy = PrivacyButton(
self.top.get_widget("private"),
self.source,
self.db.readonly)
self.title = MonitoredEntry(
self.top.get_widget('repo_name'),
self.source.set_name,

View File

@ -84,6 +84,11 @@ class EditRepository(EditPrimary):
self.obj.get_gramps_id,
self.db.readonly)
self.privacy = PrivacyButton(
self.glade.get_widget("private"),
self.obj,
self.db.readonly)
def _create_tabbed_pages(self):
notebook = gtk.Notebook()

View File

@ -98,6 +98,10 @@ class EditSource(EditPrimary):
self.obj.get_gramps_id,
self.db.readonly)
self.priv = PrivacyButton(
self.glade.get_widget("private"),
self.obj, self.db.readonly)
self.abbrev = MonitoredEntry(
self.glade.get_widget("abbrev"),
self.obj.set_abbreviation,

View File

@ -74,7 +74,7 @@ class EditSourceRef(EditReference):
self.define_cancel_button(self.top.get_widget('cancel'))
def _setup_fields(self):
self.privacy = PrivacyButton(
self.ref_privacy = PrivacyButton(
self.top.get_widget('privacy'), self.source_ref)
self.volume = MonitoredEntry(
@ -85,6 +85,10 @@ class EditSourceRef(EditReference):
self.top.get_widget('gid'), self.source.set_gramps_id,
self.source.get_gramps_id,False)
self.source_privacy = PrivacyButton(
self.top.get_widget("private"),
self.source, self.db.readonly)
self.title = MonitoredEntry(
self.top.get_widget('title'), self.source.set_title,
self.source.get_title,False)

View File

@ -358,23 +358,66 @@
</child>
<child>
<widget class="GtkEntry" id="gid">
<widget class="GtkHBox" id="hbox134">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="editable">True</property>
<property name="visibility">True</property>
<property name="max_length">0</property>
<property name="text" translatable="yes"></property>
<property name="has_frame">True</property>
<property name="invisible_char">●</property>
<property name="activates_default">False</property>
<property name="homogeneous">False</property>
<property name="spacing">12</property>
<child>
<widget class="GtkEntry" id="gid">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="editable">True</property>
<property name="visibility">True</property>
<property name="max_length">0</property>
<property name="text" translatable="yes"></property>
<property name="has_frame">True</property>
<property name="invisible_char">●</property>
<property name="activates_default">False</property>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">True</property>
<property name="fill">True</property>
</packing>
</child>
<child>
<widget class="GtkToggleButton" id="private">
<property name="visible">True</property>
<property name="tooltip" translatable="yes">Indicates if the record is private</property>
<property name="can_focus">True</property>
<property name="relief">GTK_RELIEF_NONE</property>
<property name="focus_on_click">True</property>
<property name="active">False</property>
<property name="inconsistent">False</property>
<child>
<widget class="GtkImage" id="image2706">
<property name="visible">True</property>
<property name="icon_size">4</property>
<property name="icon_name">stock_lock-open</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
</widget>
</child>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
<property name="y_options"></property>
<property name="x_options">fill</property>
<property name="y_options">fill</property>
</packing>
</child>
</widget>
@ -1790,6 +1833,37 @@
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkToggleButton" id="private">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="relief">GTK_RELIEF_NONE</property>
<property name="focus_on_click">True</property>
<property name="active">False</property>
<property name="inconsistent">False</property>
<child>
<widget class="GtkImage" id="image2707">
<property name="visible">True</property>
<property name="icon_size">4</property>
<property name="icon_name">stock_lock-open</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
</widget>
</child>
</widget>
<packing>
<property name="left_attach">2</property>
<property name="right_attach">3</property>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
<property name="x_options"></property>
<property name="y_options"></property>
</packing>
</child>
</widget>
<packing>
<property name="padding">0</property>
@ -5021,27 +5095,6 @@
</packing>
</child>
<child>
<widget class="GtkEntry" id="gid">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="editable">True</property>
<property name="visibility">True</property>
<property name="max_length">0</property>
<property name="text" translatable="yes"></property>
<property name="has_frame">True</property>
<property name="invisible_char">*</property>
<property name="activates_default">False</property>
</widget>
<packing>
<property name="left_attach">2</property>
<property name="right_attach">3</property>
<property name="top_attach">0</property>
<property name="bottom_attach">1</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkEntry" id="description">
<property name="visible">True</property>
@ -5248,6 +5301,69 @@
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkHBox" id="hbox136">
<property name="visible">True</property>
<property name="homogeneous">False</property>
<property name="spacing">12</property>
<child>
<widget class="GtkEntry" id="gid">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="editable">True</property>
<property name="visibility">True</property>
<property name="max_length">0</property>
<property name="text" translatable="yes"></property>
<property name="has_frame">True</property>
<property name="invisible_char">*</property>
<property name="activates_default">False</property>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">True</property>
<property name="fill">True</property>
</packing>
</child>
<child>
<widget class="GtkToggleButton" id="privacy">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
<property name="active">False</property>
<property name="inconsistent">False</property>
<child>
<widget class="GtkImage" id="image2710">
<property name="visible">True</property>
<property name="icon_size">1</property>
<property name="icon_name">gtk-dialog-authentication</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
</widget>
</child>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
</widget>
<packing>
<property name="left_attach">2</property>
<property name="right_attach">3</property>
<property name="top_attach">0</property>
<property name="bottom_attach">1</property>
<property name="x_options">fill</property>
<property name="y_options">fill</property>
</packing>
</child>
</widget>
<packing>
<property name="tab_expand">False</property>
@ -5686,27 +5802,6 @@
</packing>
</child>
<child>
<widget class="GtkEntry" id="gid">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="editable">True</property>
<property name="visibility">True</property>
<property name="max_length">0</property>
<property name="text" translatable="yes"></property>
<property name="has_frame">True</property>
<property name="invisible_char">*</property>
<property name="activates_default">False</property>
</widget>
<packing>
<property name="left_attach">2</property>
<property name="right_attach">4</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkButton" id="date_edit">
<property name="visible">True</property>
@ -5784,6 +5879,59 @@
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkEntry" id="gid">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="editable">True</property>
<property name="visibility">True</property>
<property name="max_length">0</property>
<property name="text" translatable="yes"></property>
<property name="has_frame">True</property>
<property name="invisible_char">*</property>
<property name="activates_default">False</property>
</widget>
<packing>
<property name="left_attach">2</property>
<property name="right_attach">3</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkToggleButton" id="private">
<property name="visible">True</property>
<property name="tooltip" translatable="yes">Indicates if the record is private</property>
<property name="can_focus">True</property>
<property name="relief">GTK_RELIEF_NONE</property>
<property name="focus_on_click">True</property>
<property name="active">False</property>
<property name="inconsistent">False</property>
<child>
<widget class="GtkImage" id="image2708">
<property name="visible">True</property>
<property name="icon_size">4</property>
<property name="icon_name">stock_lock-open</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
</widget>
</child>
</widget>
<packing>
<property name="left_attach">3</property>
<property name="right_attach">4</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
</child>
</widget>
<packing>
<property name="padding">0</property>
@ -10198,7 +10346,7 @@
<widget class="GtkHBox" id="hbox108">
<property name="visible">True</property>
<property name="homogeneous">False</property>
<property name="spacing">0</property>
<property name="spacing">12</property>
<child>
<widget class="GtkComboBoxEntry" id="repository_type">
@ -10233,7 +10381,7 @@
<property name="angle">0</property>
</widget>
<packing>
<property name="padding">12</property>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
@ -10257,6 +10405,35 @@
<property name="fill">True</property>
</packing>
</child>
<child>
<widget class="GtkToggleButton" id="private">
<property name="visible">True</property>
<property name="tooltip" translatable="yes">Indicates if the record is private</property>
<property name="can_focus">True</property>
<property name="relief">GTK_RELIEF_NONE</property>
<property name="focus_on_click">True</property>
<property name="active">False</property>
<property name="inconsistent">False</property>
<child>
<widget class="GtkImage" id="image2711">
<property name="visible">True</property>
<property name="icon_size">4</property>
<property name="icon_name">stock_lock-open</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
</widget>
</child>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
</widget>
<packing>
<property name="left_attach">1</property>
@ -11846,23 +12023,65 @@ Very High</property>
</child>
<child>
<widget class="GtkEntry" id="gid">
<widget class="GtkHBox" id="hbox135">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="editable">True</property>
<property name="visibility">True</property>
<property name="max_length">0</property>
<property name="text" translatable="yes"></property>
<property name="has_frame">True</property>
<property name="invisible_char">*</property>
<property name="activates_default">False</property>
<property name="homogeneous">False</property>
<property name="spacing">12</property>
<child>
<widget class="GtkEntry" id="gid">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="editable">True</property>
<property name="visibility">True</property>
<property name="max_length">0</property>
<property name="text" translatable="yes"></property>
<property name="has_frame">True</property>
<property name="invisible_char">*</property>
<property name="activates_default">False</property>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">True</property>
<property name="fill">True</property>
</packing>
</child>
<child>
<widget class="GtkToggleButton" id="private">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="relief">GTK_RELIEF_NONE</property>
<property name="focus_on_click">True</property>
<property name="active">False</property>
<property name="inconsistent">False</property>
<child>
<widget class="GtkImage" id="image2709">
<property name="visible">True</property>
<property name="icon_size">4</property>
<property name="icon_name">stock_lock-open</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
</widget>
</child>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
<property name="y_options"></property>
<property name="x_options">fill</property>
<property name="y_options">fill</property>
</packing>
</child>
</widget>
@ -12177,6 +12396,23 @@ Very High</property>
</packing>
</child>
<child>
<widget class="GtkComboBoxEntry" id="media_type">
<property name="visible">True</property>
<property name="add_tearoffs">False</property>
<property name="has_frame">True</property>
<property name="focus_on_click">True</property>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">3</property>
<property name="top_attach">0</property>
<property name="bottom_attach">1</property>
<property name="x_options">fill</property>
<property name="y_options">fill</property>
</packing>
</child>
<child>
<widget class="GtkEntry" id="call_number">
<property name="visible">True</property>
@ -12194,23 +12430,6 @@ Very High</property>
<property name="right_attach">3</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkComboBoxEntry" id="media_type">
<property name="visible">True</property>
<property name="add_tearoffs">False</property>
<property name="has_frame">True</property>
<property name="focus_on_click">True</property>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">3</property>
<property name="top_attach">0</property>
<property name="bottom_attach">1</property>
<property name="x_options">fill</property>
<property name="y_options">fill</property>
</packing>
</child>
@ -12358,40 +12577,6 @@ Very High</property>
</packing>
</child>
<child>
<widget class="GtkHBox" id="hbox129">
<property name="visible">True</property>
<property name="homogeneous">False</property>
<property name="spacing">0</property>
<child>
<widget class="GtkComboBoxEntry" id="repo_type">
<property name="visible">True</property>
<property name="add_tearoffs">False</property>
<property name="has_frame">True</property>
<property name="focus_on_click">True</property>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">True</property>
</packing>
</child>
<child>
<placeholder/>
</child>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="x_options">fill</property>
<property name="y_options">fill</property>
</packing>
</child>
<child>
<widget class="GtkHBox" id="warn_box">
<property name="border_width">6</property>
@ -12478,16 +12663,58 @@ Very High</property>
</child>
<child>
<widget class="GtkEntry" id="gid">
<widget class="GtkHBox" id="hbox137">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="editable">True</property>
<property name="visibility">True</property>
<property name="max_length">0</property>
<property name="text" translatable="yes"></property>
<property name="has_frame">True</property>
<property name="invisible_char">*</property>
<property name="activates_default">False</property>
<property name="homogeneous">False</property>
<property name="spacing">12</property>
<child>
<widget class="GtkEntry" id="gid">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="editable">True</property>
<property name="visibility">True</property>
<property name="max_length">0</property>
<property name="text" translatable="yes"></property>
<property name="has_frame">True</property>
<property name="invisible_char">*</property>
<property name="activates_default">False</property>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">True</property>
<property name="fill">True</property>
</packing>
</child>
<child>
<widget class="GtkToggleButton" id="private">
<property name="visible">True</property>
<property name="tooltip" translatable="yes">Indicates if the record is private</property>
<property name="can_focus">True</property>
<property name="relief">GTK_RELIEF_NONE</property>
<property name="focus_on_click">True</property>
<property name="active">False</property>
<property name="inconsistent">False</property>
<child>
<widget class="GtkImage" id="image2712">
<property name="visible">True</property>
<property name="icon_size">4</property>
<property name="icon_name">stock_lock-open</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
</widget>
</child>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
</widget>
<packing>
<property name="left_attach">1</property>
@ -12495,7 +12722,24 @@ Very High</property>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
<property name="y_options">fill</property>
</packing>
</child>
<child>
<widget class="GtkComboBoxEntry" id="repo_type">
<property name="visible">True</property>
<property name="add_tearoffs">False</property>
<property name="has_frame">True</property>
<property name="focus_on_click">True</property>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="x_options">fill</property>
<property name="y_options">fill</property>
</packing>
</child>
</widget>