Additionally flatpak_table_printer_set_columns now takes a boolean
to say whether the arguments in use are the default.
Closes: #2850
Approved by: matthiasclasen
If a column is marked skip_unique it will be entierly skipped
if all the rows have the same unique value for it. This is
useful for example to skip the arch column if all arches are
the same.
Closes: #2850
Approved by: matthiasclasen
Move expand and ellipsize to the Column struct,
and change flatpak_table_printer_set_column_titles
to flatpak_table_printer_set_columns that sets up
not just the title, but also expand and ellipsize.
Update all callers.
Closes: #2460
Approved by: alexlarsson
I think this makes a lot more sense than ellipsizing in the middle.
Most app ids start with a common prefix after all.
Closes: #2448
Approved by: alexlarsson
Optionally mark a column as ellipsizing.
Currently, this won't work correctly if more
than one column is ellipsizing.
Closes: #2409
Approved by: alexlarsson
When we are given a with that is larger than the content we have,
expand the space between columns, within reason. We only make the
table at most 1.5 times as wide as it would be unexpanded.
Add a new API for setting individual columns to expand (or not).
For an expanding column, we'll grow the space between it and its
preceding column. The expand flag of the first column is ignored.
By default, columns do not expand.
Make flatpak_table_printer_print_full return not just the table
height, but also the width.
Update all callers.
Closes: #2371
Approved by: alexlarsson
Add a way to change individual cells and a getter for the
current row. Also add a variation of the print() method that
returns the number of terminal rows that was generated
when formatting to given width, while skipping a number
of rows at the beginning. This method will be used in the
following commit to print a part of the table into a terminal
window of a given size.
Closes: #2371
Approved by: alexlarsson