1
0
Fork 0
mirror of https://gitlab.gnome.org/GNOME/calls.git synced 2024-12-13 16:07:36 +00:00

in-app-notification: Use DEFAULT_TIMEOUT_SECONDS as the default timeout

By setting the G_PARAM_CONSTRUCT flag for the timeout property we make sure
that the default value is set if it has not been given explicitly in
g_object_new().
This commit is contained in:
Evangelos Ribeiro Tzaras 2021-12-15 13:19:44 +01:00
parent fd6fcbc3c0
commit d7b4aff0d8

View file

@ -122,8 +122,10 @@ calls_in_app_notification_class_init (CallsInAppNotificationClass *klass)
"The time the in-app notifaction should be shown",
-1,
G_MAXINT,
3,
G_PARAM_READWRITE);
DEFAULT_TIMEOUT_SECONDS,
G_PARAM_READWRITE |
G_PARAM_CONSTRUCT |
G_PARAM_STATIC_STRINGS);
g_object_class_install_properties (object_class, PROP_LAST_PROP, props);
@ -137,7 +139,6 @@ static void
calls_in_app_notification_init (CallsInAppNotification *self)
{
gtk_widget_init_template (GTK_WIDGET (self));
self->timeout = DEFAULT_TIMEOUT_SECONDS;
}