_moo_set_debug()

This commit is contained in:
Yevgen Muntyan 2008-02-02 17:33:58 -06:00
parent b13f4b248e
commit f20b29ed74

View File

@ -981,7 +981,7 @@ moo_segfault (void)
*/
void
_moo_selection_data_set_pointer (GtkSelectionData *data,
moo_selection_data_set_pointer (GtkSelectionData *data,
GdkAtom type,
gpointer ptr)
{
@ -992,7 +992,7 @@ _moo_selection_data_set_pointer (GtkSelectionData *data,
gpointer
_moo_selection_data_get_pointer (GtkSelectionData *data,
moo_selection_data_get_pointer (GtkSelectionData *data,
GdkAtom type)
{
GdkWindow *owner;
@ -1168,7 +1168,7 @@ moo_tempnam (void)
dirname = g_build_filename (g_get_tmp_dir (), basename, NULL);
g_free (basename);
if (_moo_mkdir (dirname))
if (_moo_mkdir (dirname) != 0)
{
g_free (dirname);
dirname = NULL;
@ -2078,9 +2078,9 @@ moo_enable_win32_error_message (void)
#if 0
#undef _moo_str_equal
#undef moo_str_equal
gboolean
_moo_str_equal (const char *s1,
moo_str_equal (const char *s1,
const char *s2)
{
return !strcmp (s1 ? s1 : "", s2 ? s2 : "");
@ -2121,7 +2121,7 @@ thread_source_func (gpointer data)
}
guint
_moo_idle_add_full (gint priority,
moo_idle_add_full (gint priority,
GSourceFunc function,
gpointer data,
GDestroyNotify notify)
@ -2142,7 +2142,7 @@ guint
moo_idle_add (GSourceFunc function,
gpointer data)
{
return _moo_idle_add_full (G_PRIORITY_DEFAULT_IDLE,
return moo_idle_add_full (G_PRIORITY_DEFAULT_IDLE,
function, data, NULL);
}
@ -2257,6 +2257,15 @@ _moo_intern_string (const char *string)
}
static char *debug_domains;
void
_moo_set_debug (const char *domains)
{
g_free (debug_domains);
debug_domains = g_strdup (domains);
}
gboolean
moo_debug_enabled (const char *domain,
gboolean def_enabled)
@ -2264,6 +2273,8 @@ moo_debug_enabled (const char *domain,
const char *val;
val = g_getenv ("MOO_DEBUG");
if (!val || !val[0])
val = debug_domains;
if (!val || !val[0])
return def_enabled;