Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/src/sugar/activity/activity.py
diff options
context:
space:
mode:
authorSimon Schampijer <simon@schampijer.de>2011-06-20 15:48:51 (GMT)
committer Simon Schampijer <simon@schampijer.de>2011-06-20 15:48:51 (GMT)
commit7a0d5d93984003d9d5964f593886dc6dee6dfb39 (patch)
tree9c5a034278bb245f1dc22e78fbba35da38738cbd /src/sugar/activity/activity.py
parent1ea1b2a0aba795c8ceba595158cb00cfe5590190 (diff)
Use 'focus-out' event instead of 'changed' event for title entry OLPC #10956, SL #2608
To determine if the title has changed we use the 'focus-out' event now instead of the 'changed' signal of the gtk.Entry. This removes races we had before. Signed-off-by: Daniel Drake <dsd@laptop.org> Acked-By: Simon Schampijer <simon@laptop.org> Acked-By: Sascha Silbe <silbe@activitycentral.com>
Diffstat (limited to 'src/sugar/activity/activity.py')
-rw-r--r--src/sugar/activity/activity.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/sugar/activity/activity.py b/src/sugar/activity/activity.py
index 31827da..443799a 100644
--- a/src/sugar/activity/activity.py
+++ b/src/sugar/activity/activity.py
@@ -223,6 +223,9 @@ class Activity(Window, gtk.Container):
__gsignals__ = {
'shared': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE, ([])),
'joined': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE, ([])),
+ # For internal use only, use can_close() if you want to perform extra
+ # checks before actually closing
+ '_closing': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE, ([])),
}
def __init__(self, handle, create_jobject=True):
@@ -863,6 +866,8 @@ class Activity(Window, gtk.Container):
if not self.can_close():
return
+ self.emit('_closing')
+
if skip_save or self._jobject is None or \
self.metadata.get('title_set_by_user', '0') == '1':
if not self._closing: