1
/*******************************************************************************
2
**3456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789
3
** 10 20 30 40 50 60 70 80
6
** Example of how to use libnotify correctly and at the same time comply to
7
** the new jaunty notification spec (read: visual guidelines)
10
** gcc -O0 -ggdb -Wall -Werror `pkg-config --cflags --libs libnotify \
11
** glib-2.0` summary-body.c example-util.c -o summary-body
13
** Copyright 2009 Canonical Ltd.
16
** Mirco "MacSlow" Mueller <mirco.mueller@canonical.com>
18
** This program is free software: you can redistribute it and/or modify it
19
** under the terms of the GNU General Public License version 3, as published
20
** by the Free Software Foundation.
22
** This program is distributed in the hope that it will be useful, but
23
** WITHOUT ANY WARRANTY; without even the implied warranties of
24
** MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
25
** PURPOSE. See the GNU General Public License for more details.
27
** You should have received a copy of the GNU General Public License along
28
** with this program. If not, see <http://www.gnu.org/licenses/>.
30
*******************************************************************************/
32
#include "example-util.h"
38
NotifyNotification* notification;
42
if (!notify_init ("summary-body"))
45
/* call this so we can savely use has_cap(CAP_SOMETHING) later */
48
/* show what's supported */
51
/* try the summary-body case */
52
notification = notify_notification_new (
54
"This is a superfluous notification",
57
success = notify_notification_show (notification, &error);
60
g_print ("That did not work ... \"%s\".\n", error->message);
64
g_signal_connect (G_OBJECT (notification),
66
G_CALLBACK (closed_handler),