Revision: 6022
Author: iratqq
Date: Thu Oct 8 19:50:19 2009
Log: * uim/uim-notify.c (uim_notify_load, notify_get_plugins):
- Check environment variable 'UIM_DISABLE_NOTIFY'.
* scm/Makefile.am (UIM_DISABLE_NOTIFY):
- Disable notify.
uim-notify loads all notify plugins on uim_init() every time.
if existing old uim-notify module which is linking version bumped DSO
(libnotify, libX11, libc and so on) on installed path, uim-module-manager
will crash (it executes on build phase).
reported Gentoo BUG #284815
http://bugs.gentoo.org/show_bug.cgi?id=284815
http://code.google.com/p/uim/source/detail?r=6022
Modified:
/trunk/scm/Makefile.am
/trunk/uim/uim-notify.c
=======================================
--- /trunk/scm/Makefile.am Mon Aug 17 04:25:12 2009
+++ /trunk/scm/Makefile.am Thu Oct 8 19:50:19 2009
@@ -97,7 +97,8 @@
UIM_MODULE_MANAGER_ENV = \
LIBUIM_SYSTEM_SCM_FILES=$(abs_top_srcdir)/sigscheme/lib \
LIBUIM_SCM_FILES=$(abs_srcdir) \
- LIBUIM_PLUGIN_LIB_DIR=$(abs_top_builddir)/uim/.libs
+ LIBUIM_PLUGIN_LIB_DIR=$(abs_top_builddir)/uim/.libs \
+ UIM_DISABLE_NOTIFY=1
installed-modules.scm loader.scm: $(SCM_FILES)
$(MAKE) $(AM_MAKEFLAGS) -C $(top_builddir)/uim uim-module-manager && \
=======================================
--- /trunk/uim/uim-notify.c Tue Mar 24 20:03:02 2009
+++ /trunk/uim/uim-notify.c Thu Oct 8 19:50:19 2009
@@ -109,7 +109,7 @@
return UIM_FALSE;
}
- if (strcmp(agent->desc()->name, name) == 0) {
+ if (getenv("UIM_DISABLE_NOTIFY") != NULL || strcmp(agent->desc()->name,
name) == 0) {
return UIM_TRUE;
} else if (strcmp(name, "stderr") == 0) {
agent->quit();
@@ -238,6 +238,10 @@
MAKE_STR(desc->name),
MAKE_STR(desc->desc)),
uim_scm_null());
+
+ if (getenv("UIM_DISABLE_NOTIFY") != NULL)
+ return uim_scm_callf("reverse", "o", ret_);
+
dirp = opendir(NOTIFY_PLUGIN_PATH);
if (dirp) {
while ((dp = readdir(dirp)) != NULL) {