]> git.sesse.net Git - vlc/commitdiff
Qt: warn when we cannot save the configuration
authorJean-Baptiste Kempf <jb@videolan.org>
Mon, 23 Aug 2010 16:58:47 +0000 (18:58 +0200)
committerJean-Baptiste Kempf <jb@videolan.org>
Mon, 23 Aug 2010 16:58:47 +0000 (18:58 +0200)
Close #3944

modules/gui/qt4/dialogs/preferences.cpp

index 32b6704fbbc81e95be1f8779d2e10fd62bef26fb..2bfa9db793a3488580724f2b5ef0fa7256551e67 100644 (file)
@@ -28,6 +28,7 @@
 
 #include "dialogs/preferences.hpp"
 #include "util/qvlcframe.hpp"
+#include "dialogs/errors.hpp"
 
 #include "components/complete_preferences.hpp"
 #include "components/simple_preferences.hpp"
@@ -294,7 +295,11 @@ void PrefsDialog::save()
     }
 
     /* Save to file */
-    config_SaveConfigFile( p_intf, NULL );
+    if( config_SaveConfigFile( p_intf, NULL ) != 0 )
+    {
+        ErrorsDialog::getInstance (p_intf)->addError( qtr( "Cannot save Configuration" ),
+            qtr("Preferences file could not be saved") );
+    }
     accept();
 }