diff --git a/gui_qt/formrender.cpp b/gui_qt/formrender.cpp
index 25c2f60..ca5b325 100644
--- a/gui_qt/formrender.cpp
+++ b/gui_qt/formrender.cpp
@@ -194,9 +194,13 @@ void FormRender::saveRender()
{
QString filepath;
- filepath = QFileDialog::getSaveFileName(this, tr("Choose a filename to save the last render"));
+ filepath = QFileDialog::getSaveFileName(this, tr("Paysages 3D - Choose a filename to save the last render"), QString(), tr("Images (*.png *.jpg)"));
if (!filepath.isNull())
{
+ if (!filepath.toLower().endsWith(".jpg") && !filepath.toLower().endsWith(".jpeg") && !filepath.toLower().endsWith(".png"))
+ {
+ filepath = filepath.append(".png");
+ }
renderSaveToFile(_renderer.render_area, (char*)filepath.toStdString().c_str());
QMessageBox::information(this, "Message", QString(tr("The picture %1 has been saved.")).arg(filepath));
}
diff --git a/gui_qt/mainwindow.cpp b/gui_qt/mainwindow.cpp
index 60a2531..d3dca1d 100644
--- a/gui_qt/mainwindow.cpp
+++ b/gui_qt/mainwindow.cpp
@@ -137,7 +137,7 @@ void MainWindow::refreshAll()
void MainWindow::fileNew()
{
- if (QMessageBox::question(this, tr("New lanscape"), tr("Do you want to start a new landscape ? Any unsaved changes will be lost."), QMessageBox::Yes | QMessageBox::No, QMessageBox::No) == QMessageBox::Yes)
+ if (QMessageBox::question(this, tr("Paysages 3D - New scenery"), tr("Do you want to start a new scenery ? Any unsaved changes will be lost."), QMessageBox::Yes | QMessageBox::No, QMessageBox::No) == QMessageBox::Yes)
{
autoGenRealisticLandscape(0);
autoSetDaytime(8, 30);
@@ -147,18 +147,22 @@ void MainWindow::fileNew()
void MainWindow::fileSave()
{
- QString filepath = QFileDialog::getSaveFileName(this);
+ QString filepath = QFileDialog::getSaveFileName(this, tr("Paysages 3D - Choose a file to save the scenery"), QString(), tr("Paysages 3D Scenery (*.p3d)"));
if (!filepath.isNull())
{
+ if (!filepath.toLower().endsWith(".p3d"))
+ {
+ filepath = filepath.append(".p3d");
+ }
paysagesSave((char*)filepath.toStdString().c_str());
}
}
void MainWindow::fileLoad()
{
- if (QMessageBox::question(this, tr("Load lanscape"), tr("Do you want to load a landscape ? Any unsaved changes will be lost."), QMessageBox::Yes | QMessageBox::No, QMessageBox::No) == QMessageBox::Yes)
+ if (QMessageBox::question(this, tr("Paysages 3D - Load scenery"), tr("Do you want to load a scenery from file ? Any unsaved changes will be lost."), QMessageBox::Yes | QMessageBox::No, QMessageBox::No) == QMessageBox::Yes)
{
- QString filepath = QFileDialog::getOpenFileName(this);
+ QString filepath = QFileDialog::getOpenFileName(this, tr("Paysages 3D - Choose a scenery file to load"), QString(), tr("Paysages 3D Scenery (*.p3d)"));
if (!filepath.isNull())
{
paysagesLoad((char*)filepath.toStdString().c_str());
diff --git a/i18n/paysages_fr.ts b/i18n/paysages_fr.ts
index 2e90687..d07f8c1 100644
--- a/i18n/paysages_fr.ts
+++ b/i18n/paysages_fr.ts
@@ -394,11 +394,24 @@ Maintenir Ctrl : Plus rapide
-
- Choisissez un nom de fichier pour le rendu
+
+ Paysages 3D - Choisissez un nom de fichier pour le rendu
-
+
+
+ Images (*.png *.jpg)
+
+
+
+ Images (*.png *.jpg)
+
+
+
+ Choisissez un nom de fichier pour le rendu
+
+
+ L'image %1 a été sauvegardée.
@@ -742,6 +755,42 @@ rapide (F5)
F5
+
+
+
+ Voulez-vous commencer un nouveau paysage ? Les modifications non sauvegardées seront perdues.
+
+
+
+
+ Paysages 3D - Nouvelle scène
+
+
+
+
+ Paysages 3D - Choisissez un fichier pour enregistrer la scène
+
+
+
+
+
+ Scène Paysages 3D
+
+
+
+
+ Voulez-vous charger une scène ? Les modifications nons sauvegardées seront perdues.
+
+
+
+
+ Paysages 3D - Charger une scène
+
+
+
+
+ Paysages 3D - Choisissez un fichier de scène à charger
+
@@ -823,32 +872,28 @@ rapide (F5)
&A propos
-
-
+ Nouveau paysage
-
-
+ Voulez-vous commencer un nouveau paysage ? Les modifications non sauvegardées seront perdues.
-
-
+ Charger un paysage
-
-
+ Voulez-vous charger un paysage ? Les modifications nons sauvegardées seront perdues.
-
+ Paysages 3D
-
+