Commit Graph

26 Commits

Author SHA1 Message Date
sunce
b13f05537b Escape GtkBuilder XML tag in comment with backtick
Escape XML tags in gi-docgen oriented comment e.g. from <child> to
`<child>`, so that they don't become HTML tag on the final webpage.
This fix includes everything from commit ff46ea64 and #5312.

Fixes #5312
2023-01-15 16:55:18 +08:00
Bilal Elmoussaoui
5ede8dd1eb g-i: Add missing since annotation 2022-11-25 10:16:37 +00:00
Matthias Clasen
f0aefe2f7f stringlist: Add a construct-only strings property
This enables creating string lists in ui files
without using custom markup.

Related: #5350
2022-11-20 14:07:45 -05:00
Matthias Clasen
e499a09759 Drop gtkintl.h
Include gtkprivate.h for I_() and glib-i18n.h for
gettext macros.
2022-09-24 10:03:37 -04:00
Sophie Herold
a546ae32d7 Remove all nicks and blurbs from param specs
Those property features don't seem to be in use anywhere.
They are redundant since the docs cover the same information
and more. They also created unnecessary translation work.

Closes #4904
2022-05-11 18:16:29 +02:00
Matthias Clasen
ae315c1106 stringlist: Add docs to GtkStringObject 2021-03-11 16:37:36 +00:00
Matthias Clasen
9ab40d2899 stringlist: Convert docs 2021-03-11 16:37:35 +00:00
Benjamin Otte
96e1b85c2c gdkarray: Add a "stolen" boolean to splice()
If set to TRUE, does not call the free func for the removed items.

This can be used to move items between arrays without having to do the
refcounting dance.
2020-12-24 06:38:45 +01:00
Bilal Elmoussaoui
475352fbc0 StringList: add missing nullability annotations 2020-12-02 10:36:29 -05:00
Matthias Clasen
af5e13b9a1 Remove an unused function
The only property of GtkStringObject is readonly since
commit fb14f50ec1, so we don't need a
set_property implementation.
2020-10-30 23:32:30 -04:00
Matthias Clasen
20c1fb0a0a docs: Tweak documentation for list widgets
Fix numerous cases of : vs :: for signal references,
add some more details here and there.
2020-08-03 18:43:25 -04:00
Benjamin Otte
d375dce9f5 Replace "gchar" with "char" 2020-07-25 00:47:36 +02:00
Matthias Clasen
86c7fceb09 Merge branch 'list-model-docs' into 'master'
List model docs

See merge request GNOME/gtk!2182
2020-07-19 23:50:09 +00: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
Emmanuele Bassi
fdeda388bf Fix "not nullable" annotation 2020-07-07 12:03:44 +01:00
Benjamin Otte
1dbb8df95f stringlist: Export gtk_string_object_new()
There are various use cases where it makes sense to construct these -
from our internal testing to using them in flatten- or mapmodels.
2020-07-05 02:59:21 +02:00
Benjamin Otte
f6c2c2edbd stringlist: Call splice() for adding items after construction
This has the benefit of actually allowing NULL to be passed.
2020-07-05 02:59:21 +02:00
Benjamin Otte
c4e4de36f6 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-05 02:59:21 +02:00
Benjamin Otte
67cbb2a7d3 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-05 02:59:21 +02:00
Benjamin Otte
a979daa8ea stringlist: Make one constructor call the other
Simplifies code.
2020-07-05 02:59:21 +02:00
Benjamin Otte
fb14f50ec1 stringlist: Make property not construct-only
Massively speeds up creation of long stringlists.
2020-07-05 02:59:21 +02:00
Benjamin Otte
f75a3a0e95 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-07-05 02:34:42 +02:00
Matthias Clasen
130bd5937c docs: Add guidance about list model performance
Add a section about the performance tradeoffs between
different list model implementations.
2020-07-03 09:29:19 -04:00
Matthias Clasen
5d9bcfb64a stringlist: Cosmetic documentation fix 2020-06-28 12:43:16 -04:00
Rico Tzschichholz
5b1195f874 gtk: Add some g-i annotations to GtkStringList 2020-06-26 06:36:23 +02:00
Matthias Clasen
e8210d5865 Add GtkStringList as public api
This is a list model holding strings, initialized
from a char **. String lists are buildable as well,
and that replaces the buildable support in GktDropDowns.
2020-06-23 16:11:46 -04:00