[sugar] [review] controlpanel - modularize model

Marco Pesenti Gritti mpgritti
Mon May 12 12:54:42 EDT 2008


On Mon, May 12, 2008 at 5:52 PM, Simon Schampijer <simon at schampijer.de> wrote:
> > +    __gsignals__ = {
> > +        'valid-section': (gobject.SIGNAL_RUN_FIRST,
> > +                          gobject.TYPE_NONE,
> > +                          ([bool]))
> > +    }
> >
> > Any reason this is not a property?
> >
>
>  The reason is that with the current code I have to signal the validity of
> the section to the ControlPanel class. The controlpanel object owns the
> sectiontoolbar object. The 'ok' icon changes it's sensitivity when the
> section is not valid.

You can listen for gobject property changes. Grep for "notify::" in sugar.

>
>
> > +class InlineAlert(gtk.EventBox):
> >
> > Don't we have already an Alert widget in the toolkit? How is this
> different?
> >
>
>  Inline alerts are different from the other alerts beause they are no
> dialogs, they only inform about a current event, so subclassing from alert
> would not be right in my opinion. I suggest that we add the inlinealert to
> the same file though. Or we create a trimmed down alert class where we
> subclass from.

How is InlineAlert different than the downloads notification in
Browse? What are we using for the Browse one?

Marco



More information about the Sugar-devel mailing list