From 2bb2849b7f83f87d294d7e48914342ea7d9568ca Mon Sep 17 00:00:00 2001 From: Don Allingham Date: Thu, 11 Oct 2001 23:07:50 +0000 Subject: [PATCH] Fixed attribute XML svn: r458 --- src/ImageSelect.py | 5 ++++- src/WriteXML.py | 18 +++++++++++------- src/imagesel.glade | 25 ++++++++++++++++++++++++- 3 files changed, 39 insertions(+), 9 deletions(-) diff --git a/src/ImageSelect.py b/src/ImageSelect.py index e7c90cf3d..9cf52d631 100644 --- a/src/ImageSelect.py +++ b/src/ImageSelect.py @@ -397,6 +397,7 @@ class Gallery(ImageSelect): else: pixmap.load_file(utils.find_icon(mtype)) + self.change_dialog.get_widget("private").set_active(photo.getPrivacy()) self.change_dialog.get_widget("gid").set_text(object.getId()) self.change_dialog.get_widget("description").set_text(object.getDescription()) if object.getLocal(): @@ -421,10 +422,12 @@ class Gallery(ImageSelect): def new_desc_apply_clicked(self, obj): photo = obj.get_data("p") top = obj.get_data('t') + priv = top.get_widget("private").get_active() text = top.get_widget("notes").get_chars(0,-1) note = photo.getNote() - if text != note: + if text != note or priv != photo.getPrivacy(): photo.setNote(text) + photo.setPrivacy(priv) utils.modified() #------------------------------------------------------------------------- diff --git a/src/WriteXML.py b/src/WriteXML.py index e2a710956..d99ed4f25 100644 --- a/src/WriteXML.py +++ b/src/WriteXML.py @@ -271,13 +271,17 @@ def dump_location(g,loc): def write_attribute_list(g, list, indent=3): sp = ' ' * indent for attr in list: - g.write('%s\n' % (sp,conf_priv(attr))) - write_line(g,"attr_type",attr.getType(),4) - write_line(g,"attr_value",attr.getValue(),4) - for s in attr.getSourceRefList(): - dump_source_ref(g,s,indent+1) - write_note(g,"note",attr.getNote(),4) - g.write('%s\n' % sp) + g.write('%s\n') + else: + for s in attr.getSourceRefList(): + dump_source_ref(g,s,indent+1) + write_note(g,"note",attr.getNote(),4) + g.write('%s\n' % sp) def write_photo_list(g,list,indent=3): sp = ' '*indent diff --git a/src/imagesel.glade b/src/imagesel.glade index c49b4f79f..64e6406db 100644 --- a/src/imagesel.glade +++ b/src/imagesel.glade @@ -496,7 +496,7 @@ GtkTable table2 - 4 + 5 3 False 0 @@ -813,6 +813,29 @@ False + + + GtkCheckButton + private + True + + False + True + + 2 + 3 + 4 + 5 + 0 + 0 + False + False + False + False + True + False + +