Don't set NULL hint strings

This commit is contained in:
William Jon McCann 2010-11-15 14:44:40 -05:00
parent e6a4970a79
commit 54b6285006
1 changed files with 10 additions and 5 deletions

View File

@ -613,10 +613,12 @@ notify_notification_set_category (NotifyNotification *notification,
g_return_if_fail (notification != NULL);
g_return_if_fail (NOTIFY_IS_NOTIFICATION (notification));
if (category != NULL && category[0] != '\0') {
notify_notification_set_hint_string (notification,
"category",
category);
}
}
/**
* notify_notification_set_urgency:
@ -873,9 +875,12 @@ notify_notification_set_hint_string (NotifyNotification *notification,
const char *key,
const char *value)
{
notify_notification_set_hint (notification, key,
if (value != NULL && value[0] != '\0') {
notify_notification_set_hint (notification,
key,
g_variant_new_string (value));
}
}
static gboolean
_remove_all (void)