def _get_group_iter(self, model: Gtk.TreeStore, liter: Gtk.TreeIter, position: Gtk.TreeViewDropPosition) -> Optional[Gtk.TreeIter]: # If we drag before or after and not into, we work with the parent instead! if position == Gtk.TreeViewDropPosition.BEFORE or position == Gtk.TreeViewDropPosition.AFTER: liter = model.iter_parent(liter) if liter: if model[liter][0]: return liter else: parent = model.iter_parent(liter) if parent and model[parent][0]: return parent return None
def time_cell_data_func(self, tree_column, cell, tree_model: Gtk.TreeStore, iter, func_data): # we currently dont write a timestamp for the individual operations if tree_model.iter_parent(iter) is not None: cell.set_property('text', "") return epoch = tree_model.get_value(iter, func_data['column']) date_string = ctime(epoch) cell.set_property('text', date_string)