[sugar] how does an activity query the name of the activity?

Pascal Scheffers pascal
Tue Oct 23 02:39:27 EDT 2007


You mean the title?

That would be in the journal meta data as 'title': self.metadata 
['title']
possibly combined with self.metadata['title_set_by_user'] if you want  
to know if the user changed it manually.

The journal meta data gets updated within one second (or is it 10?  
gobject.timeout_add(1000, self.__update_title_cb) in sugar.py) of the  
last keystroke, so self.metadata['title'] is the prefered way to get it.

The best time to change the title, if you must, is in read_file() and  
write_file(), if you do it there, the ActivityToolbar is  
automatically updated.

If you update it elsewhere, you need to call a method of the  
ActivityToolbar, however, that is not part of the public api of the  
ActivityToolbar.



- Pascal.

On 23-okt-2007, at 5:23, Erik Blankinship wrote:

> How does an activity query the current name of the activity session?
> _______________________________________________
> Sugar mailing list
> Sugar at lists.laptop.org
> http://lists.laptop.org/listinfo/sugar




More information about the Sugar-devel mailing list