Re: SharedActivity

2013-11-21 Thread Tony Anderson

Hi,

Hi,

At Pycon 2008, Mike Fletcher gave a tutorial on implementation of 
tic-tac-toe as a shared activity
(www.vrplumber.com/olpc/pycon2008-handout.odt). The idea is that two 
children play while others watch.

At the end of the game, watchers can play (e.g. loser becomes watcher).

Nim might be better than tic-tac-toe since there is a guaranteed winner 
in nim.


This might be a simple enough activity to try with SharedActivity,

Tony

On 11/22/2013 03:16 PM, devel-requ...@lists.laptop.org wrote:

Message: 2
Date: Fri, 22 Nov 2013 18:01:09 +1100
From: James Cameron
To: Agustin Zubiaga Sanchez
Cc: sugar-desarrollo,
devel@lists.laptop.org, Sugar-dev Devel
,Comunidad ceibalJAM
,  "OLPC para usuarios, docentes,
voluntarios y administradores"
Subject: Re: [Sugar-devel] Introducing SimpleActivity / Introduciendo
SimpleActivity
Message-ID:<20131122070109.ge21...@us.netrek.org>
Content-Type: text/plain; charset=us-ascii

+1

I have reviewed simpleactivity.py and testactivity.py

This code is very legible and explains well what it does, and can
serve as an example for new activity authors.

The docstrings in simpleactivity.py are an effective explanation of
the simplified API, so perhaps you can generate the documentation from
them in the usual Python fashion.

Next to do is for a few activities to be developed using
SimpleActivity, so that you can see what remains common to the new
activities.  The common code might then be added to SimpleActivity.

testactivity.py is derived from SharedActivity, and so it is complex,
because a collaborating activity is complex.  I'd like to see also an
activity example derived from SimpleActivity.

The number of imports done by testactivity.py still seems high, and a
SimpleActivity example may be able to reduce that.

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


___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


Re: The mouse touch pad doesn't work on XO4

2013-11-21 Thread James Cameron
Have you enabled the feature in your builds?

The tap to click feature is disabled by default in our OLPC OS builds,
because of the installed base of existing learners who were not
familiar with it.

In new deployments to inexperienced learners, it may be enabled before
build.

See
http://wiki.laptop.org/go/OS_Builder/Enable_taptoclick

Also, identify the touchpad on your XO-4 and XO-1.  The actions to
enable depend on the touchpad type.

See
http://wiki.laptop.org/go/Touchpad/Testing#Identification

Perhaps it is working on XO-1 because your build has the enable for
the type of touchpad in your XO-1, and not working on XO-4 because the
build does not have the enable for the type of touchpad in your XO-4.

On Fri, Nov 22, 2013 at 09:57:48AM +0545, Basanta Shrestha wrote:
> Sorry for the confusion. The mouse pad is working okay, what I was trying to
> refer to was "hit on the pad" to click.  On XO-1, I am able to hit on the pad
> to get the effect of mouse click ( left click) which I can not in XO-4.
> -basanta
> 
> 
> On Fri, Nov 22, 2013 at 2:58 AM, John Watlington  wrote:
> 
> 
> Seconding what Paul said, the touchpad on XO-4
> should be fully functional.   If you have one that isn't, I would
> first test it from Open Firmware (halt the laptop boot in Open
> Firmware --- at the ok prompt  and type:    test /mouse
> 
> If that indicates a problem, see:
> http://wiki.laptop.org/go/XO_Troubleshooting_Keyboard#
> Is_the_touchpad_unresponsive_.3F
> 
> Cheers,
> wad
> 
> On Nov 21, 2013, at 5:29 AM, Basanta Shrestha wrote:
> 
> 
> Hi list, 
> Just realized that the mouse touchpad doesn't work for XO4. Has it 
> been
> disabled on purpose ? is there a way to enable it ?
> 
> -basanta
> ___
> Devel mailing list
> Devel@lists.laptop.org
> http://lists.laptop.org/listinfo/devel
> 
> 
> 
> 
> 
> 
> --
> Basanta Shrestha
> Network Engineer
> Open Learning Exchange (OLE) Nepal
> Tel: +977.1.551, 5520075 Ext. 303
> Cell: +977.9818 605110
> http://www.olenepal.org

> ___
> Devel mailing list
> Devel@lists.laptop.org
> http://lists.laptop.org/listinfo/devel


-- 
James Cameron
http://quozl.linux.org.au/
___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


Re: [Sugar-devel] Introducing SimpleActivity / Introduciendo SimpleActivity

2013-11-21 Thread James Cameron
+1

I have reviewed simpleactivity.py and testactivity.py

This code is very legible and explains well what it does, and can
serve as an example for new activity authors.

The docstrings in simpleactivity.py are an effective explanation of
the simplified API, so perhaps you can generate the documentation from
them in the usual Python fashion.

Next to do is for a few activities to be developed using
SimpleActivity, so that you can see what remains common to the new
activities.  The common code might then be added to SimpleActivity.

testactivity.py is derived from SharedActivity, and so it is complex,
because a collaborating activity is complex.  I'd like to see also an
activity example derived from SimpleActivity.

The number of imports done by testactivity.py still seems high, and a
SimpleActivity example may be able to reduce that.

-- 
James Cameron
http://quozl.linux.org.au/
___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


Re: [Sugar-desarrollo] Introducing SimpleActivity / Introduciendo SimpleActivity

2013-11-21 Thread Gonzalo Odiard
Excellent work, this is something Sugar needed for a long time.

Gonzalo


On Thu, Nov 21, 2013 at 10:19 PM, Agustin Zubiaga Sanchez <
a...@sugarlabs.org> wrote:

> = English (Español debajo) =
>
> Hi everyone,
>
> I am writing to show you what I was developing those last days, in order to
> make simpler the developing of Sugar Activities, this module, micro library
> or whatever you want to call it, makes much more easier the processes that
> every activity does, for example create ToolButtons, add them to a Toolbar
> or implement collaboration which is difficult for any starter developer.
> The main idea is include SimpleAcivity in our toolkit, but thinking about
> all the review processes it takes, you can add it to your activity for now
> or you can take a look about how it works in the Demo activity I did [1],
> where you can see how easy is to implement sharing or create the toolbar.
>
> * SimpleActivity classes *
>
> simpleactivity.SimpleActivity:
> The activities which doesn't want to implement collaboration, can derive
> from this class (instead of sugar3.activity.activity.Activity), this class
> automatically adds the toolbar to the activity with his
> ActivityToolbarButton and it makes easier some processes related to the
> design, e.g. add buttons, separators, or whatever to the toolbar in only
> one line and also other things related to the operation for example any
> number, string, dictionary or list that is saved into the self.data
> variable will be auto kept in the journal, and when the instance runs
> again, in self.data will be what you leaved when the activity was closed.
> Among these there are many other simple features, that after all, they do
> everything much easier.
>
> simpleactivity.SharedActivity (derives from SimpleActivity, you can use all
> its methods): :
> From this class should derive every activity which needs to be shared, the
> process is greatly simplified cause the communication is done automatically
> and the "system" works with something like an event manager, so we only
> need to worry about register our events in a python dict, where the keys
> are the names of the events and the values are the functions to call when
> we receive an event, and when we want to "emit" an event with the values we
> need or not, all we have to do is to call send_event(event_name, data)...
> And that's all, we don't have to worry about telepathy, dbus or anything
> like that, SimpleActivity does everything for you :)
> Also it includes an option to send files in a very easy way, using the
> method send_file(file_path, data) that notifies every peer that a file is
> available, and it can be downloaded just calling the download_file method,
> and then SharedActivity will start emiting signals with information related
> to the download progress, etc.
> The process of downloading is done using another independent tube, then
> nothing gets blocked while the file is sent/downloaded, we can continue
> sending events while, and everything will continue working.
>
> Notes:
> - Both classes derives from the "natives" classes of sugar, so we can
> continue using every method of sugar.activity.activity.Activity or
> whatever, without any problem.
> - Whole SimpleActivity (module) is only one .py file, then we can put it
> into our activity directory easily as we do with HelpButton or
> FontComboBox, even if it isn't in sugar toolkit.
> - It only supports GTK3, I think it is not necessary to make it compatible
> with GTK2, because nowadays the new activities should be did in GTK3.
> - I advice everyone who is interested to take a look of the documentation
> that you can found in the docstrings in the file for now (I will create a
> cleaner documentation with sphinx), to learn about all you can do with
> SimpleActivity.
>
> Also I started a Feature wiki page [2], but is not ready yet. Could anyone
> help me with that?
> I need some documentation experts ;)
>
> I hope you find it useful, as I always say, I love developing for Sugar,
> because it causes a great feeling to know that the lines of code I wrote
> will be used directly or indirectly by millions of children around the
> world.
>
> [1] https://git.sugarlabs.org/simpleactivity/
> [2] http://wiki.sugarlabs.org/go/Features/SimpleActivity
>
> Thank you very much,
> aguz
>
> -
> = Español =
>
> Hola a todos,
>
> Les escribo para presentarles lo que he estado desarrollando estos últimos
> días, con el fin de hacer más simple la creación de actividades para Sugar,
> este modulo, micro librería, o como quieran llamarle, hace mucho más fácil
> los procesos que todas las actividades hacen, como crear ToolButtons,
> agregarlos a una Toolbar o implementar colaboración para cualquier
> desarrollador que esté comenzando.
> La idea principal es incluir SimpleActivity en la toolkit de sugar, pero
> tomando en cuenta todos los procesos de revisados que lleva, pueden ver
> como funciona en el repositorio de la actividad de ejemplo
> HelloSimpleActivity [1],

Re: The mouse touch pad doesn't work on XO4

2013-11-21 Thread Basanta Shrestha
Sorry for the confusion. The mouse pad is working okay, what I was trying
to refer to was "hit on the pad" to click.  On XO-1, I am able to hit on
the pad to get the effect of mouse click ( left click) which I can not in
XO-4.
-basanta


On Fri, Nov 22, 2013 at 2:58 AM, John Watlington  wrote:

>
> Seconding what Paul said, the touchpad on XO-4
> should be fully functional.   If you have one that isn't, I would
> first test it from Open Firmware (halt the laptop boot in Open
> Firmware --- at the ok prompt  and type:test /mouse
>
> If that indicates a problem, see:
>
> http://wiki.laptop.org/go/XO_Troubleshooting_Keyboard#Is_the_touchpad_unresponsive_.3F
>
> Cheers,
> wad
>
> On Nov 21, 2013, at 5:29 AM, Basanta Shrestha wrote:
>
> Hi list,
> Just realized that the mouse touchpad doesn't work for XO4. Has it been
> disabled on purpose ? is there a way to enable it ?
>
> -basanta
> ___
> Devel mailing list
> Devel@lists.laptop.org
> http://lists.laptop.org/listinfo/devel
>
>
>


-- 
Basanta Shrestha
Network Engineer
Open Learning Exchange (OLE) Nepal
Tel: +977.1.551, 5520075 Ext. 303
Cell: +977.9818 605110
http://www.olenepal.org
___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


Introducing SimpleActivity / Introduciendo SimpleActivity

2013-11-21 Thread Agustin Zubiaga Sanchez
= English (Español debajo) =

Hi everyone,

I am writing to show you what I was developing those last days, in order to
make simpler the developing of Sugar Activities, this module, micro library
or whatever you want to call it, makes much more easier the processes that
every activity does, for example create ToolButtons, add them to a Toolbar
or implement collaboration which is difficult for any starter developer.
The main idea is include SimpleAcivity in our toolkit, but thinking about
all the review processes it takes, you can add it to your activity for now
or you can take a look about how it works in the Demo activity I did [1],
where you can see how easy is to implement sharing or create the toolbar.

* SimpleActivity classes *

simpleactivity.SimpleActivity:
The activities which doesn't want to implement collaboration, can derive
from this class (instead of sugar3.activity.activity.Activity), this class
automatically adds the toolbar to the activity with his
ActivityToolbarButton and it makes easier some processes related to the
design, e.g. add buttons, separators, or whatever to the toolbar in only
one line and also other things related to the operation for example any
number, string, dictionary or list that is saved into the self.data
variable will be auto kept in the journal, and when the instance runs
again, in self.data will be what you leaved when the activity was closed.
Among these there are many other simple features, that after all, they do
everything much easier.

simpleactivity.SharedActivity (derives from SimpleActivity, you can use all
its methods): :
>From this class should derive every activity which needs to be shared, the
process is greatly simplified cause the communication is done automatically
and the "system" works with something like an event manager, so we only
need to worry about register our events in a python dict, where the keys
are the names of the events and the values are the functions to call when
we receive an event, and when we want to "emit" an event with the values we
need or not, all we have to do is to call send_event(event_name, data)...
And that's all, we don't have to worry about telepathy, dbus or anything
like that, SimpleActivity does everything for you :)
Also it includes an option to send files in a very easy way, using the
method send_file(file_path, data) that notifies every peer that a file is
available, and it can be downloaded just calling the download_file method,
and then SharedActivity will start emiting signals with information related
to the download progress, etc.
The process of downloading is done using another independent tube, then
nothing gets blocked while the file is sent/downloaded, we can continue
sending events while, and everything will continue working.

Notes:
- Both classes derives from the "natives" classes of sugar, so we can
continue using every method of sugar.activity.activity.Activity or
whatever, without any problem.
- Whole SimpleActivity (module) is only one .py file, then we can put it
into our activity directory easily as we do with HelpButton or
FontComboBox, even if it isn't in sugar toolkit.
- It only supports GTK3, I think it is not necessary to make it compatible
with GTK2, because nowadays the new activities should be did in GTK3.
- I advice everyone who is interested to take a look of the documentation
that you can found in the docstrings in the file for now (I will create a
cleaner documentation with sphinx), to learn about all you can do with
SimpleActivity.

Also I started a Feature wiki page [2], but is not ready yet. Could anyone
help me with that?
I need some documentation experts ;)

I hope you find it useful, as I always say, I love developing for Sugar,
because it causes a great feeling to know that the lines of code I wrote
will be used directly or indirectly by millions of children around the
world.

[1] https://git.sugarlabs.org/simpleactivity/
[2] http://wiki.sugarlabs.org/go/Features/SimpleActivity

Thank you very much,
aguz

-
= Español =

Hola a todos,

Les escribo para presentarles lo que he estado desarrollando estos últimos
días, con el fin de hacer más simple la creación de actividades para Sugar,
este modulo, micro librería, o como quieran llamarle, hace mucho más fácil
los procesos que todas las actividades hacen, como crear ToolButtons,
agregarlos a una Toolbar o implementar colaboración para cualquier
desarrollador que esté comenzando.
La idea principal es incluir SimpleActivity en la toolkit de sugar, pero
tomando en cuenta todos los procesos de revisados que lleva, pueden ver
como funciona en el repositorio de la actividad de ejemplo
HelloSimpleActivity [1], que implementa un montón de características, y
donde pueden ver lo fácil que es implementar la colaboración o hacer la
barra de herramientas.

* Clases de simpleactivity *

simpleactivity.SimpleActivity:
Las actividades que NO deseen implementar colaboración, pueden simplemente
heredar de esta clase (en lugar de sugar3.activity.acti

Re: The mouse touch pad doesn't work on XO4

2013-11-21 Thread John Watlington

Seconding what Paul said, the touchpad on XO-4
should be fully functional.   If you have one that isn't, I would
first test it from Open Firmware (halt the laptop boot in Open
Firmware --- at the ok prompt  and type:test /mouse

If that indicates a problem, see:
http://wiki.laptop.org/go/XO_Troubleshooting_Keyboard#Is_the_touchpad_unresponsive_.3F

Cheers,
wad

On Nov 21, 2013, at 5:29 AM, Basanta Shrestha wrote:

> Hi list, 
> Just realized that the mouse touchpad doesn't work for XO4. Has it been 
> disabled on purpose ? is there a way to enable it ?
> 
> -basanta
> ___
> Devel mailing list
> Devel@lists.laptop.org
> http://lists.laptop.org/listinfo/devel

___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


Re: The mouse touch pad doesn't work on XO4

2013-11-21 Thread Paul Fox
basanta wrote:
 > Hi list,
 > Just realized that the mouse touchpad doesn't work for XO4. Has it been
 > disabled on purpose ? is there a way to enable it ?

is this on a single XO-4?  the touchpad should work fine.

paul
=-
 paul fox, p...@laptop.org
___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


The mouse touch pad doesn't work on XO4

2013-11-21 Thread Basanta Shrestha
Hi list,
Just realized that the mouse touchpad doesn't work for XO4. Has it been
disabled on purpose ? is there a way to enable it ?

-basanta
___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


Using a new keyboard layout for XO4

2013-11-21 Thread Basanta Shrestha
Dear all,
We are planing on using a different keyboard layout for XO4. The new layout
we think is phonetically based and easier for children. I simply switched
the /usr/share/X11/symbols/np file with a new one but did not work. I guess
there are some other works that needs to be done before we can use this
file. Can you suggest what needs to be done?

The layout I want to use is http://nepalinux.org/input/ne

-basanta
___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel