PyGObject: cell_data_func or own Renderer for date column?
- From: <c buhtz posteo jp>
- To: "gtk-app-devel-list gnome org " <gtk-app-devel-list gnome org>
- Subject: PyGObject: cell_data_func or own Renderer for date column?
- Date: Thu, 10 May 2018 00:06:03 +0200
I want to have a date column in a Gtk.ListView. The field in the model
is a real "datetime.date". Based on that the content of the column
could display this:
"2018-05-07"
"2 days ago"
"this week"
"7th May"
"7. Mai '18"
This is all based on the same "datetime.date" instance. The user decide
how to display. So I need maximum flexibility.
A cell_data_function is an option here to implement this. Is it a good
choice?
What is about deriving from Gtk.CellRendererText?
But I don't see how to do this. May I only overload the render()
function? But how can I read from datetime.date object and convert it
to a string?
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]