[Sugar-devel] [PATCH shell] ControlPanel: fix packaging in the keyboard section

2012-09-19 Thread Simon Schampijer
From: Simon Schampijer 

- pack_start: we have to pass all arguments now with the dynamic bindings
- Gtk.ComboBox pack_start only allows for 2 arguments [1]

A follow up is to make displaying the section not crash Sugar anymore
SL #3926.

[1] http://python-gtk-3-tutorial.readthedocs.org/en/latest/combobox.html

Signed-off-by: Simon Schampijer 
---
 extensions/cpsection/keyboard/view.py | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/extensions/cpsection/keyboard/view.py 
b/extensions/cpsection/keyboard/view.py
index 587c530..085ec10 100644
--- a/extensions/cpsection/keyboard/view.py
+++ b/extensions/cpsection/keyboard/view.py
@@ -77,9 +77,9 @@ class LayoutCombo(Gtk.HBox):
 cell = Gtk.CellRendererText()
 cell.props.ellipsize = Pango.EllipsizeMode.MIDDLE
 cell.props.ellipsize_set = True
-self._klang_combo.pack_start(cell, True, True, 0)
+self._klang_combo.pack_start(cell, True)
 self._klang_combo.add_attribute(cell, 'text', 1)
-self.pack_start(self._klang_combo, expand=True, fill=True)
+self.pack_start(self._klang_combo, expand=True, fill=True, padding=0)
 
 self._kvariant_store = None
 self._kvariant_combo = Gtk.ComboBox(model=None)
@@ -89,9 +89,9 @@ class LayoutCombo(Gtk.HBox):
 cell = Gtk.CellRendererText()
 cell.props.ellipsize = Pango.EllipsizeMode.MIDDLE
 cell.props.ellipsize_set = True
-self._kvariant_combo.pack_start(cell, True, True, 0)
+self._kvariant_combo.pack_start(cell, True)
 self._kvariant_combo.add_attribute(cell, 'text', 1)
-self.pack_start(self._kvariant_combo, expand=True, fill=True)
+self.pack_start(self._kvariant_combo, expand=True, fill=True, 
padding=0)
 
 self._klang_combo.set_active(self._index)
 
@@ -205,7 +205,7 @@ class Keyboard(SectionView):
 cell = Gtk.CellRendererText()
 cell.props.ellipsize = Pango.EllipsizeMode.MIDDLE
 cell.props.ellipsize_set = True
-kmodel_combo.pack_start(cell, True, True, 0)
+kmodel_combo.pack_start(cell, True)
 kmodel_combo.add_attribute(cell, 'text', 1)
 
 self._kmodel = self._keyboard_manager.get_current_model()
@@ -265,7 +265,7 @@ class Keyboard(SectionView):
 cell = Gtk.CellRendererText()
 cell.props.ellipsize = Pango.EllipsizeMode.MIDDLE
 cell.props.ellipsize_set = True
-group_option_combo.pack_start(cell, True, True, 0)
+group_option_combo.pack_start(cell, True)
 group_option_combo.add_attribute(cell, 'text', 1)
 
 self._group_switch_option = \
-- 
1.7.11.4

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


Re: [Sugar-devel] Hidden Browse feature (from webkit I think)

2012-09-19 Thread Chris Leonard
You might also want to mention that WebKitGTK+ has not generated a
valid POT file for two years and so chances are you will be seeing
some English strings.

http://l10n.gnome.org/module/webkit/

Bugs have been on file at webkit for a while as well as one pointing
upstream to intltool, but no action has been seen in the two years
since it was first noticed.

Rather an embarrassing situation for any Gnome-based browser (Epihany
& Browse). Sad really.

cjl

On Tue, Sep 18, 2012 at 6:43 PM, Manuel Quiñones  wrote:
> 2012/9/18 Gary C Martin :
>> Hi folks,
>>
>> While I remember... Just accidentally spotted a rather nice sneaky feature 
>> in the new webkit browse (in 13.0.1 build 2). Apologies if this is old news, 
>> but is rather handy... You can type non-URL text into the Browse location 
>> field and web kit will realise it is not a valid url and will try a google 
>> search with it instead. Something for the release notes :)
>
> Yes thanks for raising this Gary, is a good improvement over the old
> gecko-based Browse, and just got a techy message in the release notes
> "Normalize and autosearch url input.".  My fault.
>
> We use exactly the same method as Epiphany to know if load an URL or
> perform a web search.
>
> Cheers,
>
> --
> .. manuq ..
> ___
> 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 Browse] Error page SL #3500

2012-09-19 Thread Manuel Kaufmann
On Tue, Sep 18, 2012 at 10:58 PM, James Cameron  wrote:
> Neat.  What method did you use to convert the image?

Python... It is my best friend :)

>>> import base64
>>> base64.b64encode(open('browse-logo.png', 'r').read())

See you,

-- 
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 Browse] Error page SL #3500

2012-09-19 Thread James Cameron
On Wed, Sep 19, 2012 at 07:54:01AM -0300, Manuel Kaufmann wrote:
> On Tue, Sep 18, 2012 at 10:58 PM, James Cameron  wrote:
> > Neat.  What method did you use to convert the image?
> 
> Python... It is my best friend :)
> 
> >>> import base64
> >>> base64.b64encode(open('browse-logo.png', 'r').read())
> 
> See you,

Thanks.  In the end I used bash and the base64 program from debian coreutils.

echo "$1 (hex)" >> index.html


-- 
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] [PATCH Browse] Error page SL #3500

2012-09-19 Thread Manuel Kaufmann
Added an "Error page" with Sugar style that informs the users about
the the page could not be loaded for any reason.

This patch contains a HTML template (error_page.tmpl) that is used to
generate the error page with the correct language.

Signed-off-by: Manuel Kaufmann 
---
 browser.py   | 22 +
 data/error_page.tmpl | 54 
 2 files changed, 76 insertions(+)
 create mode 100644 data/error_page.tmpl

diff --git a/browser.py b/browser.py
index de546f2..52e05bd 100644
--- a/browser.py
+++ b/browser.py
@@ -58,6 +58,9 @@ _NON_SEARCH_REGEX = re.compile('''
 ^file:.*$)
 ''', re.VERBOSE)
 
+DEFAULT_ERROR_PAGE = os.path.join(activity.get_bundle_path(),
+  'data/error_page.tmpl')
+
 
 class CommandListener(object):
 def __init__(self, window):
@@ -462,6 +465,7 @@ class Browser(WebKit.WebView):
  self.__mime_type_policy_cb)
 self.connect('new-window-policy-decision-requested',
  self.__new_window_policy_cb)
+self.connect('load-error', self.__load_error_cb)
 
 try:
 self.connect('run-file-chooser', self.__run_file_chooser)
@@ -603,6 +607,24 @@ class Browser(WebKit.WebView):
 downloadmanager.add_download(download, browser)
 return True
 
+def __load_error_cb(self, web_view, web_frame, uri, web_error):
+"""Show Sugar's error page"""
+
+data = {
+'page_title': _('This web page could not be loaded'),
+'title': _('This web page could not be loaded'),
+'message': _('"%s" could not be loaded. Please check for'
+ 'typing errors, and make sure you are connected '
+ 'to the internet.') % uri,
+'btn_value': _('Try again'),
+'url': uri,
+}
+
+html = open(DEFAULT_ERROR_PAGE, 'r').read() % data
+web_frame.load_alternate_string(html, '', uri)
+
+return True
+
 
 class PopupDialog(Gtk.Window):
 def __init__(self):
diff --git a/data/error_page.tmpl b/data/error_page.tmpl
new file mode 100644
index 000..68c76f2
--- /dev/null
+++ b/data/error_page.tmpl
@@ -0,0 +1,54 @@
+http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
+http://www.w3.org/1999/xhtml";>
+  
+%(page_title)s
+
+  body {
+ font-family: sans-serif;
+ text-align:center;
+ color: #a1a1a1;
+  }
+
+  #browse-logo {
+ align: center;
+ width: 130px;
+  }
+
+  p {
+ font-size: 1em;
+  }
+
+  #button {
+ color: white;
+ min-width: 150px;
+ height: 35px;
+ background-color: #a3a1a3;
+ border: 0;
+ font-size: 12pt;
+ font-weight: bold;
+ -webkit-border-radius: 20px;
+ background-image: 
url("data:image/png;base64,iVBORw0KGgoNSUhEUgAAABESCAYAAAC9+TVUBHNCSVQICAgIfAhkiAlwSFlzAAAPNgAADzYBTE5UtQAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAFeSURBVDiNlZM9SwNBEIbfXCMawcqURxohjZUkWFgJ/oR0gZBKO6sIimBhZ6e9BG3tbfwDGhERkoh6oCJoI4KNiBgei8zKZo35GBhm5+adh7n9SAEKbEJSWVJB0pykGUl3ki4k1SUdSPro6gB8XwAS+ltiut8+H1AF2p64BRwCmxZbXq1t+i5IAfg2wStQDCZ0XrQ6pp93kDGgaYU3IP4H4Dw2HcANMC5g2RuzNADgvOT1rAioWdIYEuC8YX21SFLeDuo8POsB5vT5SFLOkuaIEKfPRZIeLcmOCIktPkWSrtxYFsuSjoeAFiw23CVztuht2FGfTV3yetYFpIFn+9AEdm39BWR6ADLAtWlegElXqHjke29dDQCzdL+tCsHb2eavPVgtC5wEtR0g5UPSwBpw2QOUs/q75Z/Aqj+hW+z3aAaoA1Om2QI2gOngF9UZp3Ose5JuJZ1KOrOYDHNhfgA9ndj5pIgf9QBJRU5ErkJggg==");
+ background-position: 16px;
+ background-repeat: no-repeat;
+ text-align: center;
+ padding-left: 40px;
+ padding-right: 15px;
+  }
+
+  #container {
+  /* we need double percent sign here because
+ of Python sustitution */
+ margin: 15%%;
+  }
+
+  
+
+  
+
+  
+  %(title)s
+  %(message)s
+  
+
+  
+
-- 
1.7.11.4

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


Re: [Sugar-devel] [PATCH Browse] Error page SL #3500

2012-09-19 Thread Manuel Kaufmann
On Wed, Sep 19, 2012 at 8:38 AM, Manuel Kaufmann  wrote:
> Added an "Error page" with Sugar style that informs the users about
> the the page could not be loaded for any reason.

I had to add "--no-validate" to the "git send-email" command because
this patch has a line longer than 998 chars and it's not valid due a
SMTP limitation. I'm not sure if this patch will apply properly, if
not, please download it from SugarLabs' Trac:

 * 
http://bugs.sugarlabs.org/attachment/ticket/3500/0001-Error-page-SL-3500.2.patch

Thanks,

-- 
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 shell] ControlPanel: fix packaging in the keyboard section

2012-09-19 Thread Manuel Quiñones
Thanks Simon, great this patches finish the pack_start API change, and
consider the comboboxes pack_start which is different.  Great.  So we
have #3925 to follow up that issue.  You can push all three patches.

2012/9/19 Simon Schampijer :
> From: Simon Schampijer 
>
> - pack_start: we have to pass all arguments now with the dynamic bindings
> - Gtk.ComboBox pack_start only allows for 2 arguments [1]
>
> A follow up is to make displaying the section not crash Sugar anymore
> SL #3926.
>
> [1] http://python-gtk-3-tutorial.readthedocs.org/en/latest/combobox.html
>
> Signed-off-by: Simon Schampijer 
> ---
>  extensions/cpsection/keyboard/view.py | 12 ++--
>  1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/extensions/cpsection/keyboard/view.py 
> b/extensions/cpsection/keyboard/view.py
> index 587c530..085ec10 100644
> --- a/extensions/cpsection/keyboard/view.py
> +++ b/extensions/cpsection/keyboard/view.py
> @@ -77,9 +77,9 @@ class LayoutCombo(Gtk.HBox):
>  cell = Gtk.CellRendererText()
>  cell.props.ellipsize = Pango.EllipsizeMode.MIDDLE
>  cell.props.ellipsize_set = True
> -self._klang_combo.pack_start(cell, True, True, 0)
> +self._klang_combo.pack_start(cell, True)
>  self._klang_combo.add_attribute(cell, 'text', 1)
> -self.pack_start(self._klang_combo, expand=True, fill=True)
> +self.pack_start(self._klang_combo, expand=True, fill=True, padding=0)
>
>  self._kvariant_store = None
>  self._kvariant_combo = Gtk.ComboBox(model=None)
> @@ -89,9 +89,9 @@ class LayoutCombo(Gtk.HBox):
>  cell = Gtk.CellRendererText()
>  cell.props.ellipsize = Pango.EllipsizeMode.MIDDLE
>  cell.props.ellipsize_set = True
> -self._kvariant_combo.pack_start(cell, True, True, 0)
> +self._kvariant_combo.pack_start(cell, True)
>  self._kvariant_combo.add_attribute(cell, 'text', 1)
> -self.pack_start(self._kvariant_combo, expand=True, fill=True)
> +self.pack_start(self._kvariant_combo, expand=True, fill=True, 
> padding=0)
>
>  self._klang_combo.set_active(self._index)
>
> @@ -205,7 +205,7 @@ class Keyboard(SectionView):
>  cell = Gtk.CellRendererText()
>  cell.props.ellipsize = Pango.EllipsizeMode.MIDDLE
>  cell.props.ellipsize_set = True
> -kmodel_combo.pack_start(cell, True, True, 0)
> +kmodel_combo.pack_start(cell, True)
>  kmodel_combo.add_attribute(cell, 'text', 1)
>
>  self._kmodel = self._keyboard_manager.get_current_model()
> @@ -265,7 +265,7 @@ class Keyboard(SectionView):
>  cell = Gtk.CellRendererText()
>  cell.props.ellipsize = Pango.EllipsizeMode.MIDDLE
>  cell.props.ellipsize_set = True
> -group_option_combo.pack_start(cell, True, True, 0)
> +group_option_combo.pack_start(cell, True)
>  group_option_combo.add_attribute(cell, 'text', 1)
>
>  self._group_switch_option = \
> --
> 1.7.11.4
>
> ___
> 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] [IAEP] Sugar Digest 2012-09-18

2012-09-19 Thread James Simmons
Walter,

First, congrats on the grandchild.

Second, I am intrigued by the statement that 10% of Sugar Activities were
written by children who grew up with Sugar.  That is an incredible
accomplishment, and it makes me wish that the ASLO website had a Collection
of those Activities.  If something like that existed I could see what kinds
of Activities they were doing, how many were programs written for other
environments using a Sugar wrapper, how many are purely Sugar Activities,
who the developers are, what Sugar features are they using and not using,
how popular the Activities are, etc.

It would also give our younger developers a way to stand up and be counted.

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


Re: [Sugar-devel] Adventures in the land of ENOSPC

2012-09-19 Thread Martin Langhoff
On Sat, Sep 15, 2012 at 8:03 AM, Sascha Silbe  wrote:
> Martin Langhoff  writes:
>
>> Manuel Kaufmann has been looking at SL#394, and looking at the bug
>> report, it struck me that it was reported backwards. I would have
>> written: "I filled up my disk and it knocked the system out, Sugar
>> would not start again, etc. Oh, btw, it was with Browse".
>
> I agree. Every single mishandling of ENOSPC is a bug in the affected
> piece of software and should be fixed. However, there's a lot of broken

In our case, 99% of the time is the datastore. And when it borks, it
messes up its indexes so it _has_ the files and the metadata, but will
show you an empty listing for the Journal.

> Similarly, the data store should take care to leave some free

The datastore needs to handle ENOSPC correctly. That is much much
deeper than what we can do activity-side.

> Sounds like SL#2317 [1], as Gonzalo already pointed out.

Indeed, and the problem is that index_updated remains on disk all the
time. I am causing ENOSPC artificially, and creating or updating
journal entries against ENOSPC and... index_updated is never removed.

BTW, to test this I am putting sugar's own logs on tmpfs, which you
can do with a file like this:

# cat /etc/statetab.d/olpc.debug
/home/olpc/.sugar/default/logs

cheers,



m
-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- Software Architect - OLPC
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [IAEP] Sugar Digest 2012-09-18

2012-09-19 Thread S. Daniel Francis
2012/9/19 James Simmons :
> Walter,
>
> First, congrats on the grandchild.
>
> Second, I am intrigued by the statement that 10% of Sugar Activities were
> written by children who grew up with Sugar.  That is an incredible
> accomplishment, and it makes me wish that the ASLO website had a Collection
> of those Activities.  If something like that existed I could see what kinds
> of Activities they were doing, how many were programs written for other
> environments using a Sugar wrapper, how many are purely Sugar Activities,
> who the developers are, what Sugar features are they using and not using,
> how popular the Activities are, etc.

Hello James,
I feel identified with what Walter described so I dare to answer. I'm
from Uruguay and I'm thirteen years old. I'm one of the activity
developers in transition to Sugar contributor. I don't know other
young Sugar contributors outside Uruguay, so I'll tell you about the
situation here.

About one year ago, children made activities often as a hobbie, that
activities had not a reasonable aim and they weren't very well
integrated with Sugar.

Some examples:
Agubrowser by Agustin Zubiaga:
This activity was based on webkit when Browse used python-hulahop (gecko).
http://activities.sugarlabs.org/en-US/sugar/addon/4419
Sugar File Manager by Ignacio Rodríguez and me:
Based on Sugar Commander and JAMexplorer, with some improvements.
http://activities.sugarlabs.org/en-US/sugar/addon/4494

Actually, we make activities thinking in its utility, but our aim is
still learn with what we do.
I leave here some of the activities that make us feel proud:

TerronesWeeper: A "mines" game for CeibalJAM!, the Uruguayan OLPC
community, which is represented with a Terrón[1].
http://activities.sugarlabs.org//en-US/sugar/addon/4520

Chart: Made with help of adults and now available at the official OLPC build.
http://activities.sugarlabs.org/en-US/sugar/addon/4534

Graph Plotter: Mathematical function plotter.
http://wiki.sugarlabs.org/go/Activities/Graph_Plotter

JAMath: Other game for CeibalJAM. I'm not sure, but I think this
activity is only available in Spanish.
http://activities.sugarlabs.org/en-US/sugar/addon/4595

Sorry if I forget other activities.

Cheers,
Daniel.

[1] http://ceibaljam.org/drupal/?q=node/741
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [IAEP] Sugar Digest 2012-09-18

2012-09-19 Thread Alan Jhonn Aguiar Schwyn
> From: fran...@sugarlabs.org
> Date: Wed, 19 Sep 2012 13:42:37 -0300
> To: nices...@gmail.com
> CC: i...@lists.sugarlabs.org; sugar-devel@lists.sugarlabs.org; 
> community-n...@lists.sugarlabs.org; walter.ben...@gmail.com
> Subject: Re: [Sugar-devel] [IAEP] Sugar Digest 2012-09-18
> 
> 2012/9/19 James Simmons :
> > Walter,
> >
> > First, congrats on the grandchild.
> >
> > Second, I am intrigued by the statement that 10% of Sugar Activities were
> > written by children who grew up with Sugar.  That is an incredible
> > accomplishment, and it makes me wish that the ASLO website had a Collection
> > of those Activities.  If something like that existed I could see what kinds
> > of Activities they were doing, how many were programs written for other
> > environments using a Sugar wrapper, how many are purely Sugar Activities,
> > who the developers are, what Sugar features are they using and not using,
> > how popular the Activities are, etc.
> 
> Hello James,
> I feel identified with what Walter described so I dare to answer. I'm
> from Uruguay and I'm thirteen years old. I'm one of the activity
> developers in transition to Sugar contributor. I don't know other
> young Sugar contributors outside Uruguay, so I'll tell you about the
> situation here.
> 
> About one year ago, children made activities often as a hobbie, that
> activities had not a reasonable aim and they weren't very well
> integrated with Sugar.
> 
> Some examples:
> Agubrowser by Agustin Zubiaga:
> This activity was based on webkit when Browse used python-hulahop (gecko).
> http://activities.sugarlabs.org/en-US/sugar/addon/4419
> Sugar File Manager by Ignacio Rodríguez and me:
> Based on Sugar Commander and JAMexplorer, with some improvements.
> http://activities.sugarlabs.org/en-US/sugar/addon/4494
> 
> Actually, we make activities thinking in its utility, but our aim is
> still learn with what we do.
> I leave here some of the activities that make us feel proud:
> 
> TerronesWeeper: A "mines" game for CeibalJAM!, the Uruguayan OLPC
> community, which is represented with a Terrón[1].
> http://activities.sugarlabs.org//en-US/sugar/addon/4520
> 
> Chart: Made with help of adults and now available at the official OLPC build.
> http://activities.sugarlabs.org/en-US/sugar/addon/4534
> 
> Graph Plotter: Mathematical function plotter.
> http://wiki.sugarlabs.org/go/Activities/Graph_Plotter
> 
> JAMath: Other game for CeibalJAM. I'm not sure, but I think this
> activity is only available in Spanish.
> http://activities.sugarlabs.org/en-US/sugar/addon/4595
> 
> Sorry if I forget other activities.

One more of Cristhoper Travieso; Convert:
http://activities.sugarlabs.org/en-US/sugar/addon/4597

> 
> Cheers,
> Daniel.
> 
> [1] http://ceibaljam.org/drupal/?q=node/741
> ___
> 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] [IAEP] Sugar Digest 2012-09-18

2012-09-19 Thread Walter Bender
On Wed, Sep 19, 2012 at 12:52 PM, Alan Jhonn Aguiar Schwyn
 wrote:
>> From: fran...@sugarlabs.org
>> Date: Wed, 19 Sep 2012 13:42:37 -0300
>> To: nices...@gmail.com
>> CC: i...@lists.sugarlabs.org; sugar-devel@lists.sugarlabs.org;
>> community-n...@lists.sugarlabs.org; walter.ben...@gmail.com
>> Subject: Re: [Sugar-devel] [IAEP] Sugar Digest 2012-09-18
>
>>
>> 2012/9/19 James Simmons :
>> > Walter,
>> >
>> > First, congrats on the grandchild.
>> >
>> > Second, I am intrigued by the statement that 10% of Sugar Activities
>> > were
>> > written by children who grew up with Sugar. That is an incredible
>> > accomplishment, and it makes me wish that the ASLO website had a
>> > Collection
>> > of those Activities. If something like that existed I could see what
>> > kinds
>> > of Activities they were doing, how many were programs written for other
>> > environments using a Sugar wrapper, how many are purely Sugar
>> > Activities,
>> > who the developers are, what Sugar features are they using and not
>> > using,
>> > how popular the Activities are, etc.
>>
>> Hello James,
>> I feel identified with what Walter described so I dare to answer. I'm
>> from Uruguay and I'm thirteen years old. I'm one of the activity
>> developers in transition to Sugar contributor. I don't know other
>> young Sugar contributors outside Uruguay, so I'll tell you about the
>> situation here.
>>
>> About one year ago, children made activities often as a hobbie, that
>> activities had not a reasonable aim and they weren't very well
>> integrated with Sugar.
>>
>> Some examples:
>> Agubrowser by Agustin Zubiaga:
>> This activity was based on webkit when Browse used python-hulahop (gecko).
>> http://activities.sugarlabs.org/en-US/sugar/addon/4419
>> Sugar File Manager by Ignacio Rodríguez and me:
>> Based on Sugar Commander and JAMexplorer, with some improvements.
>> http://activities.sugarlabs.org/en-US/sugar/addon/4494
>>
>> Actually, we make activities thinking in its utility, but our aim is
>> still learn with what we do.
>> I leave here some of the activities that make us feel proud:
>>
>> TerronesWeeper: A "mines" game for CeibalJAM!, the Uruguayan OLPC
>> community, which is represented with a Terrón[1].
>> http://activities.sugarlabs.org//en-US/sugar/addon/4520
>>
>> Chart: Made with help of adults and now available at the official OLPC
>> build.
>> http://activities.sugarlabs.org/en-US/sugar/addon/4534
>>
>> Graph Plotter: Mathematical function plotter.
>> http://wiki.sugarlabs.org/go/Activities/Graph_Plotter
>>
>> JAMath: Other game for CeibalJAM. I'm not sure, but I think this
>> activity is only available in Spanish.
>> http://activities.sugarlabs.org/en-US/sugar/addon/4595
>>
>> Sorry if I forget other activities.
>
>
> One more of Cristhoper Travieso; Convert:
>
> http://activities.sugarlabs.org/en-US/sugar/addon/4597
>
>
>>
>> Cheers,
>> Daniel.
>>
>> [1] http://ceibaljam.org/drupal/?q=node/741
>> ___
>> Sugar-devel mailing list
>> Sugar-devel@lists.sugarlabs.org
>> http://lists.sugarlabs.org/listinfo/sugar-devel

There are some from outside of .UY as well...  but if you look for

http://activities.sugarlabs.org/en-US/sugar/user/1862 (24 activities)
or
http://activities.sugarlabs.org/en-US/sugar/user/5067 (8 activities)
or
http://activities.sugarlabs.org/en-US/sugar/user/3643 (6 activities)
or
http://activities.sugarlabs.org/en-US/sugar/user/283 (6 activities)

regards.

-walter

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


Re: [Sugar-devel] [IAEP] Sugar Digest 2012-09-18

2012-09-19 Thread S. Daniel Francis
2012/9/19 Walter Bender :
> There are some from outside of .UY as well...
Walter,
Can you tell us about the activities outside of .UY, please?
I never hear about them and would be of interest for some people in
these mailing lists, including myself.
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


[Sugar-devel] [ASLO] Release Conozco Sri Lanka-1

2012-09-19 Thread Sugar Labs Activities
Activity Homepage:
http://activities.sugarlabs.org/addon/4600

Sugar Platform:
0.82 - 0.98

Download Now:
http://activities.sugarlabs.org/downloads/file/28223/i_know_sri_lanka-1.xo

Release notes:
First version


Sugar Labs Activities
http://activities.sugarlabs.org

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


Re: [Sugar-devel] [IAEP] Sugar Digest 2012-09-18

2012-09-19 Thread James Simmons
Daniel,

I'm going to try these out when I get home.  It looks like you guys have
done some really good work.  You may know that Sugar Commander was one of
mine.  I'm looking forward to seeing what you did with it.  The other stuff
looks impressive too.

I agree with Walter that having young people work on Sugar Activities and
on Sugar itself is an important demonstration that what we're trying to do
with OLPC and Sugar actually works.

James Simmons


On Wed, Sep 19, 2012 at 11:42 AM, S. Daniel Francis
wrote:

> 2012/9/19 James Simmons :
> > Walter,
> >
> > First, congrats on the grandchild.
> >
> > Second, I am intrigued by the statement that 10% of Sugar Activities were
> > written by children who grew up with Sugar.  That is an incredible
> > accomplishment, and it makes me wish that the ASLO website had a
> Collection
> > of those Activities.  If something like that existed I could see what
> kinds
> > of Activities they were doing, how many were programs written for other
> > environments using a Sugar wrapper, how many are purely Sugar Activities,
> > who the developers are, what Sugar features are they using and not using,
> > how popular the Activities are, etc.
>
> Hello James,
> I feel identified with what Walter described so I dare to answer. I'm
> from Uruguay and I'm thirteen years old. I'm one of the activity
> developers in transition to Sugar contributor. I don't know other
> young Sugar contributors outside Uruguay, so I'll tell you about the
> situation here.
>
> About one year ago, children made activities often as a hobbie, that
> activities had not a reasonable aim and they weren't very well
> integrated with Sugar.
>
> Some examples:
> Agubrowser by Agustin Zubiaga:
> This activity was based on webkit when Browse used python-hulahop (gecko).
> http://activities.sugarlabs.org/en-US/sugar/addon/4419
> Sugar File Manager by Ignacio Rodríguez and me:
> Based on Sugar Commander and JAMexplorer, with some improvements.
> http://activities.sugarlabs.org/en-US/sugar/addon/4494
>
> Actually, we make activities thinking in its utility, but our aim is
> still learn with what we do.
> I leave here some of the activities that make us feel proud:
>
> TerronesWeeper: A "mines" game for CeibalJAM!, the Uruguayan OLPC
> community, which is represented with a Terrón[1].
> http://activities.sugarlabs.org//en-US/sugar/addon/4520
>
> Chart: Made with help of adults and now available at the official OLPC
> build.
> http://activities.sugarlabs.org/en-US/sugar/addon/4534
>
> Graph Plotter: Mathematical function plotter.
> http://wiki.sugarlabs.org/go/Activities/Graph_Plotter
>
> JAMath: Other game for CeibalJAM. I'm not sure, but I think this
> activity is only available in Spanish.
> http://activities.sugarlabs.org/en-US/sugar/addon/4595
>
> Sorry if I forget other activities.
>
> Cheers,
> Daniel.
>
> [1] http://ceibaljam.org/drupal/?q=node/741
>
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [IAEP] Sugar Digest 2012-09-18

2012-09-19 Thread Chris Leonard
On Wed, Sep 19, 2012 at 3:04 PM, James Simmons  wrote:
> Daniel,
>
> I'm going to try these out when I get home.  It looks like you guys have
> done some really good work.  You may know that Sugar Commander was one of
> mine.  I'm looking forward to seeing what you did with it.  The other stuff
> looks impressive too.
>
> I agree with Walter that having young people work on Sugar Activities and on
> Sugar itself is an important demonstration that what we're trying to do with
> OLPC and Sugar actually works.
>
> James Simmons

Daniel has been diligent about setting up i18n on his activities; but
it would be wonderful if some of our more experienced activity
developers could mentor some of these other young developers on
setting their activities up for translation on Pootle.

This will sometimes involve a switch to en_US strings in the code-base
from Spanish originals, as English is generally the common language of
our localizers.  Please don't make me try to recruit Spanish-speaking
Khmer translators :-)

cjl
Sugar Labs Translation Team Coordinator
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [sugar-toolkit-gtk3] Set getter an setter in icon_name property - SL #3849

2012-09-19 Thread Gonzalo Odiard
Today we explored with Simon different alternatives:

- override the icon-name property and fallback to what we do in
set_named_icon
- override the icon-name property and print a warning to use 'named_icon'
- override the icon-name property, do what we do in set_named_icon and
remove the named_icon property (there is not a better moment to do the last
one than now, if we think this is the right thing to do)

In toolbutton, we are using the icon_name property:

def __init__(self, icon_name=None, **kwargs):
.
if icon_name:
self.set_icon(icon_name)

def set_icon(self, icon_name):
icon = Icon(icon_name=icon_name)
self.set_icon_widget(icon)
icon.show()

icon_name = GObject.property(type=str, setter=set_icon)

In toogletoolbutton we are using named_icon and can be set as a parameter
when created,
there are a set_named_icon but there are not a property:

def __init__(self, named_icon=None):

self.set_named_icon(named_icon)

def set_named_icon(self, named_icon):
icon = Icon(icon_name=named_icon)
self.set_icon_widget(icon)
icon.show()

And in radiotoolbutton there are a property and a method named_icon, but
can't be set at creation time:

def __init__(self, **kwargs):

def set_named_icon(self, named_icon):
icon = Icon(icon_name=named_icon,
xo_color=self._xo_color,
icon_size=Gtk.IconSize.LARGE_TOOLBAR)
self.set_icon_widget(icon)
icon.show()

def get_named_icon(self):
if self.props.icon_widget is not None:
return self.props.icon_widget.props.icon_name
else:
return None

named_icon = GObject.property(type=str, setter=set_named_icon,
  getter=get_named_icon)

(icon_name is a property of Gtk.Gtk.RadioToolButton, but is not set in the
same way,
and the button looks bigger)

I think we should have a consistent API, doing the same than in toolbutton.

Questions:

1) Do you agree with have a consistent API and do the change now in gtk3
toolkit?
2) What should we do with the old named_icon properties? Remove it?
Mark as deprecated?
How?

For reference, this is the use of named_icon in activities, remember this
is a change for gtk3 only, gtk2 activities don't need to do changes:

[gonzalo@nautilus honey]$ grep -rn named_icon * --include=*.py
abacus/mainline/toolbar_utils.py:90:button.set_named_icon(button_name)
abacus/abacus-gtk3/toolbar_utils.py:45:button.set_named_icon(icon_name)
calculate/mainline/toolbars.py:66:
 self.set_named_icon(items[0]['icon'])
calculate/mainline/toolbars.py:79:
 self.set_named_icon(but['icon'])
clock/mainline/clock.py:262:button1 =
RadioToolButton(named_icon="simple-clock")
clock/mainline/clock.py:267:button2 =
RadioToolButton(named_icon="nice-clock",
clock/mainline/clock.py:273:button3 =
RadioToolButton(named_icon="digital-clock",
implode/mainline/implodeactivity.py:175:button =
RadioToolButton(named_icon=icon_name,
implode/mainline/implodeactivity.py:178:button =
RadioToolButton(named_icon=icon_name)
labyrinth/mainline/labyrinthactivity.py:353:self._parent.mods[1] =
RadioToolButton(named_icon='text-mode')
labyrinth/mainline/labyrinthactivity.py:361:self._parent.mods[2] =
RadioToolButton(named_icon='image-mode')
labyrinth/mainline/labyrinthactivity.py:369:self._parent.mods[3] =
RadioToolButton(named_icon='draw-mode')
labyrinth/mainline/labyrinthactivity.py:377:self._parent.mods[5] =
RadioToolButton(named_icon='label-mode')
measure/mainline/sensor_toolbar.py:88:
 self.time.set_named_icon('media-audio')
measure/mainline/sensor_toolbar.py:96:
 self.resistance.set_named_icon('resistance')
measure/mainline/sensor_toolbar.py:107:
 self.voltage.set_named_icon('voltage')
memorize/mainline/createtoolbar.py:101:
 self._equal_pairs.set_named_icon('pair-equals')
memorize/mainline/createtoolbar.py:105:
 self._equal_pairs.set_named_icon('pair-non-equals')
memorize/mainline/createtoolbar.py:114:
 self._grouped.set_named_icon('grouped_game2')
memorize/mainline/createtoolbar.py:118:
 self._grouped.set_named_icon('grouped_game1')
memorize/mainline/createcardpanel.py:332:
 named_icon='speak')
memorize/mainline/activity.py:215:
 button.set_named_icon('player_play')
memorize/mainline/activity.py:219:
 button.set_named_icon('view-source')
paint/mainline/toolbox.py:232:RadioToolButton.__init__(self,
named_icon=icon_name)
physics/mainline/activity.py:151:button =
RadioToolButton(named_icon=c.icon)
portfolio/portfolio/toolbar_utils.py:90:
 button.set_named_icon(button_name)
read/mainline/speechtoolbar.py:132:
 self.play_btn.set_named_icon('media-playback-start')
read/mainline/speechtoolbar.py:138:
 self.play_btn.set_named_icon('media-playback-pause')
read/mainline/speechtoolbar.py:142:
 self.play_btn.set_named_icon('media-playback-start')
re

Re: [Sugar-devel] [IAEP] Sugar Digest 2012-09-18

2012-09-19 Thread James Simmons
There is a write up explaining how to do 18n in Sugar Activities:

http://en.flossmanuals.net/como-hacer-una-actividad-sugar/internacionalizarse-con-pootle-god-100/

Above is the Spanish version.  I understand there is an English version too.

James Simmons


On Wed, Sep 19, 2012 at 2:11 PM, Chris Leonard wrote:

> On Wed, Sep 19, 2012 at 3:04 PM, James Simmons  wrote:
> > Daniel,
> >
> > I'm going to try these out when I get home.  It looks like you guys have
> > done some really good work.  You may know that Sugar Commander was one of
> > mine.  I'm looking forward to seeing what you did with it.  The other
> stuff
> > looks impressive too.
> >
> > I agree with Walter that having young people work on Sugar Activities
> and on
> > Sugar itself is an important demonstration that what we're trying to do
> with
> > OLPC and Sugar actually works.
> >
> > James Simmons
>
> Daniel has been diligent about setting up i18n on his activities; but
> it would be wonderful if some of our more experienced activity
> developers could mentor some of these other young developers on
> setting their activities up for translation on Pootle.
>
> This will sometimes involve a switch to en_US strings in the code-base
> from Spanish originals, as English is generally the common language of
> our localizers.  Please don't make me try to recruit Spanish-speaking
> Khmer translators :-)
>
> cjl
> Sugar Labs Translation Team Coordinator
>
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


[Sugar-devel] [sugar-toolkit-gtk3] Add management of summary property to the activity.info file

2012-09-19 Thread godiard
From: Gonzalo Odiard 

This summary is translatable aas the name and will be displayed
in the activivity list in the home view.

Signed-off-by: Gonzalo Odiard 
---
 src/sugar3/activity/bundlebuilder.py |  9 +
 src/sugar3/bundle/activitybundle.py  | 15 +++
 2 files changed, 24 insertions(+)

diff --git a/src/sugar3/activity/bundlebuilder.py 
b/src/sugar3/activity/bundlebuilder.py
index bcc7aa9..bebecfe 100644
--- a/src/sugar3/activity/bundlebuilder.py
+++ b/src/sugar3/activity/bundlebuilder.py
@@ -77,6 +77,7 @@ class Config(object):
 self.tar_root_dir = None
 self.xo_name = None
 self.tar_name = None
+self.summary = None
 
 self.update()
 
@@ -85,6 +86,7 @@ class Config(object):
 self.version = bundle.get_activity_version()
 self.activity_name = bundle.get_bundle_name()
 self.bundle_id = bundle.get_bundle_id()
+self.summary = bundle.get_summary()
 self.bundle_name = reduce(operator.add, self.activity_name.split())
 self.bundle_root_dir = self.bundle_name + '.activity'
 self.tar_root_dir = '%s-%s' % (self.bundle_name, self.version)
@@ -136,9 +138,11 @@ class Builder(object):
 
 cat = gettext.GNUTranslations(open(mo_file, 'r'))
 translated_name = cat.gettext(self.config.activity_name)
+translated_summary = cat.gettext(self.config.summary)
 linfo_file = os.path.join(localedir, 'activity.linfo')
 f = open(linfo_file, 'w')
 f.write('[Activity]\nname = %s\n' % translated_name)
+f.write('summary = %s\n' % translated_summary)
 f.close()
 
 def get_files(self):
@@ -346,6 +350,11 @@ def cmd_genpot(config, args):
 f.write('#: activity/activity.info:2\n')
 f.write('msgid "%s"\n' % escaped_name)
 f.write('msgstr ""\n')
+if config.summary is not None:
+escaped_summary = re.sub('(["])', '\\1', config.summary)
+f.write('#: activity/activity.info:3\n')
+f.write('msgid "%s"\n' % escaped_summary)
+f.write('msgstr ""\n')
 f.close()
 
 args = ['xgettext', '--join-existing', '--language=Python',
diff --git a/src/sugar3/bundle/activitybundle.py 
b/src/sugar3/bundle/activitybundle.py
index 2313f41..f7933ef 100644
--- a/src/sugar3/bundle/activitybundle.py
+++ b/src/sugar3/bundle/activitybundle.py
@@ -61,6 +61,8 @@ class ActivityBundle(Bundle):
 self._show_launcher = True
 self._tags = None
 self._activity_version = '0'
+self._summary = None
+self._local_summary = None
 self._installation_time = os.stat(path).st_mtime
 
 info_file = self.get_file('activity/activity.info')
@@ -75,6 +77,9 @@ class ActivityBundle(Bundle):
 if self._local_name == None:
 self._local_name = self._name
 
+if self._local_summary == None:
+self._local_summary = self._summary
+
 def _parse_info(self, info_file):
 cp = ConfigParser()
 cp.readfp(info_file)
@@ -126,6 +131,9 @@ class ActivityBundle(Bundle):
 (self._path, version))
 self._activity_version = version
 
+if cp.has_option(section, 'summary'):
+self._summary = cp.get(section, 'summary')
+
 def _get_linfo_file(self):
 lang = locale.getdefaultlocale()[0]
 if not lang:
@@ -152,6 +160,9 @@ class ActivityBundle(Bundle):
 if cp.has_option(section, 'name'):
 self._local_name = cp.get(section, 'name')
 
+if cp.has_option(section, 'summary'):
+self._local_summary = cp.get(section, 'summary')
+
 if cp.has_option(section, 'tags'):
 tag_list = cp.get(section, 'tags').strip(';')
 self._tags = [tag.strip() for tag in tag_list.split(';')]
@@ -225,6 +236,10 @@ class ActivityBundle(Bundle):
 """Get the tags that describe the activity"""
 return self._tags
 
+def get_summary(self):
+"""Get the summary that describe the activity"""
+return self._local_summary
+
 def get_show_launcher(self):
 """Get whether there should be a visible launcher for the activity"""
 return self._show_launcher
-- 
1.7.11.4

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


Re: [Sugar-devel] [sugar-toolkit-gtk3] Set getter an setter in icon_name property - SL #3849

2012-09-19 Thread Simon Schampijer

Hi Gonzalo,

thanks for this great writeup!

On 09/19/2012 09:13 PM, Gonzalo Odiard wrote:
> Today we explored with Simon different alternatives:
>
> - override the icon-name property and fallback to what we do in
> set_named_icon
> - override the icon-name property and print a warning to use 'named_icon'
> - override the icon-name property, do what we do in set_named_icon and
> remove the named_icon property (there is not a better moment to do 
the last

> one than now, if we think this is the right thing to do)
>
> In toolbutton, we are using the icon_name property:
>
>  def __init__(self, icon_name=None, **kwargs):
>  .
>  if icon_name:
>  self.set_icon(icon_name)
>
>  def set_icon(self, icon_name):
>  icon = Icon(icon_name=icon_name)
>  self.set_icon_widget(icon)
>  icon.show()
>
>  icon_name = GObject.property(type=str, setter=set_icon)
>
> In toogletoolbutton we are using named_icon and can be set as a parameter
> when created,
> there are a set_named_icon but there are not a property:
>
>  def __init__(self, named_icon=None):
>  
>  self.set_named_icon(named_icon)
>
>  def set_named_icon(self, named_icon):
>  icon = Icon(icon_name=named_icon)
>  self.set_icon_widget(icon)
>  icon.show()
>
> And in radiotoolbutton there are a property and a method named_icon, but
> can't be set at creation time:
>
>  def __init__(self, **kwargs):
>
>  def set_named_icon(self, named_icon):
>  icon = Icon(icon_name=named_icon,
>  xo_color=self._xo_color,
>  icon_size=Gtk.IconSize.LARGE_TOOLBAR)
>  self.set_icon_widget(icon)
>  icon.show()
>
>  def get_named_icon(self):
>  if self.props.icon_widget is not None:
>  return self.props.icon_widget.props.icon_name
>  else:
>  return None
>
>  named_icon = GObject.property(type=str, setter=set_named_icon,
>getter=get_named_icon)
>
> (icon_name is a property of Gtk.Gtk.RadioToolButton, but is not set 
in the

> same way,
> and the button looks bigger)
>
> I think we should have a consistent API, doing the same than in 
toolbutton.


Agreed!

> Questions:
>
> 1) Do you agree with have a consistent API and do the change now in gtk3
> toolkit?

Yes, we should do the change now, before we have more activities to be 
ported over.


> 2) What should we do with the old named_icon properties? Remove it?
> Mark as deprecated?
> How?

The activities in your list are not all ported yet (e.g. TamTam) so that 
can be part of the porting.


If an API is considered stable you would normally announce the 
deprecation and add warnings. See for example how we handled the keep 
button. Then after a some time you remove the API completely. In this 
case as the toolkit-gtk3 is new and the state is arguable we might get 
away in doing it a bit more radical.


If we only keep the 'icon-name' property and remove 'named-icon' is it 
doable form the existing ported activities side? If too heavy we go the 
deprecated step. In any case, we should make all that API the same.


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


[Sugar-devel] Debugging sugar-datastore (and similar dbus-connected services)

2012-09-19 Thread Martin Langhoff
I'm debugging odd situations w Sugar datastore, and I wonder whether
there is any tricks to debugging python programs that are run under
dbus.

I can see the sugar-datastore PID growing steadily while I test, which
means that it's dying and respawning plenty, likely from unhandled
exceptions...

thanks,



m
-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- Software Architect - OLPC
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


[Sugar-devel] [sugar-toolkit-gtk3] Make icon_name api consistent between the different toolbuttons

2012-09-19 Thread godiard
From: Gonzalo Odiard 

As discused in the mailing list [1] the api to set the icon in sugar
ToolButton, RadioToolButton and ToggleToolButton is inconsistent,
and with the port to gtk3 differences are visible as a wrong size (SL #3849)

Signed-off-by: Gonzalo Odiard 

[1] http://lists.sugarlabs.org/archive/sugar-devel/2012-September/039624.html
---
 src/sugar3/graphics/radiotoolbutton.py  | 20 +++-
 src/sugar3/graphics/toggletoolbutton.py | 11 +++
 2 files changed, 14 insertions(+), 17 deletions(-)

diff --git a/src/sugar3/graphics/radiotoolbutton.py 
b/src/sugar3/graphics/radiotoolbutton.py
index 006d167..290e7c2 100644
--- a/src/sugar3/graphics/radiotoolbutton.py
+++ b/src/sugar3/graphics/radiotoolbutton.py
@@ -36,7 +36,7 @@ class RadioToolButton(Gtk.RadioToolButton):
 
 __gtype_name__ = 'SugarRadioToolButton'
 
-def __init__(self, **kwargs):
+def __init__(self, icon_name=None, **kwargs):
 self._accelerator = None
 self._tooltip = None
 self._xo_color = None
@@ -45,6 +45,8 @@ class RadioToolButton(Gtk.RadioToolButton):
 GObject.GObject.__init__(self, **kwargs)
 
 self._palette_invoker.attach_tool(self)
+if icon_name:
+self.set_icon(icon_name)
 
 self.connect('destroy', self.__destroy_cb)
 
@@ -115,21 +117,13 @@ class RadioToolButton(Gtk.RadioToolButton):
 accelerator = GObject.property(type=str, setter=set_accelerator,
 getter=get_accelerator)
 
-def set_named_icon(self, named_icon):
-icon = Icon(icon_name=named_icon,
-xo_color=self._xo_color,
-icon_size=Gtk.IconSize.LARGE_TOOLBAR)
+def set_icon(self, icon_name):
+icon = Icon(icon_name=icon_name,
+xo_color=self._xo_color)
 self.set_icon_widget(icon)
 icon.show()
 
-def get_named_icon(self):
-if self.props.icon_widget is not None:
-return self.props.icon_widget.props.icon_name
-else:
-return None
-
-named_icon = GObject.property(type=str, setter=set_named_icon,
-  getter=get_named_icon)
+icon_name = GObject.property(type=str, setter=set_icon)
 
 def set_xo_color(self, xo_color):
 if self._xo_color != xo_color:
diff --git a/src/sugar3/graphics/toggletoolbutton.py 
b/src/sugar3/graphics/toggletoolbutton.py
index 56d461d..39ba0c8 100644
--- a/src/sugar3/graphics/toggletoolbutton.py
+++ b/src/sugar3/graphics/toggletoolbutton.py
@@ -30,11 +30,12 @@ class ToggleToolButton(Gtk.ToggleToolButton):
 
 __gtype_name__ = 'SugarToggleToolButton'
 
-def __init__(self, named_icon=None):
+def __init__(self, icon_name=None):
 GObject.GObject.__init__(self)
 
 self._palette_invoker = ToolInvoker(self)
-self.set_named_icon(named_icon)
+if icon_name:
+self.set_icon(icon_name)
 
 self.connect('destroy', self.__destroy_cb)
 
@@ -42,11 +43,13 @@ class ToggleToolButton(Gtk.ToggleToolButton):
 if self._palette_invoker is not None:
 self._palette_invoker.detach()
 
-def set_named_icon(self, named_icon):
-icon = Icon(icon_name=named_icon)
+def set_icon(self, icon_name):
+icon = Icon(icon_name=icon_name)
 self.set_icon_widget(icon)
 icon.show()
 
+icon_name = GObject.property(type=str, setter=set_icon)
+
 def create_palette(self):
 return None
 
-- 
1.7.11.4

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


[Sugar-devel] [sugar] Replace named_icon by icon_name in ToolButton and similar

2012-09-19 Thread godiard
From: Gonzalo Odiard 

This change is needed by the change done in sigar-toolkit-gtk3

Signed-off-by: Gonzalo Odiard 
---
 src/jarabe/desktop/homebox.py| 4 ++--
 src/jarabe/frame/zoomtoolbar.py  | 2 +-
 src/jarabe/journal/volumestoolbar.py | 6 +++---
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/jarabe/desktop/homebox.py b/src/jarabe/desktop/homebox.py
index 59550e9..1d84c2d 100644
--- a/src/jarabe/desktop/homebox.py
+++ b/src/jarabe/desktop/homebox.py
@@ -192,7 +192,7 @@ class HomeToolbar(Gtk.Toolbar):
 self.insert(favorites_button, -1)
 favorites_button.show()
 
-self._list_button = RadioToolButton(named_icon='view-list')
+self._list_button = RadioToolButton(icon_name='view-list')
 self._list_button.props.group = favorites_button
 self._list_button.props.tooltip = _('List view')
 self._list_button.props.accelerator = _('2')
@@ -291,5 +291,5 @@ class FavoritesButton(RadioToolButton):
 self.emit('toggled')
 
 def _update_icon(self):
-self.props.named_icon = favoritesview.LAYOUT_MAP[self._layout]\
+self.props.icon_name = favoritesview.LAYOUT_MAP[self._layout]\
 .icon_name
diff --git a/src/jarabe/frame/zoomtoolbar.py b/src/jarabe/frame/zoomtoolbar.py
index ae7d050..fcef08b 100644
--- a/src/jarabe/frame/zoomtoolbar.py
+++ b/src/jarabe/frame/zoomtoolbar.py
@@ -59,7 +59,7 @@ class ZoomToolbar(Gtk.Toolbar):
 else:
 group = None
 
-button = RadioToolButton(named_icon=icon_name, group=group,
+button = RadioToolButton(icon_name=icon_name, group=group,
  accelerator=accelerator)
 button.connect('clicked', self.__level_clicked_cb, zoom_level)
 self.add(button)
diff --git a/src/jarabe/journal/volumestoolbar.py 
b/src/jarabe/journal/volumestoolbar.py
index 0f7bdce..9c25ff6 100644
--- a/src/jarabe/journal/volumestoolbar.py
+++ b/src/jarabe/journal/volumestoolbar.py
@@ -334,7 +334,7 @@ class VolumeButton(BaseButton):
 if icon_name is None:
 icon_name = 'drive'
 
-self.props.named_icon = icon_name
+self.props.icon_name = icon_name
 
 # TODO: retrieve the colors from the owner of the device
 client = GConf.Client.get_default()
@@ -352,7 +352,7 @@ class JournalButton(BaseButton):
 def __init__(self):
 BaseButton.__init__(self, mount_point='/')
 
-self.props.named_icon = 'activity-journal'
+self.props.icon_name = 'activity-journal'
 
 client = GConf.Client.get_default()
 color = XoColor(client.get_string('/desktop/sugar/user/color'))
@@ -398,7 +398,7 @@ class DocumentsButton(BaseButton):
 def __init__(self, documents_path):
 BaseButton.__init__(self, mount_point=documents_path)
 
-self.props.named_icon = 'user-documents'
+self.props.icon_name = 'user-documents'
 
 client = GConf.Client.get_default()
 color = XoColor(client.get_string('/desktop/sugar/user/color'))
-- 
1.7.11.4

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


Re: [Sugar-devel] Debugging sugar-datastore (and similar dbus-connected services)

2012-09-19 Thread Martin Langhoff
On Wed, Sep 19, 2012 at 4:15 PM, Martin Langhoff
 wrote:
> I'm debugging odd situations w Sugar datastore, and I wonder whether
> there is any tricks to debugging python programs that are run under
> dbus.
>
> I can see the sugar-datastore PID growing steadily while I test, which
> means that it's dying and respawning plenty, likely from unhandled
> exceptions...

Adding to /usr/bin/datastore-service

# debugging
logerr=open(os.path.join(log_dir, 'datastore.err'), 'w')
sys.stderr=logerr

does not help in the least. The file is created, but nothing is ever
written there.

Any hints?



m
-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- Software Architect - OLPC
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Debugging sugar-datastore (and similar dbus-connected services)

2012-09-19 Thread Gonzalo Odiard
You already have the line
export SUGAR_LOGGER_LEVEL=debug
uncommented in .sugar/debug, right?

Gonzalo

On Wed, Sep 19, 2012 at 5:41 PM, Martin Langhoff
wrote:

> On Wed, Sep 19, 2012 at 4:15 PM, Martin Langhoff
>  wrote:
> > I'm debugging odd situations w Sugar datastore, and I wonder whether
> > there is any tricks to debugging python programs that are run under
> > dbus.
> >
> > I can see the sugar-datastore PID growing steadily while I test, which
> > means that it's dying and respawning plenty, likely from unhandled
> > exceptions...
>
> Adding to /usr/bin/datastore-service
>
> # debugging
> logerr=open(os.path.join(log_dir, 'datastore.err'), 'w')
> sys.stderr=logerr
>
> does not help in the least. The file is created, but nothing is ever
> written there.
>
> Any hints?
>
>
>
> m
> --
>  martin.langh...@gmail.com
>  mar...@laptop.org -- Software Architect - OLPC
>  - ask interesting questions
>  - don't get distracted with shiny stuff  - working code first
>  - http://wiki.laptop.org/go/User:Martinlanghoff
> ___
> 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


[Sugar-devel] [sugar] Show summary information in the activities list view

2012-09-19 Thread godiard
From: Gonzalo Odiard 

Signed-off-by: Gonzalo Odiard 
---
 src/jarabe/desktop/activitieslist.py | 27 ---
 1 file changed, 12 insertions(+), 15 deletions(-)

diff --git a/src/jarabe/desktop/activitieslist.py 
b/src/jarabe/desktop/activitieslist.py
index fc05594..58e285c 100644
--- a/src/jarabe/desktop/activitieslist.py
+++ b/src/jarabe/desktop/activitieslist.py
@@ -25,7 +25,6 @@ from gi.repository import GConf
 from gi.repository import Gtk
 from gi.repository import Gdk
 
-from sugar3 import util
 from sugar3.graphics import style
 from sugar3.graphics.icon import Icon, CellRendererIcon
 from sugar3.graphics.xocolor import XoColor
@@ -77,12 +76,9 @@ class ActivitiesTreeView(Gtk.TreeView):
 self.append_column(column)
 
 cell_text = Gtk.CellRendererText()
-cell_text.props.ellipsize = Pango.EllipsizeMode.MIDDLE
-cell_text.props.ellipsize_set = True
 
 column = Gtk.TreeViewColumn()
 column.props.sizing = Gtk.TreeViewColumnSizing.GROW_ONLY
-column.props.expand = True
 column.set_sort_column_id(ListModel.COLUMN_TITLE)
 column.pack_start(cell_text, True)
 column.add_attribute(cell_text, 'markup', ListModel.COLUMN_TITLE)
@@ -96,24 +92,26 @@ class ActivitiesTreeView(Gtk.TreeView):
 column.props.sizing = Gtk.TreeViewColumnSizing.GROW_ONLY
 column.props.resizable = True
 column.props.reorderable = True
-column.props.expand = True
 column.set_sort_column_id(ListModel.COLUMN_VERSION)
 column.pack_start(cell_text, True)
 column.add_attribute(cell_text, 'text', ListModel.COLUMN_VERSION_TEXT)
 self.append_column(column)
 
 cell_text = Gtk.CellRendererText()
-cell_text.props.xalign = 1
+cell_text.props.xalign = 0
+cell_text.props.wrap_width = int(Gdk.Screen.width() / 3)
+cell_text.props.wrap_mode = Pango.WrapMode.WORD
 
 column = Gtk.TreeViewColumn()
-column.set_alignment(1)
 column.props.sizing = Gtk.TreeViewColumnSizing.GROW_ONLY
 column.props.resizable = True
 column.props.reorderable = True
 column.props.expand = True
-column.set_sort_column_id(ListModel.COLUMN_DATE)
+column.props.max_width = int(Gdk.Screen.width() / 3)
+column.props.spacing = 5
+column.set_sort_column_id(ListModel.COLUMN_SUMMARY)
 column.pack_start(cell_text, True)
-column.add_attribute(cell_text, 'text', ListModel.COLUMN_DATE_TEXT)
+column.add_attribute(cell_text, 'text', ListModel.COLUMN_SUMMARY)
 self.append_column(column)
 
 self.set_search_column(ListModel.COLUMN_TITLE)
@@ -164,11 +162,10 @@ class ListModel(Gtk.TreeModelSort):
 COLUMN_TITLE = 3
 COLUMN_VERSION = 4
 COLUMN_VERSION_TEXT = 5
-COLUMN_DATE = 6
-COLUMN_DATE_TEXT = 7
+COLUMN_SUMMARY = 6
 
 def __init__(self):
-self._model = Gtk.ListStore(str, bool, str, str, str, str, int, str)
+self._model = Gtk.ListStore(str, bool, str, str, str, str, str)
 self._model_filter = self._model.filter_new()
 Gtk.TreeModelSort.__init__(self, model=self._model_filter)
 
@@ -208,7 +205,6 @@ class ListModel(Gtk.TreeModelSort):
 if activity_info.get_bundle_id() == 'org.laptop.JournalActivity':
 return
 
-timestamp = activity_info.get_installation_time()
 version = activity_info.get_activity_version()
 
 registry = bundleregistry.get_registry()
@@ -224,14 +220,15 @@ class ListModel(Gtk.TreeModelSort):
 '%s' % \
 (activity_info.get_name(), tags)
 
+summary = activity_info.get_summary()
+
 self._model.append([activity_info.get_bundle_id(),
 favorite,
 activity_info.get_icon(),
 title,
 version,
 _('Version %s') % version,
-int(timestamp),
-util.timestamp_to_elapsed_string(timestamp)])
+summary])
 
 def set_visible_func(self, func):
 self._model_filter.set_visible_func(func)
-- 
1.7.11.4

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


Re: [Sugar-devel] Debugging sugar-datastore (and similar dbus-connected services)

2012-09-19 Thread Martin Langhoff
On Wed, Sep 19, 2012 at 4:54 PM, Gonzalo Odiard  wrote:
> You already have the line
> export SUGAR_LOGGER_LEVEL=debug
> uncommented in .sugar/debug, right?

Yes. And with that, datastore.log is very chatty, which is good.

But when the datastore code hits an unhandled exception, the exception
does not get logged. DBus restarts the process transparently, but that
isn't so useful :-/

In terms of progress, I have these tracks underway,

 - Add a "ds_clean" flag file, rm it on the start of every
create/update/delete op, create it on completion. Complements
"index_updated", and between the two we get good coverage. Missing
either one, we get an index rebuild. This is done, and working well.

 - During index rebuild, delete incomplete entries. Not working well yet.

With the two above, we can operate with the system at ENOSPC, and
essentially we don't lose existing user data. New files fail to save,
and metadata changes fail to get stored (so your edit, ie: a rename,
is reverted in the journal, visibly). But we don't lose the existing
Journal entries -- so behaviour is _almost_ civilized now :-)

Behind the scenes, however, the datastore is dying and respawning.
Which complicates things because what we are missing is to be able to
delete entries while we are at ENOSPC. A delete is pretty
straightforward, because we are removing files, and that succeeds even
on ENOSPC. Except that we need to be able to maintain the xapian
indexes.

My plan right now is to catch the Xapian-is-hitting-ENOSPC exception,
and trigger a Xapian index re-creation, putting the Xapian files in
/tmp (which is a tmpfs in our builds and in Fedora upstream too).
We'll make sure that the index_updated file on disk is removed so
after a reboot the index is recreated once more.

With Xapian index on /tmp, deleting Journal entries should just work.
All dbus sockets are on tmpfs.

However, to do all of the above with some sense that it's working
correctly... yeah, I need to see the exceptions I hit. Right now I am
guessing "what could be going wrong in this black box...?" which isn't
a productive mode of life.



m
-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- Software Architect - OLPC
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Debugging sugar-datastore (and similar dbus-connected services)

2012-09-19 Thread Gonzalo Odiard
I don't know if will be useful for you, but I have used SystemTap.
You can see at least a trace of the functions called.
Info:
http://fedoraproject.org/wiki/Features/SystemtapStaticProbes
http://sourceware.org/systemtap/wiki/PythonMarkers

With
stap /usr/share/doc/python-libs-2.7.3/systemtap-example.stp  -x
pid_datastore
you can see all the functions called in the datastore
(of course if the process changes is not so easy :(

Gonzalo

On Wed, Sep 19, 2012 at 6:49 PM, Martin Langhoff
wrote:

> On Wed, Sep 19, 2012 at 4:54 PM, Gonzalo Odiard 
> wrote:
> > You already have the line
> > export SUGAR_LOGGER_LEVEL=debug
> > uncommented in .sugar/debug, right?
>
> Yes. And with that, datastore.log is very chatty, which is good.
>
> But when the datastore code hits an unhandled exception, the exception
> does not get logged. DBus restarts the process transparently, but that
> isn't so useful :-/
>
> In terms of progress, I have these tracks underway,
>
>  - Add a "ds_clean" flag file, rm it on the start of every
> create/update/delete op, create it on completion. Complements
> "index_updated", and between the two we get good coverage. Missing
> either one, we get an index rebuild. This is done, and working well.
>
>  - During index rebuild, delete incomplete entries. Not working well yet.
>
> With the two above, we can operate with the system at ENOSPC, and
> essentially we don't lose existing user data. New files fail to save,
> and metadata changes fail to get stored (so your edit, ie: a rename,
> is reverted in the journal, visibly). But we don't lose the existing
> Journal entries -- so behaviour is _almost_ civilized now :-)
>
> Behind the scenes, however, the datastore is dying and respawning.
> Which complicates things because what we are missing is to be able to
> delete entries while we are at ENOSPC. A delete is pretty
> straightforward, because we are removing files, and that succeeds even
> on ENOSPC. Except that we need to be able to maintain the xapian
> indexes.
>
> My plan right now is to catch the Xapian-is-hitting-ENOSPC exception,
> and trigger a Xapian index re-creation, putting the Xapian files in
> /tmp (which is a tmpfs in our builds and in Fedora upstream too).
> We'll make sure that the index_updated file on disk is removed so
> after a reboot the index is recreated once more.
>
> With Xapian index on /tmp, deleting Journal entries should just work.
> All dbus sockets are on tmpfs.
>
> However, to do all of the above with some sense that it's working
> correctly... yeah, I need to see the exceptions I hit. Right now I am
> guessing "what could be going wrong in this black box...?" which isn't
> a productive mode of life.
>
>
>
> m
> --
>  martin.langh...@gmail.com
>  mar...@laptop.org -- Software Architect - OLPC
>  - ask interesting questions
>  - don't get distracted with shiny stuff  - working code first
>  - http://wiki.laptop.org/go/User:Martinlanghoff
>
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


[Sugar-devel] [IAEP] Sugar Digest 2012-09-18

2012-09-19 Thread Edward Mokurai Cherlin
I would go further. Can we invite the children to give us their
stories? They should be wikified, blogged, made the subject of
articles in the geek and education press, and spread even more widely
than that. Better still, can we invite the schools where this children
are learning and sharing to celebrate them using Sugar tools to create
interactive presentations?

On Wed, September 19, 2012 10:52 am, James Simmons wrote:
> Walter,
>
> First, congrats on the grandchild.
>
> Second, I am intrigued by the statement that 10% of Sugar Activities were
> written by children who grew up with Sugar.  That is an incredible
> accomplishment, and it makes me wish that the ASLO website had a
> Collection
> of those Activities.  If something like that existed I could see what
> kinds
> of Activities they were doing, how many were programs written for other
> environments using a Sugar wrapper, how many are purely Sugar Activities,
> who the developers are, what Sugar features are they using and not using,
> how popular the Activities are, etc.
>
> It would also give our younger developers a way to stand up and be
> counted.
>
> James Simmons


--
Edward Mokurai (默雷/निशब्दगर्ज/نشبدگرج) Cherlin
Silent Thunder is my name, and Children are my nation.
The Cosmos is my dwelling place, the Truth my destination.
http://wiki.sugarlabs.org/go/Replacing_Textbooks
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


[Sugar-devel] [ASLO] Release FollowMe Butia-7

2012-09-19 Thread Sugar Labs Activities
Activity Homepage:
http://activities.sugarlabs.org/addon/4368

Sugar Platform:
0.90 - 0.98

Download Now:
http://activities.sugarlabs.org/downloads/file/28224/followme_butia-7.xo

Release notes:
-Add option to set the camera brightness
-New translations
-Remove all binaries (uses the Pygame of the system)
-Fix error with no XO cameras


Sugar Labs Activities
http://activities.sugarlabs.org

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


Re: [Sugar-devel] [PATCH Browse] Error page SL #3500

2012-09-19 Thread Martin Langhoff
On Wed, Sep 19, 2012 at 6:54 AM, Manuel Kaufmann  wrote:
> On Tue, Sep 18, 2012 at 10:58 PM, James Cameron  wrote:
>> Neat.  What method did you use to convert the image?
>
> Python... It is my best friend :)
>
 import base64
 base64.b64encode(open('browse-logo.png', 'r').read())

You have the file on-disk. It is inefficient to base64-encode it. Just
say img src="file://http://wiki.laptop.org/go/User:Martinlanghoff
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [IAEP] Sugar Digest 2012-09-18

2012-09-19 Thread Kevin Mark


--- On Wed, 9/19/12, S. Daniel Francis  wrote:

> From: S. Daniel Francis 
> Subject: Re: [Sugar-devel] [IAEP] Sugar Digest 2012-09-18
> To: "James Simmons" 
> Cc: "iaep" , "Sugar-dev Devel" 
> , community-n...@lists.sugarlabs.org, 
> "Walter Bender" 
> Date: Wednesday, September 19, 2012, 12:42 PM
> 2012/9/19 James Simmons :
> > Walter,
> >
> > First, congrats on the grandchild.
> >
> > Second, I am intrigued by the statement that 10% of
> Sugar Activities were
> > written by children who grew up with Sugar.  That
> is an incredible
> > accomplishment, and it makes me wish that the ASLO
> website had a Collection
> > of those Activities.  If something like that
> existed I could see what kinds
> > of Activities they were doing, how many were programs
> written for other
> > environments using a Sugar wrapper, how many are purely
> Sugar Activities,
> > who the developers are, what Sugar features are they
> using and not using,
> > how popular the Activities are, etc.
> 
> Hello James,
> I feel identified with what Walter described so I dare to
> answer. I'm
> from Uruguay and I'm thirteen years old. I'm one of the
> activity
> developers in transition to Sugar contributor. I don't know
> other
> young Sugar contributors outside Uruguay, so I'll tell you
> about the
> situation here.
> 
> About one year ago, children made activities often as a
> hobbie, that
> activities had not a reasonable aim and they weren't very
> well
> integrated with Sugar.
> 

Hearing from the kids who are making Sugar activities and more contributions, 
I'm really wanting to know what teaching environment made this possible? Are 
there activity hacking classes? Is this kind of experimentation part of a 
turtleart class? A math class? have kids 'goggled' about programming on their 
own time and wanted to know about programming? Are there computer programming 
classes and teachers that have assignments that ask the kids to explore? Is 
this material online? Are there self-assembled sugar hacking groups?
I've love to have any of these answers.
Cheers,
Kev
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


[Sugar-devel] [PATCH shell] Fix Speech device icon - SL #3931

2012-09-19 Thread Manuel Quiñones
- Port palette with mixed content to new API.

- pack_start: the convert script got confused here.

- Gtk.HScale API change: set adjustment with set_adjustment method,
  not in the constructor.

- Gtk.Adjustment API change: use get_value method because value
  property was removed.

- Gdk.Clipboard API changes: Gtk.Clipboard.get needs a GdkAtom [1] and
  Gdk.SELECTION_PRIMARY is the one we need.
  Gtk.Clipboard.request_text needs another argument user_data [2],
  passing None seems to work, but maybe the annotations are wrong.

- fixed long lines and a few indentations

- fixed mispelled variable name 'adjustement' to 'adjustment'

[1] 
http://developer.gnome.org/gtk3/stable/gtk3-Clipboards.html#gtk-clipboard-get
[2] 
http://developer.gnome.org/gtk3/stable/gtk3-Clipboards.html#gtk-clipboard-request-text

Signed-off-by: Manuel Quiñones 
---
 extensions/deviceicon/speech.py | 44 -
 src/jarabe/model/speech.py  |  5 +++--
 2 files changed, 29 insertions(+), 20 deletions(-)

diff --git a/extensions/deviceicon/speech.py b/extensions/deviceicon/speech.py
index d89ad51..ba27e7a 100644
--- a/extensions/deviceicon/speech.py
+++ b/extensions/deviceicon/speech.py
@@ -24,8 +24,9 @@ from gi.repository import GObject
 from sugar3.graphics.icon import Icon
 from sugar3.graphics.tray import TrayIcon
 from sugar3.graphics.palette import Palette
+from sugar3.graphics.palettemenuitem import PaletteMenuItem
+from sugar3.graphics.palettemenuitem import PaletteMenuItemSeparator
 from sugar3.graphics.xocolor import XoColor
-from sugar3.graphics.menuitem import MenuItem
 from sugar3.graphics import style
 
 from jarabe.frame.frameinvoker import FrameWidgetInvoker
@@ -74,47 +75,54 @@ class SpeechPalette(Palette):
 
 self._play_icon = Icon(icon_name='player_play')
 self._pause_icon = Icon(icon_name='player_pause')
-self._play_pause_menu = MenuItem(text_label=_('Say selected text'))
+self._play_pause_menu = PaletteMenuItem(
+text_label=_('Say selected text'))
 self._play_pause_menu.set_image(self._play_icon)
 self._play_pause_menu.connect('activate', self.__play_activated_cb)
 self._play_pause_menu.show()
+vbox.pack_start(self._play_pause_menu, True, True, 0)
 
-self._stop_menu = MenuItem(icon_name='player_stop',
-text_label=_('Stop playback'))
+self._stop_menu = PaletteMenuItem(icon_name='player_stop',
+  text_label=_('Stop playback'))
 self._stop_menu.connect('activate', self.__stop_activated_cb)
 self._stop_menu.set_sensitive(False)
 self._stop_menu.show()
+vbox.pack_start(self._stop_menu, True, True, 0)
 
-self.menu.append(self._play_pause_menu)
-self.menu.append(self._stop_menu)
+separator = PaletteMenuItemSeparator()
+vbox.pack_start(separator, True, True, 0)
 
 self._adj_pitch = Gtk.Adjustment(value=self._manager.get_pitch(),
-  lower=self._manager.MIN_PITCH,
-  upper=self._manager.MAX_PITCH)
-self._hscale_pitch = Gtk.HScale(self._adj_pitch)
+ lower=self._manager.MIN_PITCH,
+ upper=self._manager.MAX_PITCH)
+self._hscale_pitch = Gtk.HScale()
+self._hscale_pitch.set_adjustment(self._adj_pitch)
 self._hscale_pitch.set_draw_value(False)
 
-vbox.pack_start(Gtk.Label(_('Pitch', True, True, 0)), 
padding=style.DEFAULT_PADDING)
+vbox.pack_start(Gtk.Label(_('Pitch')), True, True,
+padding=style.DEFAULT_PADDING)
 vbox.pack_start(self._hscale_pitch, True, True, 0)
 
 self._adj_rate = Gtk.Adjustment(value=self._manager.get_rate(),
-  lower=self._manager.MIN_RATE,
-  upper=self._manager.MAX_RATE)
-self._hscale_rate = Gtk.HScale(self._adj_rate)
+lower=self._manager.MIN_RATE,
+upper=self._manager.MAX_RATE)
+self._hscale_rate = Gtk.HScale()
+self._hscale_rate.set_adjustment(self._adj_rate)
 self._hscale_rate.set_draw_value(False)
 
-vbox.pack_start(Gtk.Label(_('Rate', True, True, 0)), 
padding=style.DEFAULT_PADDING)
+vbox.pack_start(Gtk.Label(_('Rate')), True, True,
+padding=style.DEFAULT_PADDING)
 vbox.pack_start(self._hscale_rate, True, True, 0)
 vbox.show_all()
 
 self._adj_pitch.connect('value_changed', self.__adj_pitch_changed_cb)
 self._adj_rate.connect('value_changed', self.__adj_rate_changed_cb)
 
-def __adj_pitch_changed_cb(self, adjustement):
-self._manager.set_pitch(int(adjustement.value))
+def __adj_pitch_changed_cb(self, adjustment):
+self._mana

[Sugar-devel] [PATCH shell 2/2] Use proper constructor for Gtk.Alignment

2012-09-19 Thread Manuel Quiñones
Is better to pass keyword arguments, like the toolkit does.  See
sugar-toolkit-gtk commit 20319cb3c4b2be4e8f584703d704ffda4b1cff29 .

Signed-off-by: Manuel Quiñones 
---
 extensions/cpsection/aboutme/view.py | 4 ++--
 extensions/cpsection/updater/view.py | 3 +--
 extensions/deviceicon/network.py | 6 +++---
 src/jarabe/desktop/activitieslist.py | 3 ++-
 src/jarabe/intro/window.py   | 2 +-
 src/jarabe/journal/detailview.py | 2 +-
 src/jarabe/journal/expandedentry.py  | 6 +++---
 src/jarabe/journal/listview.py   | 6 +++---
 src/jarabe/journal/modalalert.py | 3 +--
 src/jarabe/view/launcher.py  | 2 +-
 10 files changed, 18 insertions(+), 19 deletions(-)

diff --git a/extensions/cpsection/aboutme/view.py 
b/extensions/cpsection/aboutme/view.py
index 293923d..a17d41a 100644
--- a/extensions/cpsection/aboutme/view.py
+++ b/extensions/cpsection/aboutme/view.py
@@ -204,7 +204,7 @@ class AboutMe(SectionView):
 self._nick_alert.props.msg = self.restart_msg
 self._nick_alert.show()
 
-self._center_in_panel = Gtk.Alignment.new(0.5, 0, 0, 0)
+self._center_in_panel = Gtk.Alignment(xalign=0.5)
 self._center_in_panel.add(self._nick_box)
 self.pack_start(self._center_in_panel, False, False, 0)
 self.pack_start(self._nick_alert_box, False, False, 0)
@@ -246,7 +246,7 @@ class AboutMe(SectionView):
 self._color_alert.props.msg = self.restart_msg
 self._color_alert.show()
 
-self._center_in_panel = Gtk.Alignment.new(0.5, 0, 0, 0)
+self._center_in_panel = Gtk.Alignment(xalign=0.5)
 self._center_in_panel.add(self._color_box)
 self.pack_start(self._color_label, False, False, 0)
 self.pack_start(self._center_in_panel, False, False, 0)
diff --git a/extensions/cpsection/updater/view.py 
b/extensions/cpsection/updater/view.py
index 2a1f643..64867d2 100644
--- a/extensions/cpsection/updater/view.py
+++ b/extensions/cpsection/updater/view.py
@@ -202,8 +202,7 @@ class ProgressPane(Gtk.VBox):
 self.pack_start(self._label, True, True, 0)
 self._label.show()
 
-alignment_box = Gtk.Alignment.new(xalign=0.5, yalign=0.5,
-  xscale=0, yscale=0)
+alignment_box = Gtk.Alignment(xalign=0.5, yalign=0.5)
 self.pack_start(alignment_box, True, True, 0)
 alignment_box.show()
 
diff --git a/extensions/deviceicon/network.py b/extensions/deviceicon/network.py
index b4a5393..855a514 100644
--- a/extensions/deviceicon/network.py
+++ b/extensions/deviceicon/network.py
@@ -89,7 +89,7 @@ class WirelessPalette(Palette):
 self._info.pack_start(separator, True, True, 0)
 
 def _padded(child, xalign=0, yalign=0.5):
-padder = Gtk.Alignment.new(xalign=xalign, yalign=yalign,
+padder = Gtk.Alignment(xalign=xalign, yalign=yalign,
xscale=1, yscale=0.33)
 padder.set_padding(style.DEFAULT_SPACING,
style.DEFAULT_SPACING,
@@ -162,7 +162,7 @@ class WiredPalette(Palette):
 self._info = Gtk.VBox()
 
 def _padded(child, xalign=0, yalign=0.5):
-padder = Gtk.Alignment.new(xalign=xalign, yalign=yalign,
+padder = Gtk.Alignment(xalign=xalign, yalign=yalign,
xscale=1, yscale=0.33)
 padder.set_padding(style.DEFAULT_SPACING,
style.DEFAULT_SPACING,
@@ -256,7 +256,7 @@ class GsmPalette(Palette):
 self.set_state(_GSM_STATE_NOT_READY)
 
 def _add_widget_with_padding(self, child, xalign=0, yalign=0.5):
-alignment = Gtk.Alignment.new(xalign=xalign, yalign=yalign,
+alignment = Gtk.Alignment(xalign=xalign, yalign=yalign,
   xscale=1, yscale=0.33)
 alignment.set_padding(style.DEFAULT_SPACING,
   style.DEFAULT_SPACING,
diff --git a/src/jarabe/desktop/activitieslist.py 
b/src/jarabe/desktop/activitieslist.py
index b64..2d3e9a8 100644
--- a/src/jarabe/desktop/activitieslist.py
+++ b/src/jarabe/desktop/activitieslist.py
@@ -311,7 +311,8 @@ class ClearMessageBox(Gtk.EventBox):
 self.modify_bg(Gtk.StateType.NORMAL,
style.COLOR_WHITE.get_gdk_color())
 
-alignment = Gtk.Alignment.new(0.5, 0.5, 0.1, 0.1)
+alignment = Gtk.Alignment(xalign=0.5, yalign=0.5, xscale=0.1,
+  yscale=0.1)
 self.add(alignment)
 alignment.show()
 
diff --git a/src/jarabe/intro/window.py b/src/jarabe/intro/window.py
index 3c979fb..b10d51e 100644
--- a/src/jarabe/intro/window.py
+++ b/src/jarabe/intro/window.py
@@ -98,7 +98,7 @@ class _NamePage(_Page):
 _Page.__init__(self)
 self._intro = intro
 
-alignment = Gtk.Alignment.new(0.5, 0.5, 0, 0)
+alignment = Gtk.Alignment(xalign=0.5, yalign=0.5)
 self.pack_start(alignment, ex

Re: [Sugar-devel] [IAEP] Sugar Digest 2012-09-18

2012-09-19 Thread S. Daniel Francis
Hi Kevin,

2012/9/19 Kevin Mark :
> Hearing from the kids who are making Sugar activities and more contributions, 
> I'm really wanting to
> know what teaching environment made this possible?

Summing my case all the cases I listened about, we usually learn by our self.
Thinking about why Sugar, well, we could make desktop applications,
but a free and decent way to share a program is difficult to find and
there's not always a community where we can share what we make. Also I
think Sugar needs activities, unlike desktops, where practically all
is already made.

Just Edward suggested us to tell our stories, but at the moment I'll
not get into many details and only answer your questions.

> Are there activity hacking classes?
In Uruguay there is only one activity hacking teacher: Flavio Danesse.
He is an IT teacher, and every year he organizes a workshop where he
teaches volunteer students to program in Python. The group "Python
Joven", in English "Young Python"..

Currently, his students contributing here are Agustin Zubiaga and
Cristhofer Travieso, they told me about another student who develops
applications for Android.

> Is this kind of experimentation part of a turtleart class?
For my part I can say "yes and no"... When I received my XO with Sugar
I liked very much TurtleArt, but the teachers don't teach it very
often, I had to look for documentation.

>Have kids 'goggled' about programming on their own time and wanted to know 
>about programming?
Now you are right, I learn practically all 'googling'. Flavio's
students told me they also learn(ed) a big part of what they know
searching and investigating by them self.
I think it's better because we can learn what we are interested in,
also if it's not related with Sugar.

> Are there computer programming classes and teachers that have assignments 
> that ask the kids to explore?

Programming is not often a subject at the school.
I know about optional workshops, like Flavio's. My parents are
teachers, and about three-four years ago, when I was ten years old, I
used to go to the highschool where my parents worked and I listened to
a workshop about web design (basic HTML development) and graphic
design (with GIMP). That workshop was not a way to get young
programmers, but it removed me the fear of seeing a source code as
something strange or made for be understood by non-human people.

Cheers.
~danielf

P.S: Sorry, I don't speak English very well.
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [PATCH shell 2/2] Use proper constructor for Gtk.Alignment

2012-09-19 Thread Manuel Quiñones
Found a regression in the Journal: the progress bar when a volume is
clicked gets the whole height of the window.

2012/9/20 Manuel Quiñones :
> Is better to pass keyword arguments, like the toolkit does.  See
> sugar-toolkit-gtk commit 20319cb3c4b2be4e8f584703d704ffda4b1cff29 .
>
> Signed-off-by: Manuel Quiñones 
> ---
>  extensions/cpsection/aboutme/view.py | 4 ++--
>  extensions/cpsection/updater/view.py | 3 +--
>  extensions/deviceicon/network.py | 6 +++---
>  src/jarabe/desktop/activitieslist.py | 3 ++-
>  src/jarabe/intro/window.py   | 2 +-
>  src/jarabe/journal/detailview.py | 2 +-
>  src/jarabe/journal/expandedentry.py  | 6 +++---
>  src/jarabe/journal/listview.py   | 6 +++---
>  src/jarabe/journal/modalalert.py | 3 +--
>  src/jarabe/view/launcher.py  | 2 +-
>  10 files changed, 18 insertions(+), 19 deletions(-)
>
> diff --git a/extensions/cpsection/aboutme/view.py 
> b/extensions/cpsection/aboutme/view.py
> index 293923d..a17d41a 100644
> --- a/extensions/cpsection/aboutme/view.py
> +++ b/extensions/cpsection/aboutme/view.py
> @@ -204,7 +204,7 @@ class AboutMe(SectionView):
>  self._nick_alert.props.msg = self.restart_msg
>  self._nick_alert.show()
>
> -self._center_in_panel = Gtk.Alignment.new(0.5, 0, 0, 0)
> +self._center_in_panel = Gtk.Alignment(xalign=0.5)
>  self._center_in_panel.add(self._nick_box)
>  self.pack_start(self._center_in_panel, False, False, 0)
>  self.pack_start(self._nick_alert_box, False, False, 0)
> @@ -246,7 +246,7 @@ class AboutMe(SectionView):
>  self._color_alert.props.msg = self.restart_msg
>  self._color_alert.show()
>
> -self._center_in_panel = Gtk.Alignment.new(0.5, 0, 0, 0)
> +self._center_in_panel = Gtk.Alignment(xalign=0.5)
>  self._center_in_panel.add(self._color_box)
>  self.pack_start(self._color_label, False, False, 0)
>  self.pack_start(self._center_in_panel, False, False, 0)
> diff --git a/extensions/cpsection/updater/view.py 
> b/extensions/cpsection/updater/view.py
> index 2a1f643..64867d2 100644
> --- a/extensions/cpsection/updater/view.py
> +++ b/extensions/cpsection/updater/view.py
> @@ -202,8 +202,7 @@ class ProgressPane(Gtk.VBox):
>  self.pack_start(self._label, True, True, 0)
>  self._label.show()
>
> -alignment_box = Gtk.Alignment.new(xalign=0.5, yalign=0.5,
> -  xscale=0, yscale=0)
> +alignment_box = Gtk.Alignment(xalign=0.5, yalign=0.5)
>  self.pack_start(alignment_box, True, True, 0)
>  alignment_box.show()
>
> diff --git a/extensions/deviceicon/network.py 
> b/extensions/deviceicon/network.py
> index b4a5393..855a514 100644
> --- a/extensions/deviceicon/network.py
> +++ b/extensions/deviceicon/network.py
> @@ -89,7 +89,7 @@ class WirelessPalette(Palette):
>  self._info.pack_start(separator, True, True, 0)
>
>  def _padded(child, xalign=0, yalign=0.5):
> -padder = Gtk.Alignment.new(xalign=xalign, yalign=yalign,
> +padder = Gtk.Alignment(xalign=xalign, yalign=yalign,
> xscale=1, yscale=0.33)
>  padder.set_padding(style.DEFAULT_SPACING,
> style.DEFAULT_SPACING,
> @@ -162,7 +162,7 @@ class WiredPalette(Palette):
>  self._info = Gtk.VBox()
>
>  def _padded(child, xalign=0, yalign=0.5):
> -padder = Gtk.Alignment.new(xalign=xalign, yalign=yalign,
> +padder = Gtk.Alignment(xalign=xalign, yalign=yalign,
> xscale=1, yscale=0.33)
>  padder.set_padding(style.DEFAULT_SPACING,
> style.DEFAULT_SPACING,
> @@ -256,7 +256,7 @@ class GsmPalette(Palette):
>  self.set_state(_GSM_STATE_NOT_READY)
>
>  def _add_widget_with_padding(self, child, xalign=0, yalign=0.5):
> -alignment = Gtk.Alignment.new(xalign=xalign, yalign=yalign,
> +alignment = Gtk.Alignment(xalign=xalign, yalign=yalign,
>xscale=1, yscale=0.33)
>  alignment.set_padding(style.DEFAULT_SPACING,
>style.DEFAULT_SPACING,
> diff --git a/src/jarabe/desktop/activitieslist.py 
> b/src/jarabe/desktop/activitieslist.py
> index b64..2d3e9a8 100644
> --- a/src/jarabe/desktop/activitieslist.py
> +++ b/src/jarabe/desktop/activitieslist.py
> @@ -311,7 +311,8 @@ class ClearMessageBox(Gtk.EventBox):
>  self.modify_bg(Gtk.StateType.NORMAL,
> style.COLOR_WHITE.get_gdk_color())
>
> -alignment = Gtk.Alignment.new(0.5, 0.5, 0.1, 0.1)
> +alignment = Gtk.Alignment(xalign=0.5, yalign=0.5, xscale=0.1,
> +  yscale=0.1)
>  self.add(alignment)
>  alignment.show()
>
> diff --git a/src/jarabe/intro/window.py b/src/jarabe/intro/window.py
> index 3c979fb..b10d

[Sugar-devel] Sugar Labs service outage: Thu, Sep 20 9:30-12:30 EDT

2012-09-19 Thread Bernie Innocenti
Tomorrow, Thursday 20 Sep 2012, between 9:30 and 12:30 eastern time, the
Media Lab sysadmins will reconfigure the rack in room E15-243.

During the maintenance work, the following services hosted on
treehouse.sugarlabs.org may become temporarily unavailable:

 - git.sugarlabsa.org and all related services
 - chat.sugarlabs.org
 - jabber.sugarlabs.org
 - meeting.sugarlabs.org
 - network.sugarlabs.org
 - obs.sugarlabs.org
 - rt.sugarlabs.org
 - schooltool.sugarlabs.org
 - ns1.sugarlabs.org (primary nameserver for multiple domains)
 - Various services related to ole.org
 - Various services related to paraguayeduca.org
 - Various services related to treehouse.su
 - Others I might have missed

We'll use this opportunity to rack our two new servers and prepare them
for production.

-- 
Bernie Innocenti
Sugar Labs Infrastructure Team
http://wiki.sugarlabs.org/go/Infrastructure_Team

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


[Sugar-devel] [PATCH shell 2/2] Port Volume palette that has mixed content to new API

2012-09-19 Thread Manuel Quiñones
This fixes VolumePalette that is used in the Journal, and in the
volume device icon.

Had to set the content box (the one passed to set_content) a property
of the palette.  Otherwise the "Show Contents" can't be added from the
device icon.  Previusly the palette.menu attribute was used for that.

Also I had to reorder the "Show Contents" item because pack_end nor
pack_start didn't pack it to the correct place.

Note that the separator packed after the Remove item is not visible.

Signed-off-by: Manuel Quiñones 
---
 extensions/deviceicon/volume.py |  8 +---
 src/jarabe/view/palettes.py | 34 +++---
 2 files changed, 24 insertions(+), 18 deletions(-)

diff --git a/extensions/deviceicon/volume.py b/extensions/deviceicon/volume.py
index 11a8cc9..ec7b2e2 100644
--- a/extensions/deviceicon/volume.py
+++ b/extensions/deviceicon/volume.py
@@ -24,7 +24,8 @@ from gi.repository import GConf
 
 from sugar3.graphics.tray import TrayIcon
 from sugar3.graphics.xocolor import XoColor
-from sugar3.graphics.menuitem import MenuItem
+from sugar3.graphics.palettemenuitem import PaletteMenuItem
+from sugar3.graphics.palettemenuitem import PaletteMenuItemSeparator
 from sugar3.graphics.icon import Icon
 
 from jarabe.journal import journalactivity
@@ -69,7 +70,7 @@ class DeviceView(TrayIcon):
 palette = VolumePalette(self._mount)
 palette.set_group_id('frame')
 
-menu_item = MenuItem(_('Show contents'))
+menu_item = PaletteMenuItem(_('Show contents'))
 client = GConf.Client.get_default()
 color = XoColor(client.get_string('/desktop/sugar/user/color'))
 icon = Icon(icon_name=self._icon_name, icon_size=Gtk.IconSize.MENU,
@@ -78,7 +79,8 @@ class DeviceView(TrayIcon):
 icon.show()
 
 menu_item.connect('activate', self.__show_contents_cb)
-palette.menu.insert(menu_item, 0)
+palette.content_box.pack_start(menu_item, True, True, 0)
+palette.content_box.reorder_child(menu_item, 0)
 menu_item.show()
 
 return palette
diff --git a/src/jarabe/view/palettes.py b/src/jarabe/view/palettes.py
index 50f6c83..35475d0 100644
--- a/src/jarabe/view/palettes.py
+++ b/src/jarabe/view/palettes.py
@@ -216,31 +216,35 @@ class VolumePalette(Palette):
 path = mount.get_root().get_path()
 self.props.secondary_text = glib.markup_escape_text(path)
 
-vbox = Gtk.VBox()
-self.set_content(vbox)
-vbox.show()
+self.content_box = Gtk.VBox()
+self.set_content(self.content_box)
+self.content_box.show()
+
+menu_item = PaletteMenuItem(pgettext('Volume', 'Remove'))
+
+icon = Icon(icon_name='media-eject', icon_size=Gtk.IconSize.MENU)
+menu_item.set_image(icon)
+icon.show()
+
+menu_item.connect('activate', self.__unmount_activate_cb)
+self.content_box.pack_start(menu_item, True, True, 0)
+menu_item.show()
+
+separator = PaletteMenuItemSeparator()
+self.content_box.pack_start(separator, True, True, 0)
+separator.show()
 
 self._progress_bar = Gtk.ProgressBar()
-vbox.add(self._progress_bar)
+self.content_box.pack_start(self._progress_bar, True, True, 0)
 self._progress_bar.show()
 
 self._free_space_label = Gtk.Label()
 self._free_space_label.set_alignment(0.5, 0.5)
-vbox.add(self._free_space_label)
+self.content_box.pack_start(self._free_space_label, True, True, 0)
 self._free_space_label.show()
 
 self.connect('popup', self.__popup_cb)
 
-menu_item = MenuItem(pgettext('Volume', 'Remove'))
-
-icon = Icon(icon_name='media-eject', icon_size=Gtk.IconSize.MENU)
-menu_item.set_image(icon)
-icon.show()
-
-menu_item.connect('activate', self.__unmount_activate_cb)
-self.menu.append(menu_item)
-menu_item.show()
-
 def __unmount_activate_cb(self, menu_item):
 self._mount.unmount(self.__unmount_cb)
 
-- 
1.7.11.4

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