Fixed attribute XML
svn: r458
This commit is contained in:
parent
50e7c05fd1
commit
2bb2849b7f
@ -397,6 +397,7 @@ class Gallery(ImageSelect):
|
|||||||
else:
|
else:
|
||||||
pixmap.load_file(utils.find_icon(mtype))
|
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("gid").set_text(object.getId())
|
||||||
self.change_dialog.get_widget("description").set_text(object.getDescription())
|
self.change_dialog.get_widget("description").set_text(object.getDescription())
|
||||||
if object.getLocal():
|
if object.getLocal():
|
||||||
@ -421,10 +422,12 @@ class Gallery(ImageSelect):
|
|||||||
def new_desc_apply_clicked(self, obj):
|
def new_desc_apply_clicked(self, obj):
|
||||||
photo = obj.get_data("p")
|
photo = obj.get_data("p")
|
||||||
top = obj.get_data('t')
|
top = obj.get_data('t')
|
||||||
|
priv = top.get_widget("private").get_active()
|
||||||
text = top.get_widget("notes").get_chars(0,-1)
|
text = top.get_widget("notes").get_chars(0,-1)
|
||||||
note = photo.getNote()
|
note = photo.getNote()
|
||||||
if text != note:
|
if text != note or priv != photo.getPrivacy():
|
||||||
photo.setNote(text)
|
photo.setNote(text)
|
||||||
|
photo.setPrivacy(priv)
|
||||||
utils.modified()
|
utils.modified()
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
|
@ -271,13 +271,17 @@ def dump_location(g,loc):
|
|||||||
def write_attribute_list(g, list, indent=3):
|
def write_attribute_list(g, list, indent=3):
|
||||||
sp = ' ' * indent
|
sp = ' ' * indent
|
||||||
for attr in list:
|
for attr in list:
|
||||||
g.write('%s<attribute%s>\n' % (sp,conf_priv(attr)))
|
g.write('%s<attribute%s type="%s" value="%s"' % \
|
||||||
write_line(g,"attr_type",attr.getType(),4)
|
(sp,conf_priv(attr),attr.getType(),attr.getValue()))
|
||||||
write_line(g,"attr_value",attr.getValue(),4)
|
slist = attr.getSourceRefList()
|
||||||
for s in attr.getSourceRefList():
|
note = attr.getNote()
|
||||||
dump_source_ref(g,s,indent+1)
|
if note == "" and len(slist) == 0:
|
||||||
write_note(g,"note",attr.getNote(),4)
|
g.write('/>\n')
|
||||||
g.write('%s</attribute>\n' % sp)
|
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):
|
def write_photo_list(g,list,indent=3):
|
||||||
sp = ' '*indent
|
sp = ' '*indent
|
||||||
|
@ -496,7 +496,7 @@
|
|||||||
<widget>
|
<widget>
|
||||||
<class>GtkTable</class>
|
<class>GtkTable</class>
|
||||||
<name>table2</name>
|
<name>table2</name>
|
||||||
<rows>4</rows>
|
<rows>5</rows>
|
||||||
<columns>3</columns>
|
<columns>3</columns>
|
||||||
<homogeneous>False</homogeneous>
|
<homogeneous>False</homogeneous>
|
||||||
<row_spacing>0</row_spacing>
|
<row_spacing>0</row_spacing>
|
||||||
@ -813,6 +813,29 @@
|
|||||||
<yfill>False</yfill>
|
<yfill>False</yfill>
|
||||||
</child>
|
</child>
|
||||||
</widget>
|
</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>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user