Commit Graph

16 Commits

Author SHA1 Message Date
Alexander Mikhaylenko
58fcd09cff tests: Fix testtreeelistmodel
Stop using GtkContainer API for GtkListBoxRow and GtkToggleButton.
2020-05-11 19:47:58 +05:00
Matthias Clasen
f59f355190 Use gtk_window_set_child throughout
Replace all uses of gtk_container_add on windows
by gtk_window_set_child.
2020-05-04 22:53:08 -04:00
Matthias Clasen
df1816a29c button: Drop relief
We are only using this as a boolean, so change it
to a boolean property named has-frame.
2020-04-17 10:57:36 -04:00
Timm Bäder
d1cd6aacba tests: Add common_cflags to build
And fix all the errors and warnings resulting from that

See #2491
2020-03-06 18:21:58 +01:00
Benjamin Otte
a278edab22 window: Remove type argument from gtk_window_new() 2020-02-14 21:18:49 +01:00
Matthias Clasen
a6c5466900 Stop using gtk_main and gtk_main_quit
Replace these calls with direct use of GMainContext api.
2020-02-09 23:12:32 -05:00
Matthias Clasen
9e0c471b03 entry, spin button: Drop redundant API
Avoid duplicating GtkEditable APIs. Port existing users.
2019-02-28 16:34:00 -05:00
Daniel Boles
18199a3cef testtreelistmodel: Don't use non-standard function
as per efd3758f6a strcasecmp() is not a C
standard thing (not that we bothered including any header for it anyway)
and so this test failed to build on Windows with Microsoft Visual C.
2018-11-07 20:32:55 +00:00
Benjamin Otte
ee5708f543 testtreelistmodel: Display the file icon, because why not 2018-09-16 18:50:17 +02:00
Benjamin Otte
b94b8ac38d testtreelistmodel: Make the statusbar display more info
Now display how many items were filtered (if any) and how many
directories remain to be sanned (if any).
2018-09-16 18:50:17 +02:00
Benjamin Otte
afd69db678 testtreelistmodel: Sort files by name 2018-09-16 18:50:17 +02:00
Benjamin Otte
64b7c123cc testtreelistmodel: Add search
Add a simple search that does a case insensitive substring search of the
file paths.
2018-09-16 18:50:17 +02:00
Benjamin Otte
fcb780ee13 testtreelistmodel: Make the directory loading async
This is way more complicated than it should be, because it requires
manually limiting the number of open file enumerators.

On the other hand, it exhaustively tests the items-changed emission of
all involved listmodels because those signals come in pretty much
randomly.

It's also 50% slower than the sync version, with the caeat that the sync
version only shows the UI after it's done loading, while this version
shows it right away.
2018-09-16 18:50:17 +02:00
Benjamin Otte
65b795b861 testtreelistmodel: Add a hack to handle LONG lists
... and make the lists long by autoexpanding the tree.
2018-09-16 18:50:17 +02:00
Benjamin Otte
4b5fb5ec79 treelistmodel: Refactor to add GtkTreeListRow
This patch does multiple things:

1. Add a custom persistent per-row object.
2. Move all per-row API to that object. This means notifications are now
   possible.
3. Add a "passthrough" construct-only property to the TreeListModel that
   influences if the model returns these new object or passes through
   the ones from the model.

This greatly simplifies the code needed to be written for widgetry,
because one can just connect the per-row object to the expanders that
expand and collapse rows.

As an added power feature, these objects can also be passed through
further models (like filter models).

It also adds kind of a hack to Adwaita to make the test look neat.
2018-09-16 18:50:17 +02:00
Benjamin Otte
573c63973a gtk: Add GtkTreeListModel
This is a GListModel implementation with a neat API that can be used to
implement trees inside GtkListBox.
2018-09-16 18:50:17 +02:00