Commit Graph

134 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
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
0a966e59e6 sizegroup: Convert docs 2021-03-11 16:37:38 +00:00
Matthias Clasen
929a56e53c Clean up lots of GTK+ -> GTK
Replace most remaining uses of GTK+ in the docs and
user-visible strings by GTK. Also remove some leftover
"Was added in 3.x" sentences from the docs.
2020-09-12 12:01:04 -04:00
Benjamin Otte
d375dce9f5 Replace "gchar" with "char" 2020-07-25 00:47:36 +02:00
Benjamin Otte
d7266b25ba Replace "gint" with "int" 2020-07-25 00:47:36 +02:00
Matthias Clasen
5573a3465c Drop gtkcontainer.h includes
These includes are unused.
2020-05-11 22:38:21 -04:00
Matthias Clasen
b55195fa2e Move the idle sizer to GtkWindow
This was only living in gtkcontainer.c for historic
reasons. Move it closer to where it belongs, and
rename it from 'idle' to 'layout', since it is
really about the layout phase of the frame clock,
nowadays.
2020-04-20 16:30:45 -04:00
Alexander Larsson
96b37f4eb8 Use the new GtkBuildableParser type in GtkBuildable interfaces 2019-09-10 12:08:20 -04:00
Robert Ancell
dbd2a81501 Change the few examples that use a full GTK_ enum value in .ui files.
Lowercase versions work just as well and are much more readable.
2019-07-08 15:52:28 +12:00
Matthias Clasen
d9626820e9 sizegroup: Drop the priv pointer 2019-05-19 19:22:53 +00:00
Matthias Clasen
963152a85a size group: Make not subclassable
Part of being more explicit about what
we allow to be subclassed and what not.
2019-05-19 17:49:07 +00:00
Matthias Clasen
4c150d8eb5 The big versioning cleanup
Remove all the old 2.x and 3.x version annotations.
GTK+ 4 is a new start, and from the perspective of a
GTK+ 4 developer all these APIs have been around since
the beginning.
2018-02-06 01:16:32 -05:00
Benjamin Otte
cda617df4d API: sizegroup: Remove gtk_size_group_set_ignore_hidden() 2016-10-16 18:18:58 +02:00
Matthias Clasen
3ab7645ac1 Avoid a deprecation warning 2016-06-01 09:27:24 -04:00
Matthias Clasen
d76c07836b Document GtkSizeGroup::ignore-hidden as broken
...and deprecate it, recommending GtkStack as an alternative.
2016-05-31 16:34:22 -04:00
Benjamin Otte
ab7e901cfd widget: Move resize function into gtkwidget.c
There's no sizegroup specific code left in it, but lots of
widget-specifics.
2015-10-28 19:44:28 +01:00
Benjamin Otte
4fa74e68e9 sizegroup: Merge function into only caller 2015-10-28 19:44:28 +01:00
Benjamin Otte
b5dfe9b833 sizegroup: Simplify widget's size group invalidation
Since we do not queue resizes twice anymore, we can just walk the list
of groups without deduplication.
2015-10-28 19:44:28 +01:00
Benjamin Otte
a31123e9f0 sizegroup: Skip resizes on widgets that have resize queued
Widgets that already have a resize queued don't need to walk the whole
parent chain and queue another resize. It's enough to do it once per
resize.

This also means that sizegroups cannot use the shortcut of just
invalidating the first widget in the group anymore. That widget might
already have a resize queued while others don't.
2015-10-28 19:44:28 +01:00
Benjamin Otte
3ff894c201 widget: Add a function that does actual resize
It's just shuffling code around.
2015-10-28 19:44:28 +01:00
Benjamin Otte
58d506fb11 sizegroup: Merge function into only caller
Both functions were running the same loop. Just running the loop once
seems advantageous.
2015-10-28 19:44:28 +01:00
Benjamin Otte
85ab8ad001 sizegroup: Don't invalidate over resize containers.
Before this commit, a widget tree like this:
  Window
    AnyContainer (part of SizeGroup1)
      GtkClutterEmbed
        SomeWidget
when calling gtk_widget_queue_resize(SomeWidget), would invalidate
SizeGroup1, when it should have stopped at the GtkClutterEmbed (which is
a RESIZE_IMMEDIATE child).
2015-10-28 19:44:28 +01:00
Benjamin Otte
1f2e21ab9a sizegroup: Refactor function
Get rid of continues in loop. This allows doing more complex things in
future commits.
2015-10-28 19:44:27 +01:00
Benjamin Otte
0721d964e4 sizegroup: Refactor function 2015-10-28 19:44:27 +01:00
Benjamin Otte
dd0e5cfce6 sizegroup: Remove special case before loop
The loop actually does the right thing already. There's no need to
complicate things.
2015-10-28 19:44:27 +01:00
Benjamin Otte
8fea3b02c9 sizegroup: refactor
The code looks a lot less dangerous if it doesn't look like we're
casting a random widget to a container.
2015-10-28 19:44:27 +01:00
Benjamin Otte
e19818359a sizegroup: Fold function into only caller 2015-10-28 19:44:27 +01:00
Benjamin Otte
690e015ed1 sizegroup: Move container function into its only caller 2015-10-28 19:44:27 +01:00
Benjamin Otte
ab2d236d3d sizegroup: Remove GtkQueueResizeFlags
They were only used with geometry widgets.
2015-10-28 19:44:27 +01:00
Matthias Clasen
da45d29dbc size group: Streamline disposal
Remove widgets from their size groups in dispose, without connecting
to ::destroy. The signal handler is not necessary.
2015-09-23 07:01:16 -04:00
Matthias Clasen
e0be076652 size group: streamline iteration slightly
Instead of handling the horizontal and vertical peers separately
(and often, duplicatively), collect all peers in one go. At the
same time, avoid creating and destroying hash tables more often
than necessary.
2015-09-23 07:01:15 -04:00
Matthias Clasen
0f92a43e10 Move GtkWidgetPrivate to gtkwidgetprivate.h
This lets us use inlined getters for members in there,
avoiding the type checks in the public getters.
2015-09-07 02:40:22 -04:00
Matthias Clasen
7767f059fd GtkSizeGroup: Use _gtk_builder_lookup_object 2015-04-27 23:09:35 -04:00
Matthias Clasen
ca82b610a1 GtkSizeGroup: Use the new helpers
Instead of issuing g_warning, fill the provided GError.
This lets us test this error handling, and is the right
thing to do. Use the new GtkBuilder helpers and
g_markup_collect_attributes to do so.
2015-04-27 01:15:24 -04:00
Matthias Clasen
83669856b2 GtkSizeGroup: Use G_PARAM_EXPLICIT_NOTIFY 2014-06-09 13:31:09 -04:00
William Jon McCann
469d333aa2 docs: use Returns: consistently
Instead of Return value:
2014-02-19 18:56:05 -05:00
Matthias Clasen
7f6a964c47 Docs: Remove all entities and turn off sgml mode
With all element markup gone, it is time to turn off
sgml mode, and get rid of entities as well.
2014-02-09 17:58:07 -05:00
William Jon McCann
e34bd4137d docs: use apostrophes in *n't 2014-02-07 13:32:47 -05:00
William Jon McCann
3b3d8ca456 docs: Use "#" for refsect2 instead of ## 2014-02-04 21:00:58 -05:00
William Jon McCann
a22358c0c0 docs: use ` instead of <literal> 2014-02-04 18:24:29 -05:00
Matthias Clasen
09d1b28249 docs: Convert to markdown
Specifically, switch to using markdown syntax for sections.
2014-02-02 00:30:27 -05:00
William Jon McCann
768bc44081 docs: use |[ ]| instead of <programlisting></programlisting>
https://bugzilla.gnome.org/show_bug.cgi?id=723119
2014-01-29 12:45:49 -05:00
Emmanuele Bassi
0899ef7cc9 gtk: Use new macros for defining private data
https://bugzilla.gnome.org/show_bug.cgi?id=702996
2013-07-09 09:30:02 +01:00
Kalev Lember
19e6db7997 gtksizegroup: Add explicit braces to avoid dangling else
Otherwise the else after the for loop becomes attached to the wrong if.
2013-05-07 13:59:53 +02:00
Emmanuele Bassi
4498ff314e sizegroup: Use g_hash_table_add()
This is the function to use when treating hash tables as a set.
2012-11-25 22:58:19 +01:00
Benjamin Otte
2ab65ef771 izegroup: Improve performance
Keep a list of all groups and avoid groups we already handled. Speeds up
GtkToolpalette a lot.
2012-11-25 13:32:21 +01:00
Benjamin Otte
70ba973d1d sizegroup: Simplify comparison 2012-11-14 01:55:29 +01:00
Benjamin Otte
fd6ea42319 sizerequest: Use GtkOrientation
... instead of GtkSizeGroupMode. Orientation is what we're interested in
after all. When we need a GtkSizeGroupMode, we can do the translation
where we need it.
2012-11-14 01:55:29 +01:00