glib r6768 - in trunk: docs/reference docs/reference/gio gio
- From: awalton svn gnome org
- To: svn-commits-list gnome org
- Subject: glib r6768 - in trunk: docs/reference docs/reference/gio gio
- Date: Fri, 28 Mar 2008 14:31:09 +0000 (GMT)
Author: awalton
Date: Fri Mar 28 14:31:09 2008
New Revision: 6768
URL: http://svn.gnome.org/viewvc/glib?rev=6768&view=rev
Log:
2008-03-28 A. Walton <awalton svn gnome org>
* giomodule.c (_g_io_modules_ensure_loaded):
Adds GIO_EXTRA_MODULES environment variable support, closing bug
#523039.
Modified:
trunk/docs/reference/ChangeLog
trunk/docs/reference/gio/overview.xml
trunk/gio/ChangeLog
trunk/gio/giomodule.c
Modified: trunk/docs/reference/gio/overview.xml
==============================================================================
--- trunk/docs/reference/gio/overview.xml (original)
+++ trunk/docs/reference/gio/overview.xml Fri Mar 28 14:31:09 2008
@@ -185,7 +185,7 @@
<para>
This variable can be set to the name of a #GDesktopAppInfoLookup
- implementation to override the dfeault for debugging purposes.
+ implementation to override the default for debugging purposes.
GIO does not include a #GDesktopAppInfoLookup implementation,
the GConf-based implementation in the gvfs module has the name
"gconf".
@@ -203,6 +203,16 @@
</para>
</formalpara>
+ <formalpara>
+ <title><envar>GIO_EXTRA_MODULES</envar></title>
+
+ <para>
+ When this environment variable is set to a path, or a set of
+ paths separated by a colon, GIO will attempt to load
+ modules from within the path.
+ </para>
+ </formalpara>
+
</chapter>
<chapter id="gio-extension-points">
Modified: trunk/gio/giomodule.c
==============================================================================
--- trunk/gio/giomodule.c (original)
+++ trunk/gio/giomodule.c Fri Mar 28 14:31:09 2008
@@ -300,6 +300,7 @@
GList *modules, *l;
static gboolean loaded_dirs = FALSE;
GIOExtensionPoint *ep;
+ const char *module_path;
G_LOCK (loaded_dirs);
@@ -329,6 +330,23 @@
modules = g_io_modules_load_all_in_directory (GIO_MODULE_DIR);
+ module_path = g_getenv ("GIO_EXTRA_MODULES");
+
+ if (module_path)
+ {
+ int i = 0;
+ gchar **paths;
+ paths = g_strsplit (module_path, ":", 0);
+
+ while (paths[i] != NULL)
+ {
+ modules = g_list_prepend (modules, g_io_modules_load_all_in_directory (paths[i]));
+ i++;
+ }
+
+ g_strfreev (paths);
+ }
+
/* Initialize types from built-in "modules" */
#if defined(HAVE_SYS_INOTIFY_H) || defined(HAVE_LINUX_INOTIFY_H)
_g_inotify_directory_monitor_get_type ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]