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:

committed by
Florian Müllner

parent
d360114226
commit
28ab1f4af4
@ -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));
|
||||
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user