]> de.git.xonotic.org Git - xonotic/netradiant.git/blobdiff - libs/gtkutil/filechooser.cpp
Suppress GTK warnings and errors
[xonotic/netradiant.git] / libs / gtkutil / filechooser.cpp
index 38b6636e59af8c0a84345381960b1d4dd843bdb3..2e7a921a11bf08431e86b8e09832e6fe5a461f5a 100644 (file)
@@ -271,9 +271,9 @@ const char* file_dialog( ui::Window parent, bool open, const char* title, const
                const char* file = file_dialog_show( parent, open, title, path, pattern, want_load, want_import, want_save );
 
                if ( open
-                        || file == 0
+                        || !file
                         || !file_exists( file )
-                        || parent.alert("The file specified already exists.\nDo you want to replace it?", title, ui::alert_type::NOYES, ui::alert_icon::Question ) == ui::alert_response::YES ) {
+                        || ui::alert(parent, "The file specified already exists.\nDo you want to replace it?", title, ui::alert_type::NOYES, ui::alert_icon::Question ) == ui::alert_response::YES ) {
                        return file;
                }
        }