Remove '@' from send to user category context menu

This commit is contained in:
Charles Haley 2011-02-24 14:42:40 +00:00
parent c2a1bd7a4c
commit 68a798eba1

View File

@ -313,14 +313,15 @@ class TagsView(QTreeView): # {{{
p = path[:] p = path[:]
for k in sorted(tree_dict.keys(), key=sort_key): for k in sorted(tree_dict.keys(), key=sort_key):
p.append(k) p.append(k)
m.addAction(self.user_category_icon, k, n = k[1:] if k.startswith('@') else k
m.addAction(self.user_category_icon, n,
partial(self.context_menu_handler, partial(self.context_menu_handler,
'add_to_category', 'add_to_category',
category='.'.join(p), category='.'.join(p),
index=tag)) index=tag))
if len(tree_dict[k]): if len(tree_dict[k]):
tm = m.addMenu(self.user_category_icon, tm = m.addMenu(self.user_category_icon,
_('Children of %s')%k) _('Children of %s')%n)
add_node_tree(tree_dict[k], tm, p) add_node_tree(tree_dict[k], tm, p)
p.pop() p.pop()
add_node_tree(nt, m, []) add_node_tree(nt, m, [])