Matthias Clasen
31bb969cce
Merge branch 'matthiasc/for-master' into 'master'
...
gtk-demo: Use better api
See merge request GNOME/gtk!2254
2020-07-16 21:03:21 +00:00
Matthias Clasen
f4a7c7f6bf
gtk-demo: Use better api
...
We have a getter for the model, lets use it.
2020-07-16 16:26:41 -04:00
Benjamin Otte
495069c868
Merge branch 'wip/otte/for-master' into 'master'
...
Wip/otte/for master
See merge request GNOME/gtk!2251
2020-07-16 19:43:45 +00:00
Matthias Clasen
dfe470475b
Merge branch 'missing-exports' into 'master'
...
Add missing exports for GtkColumnView methods.
See merge request GNOME/gtk!2252
2020-07-16 18:52:22 +00:00
Benjamin Otte
de56e892aa
listitemmanager: Do a better job on double items
...
Previously, we would unparent the existing item that we were about
to reuse, and not the duplicate one.
Change that.
2020-07-16 20:43:16 +02: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
Benjamin Otte
c5ea59d7d1
gtk-demo: Don't make demos modal
...
That way, demo windows can be maximized and multiple demos can run at
once.
It's especially useful when using --run because the main window is
invisible then.
2020-07-16 20:43:16 +02:00
Benjamin Otte
22eccbdbb6
testsuite: Don't be too exhaustive
...
The test was taking over 60s on CI, that's a but much.
2020-07-16 20:43:16 +02:00
Benjamin Otte
58e85c85e4
testsuite: Add a case with escaped Latin-1 code
...
This came up in recent g_uri_escape() discussions.
2020-07-16 20:43:11 +02:00
Matthias Clasen
6b89148487
Merge branch 'wip/otte/vector' into 'master'
...
Arrays
See merge request GNOME/gtk!2197
2020-07-16 18:05:43 +00:00
Matthias Clasen
ddb9e428ec
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2250
2020-07-16 17:39:16 +00:00
Andreas Persson
b7fa353db2
Add missing exports for GtkColumnView methods.
...
GDK_AVAILABLE_IN_ALL was missing for one method in GtkColumnView and one
in GtkColumnViewColumn.
2020-07-16 18:58:41 +02:00
Matthias Clasen
87b5eadb7c
treesorter tests: Add a comment
...
This looks like a leak, but isn't one.
Add a comment to that effect.
2020-07-16 12:14:28 -04:00
Benjamin Otte
60a09e59e8
stringlist: Convert to array
...
Stringlists are usually built and then never modified, and accessing
items through an array is faster.
2020-07-16 18:09:58 +02:00
Benjamin Otte
6f8e9bf3a9
snapshot: Use GdkArray for the state stack
2020-07-16 18:09:58 +02:00
Benjamin Otte
90b7b84337
array: Add a bunch of new features
...
* GDK_ARRAY_BY_VALUE
#define this to get GArray-like behavior
* gdk_array_splice (v, 0, 0, NULL, 25)
Adding items but passing NULL as the items will zero() them.
* gdk_array_set_size()
A nicer way to call gdk_array_splice()
* constify getters
2020-07-16 18:09:58 +02:00
Benjamin Otte
088b5fc57f
icontheme: Use GdkArray
2020-07-16 18:09:58 +02:00
Benjamin Otte
a4cd974912
array: Add null-termination
2020-07-16 18:09:57 +02:00
Benjamin Otte
65359dcc59
snapshot: Port node list to GdkArray
2020-07-16 18:09:57 +02:00
Benjamin Otte
ac8b398c50
snapshot: Move structs into .c file
...
They aren't used anywhere else.
2020-07-16 18:09:57 +02:00
Benjamin Otte
aac2417893
Remove preallocated array code
...
Now with GdkArray, we can use that one instead.
2020-07-16 18:09:57 +02:00
Benjamin Otte
ad8892df10
main: Use a GdkArray
2020-07-16 18:09:57 +02:00
Benjamin Otte
edc7977c4e
cssselector: Use GdkArray
2020-07-16 18:09:57 +02:00
Benjamin Otte
8bf8ac5076
Add GdkArray
...
This is a scary idea where you #define a bunch of preprocessor values
and then #include "gdkarrayimpl.c" and end up with a dynamic array for
that data type.
See https://en.wikipedia.org/wiki/X_Macro for what's going on.
What are the advantages over using GArray or GPtrArray?
* It's typesafe
Because it works like C++ templates, we can use the actual type of
the object instead of having to use gpointer.
* It's one less indirection
instead of 2 indirections via self->array->data, this array is
embedded, so self->array is the actual data, and just one indirection
away. This is pretty irrelevant in general, but can be very noticable
in tight loops.
* It's all inline
Because the whole API is defined as static inline functions, the
compiler has full access to everything and can (and does) optimize
out unnecessary calls, thereby speeding up some operations quite
significantly, when full optimizations are enabled.
* It has more features
In particular preallocation allows for avoiding malloc() calls, which
can again speed up tight loops a lot.
But there's also splice(), which is very useful when used with
listmodels.
2020-07-16 18:09:57 +02:00
Benjamin Otte
c36cbd5140
sortlistmodel: Remove forgotten G_PARAM_CONSTRUCT_ONLY
2020-07-16 17:33:29 +02:00
Matthias Clasen
ee96bc7185
multiselection tests: Plug a leak
...
g_list_model_get_item is transfer full.
2020-07-16 08:54:36 -04:00
Matthias Clasen
f94f325636
filterlistmodel tests: Plug a leak
...
g_list_model_get_item is transfer full.
2020-07-16 08:54:36 -04:00
Matthias Clasen
6c1217dd93
filter tests: Plug a leak
...
g_list_model_get_item is transfer full.
2020-07-16 08:54:36 -04:00
Matthias Clasen
edb792503b
printunixdialog: Plug a leak
...
g_list_model_get_item is transfer full.
2020-07-16 08:54:36 -04:00
Matthias Clasen
3a43859286
Cosmetics
2020-07-16 08:54:36 -04:00
Matthias Clasen
c55dd104d4
placessidebar: Plug a leak
...
g_list_model_get_item is transfer full.
2020-07-16 08:54:36 -04:00
Matthias Clasen
497d137fb8
filechoosernativewin32: Plug a leak
...
g_list_model_get_item is transfer full.
2020-07-16 08:54:36 -04:00
Matthias Clasen
df01c5c7a4
columnlistitemfactory: Plug a leak
...
g_list_model_get_item is transfer full.
2020-07-16 08:54:36 -04:00
Matthias Clasen
2d1135fba6
applicationaccels: Plug a leak
...
g_list_model_get_item is transfer full.
2020-07-16 08:54:36 -04:00
Matthias Clasen
f54ed6f7dc
columviewsorter: Add an assertion
2020-07-16 08:54:36 -04:00
Matthias Clasen
b7efd896b6
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2249
2020-07-16 12:52:46 +00:00
Matthias Clasen
46eb51bc30
inspector: Avoid losing a reference
...
This was copying the example in the treelistrowsorter
docs that the previous commit fixed, so we apply
the same fix here.
2020-07-16 07:14:01 -04:00
Matthias Clasen
500dbaabc3
treelistrowsorter: Fix a faulty example
...
gtk_tree_list_row_sorter_new() consumes the
sorter, so we can't pass gtk_column_view_get_sorter(),
since that is transfer none.
2020-07-16 07:14:01 -04:00
Matthias Clasen
594ec3d822
inspector: Don't derive from GtkBox
...
We don't do that anymore. A bin layout
is sufficient here.
2020-07-16 07:14:01 -04:00
Matthias Clasen
f280508209
inspector: Drop a Private struct
...
These are really not needed in the inspector.
2020-07-16 07:14:01 -04:00
Matthias Clasen
480b88c776
inspector: Drop an unused field
2020-07-16 07:14:01 -04:00
Efstathios Iosifidis
a4e63905b1
Update Greek translation
2020-07-15 18:12:26 +00:00
Matthias Clasen
5666127dbc
Merge branch 'matthiasc/for-master' into 'master'
...
inspector: Use substring matching in the property list
See merge request GNOME/gtk!2247
2020-07-15 16:52:05 +00:00
Matthias Clasen
c1c110ba65
inspector: Use substring matching in the property list
...
This is convenient for things like "set both hexpand and
vexpand", since you can then search for "expand"
2020-07-15 11:29:06 -04:00
Florentina Mușat
eb2a839892
Update Romanian translation
2020-07-15 08:58:58 +00:00
Matthias Clasen
1c537a6d2e
Merge branch 'wip/jimmac/file-dialog-sidebar-color' into 'master'
...
Adwaita: sidebar color for file picker
See merge request GNOME/gtk!2242
2020-07-15 01:41:35 +00:00
Matthias Clasen
c12261a6ec
Merge branch 'wip/fix-picom-crasher' into 'master'
...
x11: Don't set up frame sync fence on unsupported compositors
Closes #2927
See merge request GNOME/gtk!2245
2020-07-15 01:40:49 +00:00
Matthias Clasen
5af7d6bff3
Merge branch 'idle-inhibit' into 'master'
...
Add support for idle inhibition on Wayland
Closes #2202
See merge request GNOME/gtk!2226
2020-07-15 01:38:55 +00:00
Matthias Clasen
de0f4b0f5b
Merge branch 'shortcuts-section-reflow-fix' into 'master'
...
Fix shortcuts section reflow
Closes #2928
See merge request GNOME/gtk!2246
2020-07-15 01:38:38 +00:00
Emmanuel Gil Peyrot
966ab1152d
gtk/wayland: Add support for idle inhibition in GtkApplication
...
This feature was previously only supported on DBus compositors, such as
Mutter, this adds support for other compositors such as all of those
based on wlroots.
This implementation prefers the idle-inhibit Wayland protocol to the
DBus version if it is available, since the inhibitor is per-surface
instead of global it allows a finer control over which displays get
dimmed for instance. For every case not supported by this protocol, a
fallback to the DBus version is used.
It can’t do anything if the GtkWindow isn’t passed, which might warrant
some documentation change to encourage users to not use NULL for this
argument.
This has been tested on Sway.
Fixes #2202 .
2020-07-14 21:47:22 +02:00