コード例 #1
0
 def build_tag_treeview(self,tree,desc):
     treeview = TreeView(tree,desc)
     # Global treeview properties
     treeview.set_property("enable-tree-lines", False)
     treeview.set_rules_hint(False)
     treeview.set_row_separator_func(self.is_tag_separator_filter)
     treeview.set_headers_visible(False)
     treeview.set_dnd_name('gtg/tag-iter-str')
     treeview.set_dnd_external('gtg/task-iter-str',self.ontag_task_dnd)
     #Updating the unactive color (same for everyone)
     self.unactive_color = \
                     treeview.style.text[gtk.STATE_INSENSITIVE].to_string()
     treeview.set_sort_column('tagname')
     return treeview
コード例 #2
0
 def build_task_treeview(self,tree,desc):
     treeview = TreeView(tree,desc)
     #Now that the treeview is done, we can polish
     treeview.set_main_search_column('label')
     treeview.set_expander_column('label')
     treeview.set_dnd_name('gtg/task-iter-str')
     #Background colors
     treeview.set_bg_color(self.task_bg_color,'tags')
      # Global treeview properties
     treeview.set_property("enable-tree-lines", False)
     treeview.set_rules_hint(False)
     treeview.set_multiple_selection(True)
     #Updating the unactive color (same for everyone)
     self.unactive_color = \
                     treeview.style.text[gtk.STATE_INSENSITIVE].to_string()
     return treeview