diff --git a/ChangeLog b/ChangeLog index 9c11346..7a8d112 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Wed Aug 10 01:13:56 PDT 2005 Christian Hammond + + D tools/test-replace.c: + * tools/notify-send.c: + - Simplify notify-send a little, and nuke tools/test-replace. It + doesn't belong there. + Wed Aug 10 01:12:55 PDT 2005 Christian Hammond * NEWS: diff --git a/tools/notify-send.c b/tools/notify-send.c index 63a61ff..dd07be4 100644 --- a/tools/notify-send.c +++ b/tools/notify-send.c @@ -74,8 +74,7 @@ main(int argc, const char **argv) exit(1); } - if (args[0] != NULL) - summary = args[0]; + summary = args[0]; if (summary == NULL) { @@ -83,15 +82,12 @@ main(int argc, const char **argv) exit(1); } - if (args[1] != NULL) - { - body = args[1]; + body = args[1]; - if (args[2] != NULL) - { - poptPrintUsage(opt_ctx, stderr, 0); - exit(1); - } + if (body != NULL && args[2] != NULL) + { + poptPrintUsage(opt_ctx, stderr, 0); + exit(1); } if (icons != NULL) diff --git a/tools/test-replace.c b/tools/test-replace.c deleted file mode 100644 index feb624e..0000000 --- a/tools/test-replace.c +++ /dev/null @@ -1,28 +0,0 @@ -#include -#include -#include - -int main() { - notify_init("Replace Test"); - - NotifyHandle *n = notify_send_notification(NULL, // replaces nothing - NOTIFY_URGENCY_NORMAL, - "Summary", "Content", - NULL, // no icon - FALSE, 0, // does not expire - NULL, // no user data - 0); // no actions - - if (!n) { - fprintf(stderr, "failed to send notification\n"); - return 1; - } - - - sleep(3); - - notify_send_notification(n, NOTIFY_URGENCY_NORMAL, "Second Summary", "Second Content", - NULL, TRUE, time(NULL) + 5, NULL, 0); - - return 0; -}