Matthias Clasen
9742200ff6
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2257
2020-07-17 03:20:20 +00:00
Matthias Clasen
ec10857b84
docs: Move columns below columnview
2020-07-16 22:14:39 -04:00
Matthias Clasen
353d4d161c
Cosmetic docs change
2020-07-16 22:08:15 -04:00
Matthias Clasen
bcd650f169
docs: Revise the filter docs a bit
2020-07-16 21:48:08 -04:00
Matthias Clasen
72d66dfcdd
docs: Revise sorter docs a bit
2020-07-16 21:45:11 -04:00
Matthias Clasen
5e97df5058
bitset: try again
2020-07-16 21:44:31 -04:00
Matthias Clasen
059d131e2b
Merge branch 'wip/chergert/subclass-treeview' into 'master'
...
treeview: allow subclassing GtkTreeView
Closes #2936
See merge request GNOME/gtk!2256
2020-07-17 01:05:07 +00:00
Matthias Clasen
8f7c207c7c
docs: Add more GtkExpression
...
Make GtkExpression show up in the object
hierarchy, and add the param spec and GValue
support to the docs.
2020-07-16 21:02:33 -04:00
Matthias Clasen
b9e8935037
docs: Document GtkBitsetIter
2020-07-16 20:28:21 -04:00
Matthias Clasen
5f33f4ae8e
docs: Add an example
...
Add a small example for setting up columnview sorting.
2020-07-16 20:21:21 -04:00
Matthias Clasen
adf0e8b1e6
docs: Fix examples
...
The formatting for examples in the GtkExpression
long description was messed up.
2020-07-16 20:21:21 -04:00
Christian Hergert
7500f9b255
treeview: allow subclassing GtkTreeView
...
Porting code from GTK 3 without the ability to subclass GtkTreeView
directly can cause an extreme amount of pain on application developers.
It can also complicate performance when it comes to dealing with
encapsulation as the outer widget would also encapsulate the GtkScrollable
implementation from GtkTreeView, typically through GtkViewport.
Fixes #2936
2020-07-16 17:06:15 -07:00
Matthias Clasen
a8d433dd26
docs: Link to GtkTreeRowReference
...
The list overview cross-reference table links
to all objects, except for this one.
2020-07-16 19:53:47 -04:00
Matthias Clasen
ecaf6fced0
docs: Add GtkTreeExpander
...
We want to link to it from various places, so it needs
to be present in the docs.
2020-07-16 19:53:47 -04:00
Matthias Clasen
31a7cac4a6
Merge branch 'matthiasc/arrays' into 'master'
...
Matthiasc/arrays
See merge request GNOME/gtk!2253
2020-07-16 23:31:31 +00:00
Matthias Clasen
5eec736b07
multifilter: Use GdkArray for the filters
2020-07-16 18:44:25 -04:00
Matthias Clasen
cf4a8e2152
multisorter: Use GdkArray for the sorters
2020-07-16 18:44:25 -04:00
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