Support setting boolean hints.
This commit is contained in:
parent
f40ef57aae
commit
b2b4e09eb6
|
@ -1,3 +1,9 @@
|
|||
Wed Jul 27 23:08:43 PDT 2005 Christian Hammond <chipx86@chipx86.com>
|
||||
|
||||
* libnotify/notify.c:
|
||||
* libnotify/notify.h:
|
||||
- Support setting boolean hints.
|
||||
|
||||
Mon Jul 25 18:03:12 PDT 2005 Christian Hammond <chipx86@gnupdate.org>
|
||||
|
||||
* libnotify/notify.c:
|
||||
|
|
|
@ -608,6 +608,16 @@ notify_hints_set_int(NotifyHints *hints, const char *key, int value)
|
|||
g_hash_table_replace(hints, g_strdup(key), g_strdup_printf("%d", value));
|
||||
}
|
||||
|
||||
void
|
||||
notify_hints_set_bool(NotifyHints *hints, const char *key, gboolean value)
|
||||
{
|
||||
g_return_if_fail(hints != NULL);
|
||||
g_return_if_fail(key != NULL && *key != '\0');
|
||||
|
||||
g_hash_table_replace(hints, g_strdup(key),
|
||||
g_strdup(value? "true" : "false"));
|
||||
}
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
* Icon API
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
* Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* @todo We talk about URIs, but they are actually file paths not URIs
|
||||
* @todo Un-glibify?
|
||||
*/
|
||||
|
||||
#ifndef _LIBNOTIFY_NOTIFY_H_
|
||||
|
@ -161,6 +160,15 @@ void notify_hints_set_string(NotifyHints *hints, const char *key,
|
|||
*/
|
||||
void notify_hints_set_int(NotifyHints *hints, const char *key, int value);
|
||||
|
||||
/**
|
||||
* Adds a boolean value to the hints table.
|
||||
*
|
||||
* @param hints The hints table.
|
||||
* @param key The key.
|
||||
* @param value The value.
|
||||
*/
|
||||
void notify_hints_set_bool(NotifyHints *hints, const char *key, gboolean value);
|
||||
|
||||
/*@}*/
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue