docs: Fix wrong fragments in type links

Due to a bug in gi-docgen we're not getting a warning if a fragment to a
type does not match the actual type, and we're generating a broken link.

See: https://gitlab.gnome.org/GNOME/gi-docgen/-/merge_requests/120
This commit is contained in:
Emmanuele Bassi 2021-11-07 18:22:10 +00:00
parent 14c32a7cf0
commit 59f45aa30c
9 changed files with 36 additions and 36 deletions

View File

@ -315,7 +315,7 @@ have been added to `GdkDisplay`.
The root window is an X11-centric concept that is no longer exposed in the
backend-neutral GDK API. If you need to interact with the X11 root window,
you can use [method@GdkX11.Display.get_xrootwindow] to get its XID.
you can use [`method@GdkX11.Display.get_xrootwindow`] to get its XID.
### Stop using `GdkVisual`
@ -333,9 +333,9 @@ had replacements in GTK 3 and were deprecated in favor of `GdkSeat`.
In GTK 4, the two roles of a standalone toplevel window and of a popup that
is placed relative to a parent window have been separated out into two
interfaces, [class@Gdk.Toplevel] and [class@Gdk.Popup]. Surfaces
implementing these interfaces are created with [ctor@Gdk.Surface.new_toplevel]
and [ctor@Gdk.Surface.new_popup], respectively, and they are presented on
interfaces, [iface@Gdk.Toplevel] and [iface@Gdk.Popup]. Surfaces
implementing these interfaces are created with [`ctor@Gdk.Surface.new_toplevel`]
and [`ctor@Gdk.Surface.new_popup`], respectively, and they are presented on
screen using [method@Gdk.Toplevel.present] and [method@Gdk.Popup.present].
The `present()` functions take parameters in the form of an auxiliary layout
struct, [struct@Gdk.PopupLayout] or [struct@Gdk.ToplevelLayout].
@ -362,9 +362,9 @@ windows, you you will have to use Xlib apis.
A number of minor API cleanups have happened in `GdkSurface`
as well. For example, `gdk_surface_input_shape_combine_region()`
has been renamed to [method@Gdk.Surface.set_input_region], and
has been renamed to [`method@Gdk.Surface.set_input_region`], and
`gdk_surface_begin_resize_drag()` has been renamed to
[method@Gdk.Toplevel.begin_resize].
`[method@Gdk.Toplevel.begin_resize`].
### The "iconified" window state has been renamed to "minimized"
@ -388,7 +388,7 @@ have accessors that you will have to use.
Event compression is always enabled in GTK 4, for both motion and
scroll events. If you need to see the uncoalesced motion or scroll
history, use [method@Gdk.Event.get_history] on the latest event.
history, use [`method@Gdk.Event.get_history`] on the latest event.
### Stop using grabs
@ -1054,7 +1054,7 @@ Observing widget contents and widget size is now done by using the
### Monitor handling has changed
Instead of a monitor number, [class@Gdk.Monitor] is now used throughout.
Instead of a monitor number, [class@Gdk.Monitor] is now used throughout.
[method@Gdk.Display.get_monitors] returns the list of monitors that can be queried
or observed for monitors to pass to APIs like [method@Gtk.Window.fullscreen_on_monitor].

View File

@ -14,7 +14,7 @@ the question you have, this list is a good place to start.
(most of it about GTK 2.x and 3.x, but still somewhat applicable). This
reference manual also contains a introductory
[Getting Started](#gtk-getting-started) part.
More documentation ranging from whitepapers to online books can be found at
the [GNOME developer's site](https://developer.gnome.org). After studying these
materials you should be well prepared to come back to this reference manual for details.
@ -93,11 +93,11 @@ the question you have, this list is a good place to start.
`gi18n.h` provides the following shorthand macros for convenience.
Conventionally, people define macros as follows for convenience:
#define _(x) gettext (x)
#define N_(x) x
#define C_(ctx,x) pgettext (ctx, x)
You use `N_()` (N stands for no-op) to mark a string for translation in
a location where a function call to gettext() is not allowed, such as
in an array initializer. You eventually have to call gettext() on the
@ -205,14 +205,14 @@ the question you have, this list is a good place to start.
Here is an example showing the three approaches using the copyright
sign © which has Unicode and ISO-8859-1 codepoint 169 and is represented
in UTF-8 by the two bytes 194, 169, or `"\302\251"` as a string literal:
g_print ("direct UTF-8: ©");
g_print ("escaped UTF-8: \302\251");
text = g_convert ("runtime conversion: ©", -1,
"ISO-8859-1", "UTF-8", NULL, NULL, NULL);
g_print (text);
g_free (text);
If you are using gettext() to localize your application, you need
to call bind_textdomain_codeset() to ensure that translated strings
are returned in UTF-8 encoding.
@ -432,10 +432,10 @@ the question you have, this list is a good place to start.
26. How do I associate some data with a row in the tree?
Remember that the [class@Gtk.TreeModel] columns don't necessarily have to be
Remember that the [iface@Gtk.TreeModel] columns don't necessarily have to be
displayed. So you can put non-user-visible data in your model just
like any other data, and retrieve it with [method@Gtk.TreeModel.get].
See the [tree widget overview](#TreeWidget).
See the [tree widget overview](#TreeWidget).
27. How do I put an image and some text in the same column?
@ -447,7 +447,7 @@ the question you have, this list is a good place to start.
28. I can set data easily on my [class@Gtk.TreeStore] or [class@Gtk.ListStore] models using
[method@Gtk.ListStore.set] and [method@Gtk.TreeStore.set], but can't read it back?
Both the [class@Gtk.TreeStore] and the [class@Gtk.ListStore] implement the [class@Gtk.TreeModel]
Both the [class@Gtk.TreeStore] and the [class@Gtk.ListStore] implement the [iface@Gtk.TreeModel]
interface. As a consequence, you can use any function this interface
implements. The easiest way to read a set of data back is to use
[method@Gtk.TreeModel.get].

View File

@ -58,8 +58,8 @@
* Its a low-level object, used to implement high-level objects
* such as [class@Gtk.Window] or [class@Gtk.Dialog] in GTK.
*
* The surfaces you see in practice are either [class@Gdk.Toplevel] or
* [class@Gdk.Popup], and those interfaces provide much of the required
* The surfaces you see in practice are either [iface@Gdk.Toplevel] or
* [iface@Gdk.Popup], and those interfaces provide much of the required
* API to interact with these surfaces. Other, more specialized surface
* types exist, but you will rarely interact with them directly.
*/
@ -2099,7 +2099,7 @@ gdk_surface_get_root_coords (GdkSurface *surface,
*root_y = 0;
return;
}
GDK_SURFACE_GET_CLASS (surface)->get_root_coords (surface, x, y, root_x, root_y);
}

View File

@ -2816,7 +2816,7 @@ _gtk_builder_get_template_type (GtkBuilder *builder)
* Creates a closure to invoke the function called @function_name.
*
* This is using the create_closure() implementation of @builder's
* [class@Gtk.BuilderScope].
* [iface@Gtk.BuilderScope].
*
* If no closure could be created, %NULL will be returned and @error
* will be set.

View File

@ -24,7 +24,7 @@
*
* An abstract class for laying out `GtkCellRenderer`s
*
* The `GtkCellArea` is an abstract class for [class@Gtk.CellLayout]
* The `GtkCellArea` is an abstract class for [iface@Gtk.CellLayout]
* widgets (also referred to as "layouting widgets") to interface with
* an arbitrary number of [class@Gtk.CellRenderer]s and interact with the user
* for a given [iface@Gtk.TreeModel] row.
@ -979,7 +979,7 @@ gtk_cell_area_real_add (GtkCellArea *area,
g_type_name (G_TYPE_FROM_INSTANCE (area)));
}
static void
static void
gtk_cell_area_real_remove (GtkCellArea *area,
GtkCellRenderer *renderer)
{
@ -1727,8 +1727,8 @@ gtk_cell_area_foreach_alloc (GtkCellArea *area,
g_return_if_fail (cell_area != NULL);
g_return_if_fail (callback != NULL);
GTK_CELL_AREA_GET_CLASS (area)->foreach_alloc (area, context, widget,
cell_area, background_area,
GTK_CELL_AREA_GET_CLASS (area)->foreach_alloc (area, context, widget,
cell_area, background_area,
callback, callback_data);
}
@ -2018,7 +2018,7 @@ gtk_cell_area_get_preferred_width (GtkCellArea *area,
g_return_if_fail (GTK_IS_CELL_AREA (area));
g_return_if_fail (GTK_IS_WIDGET (widget));
GTK_CELL_AREA_GET_CLASS (area)->get_preferred_width (area, context, widget,
GTK_CELL_AREA_GET_CLASS (area)->get_preferred_width (area, context, widget,
minimum_width, natural_width);
}
@ -2090,7 +2090,7 @@ gtk_cell_area_get_preferred_height (GtkCellArea *area,
g_return_if_fail (GTK_IS_CELL_AREA (area));
g_return_if_fail (GTK_IS_WIDGET (widget));
GTK_CELL_AREA_GET_CLASS (area)->get_preferred_height (area, context, widget,
GTK_CELL_AREA_GET_CLASS (area)->get_preferred_height (area, context, widget,
minimum_height, natural_height);
}
@ -3369,7 +3369,7 @@ gtk_cell_area_stop_editing (GtkCellArea *area,
gtk_cell_renderer_stop_editing (priv->edited_cell, canceled);
/* When editing is explicitly halted either
* the "editing-canceled" signal is emitted on the cell
* the "editing-canceled" signal is emitted on the cell
* renderer or the "editing-done" signal on the GtkCellEditable widget
*/
if (!canceled)
@ -3527,7 +3527,7 @@ _gtk_cell_area_set_cell_data_func_with_proxy (GtkCellArea *area,
/* Note we do not take a reference to the proxy, the proxy is a GtkCellLayout
* that is forwarding its implementation to a delegate GtkCellArea therefore
* its life-cycle is longer than the area's life cycle.
* its life-cycle is longer than the area's life cycle.
*/
if (info)
{

View File

@ -2141,7 +2141,7 @@ gtk_constraint_layout_add_constraints_from_descriptionv (GtkConstraintLayout *la
* @error: return location for a `GError`
* @first_view: the name of a view in the VFL description, followed by the
* [iface@Gtk.ConstraintTarget] to which it maps
* @...: a `NULL`-terminated list of view names and [class@Gtk.ConstraintTarget]s
* @...: a `NULL`-terminated list of view names and [iface@Gtk.ConstraintTarget]s
*
* Creates a list of constraints from a VFL description.
*
@ -2209,10 +2209,10 @@ gtk_constraint_layout_add_constraints_from_description (GtkConstraintLayout *lay
/**
* gtk_constraint_layout_observe_constraints:
* @layout: a `GtkConstraintLayout`
*
*
* Returns a `GListModel` to track the constraints that are
* part of the layout.
*
*
* Calling this function will enable extra internal bookkeeping
* to track constraints and emit signals on the returned listmodel.
* It may slow down operations a lot.
@ -2249,10 +2249,10 @@ gtk_constraint_layout_observe_constraints (GtkConstraintLayout *layout)
/**
* gtk_constraint_layout_observe_guides:
* @layout: a `GtkConstraintLayout`
*
*
* Returns a `GListModel` to track the guides that are
* part of the layout.
*
*
* Calling this function will enable extra internal bookkeeping
* to track guides and emit signals on the returned listmodel.
* It may slow down operations a lot.

View File

@ -33,7 +33,7 @@
* adding `GtkStyleProviders`.
*
* GTK uses the `GtkStyleProvider` implementation for CSS in
* [iface@Gtk.CssProvider].
* [class@Gtk.CssProvider].
*/
enum {

View File

@ -47,7 +47,7 @@
* etc. It supports autoplay, looping, and simple media controls. It does
* not have support for video overlays, multichannel audio, device
* selection, or input. If you are writing a full-fledged video player,
* you may want to use the [class@Gdk.Paintable] API and a media framework
* you may want to use the [iface@Gdk.Paintable] API and a media framework
* such as Gstreamer directly.
*/

View File

@ -10393,7 +10393,7 @@ gtk_widget_get_allocated_baseline (GtkWidget *widget)
* toplevel. The opacity value itself is not inherited by child
* widgets (since that would make widgets deeper in the hierarchy
* progressively more translucent). As a consequence, [class@Gtk.Popover]s
* and other [class@Gtk.Native] widgets with their own surface will use their
* and other [iface@Gtk.Native] widgets with their own surface will use their
* own opacity value, and thus by default appear non-translucent,
* even if they are attached to a toplevel that is translucent.
*/