diff --git a/ChangeLog b/ChangeLog index 3113e39..4db8ce3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Sat Sep 25 12:59:26 PDT 2004 Christian Hammond + + * libnotify/notify.c: + * tests/test-animation.c: + * tests/test-default-action.c: + - Fixed to compile. + Wed Sep 01 00:39:23 PDT 2004 Christian Hammond * docs/ChangeLog: diff --git a/libnotify/notify.c b/libnotify/notify.c index b1df772..08ef086 100644 --- a/libnotify/notify.c +++ b/libnotify/notify.c @@ -1,5 +1,5 @@ -/** -*- mode: c-mode; tab-width: 4; indent-tabs-mode: t; -*- - * +/* -*- mode: c-mode; tab-width: 4; indent-tabs-mode: t; -*- */ +/** * @file libnotify/notify.c Notifications library * * @Copyright (C) 2004 Christian Hammond diff --git a/tests/test-animation.c b/tests/test-animation.c index 75a669b..f42e709 100644 --- a/tests/test-animation.c +++ b/tests/test-animation.c @@ -35,17 +35,17 @@ int frames = 10; GdkPixbuf **generate_animation() { int i; - GdkPixbuf *file = gdk_pixbuf_new_from_file("applet-critical.png"); + GdkPixbuf *file = gdk_pixbuf_new_from_file("applet-critical.png", NULL); double alpha = 1.0; - GdkPixbuf **array = malloc(sizeof(GdkPixbuf *) * frames); - + GdkPixbuf **array = g_malloc(sizeof(GdkPixbuf *) * frames); + for (i = 0; i < frames; i++) { GdkPixbuf *buf = gdk_pixbuf_copy(file); alpha = sin(M_PI + ((M_PI / frames) * i)) + 1.0; - + gdk_pixbuf_composite(file, buf, 0, 0, gdk_pixbuf_get_width(buf), gdk_pixbuf_get_height(buf), @@ -54,17 +54,21 @@ GdkPixbuf **generate_animation() array[i] = buf; } + + return array; } -int main() { +int main() +{ + int i; notify_init("Animations"); - for (int i = 0; i < frames; i++) + for (i = 0; i < frames; i++) { - + } - + NotifyHandle *n = notify_send_notification(NULL, // replaces nothing NOTIFY_URGENCY_NORMAL, "Summary", "Content", diff --git a/tests/test-default-action.c b/tests/test-default-action.c index bba0ee5..b7e0030 100644 --- a/tests/test-default-action.c +++ b/tests/test-default-action.c @@ -30,9 +30,10 @@ #include #include #include +#include -GMainLoop *loop; -NotifyHandle *n; +static GMainLoop *loop; +static NotifyHandle *n; static void callback(NotifyHandle *handle, guint32 uid, void *user_data) { @@ -50,7 +51,7 @@ int main() { loop = g_main_loop_new(NULL, FALSE); dbus_connection_setup_with_g_main(conn, NULL); - + n = notify_send_notification(NULL, // replaces nothing NOTIFY_URGENCY_NORMAL, "Matt is online", NULL,