Ensure G_PARAM_STATIC_STRINGS for all properties

In `st`, we can do this by using `ST_PARAM_*`. In the other code files,
just use `G_PARAM_STATIC_STRINGS` directly.

This is just a minor convenience to prevent a few unnecessary string
copies.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/646
This commit is contained in:
Niels De Graef
2019-07-25 19:34:19 +02:00
committed by Florian Müllner
parent d360114226
commit 28ab1f4af4
20 changed files with 94 additions and 82 deletions

View File

@ -19,6 +19,7 @@
*/
#include "st-private.h"
#include "st-scroll-view-fade.h"
#include "st-scroll-view.h"
#include "st-widget.h"
@ -389,21 +390,21 @@ st_scroll_view_fade_class_init (StScrollViewFadeClass *klass)
"Vertical Fade Offset",
"The height of the area which is faded at the edge",
0.f, G_MAXFLOAT, DEFAULT_FADE_OFFSET,
G_PARAM_READWRITE));
ST_PARAM_READWRITE));
g_object_class_install_property (gobject_class,
PROP_HFADE_OFFSET,
g_param_spec_float ("hfade-offset",
"Horizontal Fade Offset",
"The width of the area which is faded at the edge",
0.f, G_MAXFLOAT, DEFAULT_FADE_OFFSET,
G_PARAM_READWRITE));
ST_PARAM_READWRITE));
g_object_class_install_property (gobject_class,
PROP_FADE_EDGES,
g_param_spec_boolean ("fade-edges",
"Fade Edges",
"Whether the faded area should extend to the edges",
FALSE,
G_PARAM_READWRITE));
ST_PARAM_READWRITE));
}