st: Specify G_PARAM_EXPLICIT_NOTIFY where appropriate

We are now consistently calling notify() when a property does change.

With that we can opt out of g_object_set()'s implicit change notifications,
so that notify is only emitted when a property *actually* changes.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2168>
This commit is contained in:
Florian Müllner
2022-02-09 13:59:15 +01:00
committed by Marge Bot
parent bfb52aaf9d
commit 5a23c96bd9
15 changed files with 46 additions and 45 deletions

View File

@ -898,7 +898,7 @@ st_scroll_view_class_init (StScrollViewClass *klass)
"When the vertical scrollbar is displayed",
ST_TYPE_POLICY_TYPE,
ST_POLICY_AUTOMATIC,
ST_PARAM_READWRITE);
ST_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY);
/**
* StScrollView:hscrollbar-policy:
@ -911,7 +911,7 @@ st_scroll_view_class_init (StScrollViewClass *klass)
"When the horizontal scrollbar is displayed",
ST_TYPE_POLICY_TYPE,
ST_POLICY_AUTOMATIC,
ST_PARAM_READWRITE);
ST_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY);
/**
* StScrollView:hscrollbar-visible:
@ -947,7 +947,7 @@ st_scroll_view_class_init (StScrollViewClass *klass)
"Enable Mouse Scrolling",
"Enable automatic mouse wheel scrolling",
TRUE,
ST_PARAM_READWRITE);
ST_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY);
/**
* StScrollView:overlay-scrollbars:
@ -959,14 +959,14 @@ st_scroll_view_class_init (StScrollViewClass *klass)
"Use Overlay Scrollbars",
"Overlay scrollbars over the content",
FALSE,
ST_PARAM_READWRITE);
ST_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY);
props[PROP_CONTENT_PADDING] =
g_param_spec_boxed ("content-padding",
"Content padding",
"Content padding",
CLUTTER_TYPE_MARGIN,
ST_PARAM_READWRITE);
ST_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY);
g_object_class_install_properties (object_class, N_PROPS, props);
}