[Sugar-devel] gtk.button initial state on?

James Cameron quozl at laptop.org
Sun Aug 28 23:39:12 EDT 2011


On Fri, Aug 26, 2011 at 10:39:34PM -0400, Art Hunkins wrote:
> I can't seem to get you very clear suggestions working here. While
> I'm having a difficult time getting the gray and green to show at
> the right times, the most important problem is that switching the
> self.buttons.append call from 0 to 1 doesn't effectively change the
> initial state.

What you then pasted in your mail below didn't make this change, and so
I can't tell if you also made the modify_bg change two lines above.
Because you aren't using gtk.ToggleButton both changes would be
necessary.

> I'd be much obliged if you could make me a proper gtk.ToggleButton
> method as a substitute. Initial state: on, color: green. Toggle to
> off, color: gray. Here's the "original" code below for your ready
> reference. (I presume the buttcallback method might remain as is?)

I don't know if it would remain.  I can't proceed without the entire
code though, because I wouldn't be able to test my proposed changes.  I
would need either an .xo file, a git repository pointer, or something
else that I can get running on an XO.  And instructions for how the
activity is to be used.  A test case.

-- 
James Cameron
http://quozl.linux.org.au/


More information about the Sugar-devel mailing list