[the-board] [ui] Ensure page is saved before quitting application
- From: Lucas Rocha <lucasr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [the-board] [ui] Ensure page is saved before quitting application
- Date: Mon, 20 Dec 2010 22:54:25 +0000 (UTC)
commit d6b808b43b7a746309d7482dc87bc3a649b20ae1
Author: Lucas Rocha <lucasr gnome org>
Date: Mon Dec 20 22:50:03 2010 +0000
[ui] Ensure page is saved before quitting application
https://bugzilla.gnome.org/show_bug.cgi?id=637704
src/js/ui/mainWindow.js | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
---
diff --git a/src/js/ui/mainWindow.js b/src/js/ui/mainWindow.js
index ad12d5d..ba7240c 100644
--- a/src/js/ui/mainWindow.js
+++ b/src/js/ui/mainWindow.js
@@ -616,7 +616,17 @@ MainWindow.prototype = {
},
_quitApp : function() {
- this._application.quit();
+ let onModelSaved = function() {
+ this._setSavingOldCurrentPage(false);
+ this._application.quit();
+ };
+
+ if (this._currentPage) {
+ this._setSavingOldCurrentPage(true);
+ this._currentPage.model.save(Lang.bind(this, onModelSaved));
+ } else {
+ this._application.quit();
+ }
},
_pasteClipboardContent : function() {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]