~gtg-user/gtg/gmail-like-ui

« back to all changes in this revision

Viewing changes to GTG/tools/clipboard.py

  • Committer: Lionel Dricot
  • Date: 2010-01-07 16:46:49 UTC
  • mfrom: (524.1.6 gtg.local)
  • Revision ID: ploum@ploum.net-20100107164649-c0ppt2c5k3pzou7e
tags name are now properly escaped, fix bug #497397

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
taskeditors, preserving subtasks
23
23
"""
24
24
class TaskClipboard():
25
 
    def __init__(self):
 
25
    def __init__(self,req):
26
26
        self.description = None
27
27
        self.content = []
 
28
        self.req = req
28
29
        
29
30
    """"take two gtk.TextIter as parameter and copy the
30
31
    """
51
52
            for ta in tags :
52
53
                if (ta.get_data('is_subtask')):
53
54
                    is_subtask = True
54
 
                    self.content.append(['subtask', ta.get_data('child')])
 
55
                    tid = ta.get_data('child')
 
56
                    tas = self.req.get_task(tid)
 
57
                    tas.set_to_keep()
 
58
                    tas.sync()
 
59
                    self.content.append(['subtask', tid])
55
60
            if not is_subtask:
56
61
                if end_line.get_line() < stop.get_line():
57
62
                    self.content.append(['text', "%s\n" %start.get_text(end_line)])