Don't initialize the library until we're ready to talk to it.
This commit is contained in:
parent
b775f9946e
commit
b7208624ca
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue