]> git.xonotic.org Git - xonotic/netradiant.git/commitdiff
Don't show a dialog for Gdk errors
authorMattia Basaglia <mattia.basaglia@gmail.com>
Tue, 28 Jul 2015 10:49:09 +0000 (12:49 +0200)
committerMattia Basaglia <mattia.basaglia@gmail.com>
Tue, 28 Jul 2015 10:49:09 +0000 (12:49 +0200)
radiant/main.cpp

index 78d10c892695ff434e3dfc096bb127d128be8554..aa0a1bfd88454146142f3068477566a9367c8f1d 100644 (file)
@@ -208,11 +208,15 @@ void error_redirect( const gchar *domain, GLogLevelFlags log_level, const gchar
        // spam it...
        globalErrorStream() << buf << "\n";
 
+       bool worth_showing = strcmp(domain,"Gdk") != 0;
+
        // FIXME why are warnings is_fatal?
 #ifndef _DEBUG
-       if ( is_fatal )
+       worth_showing = worth_showing && is_fatal;
 #endif
-       ERROR_MESSAGE( "GTK+ error: " << buf );
+
+       if ( worth_showing )
+               ERROR_MESSAGE( "GTK+ error: " << buf );
 }
 
 #if defined ( _DEBUG ) && defined ( WIN32 ) && defined ( _MSC_VER )