Fixed attribute XML
svn: r458
This commit is contained in:
parent
fbc736faff
commit
89d456cff9
@ -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()
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
|
@ -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<attribute%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</attribute>\n' % sp)
|
||||
g.write('%s<attribute%s type="%s" value="%s"' % \
|
||||
(sp,conf_priv(attr),attr.getType(),attr.getValue()))
|
||||
slist = attr.getSourceRefList()
|
||||
note = attr.getNote()
|
||||
if note == "" and len(slist) == 0:
|
||||
g.write('/>\n')
|
||||
else:
|
||||
for s in attr.getSourceRefList():
|
||||
dump_source_ref(g,s,indent+1)
|
||||
write_note(g,"note",attr.getNote(),4)
|
||||
g.write('%s</attribute>\n' % sp)
|
||||
|
||||
def write_photo_list(g,list,indent=3):
|
||||
sp = ' '*indent
|
||||
|
@ -496,7 +496,7 @@
|
||||
<widget>
|
||||
<class>GtkTable</class>
|
||||
<name>table2</name>
|
||||
<rows>4</rows>
|
||||
<rows>5</rows>
|
||||
<columns>3</columns>
|
||||
<homogeneous>False</homogeneous>
|
||||
<row_spacing>0</row_spacing>
|
||||
@ -813,6 +813,29 @@
|
||||
<yfill>False</yfill>
|
||||
</child>
|
||||
</widget>
|
||||
|
||||
<widget>
|
||||
<class>GtkCheckButton</class>
|
||||
<name>private</name>
|
||||
<can_focus>True</can_focus>
|
||||
<label>Private</label>
|
||||
<active>False</active>
|
||||
<draw_indicator>True</draw_indicator>
|
||||
<child>
|
||||
<left_attach>2</left_attach>
|
||||
<right_attach>3</right_attach>
|
||||
<top_attach>4</top_attach>
|
||||
<bottom_attach>5</bottom_attach>
|
||||
<xpad>0</xpad>
|
||||
<ypad>0</ypad>
|
||||
<xexpand>False</xexpand>
|
||||
<yexpand>False</yexpand>
|
||||
<xshrink>False</xshrink>
|
||||
<yshrink>False</yshrink>
|
||||
<xfill>True</xfill>
|
||||
<yfill>False</yfill>
|
||||
</child>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
|
Loading…
Reference in New Issue
Block a user