Fix indentation
This commit is contained in:
parent
9607cf459f
commit
8374438dcf
|
@ -1,4 +1,5 @@
|
||||||
/**
|
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
|
||||||
|
*
|
||||||
* @file libnotify/internal.h Internal definitions
|
* @file libnotify/internal.h Internal definitions
|
||||||
*
|
*
|
||||||
* @Copyright (C) 2006 Christian Hammond
|
* @Copyright (C) 2006 Christian Hammond
|
||||||
|
@ -44,8 +45,7 @@ DBusGProxy *_notify_get_g_proxy(void);
|
||||||
void _notify_cache_add_notification(NotifyNotification *n);
|
void _notify_cache_add_notification(NotifyNotification *n);
|
||||||
void _notify_cache_remove_notification(NotifyNotification *n);
|
void _notify_cache_remove_notification(NotifyNotification *n);
|
||||||
gint _notify_notification_get_timeout(const NotifyNotification *n);
|
gint _notify_notification_get_timeout(const NotifyNotification *n);
|
||||||
gboolean _notify_notification_has_nondefault_actions(
|
gboolean _notify_notification_has_nondefault_actions(const NotifyNotification *n);
|
||||||
const NotifyNotification *n);
|
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
|
|
|
@ -527,8 +527,10 @@ _idle_check_updates(void *user_data)
|
||||||
* Returns: The new #NotifyNotification.
|
* Returns: The new #NotifyNotification.
|
||||||
*/
|
*/
|
||||||
NotifyNotification *
|
NotifyNotification *
|
||||||
notify_notification_new(const gchar *summary, const gchar *body,
|
notify_notification_new(const gchar *summary,
|
||||||
const gchar *icon, GtkWidget *attach)
|
const gchar *body,
|
||||||
|
const gchar *icon,
|
||||||
|
GtkWidget *attach)
|
||||||
{
|
{
|
||||||
g_return_val_if_fail(attach == NULL || GTK_IS_WIDGET(attach), NULL);
|
g_return_val_if_fail(attach == NULL || GTK_IS_WIDGET(attach), NULL);
|
||||||
|
|
||||||
|
@ -589,7 +591,8 @@ notify_notification_new_with_status_icon(const gchar *summary,
|
||||||
*/
|
*/
|
||||||
gboolean
|
gboolean
|
||||||
notify_notification_update(NotifyNotification *notification,
|
notify_notification_update(NotifyNotification *notification,
|
||||||
const gchar *summary, const gchar *body,
|
const gchar *summary,
|
||||||
|
const gchar *body,
|
||||||
const gchar *icon)
|
const gchar *icon)
|
||||||
{
|
{
|
||||||
g_return_val_if_fail(notification != NULL, FALSE);
|
g_return_val_if_fail(notification != NULL, FALSE);
|
||||||
|
@ -730,7 +733,9 @@ notify_notification_set_geometry_hints(NotifyNotification *notification,
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_close_signal_handler(DBusGProxy *proxy, guint32 id, guint32 reason,
|
_close_signal_handler(DBusGProxy *proxy,
|
||||||
|
guint32 id,
|
||||||
|
guint32 reason,
|
||||||
NotifyNotification *notification)
|
NotifyNotification *notification)
|
||||||
{
|
{
|
||||||
if (id == notification->priv->id)
|
if (id == notification->priv->id)
|
||||||
|
@ -744,7 +749,9 @@ _close_signal_handler(DBusGProxy *proxy, guint32 id, guint32 reason,
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_action_signal_handler(DBusGProxy *proxy, guint32 id, gchar *action,
|
_action_signal_handler(DBusGProxy *proxy,
|
||||||
|
guint32 id,
|
||||||
|
gchar *action,
|
||||||
NotifyNotification *notification)
|
NotifyNotification *notification)
|
||||||
{
|
{
|
||||||
CallbackPair *pair;
|
CallbackPair *pair;
|
||||||
|
@ -793,7 +800,8 @@ _gslist_to_string_array(GSList *list)
|
||||||
* @error.
|
* @error.
|
||||||
*/
|
*/
|
||||||
gboolean
|
gboolean
|
||||||
notify_notification_show(NotifyNotification *notification, GError **error)
|
notify_notification_show(NotifyNotification *notification,
|
||||||
|
GError **error)
|
||||||
{
|
{
|
||||||
NotifyNotificationPrivate *priv;
|
NotifyNotificationPrivate *priv;
|
||||||
GError *tmp_error = NULL;
|
GError *tmp_error = NULL;
|
||||||
|
@ -1028,7 +1036,8 @@ notify_notification_set_icon_from_pixbuf(NotifyNotification *notification,
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
notify_notification_set_hint_int32(NotifyNotification *notification,
|
notify_notification_set_hint_int32(NotifyNotification *notification,
|
||||||
const gchar *key, gint value)
|
const gchar *key,
|
||||||
|
gint value)
|
||||||
{
|
{
|
||||||
GValue *hint_value;
|
GValue *hint_value;
|
||||||
|
|
||||||
|
@ -1054,7 +1063,8 @@ notify_notification_set_hint_int32(NotifyNotification *notification,
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
notify_notification_set_hint_uint32(NotifyNotification *notification,
|
notify_notification_set_hint_uint32(NotifyNotification *notification,
|
||||||
const gchar *key, guint value)
|
const gchar *key,
|
||||||
|
guint value)
|
||||||
{
|
{
|
||||||
GValue *hint_value;
|
GValue *hint_value;
|
||||||
|
|
||||||
|
@ -1079,7 +1089,8 @@ notify_notification_set_hint_uint32(NotifyNotification *notification,
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
notify_notification_set_hint_double(NotifyNotification *notification,
|
notify_notification_set_hint_double(NotifyNotification *notification,
|
||||||
const gchar *key, gdouble value)
|
const gchar *key,
|
||||||
|
gdouble value)
|
||||||
{
|
{
|
||||||
GValue *hint_value;
|
GValue *hint_value;
|
||||||
|
|
||||||
|
@ -1104,7 +1115,8 @@ notify_notification_set_hint_double(NotifyNotification *notification,
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
notify_notification_set_hint_byte(NotifyNotification *notification,
|
notify_notification_set_hint_byte(NotifyNotification *notification,
|
||||||
const gchar *key, guchar value)
|
const gchar *key,
|
||||||
|
guchar value)
|
||||||
{
|
{
|
||||||
GValue *hint_value;
|
GValue *hint_value;
|
||||||
|
|
||||||
|
@ -1132,7 +1144,8 @@ notify_notification_set_hint_byte(NotifyNotification *notification,
|
||||||
void
|
void
|
||||||
notify_notification_set_hint_byte_array(NotifyNotification *notification,
|
notify_notification_set_hint_byte_array(NotifyNotification *notification,
|
||||||
const gchar *key,
|
const gchar *key,
|
||||||
const guchar *value, gsize len)
|
const guchar *value,
|
||||||
|
gsize len)
|
||||||
{
|
{
|
||||||
GValue *hint_value;
|
GValue *hint_value;
|
||||||
GArray *byte_array;
|
GArray *byte_array;
|
||||||
|
@ -1165,7 +1178,8 @@ notify_notification_set_hint_byte_array(NotifyNotification *notification,
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
notify_notification_set_hint_string(NotifyNotification *notification,
|
notify_notification_set_hint_string(NotifyNotification *notification,
|
||||||
const gchar *key, const gchar *value)
|
const gchar *key,
|
||||||
|
const gchar *value)
|
||||||
{
|
{
|
||||||
GValue *hint_value;
|
GValue *hint_value;
|
||||||
|
|
||||||
|
@ -1246,7 +1260,8 @@ notify_notification_add_action(NotifyNotification *notification,
|
||||||
const char *action,
|
const char *action,
|
||||||
const char *label,
|
const char *label,
|
||||||
NotifyActionCallback callback,
|
NotifyActionCallback callback,
|
||||||
gpointer user_data, GFreeFunc free_func)
|
gpointer user_data,
|
||||||
|
GFreeFunc free_func)
|
||||||
{
|
{
|
||||||
NotifyNotificationPrivate *priv;
|
NotifyNotificationPrivate *priv;
|
||||||
CallbackPair *pair;
|
CallbackPair *pair;
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
/**
|
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
|
||||||
|
*
|
||||||
* @file libnotify/notification.h Notification object
|
* @file libnotify/notification.h Notification object
|
||||||
*
|
*
|
||||||
* @Copyright (C) 2006 Christian Hammond
|
* @Copyright (C) 2006 Christian Hammond
|
||||||
|
@ -128,37 +129,43 @@ void notify_notification_set_icon_from_pixbuf(NotifyNotification *notification,
|
||||||
GdkPixbuf *icon);
|
GdkPixbuf *icon);
|
||||||
|
|
||||||
void notify_notification_set_hint_int32(NotifyNotification *notification,
|
void notify_notification_set_hint_int32(NotifyNotification *notification,
|
||||||
const gchar *key, gint value);
|
const gchar *key,
|
||||||
|
gint value);
|
||||||
void notify_notification_set_hint_uint32(NotifyNotification *notification,
|
void notify_notification_set_hint_uint32(NotifyNotification *notification,
|
||||||
const gchar *key, guint value);
|
const gchar *key,
|
||||||
|
guint value);
|
||||||
|
|
||||||
void notify_notification_set_hint_double(NotifyNotification *notification,
|
void notify_notification_set_hint_double(NotifyNotification *notification,
|
||||||
const gchar *key, gdouble value);
|
const gchar *key,
|
||||||
|
gdouble value);
|
||||||
|
|
||||||
void notify_notification_set_hint_string(NotifyNotification *notification,
|
void notify_notification_set_hint_string(NotifyNotification *notification,
|
||||||
const gchar *key,
|
const gchar *key,
|
||||||
const gchar *value);
|
const gchar *value);
|
||||||
|
|
||||||
void notify_notification_set_hint_byte(NotifyNotification *notification,
|
void notify_notification_set_hint_byte(NotifyNotification *notification,
|
||||||
const gchar *key, guchar value);
|
const gchar *key,
|
||||||
|
guchar value);
|
||||||
|
|
||||||
void notify_notification_set_hint_byte_array(NotifyNotification *notification,
|
void notify_notification_set_hint_byte_array(NotifyNotification *notification,
|
||||||
const gchar *key,
|
const gchar *key,
|
||||||
const guchar *value, gsize len);
|
const guchar *value,
|
||||||
|
gsize len);
|
||||||
|
|
||||||
void notify_notification_clear_hints(NotifyNotification *notification);
|
void notify_notification_clear_hints(NotifyNotification *notification);
|
||||||
|
|
||||||
void notify_notification_add_action(NotifyNotification *notification,
|
void notify_notification_add_action(NotifyNotification *notification,
|
||||||
const char *action, const char *label,
|
const char *action,
|
||||||
|
const char *label,
|
||||||
NotifyActionCallback callback,
|
NotifyActionCallback callback,
|
||||||
gpointer user_data, GFreeFunc free_func);
|
gpointer user_data,
|
||||||
|
GFreeFunc free_func);
|
||||||
|
|
||||||
void notify_notification_clear_actions(NotifyNotification *notification);
|
void notify_notification_clear_actions(NotifyNotification *notification);
|
||||||
gboolean notify_notification_close(NotifyNotification *notification,
|
gboolean notify_notification_close(NotifyNotification *notification,
|
||||||
GError **error);
|
GError **error);
|
||||||
|
|
||||||
gint notify_notification_get_closed_reason(
|
gint notify_notification_get_closed_reason(const NotifyNotification *notification);
|
||||||
const NotifyNotification *notification);
|
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
/**
|
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
|
||||||
|
*
|
||||||
* @file libnotify/notify.c Notifications library
|
* @file libnotify/notify.c Notifications library
|
||||||
*
|
*
|
||||||
* @Copyright (C) 2004-2006 Christian Hammond <chipx86@chipx86.com>
|
* @Copyright (C) 2004-2006 Christian Hammond <chipx86@chipx86.com>
|
||||||
|
@ -222,8 +223,10 @@ notify_get_server_caps(void)
|
||||||
* on failure.
|
* on failure.
|
||||||
*/
|
*/
|
||||||
gboolean
|
gboolean
|
||||||
notify_get_server_info(char **ret_name, char **ret_vendor,
|
notify_get_server_info(char **ret_name,
|
||||||
char **ret_version, char **ret_spec_version)
|
char **ret_vendor,
|
||||||
|
char **ret_version,
|
||||||
|
char **ret_spec_version)
|
||||||
{
|
{
|
||||||
GError *error = NULL;
|
GError *error = NULL;
|
||||||
DBusGProxy *proxy = _notify_get_g_proxy();
|
DBusGProxy *proxy = _notify_get_g_proxy();
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
/**
|
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
|
||||||
|
*
|
||||||
* @file libnotify/notify.h Notifications library
|
* @file libnotify/notify.h Notifications library
|
||||||
*
|
*
|
||||||
* @Copyright (C) 2004-2006 Christian Hammond
|
* @Copyright (C) 2004-2006 Christian Hammond
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
/**
|
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
|
||||||
|
*
|
||||||
* @file notify-send.c A tool for sending notifications.
|
* @file notify-send.c A tool for sending notifications.
|
||||||
*
|
*
|
||||||
* Copyright (C) 2004 Christian Hammond.
|
* Copyright (C) 2004 Christian Hammond.
|
||||||
|
@ -63,8 +64,10 @@ g_option_arg_urgency_cb(const gchar *option_name,
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
notify_notification_set_hint_variant(NotifyNotification *notification,
|
notify_notification_set_hint_variant(NotifyNotification *notification,
|
||||||
const gchar *type, const gchar *key,
|
const gchar *type,
|
||||||
const gchar *value, GError **error)
|
const gchar *key,
|
||||||
|
const gchar *value,
|
||||||
|
GError **error)
|
||||||
{
|
{
|
||||||
static gboolean conv_error = FALSE;
|
static gboolean conv_error = FALSE;
|
||||||
if (!strcasecmp(type, "string"))
|
if (!strcasecmp(type, "string"))
|
||||||
|
@ -105,7 +108,8 @@ notify_notification_set_hint_variant(NotifyNotification *notification,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
*error = g_error_new(G_OPTION_ERROR, G_OPTION_ERROR_BAD_VALUE,
|
*error = g_error_new(G_OPTION_ERROR,
|
||||||
|
G_OPTION_ERROR_BAD_VALUE,
|
||||||
N_("Invalid hint type \"%s\". Valid types "
|
N_("Invalid hint type \"%s\". Valid types "
|
||||||
"are int, double, string and byte."),
|
"are int, double, string and byte."),
|
||||||
type);
|
type);
|
||||||
|
@ -114,7 +118,8 @@ notify_notification_set_hint_variant(NotifyNotification *notification,
|
||||||
|
|
||||||
if (conv_error)
|
if (conv_error)
|
||||||
{
|
{
|
||||||
*error = g_error_new(G_OPTION_ERROR, G_OPTION_ERROR_BAD_VALUE,
|
*error = g_error_new(G_OPTION_ERROR,
|
||||||
|
G_OPTION_ERROR_BAD_VALUE,
|
||||||
N_("Value \"%s\" of hint \"%s\" could not be "
|
N_("Value \"%s\" of hint \"%s\" could not be "
|
||||||
"parsed as type \"%s\"."),
|
"parsed as type \"%s\"."),
|
||||||
value, key, type);
|
value, key, type);
|
||||||
|
@ -251,8 +256,7 @@ main(int argc, char *argv[])
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
retval = notify_notification_set_hint_variant(
|
retval = notify_notification_set_hint_variant(notify, tokens[0], tokens[1], tokens[2], &error);
|
||||||
notify, tokens[0], tokens[1], tokens[2], &error);
|
|
||||||
|
|
||||||
if (!retval)
|
if (!retval)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue