Re: [Sugar-devel] [PATCH] String format fix for "View Source" activity title

2011-12-14 Thread Simon Schampijer

On 14/12/11 19:53, Manuel Quiñones wrote:

Fixes bug #3272 .

Signed-off-by: Manuel Quiñones
---
  src/jarabe/view/viewsource.py |2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/jarabe/view/viewsource.py b/src/jarabe/view/viewsource.py
index 4ec47eb..1285e69 100644
--- a/src/jarabe/view/viewsource.py
+++ b/src/jarabe/view/viewsource.py
@@ -397,7 +397,7 @@ class Toolbar(gtk.Toolbar):
  sugar_button.show()
  self._add_separator()

-self.activity_title_text = _('View source: %r') % title
+self.activity_title_text = _('View source: %s') % title
  self.sugar_toolkit_title_text = _('View source: %r') % 'Sugar Toolkit'
  self.label = gtk.Label()
  self.label.set_markup('%s' % self.activity_title_text)


Thanks for the patch Manuel, it looks good. Ack'ed by me.

Regards,
   Simon



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


Re: [Sugar-devel] [PATCH sugar-toolkit-gtk3] Reimplement Palettes for GTK3

2011-12-14 Thread Simon Schampijer

On 14/12/11 22:53, Daniel Drake wrote:

Moving from GTK2 to GTK3 has presented various challenges regarding
palettes.


There are two small things that have been introduced accidentally by 
this patch, fixups are:


commit a7f1eb596ed3a4b63cab97fbc97c1a9aa0f9c813
Author: Simon Schampijer 
Date:   Wed Dec 14 23:15:02 2011 -0300

tray: fixup Indententation error

diff --git a/src/sugar3/graphics/tray.py b/src/sugar3/graphics/tray.py
index ae8b772..f4bfb83 100644
--- a/src/sugar3/graphics/tray.py
+++ b/src/sugar3/graphics/tray.py
@@ -114,7 +114,7 @@ class _TrayViewport(Gtk.Viewport):
 adj.set_value(max(adj.get_lower(), new_value))

 def do_get_preferred_width(self):
- if self.orientation == Gtk.Orientation.HORIZONTAL:
+if self.orientation == Gtk.Orientation.HORIZONTAL:
 return Gtk.Viewport.do_get_preferred_width(self)
 child_minimum, child_natural = 
self.get_child().get_preferred_size()

 return child_minimum.width, child_natural.width


commit 551710cb5ee8c8c66c0384e4c17b03aff33f780e
Author: Simon Schampijer 
Date:   Wed Dec 14 23:14:12 2011 -0300

When the Invoker detaches the destroy method will be called

This has been removed accidentely

diff --git a/src/sugar3/graphics/palettewindow.py 
b/src/sugar3/graphics/palettewindow.py

index fe0b5a1..ce13544 100644
--- a/src/sugar3/graphics/palettewindow.py
+++ b/src/sugar3/graphics/palettewindow.py
@@ -450,6 +450,10 @@ class PaletteWindow(GObject.GObject):
 self._widget.disconnect_by_func(self.__leave_notify_cb)
 self._set_effective_group_id(None)

+def destroy(self):
+if self._widget is not None:
+self._widget.destroy()
+
 def __destroy_cb(self, palette):
 self._mouse_detector.disconnect_by_func(self._mouse_slow_cb)

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


[Sugar-devel] [PATCH sugar-toolkit-gtk3] Reimplement Palettes for GTK3

2011-12-14 Thread Daniel Drake
Moving from GTK2 to GTK3 has presented various challenges regarding
palettes.

In GTK2, we were able to access some internal API of the GtkMenu class
and use it to embed a GtkMenu in a regular window. As of GTK3, that API
has become private and we can no longer access it.

We still want to use GtkMenu for the advanced functionality it provides
(multiple-level menus, keyboard navigation, etc), but we are now limited
to popping it up with its own (internal) window, rather than being able
to pack it into one of our own.

Our palettes can historically be used either as a menu, or as a general
area where widgets can be added, or both. The new restrictions upon
GtkMenu force some changes here, but we work hard to stick to the old
API as far as possible.

A Palette instance now acts as a controller of either a "window widget"
(where any type of widget can be displayed as usual) or a "menu widget"
which just pops up a GtkMenu. A Palette defaults to the window mode, but
dynamically switches to menu mode if/when the user attempts to access
the menu element.

As a result of this, palettes can now pack either a user-defined collection
of widgets, or a menu, but types can no longer be mixed. This should
only affect a handful of palettes which will need to pick a single
approach and convert to it.

Some further challenges are presented by the fact that GtkMenu performs a
grab on the whole screen, meaning that all input events are delivered to
the GtkMenu widget. Through some careful event filtering and examination
of the mouse cursor position we are still able to determine when the mouse
has entered or left the invoker or menu areas.

This work is authored by Benjamin Berg, Marco Pesenti Gritti, Simon
Schampijer and Daniel Drake.
---
 src/sugar3/Makefile.am   |4 +-
 src/sugar3/graphics/palette.py   |  228 +++-
 src/sugar3/graphics/palettegroup.py  |5 +
 src/sugar3/graphics/palettewindow.py |  489 +-
 src/sugar3/graphics/toolbarbox.py|   85 +++---
 src/sugar3/sugar-menu.c  |   63 -
 src/sugar3/sugar-menu.h  |   57 
 7 files changed, 515 insertions(+), 416 deletions(-)
 delete mode 100644 src/sugar3/sugar-menu.c
 delete mode 100644 src/sugar3/sugar-menu.h

diff --git a/src/sugar3/Makefile.am b/src/sugar3/Makefile.am
index 1f073df..3aec8bf 100644
--- a/src/sugar3/Makefile.am
+++ b/src/sugar3/Makefile.am
@@ -53,9 +53,7 @@ libsugarext_la_SOURCES =  \
sugar-grid.c\
sugar-grid.h\
sugar-key-grabber.c \
-   sugar-key-grabber.h \
-   sugar-menu.c\
-   sugar-menu.h
+   sugar-key-grabber.h
 
 sugar_LTLIBRARIES = _sugarbaseext.la
 
diff --git a/src/sugar3/graphics/palette.py b/src/sugar3/graphics/palette.py
index ee76674..1f95c11 100644
--- a/src/sugar3/graphics/palette.py
+++ b/src/sugar3/graphics/palette.py
@@ -1,6 +1,8 @@
 # Copyright (C) 2007, Eduardo Silva 
 # Copyright (C) 2008, One Laptop Per Child
 # Copyright (C) 2009, Tomeu Vizoso
+# Copyright (C) 2011, Benjamin Berg 
+# Copyright (C) 2011, Marco Pesenti Gritti 
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -29,8 +31,8 @@ from sugar3.graphics import palettegroup
 from sugar3.graphics import animator
 from sugar3.graphics import style
 from sugar3.graphics.icon import Icon
-from sugar3.graphics.palettewindow import PaletteWindow
-from gi.repository import SugarExt
+from sugar3.graphics.palettewindow import PaletteWindow, \
+_PaletteWindowWidget, _PaletteMenuWidget
 
 # DEPRECATED
 # Import these for backwards compatibility
@@ -39,16 +41,37 @@ from sugar3.graphics.palettewindow import 
MouseSpeedDetector, Invoker, \
 
 
 class Palette(PaletteWindow):
+"""
+Floating palette implementation.
+
+This class dynamically switches between one of two encapsulated child
+widget types: a _PaletteWindowWidget or a _PaletteMenuWidget.
+
+The window widget, created by default, acts as the container for any
+type of widget the user may wish to add. It can optionally display primary
+text, secondary text, and an icon at the top of the palette.
+
+If the user attempts to access the 'menu' property, the window widget is
+destroyed and the palette is dynamically switched to use a menu widget.
+This is a GtkMenu that retains the same look and feel as a normal palette,
+allowing submenus and so on. If primary text, secondary text and/or icons
+were provided, an initial menu entry is created containing widgets to
+display such information.
+"""
+
 PRIMARY = 0
 SECONDARY = 1
 
+__gsignals__ = {
+'activate': (GObject.SignalFlags.RUN_FIRST, None, ([])),
+}
+
 __gtype_name__ = 'SugarPalette'
 
-def __init__(self, label=None, accel_path=None, menu_after_content=False,
+def __init__(self

[Sugar-devel] [PATCH sugar-toolkit-gtk3] SugarExt: make SugarGrid introspectable

2011-12-14 Thread Daniel Drake
This will be used by a future GTK3 port of the shell.
---
 src/sugar3/Makefile.am |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/sugar3/Makefile.am b/src/sugar3/Makefile.am
index e795c27..1f073df 100644
--- a/src/sugar3/Makefile.am
+++ b/src/sugar3/Makefile.am
@@ -132,6 +132,8 @@ SugarExt_1_0_gir_FILES = \
gsm-xsmp.h \
sugar-key-grabber.c \
sugar-key-grabber.h \
+   sugar-grid.c \
+   sugar-grid.h \
gdk-wrapper.c \
gdk-wrapper.h \
rsvg-wrapper.c \
-- 
1.7.7.4

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


[Sugar-devel] [PATCH sugar-toolkit-gtk3] Trivial GTK3 porting fixes

2011-12-14 Thread Daniel Drake
Fix some trivial issues missed earlier: various missing imports,
some minor API changes to adapt to, do_size_request simple porting,
etc.
---
 src/sugar3/activity/activity.py  |1 +
 src/sugar3/activity/namingalert.py   |9 +
 src/sugar3/datastore/datastore.py|2 +-
 src/sugar3/graphics/alert.py |   11 +++
 src/sugar3/graphics/colorbutton.py   |4 +++-
 src/sugar3/graphics/combobox.py  |1 +
 src/sugar3/graphics/icon.py  |2 ++
 src/sugar3/graphics/iconentry.py |3 +++
 src/sugar3/graphics/objectchooser.py |1 +
 src/sugar3/graphics/panel.py |1 +
 src/sugar3/graphics/toolbox.py   |7 ---
 src/sugar3/graphics/tray.py  |   28 
 src/sugar3/graphics/window.py|   26 +-
 src/sugar3/wm.py |4 ++--
 14 files changed, 60 insertions(+), 40 deletions(-)

diff --git a/src/sugar3/activity/activity.py b/src/sugar3/activity/activity.py
index 6e23b14..5e9986d 100644
--- a/src/sugar3/activity/activity.py
+++ b/src/sugar3/activity/activity.py
@@ -58,6 +58,7 @@ from functools import partial
 from gi.repository import GConf
 from gi.repository import Gtk
 from gi.repository import Gdk
+from gi.repository import GdkPixbuf
 from gi.repository import GObject
 import dbus
 import dbus.service
diff --git a/src/sugar3/activity/namingalert.py 
b/src/sugar3/activity/namingalert.py
index b697d04..09c0cb4 100644
--- a/src/sugar3/activity/namingalert.py
+++ b/src/sugar3/activity/namingalert.py
@@ -20,6 +20,7 @@ import os
 
 from gi.repository import Gio
 from gi.repository import Gtk
+from gi.repository import Gdk
 from gi.repository import GObject
 from gi.repository import GConf
 
@@ -194,18 +195,18 @@ class NamingAlert(Gtk.Window):
 header = self._create_header()
 body.pack_start(header, False, False, style.DEFAULT_PADDING)
 
-body.pack_start(self._create_separator(style.DEFAULT_SPACING, True, 
True, 0), False, False, 0)
+body.pack_start(self._create_separator(style.DEFAULT_SPACING), False, 
False, 0)
 
-body.pack_start(self._create_label(_('Description:', True, True, 0)), 
False, False, 0)
+body.pack_start(self._create_label(_('Description:')), False, False, 0)
 
 description = self._activity.metadata.get('description', '')
 description_box, self._description = 
self._create_text_view(description)
 body.pack_start(description_box, True, True, 0)
 
-body.pack_start(self._create_separator(style.DEFAULT_PADDING, True, 
True, 0), False, False, 0)
+body.pack_start(self._create_separator(style.DEFAULT_PADDING), False, 
False, 0)
 
 
-body.pack_start(self._create_label(_('Tags:', True, True, 0)), False, 
False, 0)
+body.pack_start(self._create_label(_('Tags:')), False, False, 0)
 
 tags = self._activity.metadata.get('tags', '')
 tags_box, self._tags = self._create_text_view(tags)
diff --git a/src/sugar3/datastore/datastore.py 
b/src/sugar3/datastore/datastore.py
index 2ada474..c7a741e 100644
--- a/src/sugar3/datastore/datastore.py
+++ b/src/sugar3/datastore/datastore.py
@@ -231,7 +231,7 @@ class RawObject(object):
 'uid': file_path,
 'title': os.path.basename(file_path),
 'timestamp': stat.st_mtime,
-'mime_type': Gio.content_type_guess(filename=file_path),
+'mime_type': Gio.content_type_guess(file_path, None)[0],
 'activity': '',
 'activity_id': '',
 'icon-color': client.get_string('/desktop/sugar/user/color'),
diff --git a/src/sugar3/graphics/alert.py b/src/sugar3/graphics/alert.py
index e85598a..16392cd 100644
--- a/src/sugar3/graphics/alert.py
+++ b/src/sugar3/graphics/alert.py
@@ -354,10 +354,13 @@ class _TimeoutIcon(Gtk.Alignment):
 self._draw(context)
 return False
 
-def do_size_request(self, requisition):
-requisition.height, requisition.width = \
-Gtk.icon_size_lookup(Gtk.IconSize.BUTTON)
-self._text.size_request()
+def do_get_preferred_width(self):
+width = Gtk.icon_size_lookup(Gtk.IconSize.BUTTON)[1]
+return width, width
+
+def do_get_preferred_height(self):
+height = Gtk.icon_size_lookup(Gtk.IconSize.BUTTON)[2]
+return height, height
 
 def _draw(self, context):
 w = self.get_allocated_width()
diff --git a/src/sugar3/graphics/colorbutton.py 
b/src/sugar3/graphics/colorbutton.py
index fbda30d..9f490bb 100644
--- a/src/sugar3/graphics/colorbutton.py
+++ b/src/sugar3/graphics/colorbutton.py
@@ -17,6 +17,8 @@
 # Boston, MA 02111-1307, USA.
 
 import gettext
+from gi.repository import Gdk
+from gi.repository import GdkPixbuf
 from gi.repository import Gtk
 from gi.repository import GObject
 import struct
@@ -261,7 +263,7 @@ class _ColorPalette(Palette):
 self._swatch_tray = Gtk.Table()
 
 self

Re: [Sugar-devel] FW: scratch on aslo

2011-12-14 Thread Rafael Ortiz
On Wed, Dec 14, 2011 at 7:42 PM, Alan Jhonn Aguiar Schwyn <
alan...@hotmail.com> wrote:

>  It's ok uploading those to aslo, if they have OSI compliant Licences,
> pointing to original devs, also if they provide a good sugar experience.
> More info here:
>
>
> http://wiki.sugarlabs.org/go/Activity_Library/Editors/Policy#Guidelines_for_accepting_an_activity
>
>
>
> Ok. The "importants" are in ASLO.. maybe there are some that not..
>
> I could test some and upload them. But corresponds me to do that? I do not
> want to override the original developers ..
>

it's necessary to ask first the original devs.
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] FW: scratch on aslo

2011-12-14 Thread Alan Jhonn Aguiar Schwyn

It's ok uploading those to aslo, if they have OSI compliant Licences, pointing 
to original devs, also if they provide a good sugar experience. More info here:
http://wiki.sugarlabs.org/go/Activity_Library/Editors/Policy#Guidelines_for_accepting_an_activity

Ok. The "importants" are in ASLO.. maybe there are some that not..
I could test some and upload them. But corresponds me to do that? I do not want 
to override the original developers ..___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] FW: scratch on aslo

2011-12-14 Thread Gonzalo Odiard
On Wed, Dec 14, 2011 at 9:24 PM, Alan Jhonn Aguiar Schwyn <
alan...@hotmail.com> wrote:

>  Hi,
>
> Scratch there are in:
> http://activities.sugarlabs.org/es-ES/sugar/addon/4249
>
> But was removed: http://download.sugarlabs.org/activities/4249/
>
> Was removed for a discussion about his License..
>
>
Yes. Then we have the last packaged activity here
http://wiki.laptop.org/go/Scratch




> There are some activities that not are in ASLO..
>
> For example, all the activities that was in:
> http://wiki.laptop.org/index.php?title=Activities/All/lang-es&oldid=262569
>
> That activities, can be uploaded to ASLO? Some not have now a maintener..
> but some works..
>
>
Most of these activities are in aslo, and other are unmaintained and
probably don't work.
If you have any good activity outside of aslo, should contact to the
maintainer and request inclusion.

Gonzalo




> Regards!
>
> Alan
>
> --
> Date: Wed, 14 Dec 2011 19:04:34 -0500
> From: meta...@gmail.com
> To: sugar-devel@lists.sugarlabs.org
> Subject: [Sugar-devel] scratch on aslo
>
>
> Scratch doesn't seem to be on ASLO.  On the other hand, when I sign in and
> try to upload it, I am told the file is already in the system.   Can
> someone link me to it?
>
> It is ***really hard*** to find the link to upload an activity.  Can this
> be added in a few more places?  If you don't think to hover over nav
> elements I don't think there is any other way to discover it.
> http://activities.sugarlabs.org/en-US/developers/addon/submit
>
> It is unclear how to submit someone else's activity for inclusion.  There
> are some popular activities not in aslo, particularly spanish-language ones
> (cf. xojuegos.com); this would be a nice feature, even if the resulting
> work gets an "unverified" copyright stamp.
>
> SJ
>
> ___ 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 mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] FW: scratch on aslo

2011-12-14 Thread Alan Jhonn Aguiar Schwyn

It's ok uploading those to aslo, if they have OSI compliant Licences, pointing 
to original devs, also if they provide a good sugar experience. More info here: 
http://wiki.sugarlabs.org/go/Activity_Library/Editors/Policy#Guidelines_for_accepting_an_activity

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


Re: [Sugar-devel] FW: scratch on aslo

2011-12-14 Thread Rafael Ortiz
On Wed, Dec 14, 2011 at 7:24 PM, Alan Jhonn Aguiar Schwyn <
alan...@hotmail.com> wrote:

>  Hi,
>
> Scratch there are in:
> http://activities.sugarlabs.org/es-ES/sugar/addon/4249
>
> But was removed: http://download.sugarlabs.org/activities/4249/
>
> Was removed for a discussion about his License..
>
> There are some activities that not are in ASLO..
>
> For example, all the activities that was in:
> http://wiki.laptop.org/index.php?title=Activities/All/lang-es&oldid=262569
>
> That activities, can be uploaded to ASLO? Some not have now a maintener..
> but some works..
>
>
It's ok uploading those to aslo, if they have OSI compliant Licences,
pointing to original devs, also if they provide a good sugar experience.
More info here:

http://wiki.sugarlabs.org/go/Activity_Library/Editors/Policy#Guidelines_for_accepting_an_activity

Regards!
>
> Alan
>
> --
> Date: Wed, 14 Dec 2011 19:04:34 -0500
> From: meta...@gmail.com
> To: sugar-devel@lists.sugarlabs.org
> Subject: [Sugar-devel] scratch on aslo
>
>
> Scratch doesn't seem to be on ASLO.  On the other hand, when I sign in and
> try to upload it, I am told the file is already in the system.   Can
> someone link me to it?
>
> It is ***really hard*** to find the link to upload an activity.  Can this
> be added in a few more places?  If you don't think to hover over nav
> elements I don't think there is any other way to discover it.
> http://activities.sugarlabs.org/en-US/developers/addon/submit
>
> It is unclear how to submit someone else's activity for inclusion.  There
> are some popular activities not in aslo, particularly spanish-language ones
> (cf. xojuegos.com); this would be a nice feature, even if the resulting
> work gets an "unverified" copyright stamp.
>
> SJ
>
> ___ 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 mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


[Sugar-devel] FW: scratch on aslo

2011-12-14 Thread Alan Jhonn Aguiar Schwyn

Hi,
Scratch there are in: http://activities.sugarlabs.org/es-ES/sugar/addon/4249
But was removed: http://download.sugarlabs.org/activities/4249/
Was removed for a discussion about his License..
There are some activities that not are in ASLO.. 
For example, all the activities that was in: 
http://wiki.laptop.org/index.php?title=Activities/All/lang-es&oldid=262569
That activities, can be uploaded to ASLO? Some not have now a maintener.. but 
some works..
Regards!
Alan

Date: Wed, 14 Dec 2011 19:04:34 -0500
From: meta...@gmail.com
To: sugar-devel@lists.sugarlabs.org
Subject: [Sugar-devel] scratch on aslo

Scratch doesn't seem to be on ASLO.  On the other hand, when I sign in and try 
to upload it, I am told the file is already in the system.   Can someone link 
me to it?
It is ***really hard*** to find the link to upload an activity.  Can this be 
added in a few more places?  If you don't think to hover over nav elements I 
don't think there is any other way to discover it.

http://activities.sugarlabs.org/en-US/developers/addon/submit
It is unclear how to submit someone else's activity for inclusion.  There are 
some popular activities not in aslo, particularly spanish-language ones (cf. 
xojuegos.com); this would be a nice feature, even if the resulting work gets an 
"unverified" copyright stamp.


SJ

___
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] scratch on aslo

2011-12-14 Thread Christoph Derndorfer
Okay, these seem to be two of the core messages which explain the
background:

http://lists.sugarlabs.org/archive/iaep/2011-June/013395.html
http://lists.sugarlabs.org/archive/iaep/2011-June/013402.html

Christoph

On Thu, Dec 15, 2011 at 1:16 AM, Christoph Derndorfer <
christoph.derndor...@gmail.com> wrote:

> Hi SJ,
>
> IIRC correctly there is some issue with license incompatibility and
> therefore Scratch was removed from ASLO. I think this was discussed on the
> lists at some point during the summer but I'm on my mobile phone so
> unfortunately wasn't able to quickly pull up the corresponding thread.
>
> Cheers,
> Christoph
>
> On Thu, Dec 15, 2011 at 1:04 AM, Samuel Klein  wrote:
>
>> Scratch doesn't seem to be on ASLO.  On the other hand, when I sign in
>> and try to upload it, I am told the file is already in the system.   Can
>> someone link me to it?
>>
>> It is ***really hard*** to find the link to upload an activity.  Can this
>> be added in a few more places?  If you don't think to hover over nav
>> elements I don't think there is any other way to discover it.
>> http://activities.sugarlabs.org/en-US/developers/addon/submit
>>
>> It is unclear how to submit someone else's activity for inclusion.  There
>> are some popular activities not in aslo, particularly spanish-language ones
>> (cf. xojuegos.com); this would be a nice feature, even if the resulting
>> work gets an "unverified" copyright stamp.
>>
>> SJ
>>
>> ___
>> Sugar-devel mailing list
>> Sugar-devel@lists.sugarlabs.org
>> http://lists.sugarlabs.org/listinfo/sugar-devel
>>
>>
>
>
> --
> Christoph Derndorfer
>
> volunteer, OLPC (Austria) [www.olpc.at]
> editor, OLPC News [www.olpcnews.com]
> contributor, TechnikBasteln [www.technikbasteln.net]
>
> e-mail: christ...@derndorfer.eu
>
>
>


-- 
Christoph Derndorfer

volunteer, OLPC (Austria) [www.olpc.at]
editor, OLPC News [www.olpcnews.com]
contributor, TechnikBasteln [www.technikbasteln.net]

e-mail: christ...@derndorfer.eu
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] scratch on aslo

2011-12-14 Thread Christoph Derndorfer
Hi SJ,

IIRC correctly there is some issue with license incompatibility and
therefore Scratch was removed from ASLO. I think this was discussed on the
lists at some point during the summer but I'm on my mobile phone so
unfortunately wasn't able to quickly pull up the corresponding thread.

Cheers,
Christoph

On Thu, Dec 15, 2011 at 1:04 AM, Samuel Klein  wrote:

> Scratch doesn't seem to be on ASLO.  On the other hand, when I sign in and
> try to upload it, I am told the file is already in the system.   Can
> someone link me to it?
>
> It is ***really hard*** to find the link to upload an activity.  Can this
> be added in a few more places?  If you don't think to hover over nav
> elements I don't think there is any other way to discover it.
> http://activities.sugarlabs.org/en-US/developers/addon/submit
>
> It is unclear how to submit someone else's activity for inclusion.  There
> are some popular activities not in aslo, particularly spanish-language ones
> (cf. xojuegos.com); this would be a nice feature, even if the resulting
> work gets an "unverified" copyright stamp.
>
> SJ
>
> ___
> Sugar-devel mailing list
> Sugar-devel@lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/sugar-devel
>
>


-- 
Christoph Derndorfer

volunteer, OLPC (Austria) [www.olpc.at]
editor, OLPC News [www.olpcnews.com]
contributor, TechnikBasteln [www.technikbasteln.net]

e-mail: christ...@derndorfer.eu
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


[Sugar-devel] scratch on aslo

2011-12-14 Thread Samuel Klein
Scratch doesn't seem to be on ASLO.  On the other hand, when I sign in and
try to upload it, I am told the file is already in the system.   Can
someone link me to it?

It is ***really hard*** to find the link to upload an activity.  Can this
be added in a few more places?  If you don't think to hover over nav
elements I don't think there is any other way to discover it.
http://activities.sugarlabs.org/en-US/developers/addon/submit

It is unclear how to submit someone else's activity for inclusion.  There
are some popular activities not in aslo, particularly spanish-language ones
(cf. xojuegos.com); this would be a nice feature, even if the resulting
work gets an "unverified" copyright stamp.

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


[Sugar-devel] [PATCH sugar-toolkit-gtk3] Add EventIcon/CursorInvoker similar to CanvasIcon/CanvasInvoker

2011-12-14 Thread Daniel Drake
CanvasIcon and CanvasInvoker were removed in a previous GTK3-porting commit
as they were based on hippocanvas.

However, this leaves the toolkit with some missing functionality:
there is no longer a trivial way to show an icon which can receive mouse
events and pop up a palette. Such functionality is used in various
places throughout the shell and activities.

Reimplement this functionality as EventIcon and CursorInvoker.
Instead of reimplementing much of the Icon class (like CanvasIcon did),
EventIcon opts for a more simplistic encapsulation of an Icon object.
This means trivial API changes for CanvasIcon users who must now
use the 'icon' property with the Icon API.
---
 src/sugar3/graphics/icon.py  |   70 ++
 src/sugar3/graphics/palette.py   |2 +-
 src/sugar3/graphics/palettewindow.py |   62 ++
 3 files changed, 133 insertions(+), 1 deletions(-)

diff --git a/src/sugar3/graphics/icon.py b/src/sugar3/graphics/icon.py
index f6c9374..2d98f8a 100644
--- a/src/sugar3/graphics/icon.py
+++ b/src/sugar3/graphics/icon.py
@@ -29,6 +29,7 @@ from gi.repository import GObject
 from gi.repository import Gtk
 import cairo
 
+from sugar3.graphics import style
 from sugar3.graphics.xocolor import XoColor
 from sugar3.util import LRU
 
@@ -545,6 +546,75 @@ class Icon(Gtk.Image):
 type=float, setter=set_scale)
 
 
+class EventIcon(Gtk.EventBox):
+"""
+An Icon class that provides access to mouse events and that can act as a
+cursor-positioned palette invoker.
+"""
+
+__gtype_name__ = 'EventIcon'
+__gsignals__ = {
+'activated': (GObject.SIGNAL_RUN_LAST, GObject.TYPE_NONE, []),
+}
+
+def __init__(self, **kwargs):
+Gtk.EventBox.__init__(self)
+
+self._icon = Icon()
+for key, value in kwargs.iteritems():
+self._icon.set_property(key, value)
+self.add(self._icon)
+self._icon.show()
+
+from sugar3.graphics.palette import CursorInvoker
+self._palette_invoker = CursorInvoker()
+self._palette_invoker.attach(self)
+
+self.modify_bg(Gtk.StateType.NORMAL, style.COLOR_WHITE.get_gdk_color())
+self.connect('destroy', self.__destroy_cb)
+
+def __destroy_cb(self, icon):
+if self._palette_invoker is not None:
+self._palette_invoker.detach()
+
+def do_button_press_event(self, event):
+if event.button == 1:
+self.emit('activated')
+return True
+else:
+return False
+
+def get_icon(self):
+return self._icon
+
+icon = GObject.property(
+type=object, getter=get_icon)
+
+def get_palette(self):
+return self._palette_invoker.palette
+
+def set_palette(self, palette):
+self._palette_invoker.palette = palette
+
+palette = GObject.property(
+type=object, setter=set_palette, getter=get_palette)
+
+def get_palette_invoker(self):
+return self._palette_invoker
+
+def set_palette_invoker(self, palette_invoker):
+self._palette_invoker.detach()
+self._palette_invoker = palette_invoker
+
+palette_invoker = GObject.property(
+type=object, setter=set_palette_invoker, getter=get_palette_invoker)
+
+def set_tooltip(self, text):
+from sugar3.graphics.palette import Palette
+
+self.set_palette(Palette(text))
+
+
 class CellRendererIcon(Gtk.CellRenderer):
 
 __gtype_name__ = 'SugarCellRendererIcon'
diff --git a/src/sugar3/graphics/palette.py b/src/sugar3/graphics/palette.py
index b23a28d..ee76674 100644
--- a/src/sugar3/graphics/palette.py
+++ b/src/sugar3/graphics/palette.py
@@ -35,7 +35,7 @@ from gi.repository import SugarExt
 # DEPRECATED
 # Import these for backwards compatibility
 from sugar3.graphics.palettewindow import MouseSpeedDetector, Invoker, \
-WidgetInvoker, CanvasInvoker, ToolInvoker, CellRendererInvoker
+WidgetInvoker, CursorInvoker, ToolInvoker, CellRendererInvoker
 
 
 class Palette(PaletteWindow):
diff --git a/src/sugar3/graphics/palettewindow.py 
b/src/sugar3/graphics/palettewindow.py
index baf96e3..562f1d5 100644
--- a/src/sugar3/graphics/palettewindow.py
+++ b/src/sugar3/graphics/palettewindow.py
@@ -788,6 +788,68 @@ class WidgetInvoker(Invoker):
 widget = GObject.property(type=object, getter=_get_widget, setter=None)
 
 
+class CursorInvoker(Invoker):
+
+def __init__(self, parent=None):
+Invoker.__init__(self)
+
+self._position_hint = self.AT_CURSOR
+self._enter_hid = None
+self._leave_hid = None
+self._release_hid = None
+self._item = None
+
+if parent:
+self.attach(parent)
+
+def attach(self, parent):
+Invoker.attach(self, parent)
+
+self._item = parent
+self._enter_hid = self._item.connect('enter-notify-event',
+ self.__enter_notify_event_cb)
+self._leave_h

[Sugar-devel] [PATCH sugar-toolkit-gtk3] SugarExt: drop pygobject2 initialisation

2011-12-14 Thread Daniel Drake
Now that we avoid linking with pygtk2/pygobject2, we need to remove
this initialisation call so that the module can be loaded at runtime.
---
 src/sugar3/_sugarbaseextmodule.c |2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/src/sugar3/_sugarbaseextmodule.c b/src/sugar3/_sugarbaseextmodule.c
index ebc1310..57fb139 100644
--- a/src/sugar3/_sugarbaseextmodule.c
+++ b/src/sugar3/_sugarbaseextmodule.c
@@ -31,8 +31,6 @@ init_sugarbaseext(void)
 {
 PyObject *m, *d;
 
-init_pygobject ();
-
 m = Py_InitModule ("_sugarbaseext", py_sugarbaseext_functions);
 d = PyModule_GetDict (m);
 
-- 
1.7.7.4

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


[Sugar-devel] [PATCH] String format fix for "View Source" activity title

2011-12-14 Thread Manuel Quiñones
Fixes bug #3272 .

Signed-off-by: Manuel Quiñones 
---
 src/jarabe/view/viewsource.py |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/jarabe/view/viewsource.py b/src/jarabe/view/viewsource.py
index 4ec47eb..1285e69 100644
--- a/src/jarabe/view/viewsource.py
+++ b/src/jarabe/view/viewsource.py
@@ -397,7 +397,7 @@ class Toolbar(gtk.Toolbar):
 sugar_button.show()
 self._add_separator()
 
-self.activity_title_text = _('View source: %r') % title
+self.activity_title_text = _('View source: %s') % title
 self.sugar_toolkit_title_text = _('View source: %r') % 'Sugar Toolkit'
 self.label = gtk.Label()
 self.label.set_markup('%s' % self.activity_title_text)
-- 
1.7.7.3

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


Re: [Sugar-devel] html rendering differences between Browse and embedded WebView

2011-12-14 Thread Manuel Quiñones
Hi Erik,

2011/12/12 Erik Blankinship 
>
> The Browse activity themes web page widgets differently than embedding a web 
> viewer in an activity.
>
> For example, in the Browse activity, buttons and scrollbars are rectangular.  
> In my Activity WebView these widgets are rounded rectangles.

Yes, this will change in next Browse using GTK3 and WebKitGTK+.  The
buttons, checkboxes and other widgets in a web page that have not been
styled will use the Sugar GTK3 theme.

Cheers,

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


[Sugar-devel] slackware 13.37 and sugar

2011-12-14 Thread andrew
I have been using Soas-2-blueberry.iso installed on a usb ,which has 
been working well.However I keep having to go to an internet cafe 
running windows to use it, this is because my pc is running Slackware 
13.37 and I have not manged to configure lilo to boot the usb.


Also there doesn't seem to be a capacity on this pc to set bios to boot 
from usb.


The ideal would be to install sugar as packages on slackware 13.37 system

I have had a look at : http://wiki.sugarlabs.org/go/0.82/Source_Code

etoys is self explanatory -thats the choice of game apps

whats the difference between sugar-0.82.9 & sugar-base-0.82.2 ?

using src2pkg I have managed to create slackware packages 
sugar-base-0.82.2-i486-1.txz and sugar-toolkit-0.82.11-i486-1 .txz both 
of these have installed ok


i tried creating a "sugar build" with :
sugar-0.82.9.tar.bz2
 sugar.SlackBuild (based on alien bobs template)
sugar.info 
slack-desc

I got a fail quoting no "man page"  anybody into slackware out there who 
can help?


cheers

andy brookes

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


Re: [Sugar-devel] badges for collaborative activities

2011-12-14 Thread C. Scott Ananian
On Wed, Dec 14, 2011 at 11:19 AM, Michael Stone
 wrote:
> On 12/13/11, C. Scott Ananian  wrote:
>> I was playing with Sugar collaboration between my XO-1.75 and my
>> crazy-nephew's XO-1.5 over the weekend.  We wanted to "play together",
>> but it was hard to find which activities would let us do so.
>>
>> What if we added a small badge (perhaps the "ring of dots" used to
>> switch an activity from 'private' to 'shared') to activities on the
>> home screen to indicate that they support collaboration?  That would
>> make it easy to tell which activities allow us to play together.
>
> It's not worth much, but: "good suggestion; makes sense to me." :)

I've added my suggestion to the discussion page for Simon's
  http://wiki.sugarlabs.org/go/Features/Can_share
which also sounds like "good (implementation) suggestion, makes sense to me".

Once Simon's infrastructure is in place, then things like the "launch
as Shared" idea Walter wants should be straightforward as well.
(Although I will note that my 5-yr-old test subject is completely
baffled by the many different ways of launching/resuming activities
already.  He did understand how to share his activity w/ me, once I
showed it to him, and seemed quite pleased that he was able to "play
by himself" when he wanted to.)
  --scott

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


Re: [Sugar-devel] [PATCH v2][sucrose-0.94][RFC] Add capability to connect to WPA/WPA2-Enterprise networks

2011-12-14 Thread Ajay Garg
The documentation may be found at the link :
http://wiki.sugarlabs.org/go/Features/WPA-WPA2-Enterprise-Network-Connections

Please feel free to drop-in any queries; and if anyone has success to
connecting to a LEAP-authentication based network (if the connection
can be made via nm-applet, it will be good enough .. :), because that
will give us the required set-up to test connecting to a
LEAP-authentication based network).

Thanks to Anish (for setting up the configuration; no work would have
been possible without him), and Sascha (for motivating me to write the
documentation).

Regards,
Ajay

On Tue, Dec 13, 2011 at 7:42 PM, Daniel Drake  wrote:
>
> On Mon, Dec 12, 2011 at 7:54 AM, Sascha Silbe
>  wrote:
> > The patch we're talking about is a Request For Discussion (RFC) based on
> > sucrose-0.94; we'd appreciate feedback on the chosen approach (including
> > design and implementation). When the patch is ready (including
> > integrating useful feedback we hopefully get from sugar-devel), we'll
> > try to upstream it, which will include porting it to the future master
> > branch (Sugar 0.96 is already Feature frozen). However our short-term
> > goal is to fix a downstream problem, so we need a version based on Sugar
> > 0.94 and for practical reasons (testing) this is the version we'll work
> > on first.
>
> I don't think there would be any resistance to a technically sound
> implementation of WPA enterprise connectivity - I certainly am happy
> to see this work being done.
>
> However, it would be easier for the community to collaborate here if
> the work were done on master first, then collectively reviewed and
> committed, *then* backported by you.
>
> Given that I do not know too much about WPA-enterprise, and given that
> the secrets management changed quite a bit in NM-0.9, I'm not
> convinced that the current implementation would 'stick' in master.
> Happy to be proven wrong though (with a patch) :)
>
> I would be happy to review a functional description of the work, but
> this was not included in the commit message. Perhaps it could be
> extended to briefly explain the WPA-enterprise mechanics, and then how
> the implementation is done.
>
> Thanks,
> Daniel
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


[Sugar-devel] [PATCH v4][sucrose-0.94][RFC] Add capability to connect to WPA/WPA2-Enterprise Networks.

2011-12-14 Thread Ajay Garg

(Note that this is a consolidated patch, to be applied in full;
and NOT OVER version-3, version-2, and version-1 patches).


Enhancements/Fixes of current version (version-4), over version-3 ::


a. Fixing logging statements, and some formatting-changes (Thanks Sascha).
b. Not passing parameters to NetworkManager, that are not entered (required),
   as in TTLS- and PEAP-configuration (Thanks Anish).




For the record.

Enhancements/Fixes of version-3, over version-2 ::


a. Now, TLS-based-authentication is also supported.
   ---

   Thus, now, the following three authentication types are supported :
   (i)   TTLS
   (ii)  PEAP
   (iii) TLS

   Following authentication types are still not supported :
   (i)   LEAP (actually this may work, but the set-up has not been
   able to be worked out, and hence, this has not been
   verified, even with nm-applet).

b. Journal-Chooser integration.
   

   This is useful in picking up chooser-entries (especially in case
   of certificates requirements, like in TLS and TTLS).




For the record.

Enhancements/Fixes of version-2, over version-1 ::
--

a. Network-Autoconnect-Upon-Hibernate-Resume
   --

   Fixing the case, when network wouldn't (auto-)come-up,
   when the XO resumed from hibernation. (Thanks Anish for
   catching that :-) ).
   However, there wasn't a problem with auto-connect-on-reboot;
   it's working fine.

Signed-off-by: Ajay Garg 
---
 src/jarabe/desktop/keydialog.py |  247 +-
 src/jarabe/desktop/networkviews.py  |  258 ++-
 src/jarabe/journal/objectchooser.py |   19 +++
 src/jarabe/model/network.py |   28 +++-
 4 files changed, 540 insertions(+), 12 deletions(-)

diff --git a/src/jarabe/desktop/keydialog.py b/src/jarabe/desktop/keydialog.py
index c72f498..d8c8cf9 100644
--- a/src/jarabe/desktop/keydialog.py
+++ b/src/jarabe/desktop/keydialog.py
@@ -20,9 +20,13 @@ from gettext import gettext as _
 
 import gtk
 import dbus
+import os
+import shutil
 
+from sugar import env
 from jarabe.model import network
 from jarabe.model.network import Secrets
+from jarabe.journal.objectchooser import ObjectChooser
 
 
 IW_AUTH_ALG_OPEN_SYSTEM = 'open'
@@ -32,6 +36,11 @@ WEP_PASSPHRASE = 1
 WEP_HEX = 2
 WEP_ASCII = 3
 
+SETTING_TYPE_STRING = 1
+SETTING_TYPE_LIST = 2
+SETTING_TYPE_CHOOSER = 3
+
+
 
 def string_is_hex(key):
 is_hex = True
@@ -120,6 +129,226 @@ class KeyDialog(gtk.Dialog):
 return self._response
 
 
+class NetworkParameters(gtk.HBox):
+def __init__(self, auth_param):
+gtk.HBox.__init__(self, homogeneous=True)
+self._key = auth_param._key_name
+self._label = gtk.Label(_(auth_param._key_label))
+self._key_type = auth_param._key_type
+self._auth_param = auth_param
+
+self.pack_start(self._label)
+self._label.show()
+
+if self._is_entry():
+self._entry = gtk.Entry()
+self.pack_start(self._entry)
+self._entry.show()
+elif self._is_liststore():
+self._option_store = gtk.ListStore(str, str)
+for option in auth_param._options:
+self._option_store.append(option)
+
+self._entry = auth_param._options[0][1]
+self._option_combo = gtk.ComboBox(self._option_store)
+cell = gtk.CellRendererText()
+self._option_combo.pack_start(cell, True)
+self._option_combo.add_attribute(cell, 'text', 0)
+self._option_combo.set_active(0)
+self._option_combo.connect('changed',
+self._option_combo_changed_cb)
+self.pack_start(self._option_combo)
+self.show()
+self._option_combo.show()
+elif self._is_chooser():
+self._chooser_button = gtk.Button(_('Choose..'))
+self._chooser_button.connect('clicked',
+  self._object_chooser_cb)
+self.pack_start(self._chooser_button)
+self._chooser_button.show()
+self._entry = ''
+
+def _is_entry(self):
+return ( not self._is_chooser() ) and \
+   ( len(self._auth_param._options) == 0 )
+
+def _is_liststore(self):
+return ( not self._is_chooser() ) and \
+   ( len(self._auth_param._options) > 0 )
+
+def _is_chooser(self):
+return self._key_type == SETTING_TYPE_CHOOSER
+
+def _object_chooser_cb(self, chooser_button):
+self._want_document = True
+self._show_picker_cb()
+
+def _show_picker_cb(self):
+if not self._want_document:
+