mirror of
https://gitlab.gnome.org/GNOME/calls.git
synced 2024-12-14 00:17:35 +00:00
in-app-notification: Use unsigned integers for timeout property
It's used in g_timeout_add_seconds and that expects a guint. Set the minimum timeout to 1 second.
This commit is contained in:
parent
d7b4aff0d8
commit
3e37870824
1 changed files with 12 additions and 12 deletions
|
@ -32,7 +32,7 @@ struct _CallsInAppNotification
|
||||||
|
|
||||||
GtkLabel *label;
|
GtkLabel *label;
|
||||||
|
|
||||||
gint timeout;
|
guint timeout;
|
||||||
guint timeout_id;
|
guint timeout_id;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -65,7 +65,7 @@ calls_in_app_notification_get_property (GObject *object,
|
||||||
|
|
||||||
switch (property_id) {
|
switch (property_id) {
|
||||||
case PROP_TIMEOUT:
|
case PROP_TIMEOUT:
|
||||||
g_value_set_int (value, self->timeout);
|
g_value_set_uint (value, self->timeout);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
@ -85,7 +85,7 @@ calls_in_app_notification_set_property (GObject *object,
|
||||||
|
|
||||||
switch (property_id) {
|
switch (property_id) {
|
||||||
case PROP_TIMEOUT:
|
case PROP_TIMEOUT:
|
||||||
self->timeout = g_value_get_int (value);
|
self->timeout = g_value_get_uint (value);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
@ -117,15 +117,15 @@ calls_in_app_notification_class_init (CallsInAppNotificationClass *klass)
|
||||||
object_class->set_property = calls_in_app_notification_set_property;
|
object_class->set_property = calls_in_app_notification_set_property;
|
||||||
object_class->finalize = calls_in_app_notification_finalize;
|
object_class->finalize = calls_in_app_notification_finalize;
|
||||||
|
|
||||||
props[PROP_TIMEOUT] = g_param_spec_int ("timeout",
|
props[PROP_TIMEOUT] = g_param_spec_uint ("timeout",
|
||||||
"Timeout",
|
"Timeout",
|
||||||
"The time the in-app notifaction should be shown",
|
"The time the in-app notifaction should be shown",
|
||||||
-1,
|
1,
|
||||||
G_MAXINT,
|
G_MAXUINT,
|
||||||
DEFAULT_TIMEOUT_SECONDS,
|
DEFAULT_TIMEOUT_SECONDS,
|
||||||
G_PARAM_READWRITE |
|
G_PARAM_READWRITE |
|
||||||
G_PARAM_CONSTRUCT |
|
G_PARAM_CONSTRUCT |
|
||||||
G_PARAM_STATIC_STRINGS);
|
G_PARAM_STATIC_STRINGS);
|
||||||
|
|
||||||
g_object_class_install_properties (object_class, PROP_LAST_PROP, props);
|
g_object_class_install_properties (object_class, PROP_LAST_PROP, props);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue