Index: src/mainwindow.cpp
===================================================================
--- src/mainwindow.cpp	(revision f1fb54b9f7060896ae686783ee1d8dcdce8d9409)
+++ src/mainwindow.cpp	(revision a2e64d518aded41a21b3157eb26413dc31f6cd04)
@@ -64,5 +64,5 @@
 	connect(spinCities,SIGNAL(valueChanged(int)),this,SLOT(spinCitiesValueChanged(int)));
 
-	if (settings->value("SavePos", false).toBool()) {
+	if (settings->value("SavePos", DEF_SAVEPOS).toBool()) {
 		// Loading of saved window state
 		settings->beginGroup("MainWindow");
@@ -129,9 +129,6 @@
 	filters.append(trUtf8("All Files") + " (*)");
 
-#ifdef Q_OS_WINCE
-	QString file = QFileDialog::getOpenFileName(this, trUtf8("Task Load"), QString(), filters.join(";;"), NULL, QFileDialog::DontUseNativeDialog);
-#else
-QString file = QFileDialog::getOpenFileName(this, trUtf8("Task Load"), QString(), filters.join(";;"));
-#endif // Q_OS_WINCE
+QFileDialog::Options opts = settings->value("UseNativeDialogs", DEF_USE_NATIVE_DIALOGS).toBool() ? QFileDialog::Options() : QFileDialog::DontUseNativeDialog;
+QString file = QFileDialog::getOpenFileName(this, trUtf8("Task Load"), QString(), filters.join(";;"), NULL, opts);
 	if (file.isEmpty() || !QFileInfo(file).isFile())
 		return;
@@ -188,9 +185,6 @@
 	filters.append(trUtf8("All Files") + " (*)");
 
-#ifdef Q_OS_WINCE
-QString file = QFileDialog::getSaveFileName(this, QString(), selectedFile, filters.join(";;"), NULL, QFileDialog::DontUseNativeDialog);
-#else
-QString file = QFileDialog::getSaveFileName(this, QString(), selectedFile, filters.join(";;"));
-#endif
+QFileDialog::Options opts = settings->value("UseNativeDialogs", DEF_USE_NATIVE_DIALOGS).toBool() ? QFileDialog::Options() : QFileDialog::DontUseNativeDialog;
+QString file = QFileDialog::getSaveFileName(this, QString(), selectedFile, filters.join(";;"), NULL, opts);
 	if (file.isEmpty())
 		return;
@@ -421,5 +415,5 @@
 			if (n != spinCities->value()) {
 				output.append("<p>" + trUtf8("Step #%1").arg(n++) + "</p>");
-				if (settings->value("Output/ShowMatrix", DEF_SHOW_MATRIX).toBool() && settings->value("Output/UseShowMatrixLimit", DEF_USE_SHOW_MATRIX_LIMIT).toBool() && (spinCities->value() <= settings->value("Output/ShowMatrixCitiesLimit", DEF_SHOW_MATRIX_CITY_LIMIT).toInt())) {
+				if (settings->value("Output/ShowMatrix", DEF_SHOW_MATRIX).toBool() && settings->value("Output/UseShowMatrixLimit", DEF_USE_SHOW_MATRIX_LIMIT).toBool() && (spinCities->value() <= settings->value("Output/ShowMatrixLimit", DEF_SHOW_MATRIX_LIMIT).toInt())) {
 					outputMatrix(*step, output);
 				}
@@ -481,5 +475,5 @@
 {
 	setWindowModified(true);
-	if (settings->value("Autosize",true).toBool()) {
+	if (settings->value("Autosize", DEF_AUTOSIZE).toBool()) {
 		for (int k = tl.row(); k <= br.row(); k++)
 			taskView->resizeRowToContents(k);
@@ -508,5 +502,5 @@
 int count = tspmodel->numCities();
 	tspmodel->setNumCities(n);
-	if ((n > count) && settings->value("Autosize",true).toBool())
+	if ((n > count) && settings->value("Autosize", DEF_AUTOSIZE).toBool())
 		for (int k = count; k < n; k++) {
 			taskView->resizeColumnToContents(k);
@@ -525,5 +519,5 @@
 
 	// Saving Main Window state
-	if (settings->value("SavePos", false).toBool()) {
+	if (settings->value("SavePos", DEF_SAVEPOS).toBool()) {
 		settings->beginGroup("MainWindow");
 #ifndef Q_OS_WINCE
@@ -730,9 +724,6 @@
 		file = QFileInfo(fileName).canonicalPath() + "/" + QFileInfo(fileName).completeBaseName() + ".tspt";
 
-#ifdef Q_OS_WINCE
-	file = QFileDialog::getSaveFileName(this, trUtf8("Task Save"), file, filters.join(";;"), NULL, QFileDialog::DontUseNativeDialog);
-#else
-	file = QFileDialog::getSaveFileName(this, trUtf8("Task Save"), file, filters.join(";;"));
-#endif // Q_OS_WINCE
+QFileDialog::Options opts = settings->value("UseNativeDialogs", DEF_USE_NATIVE_DIALOGS).toBool() ? QFileDialog::Options() : QFileDialog::DontUseNativeDialog;
+	file = QFileDialog::getSaveFileName(this, trUtf8("Task Save"), file, filters.join(";;"), NULL, opts);
 
 	if (file.isEmpty())
