~vadi/gtg/gtg

« back to all changes in this revision

Viewing changes to GTG/core/datastore.py

  • Committer: Izidor Matušov
  • Date: 2012-03-22 13:50:35 UTC
  • mfrom: (1104.2.1 search-color)
  • Revision ID: izidor.matusov@gmail.com-20120322135035-syku33drt8x5w8nv
Saved searches could have assigned color

Show diffs side-by-side

added added

removed removed

Lines of Context:
217
217
            parent = t.getAttribute("parent")
218
218
 
219
219
            if parent == CoreConfig.SEARCH_TAG:
220
 
                self.new_search_tag(tagname, t.getAttribute("query"))
 
220
                tag = self.new_search_tag(tagname, t.getAttribute("query"))
221
221
            else:
222
222
                tag = self.new_tag(tagname)
223
 
                attr = t.attributes
224
 
                for i in range(attr.length):
225
 
                    at_name = attr.item(i).name
226
 
                    if at_name not in ["name", "parent"]:
227
 
                        at_val = t.getAttribute(at_name)
228
 
                        tag.set_attribute(at_name, at_val)
229
 
 
230
223
                if parent:
231
224
                    tag.set_parent(parent)
 
225
 
 
226
            attr = t.attributes
 
227
            for i in range(attr.length):
 
228
                at_name = attr.item(i).name
 
229
                if at_name not in ["name", "parent"]:
 
230
                    at_val = t.getAttribute(at_name)
 
231
                    tag.set_attribute(at_name, at_val)
 
232
 
232
233
        self.tagfile = tagfile
233
234
 
234
235
    def save_tagtree(self):