[Sugar-devel] Several chapters of "Make Your Own Sugar Activities!" ready for review, feedback
nicestep at gmail.com
Wed Jan 6 10:47:00 EST 2010
I figured out a simple answer to this this morning. I'm going to use
sugar-jhbuild on my Fedora 11 box. I started the process of setting
it up and so far it's relatively painless. This kills two birds,
because I probably should have something more to say about
sugar-jhbuild in the book than I currently do. The last time I tried
it was on an old version of SuSE and that was painful. With Fedora 11
it's time consuming but not awful.
SoaS would be another option, but not as convenient.
On Tue, Jan 5, 2010 at 9:02 PM, Walter Bender <walter.bender at gmail.com> wrote:
> Is Sugar on a Stick a suitable test environment for you? That is 0.86.
> On Tue, Jan 5, 2010 at 4:20 PM, Jim Simmons <nicestep at gmail.com> wrote:
>> I've used the import exception method myself. It looks like this will
>> be a bit more complicated than I had planned on, because it would seem
>> that I'd need a .86 environment to test in. I have two development
>> boxes at home, one running Fedora 10 (which I plan to leave alone) and
>> another running 11, which I could update to 12 if that would give me
>> .86. Unfortunately, Fedora's idea of upgrade seems to be a clean
>> install, which I'd like to put off. Maybe I should finish the rest of
>> the chapters before I try making new style toolbars.
>> You've given me a good start though, and I think I can figure out the
>> rest. I could probably figure out the PyGame stuff too. It's the
>> "developing on a Mac" topic that has me stumped.
>> James Simmons
>> On Tue, Jan 5, 2010 at 2:42 PM, Walter Bender <walter.bender at gmail.com> wrote:
>>> On Tue, Jan 5, 2010 at 2:57 PM, Jim Simmons <nicestep at gmail.com> wrote:
>>>> I've been working on a Floss Manual that should be a beginner's guide
>>>> to creating Sugar Activities. I've got 64 page's worth (in the PDF
>>>> version) written and I feel confident that I will finish this book
>>>> eventually. What I have now may be good enough to criticize. It
>>>> contains some pretty good code samples, some reasonable
>>>> recommendations, and a fair number of screen shots. So far it covers
>>>> writing a basic Activity in Python, running it with sugar-emulator,
>>>> and getting the code in Git. Future chapters will include doing i18n
>>>> with Pootle, distributing the Activity, doing text to speech with and
>>>> without highlighting, and collaboration features. I may stick
>>>> something on Activity debugging techniques in somewhere too.
>>>> Other stuff that *should* be included, but which I am not currently
>>>> qualified to write, would include:
>>>> * Developing Activities on a Mac
>>>> * Creating an Activity using PyGame instead of PyGTK.
>>>> * Creating the new-styled toolbars
>>>> * etc., etc.
>>>> If you want to check out what I have the URL is:
>>>> Any help anyone can provide on this will be greatly appreciated. If
>>>> you want to register as a writer and contribute stuff of your own or
>>>> edit my stuff you have my blessing.
>>> This is a great start. I'll try to help out with some of the missing piece.
>>> Re how to handle the new toolbars, I have some examples from other
>>> programs, but I am happy to work with you on the ReadEtext example if
>>> you want. The only thing you need are some icons to represent the
>>> toolbar submenus. Your current activity icon will replace the
>>> "Activity" toolbar; there is a standard icon for the "Edit" toolbar
>>> ('toolbar-edit'); likewise, for the 'View" toolbar ('toolbar-view').
>>> You'll need to decide on an icon for the "Read" toolbar, perhaps the
>>> icon from the Read activity?
>>> The "trick" then is to figure out which version of Sugar you are
>>> running in order to decide which toolbars to use. I am lazy and just
>>> catch an ImportError:
>>> import sugar
>>> from sugar.activity import activity
>>> try: # 0.86+ toolbar widgets
>>> from sugar.bundle.activitybundle import ActivityBundle
>>> from sugar.activity.widgets import ActivityToolbarButton
>>> from sugar.activity.widgets import StopButton
>>> from sugar.graphics.toolbarbox import ToolbarBox
>>> from sugar.graphics.toolbarbox import ToolbarButton
>>> sugar86 = True
>>> except ImportError:
>>> sugar86 = False
>>> from sugar.graphics.toolbutton import ToolButton
>>> from sugar.graphics.menuitem import MenuItem
>>> from sugar.graphics.icon import Icon
>>> if sugar86 is True:
>>> toolbar_box = ToolbarBox()
>>> self.toolbox = activity.ActivityToolbox(self)
>>> There are a few more details regarding sharing callbacks between the
>>> toolbars, etc. Maybe checkout
>>> for an example.
>>>> James Simmons
>>>> Sugar-devel mailing list
>>>> Sugar-devel at lists.sugarlabs.org
>>> Walter Bender
>>> Sugar Labs
> Walter Bender
> Sugar Labs
More information about the Sugar-devel