Commit Graph

64415 Commits

Author SHA1 Message Date
Benjamin Otte
201da90e23 snapshot: Move structs into .c file
They aren't used anywhere else.
2020-07-02 22:59:40 +02:00
Matthias Clasen
8d4fcabf01 Bring liststore tests over from GLib
Adapt the GListStore tests from GLib to GtkArrayStore.
2020-07-02 22:56:21 +02:00
Benjamin Otte
3f8735a488 Use preallocated array code
Now with GtkVector, we can use that one instead.
2020-07-02 20:52:28 +02:00
Benjamin Otte
a4dc248512 main: Use a GtkVector 2020-07-02 20:52:28 +02:00
Benjamin Otte
ef451b056a cssselector: Use GtkVector 2020-07-02 20:52:28 +02:00
Benjamin Otte
59aaabb161 Add GtkArrayStore
This has roughly the same API as GListStore, it's just an array.
2020-07-02 20:52:28 +02:00
Benjamin Otte
663ca21328 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-02 20:34:47 +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
Emmanuele Bassi
6bdca276a2 ci: Create new origin for forks
We don't need to create a new remote and fetch its master if we're
checking a merge request done on the upstream repository.
2020-06-29 13:14:40 +01:00
Matthias Clasen
d4ff275002 node-editor: Add a help window
Add a Help item to the gear menu that opens the
node-format.md file in a new window. This could
be improved if we could parse markdown and apply
tags, similar to how we can load pango markup.
2020-06-29 07:36:55 -04:00
Matthias Clasen
2b6f243578 node-editor: Cosmetics
Use a title style class for the labels.
2020-06-29 07:36:55 -04:00
Matthias Clasen
8770584bfb node-editor: Add a gear menu
Add a gear menu with Inspector and About menu items.
2020-06-29 07:36:55 -04:00
Matthias Clasen
4f7f15700c node-editor: Document the node format
Add a markdown file with the documentation of the
node format.

Fixes: #1887
2020-06-29 07:36:55 -04:00
Matthias Clasen
cab6808673 gtk-demo: Fix binary name in --version
We are gtk4-demo, not gtk3-demo.
2020-06-28 23:36:35 -04:00
Matthias Clasen
b77110c35a bitset: Fix documentation syntax 2020-06-28 22:38:23 -04:00
Matthias Clasen
c4e8218f49 bitset: Add more tests
Add some tests for rectangles, and for iters.
2020-06-28 22:38:23 -04:00
Matthias Clasen
c8b57154cb bitset: Correct preconditions in gtk_bitset_add_rectangle
We want to make sure that the rectangle fits in the grid.
2020-06-28 22:38:22 -04:00
Matthias Clasen
c4b2112f16 Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master

Closes #2743

See merge request GNOME/gtk!2161
2020-06-28 23:47:09 +00:00
Matthias Clasen
3132353ec5 ci: Drop one of the focus tests
One of the widget-factory focus tests is flaky in ci,
perhaps due to font changes causing size computations
to go slightly differently.

Drop this for now.
2020-06-28 18:59:48 -04:00
Matthias Clasen
3dc6267146 testsuite: Bump the per-test timeout to 60s
The bitset test has repeatedly run into the 30s timeout
in the ci, so give it some more time.
2020-06-28 17:02:01 -04:00
Matthias Clasen
6a6146a9e0 bitset: Fix the right-shift implementation
This was not doing the right thing at all.

This commit also adds tests for left- and
right-shift.
2020-06-28 16:37:30 -04:00
Matthias Clasen
01fbf8444b Stop setting GTK_IM_MODULE_FILE
GTK no longer reads this environment variable, so
setting it can have no benefit for uninstalled demos
anymore.
2020-06-28 13:42:02 -04:00
Matthias Clasen
1f8c79eca1 Add g_intern_static_string to valgrind suppressions
That function can also trigger a quark table reallocation.
2020-06-28 13:42:02 -04:00
Matthias Clasen
5229069101 widget: Avoid uninitialized access
Initialize all field in the GtkCrossingData struct
when synthesizing crossing events.

Fixes: #2743
2020-06-28 13:42:02 -04:00