[sugar] [PATCH] Add speaker device and icon by default

Eben Eliason eben.eliason
Thu Apr 24 12:47:11 EDT 2008


On Thu, Apr 24, 2008 at 12:40 PM, Martin Dengler
<martin at martindengler.com> wrote:
> On Thu, Apr 24, 2008 at 12:01:52PM -0400, Eben Eliason wrote:
>  > I'll /try/ to keep my comments mostly to the UI and leave the code
>  > review for others.  I'll also fail at that to some extent, since I
>  > have curiosities about bits and pieces.
>  >
>  > On Thu, Apr 24, 2008 at 7:33 AM, Martin Dengler
>  > <martin at martindengler.com> wrote:
>  >
>  > >  +        return self._master.flags & gst.interfaces.MIXER_TRACK_MUTE \
>  > >  +                 == gst.interfaces.MIXER_TRACK_MUTE
>  >
>  > If MIXER_TRACK_MUTE is a bit mask, isn't the equality check redundant?
>
>  It's not a bitmask, IIUC.  So no, it's not redundant AFAICS.  But yes,
>  it'd read much more nicely without the equality check if it wasn't.

Hmmm, but you appear to be using it as such anyway.  How else could
the boolean & be interpreted logically otherwise?  (I may very well be
missing something here.)  It was pointed out to me that one reason for
it would be to return a boolean type, instead of an int, which is a
valid assessment (I'm too familiar with C....).  If that's the core
reason, however, I might find simply casting to bool clearer.

>  > Let's use the dialog-ok and dialog-cancel icons for now, which will
>  > match the current mockups for the mic and camera.  We can change them
>  > easily later if we need to.
>
>  dialog-ok to go with the "Unmute" text, and -cancel to go with "Mute"?

Yup.

>  > >  +        mute_item_text += '...'
>  >
>  > This is a bad habit that everyone seems to get into.  Cut this line.
>
>  Sorry!  I know the rule(s) you cite, and must blame lack of sleep for
>  leaving this in.  I was cargo-culting "Disconnect..." from
>  network/wireless.py, I think.

Good!  I expect not to have to slap you again for this.  :-P

- Eben



More information about the Sugar-devel mailing list