=== modified file 'GTG/taskeditor/taskview.py' --- GTG/taskeditor/taskview.py 2010-02-14 03:33:58 +0000 +++ GTG/taskeditor/taskview.py 2010-02-14 22:15:48 +0000 @@ -123,6 +123,7 @@ self.connect('copy-clipboard', self.copy_clipboard,"copy") self.connect('cut-clipboard', self.copy_clipboard,"cut") self.connect('paste-clipboard', self.paste_clipboard) + self.connect('expose-event', self.expose_event) #All the typical properties of our textview self.set_wrap_mode(gtk.WRAP_WORD) @@ -162,6 +163,20 @@ self.bullet1 = bullet1_ltr self.editable = False + #this is used to draw a neat little box around tags + def expose_event(self, window, event): + for t in self.get_tagslist(): + start_mark = self.buff.get_mark(t) + end_mark = self.buff.get_mark("/%s"%t) + start_iter = self.buff.get_iter_at_mark(start_mark) + end_iter = self.buff.get_iter_at_mark(end_mark) + start_rect = self.get_iter_location(start_iter) + end_rect = self.get_iter_location(end_iter) +# print start_rect, end_rect + event.window.draw_rectangle(event.window.new_gc(), False, + start_rect.x - 1, start_rect.y - 1, end_rect.x - start_rect.x + 1, start_rect.height + 1) + + #editable means that the user can edit the taskview #this is initially set at False and then to True once the editor window #is displayed.