diff options
| author | Peng Wu <alexepico@gmail.com> | 2024-12-13 10:25:21 +0800 |
|---|---|---|
| committer | Peng Wu <alexepico@gmail.com> | 2024-12-13 10:27:45 +0800 |
| commit | d85ad74524cbbc5260d4e2fd5745d01eaceed771 (patch) | |
| tree | b3f460138ca506309da0b69da998352081327c97 /src | |
| parent | a857787b938a3bdd96776b7fc71223c2f18c0f89 (diff) | |
| download | ibus-libpinyin-d85ad74524cbbc5260d4e2fd5745d01eaceed771.tar.gz ibus-libpinyin-d85ad74524cbbc5260d4e2fd5745d01eaceed771.tar.xz ibus-libpinyin-d85ad74524cbbc5260d4e2fd5745d01eaceed771.zip | |
Init libnotify
Diffstat (limited to 'src')
| -rw-r--r-- | src/PYMain.cc | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/PYMain.cc b/src/PYMain.cc index 5b1dfbf..7a2e204 100644 --- a/src/PYMain.cc +++ b/src/PYMain.cc @@ -38,6 +38,9 @@ #include "PYTableDatabase.h" #endif #include "PYXMLUtil.h" +#ifdef ENABLE_LIBNOTIFY +#include <libnotify/notify.h> +#endif using namespace PY; @@ -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; } |
