Re: [Sugar-devel] [PATCH Maze] Maze icon in the toolbar SL #3380

2012-05-10 Thread Gonzalo Odiard
This olpcgames/sugargames and the activities using them, is a good topic to
talk in Mvd.

Gonzalo

On Thu, May 10, 2012 at 1:54 AM, James Cameron qu...@laptop.org wrote:

 On Wed, May 09, 2012 at 09:31:08AM -0300, Manuel Kaufmann wrote:
  On Tue, May 8, 2012 at 8:07 PM, James Cameron qu...@laptop.org wrote:
   Might you also fix olpcgames build_toolbar and check that sugargames
   has been fixed too?
 
  I tried to migrate Maze to sugargame but there a lot of functionabilty
  missing on that library, for example mesh, pausescreen, etc...

 That is unfortunate.  Perhaps those functions should eventually be
 added.

  About the toolbar, sugargame does not provide anything to create the
  toolbar automagically. So, there are nothing to fix.

 I am surprised.

  Do you know why olpcgames is obsolete and is unmanteined? Should I try
  to fix olpcgames? Should I improve it or these things does not make
  sense?

 While I have heard that olpcgames is obsolete, unmaintained, and
 replaced by sugargames, there are still activities that use olpcgames,
 and there are still features that olpcgames has that sugargames does
 not.

 You may be able to decide whether to maintain the code in olpcgames by
 looking at what activities use it, and checking to see how old the
 olpcgames is in each activity.

 Judge for yourself whether the changes should be done in olpcgames or
 in your activity?  Whatever is most effective, I guess.

 --
 James Cameron
 http://quozl.linux.org.au/
 ___
 Sugar-devel mailing list
 Sugar-devel@lists.sugarlabs.org
 http://lists.sugarlabs.org/listinfo/sugar-devel

___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [PATCH Maze] Maze icon in the toolbar SL #3380

2012-05-10 Thread James Cameron
On Thu, May 10, 2012 at 08:53:23AM -0300, Gonzalo Odiard wrote:
 This olpcgames/sugargames and the activities using them, is a good
 topic to talk in Mvd.

Sorry, I can't find a decoding of Mvd.

-- 
James Cameron
http://quozl.linux.org.au/
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [PATCH Maze] Maze icon in the toolbar SL #3380

2012-05-10 Thread Gonzalo Odiard
Mvd = Montevideo :)
At the eduJam event
You should come the next time! We are no so far away!

Gonzalo

On Thu, May 10, 2012 at 11:40 AM, James Cameron qu...@laptop.org wrote:

 On Thu, May 10, 2012 at 08:53:23AM -0300, Gonzalo Odiard wrote:
  This olpcgames/sugargames and the activities using them, is a good
  topic to talk in Mvd.

 Sorry, I can't find a decoding of Mvd.

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

___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [PATCH Maze] Maze icon in the toolbar SL #3380

2012-05-10 Thread Rafael Ortiz
On Thu, May 10, 2012 at 11:40 AM, James Cameron qu...@laptop.org wrote:

 On Thu, May 10, 2012 at 08:53:23AM -0300, Gonzalo Odiard wrote:
  This olpcgames/sugargames and the activities using them, is a good
  topic to talk in Mvd.


+1.


 Sorry, I can't find a decoding of Mvd.

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

___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [PATCH Maze] Maze icon in the toolbar SL #3380

2012-05-10 Thread Manuel Kaufmann
On Thu, May 10, 2012 at 8:53 AM, Gonzalo Odiard gonz...@laptop.org wrote:
 This olpcgames/sugargames and the activities using them, is a good topic to
 talk in Mvd.

Yes, but I think that our decisions should be public. So, I will start
writing here my thoughts.

First of all, olpcgames gives us a lot of functionality that sugargame
doesn't provide. The easy and big example is MESH. I like the way that
mesh is implemented in olpcgames, it has a really easy to use API and
allows us to make a collaborative activity in some minutes.

sugargame, on the other hand, just allows us to put pygame inside a
GTK application and I think that is all we need. Let me explain why. I
think we should improve the way that GTK activities are communicating
between them using telepathy. I mean, make telepathy more like
olpcgames.mesh so it will be easier to use (improve the API, I mean).

So, I'd like to:
 * migrate olpcgames to sugargame
 * discard the use of olpcgames
 * improve the telepathy api

My ¢25

Let discuss this at Montevideo and in this list.

-- 
Kaufmann Manuel
Blog: http://humitos.wordpress.com/
Porfolio: http://fotos.mkaufmann.com.ar/
PyAr: http://www.python.com.ar/
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [PATCH Maze] Maze icon in the toolbar SL #3380

2012-05-09 Thread Manuel Kaufmann
On Tue, May 8, 2012 at 8:07 PM, James Cameron qu...@laptop.org wrote:
 Might you also fix olpcgames build_toolbar and check that sugargames
 has been fixed too?

I tried to migrate Maze to sugargame but there a lot of functionabilty
missing on that library, for example mesh, pausescreen, etc...

About the toolbar, sugargame does not provide anything to create the
toolbar automagically. So, there are nothing to fix.

Do you know why olpcgames is obsolete and is unmanteined? Should I try
to fix olpcgames? Should I improve it or these things does not make
sense?

-- 
Kaufmann Manuel
Blog: http://humitos.wordpress.com/
Porfolio: http://fotos.mkaufmann.com.ar/
PyAr: http://www.python.com.ar/
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [PATCH Maze] Maze icon in the toolbar SL #3380

2012-05-09 Thread Rafael Ortiz
On Wed, May 9, 2012 at 7:31 AM, Manuel Kaufmann humi...@gmail.com wrote:

 On Tue, May 8, 2012 at 8:07 PM, James Cameron qu...@laptop.org wrote:
  Might you also fix olpcgames build_toolbar and check that sugargames
  has been fixed too?

 I tried to migrate Maze to sugargame but there a lot of functionabilty
 missing on that library, for example mesh, pausescreen, etc...

 About the toolbar, sugargame does not provide anything to create the
 toolbar automagically. So, there are nothing to fix.

 Do you know why olpcgames is obsolete and is unmanteined? Should I try
 to fix olpcgames? Should I improve it or these things does not make
 sense?


The real non-go case was commented by Gary about specific errors he has
with olpc-games, besides that I don't see other reason for not maintain it.
Also an idea will be release it in parallel with activities that use it.
i.e Maze.




--
 Kaufmann Manuel
 Blog: http://humitos.wordpress.com/
 Porfolio: http://fotos.mkaufmann.com.ar/
 PyAr: http://www.python.com.ar/

___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [PATCH Maze] Maze icon in the toolbar SL #3380

2012-05-09 Thread Rafael Ortiz
On Tue, May 8, 2012 at 10:04 AM, Manuel Kaufmann humi...@gmail.com wrote:

  - Show the Maze icon in the toolbar.

  - Don't use olpcgames.PygameActivity.build_toolbar anymore because it
   doesn't do what we need. Used our own build_toolbar method instead.

 Signed-off-by: Manuel Kaufmann humi...@gmail.com
 ---
  activity.py |   42 ++
  1 file changed, 30 insertions(+), 12 deletions(-)

 diff --git a/activity.py b/activity.py
 index 46a942c..4afbf56 100755
 --- a/activity.py
 +++ b/activity.py
 @@ -4,6 +4,9 @@ import olpcgames
  import pygame
  import gtk

 +from sugar.activity.widgets import ActivityToolbarButton
 +from sugar.activity.widgets import StopButton
 +from sugar.graphics.toolbarbox import ToolbarBox
  from sugar.graphics.toolbutton import ToolButton
  from gettext import gettext as _

 @@ -15,26 +18,41 @@ class MazeActivity(olpcgames.PyGameActivity):

 def build_toolbar(self):
 Build our Activity toolbar for the Sugar system.
 -toolbar = super(MazeActivity, self).build_toolbar()
 +
 +toolbar_box = ToolbarBox()
 +activity_button = ActivityToolbarButton(self)
 +toolbar_box.toolbar.insert(activity_button, 0)
 +activity_button.show()

 separator = gtk.SeparatorToolItem()
 -separator.set_expand(True)
 -separator.set_draw(False)
 -toolbar.insert(separator, 0)
 +toolbar_box.toolbar.insert(separator, -1)
 +separator.show()
 +
 +easier_button = ToolButton('create-easier')
 +easier_button.set_tooltip(_('Easier level'))
 +easier_button.connect('clicked', self._easier_button_cb)
 +toolbar_box.toolbar.insert(easier_button, -1)

 harder_button = ToolButton('create-harder')
 harder_button.set_tooltip(_('Harder level'))
 harder_button.connect('clicked', self._harder_button_cb)
 -toolbar.insert(harder_button, 2)
 -harder_button.show()
 +toolbar_box.toolbar.insert(harder_button, -1)

 -easier_button = ToolButton('create-easier')
 -easier_button.set_tooltip(_('Easier level'))
 -easier_button.connect('clicked', self._easier_button_cb)
 -toolbar.insert(easier_button, 2)
 -easier_button.show()
 +separator = gtk.SeparatorToolItem()
 +separator.props.draw = False
 +separator.set_size_request(0, -1)
 +separator.set_expand(True)
 +toolbar_box.toolbar.insert(separator, -1)
 +separator.show()
 +
 +stop_button = StopButton(self)
 +toolbar_box.toolbar.insert(stop_button, -1)
 +stop_button.show()
 +
 +self.set_toolbar_box(toolbar_box)
 +toolbar_box.show_all()

 -return toolbar
 +return toolbar_box

 def _easier_button_cb(self, button):
 pygame.event.post(olpcgames.eventwrap.Event(
 --
 1.7.10

 Ok applied the patch with changed description to include SL bugs to be
closed.

http://git.sugarlabs.org/maze/mainline/commit/87f832850ba242b1606acb0f1d60bc5631920f34

should be in next version, thanks humitos.
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [PATCH Maze] Maze icon in the toolbar SL #3380

2012-05-09 Thread James Cameron
On Wed, May 09, 2012 at 09:31:08AM -0300, Manuel Kaufmann wrote:
 On Tue, May 8, 2012 at 8:07 PM, James Cameron qu...@laptop.org wrote:
  Might you also fix olpcgames build_toolbar and check that sugargames
  has been fixed too?
 
 I tried to migrate Maze to sugargame but there a lot of functionabilty
 missing on that library, for example mesh, pausescreen, etc...

That is unfortunate.  Perhaps those functions should eventually be
added.

 About the toolbar, sugargame does not provide anything to create the
 toolbar automagically. So, there are nothing to fix.

I am surprised.

 Do you know why olpcgames is obsolete and is unmanteined? Should I try
 to fix olpcgames? Should I improve it or these things does not make
 sense?

While I have heard that olpcgames is obsolete, unmaintained, and
replaced by sugargames, there are still activities that use olpcgames,
and there are still features that olpcgames has that sugargames does
not.

You may be able to decide whether to maintain the code in olpcgames by
looking at what activities use it, and checking to see how old the
olpcgames is in each activity.

Judge for yourself whether the changes should be done in olpcgames or
in your activity?  Whatever is most effective, I guess.

-- 
James Cameron
http://quozl.linux.org.au/
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [PATCH Maze] Maze icon in the toolbar SL #3380

2012-05-08 Thread Manuel Quiñones
2012/5/8 Manuel Kaufmann humi...@gmail.com:
  - Show the Maze icon in the toolbar.

  - Don't use olpcgames.PygameActivity.build_toolbar anymore because it
   doesn't do what we need. Used our own build_toolbar method instead.

Finally we have a nice toolbar in Maze, great.

Code looks good, the old toolbars fallback is gone but I think we are
safe to remove that by now, is up to the maintainer to decide.

 Signed-off-by: Manuel Kaufmann humi...@gmail.com

Reviewed-by: Manuel Quiñones ma...@laptop.org

 ---
  activity.py |   42 ++
  1 file changed, 30 insertions(+), 12 deletions(-)

 diff --git a/activity.py b/activity.py
 index 46a942c..4afbf56 100755
 --- a/activity.py
 +++ b/activity.py
 @@ -4,6 +4,9 @@ import olpcgames
  import pygame
  import gtk

 +from sugar.activity.widgets import ActivityToolbarButton
 +from sugar.activity.widgets import StopButton
 +from sugar.graphics.toolbarbox import ToolbarBox
  from sugar.graphics.toolbutton import ToolButton
  from gettext import gettext as _

 @@ -15,26 +18,41 @@ class MazeActivity(olpcgames.PyGameActivity):

     def build_toolbar(self):
         Build our Activity toolbar for the Sugar system.
 -        toolbar = super(MazeActivity, self).build_toolbar()
 +
 +        toolbar_box = ToolbarBox()
 +        activity_button = ActivityToolbarButton(self)
 +        toolbar_box.toolbar.insert(activity_button, 0)
 +        activity_button.show()

         separator = gtk.SeparatorToolItem()
 -        separator.set_expand(True)
 -        separator.set_draw(False)
 -        toolbar.insert(separator, 0)
 +        toolbar_box.toolbar.insert(separator, -1)
 +        separator.show()
 +
 +        easier_button = ToolButton('create-easier')
 +        easier_button.set_tooltip(_('Easier level'))
 +        easier_button.connect('clicked', self._easier_button_cb)
 +        toolbar_box.toolbar.insert(easier_button, -1)

         harder_button = ToolButton('create-harder')
         harder_button.set_tooltip(_('Harder level'))
         harder_button.connect('clicked', self._harder_button_cb)
 -        toolbar.insert(harder_button, 2)
 -        harder_button.show()
 +        toolbar_box.toolbar.insert(harder_button, -1)

 -        easier_button = ToolButton('create-easier')
 -        easier_button.set_tooltip(_('Easier level'))
 -        easier_button.connect('clicked', self._easier_button_cb)
 -        toolbar.insert(easier_button, 2)
 -        easier_button.show()
 +        separator = gtk.SeparatorToolItem()
 +        separator.props.draw = False
 +        separator.set_size_request(0, -1)
 +        separator.set_expand(True)
 +        toolbar_box.toolbar.insert(separator, -1)
 +        separator.show()
 +
 +        stop_button = StopButton(self)
 +        toolbar_box.toolbar.insert(stop_button, -1)
 +        stop_button.show()
 +
 +        self.set_toolbar_box(toolbar_box)
 +        toolbar_box.show_all()

 -        return toolbar
 +        return toolbar_box

     def _easier_button_cb(self, button):
         pygame.event.post(olpcgames.eventwrap.Event(
 --
 1.7.10

 ___
 Sugar-devel mailing list
 Sugar-devel@lists.sugarlabs.org
 http://lists.sugarlabs.org/listinfo/sugar-devel



-- 
.. manuq ..
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [PATCH Maze] Maze icon in the toolbar SL #3380

2012-05-08 Thread James Cameron
Might you also fix olpcgames build_toolbar and check that sugargames
has been fixed too?

-- 
James Cameron
http://quozl.linux.org.au/
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel