gnucash unstable: Remove X11 error handler
John Ralls
jralls at code.gnucash.org
Tue Oct 31 11:53:36 EDT 2017
Updated via https://github.com/Gnucash/gnucash/commit/49c70795 (commit)
from https://github.com/Gnucash/gnucash/commit/f05761e6 (commit)
commit 49c70795c39bf75c1999b45d0883fdaf076e1202
Author: John Ralls <jralls at ceridwen.us>
Date: Mon Oct 30 10:08:07 2017 -0700
Remove X11 error handler
And with it the only direct X11 dependency.
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b12c00f..8704645 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -581,10 +581,6 @@ ENDIF ()
SET (HAVE_HTMLHELPW 1)
ENDIF (WIN32)
-IF (NOT WIN32)
-CHECK_INCLUDE_FILES (X11/Xlib.h HAVE_X11_XLIB_H)
-ENDIF (NOT WIN32)
-
CHECK_INCLUDE_FILES (dirent.h HAVE_DIRENT_H)
CHECK_INCLUDE_FILES (dlfcn.h HAVE_DLFCN_H)
CHECK_INCLUDE_FILES (glob.h HAVE_GLOB_H)
diff --git a/common/config.h.cmake.in b/common/config.h.cmake.in
index 34e7e9c..200b129 100644
--- a/common/config.h.cmake.in
+++ b/common/config.h.cmake.in
@@ -264,9 +264,6 @@
/* Define to 1 if you have the <wctype.h> header file. */
#cmakedefine HAVE_WCTYPE_H 1
-/* Define to 1 if you have the <X11/Xlib.h> header file. */
-#cmakedefine HAVE_X11_XLIB_H 1
-
/* Define to 1 if you have the file `/usr/include/gmock/gmock.h'. */
#cmakedefine HAVE__USR_INCLUDE_GMOCK_GMOCK_H
diff --git a/configure.ac b/configure.ac
index b786758..c77e51b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -486,15 +486,10 @@ AM_CONDITIONAL(PLATFORM_OSX_QUARTZ, test "x$platform" = "xdarwin/quartz")
AM_CONDITIONAL(PLATFORM_WIN32, test "x$platform" = "xwin32")
AM_CONDITIONAL(OS_WIN32, test "x$native_win32" = "xyes")
-# These are unavailable on windows/mingw32 and X11 isn't desired or
+# These are unavailable on windows/mingw32
# required for MacOSX Quartz
-if test "x$_gdk_tgt" = xquartz;
-then
- AC_CHECK_HEADERS(glob.h)
-else
- AC_CHECK_HEADERS(X11/Xlib.h glob.h)
-fi
-AM_CONDITIONAL(HAVE_X11_XLIB_H, test "x$ac_cv_header_X11_Xlib_h" = "xyes")
+AC_CHECK_HEADERS(glob.h)
+
AC_CHECK_FUNCS(chown gethostname getppid getuid gettimeofday gmtime_r)
AC_CHECK_FUNCS(gethostid link)
##################################################
diff --git a/gnucash/gnome-utils/Makefile.am b/gnucash/gnome-utils/Makefile.am
index c2ea84f..4cfba43 100644
--- a/gnucash/gnome-utils/Makefile.am
+++ b/gnucash/gnome-utils/Makefile.am
@@ -217,10 +217,6 @@ gnc-warnings.c: gschemas/org.gnucash.warnings.gschema.xml.in make-gnc-warnings-c
gnc-warnings.h: gschemas/org.gnucash.warnings.gschema.xml.in make-gnc-warnings-h.xsl
$(XSLTPROC) -o $@ $(srcdir)/make-gnc-warnings-h.xsl $<
-if HAVE_X11_XLIB_H
- libgncmod_gnome_utils_la_LIBADD += -lX11
-endif
-
if BUILDING_FROM_VCS
swig-gnome-utils.c: gnome-utils.i \
${top_srcdir}/common/base-typemaps.i
diff --git a/gnucash/gnome-utils/gnc-gnome-utils.c b/gnucash/gnome-utils/gnc-gnome-utils.c
index 8f931f3..85a934b 100644
--- a/gnucash/gnome-utils/gnc-gnome-utils.c
+++ b/gnucash/gnome-utils/gnc-gnome-utils.c
@@ -24,9 +24,6 @@
#include <config.h>
#include <glib/gi18n.h>
-#ifdef HAVE_X11_XLIB_H
-# include <X11/Xlib.h>
-#endif
#include <libxml/xmlIO.h>
#include "gnc-prefs-utils.h"
@@ -640,28 +637,6 @@ gnc_ui_check_events (gpointer not_used)
return TRUE;
}
-#ifdef HAVE_X11_XLIB_H
-static int
-gnc_x_error (Display *display, XErrorEvent *error)
-{
- if (error->error_code)
- {
- char buf[64];
-
- XGetErrorText (display, error->error_code, buf, 63);
-
- g_warning ("X-ERROR **: %s\n serial %ld error_code %d "
- "request_code %d minor_code %d\n",
- buf,
- error->serial,
- error->error_code,
- error->request_code,
- error->minor_code);
- }
-
- return 0;
-}
-#endif
int
gnc_ui_start_event_loop (void)
@@ -673,10 +648,6 @@ gnc_ui_start_event_loop (void)
id = g_timeout_add_full (G_PRIORITY_DEFAULT_IDLE, 10000, /* 10 secs */
gnc_ui_check_events, NULL, NULL);
-#ifdef HAVE_X11_XLIB_H
- XSetErrorHandler (gnc_x_error);
-#endif
-
/* Enter gnome event loop */
gtk_main ();
Summary of changes:
CMakeLists.txt | 4 ----
common/config.h.cmake.in | 3 ---
configure.ac | 11 +++--------
gnucash/gnome-utils/Makefile.am | 4 ----
gnucash/gnome-utils/gnc-gnome-utils.c | 29 -----------------------------
5 files changed, 3 insertions(+), 48 deletions(-)
More information about the gnucash-changes
mailing list