diff --git a/src/sugar3/activity/widgets.py b/src/sugar3/activity/widgets.py index b1b0e2d2..e8c5cd1d 100644 --- a/src/sugar3/activity/widgets.py +++ b/src/sugar3/activity/widgets.py @@ -177,6 +177,7 @@ class TitleEntry(Gtk.ToolItem): self.entry.set_text(activity.metadata['title']) self.entry.connect( 'focus-out-event', self.__title_changed_cb, activity) + self.entry.connect('activate', self.__on_activate, activity) self.entry.connect('button-press-event', self.__button_press_event_cb) self.entry.show() self.add(self.entry) @@ -184,6 +185,12 @@ class TitleEntry(Gtk.ToolItem): activity.metadata.connect('updated', self.__jobject_updated_cb) activity.connect('_closing', self.__closing_cb) + def __on_activate(self, widget, activity): + self.save_title(activity) + self.entry.hide() + self.entry.show() + return False + def modify_bg(self, state, color): Gtk.ToolItem.modify_bg(self, state, color) self.entry.modify_bg(state, color)