mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-24 09:58:54 +02:00
docs: Use G_PARAM_STATIC_STRINGS in examples and explain it more
Make it a bit clearer in the documentation that using `G_PARAM_STATIC_STRINGS` everywhere is a good thing. Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
This commit is contained in:
@@ -555,7 +555,7 @@ viewer_file_class_init (ViewerFileClass *klass)
|
||||
"Filename",
|
||||
"Name of the file to load and display from.",
|
||||
NULL /* default value */,
|
||||
G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE);
|
||||
G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
obj_properties[PROP_ZOOM_LEVEL] =
|
||||
g_param_spec_uint ("zoom-level",
|
||||
@@ -564,7 +564,7 @@ viewer_file_class_init (ViewerFileClass *klass)
|
||||
0 /* minimum value */,
|
||||
10 /* maximum value */,
|
||||
2 /* default value */,
|
||||
G_PARAM_READWRITE);
|
||||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
g_object_class_install_properties (object_class,
|
||||
N_PROPERTIES,
|
||||
|
@@ -1226,7 +1226,7 @@ viewer_editable_default_init (ViewerEditableInterface *iface)
|
||||
0.0, /* minimum */
|
||||
G_MAXDOUBLE, /* maximum */
|
||||
0.0, /* default */
|
||||
G_PARAM_READWRITE));
|
||||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
||||
}
|
||||
</programlisting></informalexample>
|
||||
</para>
|
||||
|
Reference in New Issue
Block a user