[vlc-commits] commit: Qt: warn when we cannot save the configuration ( Jean-Baptiste Kempf )

git at videolan.org git at videolan.org
Mon Aug 23 19:05:34 CEST 2010


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Mon Aug 23 18:58:47 2010 +0200| [30a0d8c1592f781f49c64f12f972e5ba67b0a5e1] | committer: Jean-Baptiste Kempf 

Qt: warn when we cannot save the configuration

Close #3944

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=30a0d8c1592f781f49c64f12f972e5ba67b0a5e1
---

 modules/gui/qt4/dialogs/preferences.cpp |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/modules/gui/qt4/dialogs/preferences.cpp b/modules/gui/qt4/dialogs/preferences.cpp
index 32b6704..2bfa9db 100644
--- a/modules/gui/qt4/dialogs/preferences.cpp
+++ b/modules/gui/qt4/dialogs/preferences.cpp
@@ -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();
 }
 



More information about the vlc-commits mailing list