[sugar] not use set_tile() in python activities anymore

Marco Pesenti Gritti mpgritti at gmail.com
Mon Sep 24 12:57:03 EDT 2007


On 9/24/07, Tomeu Vizoso <tomeu at tomeuvizoso.net> wrote:
> Hi,
>
> the Journal and the activity toolbar already set the metadata property
> 'title_set_by_user' of the datastore object to '1' when the user sets
> the title.
>
> Perhaps activities can do something like this in the cases when they
> need to set the title depending on the context:
>
> if self._jobject.metadata['title_set_by_user'] != '1':
>     if self._browser.props.title:
>         self.set_title(self._browser.props.title)

I'd rather expose a nice method to handle this if it's going to be
used frequently.

> I'm not sure if Activity.set_title updates the datastore object's title
> property, but it should.
>

set_title also "conflicts" with the gtk.Window method which sort of
suck. Do we need to expose a method which forces a title change at
all?

Marco


More information about the Sugar mailing list