[qet] [3503] Minor: add message box for inform user as project was saved

[ Thread Index | Date Index | More lists.tuxfamily.org/qet Archives ]


Revision: 3503
Author:   scorpio810
Date:     2014-11-22 21:03:38 +0100 (Sat, 22 Nov 2014)
Log Message:
-----------
Minor: add message box for inform user as project was saved

Modified Paths:
--------------
    trunk/sources/qetdiagrameditor.cpp
    trunk/sources/qetproject.cpp

Modified: trunk/sources/qetdiagrameditor.cpp
===================================================================
--- trunk/sources/qetdiagrameditor.cpp	2014-11-22 09:22:46 UTC (rev 3502)
+++ trunk/sources/qetdiagrameditor.cpp	2014-11-22 20:03:38 UTC (rev 3503)
@@ -627,6 +627,7 @@
 		QETResult saved = project_view -> save();
 		if (saved.isOk()) {
 			QETApp::projectsRecentFiles() -> fileWasOpened(project_view -> project() -> filePath());
+			statusBar()->showMessage(tr("Projet enregistr\351"), 2000);
 		} else {
 			showError(saved);
 		}
@@ -642,6 +643,7 @@
 		QETResult save_file = project_view -> saveAs();
 		if (save_file.isOk()) {
 			QETApp::projectsRecentFiles() -> fileWasOpened(project_view -> project() -> filePath());
+			statusBar()->showMessage(tr("Projet enregistr\351"), 2000);
 		} else {
 			showError(save_file);
 		}

Modified: trunk/sources/qetproject.cpp
===================================================================
--- trunk/sources/qetproject.cpp	2014-11-22 09:22:46 UTC (rev 3502)
+++ trunk/sources/qetproject.cpp	2014-11-22 20:03:38 UTC (rev 3503)
@@ -578,22 +578,27 @@
 	if (file_path_.isEmpty()) {
 		return(QString("unable to save project to file: no filepath was specified"));
 	}
-	
+
 	// if the project was opened read-only and the file is still non-writable, do not save the project
 	if (isReadOnly() && !QFileInfo(file_path_).isWritable()) {
 		return(QString("the file %1 was opened read-only and thus will not be written").arg(file_path_));
 	}
-	
+
 	// realise l'export en XML du projet dans le document XML interne
 	document_root_.clear();
 	document_root_.appendChild(document_root_.importNode(toXml().documentElement(), true));
-	
+
+	//inform user about save
+	QMessageBox msgBox;
+	msgBox.setText(QString(tr("Projet %1 enregistr\351 dans le repertoire: %2.").arg(project_title_).arg (file_path_)));
+	msgBox.exec();
+
 	QString error_message;
 	bool writing = QET::writeXmlFile(document_root_, file_path_, &error_message);
 	if (!writing) {
 		return(error_message);
 	}
-	
+
 	setModified(false);
 	return(QETResult());
 }


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/