Skip to content

Commit

Permalink
Init libnotify
Browse files Browse the repository at this point in the history
  • Loading branch information
epico committed Dec 13, 2024
1 parent a857787 commit d85ad74
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/PYMain.cc
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@
#include "PYTableDatabase.h"
#endif
#include "PYXMLUtil.h"
#ifdef ENABLE_LIBNOTIFY
#include <libnotify/notify.h>
#endif

using namespace PY;

Expand Down Expand Up @@ -263,6 +266,18 @@ main (gint argc, gchar **argv)
::signal (SIGINT, sigterm_cb);
atexit (atexit_cb);

#ifdef ENABLE_LIBNOTIFY
if (!notify_init("ibus-libpinyin")) {
g_error("notify_init failed");
exit(1);
}
#endif

start_component ();

#ifdef ENABLE_LIBNOTIFY
notify_uninit();
#endif

return 0;
}

0 comments on commit d85ad74

Please sign in to comment.