[Xfce4-commits] <exo:master> Bump glib to 2.30 and drop exo-gio-module.

Nick Schermer noreply at xfce.org
Sun Dec 2 21:48:01 CET 2012


Updating branch refs/heads/master
         to d92e4797d07001f9396f61b2fdb6f48ee8970171 (commit)
       from 802ffc2ff850d2aeebb5489fae1fd1b03505d965 (commit)

commit d92e4797d07001f9396f61b2fdb6f48ee8970171
Author: Nick Schermer <nick at xfce.org>
Date:   Sun Dec 2 21:44:58 2012 +0100

    Bump glib to 2.30 and drop exo-gio-module.

 Makefile.am                 |    1 -
 configure.ac.in             |   50 ++----------
 exo-gio-module/Makefile.am  |   50 -----------
 exo-gio-module/exo-module.c |  198 -------------------------------------------
 4 files changed, 6 insertions(+), 293 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 0ab3853..b03da0d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -2,7 +2,6 @@ SUBDIRS =								\
 	exo								\
 	exo-csource							\
 	exo-desktop-item-edit						\
-	exo-gio-module							\
 	exo-helper							\
 	exo-open							\
 	docs								\
diff --git a/configure.ac.in b/configure.ac.in
index a8292a3..7843ef4 100644
--- a/configure.ac.in
+++ b/configure.ac.in
@@ -157,41 +157,12 @@ XDT_I18N([@LINGUAS@], [exo-libexo_version_api()])
 dnl ***********************************
 dnl *** Check for required packages ***
 dnl ***********************************
-XDT_CHECK_PACKAGE([GLIB], [glib-2.0], [2.24.0])
-XDT_CHECK_PACKAGE([GIO], [gio-2.0], [2.24.0])
-XDT_CHECK_PACKAGE([GTK], [gtk+-2.0], [2.20.0])
-XDT_CHECK_PACKAGE([GTHREAD], [gthread-2.0], [2.24.0])
-XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0], [4.9.0])
-XDT_CHECK_PACKAGE([LIBXFCE4UI], [libxfce4ui-1], [4.9.0])
-
-dnl ***********************************************************
-dnl *** Check if we need to build the GIO module (optional) ***
-dnl ***********************************************************
-XDT_CHECK_OPTIONAL_PACKAGE([GIO_UNIX], [gio-unix-2.0], [2.18.0], [gio-unix], [GIO-Unix features], [yes])
-GIOMODULEDIR=""
-BUILD_GIOMODULE=""
-if test x"$GIO_UNIX_FOUND" = x"yes"; then
-  if $PKG_CONFIG "--atleast-version=2.27.0" "gio-unix-2.0" >/dev/null 2>&1; then
-    BUILD_GIOMODULE="no"
-  else
-    dnl A GIO version >= 2.18 and < 2.27 was found
-    BUILD_GIOMODULE="yes"
-
-    dnl GIO directory for extensions
-    AC_ARG_WITH([gio-module-dir],
-                [AC_HELP_STRING([--with-gio-module-dir=PATH],
-                                [Specify where to install the exo gio module (default=autodetect)])],
-                [gio_module_dir="$withval"])
-    if test x"$gio_module_dir" = x""; then
-      GIOMODULEDIR="`$PKG_CONFIG gio-2.0 --variable giomoduledir`"
-    elif test x"$gio_module_dir" != x"distcheck"; then
-      GIOMODULEDIR="$gio_module_dir"
-    fi
-  fi
-fi
-AC_SUBST([GIOMODULEDIR])
-AM_CONDITIONAL([HAVE_GIOMODULEDIR], [test x"$GIOMODULEDIR" != x""])
-AM_CONDITIONAL([BUILD_GIOMODULE], [test x"$BUILD_GIOMODULE" = x"yes"])
+XDT_CHECK_PACKAGE([GLIB], [glib-2.0], [2.30.0])
+XDT_CHECK_PACKAGE([GIO], [gio-2.0], [2.30.0])
+XDT_CHECK_PACKAGE([GTK], [gtk+-2.0], [2.24.0])
+XDT_CHECK_PACKAGE([GTHREAD], [gthread-2.0], [2.30.0])
+XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0], [4.10.0])
+XDT_CHECK_PACKAGE([LIBXFCE4UI], [libxfce4ui-1], [4.10.0])
 
 dnl *********************
 dnl *** Check for X11 ***
@@ -263,7 +234,6 @@ exo/exo-1.pc
 exo/exo-config.h
 exo-csource/Makefile
 exo-desktop-item-edit/Makefile
-exo-gio-module/Makefile
 exo-helper/Makefile
 exo-helper/helpers/Makefile
 exo-open/Makefile
@@ -282,14 +252,6 @@ dnl ***************************
 echo
 echo "Build Configuration:"
 echo
-if test x"$BUILD_GIOMODULE" = x"no"; then
-echo "* Build GIO module:     no (not needed after glib 2.27)"
-elif test x"$GIO_UNIX_FOUND" = x"yes"; then
-echo "* Build GIO module:     yes"
-echo "  - GIO Module Dir:     $GIOMODULEDIR"
-else
-echo "* Build GIO module:     no"
-fi
 echo "* Debug Support:        $enable_debug"
 echo "* GNU Visibility:       $have_gnuc_visibility"
 echo
diff --git a/exo-gio-module/Makefile.am b/exo-gio-module/Makefile.am
deleted file mode 100644
index b0a9946..0000000
--- a/exo-gio-module/Makefile.am
+++ /dev/null
@@ -1,50 +0,0 @@
-
-INCLUDES = 								\
-	-I$(top_srcdir)							\
-	-DG_LOG_DOMAIN=\"exo-gio-module\"				\
-	-DHELPERDIR=\"$(HELPER_PATH_PREFIX)/xfce4/exo-$(LIBEXO_VERSION_API)\"	\
-	-DPACKAGE_LOCALE_DIR=\"$(localedir)\"				\
-	-DLIBEXO_VERSION_API=\"$(LIBEXO_VERSION_API)\"
-
-if BUILD_GIOMODULE
-
-if HAVE_GIOMODULEDIR
-exomoduledir =								\
-	$(GIOMODULEDIR)
-else
-exomoduledir =								\
-	$(libdir)/gio/modules
-endif
-
-exomodule_LTLIBRARIES =							\
-	libexo-module-1.la
-
-libexo_module_1_la_SOURCES =						\
-	exo-module.c
-
-libexo_module_1_la_CFLAGS =						\
-	$(GIO_CFLAGS)							\
-	$(GIO_UNIX_CFLAGS) \
-	$(GTK_CFLAGS)							\
-	$(LIBXFCE4UTIL_CFLAGS)
-
-libexo_module_1_la_LDFLAGS =						\
-	-export_dynamic							\
-	-avoid-version							\
-	-module								\
-	-no-undefined							\
-	-export-symbols-regex '^g_io_module_(load|unload|query)'
-
-libexo_module_1_la_DEPENDENCIES =					\
-	$(top_builddir)/exo/libexo-$(LIBEXO_VERSION_API).la
-
-libexo_module_1_la_LIBADD =						\
-	$(GIO_LIBS)							\
-	$(GIO_UNIX_LIBS) \
-	$(GTK_LIBS)							\
-	$(LIBXFCE4UTIL_LIBS)						\
-	$(top_builddir)/exo/libexo-$(LIBEXO_VERSION_API).la
-
-endif
-
-# vi:set ts=8 sw=8 noet ai nocindent syntax=automake:
diff --git a/exo-gio-module/exo-module.c b/exo-gio-module/exo-module.c
deleted file mode 100644
index 638cf67..0000000
--- a/exo-gio-module/exo-module.c
+++ /dev/null
@@ -1,198 +0,0 @@
-/*
- * Copyright (c) 2009 Nick Schermer <nick at xfce.org>.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301 USA
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <exo/exo.h>
-#include <gio/gio.h>
-#include <gio/gdesktopappinfo.h>
-
-#define EXO_HELPER_LAUNCH HELPERDIR G_DIR_SEPARATOR_S "exo-helper-" LIBEXO_VERSION_API " --launch "
-
-
-
-
-#define EXO_TYPE_GIO_MODULE        (exo_gio_module_get_type ())
-#define EXO_GIO_MODULE(o)          (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_GIO_MODULE, ExoGioModule))
-#define EXO_GIO_MODULE_CLASS(k)    (G_TYPE_CHECK_CLASS_CAST ((k), G_TYPE_GIO_MODULE, ExoGioModuleClass))
-#define EXO_IS_GIO_MODULE(o)       (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_GIO_MODULE))
-#define EXO_IS_GIO_MODULE_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_GIO_MODULE))
-
-
-
-GType            exo_gio_module_get_type                   (void);
-static void      exo_gio_module_app_info_lookup_iface_init (GDesktopAppInfoLookupIface *iface);
-static GAppInfo *exo_gio_module_get_default_for_uri_scheme (GDesktopAppInfoLookup      *lookup,
-                                                            const gchar                *uri_scheme);
-
-
-
-typedef struct _ExoGioModuleClass ExoGioModuleClass;
-typedef struct _ExoGioModule      ExoGioModule;
-typedef struct _KnownSchemes      KnownSchemes;
-
-struct _ExoGioModuleClass
-{
-  GObjectClass __parent__;
-};
-
-struct _ExoGioModule
-{
-  GObject __parent__;
-};
-
-struct _KnownSchemes
-{
-  const gchar *pattern;
-  const gchar *category;
-  const gchar *app_name; /* name of the desktop files we use after gio 2.27 for thunar */
-};
-
-static KnownSchemes known_schemes[] =
-{
-  { "^(https?|ftps?|gopher)$", "WebBrowser",  "exo-web-browser" },
-  { "^mailto$",                "MailReader",  "exo-mail-reader" },
-  { "^(file|trash|ssh)$",      "FileManager", "exo-file-manager" }
-};
-
-
-
-#define _G_IMPLEMENT_INTERFACE_DYNAMIC(TYPE_IFACE, iface_init) \
-{ \
-  const GInterfaceInfo g_implement_interface_info = { \
-    (GInterfaceInitFunc) iface_init, NULL, NULL \
-  }; \
-  g_type_module_add_interface (type_module, g_define_type_id, \
-                               TYPE_IFACE, &g_implement_interface_info); \
-}
-
-
-
-G_DEFINE_DYNAMIC_TYPE_EXTENDED (ExoGioModule, exo_gio_module, G_TYPE_OBJECT, 0,
-    _G_IMPLEMENT_INTERFACE_DYNAMIC (G_TYPE_DESKTOP_APP_INFO_LOOKUP,
-                                    exo_gio_module_app_info_lookup_iface_init))
-
-
-
-static void
-exo_gio_module_class_init (ExoGioModuleClass *klass)
-{
-}
-
-
-
-static void
-exo_gio_module_init (ExoGioModule *module)
-{
-}
-
-
-
-static void
-exo_gio_module_class_finalize (ExoGioModuleClass *klass)
-{
-}
-
-
-
-static void
-exo_gio_module_app_info_lookup_iface_init (GDesktopAppInfoLookupIface *iface)
-{
-  iface->get_default_for_uri_scheme = exo_gio_module_get_default_for_uri_scheme;
-}
-
-
-
-static GAppInfo *
-exo_gio_module_get_default_for_uri_scheme (GDesktopAppInfoLookup *lookup,
-                                           const gchar           *uri_scheme)
-{
-  GAppInfo *info = NULL;
-  GError   *error = NULL;
-  gchar    *command;
-  gboolean  found;
-  guint     i;
-
-  /* do nothing when there is no scheme defined */
-  if (G_UNLIKELY (uri_scheme == NULL))
-    return NULL;
-
-  for (i = 0, found = FALSE; !found && i < G_N_ELEMENTS (known_schemes); i++)
-    {
-      /* see if the scheme matches */
-      found = g_regex_match_simple (known_schemes[i].pattern, uri_scheme, G_REGEX_CASELESS, 0);
-      if (found)
-        {
-          /* use the exo-helper directly here to avoid possible roundtrips with exo-open */
-          command = g_strconcat (EXO_HELPER_LAUNCH, known_schemes[i].category, NULL);
-          info = g_app_info_create_from_commandline (command, known_schemes[i].app_name, 
-                                                     G_APP_INFO_CREATE_SUPPORTS_URIS, &error);
-          if (G_UNLIKELY (info == NULL))
-            {
-              /* show error */
-              g_critical ("Failed to create GAppInfo from \"%s\" for URI-scheme \"%s\": %s.",
-                          command, uri_scheme, error->message);
-              g_error_free (error);
-            }
-
-          /* cleanup */
-          g_free (command);
-        }
-    }
-
-#ifndef NDEBUG
-  /* print debug message if scheme is not recognized by exo */
-  if (!found)
-    g_debug ("Unknown URI-scheme \"%s\".", uri_scheme);
-#endif
-
-  return info;
-}
-
-
-
-G_MODULE_EXPORT void
-g_io_module_load (GIOModule *module)
-{
-  exo_gio_module_register_type (G_TYPE_MODULE (module));
-  g_io_extension_point_implement (G_DESKTOP_APP_INFO_LOOKUP_EXTENSION_POINT_NAME,
-                                  EXO_TYPE_GIO_MODULE, "ExoGioModule", 15);
-}
-
-
-
-G_MODULE_EXPORT void
-g_io_module_unload (GIOModule *module)
-{
-}
-
-
-#if GLIB_CHECK_VERSION (2, 24, 0)
-G_MODULE_EXPORT gchar **
-g_io_module_query (void)
-{
-  gchar *eps[] = {
-    G_DESKTOP_APP_INFO_LOOKUP_EXTENSION_POINT_NAME,
-    NULL
-  };
-  return g_strdupv (eps);
-}
-#endif


More information about the Xfce4-commits mailing list