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.on_tag_task_dnd) # Updating the unactive color (same for everyone) color = treeview.get_style_context().get_color(Gtk.StateFlags.INSENSITIVE) # Convert color into #RRRGGGBBB self.unactive_color = color.to_color().to_string() treeview.set_sort_column('tag_id') self.tags_view = treeview return treeview
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.get_task_bg_color, 'bg_color') # 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) color = treeview.get_style_context().get_color(Gtk.StateFlags.INSENSITIVE) # Convert color into #RRRGGGBBB self.unactive_color = color.to_color().to_string() return treeview
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) color = treeview.get_style_context().get_color( Gtk.StateFlags.INSENSITIVE) # Convert color into #RRRGGGBBB self.unactive_color = color.to_color().to_string() treeview.set_sort_column('tag_id') self.tags_view = treeview return treeview
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, 'bg_color') # 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) color = treeview.get_style_context().get_color( Gtk.StateFlags.INSENSITIVE) # Convert color into #RRRGGGBBB self.unactive_color = color.to_color().to_string() return treeview