notification: Warn if trying to get the activation token outside activation
This API is intended to be used only during a NotifyActionCallback, so ensure that this is the case, by warn in case it's not the case.
This commit is contained in:
parent
13718b6ea0
commit
adb3e0c7bf
|
@ -1694,11 +1694,9 @@ const char *
|
||||||
notify_notification_get_activation_token (NotifyNotification *notification)
|
notify_notification_get_activation_token (NotifyNotification *notification)
|
||||||
{
|
{
|
||||||
g_return_val_if_fail (NOTIFY_IS_NOTIFICATION (notification), NULL);
|
g_return_val_if_fail (NOTIFY_IS_NOTIFICATION (notification), NULL);
|
||||||
|
g_return_val_if_fail (notification->priv->activating, NULL);
|
||||||
|
|
||||||
if (notification->priv->activating)
|
return notification->priv->activation_token;
|
||||||
return notification->priv->activation_token;
|
|
||||||
|
|
||||||
return NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
|
|
Loading…
Reference in New Issue