From 222bd7885738dd800d3fd4e36760d83dd0e9f791 Mon Sep 17 00:00:00 2001 From: Alex Roitman Date: Tue, 29 Aug 2006 23:45:07 +0000 Subject: [PATCH] 2006-08-29 Alex Roitman * 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 --- gramps2/ChangeLog | 10 + gramps2/src/Editors/_EditMedia.py | 4 + gramps2/src/Editors/_EditMediaRef.py | 7 +- gramps2/src/Editors/_EditPlace.py | 4 + gramps2/src/Editors/_EditRepoRef.py | 7 +- gramps2/src/Editors/_EditRepository.py | 5 + gramps2/src/Editors/_EditSource.py | 4 + gramps2/src/Editors/_EditSourceRef.py | 6 +- gramps2/src/glade/gramps.glade | 494 ++++++++++++++++++------- 9 files changed, 413 insertions(+), 128 deletions(-) diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index 2313ef291..ce0d77522 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -1,3 +1,13 @@ +2006-08-29 Alex Roitman + * 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 * NEWS: Update. diff --git a/gramps2/src/Editors/_EditMedia.py b/gramps2/src/Editors/_EditMedia.py index 3d20f36ac..e0965cbf9 100644 --- a/gramps2/src/Editors/_EditMedia.py +++ b/gramps2/src/Editors/_EditMedia.py @@ -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() diff --git a/gramps2/src/Editors/_EditMediaRef.py b/gramps2/src/Editors/_EditMediaRef.py index 6d70080b6..de962987a 100644 --- a/gramps2/src/Editors/_EditMediaRef.py +++ b/gramps2/src/Editors/_EditMediaRef.py @@ -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, diff --git a/gramps2/src/Editors/_EditPlace.py b/gramps2/src/Editors/_EditPlace.py index cf91b82ec..b16c22b53 100644 --- a/gramps2/src/Editors/_EditPlace.py +++ b/gramps2/src/Editors/_EditPlace.py @@ -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) diff --git a/gramps2/src/Editors/_EditRepoRef.py b/gramps2/src/Editors/_EditRepoRef.py index d56c86d0a..06e5676d1 100644 --- a/gramps2/src/Editors/_EditRepoRef.py +++ b/gramps2/src/Editors/_EditRepoRef.py @@ -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, diff --git a/gramps2/src/Editors/_EditRepository.py b/gramps2/src/Editors/_EditRepository.py index bfa4f63cc..6eb629517 100644 --- a/gramps2/src/Editors/_EditRepository.py +++ b/gramps2/src/Editors/_EditRepository.py @@ -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() diff --git a/gramps2/src/Editors/_EditSource.py b/gramps2/src/Editors/_EditSource.py index f2a2f59fd..e5b6bf849 100644 --- a/gramps2/src/Editors/_EditSource.py +++ b/gramps2/src/Editors/_EditSource.py @@ -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, diff --git a/gramps2/src/Editors/_EditSourceRef.py b/gramps2/src/Editors/_EditSourceRef.py index b4c641fc3..69bead2f7 100644 --- a/gramps2/src/Editors/_EditSourceRef.py +++ b/gramps2/src/Editors/_EditSourceRef.py @@ -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) diff --git a/gramps2/src/glade/gramps.glade b/gramps2/src/glade/gramps.glade index da4c0935c..875c36ef7 100644 --- a/gramps2/src/glade/gramps.glade +++ b/gramps2/src/glade/gramps.glade @@ -358,23 +358,66 @@ - + True - True - True - True - 0 - - True - - False + False + 12 + + + + True + True + True + True + 0 + + True + + False + + + 0 + True + True + + + + + + True + Indicates if the record is private + True + GTK_RELIEF_NONE + True + False + False + + + + True + 4 + stock_lock-open + 0.5 + 0.5 + 0 + 0 + + + + + 0 + False + False + + 1 2 2 3 - + fill + fill @@ -1790,6 +1833,37 @@ + + + + True + True + GTK_RELIEF_NONE + True + False + False + + + + True + 4 + stock_lock-open + 0.5 + 0.5 + 0 + 0 + + + + + 2 + 3 + 2 + 3 + + + + 0 @@ -5021,27 +5095,6 @@ - - - True - True - True - True - 0 - - True - * - False - - - 2 - 3 - 0 - 1 - - - - True @@ -5248,6 +5301,69 @@ + + + + True + False + 12 + + + + True + True + True + True + 0 + + True + * + False + + + 0 + True + True + + + + + + True + True + GTK_RELIEF_NORMAL + True + False + False + + + + True + 1 + gtk-dialog-authentication + 0.5 + 0.5 + 0 + 0 + + + + + 0 + False + False + + + + + 2 + 3 + 0 + 1 + fill + fill + + False @@ -5686,27 +5802,6 @@ - - - True - True - True - True - 0 - - True - * - False - - - 2 - 4 - 1 - 2 - - - - True @@ -5784,6 +5879,59 @@ + + + + True + True + True + True + 0 + + True + * + False + + + 2 + 3 + 1 + 2 + + + + + + + True + Indicates if the record is private + True + GTK_RELIEF_NONE + True + False + False + + + + True + 4 + stock_lock-open + 0.5 + 0.5 + 0 + 0 + + + + + 3 + 4 + 1 + 2 + fill + + + 0 @@ -10198,7 +10346,7 @@ True False - 0 + 12 @@ -10233,7 +10381,7 @@ 0 - 12 + 0 False False @@ -10257,6 +10405,35 @@ True + + + + True + Indicates if the record is private + True + GTK_RELIEF_NONE + True + False + False + + + + True + 4 + stock_lock-open + 0.5 + 0.5 + 0 + 0 + + + + + 0 + False + False + + 1 @@ -11846,23 +12023,65 @@ Very High - + True - True - True - True - 0 - - True - * - False + False + 12 + + + + True + True + True + True + 0 + + True + * + False + + + 0 + True + True + + + + + + True + True + GTK_RELIEF_NONE + True + False + False + + + + True + 4 + stock_lock-open + 0.5 + 0.5 + 0 + 0 + + + + + 0 + False + False + + 1 2 2 3 - + fill + fill @@ -12177,6 +12396,23 @@ Very High + + + True + False + True + True + + + 1 + 3 + 0 + 1 + fill + fill + + + True @@ -12194,23 +12430,6 @@ Very High 3 1 2 - - - - - - - True - False - True - True - - - 1 - 3 - 0 - 1 - fill fill @@ -12358,40 +12577,6 @@ Very High - - - True - False - 0 - - - - True - False - True - True - - - 0 - False - True - - - - - - - - - 1 - 2 - 1 - 2 - fill - fill - - - 6 @@ -12478,16 +12663,58 @@ Very High - + True - True - True - True - 0 - - True - * - False + False + 12 + + + + True + True + True + True + 0 + + True + * + False + + + 0 + True + True + + + + + + True + Indicates if the record is private + True + GTK_RELIEF_NONE + True + False + False + + + + True + 4 + stock_lock-open + 0.5 + 0.5 + 0 + 0 + + + + + 0 + False + False + + 1 @@ -12495,7 +12722,24 @@ Very High 2 3 fill - + fill + + + + + + True + False + True + True + + + 1 + 2 + 1 + 2 + fill + fill