Merge branch 'gtk_dbg_interactive_gtk3_backport' into 'gtk-3-24'
Allow GTK_DEBUG=interactive even without G_ENABLE_DEBUG defined See merge request GNOME/gtk!3090
This commit is contained in:
@ -134,9 +134,9 @@ additional environment variables.
|
|||||||
<title><envar>GTK_DEBUG</envar></title>
|
<title><envar>GTK_DEBUG</envar></title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Unless GTK+ has been configured with <option>--enable-debug=no</option>,
|
This variable can be set to a list of debug options, which cause GTK to
|
||||||
this variable can be set to a list of debug options, which cause GTK+
|
print out different types of debugging information. Some of these options
|
||||||
to print out different types of debugging information.
|
are only available when GTK has been configured with <option>--enable-debug=yes</option>.
|
||||||
<variablelist>
|
<variablelist>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>actions</term>
|
<term>actions</term>
|
||||||
|
|||||||
@ -167,7 +167,6 @@ typedef struct {
|
|||||||
|
|
||||||
DisplayDebugFlags debug_flags[N_DEBUG_DISPLAYS];
|
DisplayDebugFlags debug_flags[N_DEBUG_DISPLAYS];
|
||||||
|
|
||||||
#ifdef G_ENABLE_DEBUG
|
|
||||||
static const GDebugKey gtk_debug_keys[] = {
|
static const GDebugKey gtk_debug_keys[] = {
|
||||||
{ "misc", GTK_DEBUG_MISC },
|
{ "misc", GTK_DEBUG_MISC },
|
||||||
{ "plugsocket", GTK_DEBUG_PLUGSOCKET },
|
{ "plugsocket", GTK_DEBUG_PLUGSOCKET },
|
||||||
@ -192,7 +191,6 @@ static const GDebugKey gtk_debug_keys[] = {
|
|||||||
{ "resize", GTK_DEBUG_RESIZE },
|
{ "resize", GTK_DEBUG_RESIZE },
|
||||||
{ "layout", GTK_DEBUG_LAYOUT }
|
{ "layout", GTK_DEBUG_LAYOUT }
|
||||||
};
|
};
|
||||||
#endif /* G_ENABLE_DEBUG */
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* gtk_get_major_version:
|
* gtk_get_major_version:
|
||||||
@ -660,12 +658,15 @@ do_pre_parse_initialization (int *argc,
|
|||||||
env_string = g_getenv ("GTK_DEBUG");
|
env_string = g_getenv ("GTK_DEBUG");
|
||||||
if (env_string != NULL)
|
if (env_string != NULL)
|
||||||
{
|
{
|
||||||
#ifdef G_ENABLE_DEBUG
|
|
||||||
debug_flags[0].flags = g_parse_debug_string (env_string,
|
debug_flags[0].flags = g_parse_debug_string (env_string,
|
||||||
gtk_debug_keys,
|
gtk_debug_keys,
|
||||||
G_N_ELEMENTS (gtk_debug_keys));
|
G_N_ELEMENTS (gtk_debug_keys));
|
||||||
#else
|
#ifndef G_ENABLE_DEBUG
|
||||||
|
/* No need to print the warning for "interactive" since it's kept anyway. */
|
||||||
|
if (debug_flags[0].flags != GTK_DEBUG_INTERACTIVE)
|
||||||
g_warning ("GTK_DEBUG set but ignored because gtk isn't built with G_ENABLE_DEBUG");
|
g_warning ("GTK_DEBUG set but ignored because gtk isn't built with G_ENABLE_DEBUG");
|
||||||
|
/* Only keep "interactive" if not with G_ENABLE_DEBUG. */
|
||||||
|
debug_flags[0].flags &= GTK_DEBUG_INTERACTIVE;
|
||||||
#endif /* G_ENABLE_DEBUG */
|
#endif /* G_ENABLE_DEBUG */
|
||||||
env_string = NULL;
|
env_string = NULL;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user