[Sur] [Sugar-devel] Introducing SimpleActivity / Introduciendo SimpleActivity
manuq en laptop.org
Lun Nov 25 07:33:44 EST 2013
2013/11/24 Agustin Zubiaga Sanchez <aguz en sugarlabs.org>:
> I just added the __init__.py file.
> About the StopButton, I added the function add_stopbutton in order to be
> called when the activity developer finish its toolbar, because
> SimpleActivity can't know where it's ready, I think the only way to do this
> is when the user adds any item to the toolbar, move (actually, remove and
> insert again) the stopbutton with its separator to the end of the toolbar,
> but we would doing that every time an item is added and I think it doesn't
> make sense.
> If there is a way to fix an item position, please let me know.
I guess you can consider this in the implementation of the add_to*
methods of SimpleActivity.
What I would do:
- in the constructor of simple activity, add the main toolbar and the
items that are always required: activity button, separator, stop
- in the add_to* methods, consider the separator and stop button when
inserting the new elements. Insert them before.
> About new signals style:
> They look nicer, when I want to define a signal without a function, I can do
> my_signal = GObject.Signal('my_signal', arg_types=(int)) as you said, then
> where I should put that?
> self.mysignal = GObject.Signal(.... ?
Yes, making the signal an attribute of the class sounds right.
.. manuq ..
More information about the olpc-Sur