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
|
||||
*
|
||||
* @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_remove_notification(NotifyNotification *n);
|
||||
gint _notify_notification_get_timeout(const NotifyNotification *n);
|
||||
gboolean _notify_notification_has_nondefault_actions(
|
||||
const NotifyNotification *n);
|
||||
gboolean _notify_notification_has_nondefault_actions(const NotifyNotification *n);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
|
|
@ -527,8 +527,10 @@ _idle_check_updates(void *user_data)
|
|||
* Returns: The new #NotifyNotification.
|
||||
*/
|
||||
NotifyNotification *
|
||||
notify_notification_new(const gchar *summary, const gchar *body,
|
||||
const gchar *icon, GtkWidget *attach)
|
||||
notify_notification_new(const gchar *summary,
|
||||
const gchar *body,
|
||||
const gchar *icon,
|
||||
GtkWidget *attach)
|
||||
{
|
||||
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
|
||||
notify_notification_update(NotifyNotification *notification,
|
||||
const gchar *summary, const gchar *body,
|
||||
const gchar *summary,
|
||||
const gchar *body,
|
||||
const gchar *icon)
|
||||
{
|
||||
g_return_val_if_fail(notification != NULL, FALSE);
|
||||
|
@ -730,7 +733,9 @@ notify_notification_set_geometry_hints(NotifyNotification *notification,
|
|||
}
|
||||
|
||||
static void
|
||||
_close_signal_handler(DBusGProxy *proxy, guint32 id, guint32 reason,
|
||||
_close_signal_handler(DBusGProxy *proxy,
|
||||
guint32 id,
|
||||
guint32 reason,
|
||||
NotifyNotification *notification)
|
||||
{
|
||||
if (id == notification->priv->id)
|
||||
|
@ -744,7 +749,9 @@ _close_signal_handler(DBusGProxy *proxy, guint32 id, guint32 reason,
|
|||
}
|
||||
|
||||
static void
|
||||
_action_signal_handler(DBusGProxy *proxy, guint32 id, gchar *action,
|
||||
_action_signal_handler(DBusGProxy *proxy,
|
||||
guint32 id,
|
||||
gchar *action,
|
||||
NotifyNotification *notification)
|
||||
{
|
||||
CallbackPair *pair;
|
||||
|
@ -793,7 +800,8 @@ _gslist_to_string_array(GSList *list)
|
|||
* @error.
|
||||
*/
|
||||
gboolean
|
||||
notify_notification_show(NotifyNotification *notification, GError **error)
|
||||
notify_notification_show(NotifyNotification *notification,
|
||||
GError **error)
|
||||
{
|
||||
NotifyNotificationPrivate *priv;
|
||||
GError *tmp_error = NULL;
|
||||
|
@ -1028,7 +1036,8 @@ notify_notification_set_icon_from_pixbuf(NotifyNotification *notification,
|
|||
*/
|
||||
void
|
||||
notify_notification_set_hint_int32(NotifyNotification *notification,
|
||||
const gchar *key, gint value)
|
||||
const gchar *key,
|
||||
gint value)
|
||||
{
|
||||
GValue *hint_value;
|
||||
|
||||
|
@ -1054,7 +1063,8 @@ notify_notification_set_hint_int32(NotifyNotification *notification,
|
|||
*/
|
||||
void
|
||||
notify_notification_set_hint_uint32(NotifyNotification *notification,
|
||||
const gchar *key, guint value)
|
||||
const gchar *key,
|
||||
guint value)
|
||||
{
|
||||
GValue *hint_value;
|
||||
|
||||
|
@ -1079,7 +1089,8 @@ notify_notification_set_hint_uint32(NotifyNotification *notification,
|
|||
*/
|
||||
void
|
||||
notify_notification_set_hint_double(NotifyNotification *notification,
|
||||
const gchar *key, gdouble value)
|
||||
const gchar *key,
|
||||
gdouble value)
|
||||
{
|
||||
GValue *hint_value;
|
||||
|
||||
|
@ -1104,7 +1115,8 @@ notify_notification_set_hint_double(NotifyNotification *notification,
|
|||
*/
|
||||
void
|
||||
notify_notification_set_hint_byte(NotifyNotification *notification,
|
||||
const gchar *key, guchar value)
|
||||
const gchar *key,
|
||||
guchar value)
|
||||
{
|
||||
GValue *hint_value;
|
||||
|
||||
|
@ -1132,7 +1144,8 @@ notify_notification_set_hint_byte(NotifyNotification *notification,
|
|||
void
|
||||
notify_notification_set_hint_byte_array(NotifyNotification *notification,
|
||||
const gchar *key,
|
||||
const guchar *value, gsize len)
|
||||
const guchar *value,
|
||||
gsize len)
|
||||
{
|
||||
GValue *hint_value;
|
||||
GArray *byte_array;
|
||||
|
@ -1165,7 +1178,8 @@ notify_notification_set_hint_byte_array(NotifyNotification *notification,
|
|||
*/
|
||||
void
|
||||
notify_notification_set_hint_string(NotifyNotification *notification,
|
||||
const gchar *key, const gchar *value)
|
||||
const gchar *key,
|
||||
const gchar *value)
|
||||
{
|
||||
GValue *hint_value;
|
||||
|
||||
|
@ -1246,7 +1260,8 @@ notify_notification_add_action(NotifyNotification *notification,
|
|||
const char *action,
|
||||
const char *label,
|
||||
NotifyActionCallback callback,
|
||||
gpointer user_data, GFreeFunc free_func)
|
||||
gpointer user_data,
|
||||
GFreeFunc free_func)
|
||||
{
|
||||
NotifyNotificationPrivate *priv;
|
||||
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
|
||||
*
|
||||
* @Copyright (C) 2006 Christian Hammond
|
||||
|
@ -128,37 +129,43 @@ void notify_notification_set_icon_from_pixbuf(NotifyNotification *notification,
|
|||
GdkPixbuf *icon);
|
||||
|
||||
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,
|
||||
const gchar *key, guint value);
|
||||
const gchar *key,
|
||||
guint value);
|
||||
|
||||
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,
|
||||
const gchar *key,
|
||||
const gchar *value);
|
||||
|
||||
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,
|
||||
const gchar *key,
|
||||
const guchar *value, gsize len);
|
||||
const guchar *value,
|
||||
gsize len);
|
||||
|
||||
void notify_notification_clear_hints(NotifyNotification *notification);
|
||||
|
||||
void notify_notification_add_action(NotifyNotification *notification,
|
||||
const char *action, const char *label,
|
||||
const char *action,
|
||||
const char *label,
|
||||
NotifyActionCallback callback,
|
||||
gpointer user_data, GFreeFunc free_func);
|
||||
gpointer user_data,
|
||||
GFreeFunc free_func);
|
||||
|
||||
void notify_notification_clear_actions(NotifyNotification *notification);
|
||||
gboolean notify_notification_close(NotifyNotification *notification,
|
||||
GError **error);
|
||||
|
||||
gint notify_notification_get_closed_reason(
|
||||
const NotifyNotification *notification);
|
||||
gint notify_notification_get_closed_reason(const NotifyNotification *notification);
|
||||
|
||||
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
|
||||
*
|
||||
* @Copyright (C) 2004-2006 Christian Hammond <chipx86@chipx86.com>
|
||||
|
@ -222,8 +223,10 @@ notify_get_server_caps(void)
|
|||
* on failure.
|
||||
*/
|
||||
gboolean
|
||||
notify_get_server_info(char **ret_name, char **ret_vendor,
|
||||
char **ret_version, char **ret_spec_version)
|
||||
notify_get_server_info(char **ret_name,
|
||||
char **ret_vendor,
|
||||
char **ret_version,
|
||||
char **ret_spec_version)
|
||||
{
|
||||
GError *error = NULL;
|
||||
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
|
||||
*
|
||||
* @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.
|
||||
*
|
||||
* Copyright (C) 2004 Christian Hammond.
|
||||
|
@ -63,8 +64,10 @@ g_option_arg_urgency_cb(const gchar *option_name,
|
|||
|
||||
static gboolean
|
||||
notify_notification_set_hint_variant(NotifyNotification *notification,
|
||||
const gchar *type, const gchar *key,
|
||||
const gchar *value, GError **error)
|
||||
const gchar *type,
|
||||
const gchar *key,
|
||||
const gchar *value,
|
||||
GError **error)
|
||||
{
|
||||
static gboolean conv_error = FALSE;
|
||||
if (!strcasecmp(type, "string"))
|
||||
|
@ -105,7 +108,8 @@ notify_notification_set_hint_variant(NotifyNotification *notification,
|
|||
}
|
||||
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 "
|
||||
"are int, double, string and byte."),
|
||||
type);
|
||||
|
@ -114,7 +118,8 @@ notify_notification_set_hint_variant(NotifyNotification *notification,
|
|||
|
||||
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 "
|
||||
"parsed as type \"%s\"."),
|
||||
value, key, type);
|
||||
|
@ -251,8 +256,7 @@ main(int argc, char *argv[])
|
|||
}
|
||||
else
|
||||
{
|
||||
retval = notify_notification_set_hint_variant(
|
||||
notify, tokens[0], tokens[1], tokens[2], &error);
|
||||
retval = notify_notification_set_hint_variant(notify, tokens[0], tokens[1], tokens[2], &error);
|
||||
|
||||
if (!retval)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue