[Sugar-devel] [REMINDER] Development team meeting --- 27. March 2012 (15:00 UTC)

2012-03-27 Thread Simon Schampijer

Hi,

today we will have our weekly development team meeting:

- status of GTK3 port
- 0.96 go/no-go decision
- agree on Activity porting guidelines [1]

Time: 27. March 2012 (15:00 UTC)
Place: #sugar-meeting (freenode)

Regards,
   Simon

[1] http://wiki.sugarlabs.org/go/Features/GTK3/Porting

PS: There has been daylight savings in many places, please make sure you 
do convert to the correct local time 
http://www.timeanddate.com/worldclock/fixedtime.html?msg=Sugar+dev+meetingiso=20120327T15ah=1

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


[Sugar-devel] [PATCH sugar] Do not display APs that announce the ssid in invalid utf-8 data, OLPC #11698

2012-03-27 Thread Simon Schampijer
Sugar is not doing well in dealing with non-utf8 data. If an AP
does not announce the ssid in valid utf-8 data Sugar will fail in
certain ways. For example, currently if an AP does not announce
the ssid in correct utf-8 data Sugar does display an AP but it has
no name in the Palette. If you try to connect to that AP Sugar does
silently fail because it is trying to sent this string over D-Bus
and that chokes on not being valid utf-8 data. The same AP might be
displayed correctly under GNOME, since NM-applet is doing
guessing for the right ssid [1].

In some cases Sugar will crash when feeded non utf-8 compliant data,
as ssid which segfaults glib.markup_escape_text when trying to display
the ssid: glib.markup_escape_text does assume correct utf8 data to be
passed [3].

The patch does check early when the AP is announced by NM and verify
that we do have a ssid with valid utf-8 data. If not, we don't display
the AP and log a debug message.

In the future we can use GLib.utf8_validate [5] to verify a string
before passing to Glib.markup_escape_text and doing more advanced
guessing like done in nm-utils-ssid-to-utf8 [1] but the patch is
enough for now and has seen testing in the field already.

Signed-off-by: Simon Schampijer si...@laptop.org

[1] 
http://developer.gnome.org/libnm-util/unstable/libnm-util-nm-utils.html#nm-utils-ssid-to-utf8
[2] http://dev.laptop.org/ticket/11698
[3] 
http://developer.gnome.org/pygobject/stable/glib-functions.html#function-glib--markup-escape-text
[4] https://bugzilla.gnome.org/show_bug.cgi?id=672546
[5] 
http://developer.gnome.org/glib/2.30/glib-Unicode-Manipulation.html#g-utf8-validate
---
 src/jarabe/desktop/meshbox.py |7 +++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/src/jarabe/desktop/meshbox.py b/src/jarabe/desktop/meshbox.py
index 2ce6163..0f97ab7 100644
--- a/src/jarabe/desktop/meshbox.py
+++ b/src/jarabe/desktop/meshbox.py
@@ -548,6 +548,13 @@ class MeshBox(gtk.VBox):
 ap.disconnect()
 return
 
+try:
+unicode(ap.name, 'utf-8')
+except UnicodeDecodeError:
+logging.debug('ignoring an AP essid that is not utf-8 compliant')
+ap.disconnect()
+return
+
 if self._adhoc_manager is not None and \
 network.is_sugar_adhoc_network(ap.name) and \
 ap.mode == network.NM_802_11_MODE_ADHOC:
-- 
1.7.7.6

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


Re: [Sugar-devel] Patch: Mobile dongles

2012-03-27 Thread forster
Paul

Tried this with a XO-1.75 and a XO-1.5 both running OS31
Tried a Huawei mobile dongle, a memory stick and a mouse

The only case where a USB device remains powered during sleep is the mobile 
dongle on the 1.75

Tony

 fors...@ozonline.com.au wrote:
   Thanks
   
   I have noticed another issue with the mobile dongle.  OS31, XO-1.75
   Press the power button once and wait for sleep.  The dongle remains
 
 this is very surprising.  do other USB devices remain powered when the
 laptop sleeps?  we've done nothing intentional to change this (or fix this,
 depending on your point of view :-) in this release. 
 
 paul
 
   powered on (which is a good or bad thing depending on your point of
   view), then press the power button to wake the laptop, the dongle
   is briefly turned off and the connection is lost, negating any
   benefit from keeping it powered during sleep.
   
   Tony
   
 =-
  paul fox, p...@laptop.org
 ___
 Sugar-devel mailing list
 Sugar-devel@lists.sugarlabs.org
 http://lists.sugarlabs.org/listinfo/sugar-devel
 
 _
 This mail has been virus scanned by Australia On Line
 see http://www.australiaonline.net.au/mailscanning

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


Re: [Sugar-devel] Just learned about Mistery Meat Navigation

2012-03-27 Thread Bert Freudenberg
IMHO, an explicit help button that toggles an overlay with help bubbles would 
be best. Takes up less space than actual labels. Here's an example:

http://thedigitalstory.com/2012/03/5_tips_for_working_w.html

- Bert -


On 27.03.2012, at 06:44, Carl Angiolillo wrote:

  However, that is different than the icons you use everyday.
 
 True. The time spent learning iconography is amortized while the pixel costs 
 of the label remain fixed so those text labels that were very helpful at 
 first end up consuming unnecessary real-estate as the kids become experts. 
 However, if the kids become frustrated by confusing buttons* they might not 
 bother becoming experts at all so it's worth keeping an eye on during testing.
 
  on a touch screen ... there's no obvious way to get the text descriptions 
  to pop up.
 
 The method Android uses is to long press on a button to display its label. I 
 doubt this qualifies as obvious judging by the fact that this was slipped 
 quietly into 4.0 and I've never observed anyone using it. Some interfaces 
 (like native OS X toolbars or MS Office products) allow text labels to be 
 turned on and off by the user. I've used time-delay fade-in labels on 
 touchscreens (which were supposed to help novices while not impacting expert 
 use) but they turned out to be too distracting and not helpful in the case of 
 buttons that remain visible all the time. The simplest method might be to 
 bite the bullet, spend the pixels, and add text labels to buttons on 
 touchscreen devices.
 
 Carl
 
 *...e.g., a sound icon shaped like the profile of an internal electronic 
 component or a stop icon shaped like an octagon even in Libya, Zimbabwe, the 
 Bahamas, or Japan.
 
 On Tue, Mar 20, 2012 at 19:37, Bert Freudenberg b...@freudenbergs.de wrote:
 
 On 21.03.2012, at 00:16, C. Scott Ananian wrote:
 
  On Tue, Mar 20, 2012 at 4:47 PM, Gonzalo Odiard gonz...@laptop.org wrote:
  If you find non obvious icons, can report to try to improve.
  May be adults have problems with icons, but kids don't,
  just see a kid playing in any internet site.
 
  These icons become much more problematic on a touch screen, where there's 
  no obvious way to get the text descriptions to pop up.
   --scott
 
 OTOH, on a web site, you just want to get results quickly, and then maybe 
 never visit again. It's not worth learning what the icons mean, since they 
 most likely are unique to that site. That's why using icons like in the video 
 fails.
 
 However, that is different than the icons you use everyday. Those are worth 
 learning. Of course, the learning must be made possible, and hopefully 
 enjoyable. But the gut reaction of I as an adult can't figure it out at 
 first glance, so it must be bad isn't quite appropriate.
 
 - Bert -
 
 ___
 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 4/4] Save and restore state of the game

2012-03-27 Thread Manuel Kaufmann
On Mon, Mar 26, 2012 at 14:59, Sascha Silbe si...@activitycentral.com wrote:
 The first argument to the log.level family of functions is a format
 string. If you wish to log the value of some variable, you should use
 %s or %r in the format string and pass the variable as second+ parameter:

                log.debug('event=%r', event)

Documentation:

 * http://wiki.sugarlabs.org/go/Development_Team/Code_guidelines#Miscellaneous

-- 
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 v2] Save and restore state of the game

2012-03-27 Thread Manuel Kaufmann
On Tue, Mar 27, 2012 at 10:15, Manuel Kaufmann humi...@gmail.com wrote:
 Ability to 'save' (when the user closes the Activity) and 'restore' (when the
 user launch it from the Journal or the Home without holding Alt) the state of
 the game.

Here, I sent the a new patch that contains Sascha's suggestions.

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] Just learned about Mistery Meat Navigation

2012-03-27 Thread Manuel Quiñones
El día 27 de marzo de 2012 08:04, Bert Freudenberg
b...@freudenbergs.de escribió:
 IMHO, an explicit help button that toggles an overlay with help bubbles would 
 be best. Takes up less space than actual labels. Here's an example:

        http://thedigitalstory.com/2012/03/5_tips_for_working_w.html

Interesting, this is what Gary pointed in the Simple help system for
Sugar thread.

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


[Sugar-devel] Wiki user

2012-03-27 Thread Manuel Kaufmann
Hello,

I've just created a new user in http://wiki.sugarlabs.org and I
connected it with OpenID (Google Account). When it asked me, I clicked
on User the Full Name as Username (or something like that) by
mistake, so Manuel_Kaufmann is my username now.

I'd like to remove that user (but I didn't find that option) and
create a new one with Username: humitos. I didn't find the way to do
that.

I'm feeling so fool, sorry :D

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: Mobile dongles

2012-03-27 Thread Paul Fox
fors...@ozonline.com.au wrote:
  Paul
  
  Tried this with a XO-1.75 and a XO-1.5 both running OS31
  Tried a Huawei mobile dongle, a memory stick and a mouse
  
  The only case where a USB device remains powered during sleep is the mobile 
  dongle on the 1.75


huh.  okay, well, 1.75 is the first of the XO models that has the
ability to leave the USB ports powered (and i assume they all do when
the mobile dongle is used - the hardware control is all or none).  i
guess that driver is talking to the USB stack somehow to accomplish
this.

next question:  is this the right behavior?  if the dongle weren't
power cycled during resume, i guess that might be a good thing?

paul

  
  Tony
  
   fors...@ozonline.com.au wrote:
 Thanks
 
 I have noticed another issue with the mobile dongle.  OS31, XO-1.75
 Press the power button once and wait for sleep.  The dongle remains
   
   this is very surprising.  do other USB devices remain powered when the
   laptop sleeps?  we've done nothing intentional to change this (or fix this,
   depending on your point of view :-) in this release. 
   
   paul
   
 powered on (which is a good or bad thing depending on your point of
 view), then press the power button to wake the laptop, the dongle
 is briefly turned off and the connection is lost, negating any
 benefit from keeping it powered during sleep.
 
 Tony
 
   =-
paul fox, p...@laptop.org
   ___
   Sugar-devel mailing list
   Sugar-devel@lists.sugarlabs.org
   http://lists.sugarlabs.org/listinfo/sugar-devel
   
   _
   This mail has been virus scanned by Australia On Line
   see http://www.australiaonline.net.au/mailscanning

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


Re: [Sugar-devel] Just learned about Mistery Meat Navigation

2012-03-27 Thread Bert Freudenberg
On 27.03.2012, at 15:24, Manuel Quiñones wrote:

 El día 27 de marzo de 2012 08:04, Bert Freudenberg
 b...@freudenbergs.de escribió:
 IMHO, an explicit help button that toggles an overlay with help bubbles 
 would be best. Takes up less space than actual labels. Here's an example:
 
http://thedigitalstory.com/2012/03/5_tips_for_working_w.html
 
 Interesting, this is what Gary pointed in the Simple help system for Sugar 
 thread.


Yes, that, and also combined with your idea of an overlayed help window. 

Tapping the help button brings up the bubbles with a short description. But 
some bubbles also link to a more complete help widget. I'm referring to this 
screenshot:

http://thedigitalstory.com/2012/03/08/iPhoto_for_iPad.png

Tapping the arrow on the right of these bubbles opens a Help window in the 
middle of the screen, and jumps to the relevant page. It's organized 
hierarchically, and articles have hyperlinks to related topics. Plus there's 
full text search.

- Bert -


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


[Sugar-devel] [PATCH] keyhandler: Use textual key names

2012-03-27 Thread Daniel Drake
Conversion of 0x## keycodes is broken in libegg with recent GDK.

Switch to the textual names of the keys in question to work around this
bug, reference:  https://bugzilla.gnome.org/show_bug.cgi?id=672950

This fixes the frame key on XO laptops running Fedora 17.

Signed-off-by: Daniel Drake d...@laptop.org
---
 src/jarabe/view/keyhandler.py |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/jarabe/view/keyhandler.py b/src/jarabe/view/keyhandler.py
index a71f260..530da75 100644
--- a/src/jarabe/view/keyhandler.py
+++ b/src/jarabe/view/keyhandler.py
@@ -51,11 +51,11 @@ _actions_table = {
 'XF86AudioRaiseVolume': 'volume_up',
 'altF11': 'volume_min',
 'altF12': 'volume_max',
-'0x93': 'frame',
+'XF86MenuKB': 'frame',
 'altTab': 'next_window',
 'altshiftTab': 'previous_window',
 'altEscape': 'close_window',
-'0xDC': 'open_search',
+'XF86WebCam': 'open_search',
 # the following are intended for emulator users
 'altshiftf': 'frame',
 'altshiftq': 'quit_emulator',
-- 
1.7.7.6

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


Re: [Sugar-devel] Patch: Mobile dongles

2012-03-27 Thread James Cameron
On Tue, Mar 27, 2012 at 10:17:16AM -0400, Paul Fox wrote:
 huh.  okay, well, 1.75 is the first of the XO models that has the
 ability to leave the USB ports powered (and i assume they all do when
 the mobile dongle is used - the hardware control is all or none).  i
 guess that driver is talking to the USB stack somehow to accomplish
 this.

interesting.  that might mean we could provide USB mouse wakeup support
on XO-1.75 by tweaking the kernel.

 next question:  is this the right behavior?  if the dongle weren't
 power cycled during resume, i guess that might be a good thing?

it is a radio and controller that associates with a radio network as
soon as it is powered.  this association requires a bit of time, of the
order of a few seconds, and some transmissions at various power levels.
once associated there's an occasional brief transmission to keep the
radio network informed; a kind of keep-alive.

the HSPA term for the association is attached.

establishing an IP connection is a separate step.

so a power cycle increases the time taken to establish a connection, and
possibly increases the total power consumed.  on the other hand, this
has to be balanced against the power consumed while the laptop is in
suspend.

the effect of a depowering on the radio network is negative but minor.
an identity slot for the device is held available until the keep-alive
is not answered.

-- 
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 sugar] Do not display APs that announce the ssid in invalid utf-8 data, OLPC #11698

2012-03-27 Thread Sascha Silbe
Excerpts from Simon Schampijer's message of 2012-03-27 10:19:30 +0200:

 Sugar is not doing well in dealing with non-utf8 data. If an AP
 does not announce the ssid in valid utf-8 data Sugar will fail in
 certain ways.

That's an odd way to put it. The actual problem is that - similar to
POSIX file systems - IEEE 802.11 [7] only defines the SSID to be a
sequence of octets (i.e. bytes), but Sugar treats it as UTF-8 character
data. While in most cases the SSID is actually some human-readable
string, there's neither a guarantee for that nor does any (de-facto or
de-jure) standard specify the encoding to use. As a result, we'll
encounter SSIDs in a large variety of encodings and will also need to
cope with arbitrary byte strings. Any assumption of a single (or in fact
any) character encoding is incorrect.

The D-Bus API of NetworkManager 0.9 [8] passes SSIDs as uninterpreted
byte strings (D-Bus signature ay). Before SSIDs can be displayed on
screen, some kind of interpretation must happen. A hex dump would be the
most straightforward and simple approach, but also the least useful to
users (for obvious reasons).

networkmanager-applet (and probably its successor in the Gnome 3 Shell)
uses nm_utils_ssid_to_utf8() [9] from libnm-util to get a display name
(in UTF-8) for a given SSID. This functions contains a set of heuristics
to interpret the SSID and should produce useful results in the majority
of cases where the user has the same language configured as the operator
of the access point. Arguably it could do even better by falling back to
hex escapes (rather than a question mark) for bytes that cannot be
converted to a UTF-8 character (because all heuristics failed or it
simply isn't a representation of a character), but hopefully those are
rare enough in practice not to matter.

Some of this has already been discussed (by yourself and others) in
SL#2023 [6]; I'm surprised that ticket wasn't referenced in the
description as it's the relevant upstream (i.e. Sugar Labs) ticket.


 In some cases Sugar will crash when feeded non utf-8 compliant data,
 as ssid which segfaults glib.markup_escape_text when trying to display
 the ssid: glib.markup_escape_text does assume correct utf8 data to be
 passed [3].

While it doesn't explicitly state that assumption in the docs you cite,
it also doesn't promise to handle non-UTF-8 data properly. Seems we need
another round of inspecting the code for potential sources of invalid
data and catch malformed UTF-8 strings.


 The patch does check early when the AP is announced by NM and verify
 that we do have a ssid with valid utf-8 data. If not, we don't display
 the AP and log a debug message.

That may be a reasonable stopgap measure downstream for the crash you
encounter [2], but I don't think we should do this upstream. Assuming
UTF-8 is simply incorrect; the way we currently handle it and the way
you propose both mean users are rendered unable to use the access points
in question (rather than just visual artifacts). While it's technically
not a regression, we should fix it properly rather than putting a small
band-aid on a major hole.

I can imagine the following approaches:

1. Use nm_utils_ssid_to_utf8() via gobject-instrospection:

from gi.repository import NetworkManager
print unicode(NetworkManager.utils_ssid_to_utf8(list(äöüß)), 'utf-8')
   äöüß

   We know that PyGTK and GTK3 via gobject-introspection shouldn't be
   mixed inside a single process; does that apply to mixing PyGTK with
   gobject-introspection in general or would calling a self-contained
   utility function be fine?

2. Use nm_utils_ssid_to_utf8() via ctypes.

   I didn't get this to work within a few minutes (returns an empty
   string), but I don't see any fundamental reason this shouldn't work.

3. Duplicate (a subset of) nm_utils_ssid_to_utf8() in Sugar.

   It should be pretty straightforward to write a Python function that
   can at least handle the most common cases. At the very least we can
   do a hex dump for non-UTF-8 strings, that would be only slightly more
   complex than your patch.


Sascha

 [1] 
 http://developer.gnome.org/libnm-util/unstable/libnm-util-nm-utils.html#nm-utils-ssid-to-utf8
 [2] http://dev.laptop.org/ticket/11698
 [3] 
 http://developer.gnome.org/pygobject/stable/glib-functions.html#function-glib--markup-escape-text
 [4] https://bugzilla.gnome.org/show_bug.cgi?id=672546
 [5] 
 http://developer.gnome.org/glib/2.30/glib-Unicode-Manipulation.html#g-utf8-validate
[6] https://bugs.sugarlabs.org/ticket/2023
[7] http://standards.ieee.org/getieee802/download/802.11-2007.pdf (section 
7.3.2.1)
[8] http://projects.gnome.org/NetworkManager/developers/api/09/spec.html
[9] 
http://projects.gnome.org/NetworkManager/developers/libnm-util/09/libnm-util-nm-utils.html#nm-utils-ssid-to-utf8
-- 
http://sascha.silbe.org/
http://www.infra-silbe.de/


signature.asc
Description: PGP signature
___
Sugar-devel mailing list

Re: [Sugar-devel] Wiki user

2012-03-27 Thread Manuel Kaufmann
On Tue, Mar 27, 2012 at 17:21, Chris Leonard cjlhomeaddr...@gmail.com wrote:
 Except for the fact that wikipages start with capitals, your request
 has been addressed.

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


[Sugar-devel] [ASLO] Release Calculate-39

2012-03-27 Thread Sugar Labs Activities
Activity Homepage:
http://activities.sugarlabs.org/addon/4076

Sugar Platform:
0.82 - 0.96

Download Now:
http://activities.sugarlabs.org/downloads/file/27940/calculate-39.xo

Release notes:
* includes latest translations
* replaced some variables clobbering python keywords
* fix to prevent help text from being copied into next calculation. SL#2307
* trivial divide calculations can generate results with rounding errors #SL2332 
(Miguel Garcia)
* fix error in Rational division SL#3363 (Miguel Garcia)


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

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


[Sugar-devel] [Release] Calculate-39

2012-03-27 Thread Gary Martin
== Bundle ==

http://activities.sugarlabs.org/en-US/sugar/downloads/file/27940/calculate-39.xo

== Source ==

http://download.sugarlabs.org/sources/sucrose/fructose/Calculate/Calculate-39.tar.bz2

== News ==

* includes latest translations
* replaced some variables clobbering python keywords
* fix to prevent help text from being copied into next calculation. SL#2307
* trivial divide calculations can generate results with rounding errors #SL2332 
(Miguel Garcia)
* fix error in Rational division SL#3363 (Miguel Garcia)
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel