Sorry for the late answer. When I run your code, I encounter the following traceback:
<code>
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/liblarch/processqueue.py", line 43, in process_queue
func(*action[1:])
File "/usr/lib/python2.7/dist-packages/liblarch/tree.py", line 269, in _modify_node
self._callback('node-modified', node_id)
File "/usr/lib/python2.7/dist-packages/liblarch/tree.py", line 78, in _callback
func(node_id)
File "/usr/lib/python2.7/dist-packages/liblarch/viewcount.py", line 85, in __modify
displayed &= filt.is_displayed(nid)
File "/usr/lib/python2.7/dist-packages/liblarch/filters_bank.py", line 42, in is_displayed
value = self.func(task, parameters=self.dic)
File "/home/izidor/projects/gtg/trunk/GTG/core/treefactory.py", line 146, in tag_filter
return node.has_tags([tag])
File "/home/izidor/projects/gtg/trunk/GTG/core/task.py", line 767, in has_tags
toreturn = children_tag(tagname)
File "/home/izidor/projects/gtg/trunk/GTG/core/task.py", line 751, in children_tag
for tagc_name in tag.get_children():
AttributeError: 'NoneType' object has no attribute 'get_children'
</code>
At the moment, only one tag could be selected & removed. Please, change the text in the dialog to something like:
"Do you want to remove tag <b>[tag name]</b>?"
Make it different from the normal delete dialog.
Please, comment properly method
def ask_delete_tags(self, tags):
It took me quite a moment to understand how it work and why it works so. Please, use a loop instead of tags[0].
Sorry for the late answer. When I run your code, I encounter the following traceback:
<code> python2. 7/dist- packages/ liblarch/ processqueue. py", line 43, in process_queue *action[ 1:]) python2. 7/dist- packages/ liblarch/ tree.py" , line 269, in _modify_node _callback( 'node-modified' , node_id) python2. 7/dist- packages/ liblarch/ tree.py" , line 78, in _callback python2. 7/dist- packages/ liblarch/ viewcount. py", line 85, in __modify displayed( nid) python2. 7/dist- packages/ liblarch/ filters_ bank.py" , line 42, in is_displayed self.dic) izidor/ projects/ gtg/trunk/ GTG/core/ treefactory. py", line 146, in tag_filter tags([tag] ) izidor/ projects/ gtg/trunk/ GTG/core/ task.py" , line 767, in has_tags tag(tagname) izidor/ projects/ gtg/trunk/ GTG/core/ task.py" , line 751, in children_tag
Traceback (most recent call last):
File "/usr/lib/
func(
File "/usr/lib/
self.
File "/usr/lib/
func(node_id)
File "/usr/lib/
displayed &= filt.is_
File "/usr/lib/
value = self.func(task, parameters=
File "/home/
return node.has_
File "/home/
toreturn = children_
File "/home/
for tagc_name in tag.get_children():
AttributeError: 'NoneType' object has no attribute 'get_children'
</code>
At the moment, only one tag could be selected & removed. Please, change the text in the dialog to something like:
"Do you want to remove tag <b>[tag name]</b>?"
Make it different from the normal delete dialog.
Please, comment properly method
def ask_delete_ tags(self, tags):
It took me quite a moment to understand how it work and why it works so. Please, use a loop instead of tags[0].