From 51c66de8171505206c0014c3691fa7fccc115057 Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Thu, 28 Jun 2007 12:03:12 +0200 Subject: [PATCH] Do not allow to close the journal --- sugar/activity/activity.py | 8 ++++++-- sugar/graphics/palette.py | 2 -- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/sugar/activity/activity.py b/sugar/activity/activity.py index 0407a8eb..a7ec4eb4 100644 --- a/sugar/activity/activity.py +++ b/sugar/activity/activity.py @@ -216,6 +216,7 @@ class Activity(Window, gtk.Container): self._shared_activity = None self._share_id = None self._join_id = None + self._can_close = True shared_activity = handle.get_shared_activity() if shared_activity: @@ -376,8 +377,11 @@ class Activity(Window, gtk.Container): wm.set_activity_id(window.window, self._activity_id) def _delete_event_cb(self, window, event): - self.close() - return False + if self._can_close: + self.close() + return False + else: + return True def close(self): if self._bus: diff --git a/sugar/graphics/palette.py b/sugar/graphics/palette.py index 5b425d5a..668bd143 100644 --- a/sugar/graphics/palette.py +++ b/sugar/graphics/palette.py @@ -195,14 +195,12 @@ class Palette(gobject.GObject): self._popdown_anim.start() def invoker_mouse_enter(self): - print 'Invoker enter' self.popup() def invoker_mouse_leave(self): self.popdown() def _enter_notify_event_cb(self, widget, event): - print 'Enter notify' if event.detail == gtk.gdk.NOTIFY_NONLINEAR: self._popdown_anim.stop()