Index: trunk/src/globals.h
===================================================================
--- trunk/src/globals.h	(revision 81)
+++ trunk/src/globals.h	(revision 82)
@@ -46,13 +46,26 @@
 //! Default number of cities
 #define DEF_NUM_CITIES 5
-//! Default value for generating fractional random values
+/*!
+ * \def DEF_USE_NATIVE_DIALOGS
+ * \brief Default for "Use native file dialog".
+ */
+#ifdef Q_OS_WINCE
+	#define DEF_USE_NATIVE_DIALOGS false
+#else
+	#define DEF_USE_NATIVE_DIALOGS true
+#endif // Q_OS_WINCE
+//! Default for "Automatically resize rows and columns to their contents"
+#define DEF_AUTOSIZE true
+//! Default for "Save main window state and position"
+#define DEF_SAVEPOS false
+//! Default for "Fractional random values"
 #define DEF_FRACTIONAL_RANDOM false
-//! Default value for showing or not solution step matrices
+//! Default for "Show solution steps' matrices for every solution step"
 #define DEF_SHOW_MATRIX true
-//! Default value for using or not city limit for showing solution steps matrices
+//! Default for "Show or hide solution steps' matrices based on number of cities in the task"
 #define DEF_USE_SHOW_MATRIX_LIMIT true
-//! Default maximum number of cities to show solution step matrices
-#define DEF_SHOW_MATRIX_CITY_LIMIT 15
-//! Default for scrolling to the end of output after solving
+//! Default for "Maximum number of cities to show solution steps' matrices"
+#define DEF_SHOW_MATRIX_LIMIT 15
+//! Default for "Scroll to the end of output after solving"
 #define DEF_SCROLL_TO_END true
 //! Default font name
@@ -114,7 +127,7 @@
 // FUNCTIONS
 /*!
- * \brief Checks whether \a x contains an integer value
- * \param x A value to check
- * \return \c true if \a x countains an integer, oherwise \c false
+ * \brief Checks whether \a x contains an integer value.
+ * \param x A value to check.
+ * \return \c true if \a x countains an integer, oherwise \c false.
  */
 inline bool isInteger(double x)
Index: trunk/src/mainwindow.cpp
===================================================================
--- trunk/src/mainwindow.cpp	(revision 81)
+++ trunk/src/mainwindow.cpp	(revision 82)
@@ -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())
Index: trunk/src/settingsdialog.cpp
===================================================================
--- trunk/src/settingsdialog.cpp	(revision 81)
+++ trunk/src/settingsdialog.cpp	(revision 82)
@@ -68,4 +68,5 @@
 	vbox2->addWidget(cbScrollToEnd);
 	vbox2->addWidget(cbAutosize);
+	vbox2->addWidget(cbUseNativeDialogs);
 
 	// Output settings group
@@ -108,6 +109,6 @@
 	imgIcon->setLineWidth(0);
 	imgIcon->setPixmap(QPixmap(":/images/icons/preferences_system.png"));
-	imgIcon->setStyleSheet("background-color: #0080C0;");
-	imgIcon->setAlignment(Qt::AlignCenter);
+	imgIcon->setStyleSheet("background-color: #0080C0; padding-top: 11px;");
+	imgIcon->setAlignment(Qt::AlignTop | Qt::AlignHCenter);
 	imgIcon->setMinimumWidth(150);
 
@@ -150,5 +151,5 @@
 	// Top right part (with white bg)
 	vbox2 = new QVBoxLayout(bgWhite);
-	vbox2->addStretch();
+//	vbox2->addStretch();
 	vbox2->addLayout(hbox2);
 	vbox2->addWidget(cbFractionalRandom);
@@ -157,4 +158,5 @@
 	vbox2->addWidget(cbScrollToEnd);
 	vbox2->addWidget(cbAutosize);
+	vbox2->addWidget(cbUseNativeDialogs);
 	vbox2->addWidget(cbSaveState);
 	vbox2->addStretch();
@@ -193,7 +195,8 @@
 	spinRandMax->setValue(settings->value("MaxCost",DEF_RAND_MAX).toInt());
 	cbFractionalRandom->setChecked(settings->value("FractionalRandom", DEF_FRACTIONAL_RANDOM).toBool());
-	cbAutosize->setChecked(settings->value("Autosize",true).toBool());
+	cbAutosize->setChecked(settings->value("Autosize", DEF_AUTOSIZE).toBool());
+	cbUseNativeDialogs->setChecked(settings->value("UseNativeDialogs", DEF_USE_NATIVE_DIALOGS).toBool());
 #ifndef Q_OS_WINCE
-	cbSaveState->setChecked(settings->value("SavePos",false).toBool());
+	cbSaveState->setChecked(settings->value("SavePos", DEF_SAVEPOS).toBool());
 #endif // Q_OS_WINCE
 
@@ -203,5 +206,5 @@
 	cbCitiesLimit->setChecked(settings->value("UseShowMatrixLimit", DEF_USE_SHOW_MATRIX_LIMIT && cbShowMatrix->isChecked()).toBool());
 	spinCitiesLimit->setEnabled(cbShowMatrix->isChecked());
-	spinCitiesLimit->setValue(settings->value("ShowMatrixCitiesLimit", DEF_SHOW_MATRIX_CITY_LIMIT).toInt());
+	spinCitiesLimit->setValue(settings->value("ShowMatrixLimit", DEF_SHOW_MATRIX_LIMIT).toInt());
 	spinCitiesLimit->setMaximum(MAX_NUM_CITIES);
 	cbScrollToEnd->setChecked(settings->value("ScrollToEnd", DEF_SCROLL_TO_END).toBool());
@@ -239,4 +242,5 @@
 	settings->setValue("SavePos", cbSaveState->isChecked());
 #endif // Q_OS_WINCE
+	settings->setValue("UseNativeDialogs", cbUseNativeDialogs->isChecked());
 	settings->setValue("Autosize", cbAutosize->isChecked());
 	settings->setValue("MinCost", spinRandMin->value());
@@ -248,5 +252,5 @@
 	settings->setValue("UseShowMatrixLimit", cbShowMatrix->isChecked() && cbCitiesLimit->isChecked());
 	if (cbCitiesLimit->isChecked())
-		settings->setValue("ShowMatrixCitiesLimit", spinCitiesLimit->value());
+		settings->setValue("ShowMatrixLimit", spinCitiesLimit->value());
 	settings->setValue("ScrollToEnd", cbScrollToEnd->isChecked());
 	if (newFont)
