Commit Graph

18 Commits

Author SHA1 Message Date
Matthias Clasen
423b8209a1 gtk-demo: Use a native filechooser in the words demo 2020-12-03 22:31:05 -05:00
Benjamin Otte
eb9c204535 gtk: Remove GtkFileChooserButton
... as discussed in the meeting.
2020-12-03 02:02:27 +01:00
Matthias Clasen
d732c869c2 gtk-demo: Add keywords to demos
Add the names of the main widgets as keywords to
our demos, but also things like "game". This helps
finding relevant demos in our growing list. You
can now for example type "label", and find the
"error states" and "links" demos showing GtkLabel
features.
2020-09-13 15:00:14 -04:00
Matthias Clasen
dfabe74c59 Make filter constructors return exact types
Make functions like gtk_custom_filter_new() return
the actual type they construct.

Update all callers.
2020-09-05 21:43:42 -04:00
Matthias Clasen
b628338db3 list widgets: Simplify the constructors
Now that both arguments to the _new_with_factory() constructors
are nullable, there's no good reason to keep a separate _new()
around. Just make gtk_list_view_new() and gtk_grid_view_new()
take both a model and a factory.
2020-09-01 12:24:06 -04:00
Matthias Clasen
8d79a32c50 list widgets: Use selection models in the api
Change the apis in GtkListView, GtkColumnView and
GtkGridView to be explicitly about GtkSelectionModel,
to make it obvious that the widgets handle selection.

Update all users.
2020-08-31 17:15:05 -04:00
Benjamin Otte
8557aaf327 demo: fix memleak 2020-08-07 02:53:21 +02:00
Benjamin Otte
278fbcbbb4 demo: Don't crash when closing words demo
Make sure the stringlist we're loading into doesn't go away.

It'd be better to have a cancellable, but I'm lazy.
2020-08-07 02:52:22 +02:00
Matthias Clasen
43000abeff listview: Revise constructors
Make both gtk_list_view_new and gtk_list_view_new_with_factory
take a model as first argument, and make all arguments
allow-none and transfer full.

Update all callers.
2020-07-26 18:27:23 -04:00
Matthias Clasen
68d6671413 noselection: Make constructor transfer full
This is for consistency with other wrapping list constructors.
We want them all to be transfer full, allow-none.

Update all callers.
2020-07-26 18:04:40 -04:00
Benjamin Otte
e518c1f2f3 stringfilter: Make the constructor take an expression
An expression is critically important for a string filter and people
should be made aware of it when constructing the filter.
2020-07-16 20:43:16 +02:00
Matthias Clasen
b7eb663b82 gtk-demo: Make the words demo expand
We want to fill the window here.
2020-07-13 17:54:27 -04:00
Matthias Clasen
fc770a383a gtk-demo: Use a progressbar in the words demo
This looks better and a bit more polished.
2020-07-06 03:42:43 +02:00
Matthias Clasen
62c385a9dd gtk-demo: No selection in the words demo
This demo is about filtering, not about selection,
so use a GtkNoSelection.
2020-07-06 03:42:43 +02:00
Matthias Clasen
7c4ad1a5c4 gtk-demo: Cosmetic fixes for the words demo
Set a window size, and don't put newlines in titles, left align and
ellipsize the label.
2020-07-06 03:42:43 +02:00
Benjamin Otte
ac524bb13a demo: Make words listview load async
And add an "Open" button (why are filechooser buttons such a catastrophe
that I can't make them smaller?).
2020-07-06 03:42:43 +02:00
Benjamin Otte
b64eb6ca13 gtk-demo: Add incremental filtering to words demo 2020-07-06 03:42:43 +02:00
Benjamin Otte
b54f6710a7 gtk-demo: Add a listview demo for filtering strings 2020-07-06 03:42:42 +02:00