Commit Graph

59894 Commits

Author SHA1 Message Date
Matthias Clasen
f2a82e7d35 multifilter: Small documentation improvements 2019-12-24 15:36:07 -05:00
Matthias Clasen
9ff85899d0 builderlistitemfactory: Add an example to the docs 2019-12-24 15:36:07 -05:00
Matthias Clasen
602d141a7b maplistmodel: Add an example to the docs 2019-12-24 15:36:07 -05:00
Matthias Clasen
0bed5a8b9d stringfilter: Documnentation additions 2019-12-24 15:36:07 -05:00
Matthias Clasen
f2a50fa590 filter: Documentation fixes 2019-12-24 15:36:07 -05:00
Matthias Clasen
f833959acd filterlistmodel: Documentation fixes 2019-12-24 15:36:07 -05:00
Matthias Clasen
02168260e0 expression: Small documentation fixes 2019-12-24 15:36:07 -05:00
Matthias Clasen
68fbb59f82 docs: Add gtk_expression_watch_unwatch 2019-12-24 15:36:07 -05:00
Matthias Clasen
e7f3a4f61a expression: Correct an example in the docs 2019-12-24 15:36:07 -05:00
Matthias Clasen
e32ae895e3 Add some tests for new GtkBuilder syntax
Some valid and invalid examples for <closure>,
<lookup> and <constant>.
2019-12-24 15:36:07 -05:00
Matthias Clasen
44c5d47ed8 gtk-builder-tool: Minimally validate <binding>
Check that the toplevel property name is legit.
2019-12-24 15:36:07 -05:00
Matthias Clasen
a9f963b5d9 multifilter: Fix a few annotations 2019-12-24 15:36:07 -05:00
Matthias Clasen
0a711ec0b2 builderlistitemfactory: Fix a few annotations 2019-12-24 15:36:07 -05:00
Matthias Clasen
1630482d13 treelistrowsorter: Fix a doc typo 2019-12-24 15:36:07 -05:00
Matthias Clasen
bdaa41184f columnviewcolumn: Fix a type mismatch
The column-view property was declared with the wrong
type. This was causing criticals in the inspector.
2019-12-24 15:36:07 -05:00
Matthias Clasen
0a36ba0611 listitemwidget: Fix single-click-activate
This was broken by the renaming of ::contains-pointer-focus
to ::contains-pointer. Fix it up.
2019-12-24 15:36:07 -05:00
Matthias Clasen
cc39cc2e8d Fix gtk_column_view_create_cells
This code was assuming that the listitem widgets
are children of the column view, which they aren't.
2019-12-24 15:36:07 -05:00
Matthias Clasen
51e2a51dfd filterlistmodel: Remove pre-filter remnants
We are not using the filter func typdef anymore.
2019-12-24 15:36:07 -05:00
Matthias Clasen
90b32cac0b Add filter test to testsuite 2019-12-22 23:12:21 -05:00
Matthias Clasen
b56cfc5293 Add a test for multi filter unreffing
This tests the fix in the previous commit.
2019-12-22 23:12:21 -05:00
Matthias Clasen
7bb1f036d6 multifilter: Remove an extraneous unref
The sequence is using unref as free func,
no need to ido it ourselves.
2019-12-22 23:12:21 -05:00
Benjamin Otte
0cd203b07d testsuite: Add tests for GtkTreeListSorter 2019-12-18 05:48:03 +01:00
Matthias Clasen
86b29d4d7a Add GtkTreeListRowSorter
This is a special-purpose sorter that can
apply the sorting of another sorter to the
levels of a GtkTreeListModel.
2019-12-18 05:48:02 +01:00
Benjamin Otte
3ffb005135 testcolumnview: Add sorters 2019-12-18 05:48:02 +01:00
Matthias Clasen
a4b15d205e column view title: Show sort indicators 2019-12-18 05:48:02 +01:00
Matthias Clasen
0b4f75cf25 columnview: Add sorting
This is a somewhat large commit that:

- Adds GtkColumnViewSorter
This is a special-purpose, private sorter implementation which sorts
according to multiple sorters, allowing each individual sorter to be
inverted. This will be used with clickable column view headers.

- Adds a read-only GtkColumnView::sorter property
The GtkColumnView creates a GtkColumnViewSorter at startup that it uses
for this property.

- Adds a writable GtkColumnViewColumn::sorter property
This allows defining per-column sorters. Whenever an application sets a
sorter for a column, the header becomes clickable and whenever
a header is clicked, that column's sorter is prepended to the list of
sorters, unless it is already the first sorter, in which case we invert
its order. No column can be in the list more than once.
2019-12-18 05:48:02 +01:00
Matthias Clasen
163477acfb gtk-demo: Add a large grid demo
This is similar to the flowbox demo, but much bigger.
2019-12-18 05:45:39 +01:00
Matthias Clasen
f80335505e listview: Add single-click-activate
Add a single-click-activate property to GtkListView.
2019-12-18 05:45:39 +01:00
Matthias Clasen
ffdcde53f5 listitemwidget: Add single-click-activate
Add a mode to GtkListItemWidget that activates on
single click and selects on hover. Make
GtkListItemManager set this on its items
when its own 'property' of the same name is set.
2019-12-18 05:45:39 +01:00
Matthias Clasen
5d836b5e15 builder-tool: Pass through CDATA where it makes sense
This avoids a ton of escaping for
GtkBuilderListItemFactory::bytes.
2019-12-18 05:45:39 +01:00
Matthias Clasen
539213133f docs: Reorganize list widgets in their own chapter 2019-12-18 05:45:39 +01:00
Benjamin Otte
6977a03f65 fontchooserwidget: Port to listmodels
The port is kind of evil, in that it stores either a PangoFontFamily or a
PangoFontFace in the list, depending on if the fontchooser is configured
to select fonts or faces.
It also does not cache the font description anymore, so more calls to
pango_font_describe() may happen.

If both of these issues turn out problematic, the fontchooser would need
to resurrect GtkDelayedFontDescription again and put objects of that
type through the model.

These changes depend on Pango 1.46's introduction of listmodels and
various new getters, so the dependency has been upgraded.
2019-12-18 05:45:39 +01:00
Matthias Clasen
0875374b1d Add some tests for expression binding
In particular, test that expressios can deal with object == this.
2019-12-18 05:45:39 +01:00
Benjamin Otte
fe1ce2aaf8 expression: Allow passing a this object to bind()
This gives a bit more control over the arguments passed to expressions.
2019-12-18 05:45:39 +01:00
Benjamin Otte
a81429c10f widget: Do parent_class handling properly
The previous cosde did not actually query the parent class, it just did
a very complicated C cast.
2019-12-18 05:45:39 +01:00
Benjamin Otte
2f52d98ef4 gtk-demo: Add a Clocks demo
This demo is meant to showcase expressions.

It also needs the fixes in glib 2.64 to work properly.
2019-12-18 05:45:39 +01:00
Benjamin Otte
5a076b0c2f xxx: Add a hack to make paintables transform to/from objects
See also: https://gitlab.gnome.org/GNOME/glib/merge_requests/1251
2019-12-18 05:45:39 +01:00
Benjamin Otte
69f59109ee inspector: Remove private struct for prop editor 2019-12-18 05:45:39 +01:00
Benjamin Otte
6bf508ce73 inspector: Make Controller page a GtkWidget 2019-12-18 05:45:39 +01:00
Benjamin Otte
ae26ce017b inspector: Remove private struct from controllers 2019-12-18 05:45:39 +01:00
Benjamin Otte
0a126f65fb columnview: Add header
This uses a custom GtkColumnViewTitle widget. So far that widget is
pretty boring, but that will change once we added
resizing, reordering, dnd, sorting, hiding/showing of columns or
whatever UIs we want.
2019-12-18 05:45:39 +01:00
Benjamin Otte
6d0695260d tests: Add testcolumnview 2019-12-18 05:45:37 +01:00
Benjamin Otte
a43e0b1e62 columnview: Add a custom LayoutManager
The ColumnView now allocates column widths first and then the individual
rows use the new layout manager which looks at the column allocations to
allocate their children.
2019-12-15 23:33:04 +01:00
Benjamin Otte
01d4a28c9f constraint-editor: Don't poke around in widget internals 2019-12-15 23:33:04 +01:00
Benjamin Otte
052343ca7d columnview: Fix styling with Adwaita
- Use "treeview" as the node name
- Add .view style class
2019-12-15 23:33:04 +01:00
Benjamin Otte
7f4260f97e inspector: Port object tree to GtkColumnView 2019-12-15 23:33:04 +01:00
Benjamin Otte
2b42f0fcb3 columnview: Add GtkColumnViewCell
It's a GtkListItemWidget subclass that tracks the column it belongs to
and allows the column to track it.

We also use this subclass to implement sizing support so columns share
the same size and get resized in sync.
2019-12-15 23:33:04 +01:00
Benjamin Otte
f46c405351 widget: Add a hook for resizes
It's private, no APIs, we don't talk about it. But we will start using
it very soon, so we can do size request caching in columns and avoid
sizegroups...
2019-12-15 23:33:04 +01:00
Benjamin Otte
8f4a0391b3 columnview: Implement GtkScrollable
Just forward it to the listview for now.
2019-12-15 23:33:04 +01:00
Benjamin Otte
5b282411c4 columnview: Add listitems for the columns
They are not aligned in columns yet, but they do exist.
2019-12-15 23:33:04 +01:00