From 61b27c8c3dcb8c858519548f31bf24886cd7882f Mon Sep 17 00:00:00 2001
From: Aleksey Lim <alsroot@member.fsf.org>
Date: Wed, 23 Sep 2009 15:38:31 +0000
Subject: Doesnt shutdown or restart, when an activity shows 'all changes will be lost' error message #427
---
src/sugar/activity/activity.py | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/src/sugar/activity/activity.py b/src/sugar/activity/activity.py
index 9c9fde8..f483774 100644
a
|
b
|
class Activity(Window, gtk.Container): |
420 | 420 | def __session_quit_requested_cb(self, session): |
421 | 421 | self._quit_requested = True |
422 | 422 | |
423 | | if not self._prepare_close(): |
424 | | session.will_quit(self, False) |
425 | | elif not self._updating_jobject: |
| 423 | if self._prepare_close() and not self._updating_jobject: |
426 | 424 | session.will_quit(self, True) |
427 | 425 | |
428 | 426 | def __session_quit_cb(self, client): |
… |
… |
class Activity(Window, gtk.Container): |
755 | 753 | self.remove_alert(alert) |
756 | 754 | if response_id == gtk.RESPONSE_OK: |
757 | 755 | self.close(skip_save=True) |
| 756 | if self._quit_requested: |
| 757 | self._session.will_quit(self, True) |
| 758 | elif self._quit_requested: |
| 759 | self._session.will_quit(self, False) |
758 | 760 | |
759 | 761 | def can_close(self): |
760 | 762 | """Activities should override this function if they want to perform |