[Bugs] #1948 UNSP: Race condition with name widget in the activity toolbar

Sugar Labs Bugs bugtracker-noreply at sugarlabs.org
Wed Sep 1 09:31:30 EDT 2010


#1948: Race condition with name widget in the activity toolbar
------------------------------------------+---------------------------------
    Reporter:  bernie                     |          Owner:  erikos     
        Type:  defect                     |         Status:  reopened   
    Priority:  Unspecified by Maintainer  |      Milestone:  0.88.x     
   Component:  sugar-toolkit              |        Version:  0.88.x     
    Severity:  Critical                   |     Resolution:             
    Keywords:  olpc-0.84                  |   Distribution:  Unspecified
Status_field:  New                        |  
------------------------------------------+---------------------------------

Comment(by erikos):

 Bernie, I think this is what you had in mind.
 {{{
 diff --git a/src/sugar/activity/activity.py
 b/src/sugar/activity/activity.py
 index 3e97485..7aa5c64 100644
 --- a/src/sugar/activity/activity.py
 +++ b/src/sugar/activity/activity.py
 @@ -176,6 +176,7 @@ class ActivityToolbar(gtk.Toolbar):
          self._activity.copy()

      def __stop_clicked_cb(self, button):
 +        self._update_title(self.title.get_text())
          self._activity.close()

      def __jobject_updated_cb(self, jobject):
 @@ -183,7 +184,9 @@ class ActivityToolbar(gtk.Toolbar):

      def __title_changed_cb(self, editable, event):
          title = editable.get_text()
 +        self._update_title(title)

 +    def _update_title(self, title):
          # Title really changed?
          if title == self._activity.metadata['title']:
              return False
 }}}

-- 
Ticket URL: <http://bugs.sugarlabs.org/ticket/1948#comment:19>
Sugar Labs <http://sugarlabs.org/>
Sugar Labs bug tracking system


More information about the Bugs mailing list