Add support for loading gtk2-only modules
Introduce GTK2_MODULES environment variable for modules that don't work in gtk3. The list of modules is now $GTK2_MODULES:$GTK_MODULES. https://bugzilla.gnome.org/show_bug.cgi?id=743917
This commit is contained in:
committed by
Lars Uebernickel
parent
e48ae6f85b
commit
436fe38cae
@@ -36,7 +36,7 @@ some additional commandline options.
|
||||
|
||||
<para>
|
||||
A list of modules to load in addition to those specified in the
|
||||
<envar>GTK_MODULES</envar> environment variable and the
|
||||
<envar>GTK2_MODULES</envar> environment variable and the
|
||||
<literal>gtk-modules</literal> setting.
|
||||
</para>
|
||||
</formalpara>
|
||||
@@ -196,14 +196,24 @@ additional environment variables.
|
||||
</formalpara>
|
||||
|
||||
<formalpara>
|
||||
<title><envar>GTK_MODULES</envar></title>
|
||||
<title><envar>GTK2_MODULES</envar></title>
|
||||
|
||||
<para>
|
||||
A list of modules to load. Note that GTK+ also allows to specify modules to load via a commandline option (<option>--gtk-module</option>) and with the <literal>gtk-modules</literal> setting.
|
||||
</para>
|
||||
</formalpara>
|
||||
|
||||
<formalpara>
|
||||
<title><envar>GTK_MODULES</envar></title>
|
||||
|
||||
<para>
|
||||
A list of modules to load in addition to the ones in the <envar>GTK_MODULES</envar> variable.
|
||||
</para>
|
||||
<warning>
|
||||
Note that this environment variable is read by GTK+ 3 too,
|
||||
which may not have the same set of modules available for loading.
|
||||
Use <envar>GTK2_MODULES</envar> for modules that are only compatible
|
||||
with GTK+ 2.
|
||||
</warning>
|
||||
</formalpara>
|
||||
|
||||
|
||||
@@ -690,9 +690,20 @@ do_pre_parse_initialization (int *argc,
|
||||
}
|
||||
#endif /* G_ENABLE_DEBUG */
|
||||
|
||||
env_string = g_getenv ("GTK_MODULES");
|
||||
env_string = g_getenv ("GTK2_MODULES");
|
||||
if (env_string)
|
||||
gtk_modules_string = g_string_new (env_string);
|
||||
|
||||
env_string = g_getenv ("GTK_MODULES");
|
||||
if (env_string)
|
||||
{
|
||||
if (gtk_modules_string)
|
||||
g_string_append_c (gtk_modules_string, G_SEARCHPATH_SEPARATOR);
|
||||
else
|
||||
gtk_modules_string = g_string_new (NULL);
|
||||
|
||||
g_string_append (gtk_modules_string, env_string);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
Reference in New Issue
Block a user