Don't initialize the library until we're ready to talk to it.

This commit is contained in:
Christian Hammond 2004-07-04 20:46:56 +00:00
parent b775f9946e
commit b7208624ca
1 changed files with 6 additions and 6 deletions

View File

@ -59,12 +59,6 @@ main(int argc, const char **argv)
POPT_TABLEEND
};
if (!notify_init("notify-send"))
{
fprintf(stderr, "Unable to initialize libnotify\n");
exit(1);
}
opt_ctx = poptGetContext("notify-send", argc, argv, options, 0);
poptSetOtherOptionHelp(opt_ctx, "[OPTIONS]* <summary> [description]");
@ -127,6 +121,12 @@ main(int argc, const char **argv)
}
}
if (!notify_init("notify-send"))
{
fprintf(stderr, "Unable to initialize libnotify\n");
exit(1);
}
notify_send_notification(urgency, summary, description, icon,
time(NULL) + timeout, timeout_time, NULL, 0);