Matthias Clasen
34e7311f79
Link the performance tests against libJudy
2020-07-05 11:37:12 -04:00
Matthias Clasen
f1f2c3e396
performance test: Print out memory sizes too
...
I didn't write the code to measure GSequence sizes,
so those just print 0. I am interested in the
dynamic array vs Judy array comparison here.
2020-07-05 11:35:55 -04:00
Matthias Clasen
8ffc1fe378
Make a stringlist implementation using Judy arrays
...
Just for comparison purposes.
2020-07-05 11:34:31 -04:00
Matthias Clasen
c509bc5f8d
Add a way to get the memory consumption of a string list
...
This is just for tests, and not meant to be merged.
I want to be able to compare the data structure size
for various string list implementations.
2020-07-05 11:33:26 -04:00
Benjamin Otte
c0457fc23b
add GPtrArray version to array store
2020-07-04 06:38:54 +02:00
Benjamin Otte
ca4b98e751
wip: Refactor performance test to make it more pluggable
2020-07-04 06:20:52 +02:00
Benjamin Otte
e3b8c3e9cf
stringlist: Convert to array
...
Stringlists are usually built and then never modified, and accessing
items through an array is faster.
2020-07-04 05:20:39 +02:00
Matthias Clasen
02266f2f66
perf test: Add GtkArrayStore
2020-07-04 05:09:23 +02:00
Matthias Clasen
f52df5f97e
wip: more perf test work
2020-07-04 05:09:23 +02:00
Matthias Clasen
99a71e1fde
wip: Add the old stringlist for comparsion
2020-07-04 05:09:23 +02:00
Matthias Clasen
9f3667583a
wip: benchmarks
2020-07-04 05:09:23 +02:00
Benjamin Otte
793d471bb6
snapshot: Use GtkVector for the state stack
2020-07-04 05:08:44 +02:00
Benjamin Otte
e46a109481
vector: Add a bunch of new features
...
* GTK_VECTOR_BY_VALUE
#define this to get GArrray-like behavior
* gtk_vector_splice (v, 0, 0, NULL, 25)
Adding items but passing NULL as the items will zero() them.
* gtk_vector_set_size()
A nicer way to call gtk_vector_splice()
2020-07-04 05:08:44 +02:00
Benjamin Otte
bd0096a926
icontheme: Use GtkVector
2020-07-04 05:08:44 +02:00
Benjamin Otte
79760b9e04
vector: Add null-termination
2020-07-04 05:08:44 +02:00
Benjamin Otte
023f6ce56f
snapshot: Port node list to vector
2020-07-04 05:08:44 +02:00
Benjamin Otte
ff0c8c7772
snapshot: Move structs into .c file
...
They aren't used anywhere else.
2020-07-04 05:08:44 +02:00
Matthias Clasen
0560881180
Bring liststore tests over from GLib
...
Adapt the GListStore tests from GLib to GtkArrayStore.
2020-07-04 05:08:44 +02:00
Benjamin Otte
c603e2d0ed
Use preallocated array code
...
Now with GtkVector, we can use that one instead.
2020-07-04 05:08:44 +02:00
Benjamin Otte
ddb691a2be
main: Use a GtkVector
2020-07-04 05:08:44 +02:00
Benjamin Otte
b7d7a69edd
cssselector: Use GtkVector
2020-07-04 05:08:44 +02:00
Benjamin Otte
7e0a58b710
Add GtkArrayStore
...
This has roughly the same API as GListStore, it's just an array.
2020-07-04 05:08:44 +02:00
Benjamin Otte
39cfb3741c
Add GtkVector
...
This is a scary idea where you #define a bunch of preprocessor values
and then #include "gtkvectorimpl.c" and end up with a dynamic array for
that data type.
2020-07-04 05:08:44 +02:00
Matthias Clasen
77435d31fa
gtk-demo: Use a progressbar in the words demo
...
This looks better and a bit more polished.
2020-07-01 02:47:50 +02:00
Matthias Clasen
6edb8f096f
gtk-demo: No selection in the words demo
...
This demo is about filtering, not about selection,
so use a GtkNoSelection.
2020-07-01 02:46:05 +02:00
Matthias Clasen
c4dfee8860
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-01 02:46:05 +02:00
Benjamin Otte
8ac1e77c9a
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-01 02:46:05 +02:00
Benjamin Otte
65ceb6c15a
stringlist: Call splice() for adding items after construction
...
This has the benefit of actually allowing NULL to be passed.
2020-07-01 02:46:05 +02:00
Benjamin Otte
f70d10f6ac
stringlist: Remove n_additions argument from gtk_string_list_splice()
...
char ** arrays are null-terminated everywhere, so make sure they are in
splice(), too.
Also fix the argument to be a const char * const * like in the
constructor.
2020-07-01 02:46:05 +02:00
Benjamin Otte
0bbd083d79
stringlist: Clarify docs for gtk_string_list_get_string()
...
Make sure it's obvious that it behaves like g_list_model_get_item() and
returns NULL for pos >= n_items.
2020-07-01 02:46:05 +02:00
Benjamin Otte
102d2986c6
stringlist: Make one constructor call the other
...
Simplifies code.
2020-07-01 02:46:05 +02:00
Benjamin Otte
c74201ca87
filterlistmodel: Look at type of change
...
This way we can avoid refiltering most of an already filtered list when
the change becomes more strict.
2020-07-01 02:46:05 +02:00
Benjamin Otte
b09019a5b4
gtk-demo: Add incremental filtering to words demo
2020-07-01 02:46:05 +02:00
Benjamin Otte
1dd08ad8db
filterlistmodel: Add gtk_filter_list_model_get_pending()
...
This allows tracking if the model is busy filtering.
2020-07-01 02:46:05 +02:00
Benjamin Otte
eb0704855f
filterlistmodel: Add incremental filtering
2020-07-01 02:46:05 +02:00
Benjamin Otte
c4c1d4a1b3
bitset: Add gtk_bitset_new_range()
...
It's a common use.
2020-07-01 02:46:05 +02:00
Benjamin Otte
e6756f605e
stringlist: Make property not construct-only
...
Massively speeds up creation of long stringlists.
2020-07-01 02:46:05 +02:00
Benjamin Otte
1f4b8e089e
filterlistmodel: Rewrite with bitset data structure
...
Bitsets are more powerful, less memory intensive and faster than the old
GtkRbTree version.
2020-07-01 02:46:05 +02:00
Benjamin Otte
c0e08db739
bitset: Add APIs needed for a filterlistmodel
2020-06-30 00:46:56 +02:00
Benjamin Otte
1c337d350d
tests: Make testlistview be a list again
...
The grid conversion was for testing and should never have been
committed.
2020-06-30 00:46:56 +02:00
Benjamin Otte
81e675dfbf
gtk-demo: Add a listview demo for filtering strings
2020-06-30 00:36:14 +02:00
Benjamin Otte
8556221429
stringlist: Take a const char const * argument
...
Sucks that we need to cast a char**, but otherwise we need to cast
{"foo", "bar", "baz" } arrays.
2020-06-30 00:36:14 +02:00
Benjamin Otte
1b4109a7fd
scrolledwindow: Expand by default
...
Use gtk_scrolled_window_set_hexpand/vexpand(FALSE) to make the scrolled
window not expand.
2020-06-30 00:36:13 +02:00
Benjamin Otte
df0786be7a
stringfilter: Don't crash if the expression returns ""
2020-06-30 00:36:13 +02:00
Benjamin Otte
3f545da08d
a11y: Remove double initialization of variables
2020-06-30 00:36:13 +02:00
Carlos Garnacho
7170fdebb9
Merge branch 'wip/Jehan/GtkIMContextWayland-master' into 'master'
...
gtk: focus out the GtkIMContextWayland upon finalization.
See merge request GNOME/gtk!2170
2020-06-29 22:24:32 +00:00
Jehan
7ccf32db57
gtk: focus out the GtkIMContextWayland upon finalization.
...
In particular, it will NULL-ified the current global context if this is
the finalized one, avoiding dangling invalid pointers.
Would have been a cherry-pick from branch gtk-3-24 of commit
b592ded80a , but files moved.
2020-06-29 22:17:08 +02:00
Daniel Mustieles
520c2116a3
Updated Spanish translation
2020-06-29 16:03:40 +02:00
Emmanuele Bassi
e818685921
Merge branch 'ci-style' into 'master'
...
ci: Create new origin for forks
See merge request GNOME/gtk!2164
2020-06-29 13:45:03 +00:00
Matthias Clasen
6ddd9793f3
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
Closes #1887
See merge request GNOME/gtk!2167
2020-06-29 12:30:41 +00:00