[Sugar-devel] [PATCH sugar] Making the buddy icons in the Views reveal the Palette on left click or touch

2012-08-15 Thread Simon Schampijer
The owner icon (in the Home, Group and Neighborhood View) has
no primary action. On left click we agreed to always reveal the
Palette. This will give a better experience for users with a
mouse/trackpad and for those with a touchscreen.

This patch also changes the behavior of the buddy icons that
represent other learners which appear in the Neighborhood
and Group View. Here as well we do not have currently a primary
action. Left click does currently not do anything. We change this
to revealing the Palette on left click now as well.

Signed-off-by: Simon Schampijer si...@laptop.org
---
 src/jarabe/desktop/groupbox.py | 11 +++
 src/jarabe/desktop/meshbox.py  | 11 ++-
 src/jarabe/view/buddyicon.py   |  6 ++
 3 files changed, 11 insertions(+), 17 deletions(-)

diff --git a/src/jarabe/desktop/groupbox.py b/src/jarabe/desktop/groupbox.py
index 4fcd6c2..8beec90 100644
--- a/src/jarabe/desktop/groupbox.py
+++ b/src/jarabe/desktop/groupbox.py
@@ -21,6 +21,7 @@ import gconf
 from sugar.graphics import style
 from sugar.graphics.xocolor import XoColor
 
+from jarabe.view.buddyicon import BuddyIcon
 from jarabe.view.buddymenu import BuddyMenu
 from jarabe.view.eventicon import EventIcon
 from jarabe.model.buddy import get_owner_instance
@@ -38,15 +39,9 @@ class GroupBox(ViewContainer):
 
 layout = SpreadLayout()
 
-client = gconf.client_get_default()
-color = XoColor(client.get_string('/desktop/sugar/user/color'))
-owner_icon = EventIcon(icon_name='computer-xo', cache=True,
-   xo_color=color)
 # Round off icon size to an even number to ensure that the icon
-# is placed evenly in the grid
-owner_icon.props.pixel_size = style.LARGE_ICON_SIZE  ~1
-owner_icon.set_palette(BuddyMenu(get_owner_instance()))
-
+owner_icon = BuddyIcon(get_owner_instance(),
+   style.LARGE_ICON_SIZE  ~1)
 ViewContainer.__init__(self, layout, owner_icon)
 
 self._friends = {}
diff --git a/src/jarabe/desktop/meshbox.py b/src/jarabe/desktop/meshbox.py
index 1de3779..8ac5047 100644
--- a/src/jarabe/desktop/meshbox.py
+++ b/src/jarabe/desktop/meshbox.py
@@ -410,18 +410,11 @@ class MeshContainer(ViewContainer):
 __gtype_name__ = 'SugarMeshContainer'
 
 def __init__(self):
-
 layout = SpreadLayout()
 
-client = gconf.client_get_default()
-color = XoColor(client.get_string('/desktop/sugar/user/color'))
-owner_icon = EventIcon(icon_name='computer-xo', cache=True,
-   xo_color=color)
 # Round off icon size to an even number to ensure that the icon
-# is placed evenly in the grid
-owner_icon.props.pixel_size = style.STANDARD_ICON_SIZE  ~1
-owner_icon.set_palette(BuddyMenu(get_owner_instance()))
-
+owner_icon = BuddyIcon(get_owner_instance(),
+   style.STANDARD_ICON_SIZE  ~1)
 ViewContainer.__init__(self, layout, owner_icon)
 
 
diff --git a/src/jarabe/view/buddyicon.py b/src/jarabe/view/buddyicon.py
index 663bd92..e84e881 100644
--- a/src/jarabe/view/buddyicon.py
+++ b/src/jarabe/view/buddyicon.py
@@ -15,6 +15,7 @@
 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 from sugar.graphics import style
+from sugar.graphics.palette import Palette
 
 from jarabe.view.buddymenu import BuddyMenu
 from jarabe.view.eventicon import EventIcon
@@ -33,6 +34,8 @@ class BuddyIcon(EventIcon):
 self._buddy.connect('notify::present', self.__buddy_notify_present_cb)
 self._buddy.connect('notify::color', self.__buddy_notify_color_cb)
 
+self.connect('button-release-event', self.__button_release_event_cb)
+
 self.palette_invoker.cache_palette = False
 
 self._update_color()
@@ -40,6 +43,9 @@ class BuddyIcon(EventIcon):
 def create_palette(self):
 return BuddyMenu(self._buddy)
 
+def __button_release_event_cb(self, icon, event):
+self.props.palette.popup(immediate=True, state=Palette.SECONDARY)
+
 def __buddy_notify_present_cb(self, buddy, pspec):
 # Update the icon's color when the buddy comes and goes
 self._update_color()
-- 
1.7.11.4

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


[Sugar-devel] [PATCH sugar] Neighborhood View: reveal Palette on left click/touch instead of a primary action

2012-08-15 Thread Simon Schampijer
Having a primary action for the icons in the Neighborhood View
like the AP icon, the Ad-hoc, the Mesh network icon and the icon
for a shared activity has never been a fully working UI design because
the result you get by clicking on the icon was not fully clear to
the user (e.g. I clicked on the AP icon to connect to it, when I
click again will it deconnect?).

With the mouse you have a way of discovering secondary information
by hovering over the icon, this is not as elegant with touch. You would
need to use touchhold for that but the 'failure' rate of
undesired actions is much higher.

In long discussions with Gary we agreed on always revealing the
Palette on left-click/touch and giving the learner the
information to make his choice. We think this is the best behavior
for both worlds.

For the SugarAdhoc Palette we make sure it has the connect option in
the Palette. Until now, the Palette did only have the connect
option shown when the device state had changed once.

This patch applies on top of Making the buddy icons in the Views
reveal the Palette on left click or touch

Signed-off-by: Simon Schampijer si...@laptop.org
---
 src/jarabe/desktop/meshbox.py  | 14 --
 src/jarabe/desktop/networkviews.py | 10 +++---
 2 files changed, 15 insertions(+), 9 deletions(-)

diff --git a/src/jarabe/desktop/meshbox.py b/src/jarabe/desktop/meshbox.py
index 8ac5047..412a093 100644
--- a/src/jarabe/desktop/meshbox.py
+++ b/src/jarabe/desktop/meshbox.py
@@ -64,7 +64,8 @@ class _ActivityIcon(EventIcon):
 EventIcon.__init__(self, file_name=file_name,
xo_color=xo_color, pixel_size=size)
 self._model = model
-self.connect('button-release-event', self._button_release_cb)
+self.connect('button-release-event',
+ self.__button_release_event_cb)
 
 def create_palette(self):
 primary_text = glib.markup_escape_text(self._model.bundle.get_name())
@@ -82,21 +83,22 @@ class _ActivityIcon(EventIcon):
 
 if joined:
 item = MenuItem(_('Resume'), 'activity-start')
-item.connect('activate', self._clicked_cb)
+item.connect('activate', self.__palette_item_clicked_cb)
 item.show()
 p.menu.append(item)
 elif not private:
 item = MenuItem(_('Join'), 'activity-start')
-item.connect('activate', self._clicked_cb)
+item.connect('activate', self.__palette_item_clicked_cb)
 item.show()
 p.menu.append(item)
 
 return p
 
-def _button_release_cb(self, widget, event):
-return self._clicked_cb(item=None)
+def __button_release_event_cb(self, widget, event):
+self.props.palette.popup(immediate=True,
+ state=palette.Palette.SECONDARY)
 
-def _clicked_cb(self, item):
+def __palette_item_clicked_cb(self, item):
 bundle = self._model.get_bundle()
 misc.launch(bundle, activity_id=self._model.activity_id,
 color=self._model.get_color())
diff --git a/src/jarabe/desktop/networkviews.py 
b/src/jarabe/desktop/networkviews.py
index d2531bf..83269e0 100644
--- a/src/jarabe/desktop/networkviews.py
+++ b/src/jarabe/desktop/networkviews.py
@@ -330,7 +330,8 @@ class WirelessNetworkView(EventPulsingIcon):
 self._connect()
 
 def __button_release_event_cb(self, icon, event):
-self._connect()
+self._palette.popup(immediate=True,
+state=palette.Palette.SECONDARY)
 
 def _connect(self):
 # Activate existing connection, if there is one
@@ -489,6 +490,7 @@ class SugarAdhocView(EventPulsingIcon):
 self._connect_item = MenuItem(_('Connect'), 'dialog-ok')
 self._connect_item.connect('activate', self.__connect_activate_cb)
 palette_.menu.append(self._connect_item)
+self._connect_item.show()
 
 self._disconnect_item = MenuItem(_('Disconnect'), 'media-eject')
 self._disconnect_item.connect('activate',
@@ -498,7 +500,8 @@ class SugarAdhocView(EventPulsingIcon):
 return palette_
 
 def __button_release_event_cb(self, icon, event):
-get_adhoc_manager_instance().activate_channel(self._channel)
+self._palette.popup(immediate=True,
+state=palette.Palette.SECONDARY)
 
 def __connect_activate_cb(self, icon):
 get_adhoc_manager_instance().activate_channel(self._channel)
@@ -688,7 +691,8 @@ class OlpcMeshView(EventPulsingIcon):
 self._connect()
 
 def __button_release_event_cb(self, icon, event):
-self._connect()
+self._palette.popup(immediate=True,
+state=palette.Palette.SECONDARY)
 
 def _connect(self):
 self._mesh_mgr.user_activate_channel(self._channel)
-- 
1.7.11.4

___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http

Re: [Sugar-devel] [PATCH sugar 0/7] Remove last hippo occurrences from the shell

2012-08-14 Thread Simon Schampijer

On 08/13/2012 11:23 PM, Simon Schampijer wrote:

On 08/06/2012 12:04 PM, Simon Schampijer wrote:

This is a patch series to make the Sugar shell hippo free. Based on the
work that has been done in [1] and [2]. It incorporates the patch from
Sascha to move the EventIcon into the shell temporary.


I merged those patches now with the suggestions made in the review. The
work has been gone through several eyes, never less if you find any
issues please report them so we can fix them.

Regards,
Simon


If you find issues regarding the 'nohippo' changes please add the 
'nohippo' keyword. I created an rpm (from current master) to test on the 
XO [1] with the latest 12.1.0 build [2].


Just found one regression, only visible on the XO, regarding displaying 
of thumbnails in the Journal [3].


So please test and keep the bug reports coming. If we are stable in 
regards to the hippo changes next Monday I will make an official 
no-hippo release.


Regards,
   Simon

[1] 
http://dev.laptop.org/~erikos/nohippo/sugar-0.97.1-1.fc17.olpc.noarch.rpm

[2] http://wiki.laptop.org/go/Release_notes/12.1.0
[3] http://bugs.sugarlabs.org/ticket/3804

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


Re: [Sugar-devel] [sugar-toolkit-gtk3] Replace signal used in UnfullscreenButton to enable use with touch - SL #3798

2012-08-14 Thread Simon Schampijer

On 08/09/2012 10:27 PM, Manuel Quiñones wrote:

Thanks Gonzalo,


Thanks Gonzalo. I was intrigued by that fact and looked a bit at the issue.


2012/8/9  godi...@sugarlabs.org:

From: Gonzalo Odiard godi...@gmail.com

Use clicked instead of button-pressed, because this is not triggered
by touch device.


Makes sense, clicked is more general than button-pressed.  From the
docs, is emitted when the button has been activated (pressed and
released).

http://developer.gnome.org/gtk3/stable/GtkButton.html#GtkButton-clicked


Signed-off-by: Gonzalo Odiard gonz...@laptop.org


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


I tested the behavior in GTK+3 and GTK+2, and it does behave differently:

In Gtk+2 I do get as well the pressrelease events with touch. In Gtk+3 
I do not, only the clicked signal. Looking at the docs [1] the 
button-release-event is only submitted when it is enabled using the 
mask. Tried that, but the behavior is the same.


I am fine to go with 'clicked' as Gonzalo suggested but would be nice to 
know the details as well.


Regards,
   Simon

[1] 
http://developer.gnome.org/gtk3/3.2/GtkWidget.html#GtkWidget-button-release-event




from gi.repository import Gtk, Gdk

def _destroy_cb(widget, data=None):
Gtk.main_quit()

def __pressed_cb(button, event):
print 'pressed'

def __released_cb(button, event):
print 'released'

def __clicked_cb(button):
print 'clicked'

window = Gtk.Window()
window.connect(destroy, _destroy_cb)
window.set_default_size(450, 450)

b = Gtk.Button()
b.connect('clicked', __clicked_cb)
b.add_events(Gdk.EventMask.BUTTON_PRESS_MASK |
 Gdk.EventMask.BUTTON_RELEASE_MASK)
b.connect('button-press-event', __pressed_cb)
b.connect('button-release-event', __released_cb)

window.add(b)
b.show()

window.show()

Gtk.main()

---

import gtk

def _destroy_cb(widget, data=None):
gtk.main_quit()

def __pressed_cb(button, event):
print 'pressed'

def __released_cb(button, event):
print 'released'

def __clicked_cb(button):
print 'clicked'

window = gtk.Window()
window.connect(destroy, _destroy_cb)
window.set_default_size(450, 450)

b = gtk.Button()
b.connect('button-press-event', __pressed_cb)
b.connect('button-release-event', __released_cb)
b.connect('clicked', __clicked_cb)
window.add(b)
b.show()

window.show()
gtk.main()

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


Re: [Sugar-devel] Proposal: Adding Manuel Quiñones as a Sugar shell maintainer

2012-08-14 Thread Simon Schampijer

Thanks for all the responses.

Welcome Manuel [1]!

Regards,
   Simon

[1] http://wiki.sugarlabs.org/go/Development_Team/Release/Modules#Glucose



On 08/08/2012 04:57 PM, Daniel Narvaez wrote:

+1 !

(and I think the maintainers for sugar-artwork, sugar-toolkit and
sugar should just be the same).

On 7 August 2012 16:51, Simon Schampijer si...@schampijer.de wrote:

Hi,

Something I wanted to propose in todays developer meeting (but as it did not
happen), I send it here for an async proposal.

We are short on maintainers and we have to grow new members that helps us
share the load. The patch list is long and help in that regard will be
appreciated that especially small patches do not take so long to get in.

Lately Manuel Quiñones have been stepping up as a Sugar module maintainer.
He is already maintaining sugar-artwork and sugar-toolkit-gtk3 [1]. He has
been showing great talent with porting the Browse activity to WebkitGtk [2]
and he has been working on porting the Sugar theme and the sugar-toolkit to
GTK+ 3.

We are currently working on the shell port to GTK+ 3 and introspection and
Manuel has been advancing already quite a lot [3]. As all of those Sugar
sub-modules are interlinked I think it makes absolute sense to add him as a
maintainer to the Sugar shell as well.

To make sure: the general work-flow should not change, patches have to be
sent to the mailing list for review. For non-trivial reviews a maintainer
should have at least one review, preferred a review and acknowledgment from
another maintainer. It is good practice to leave a patch for a few days so
everyone maintainer can at least have a high level look if he disagrees with
an approach.

I hope we can address the issues listed in that way,
Simon

[1] http://wiki.sugarlabs.org/go/Development_Team/Release/Modules
[2] http://git.sugarlabs.org/browse
[3] http://git.sugarlabs.org/~manuq/sugar/manuqs-erikos-shell-port
___
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] [MINUTES] Development team meeting --- 14 August 2012 (15:00 UTC)

2012-08-14 Thread Simon Schampijer
Minutes: 
http://meeting.sugarlabs.org/sugar-meeting/meetings/2012-08-14T15:04:58.html
Log: 
http://meeting.sugarlabs.org/sugar-meeting/meetings/2012-08-14T15:04:58


Cheers,
   Simon

On 08/13/2012 11:47 PM, Simon Schampijer wrote:

Hi,

tomorrow we will have our weekly dev team meeting.

Time: 14. August 2012 (15:00 UTC)
Place: #sugar-meeting (freenode)

Topics:

- introducing new contributors

- follow up the shell port:
http://wiki.sugarlabs.org/go/Features/GTK3/Shell (manuq)

- follow up the touch support in the shell:
http://wiki.sugarlabs.org/go/Features/Touch/Development (erikos)

- follow up the activities port, touch addition (including gestures),
releasing of new activities (gonzalo)

- your item here

Regards,
Simon
___
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 sugar v5 0/3] Improve proxy support

2012-08-13 Thread Simon Schampijer

On 08/07/2012 03:32 PM, Sascha Silbe wrote:

This series includes a completely reworked version of the Proxy
Control Panel (now Proxy section in the Network Control Panel) patch.
The new version has been based on Simon Schampijers mock-up [1],
reflecting UI changes requested by both Simon and Gary Martin [2].


Thanks for the follow-up.

There are two differences to the GNOME 3 design. There is a check box in 
the 'Manual' option that says 'Use authentication'. And there is an 
option 'Ignored Hosts'. Can you give a bit of background on those, why 
you did add those, what issue we have on the XO or discovered does it solve?


Simon

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


Re: [Sugar-devel] [PATCH sugar v5 1/3] Properly wrap labels in the Network Control Panel (GTK#318276 workaround)

2012-08-13 Thread Simon Schampijer

On 08/07/2012 03:32 PM, Sascha Silbe wrote:

When line wrapping is enabled (label.set_line_wrap(True)), GTK restricts
labels to an arbitrary size, rather than utilising the entire allocated space.
This has been known upstream since 2005 (GTK#318276 [1]), but remains unfixed
to date.

Work around this bug by using a size-allocate signal handler that sets the
requested size of the label to the actual allocation.

[1] https://bugzilla.gnome.org/show_bug.cgi?id=318276


Could it be that the issue is fixed in GTK+ 3 and introspection? I have 
attached two examples.


Regards,
   Simon





from gi.repository import Gtk

class WrappedLabel(Gtk.Label):
def __init__(self, label=None):
Gtk.Label.__init__(self, label=label)
self.set_line_wrap(True)
self.connect('size-allocate', self.__size_allocate_cb)
def __size_allocate_cb(self, widget, rect):
widget.set_size_request(rect.width, -1)

def _destroy_cb(widget, data=None):
Gtk.main_quit()

window = Gtk.Window()
window.connect(destroy, _destroy_cb)
window.set_default_size(450, 450)

entry = WrappedLabel(The server is the equivalent of what
  room you are in; people on the same
  server will be able to see each other,
  even when they aren't on the same 
  network.)
'''
entry = Gtk.Label(The server is the equivalent of what
   room you are in; people on the same  
   server will be able to see each other,   
   even when they aren't on the same   
   network.)
'''
entry.set_line_wrap(True)
window.add(entry)
entry.show()

window.show()
Gtk.main()
import gtk

class WrappedLabel(gtk.Label):
def __init__(self, label=None):
gtk.Label.__init__(self, str=label)
self.set_line_wrap(True)
self.connect('size-allocate', self.__size_allocate_cb)
def __size_allocate_cb(self, widget, rect):
widget.set_size_request(rect.width, -1)

def _destroy_cb(widget, data=None):
gtk.main_quit()

window = gtk.Window()
window.connect(destroy, _destroy_cb)
window.set_default_size(450, 450)
'''
entry = WrappedLabel(The server is the equivalent of what
  room you are in; people on the same
  server will be able to see each other,
  even when they aren't on the same 
  network.)
'''
entry = gtk.Label(The server is the equivalent of what
   room you are in; people on the same  
   server will be able to see each other,   
   even when they aren't on the same   
   network.)

entry.set_line_wrap(True)
window.add(entry)
entry.show()

window.show()
gtk.main()
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [PATCH sugar 0/7] Remove last hippo occurrences from the shell

2012-08-13 Thread Simon Schampijer

On 08/06/2012 12:04 PM, Simon Schampijer wrote:

This is a patch series to make the Sugar shell hippo free. Based on the
work that has been done in [1] and [2]. It incorporates the patch from
Sascha to move the EventIcon into the shell temporary.


I merged those patches now with the suggestions made in the review. The 
work has been gone through several eyes, never less if you find any 
issues please report them so we can fix them.


Regards,
   Simon

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


[Sugar-devel] [REMINDER] Development team meeting --- 14 August 2012 (15:00 UTC)

2012-08-13 Thread Simon Schampijer

Hi,

tomorrow we will have our weekly dev team meeting.

Time: 14. August 2012 (15:00 UTC)
Place: #sugar-meeting (freenode)

Topics:

- introducing new contributors

- follow up the shell port: 
http://wiki.sugarlabs.org/go/Features/GTK3/Shell (manuq)


- follow up the touch support in the shell: 
http://wiki.sugarlabs.org/go/Features/Touch/Development (erikos)


- follow up the activities port, touch addition (including gestures), 
releasing of new activities (gonzalo)


- your item here

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


[Sugar-devel] Shell port to GTK+ 3 and gobject-introspection: open issues

2012-08-09 Thread Simon Schampijer

Hi,

looking for something cool to hack on?

There is a hard focus on finishing the shell port to GTK+ 3 and 
gobject-introspection at the moment. Basically, we have to finish it now 
:) We keep track of the open items at [1].


If you want *your* name to appear in nifty Auvergne de Bourgogne-green 
in the Done section you are only three steps away:


- grab an item

- fix it

- send a patch/link to an upstream solution

For further coordination we hang out in the usual place #sugar.

Cheers,
   Simon

[1] http://wiki.sugarlabs.org/go/Features/GTK3/Shell
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] porting Gstreamer Activities to PYGobject and Gstreamer 1.0

2012-08-09 Thread Simon Schampijer

On 07/31/2012 10:33 AM, Peter Robinson wrote:

On Tue, Jul 31, 2012 at 5:01 AM, Gonzalo Odiard gonz...@laptop.org wrote:

Any chance of have it packaged in F17?
Should do developing, but more important testing, easier.


I'm not sure, it's something that could be investigated as in theory
it's suppose to be parallel installable, whether it's parallel
runnable is another thing altogether though.

I was planning on starting some F18 XO images shortly (I was hoping to
have done so by now but I'm closing out my current job and starting a
new one next week) . When I looked a week or so ago gstreamer 1.0
didn't appear to be in rawhide as yet but I'm running rawhide on the
netbook and it seems quite stable, and the mass rebuild on ARM is
almost done so I think it's about right to start looking at some
weekly images.

The SoaS v8 nightlys should be kicking of shortly too if it hasn't already.

Peter



There is some progress on packaging Gstreamer1 for Fedora 18 [1][2].

As well there are a lot of discussions about the the dynamic bindings 
[3], so it is a good moment to port Activities that are using Gstreamer 
and see if there are issues left and contribute to [3] in order to fix 
them. Now the people are working on it and things are fresh in their mind...


Regards,
   Simon

[1] http://koji.fedoraproject.org/koji/buildinfo?buildID=346341
[2] http://comments.gmane.org/gmane.linux.redhat.fedora.desktop/7551
[3] https://bugzilla.gnome.org/show_bug.cgi?id=680913
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


[Sugar-devel] [PATCH] Use json as included in Python SL #3142

2012-08-08 Thread Simon Schampijer
We use json as included in Python. This will make Sugar dependent on
Python 2.6 and Python 2.7 to have the highest JSON performance. The
same patch landed in toolkit-gtk3 already.

Signed-off-by: Simon Schampijer si...@laptop.org
---
 src/sugar/activity/activity.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/sugar/activity/activity.py b/src/sugar/activity/activity.py
index bfc7358..2cf347e 100644
--- a/src/sugar/activity/activity.py
+++ b/src/sugar/activity/activity.py
@@ -54,6 +54,7 @@ import os
 import time
 from hashlib import sha1
 from functools import partial
+import json
 
 import gconf
 import gtk
@@ -61,7 +62,6 @@ import gobject
 import dbus
 import dbus.service
 from dbus import PROPERTIES_IFACE
-import cjson
 from telepathy.server import DBusProperties
 from telepathy.interfaces import CHANNEL, \
  CHANNEL_TYPE_TEXT, \
@@ -677,8 +677,8 @@ class Activity(Window, gtk.Container):
 
 buddies_dict = self._get_buddies()
 if buddies_dict:
-self.metadata['buddies_id'] = cjson.encode(buddies_dict.keys())
-self.metadata['buddies'] = cjson.encode(self._get_buddies())
+self.metadata['buddies_id'] = json.dumps(buddies_dict.keys())
+self.metadata['buddies'] = json.dumps(self._get_buddies())
 
 preview = self.get_preview()
 if preview is not None:
-- 
1.7.11.2

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


[Sugar-devel] [PATCH sugar-datastore] Use json as included in Python SL #3142

2012-08-08 Thread Simon Schampijer
We use json as included in Python. This will make Sugar dependent on
Python 2.6 and Python 2.7 to have the highest JSON performance.

Remove as well the requirement in sweets.recipe

Signed-off-by: Simon Schampijer si...@laptop.org
---
 src/carquinyol/migration.py | 5 ++---
 sweets.recipe   | 2 +-
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/carquinyol/migration.py b/src/carquinyol/migration.py
index 1745f2c..699552f 100644
--- a/src/carquinyol/migration.py
+++ b/src/carquinyol/migration.py
@@ -21,8 +21,7 @@ import os
 import logging
 import shutil
 import time
-
-import cjson
+import json
 
 from carquinyol import layoutmanager
 
@@ -65,7 +64,7 @@ def migrate_from_0():
 def _migrate_metadata(root_path, old_root_path, uid):
 metadata_path = layoutmanager.get_instance().get_metadata_path(uid)
 old_metadata_path = os.path.join(old_root_path, uid + '.metadata')
-metadata = cjson.decode(open(old_metadata_path, 'r').read())
+metadata = json.loads(open(old_metadata_path, 'r').read())
 
 if 'uid' not in metadata:
 metadata['uid'] = uid
diff --git a/sweets.recipe b/sweets.recipe
index b861c35..5b76e87 100644
--- a/sweets.recipe
+++ b/sweets.recipe
@@ -11,7 +11,7 @@ exec  = %(BUILDDIR)s/bin/datastore-service
 binding   = PATH %(BUILDDIR)s/bin
 PYTHONPATH %(BUILDDIR)s/src
 XDG_DATA_DIRS share
-requires  = sugar-toolkit; python-cjson; xapian-bindings-python
+requires  = sugar-toolkit; xapian-bindings-python
 
 [Archive]
 arch  = any
-- 
1.7.11.2

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


Re: [Sugar-devel] [PATCH sugar-datastore] Use json as included in Python SL #3142

2012-08-08 Thread Simon Schampijer

On 08/08/2012 03:48 PM, Manuel Quiñones wrote:

This one is OK too.  Please push.

2012/8/8 Simon Schampijer si...@schampijer.de:

We use json as included in Python. This will make Sugar dependent on
Python 2.6 and Python 2.7 to have the highest JSON performance.

Remove as well the requirement in sweets.recipe

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


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


Thanks Aleksey did review as well, pushed as:

http://git.sugarlabs.org/sugar-datastore/mainline/commit/998fc519cc9b7a054b6c0067a6c8333d7f77012c

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


Re: [Sugar-devel] [PATCH] Use json as included in Python SL #3142

2012-08-08 Thread Simon Schampijer

On 08/08/2012 05:03 PM, Daniel Narvaez wrote:

Should we do the same for sugar-datastore and sugar?


All done already: http://bugs.sugarlabs.org/ticket/3142

The core is done, only activities left.
   Simon

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


Re: [Sugar-devel] [PATCH] Fix battery maxint to use gobject constant instead of the sys module constant

2012-08-08 Thread Simon Schampijer
Ack'ed, as well following the discussion at 
https://bugzilla.gnome.org/show_bug.cgi?id=680005


Simon

On 08/08/2012 03:17 PM, Manuel Quiñones wrote:

Otherwise gives OverflowError in 64 bits systems.  When porting to
GTK+3 should be: GObject.G_MAXINT32

Signed-off-by: Manuel Quiñones ma...@laptop.org
---
  extensions/deviceicon/battery.py |3 +--
  1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/extensions/deviceicon/battery.py b/extensions/deviceicon/battery.py
index a70458a..8e1cd8e 100644
--- a/extensions/deviceicon/battery.py
+++ b/extensions/deviceicon/battery.py
@@ -16,7 +16,6 @@

  import logging
  from gettext import gettext as _
-import sys

  import gconf
  import glib
@@ -171,7 +170,7 @@ class BatteryPalette(Palette):
  class DeviceModel(gobject.GObject):
  __gproperties__ = {
  'level': (int, None, None, 0, 100, 0, gobject.PARAM_READABLE),
-'time-remaining': (int, None, None, 0, sys.maxint, 0,
+'time-remaining': (int, None, None, 0, gobject.constants.G_MAXINT32, 0,
 gobject.PARAM_READABLE),  # unit: seconds
  'charging': (bool, None, None, False, gobject.PARAM_READABLE),
  'discharging': (bool, None, None, False, gobject.PARAM_READABLE),



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


Re: [Sugar-devel] [PATCH sugar 1/7] SugarEventIcon: Add a hippo-free implementation of the CanvasIcon

2012-08-07 Thread Simon Schampijer

On 08/06/2012 03:53 PM, Benjamin Berg wrote:

On Mon, 2012-08-06 at 15:49 +0200, Sascha Silbe wrote:

Benjamin Berg ben...@sugarlabs.org writes:

+# HACK to supress the grey background around the icon
+# won't be needed in GTK3
+self.modify_bg(gtk.STATE_NORMAL, style.COLOR_WHITE.get_gdk_color())


Not really too bad, but I am pretty sure that
gtk.EventBox.set_visible_window(False) should work fine here.


Doesn't look that way to me:


Oh, thanks for the screenshot. That is kinda obvious. One needs to add
allocation.x and allocation.y to the coordinates if you don't have a
visible window.

So:

+def do_expose_event(self, event):
+surface = self._buffer.get_surface()
+if surface:
+allocation = self.get_allocation()
+
+x = (allocation.width - surface.get_width()) / 2
+y = (allocation.height - surface.get_height()) / 2
+
+cr = self.window.cairo_create()
+cr.set_source_surface(surface, x, y)
+if self._alpha == 1.0:
+cr.paint()
+else:
+cr.paint_with_alpha(self._alpha)


Also change the x/y calculation to add allocation.x and allocation.y
respectively. Then things should work fine.

Benjamin



diff --git a/src/jarabe/view/eventicon.py b/src/jarabe/view/eventicon.py
index 4166798..0432c34 100644
--- a/src/jarabe/view/eventicon.py
+++ b/src/jarabe/view/eventicon.py
@@ -94,16 +94,13 @@ class EventIcon(gtk.EventBox):
 self._alpha = 1.0

 gtk.EventBox.__init__(self)
+self.set_visible_window(False)
 for key, value in kwargs.iteritems():
 self.set_property(key, value)

 self._palette_invoker = CursorInvoker()
 self._palette_invoker.attach(self)

-# HACK to supress the grey background around the icon
-# won't be needed in GTK3
-self.modify_bg(gtk.STATE_NORMAL, style.COLOR_WHITE.get_gdk_color())
-
 self.connect('destroy', self.__destroy_cb)

 def do_expose_event(self, event):
@@ -111,8 +108,8 @@ class EventIcon(gtk.EventBox):
 if surface:
 allocation = self.get_allocation()

-x = (allocation.width - surface.get_width()) / 2
-y = (allocation.height - surface.get_height()) / 2
+x = allocation.x + (allocation.width - surface.get_width()) / 2
+y = allocation.y + (allocation.height - 
surface.get_height()) / 2


 cr = self.window.cairo_create()
 cr.set_source_surface(surface, x, y)


This will work now. As Benjamin stated the one needs to add 
allocation.x/y in expose, the current code works fine if the event box 
has a visible window, because then allocation.x and allocation.y are 0 
by definition. Attached is the updated patch as well.


Regards,
   Simon



From f1e4ccbee809d099f1af1d70694d32d2790033e9 Mon Sep 17 00:00:00 2001
From: Simon Schampijer si...@schampijer.de
Date: Wed, 25 Jul 2012 00:23:46 +0200
Subject: [PATCH sugar 1/5] SugarEventIcon: Add a hippo-free implementation of
 the CanvasIcon

The icon consists of an GtkEventBox and an IconBuffer. The
GtkEventBox is a subclass of GtkBin which has its own window
and therefor is used to catch events for our IconBuffer
which does not have it's own window.

The EventIcon uses the CursorInvoker that has been introduced in
the GTK+ 3 toolkit to invoke a palette the same way as the
CanvasIcon did.

We keep the same API as with the CanvasIcon, only the 'size'
property is changed to be called 'pixel_size' in order to
make clearer which values it expects to be passed. We don't
expect a GtkIconSize to be passed here.

Another option would have been to put a SugarIcon inside a
a GtkEventBox and make the properties available through an
icon property but the API would have not been as nice and
logically it seems to make more sense to have the IconBuffer
being the base for both the SugarIcon and the SugarEventIcon.

This patch is highly based on the work from Walter Bender,
Daniel Drake and Raul Gutierrez Segales.

Signed-off-by: Simon Schampijer si...@laptop.org
[moved from sugar-toolkit to sugar]
Signed-off-by: Sascha Silbe si...@activitycentral.com

[1] http://developer.gnome.org/gtk/2.24/GtkEventBox.html
[2] http://developer.gnome.org/gtk/2.24/gtk-Themeable-Stock-Images.html#GtkIconSize
---
 src/jarabe/view/Makefile.am  |   1 +
 src/jarabe/view/eventicon.py | 274 +++
 2 files changed, 275 insertions(+)
 create mode 100644 src/jarabe/view/eventicon.py

diff --git a/src/jarabe/view/Makefile.am b/src/jarabe/view/Makefile.am
index 630f184..31ccfa4 100644
--- a/src/jarabe/view/Makefile.am
+++ b/src/jarabe/view/Makefile.am
@@ -4,6 +4,7 @@ sugar_PYTHON =\
 	buddyicon.py			\
 	buddymenu.py			\
 	customizebundle.py		\
+	eventicon.py			\
 	keyhandler.py			\
 	launcher.py			\
 	palettes.py			\
diff --git a/src/jarabe/view/eventicon.py b/src/jarabe/view/eventicon.py
new file mode 100644
index 000

Re: [Sugar-devel] [PATCH sugar-toolkit-gtk3] props.accelerator available at ToggleToolButton SL#3774

2012-08-07 Thread Simon Schampijer

On 08/06/2012 06:47 PM, Manuel Kaufmann wrote:

Hello,

On Wed, Aug 1, 2012 at 11:10 PM, Daniel Francis fran...@sugarlabs.org wrote:

Signed-off-by: Daniel Francis fran...@sugarlabs.org

---
  src/sugar3/graphics/toggletoolbutton.py | 39 +


The patchs look great. Good work, Daniel!

I tested both and they are working properly. I made a comment on the ticket[1].

Tested-by: Manuel Kaufmann humi...@gmail.com


[1] http://bugs.sugarlabs.org/ticket/3774




Pushed. http://bugs.sugarlabs.org/ticket/3774#comment:5

Regards,
   Simon


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


Re: [Sugar-devel] [PATCH sugar-artwork] Add help icon for the toolbars - SL #3746

2012-08-07 Thread Simon Schampijer

Thanks, pushed.

On 07/28/2012 01:11 PM, Manuel Quiñones wrote:

So activities have a standard help icon for their toolbar moving
forward.

Design-by: Gary C. Martin garycmar...@googlemail.com
Signed-off-by: Manuel Quiñones ma...@laptop.org
---
  icons/scalable/actions/toolbar-help.svg |   32 +++
  1 file changed, 32 insertions(+)
  create mode 100644 icons/scalable/actions/toolbar-help.svg

diff --git a/icons/scalable/actions/toolbar-help.svg 
b/icons/scalable/actions/toolbar-help.svg
new file mode 100644
index 000..36f763c
--- /dev/null
+++ b/icons/scalable/actions/toolbar-help.svg
@@ -0,0 +1,32 @@
+?xml version=1.0 ?!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN'
+'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd' [
+   !ENTITY stroke_color #ff
+   !ENTITY fill_color #010101
+]
+
+svg height=55px viewBox=0 0 55 55 width=55px
+xmlns=http://www.w3.org/2000/svg;
+xmlns:xlink=http://www.w3.org/1999/xlink;
+
+  g
+path d=M27.5,50.125 C15.157,50.125 5,39.968 5,27.625 C5,15.282
+15.157,5.125 27.5,5.125 C39.843,5.125 50,15.282 50,27.625
+C49.837,40.071 40.412,49.484 28.077,50.118 z M27.01,34.768
+C28.452,34.839 29.871,34.056 30.301,32.622 C30.538,31.831
+30.438,30.811 30.438,30.048 C32.901,29.422 35.315,28.194
+36.775,26.041 C38.635,23.299 38.692,19.361 37.139,16.471
+C35.241,12.938 31.3,11.4 27.467,11.326 C25.327,11.363
+23.184,11.958 21.331,13.036 C19.004,14.391 16.92,16.931
+17.59,19.785 C17.767,20.537 18.189,21.24 18.866,21.638
+C21.301,23.068 23.001,20.116 24.478,18.753 C25.357,17.943
+26.602,17.383 27.82,17.553 C29.264,17.754 30.642,18.618
+31.073,20.071 C31.224,20.581 31.229,21.118 31.155,21.642
+C30.908,23.4 29.517,24.191 27.938,24.685 C26.56,25.116
+24.024,25.251 23.956,27.167 L23.957,27.167 L23.957,31.667
+C23.947,33.36 25.073,34.466 26.649,34.738 z M27.016,44.444
+C28.993,44.54 30.706,42.921 30.706,40.937 C30.706,38.99
+29.106,37.475 27.196,37.427 C25.253,37.431 23.54,39.139
+23.691,41.117 C23.823,42.857 24.98,44.062 26.662,44.408 z
+fill=stroke_color; stroke=none/
+  /g
+/svg



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


Re: [Sugar-devel] [PATCH sugar-build] Support Fedora 16

2012-08-07 Thread Simon Schampijer

On 07/12/2012 10:48 AM, Daniel Narvaez wrote:

Hi Manuel,

thanks for your patch.

I prefer to not support old distributions in sugar-build, to reduce
the maintenance cost. It appears to just work right now but that
might change during the development cycle or when we make changes to
sugar-build itself (we will have to add master gtk soon for the shell
port, for example) and ensuring everything works as expected on many
distributions is very time consuming. I'd also have to setup two other
buildbot slaves for F16 and those are also quite expensive to
maintain. And when things will start breaking we would probably have
to add special cases to check-system, build certain stuff only on
certain distro, which will increase complexity and bring us back to
the sugar-jhbuild situation...

So, all in all, I prefer to be absolutely certain stuff works out of
the box for everyone on the latest distribution, at a reasonable
maintenance cost, rather than trying to support everything and failing
to do so reliably. I understand it might be annoying for some users to
have to upgrade to F17, but I think it's reasonable to accept that
limitation in exchange for reliability.

If in the future sugar development stops depending on the very cutting
edge of the GNOME stuff I think it might be possible to reasses this
decision, but unfortunately right now I don't see it coming very soon.


I absolutely agree here. Everything comes at a cost. If you want to do 
edge development you have to be on the edge (hence F17 upwards). I would 
not loose time on supporting F16.


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


Re: [Sugar-devel] [PATCH sugar-toolkit v2] presence: use RoomConfig1 to configure channel properties (#3629)

2012-08-07 Thread Simon Schampijer

On 07/04/2012 12:21 AM, Daniel Drake wrote:

This code was still using regular Telepathy properties to
set important configuration such as Anonymous=False.

However, as of Telepathy specification 0.24.0, these properties have
gone away.

 http://telepathy.freedesktop.org/spec/Channel_Type_Text.html
 Changed in 0.24.0. This interface used to have a bunch of clunky
 Telepathy.Properties. They have been removed in favour of D-Bus
 properties on the Room2, Subject2 and RoomConfig1 interfaces.

Switch to using RoomConfig1 (where available) to set this
configuration. The invite-restricted flag is no longer available and
actually seems to have been removed a long while back.

Fixes sharing of activities over gabble on new platforms such
as Fedora 17.

Signed-off-by: Daniel Drake d...@laptop.org


Thanks Daniel for that one, I cherry-picked it to the sucrose-0.96 
branch as well.


Simon

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


Re: [Sugar-devel] [PATCH sugar-toolkit-gtk3 (shell-port)] The icon consists of an GtkEventBox and an IconBuffer. The GtkEventBox is a subclass of GtkBin which has its own window and therefor is used t

2012-08-07 Thread Simon Schampijer

On 07/03/2012 08:05 PM, Benjamin Berg wrote:

On Fri, 2012-06-22 at 16:08 +0200, Simon Schampijer wrote:

The EventIcon does emit the 'activated' signal when clicked
and uses the CursorInvoker to invoke a palette the same
way as the CanvasIcon did.

We keep the same API as with the CanvasIcon, only the 'size'
property is changed to be called 'pixel_size' in order to
make clearer which values it expects to be passed. We don't
expect a GtkIconSize to be passed here.

Another option would have been to put a SugarIcon inside a
a GtkEventBox and make the properties available through an
icon property but the API would have not been as nice and
logically it seems to make more sense to have the IconBuffer
being the base for both the SugarIcon and the SugarEventIcon.

This patch has ben developed based on the one that is
proposed for the toolkit-gtk2.


The patch looks good.


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

Reviewd-by: Benjamin Berg ben...@sugarlabs.org





Thanks for the review, pushed that one after polishing the description.

http://git.sugarlabs.org/sugar-toolkit-gtk3/sugar-toolkit-gtk3/commit/6438c89dea729fbca08e33f6b0175e85b1c72795

Note, that in GTK+ 3 we do not need to take allocation.x/y and in the 
drawing into account as we had to do with the GTK+ 2 version.


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


[Sugar-devel] Proposal: Adding Manuel Quiñones as a Sugar shell maintainer

2012-08-07 Thread Simon Schampijer

Hi,

Something I wanted to propose in todays developer meeting (but as it did 
not happen), I send it here for an async proposal.


We are short on maintainers and we have to grow new members that helps 
us share the load. The patch list is long and help in that regard will 
be appreciated that especially small patches do not take so long to get in.


Lately Manuel Quiñones have been stepping up as a Sugar module 
maintainer. He is already maintaining sugar-artwork and 
sugar-toolkit-gtk3 [1]. He has been showing great talent with porting 
the Browse activity to WebkitGtk [2] and he has been working on porting 
the Sugar theme and the sugar-toolkit to GTK+ 3.


We are currently working on the shell port to GTK+ 3 and introspection 
and Manuel has been advancing already quite a lot [3]. As all of those 
Sugar sub-modules are interlinked I think it makes absolute sense to add 
him as a maintainer to the Sugar shell as well.


To make sure: the general work-flow should not change, patches have to 
be sent to the mailing list for review. For non-trivial reviews a 
maintainer should have at least one review, preferred a review and 
acknowledgment from another maintainer. It is good practice to leave a 
patch for a few days so everyone maintainer can at least have a high 
level look if he disagrees with an approach.


I hope we can address the issues listed in that way,
   Simon

[1] http://wiki.sugarlabs.org/go/Development_Team/Release/Modules
[2] http://git.sugarlabs.org/browse
[3] http://git.sugarlabs.org/~manuq/sugar/manuqs-erikos-shell-port
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


[Sugar-devel] [MINUTES] Development team meeting --- 07. August 2012 (15:00 UTC)

2012-08-07 Thread Simon Schampijer
It has not been announced, but there have been people around, so we did 
a quick informal meeting:


Minutes: 
http://meeting.sugarlabs.org/sugar-meeting/meetings/2012-08-07T15:10:10.html
Log: 
http://meeting.sugarlabs.org/sugar-meeting/meetings/2012-08-07T15:10:10


Will announce again next time,
   Simon
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [PATCH sugar] Allow to build outside the source directory

2012-08-07 Thread Simon Schampijer

On 06/26/2012 02:26 PM, Daniel Narvaez wrote:

From: Daniel Narvaez dwnarv...@gmail.com

This is based on a patch by
Marco Pesenti Gritti ma...@marcopg.org,
with reviewer comments addressed.


Hi Daniel,

thanks for following up on this! I pushed now all of them, hope it will 
ease your work now.


Keep up the good work,
   Simon

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


[Sugar-devel] 0.98 Schedule proposal

2012-08-07 Thread Simon Schampijer

Hi,

I have been drafting the schedule for the 0.98 release [1]. We are a
bit late in defining it but things have been in flux for a while. We
normally follow the GNOME schedule and release every six months. This
time those of us at OLPC have ambitious goals:

- port the shell to GTK+ 3 and PyGobject/gobject-introspection
- make Sugar usable with touch devices such as the upcoming XO-4 touch

And I think these 0.98 goals are also shared by other key contributors
outside of the direct OLPC umbrella.

To make this possible we would need to extend the 0.98 schedule this
time and align with the OLPC one for the upcoming 12.2.0 release [2].
Releasing in September (i.e. following the GNOME schedule) would just
be too soon to meet the above goals, furthermore it would involve
freezing in less than 2 weeks time (we wouldn't be able to achieve
much at all).

Of course there are more Sugar users than the OLPC ones but it is by
far the largest user group and this is a big opportunity to bring
Sugar itself to the next level, having it ready for touch! So we
better take it.

For the next Sugar release (is that 1.0? or do we call it 0.100 :) we
can go back to the normal schedule and align again with the GNOME
schedule.

Regards,
   Simon

[1] http://wiki.sugarlabs.org/go/0.98/Roadmap#Schedule
[2] http://wiki.laptop.org/go/12.2.0/Release_plan
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


[Sugar-devel] [PATCH sugar 0/7] Remove last hippo occurrences from the shell

2012-08-06 Thread Simon Schampijer
This is a patch series to make the Sugar shell hippo free. Based on the
work that has been done in [1] and [2]. It incorporates the patch from
Sascha to move the EventIcon into the shell temporary. 

[1] http://git.sugarlabs.org/~erikos/sugar/erikos-shell-port
[2] http://git.sugarlabs.org/~erikos/sugar-toolkit/erikos-shell-port

Daniel Narvaez (3):
  Move SpreadLayout logic to favoriteslayout.py
  Remove hippo mentions
  Drop unused intro.py

Simon Schampijer (4):
  SugarEventIcon: Add a hippo-free implementation of the CanvasIcon
  ControlPanel AboutMe section: use the EventIcon from the shell
  Views: Replace the hippo based layout with one using GTK+ containers
  Journal: set white background in the ExpandedEntry of the Detail View

 docs/controls.txt |   3 +-
 extensions/cpsection/aboutme/view.py  |  27 +--
 src/intro/intro.py| 271 ---
 src/jarabe/desktop/Makefile.am|   4 +-
 src/jarabe/desktop/favoriteslayout.py | 390 +
 src/jarabe/desktop/favoritesview.py   | 398 --
 src/jarabe/desktop/friendview.py  |  31 +--
 src/jarabe/desktop/grid.py|   3 +
 src/jarabe/desktop/groupbox.py|  51 ++---
 src/jarabe/desktop/homebox.py |  22 +-
 src/jarabe/desktop/homewindow.py  |   2 +
 src/jarabe/desktop/meshbox.py | 119 +-
 src/jarabe/desktop/networkviews.py|  28 +--
 src/jarabe/desktop/snowflakelayout.py | 103 +
 src/jarabe/desktop/spreadlayout.py|  89 
 src/jarabe/desktop/transitionbox.py   |  50 +
 src/jarabe/journal/detailview.py  |  73 +++
 src/jarabe/journal/expandedentry.py   | 342 +
 src/jarabe/journal/keepicon.py|  61 +++---
 src/jarabe/journal/listview.py|  50 ++---
 src/jarabe/view/Makefile.am   |   1 +
 src/jarabe/view/buddyicon.py  |  10 +-
 src/jarabe/view/eventicon.py  | 277 +++
 src/jarabe/view/pulsingicon.py|  11 +-
 24 files changed, 1115 insertions(+), 1301 deletions(-)
 delete mode 100644 src/intro/intro.py
 delete mode 100644 src/jarabe/desktop/spreadlayout.py
 create mode 100644 src/jarabe/view/eventicon.py

-- 
1.7.11.2

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


[Sugar-devel] [PATCH sugar 5/7] Move SpreadLayout logic to favoriteslayout.py

2012-08-06 Thread Simon Schampijer
From: Daniel Narvaez dwnarv...@gmail.com

The SpreadLayout derives now from the ViewLayout. The ViewLayout
has a grid by default and the allocation happens here as well.

Signed-off-by: Daniel Narvaez dwnarv...@gmail.com
Acked-by: Simon Schampijer si...@laptop.org
---
 src/jarabe/desktop/Makefile.am |  1 -
 src/jarabe/desktop/spreadlayout.py | 89 --
 2 files changed, 90 deletions(-)
 delete mode 100644 src/jarabe/desktop/spreadlayout.py

diff --git a/src/jarabe/desktop/Makefile.am b/src/jarabe/desktop/Makefile.am
index 9e928e2..b36404e 100644
--- a/src/jarabe/desktop/Makefile.am
+++ b/src/jarabe/desktop/Makefile.am
@@ -14,6 +14,5 @@ sugar_PYTHON =\
networkviews.py \
 schoolserver.py\
snowflakelayout.py  \
-   spreadlayout.py \
transitionbox.py\
viewcontainer.py
diff --git a/src/jarabe/desktop/spreadlayout.py 
b/src/jarabe/desktop/spreadlayout.py
deleted file mode 100644
index b5c623e..000
--- a/src/jarabe/desktop/spreadlayout.py
+++ /dev/null
@@ -1,89 +0,0 @@
-# Copyright (C) 2007 Red Hat, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-
-import math
-
-import hippo
-import gobject
-import gtk
-
-from sugar.graphics import style
-
-from jarabe.desktop.grid import Grid
-
-
-_CELL_SIZE = 4.0
-
-
-class SpreadLayout(gobject.GObject, hippo.CanvasLayout):
-__gtype_name__ = 'SugarSpreadLayout'
-
-def __init__(self):
-gobject.GObject.__init__(self)
-self._box = None
-
-min_width, width = self.do_get_width_request()
-min_height, height = self.do_get_height_request(width)
-
-self._grid = Grid(int(width / _CELL_SIZE), int(height / _CELL_SIZE))
-self._grid.connect('child-changed', self._grid_child_changed_cb)
-
-def add(self, child):
-self._box.append(child)
-
-width, height = self._get_child_grid_size(child)
-self._grid.add(child, width, height)
-
-def remove(self, child):
-self._grid.remove(child)
-self._box.remove(child)
-
-def move(self, child, x, y):
-self._grid.move(child, x / _CELL_SIZE, y / _CELL_SIZE, locked=True)
-
-def do_set_box(self, box):
-self._box = box
-
-def do_get_height_request(self, for_width):
-return 0, gtk.gdk.screen_height() - style.GRID_CELL_SIZE
-
-def do_get_width_request(self):
-return 0, gtk.gdk.screen_width()
-
-def do_allocate(self, x, y, width, height,
-req_width, req_height, origin_changed):
-for child in self._box.get_layout_children():
-# We need to always get  requests to not confuse hippo
-min_w, child_width = child.get_width_request()
-min_h, child_height = child.get_height_request(child_width)
-
-rect = self._grid.get_child_rect(child.item)
-child.allocate(int(round(rect.x * _CELL_SIZE)),
-   int(round(rect.y * _CELL_SIZE)),
-   child_width,
-   child_height,
-   origin_changed)
-
-def _get_child_grid_size(self, child):
-min_width, width = child.get_width_request()
-min_height, height = child.get_height_request(width)
-width = math.ceil(width / _CELL_SIZE)
-height = math.ceil(height / _CELL_SIZE)
-
-return int(width), int(height)
-
-def _grid_child_changed_cb(self, grid, child):
-child.emit_request_changed()
-- 
1.7.11.2

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


[Sugar-devel] [PATCH sugar 2/7] ControlPanel AboutMe section: use the EventIcon from the shell

2012-08-06 Thread Simon Schampijer
We had a similar implmentation of the EventIcon in this section, now
we can reuse the one from the shell.

Signed-off-by: Simon Schampijer si...@laptop.org
---
 extensions/cpsection/aboutme/view.py | 27 ---
 1 file changed, 4 insertions(+), 23 deletions(-)

diff --git a/extensions/cpsection/aboutme/view.py 
b/extensions/cpsection/aboutme/view.py
index 84daec7..ea7c7c8 100644
--- a/extensions/cpsection/aboutme/view.py
+++ b/extensions/cpsection/aboutme/view.py
@@ -19,12 +19,12 @@ import gtk
 import gobject
 from gettext import gettext as _
 
-from sugar.graphics.icon import Icon
 from sugar.graphics import style
 from sugar.graphics.xocolor import XoColor, colors
 
 from jarabe.controlpanel.sectionview import SectionView
 from jarabe.controlpanel.inlinealert import InlineAlert
+from jarabe.view.eventicon import EventIcon
 
 _STROKE_COLOR = 0
 _FILL_COLOR = 1
@@ -111,22 +111,6 @@ _NEXT_STROKE_COLOR = 3
 _PREVIOUS_STROKE_COLOR = 4
 
 
-class EventIcon(gtk.EventBox):
-__gtype_name__ = 'SugarEventIcon'
-
-def __init__(self, **kwargs):
-gtk.EventBox.__init__(self)
-
-self.icon = Icon(pixel_size=style.XLARGE_ICON_SIZE, **kwargs)
-
-self.set_visible_window(False)
-self.set_app_paintable(True)
-self.set_events(gtk.gdk.BUTTON_PRESS_MASK)
-
-self.add(self.icon)
-self.icon.show()
-
-
 class ColorPicker(EventIcon):
 __gsignals__ = {
 'color-changed': (gobject.SIGNAL_RUN_FIRST,
@@ -135,14 +119,11 @@ class ColorPicker(EventIcon):
 }
 
 def __init__(self, picker):
-EventIcon.__init__(self)
-
-self.icon.props.icon_name = 'computer-xo'
+EventIcon.__init__(self, icon_name='computer-xo',
+   pixel_size=style.XLARGE_ICON_SIZE)
 self._picker = picker
 self._color = None
 
-self.icon.props.pixel_size = style.XLARGE_ICON_SIZE
-
 self.connect('button_press_event', self.__pressed_cb, picker)
 
 def update(self, color):
@@ -156,7 +137,7 @@ class ColorPicker(EventIcon):
 self._color = XoColor(_get_next_stroke_color(color))
 else:
 self._color = color
-self.icon.props.xo_color = self._color
+self.props.xo_color = self._color
 
 def __pressed_cb(self, button, event, picker):
 if picker != _CURRENT_COLOR:
-- 
1.7.11.2

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


[Sugar-devel] [PATCH sugar 1/7] SugarEventIcon: Add a hippo-free implementation of the CanvasIcon

2012-08-06 Thread Simon Schampijer
The icon consists of an GtkEventBox and an IconBuffer. The
GtkEventBox is a subclass of GtkBin which has its own window
and therefor is used to catch events for our IconBuffer
which does not have it's own window.

The EventIcon uses the CursorInvoker that has been introduced in
the GTK+ 3 toolkit to invoke a palette the same way as the
CanvasIcon did.

We keep the same API as with the CanvasIcon, only the 'size'
property is changed to be called 'pixel_size' in order to
make clearer which values it expects to be passed. We don't
expect a GtkIconSize to be passed here.

Another option would have been to put a SugarIcon inside a
a GtkEventBox and make the properties available through an
icon property but the API would have not been as nice and
logically it seems to make more sense to have the IconBuffer
being the base for both the SugarIcon and the SugarEventIcon.

This patch is highly based on the work from Walter Bender,
Daniel Drake and Raul Gutierrez Segales.

Signed-off-by: Simon Schampijer si...@laptop.org
[moved from sugar-toolkit to sugar]
Signed-off-by: Sascha Silbe si...@activitycentral.com

[1] http://developer.gnome.org/gtk/2.24/GtkEventBox.html
[2] 
http://developer.gnome.org/gtk/2.24/gtk-Themeable-Stock-Images.html#GtkIconSize
---
 src/jarabe/view/Makefile.am  |   1 +
 src/jarabe/view/eventicon.py | 277 +++
 2 files changed, 278 insertions(+)
 create mode 100644 src/jarabe/view/eventicon.py

diff --git a/src/jarabe/view/Makefile.am b/src/jarabe/view/Makefile.am
index 630f184..31ccfa4 100644
--- a/src/jarabe/view/Makefile.am
+++ b/src/jarabe/view/Makefile.am
@@ -4,6 +4,7 @@ sugar_PYTHON =  \
buddyicon.py\
buddymenu.py\
customizebundle.py  \
+   eventicon.py\
keyhandler.py   \
launcher.py \
palettes.py \
diff --git a/src/jarabe/view/eventicon.py b/src/jarabe/view/eventicon.py
new file mode 100644
index 000..4166798
--- /dev/null
+++ b/src/jarabe/view/eventicon.py
@@ -0,0 +1,277 @@
+# Copyright (C) 2012, One Laptop Per Child
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+import gobject
+import gtk
+
+from sugar.graphics import style
+from sugar.graphics.icon import _IconBuffer
+from sugar.graphics.palette import Palette
+from sugar.graphics.palettewindow import Invoker
+
+
+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_hid = self._item.connect('leave-notify-event',
+ self.__leave_notify_event_cb)
+self._release_hid = self._item.connect('button-release-event',
+   self.__button_release_event_cb)
+
+def detach(self):
+Invoker.detach(self)
+self._item.disconnect(self._enter_hid)
+self._item.disconnect(self._leave_hid)
+self._item.disconnect(self._release_hid)
+
+def get_default_position(self):
+return self.AT_CURSOR
+
+def get_rect(self):
+window = self._item.get_window()
+allocation = self._item.get_allocation()
+rect = Gdk.Rectangle()
+rect.x, rect.y = window.get_root_coords(allocation.x, allocation.y)
+rect.width = allocation.width
+rect.height = allocation.height
+return rect
+
+def __enter_notify_event_cb(self, button, event):
+self.notify_mouse_enter()
+return False
+
+def __leave_notify_event_cb(self, button, event):
+self.notify_mouse_leave()
+return False
+
+def __button_release_event_cb(self, button, event):
+if event.button == 3:
+self.notify_right_click

[Sugar-devel] [PATCH sugar 6/7] Remove hippo mentions

2012-08-06 Thread Simon Schampijer
From: Daniel Narvaez dwnarv...@gmail.com

This is probably all very outdated anyway.

Signed-off-by: Daniel Narvaez dwnarv...@gmail.com
Acked-by: Simon Schampijer si...@laptop.org
---
 docs/controls.txt | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/docs/controls.txt b/docs/controls.txt
index fa977ef..bfe9b78 100644
--- a/docs/controls.txt
+++ b/docs/controls.txt
@@ -26,7 +26,6 @@ gtk.Button
 
 sugar.Icon
 
-* Used in canvas-like views so probably an Hippo item.
 * Svg Only.
 * It should support xo colors easily.
 * Rollovers with a focus mark.
@@ -180,7 +179,7 @@ Palettes in ToolIconButton, IconButton
 * After a bigger delay, show the popup secondary state.
 * Could be animated.
 * Menu Items would go on the top and then the free-form rollover content.
-* The popup would be a gtk.Window that contains a Label, a MenuShell, an 
hippo.Canvas (or whatever) and finally a button bar (OK/Cancel).
+* The popup would be a gtk.Window that contains a Label, a MenuShell and 
finally a button bar (OK/Cancel).
 * The popup will have a setPrimaryState(label, accelerator) method. For action 
buttons would be a MenuItem, for the others would only be a Label.
 * The primary state should already have the same width as the secondary state 
and the expandable areas.
 * Primary states appear and disappear automatically (with a short delay). A 
click outside makes it disappear instantly.
-- 
1.7.11.2

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


[Sugar-devel] [PATCH sugar 7/7] Drop unused intro.py

2012-08-06 Thread Simon Schampijer
From: Daniel Narvaez dwnarv...@gmail.com

It was moved inside jarabe and ported to GTK+.

Signed-off-by: Daniel Narvaez dwnarv...@gmail.com
Acked-by: Simon Schampijer si...@laptop.org
---
 src/intro/intro.py | 271 -
 1 file changed, 271 deletions(-)
 delete mode 100644 src/intro/intro.py

diff --git a/src/intro/intro.py b/src/intro/intro.py
deleted file mode 100644
index 342ce1d..000
--- a/src/intro/intro.py
+++ /dev/null
@@ -1,271 +0,0 @@
-# Copyright (C) 2007, Red Hat, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-
-import os
-from gettext import gettext as _
-
-import gtk
-import gobject
-import hippo
-import logging
-
-from sugar import env
-from sugar.graphics import style
-from sugar.graphics.icon import Icon
-from sugar.graphics.entry import CanvasEntry
-from sugar.profile import get_profile
-
-import colorpicker
-
-_BACKGROUND_COLOR = style.COLOR_WHITE
-
-class _Page(hippo.CanvasBox):
-__gproperties__ = {
-'valid': (bool, None, None, False,
-  gobject.PARAM_READABLE)
-}
-
-def __init__(self, **kwargs):
-hippo.CanvasBox.__init__(self, **kwargs)
-self.valid = False
-
-def set_valid(self, valid):
-self.valid = valid
-self.notify('valid')
-
-def do_get_property(self, pspec):
-if pspec.name == 'valid':
-return self.valid
-
-def activate(self):
-pass
-
-class _NamePage(_Page):
-def __init__(self, intro):
-_Page.__init__(self, xalign=hippo.ALIGNMENT_CENTER,
-   background_color=_BACKGROUND_COLOR.get_int(),
-   spacing=style.DEFAULT_SPACING,
-   orientation=hippo.ORIENTATION_HORIZONTAL,)
-
-self._intro = intro
-
-label = hippo.CanvasText(text=_(Name:))
-self.append(label)
-
-self._entry = CanvasEntry(box_width=style.zoom(300))
-self._entry.set_background(_BACKGROUND_COLOR.get_html())
-self._entry.connect('notify::text', self._text_changed_cb)
-
-widget = self._entry.props.widget
-widget.set_max_length(45)
-
-self.append(self._entry)
-
-if gtk.widget_get_default_direction() == gtk.TEXT_DIR_RTL:
-self.reverse()
-
-def _text_changed_cb(self, entry, pspec):
-valid = len(entry.props.text.strip())  0
-self.set_valid(valid)
-
-def get_name(self):
-return self._entry.props.text
-
-def activate(self):
-self._entry.props.widget.grab_focus()
-
-class _ColorPage(_Page):
-def __init__(self, **kwargs):
-_Page.__init__(self, xalign=hippo.ALIGNMENT_CENTER,
-   background_color=_BACKGROUND_COLOR.get_int(),
-   spacing=style.DEFAULT_SPACING,
-   yalign=hippo.ALIGNMENT_CENTER, **kwargs)
-
-self._label = hippo.CanvasText(text=_(Click to change color:),
-   xalign=hippo.ALIGNMENT_CENTER)
-self.append(self._label)
-
-self._cp = colorpicker.ColorPicker(xalign=hippo.ALIGNMENT_CENTER)
-self.append(self._cp)
-
-self._color = self._cp.get_color()
-self.set_valid(True)
-
-def get_color(self):
-return self._cp.get_color()
-
-class _IntroBox(hippo.CanvasBox):
-__gsignals__ = {
-'done': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE,
- ([gobject.TYPE_PYOBJECT, gobject.TYPE_PYOBJECT,
-   gobject.TYPE_PYOBJECT]))
-}
-
-PAGE_NAME = 0
-PAGE_COLOR = 1
-
-PAGE_FIRST = PAGE_NAME
-PAGE_LAST = PAGE_COLOR
-
-def __init__(self):
-hippo.CanvasBox.__init__(self, padding=style.zoom(30),
- background_color=_BACKGROUND_COLOR.get_int())
-
-self._page = self.PAGE_NAME
-self._name_page = _NamePage(self)
-self._color_page = _ColorPage()
-self._current_page = None
-self._next_button = None
-
-self._setup_page()
-
-def _setup_page(self):
-self.remove_all()
-
-if self._page == self.PAGE_NAME:
-self._current_page = self._name_page
-elif self._page == self.PAGE_COLOR:
-self._current_page = self._color_page
-
-self.append(self._current_page

Re: [Sugar-devel] [PATCH sugar 4/7] Journal: set white background in the ExpandedEntry of the Detail View

2012-08-06 Thread Simon Schampijer

On 08/06/2012 01:17 PM, Sascha Silbe wrote:

Simon Schampijer si...@schampijer.de writes:


Change the ExpandedEntry class to subclass gtk.EventBox because the
gtk.VBox doesn't have a gtk.gdk.Window associated and the background
can't be set otherwise.


Is this a bug affecting current mainline master or is it a result of
applying one of the other patches in this series? If the latter, please
include a reference to the patch that changes the behaviour and if
possible a reason for the breakage (i.e. why did it work before the
patch, but not afterwards?). Depending on the details, it may even make
sense to just squash these changes into the patch that changes the
behaviour.


Can be squashed into:

[PATCH sugar 3/7] Views: Replace the hippo based layout with one using 
GTK+ containers


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


Re: [Sugar-devel] [PATCH sugar 7/7] Drop unused intro.py

2012-08-06 Thread Simon Schampijer

On 08/06/2012 01:35 PM, Sascha Silbe wrote:

Simon Schampijer si...@schampijer.de writes:


From: Daniel Narvaez dwnarv...@gmail.com

It was moved inside jarabe and ported to GTK+.


This file should be removed in the same patch that added the code to
jarabe, so that the code movement can easily be tracked and the actual
code changes be examined.

Sascha


It has been moved a long time ago, outside this patch series. I guess 
Daniel came across this when grepping for hippo.


Simon

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


Re: [Sugar-devel] [PATCH sugar 5/7] Move SpreadLayout logic to favoriteslayout.py

2012-08-06 Thread Simon Schampijer

On 08/06/2012 01:38 PM, Sascha Silbe wrote:

Simon Schampijer si...@schampijer.de writes:


From: Daniel Narvaez dwnarv...@gmail.com

The SpreadLayout derives now from the ViewLayout. The ViewLayout
has a grid by default and the allocation happens here as well.


I don't see any code moves in this patch, just removal. Like for Drop
unused intro.py (7/7), the removal should happen in the same patch that
adds the codes elsewhere, so that we can follow the code movement.

Sascha



Ok, can be be squashed as well into:

[PATCH sugar 3/7] Views: Replace the hippo based layout with one using 
GTK+ containers


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


[Sugar-devel] [PATCH sugar 0/7] Remove last hippo occurrences from the shell (v2)

2012-08-06 Thread Simon Schampijer
This is a patch series to make the Sugar shell hippo free. Based on the
work that has been done in [1] and [2]. It incorporates the patch from
Sascha to move the EventIcon into the shell temporary. 

[1] http://git.sugarlabs.org/~erikos/sugar/erikos-shell-port
[2] http://git.sugarlabs.org/~erikos/sugar-toolkit/erikos-shell-port

Daniel Narvaez (3):
  Move SpreadLayout logic to favoriteslayout.py
  Remove hippo mentions
  Drop unused intro.py

Simon Schampijer (4):
  SugarEventIcon: Add a hippo-free implementation of the CanvasIcon
  ControlPanel AboutMe section: use the EventIcon from the shell
  Views: Replace the hippo based layout with one using GTK+ containers
  Journal: set white background in the ExpandedEntry of the Detail View

 docs/controls.txt |   3 +-
 extensions/cpsection/aboutme/view.py  |  27 +--
 src/intro/intro.py| 271 ---
 src/jarabe/desktop/Makefile.am|   4 +-
 src/jarabe/desktop/favoriteslayout.py | 390 +
 src/jarabe/desktop/favoritesview.py   | 398 --
 src/jarabe/desktop/friendview.py  |  31 +--
 src/jarabe/desktop/grid.py|   3 +
 src/jarabe/desktop/groupbox.py|  51 ++---
 src/jarabe/desktop/homebox.py |  22 +-
 src/jarabe/desktop/homewindow.py  |   2 +
 src/jarabe/desktop/meshbox.py | 119 +-
 src/jarabe/desktop/networkviews.py|  28 +--
 src/jarabe/desktop/snowflakelayout.py | 103 +
 src/jarabe/desktop/spreadlayout.py|  89 
 src/jarabe/desktop/transitionbox.py   |  50 +
 src/jarabe/journal/detailview.py  |  73 +++
 src/jarabe/journal/expandedentry.py   | 342 +
 src/jarabe/journal/keepicon.py|  61 +++---
 src/jarabe/journal/listview.py|  50 ++---
 src/jarabe/view/Makefile.am   |   1 +
 src/jarabe/view/buddyicon.py  |  10 +-
 src/jarabe/view/eventicon.py  | 277 +++
 src/jarabe/view/pulsingicon.py|  11 +-
 24 files changed, 1115 insertions(+), 1301 deletions(-)
 delete mode 100644 src/intro/intro.py
 delete mode 100644 src/jarabe/desktop/spreadlayout.py
 create mode 100644 src/jarabe/view/eventicon.py

-- 
1.7.11.2

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


[Sugar-devel] [PATCH sugar 2/5] ControlPanel AboutMe section: use the EventIcon from the shell

2012-08-06 Thread Simon Schampijer
We had a similar implmentation of the EventIcon in this section, now
we can reuse the one from the shell.

Signed-off-by: Simon Schampijer si...@laptop.org
---
 extensions/cpsection/aboutme/view.py | 27 ---
 1 file changed, 4 insertions(+), 23 deletions(-)

diff --git a/extensions/cpsection/aboutme/view.py 
b/extensions/cpsection/aboutme/view.py
index 84daec7..ea7c7c8 100644
--- a/extensions/cpsection/aboutme/view.py
+++ b/extensions/cpsection/aboutme/view.py
@@ -19,12 +19,12 @@ import gtk
 import gobject
 from gettext import gettext as _
 
-from sugar.graphics.icon import Icon
 from sugar.graphics import style
 from sugar.graphics.xocolor import XoColor, colors
 
 from jarabe.controlpanel.sectionview import SectionView
 from jarabe.controlpanel.inlinealert import InlineAlert
+from jarabe.view.eventicon import EventIcon
 
 _STROKE_COLOR = 0
 _FILL_COLOR = 1
@@ -111,22 +111,6 @@ _NEXT_STROKE_COLOR = 3
 _PREVIOUS_STROKE_COLOR = 4
 
 
-class EventIcon(gtk.EventBox):
-__gtype_name__ = 'SugarEventIcon'
-
-def __init__(self, **kwargs):
-gtk.EventBox.__init__(self)
-
-self.icon = Icon(pixel_size=style.XLARGE_ICON_SIZE, **kwargs)
-
-self.set_visible_window(False)
-self.set_app_paintable(True)
-self.set_events(gtk.gdk.BUTTON_PRESS_MASK)
-
-self.add(self.icon)
-self.icon.show()
-
-
 class ColorPicker(EventIcon):
 __gsignals__ = {
 'color-changed': (gobject.SIGNAL_RUN_FIRST,
@@ -135,14 +119,11 @@ class ColorPicker(EventIcon):
 }
 
 def __init__(self, picker):
-EventIcon.__init__(self)
-
-self.icon.props.icon_name = 'computer-xo'
+EventIcon.__init__(self, icon_name='computer-xo',
+   pixel_size=style.XLARGE_ICON_SIZE)
 self._picker = picker
 self._color = None
 
-self.icon.props.pixel_size = style.XLARGE_ICON_SIZE
-
 self.connect('button_press_event', self.__pressed_cb, picker)
 
 def update(self, color):
@@ -156,7 +137,7 @@ class ColorPicker(EventIcon):
 self._color = XoColor(_get_next_stroke_color(color))
 else:
 self._color = color
-self.icon.props.xo_color = self._color
+self.props.xo_color = self._color
 
 def __pressed_cb(self, button, event, picker):
 if picker != _CURRENT_COLOR:
-- 
1.7.11.2

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


[Sugar-devel] [PATCH sugar 4/5] Remove hippo mentions

2012-08-06 Thread Simon Schampijer
From: Daniel Narvaez dwnarv...@gmail.com

This is probably all very outdated anyway.

Signed-off-by: Daniel Narvaez dwnarv...@gmail.com
Acked-by: Simon Schampijer si...@laptop.org
---
 docs/controls.txt | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/docs/controls.txt b/docs/controls.txt
index fa977ef..bfe9b78 100644
--- a/docs/controls.txt
+++ b/docs/controls.txt
@@ -26,7 +26,6 @@ gtk.Button
 
 sugar.Icon
 
-* Used in canvas-like views so probably an Hippo item.
 * Svg Only.
 * It should support xo colors easily.
 * Rollovers with a focus mark.
@@ -180,7 +179,7 @@ Palettes in ToolIconButton, IconButton
 * After a bigger delay, show the popup secondary state.
 * Could be animated.
 * Menu Items would go on the top and then the free-form rollover content.
-* The popup would be a gtk.Window that contains a Label, a MenuShell, an 
hippo.Canvas (or whatever) and finally a button bar (OK/Cancel).
+* The popup would be a gtk.Window that contains a Label, a MenuShell and 
finally a button bar (OK/Cancel).
 * The popup will have a setPrimaryState(label, accelerator) method. For action 
buttons would be a MenuItem, for the others would only be a Label.
 * The primary state should already have the same width as the secondary state 
and the expandable areas.
 * Primary states appear and disappear automatically (with a short delay). A 
click outside makes it disappear instantly.
-- 
1.7.11.2

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


[Sugar-devel] [PATCH sugar 5/5] Drop unused intro.py

2012-08-06 Thread Simon Schampijer
From: Daniel Narvaez dwnarv...@gmail.com

It was moved inside jarabe and ported to GTK+.

Signed-off-by: Daniel Narvaez dwnarv...@gmail.com
Acked-by: Simon Schampijer si...@laptop.org
---
 src/intro/intro.py | 271 -
 1 file changed, 271 deletions(-)
 delete mode 100644 src/intro/intro.py

diff --git a/src/intro/intro.py b/src/intro/intro.py
deleted file mode 100644
index 342ce1d..000
--- a/src/intro/intro.py
+++ /dev/null
@@ -1,271 +0,0 @@
-# Copyright (C) 2007, Red Hat, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-
-import os
-from gettext import gettext as _
-
-import gtk
-import gobject
-import hippo
-import logging
-
-from sugar import env
-from sugar.graphics import style
-from sugar.graphics.icon import Icon
-from sugar.graphics.entry import CanvasEntry
-from sugar.profile import get_profile
-
-import colorpicker
-
-_BACKGROUND_COLOR = style.COLOR_WHITE
-
-class _Page(hippo.CanvasBox):
-__gproperties__ = {
-'valid': (bool, None, None, False,
-  gobject.PARAM_READABLE)
-}
-
-def __init__(self, **kwargs):
-hippo.CanvasBox.__init__(self, **kwargs)
-self.valid = False
-
-def set_valid(self, valid):
-self.valid = valid
-self.notify('valid')
-
-def do_get_property(self, pspec):
-if pspec.name == 'valid':
-return self.valid
-
-def activate(self):
-pass
-
-class _NamePage(_Page):
-def __init__(self, intro):
-_Page.__init__(self, xalign=hippo.ALIGNMENT_CENTER,
-   background_color=_BACKGROUND_COLOR.get_int(),
-   spacing=style.DEFAULT_SPACING,
-   orientation=hippo.ORIENTATION_HORIZONTAL,)
-
-self._intro = intro
-
-label = hippo.CanvasText(text=_(Name:))
-self.append(label)
-
-self._entry = CanvasEntry(box_width=style.zoom(300))
-self._entry.set_background(_BACKGROUND_COLOR.get_html())
-self._entry.connect('notify::text', self._text_changed_cb)
-
-widget = self._entry.props.widget
-widget.set_max_length(45)
-
-self.append(self._entry)
-
-if gtk.widget_get_default_direction() == gtk.TEXT_DIR_RTL:
-self.reverse()
-
-def _text_changed_cb(self, entry, pspec):
-valid = len(entry.props.text.strip())  0
-self.set_valid(valid)
-
-def get_name(self):
-return self._entry.props.text
-
-def activate(self):
-self._entry.props.widget.grab_focus()
-
-class _ColorPage(_Page):
-def __init__(self, **kwargs):
-_Page.__init__(self, xalign=hippo.ALIGNMENT_CENTER,
-   background_color=_BACKGROUND_COLOR.get_int(),
-   spacing=style.DEFAULT_SPACING,
-   yalign=hippo.ALIGNMENT_CENTER, **kwargs)
-
-self._label = hippo.CanvasText(text=_(Click to change color:),
-   xalign=hippo.ALIGNMENT_CENTER)
-self.append(self._label)
-
-self._cp = colorpicker.ColorPicker(xalign=hippo.ALIGNMENT_CENTER)
-self.append(self._cp)
-
-self._color = self._cp.get_color()
-self.set_valid(True)
-
-def get_color(self):
-return self._cp.get_color()
-
-class _IntroBox(hippo.CanvasBox):
-__gsignals__ = {
-'done': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE,
- ([gobject.TYPE_PYOBJECT, gobject.TYPE_PYOBJECT,
-   gobject.TYPE_PYOBJECT]))
-}
-
-PAGE_NAME = 0
-PAGE_COLOR = 1
-
-PAGE_FIRST = PAGE_NAME
-PAGE_LAST = PAGE_COLOR
-
-def __init__(self):
-hippo.CanvasBox.__init__(self, padding=style.zoom(30),
- background_color=_BACKGROUND_COLOR.get_int())
-
-self._page = self.PAGE_NAME
-self._name_page = _NamePage(self)
-self._color_page = _ColorPage()
-self._current_page = None
-self._next_button = None
-
-self._setup_page()
-
-def _setup_page(self):
-self.remove_all()
-
-if self._page == self.PAGE_NAME:
-self._current_page = self._name_page
-elif self._page == self.PAGE_COLOR:
-self._current_page = self._color_page
-
-self.append(self._current_page

Re: [Sugar-devel] [PATCH sugar 1/7] SugarEventIcon: Add a hippo-free implementation of the CanvasIcon

2012-08-06 Thread Simon Schampijer

On 08/06/2012 02:02 PM, Benjamin Berg wrote:

Hi,

On Mon, 2012-08-06 at 12:04 +0200, Simon Schampijer wrote:

Signed-off-by: Simon Schampijer si...@laptop.org
[moved from sugar-toolkit to sugar]
Signed-off-by: Sascha Silbe si...@activitycentral.com

Reviewed-by: Benjamin Berg ben...@sugarlabs.org


+def __init__(self, **kwargs):
+self._buffer = _IconBuffer()
+self._alpha = 1.0
+
+gtk.EventBox.__init__(self)
+for key, value in kwargs.iteritems():
+self.set_property(key, value)
+
+self._palette_invoker = CursorInvoker()
+self._palette_invoker.attach(self)
+
+# HACK to supress the grey background around the icon
+# won't be needed in GTK3
+self.modify_bg(gtk.STATE_NORMAL, style.COLOR_WHITE.get_gdk_color())


Not really too bad, but I am pretty sure that
gtk.EventBox.set_visible_window(False) should work fine here.




Hmm, there is something I do not understand yet. If I set the 
visible_window to False the container can not handle the allocation 
anymore correctly and position the icons over each other - the (x,y) 
values are not handled anymore correctly, the icon itself is drawn, even 
without background.


I just tried it with a little test program with a custom container and 
with Gtk.Fixed with the same result for both.


Regards,
   Simon

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


Re: [Sugar-devel] [PATCH sugar 0/2] Move EventIcon to sugar

2012-08-03 Thread Simon Schampijer

On 07/25/2012 12:23 AM, Sascha Silbe wrote:

As agreed on during the Development Team meeting [1], the EventIcon
needed for the hippo-canvas removal project should be merged into
sugar, rather than sugar-toolkit. This patch series adds the icon to
sugar and modifies the code from the current working branch [2] of the
hippo-canvas removal project to make use of this private copy so that
it works with mainline sugar-toolkit.


Finally, I did not put the new EventIcon into the shell as I did not 
like code accessing private classes as _IconBuffer. But as an 
intermediate step I don't care to much.


I will wrap up now the other patches so we can land them.

Regards,
   Simon

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


Re: [Sugar-devel] porting Gstreamer Activities to PYGobject and Gstreamer 1.0

2012-07-31 Thread Simon Schampijer

On 07/31/2012 10:33 AM, Peter Robinson wrote:

On Tue, Jul 31, 2012 at 5:01 AM, Gonzalo Odiard gonz...@laptop.org wrote:

Any chance of have it packaged in F17?
Should do developing, but more important testing, easier.


I'm not sure, it's something that could be investigated as in theory
it's suppose to be parallel installable, whether it's parallel
runnable is another thing altogether though.


That should be fine according to the Gst-devs. You can just not mix it 
in the same process.


Regards,
   Simon

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


[Sugar-devel] porting Gstreamer Activities to PYGobject and Gstreamer 1.0

2012-07-30 Thread Simon Schampijer

Hey Activity team,

so in the last days we have been looking here at Gstreamer and the 
situation in regards to Pygobject and GTK+ 3.


All in all in order to use Gstreamer with introspection we have to use 
Gstreamer 1.0 (0.12). Version 0.10 is dead, and will never really work 
with introspection (see [1] and what we know as well from talking with 
the Gstreamer devs).


I talked to Peter and Gstreamer-1.0 should be packaged with F18, see 
recent discussions [2].


In the meantime when you port your activity you can build Gstreamer on 
your system and use a script to point your activity to the new Gstreamer 
version [3][4].


If you are stuck while poring you can have a look at the Pitivi porting 
branch [5].


Regards,
   Simon

[1] https://wiki.ubuntu.com/Novacut/GStreamer1.0#Python_Porting_Guide
[2] http://www.spinics.net/lists/fedora-desktop/msg07545.html
[3] 
http://gstreamer.freedesktop.org/data/doc/gstreamer/head/faq/html/chapter-git.html#git-anon
[4] 
http://gstreamer.freedesktop.org/data/doc/gstreamer/head/faq/html/chapter-developing.html#developing-uninstalled-gstreamer

[5] https://github.com/nekohayo/pitivi/tree/pygi
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Help activity future

2012-07-27 Thread Simon Schampijer

On 07/27/2012 02:46 PM, Manuel Kaufmann wrote:

On Fri, Jul 27, 2012 at 9:19 AM, Gonzalo Odiard gonz...@laptop.org wrote:

rst is yet another markup here, for a teacher or writer :)
As you can see, the Help is being edited in the wiki now.


Yes, I know. That's why I said: I agree with you. When the wiki will
be finished we (developers) can take that content and convert them to
.rst



Ok, Gonzalo has a point that the first task is getting the context 
together. However if you want to convert that content to a markup later 
it makes sense to use a markup GNOME is using as at least the OLPC does 
ship with GNOME as well and GNOME is the community we interact with 
most. If we use the same tools we are much more likely to get 
contributions from GNOME as well.


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] Fixing deprecations: Using Gtk.Orientation

2012-06-27 Thread Simon Schampijer
Daniel, thanks for the patch. It is good to add some more details about 
the requested change in the description.


[1] states for example: GtkHBox has been deprecated. You can use GtkBox 
instead, which is a very quick and easy change. If you have derived your 
own classes from GtkHBox, you can simply change the inheritance to 
derive directly from GtkBox. No further changes are needed, since the 
default value of the orientation property is 
GTK_ORIENTATION_HORIZONTAL. If you want your code to be future-proof, 
the recommendation is to switch to GtkGrid, since GtkBox is going to be 
deprecated in favor of the more flexible grid widget eventually. For 
more information about migrating to GtkGrid, see Migrating from other 
containers to GtkGrid.


So the first question that arises is: should we switch directly to 
GtkGrid [2]? Best would be to do a simple test program and compare the 
different containers. If GtkGrid can be used in the same way and it is 
the intended way forward we should switch directly to that. The 
migrating guide is interesting as well [3].


Regards,
   Simon

[1] http://developer.gnome.org/gtk3/3.4/GtkHBox.html
[2] http://developer.gnome.org/gtk3/3.4/GtkGrid.html
[3] http://developer.gnome.org/gtk3/3.4/gtk-migrating-GtkGrid.html


On 06/27/2012 04:56 AM, Daniel Francis wrote:

---
  src/sugar3/activity/widgets.py  |3 ++-
  src/sugar3/graphics/alert.py|9 ++---
  src/sugar3/graphics/notebook.py |6 --
  src/sugar3/graphics/palette.py  |   27 +++
  src/sugar3/graphics/panel.py|3 ++-
  src/sugar3/graphics/radiopalette.py |3 ++-
  src/sugar3/graphics/toolbarbox.py   |3 ++-
  src/sugar3/graphics/toolbox.py  |6 --
  src/sugar3/graphics/toolcombobox.py |3 ++-
  src/sugar3/graphics/tray.py |6 --
  src/sugar3/graphics/window.py   |6 --
  11 files changed, 51 insertions(+), 24 deletions(-)

diff --git a/src/sugar3/activity/widgets.py b/src/sugar3/activity/widgets.py
index c4015ce..ffb3503 100644
--- a/src/sugar3/activity/widgets.py
+++ b/src/sugar3/activity/widgets.py
@@ -226,7 +226,8 @@ class DescriptionItem(Gtk.ToolItem):
  description_button.set_tooltip(_('Description'))
  self._palette = description_button.get_palette()

-description_box = Gtk.HBox()
+description_box = Gtk.Box()
+description_box.set_orientation(Gtk.Orientation.HORIZONTAL)
  sw = Gtk.ScrolledWindow()
  sw.set_size_request(int(Gdk.Screen.width() / 2),
  2 * style.GRID_CELL_SIZE)
diff --git a/src/sugar3/graphics/alert.py b/src/sugar3/graphics/alert.py
index 16392cd..358fea4 100644
--- a/src/sugar3/graphics/alert.py
+++ b/src/sugar3/graphics/alert.py
@@ -97,11 +97,13 @@ class Alert(Gtk.EventBox):
  self._icon = None
  self._buttons = {}

-self._hbox = Gtk.HBox()
+self._hbox = Gtk.Box()
+self._hbox.set_orientation(Gtk.Orientation.HORIZONTAL)
  self._hbox.set_border_width(style.DEFAULT_SPACING)
  self._hbox.set_spacing(style.DEFAULT_SPACING)

-self._msg_box = Gtk.VBox()
+self._msg_box = Gtk.Box()
+self._msg_box.set_orientation(Gtk.Orientation.VERTICAL)
  self._title_label = Gtk.Label()
  self._title_label.set_alignment(0, 0.5)
  self._msg_box.pack_start(self._title_label, False, False, 0)
@@ -111,7 +113,8 @@ class Alert(Gtk.EventBox):
  self._msg_box.pack_start(self._msg_label, False, False, 0)
  self._hbox.pack_start(self._msg_box, False, False, 0)

-self._buttons_box = Gtk.HButtonBox()
+self._buttons_box = Gtk.ButtonBox()
+self._buttons_box.set_orientation(Gtk.Orientation.HORIZONTAL)
  self._buttons_box.set_layout(Gtk.ButtonBoxStyle.END)
  self._buttons_box.set_spacing(style.DEFAULT_SPACING)
  self._hbox.pack_start(self._buttons_box, True, True, 0)
diff --git a/src/sugar3/graphics/notebook.py b/src/sugar3/graphics/notebook.py
index e14bf0e..0f3e858 100644
--- a/src/sugar3/graphics/notebook.py
+++ b/src/sugar3/graphics/notebook.py
@@ -74,7 +74,8 @@ class Notebook(Gtk.Notebook):
  raise AssertionError

  def _add_icon_to_button(self, button):
-icon_box = Gtk.HBox()
+icon_box = Gtk.Box()
+icon_box.set_orientation(Gtk.Orientation.HORIZONTAL)
  image = Gtk.Image()
  image.set_from_stock(Gtk.STOCK_CLOSE, Gtk.IconSize.MENU)
  Gtk.Button.set_relief(button, Gtk.ReliefStyle.NONE)
@@ -91,7 +92,8 @@ class Notebook(Gtk.Notebook):
  def _create_custom_tab(self, text, child):
  event_box = Gtk.EventBox()

-tab_box = Gtk.HBox(False, 2)
+tab_box = Gtk.Box(False, 2)
+tab_box.set_orientation(Gtk.Orientation.HORIZONTAL)
  tab_label = Gtk.Label(label=text)

  tab_button = Gtk.Button()
diff --git a/src/sugar3/graphics/palette.py b/src/sugar3/graphics/palette.py

[Sugar-devel] Shell Port: RandomLayout (FreeFormLayout)

2012-06-27 Thread Simon Schampijer

Hi,

while porting the Home View I am dealing as well with the RandomLayout. 
When it was introduced the idea was to give learners a chance to 
personalize their home view and group activities together if desired. 
This was basically mimicking the desktop metaphor.


I agree that there is value in letting users customize their home view, 
in grouping activities for example, like grouping in subjects (e.g. 
math, language). I question a bit that the RandomLayout is a good tool 
for that. There is no grid where the icons get snapped to, no visual 
indication of groups only by positioning. And the current implementation 
is mainly a proof of concept which is not very precise in placing icons 
close to each other.


So my questions are now:

- is it used in deployments? If, in which ways do kids use it? What do 
they like about it and what do they try to achieve with it?


- do we want to keep supporting the FreeFormLayout? Or work on a better 
activity managing layout?


- if we remove it, do we still want to port it? I am close for the 
no-hippo part, but it is another complex bit, that we need to invest and 
if we don't want to go forward with it no need to invest there.


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


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

2012-06-26 Thread Simon Schampijer

Hi,

today we will have our weekly development team meeting, the topics will be:

- Introducing new contributors

- Update list of action items

- shell port status update

Time: 26. June 2012 (15:00 UTC)
Place: #sugar-meeting (freenode)

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


[Sugar-devel] [MINUTES] Development team meeting --- 26. June 2012 (15:00 UTC)

2012-06-26 Thread Simon Schampijer

On 06/26/2012 04:23 PM, Simon Schampijer wrote:

Hi,

today we will have our weekly development team meeting, the topics will be:

- Introducing new contributors

- Update list of action items

- shell port status update

Time: 26. June 2012 (15:00 UTC)
Place: #sugar-meeting (freenode)

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



Minutes: 
http://meeting.sugarlabs.org/sugar-meeting/meetings/2012-06-26T14:53:18.html
Log: 
http://meeting.sugarlabs.org/sugar-meeting/meetings/2012-06-26T14:53:18


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


Re: [Sugar-devel] [PATCH sugar-artwork 1/2] Make the GtkImage background transparent SL #3723

2012-06-25 Thread Simon Schampijer

Looks good, please push!

Thanks,
   Simon


On 06/25/2012 01:54 PM, Manuel Quiñones wrote:

Signed-off-by: Manuel Quiñones ma...@laptop.org
---
  gtk3/theme/gtk-widgets.css.em |6 ++
  1 file changed, 6 insertions(+)

diff --git a/gtk3/theme/gtk-widgets.css.em b/gtk3/theme/gtk-widgets.css.em
index bf4ecd6..91c998c 100644
--- a/gtk3/theme/gtk-widgets.css.em
+++ b/gtk3/theme/gtk-widgets.css.em
@@ -639,3 +639,9 @@ GtkCheckButton:prelight {
  border-width: 2px;
  border-color: @button_grey;
  }
+
+/* GtkImage */
+
+GtkImage {
+background-color: transparent;
+}




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


Re: [Sugar-devel] [PATCH sugar-artwork 2/2] Set background color for GtkTreeView rows with odd-even flags SL #3726

2012-06-25 Thread Simon Schampijer

On 06/25/2012 02:06 PM, Benjamin Berg wrote:

On Mon, 2012-06-25 at 08:54 -0300, Manuel Quiñones wrote:

This is only applied if the GtkTreeView has the rules-hint property
set to True.


I haven't actually tried what exactly this looks like, but using #d5d5d5
for the row odd color seems good. And the patch itself looks sane
too :-)


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

Reviewed-by: Benjamin Berg ben...@sugarlabs.org


Agreed, please push that one as well.

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


Re: [Sugar-devel] [PATCH sugar] Unset gnome keyring environment variables

2012-06-25 Thread Simon Schampijer

Thanks Daniel for the patch.

Looks good to me and reading the bug conversation this looks like the 
right thing to do to me.


Sascha, you said you wanted to adjust some description?

Regards,
   Simon


On 06/13/2012 09:30 PM, Daniel Narvaez wrote:

Rather than starting it manually. As suggested on
https://bugzilla.gnome.org/show_bug.cgi?id=628302
---
  bin/sugar.in|6 --
  src/jarabe/util/emulator.py |5 +
  2 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/bin/sugar.in b/bin/sugar.in
index 12098db..2df0ab8 100644
--- a/bin/sugar.in
+++ b/bin/sugar.in
@@ -62,12 +62,6 @@ export LANGUAGE=${LANGUAGE:-${LANG}}
  # Set Sugar's telepathy accounts directory
  export MC_ACCOUNT_DIR=$HOME/.sugar/$SUGAR_PROFILE/accounts

-# Workaround until gnome-keyring-daemon lets dbus activate it
-# https://bugzilla.gnome.org/show_bug.cgi?id=628302
-if test $SUGAR_EMULATOR = yes -a $(type gnome-keyring-daemon); then
-gnome-keyring-daemon --components=secrets 
-fi
-
  # Source language settings and debug definitions
  if [ -f ~/.i18n ]; then
  . ~/.i18n
diff --git a/src/jarabe/util/emulator.py b/src/jarabe/util/emulator.py
index fda1b59..bbfa73a 100644
--- a/src/jarabe/util/emulator.py
+++ b/src/jarabe/util/emulator.py
@@ -120,6 +120,11 @@ def _start_window_manager():


  def _setup_env(display, scaling, emulator_pid):
+for variable in ['GPG_AGENT_INFO', 'SSH_AUTH_SOCK',
+ 'GNOME_KEYRING_CONTROL', 'GNOME_KEYRING_PID']:
+if variable in os.environ:
+del os.environ[variable]
+
  os.environ['SUGAR_EMULATOR'] = 'yes'
  os.environ['GABBLE_LOGFILE'] = os.path.join(
  env.get_profile_path(), 'logs', 'telepathy-gabble.log')




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


Re: [Sugar-devel] Shell-port GTK+ 2 --- GTK+ 3

2012-06-24 Thread Simon Schampijer

On 06/23/2012 08:21 PM, Simon Schampijer wrote:

Hi,

here a few more informations to the approach I am taken. Daniel Narvaez
asked me yesterday about it, so there might have been some questions
floating around already :)

The first part of the work is getting the shell hippo free and using GTK
widgets instead. The views have to be ported to GTKContainers and in the
toolkit we have to replace the CanvasIcon with an EventBox (for
receiving the events) that contains an IconBuffer to draw the icon
itself. We renamed that widget to EventIcon in the process. The API
stays the same, just for more clarity size has been renamed to pixel_size.

I have pushed the current state of the shell port to a temporary repo
[1] and this toolkit-gtk2 patch to a temporary repo [2] as well. So the
toolkit-gtk2 part will never really land but it is good to have it
around for making the shell port.

Once this no-hippo work is done we can run the autoconverter script
(GTK2-GTK3) and then do the cleanup for GTK+ 3. Same way as we did for
the toolkit port.

The two branches are both tracked in sugar-build as well [3].

Regards,
Simon

[1] http://git.sugarlabs.org/~erikos/sugar/erikos-shell-port
[2] http://git.sugarlabs.org/~erikos/sugar-toolkit/erikos-shell-port
[3] http://git.sugarlabs.org/~dnarvaez/sugar-build/shell-port


More writeup on the decisions taken:

http://wiki.sugarlabs.org/go/Features/GTK3/Shell/Hippo_Removal

That should help when reading the new code.

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


[Sugar-devel] Shell-port GTK+ 2 --- GTK+ 3 (was: Re: [PATCH sugar-toolkit (shell-port)] SugarEventIcon: Port the CanvasIcon to a hippo-free implementation)

2012-06-23 Thread Simon Schampijer

Hi,

here a few more informations to the approach I am taken. Daniel Narvaez 
asked me yesterday about it, so there might have been some questions 
floating around already :)


The first part of the work is getting the shell hippo free and using GTK 
widgets instead. The views have to be ported to GTKContainers and in the 
toolkit we have to replace the CanvasIcon with an EventBox (for 
receiving the events) that contains an IconBuffer to draw the icon 
itself. We renamed that widget to EventIcon in the process. The API 
stays the same, just for more clarity size has been renamed to pixel_size.


I have pushed the current state of the shell port to a temporary repo 
[1] and this toolkit-gtk2 patch to a temporary repo [2] as well. So the 
toolkit-gtk2 part will never really land but it is good to have it 
around for making the shell port.


Once this no-hippo work is done we can run the autoconverter script 
(GTK2-GTK3) and then do the cleanup for GTK+ 3. Same way as we did for 
the toolkit port.


The two branches are both tracked in sugar-build as well [3].

Regards,
   Simon

[1] http://git.sugarlabs.org/~erikos/sugar/erikos-shell-port
[2] http://git.sugarlabs.org/~erikos/sugar-toolkit/erikos-shell-port
[3] http://git.sugarlabs.org/~dnarvaez/sugar-build/shell-port


On 06/22/2012 03:58 PM, Simon Schampijer wrote:

The icon consists of an GtkEventBox and an IconBuffer. The
GtkEventBox is a subclass of GtkBin which has its own window
and therefor is used to catch events for our IconBuffer
which does not have it's own window.

The EventIcon does emit the 'activated' signal when clicked
and uses the CursorInvoker to invoke a palette the same
way as the CanvasIcon did. The CursorInvoker had to be adopted
accordingly and made it hippo free as well.

We keep the same API as with the CanvasIcon, only the 'size'
property is changed to be called 'pixel_size' in order to
make clearer which values it expects to be passed. We don't
expect a GtkIconSize to be passed here.

Another option would have been to put a SugarIcon inside a
a GtkEventBox and make the properties available through an
icon property but the API would have not been as nice and
logically it seems to make more sense to have the IconBuffer
being the base for both the SugarIcon and the SugarEventIcon.

There are a few unnecessary docstrings removed from the
icon class.

This patch is highly based on the work from Walter Bender,
Daniel Drake and Raul Gutierrez Segales.

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

[1] http://developer.gnome.org/gtk/2.24/GtkEventBox.html
[2] 
http://developer.gnome.org/gtk/2.24/gtk-Themeable-Stock-Images.html#GtkIconSize
---
  src/sugar/graphics/icon.py  |  407 ---
  src/sugar/graphics/palettewindow.py |   25 ++-
  2 files changed, 61 insertions(+), 371 deletions(-)

diff --git a/src/sugar/graphics/icon.py b/src/sugar/graphics/icon.py
index 3f540d7..2fd136e 100644
--- a/src/sugar/graphics/icon.py
+++ b/src/sugar/graphics/icon.py
@@ -27,9 +27,9 @@ import logging

  import gobject
  import gtk
-import hippo
  import cairo

+from sugar.graphics import style
  from sugar.graphics.xocolor import XoColor
  from sugar.util import LRU

@@ -367,16 +367,6 @@ class Icon(gtk.Image):
  self._buffer.file_name = self.props.file

  def do_size_request(self, requisition):
-
-Parameters
---
-requisition :
-
-Returns
----
-None
-
-
  self._sync_image_properties()
  surface = self._buffer.get_surface()
  if surface:
@@ -389,16 +379,6 @@ class Icon(gtk.Image):
  requisition[0] = requisition[1] = 0

  def do_expose_event(self, event):
-
-Parameters
---
-event :
-
-Returns:
-
-None
-
-
  self._sync_image_properties()
  sensitive = (self.state != gtk.STATE_INSENSITIVE)
  surface = self._buffer.get_surface(sensitive, self)
@@ -436,16 +416,6 @@ class Icon(gtk.Image):
  cr.paint_with_alpha(self._alpha)

  def set_xo_color(self, value):
-
-Parameters
---
-value :
-
-Returns
----
-None
-
-
  if self._buffer.xo_color != value:
  self._buffer.xo_color = value
  self.queue_draw()
@@ -454,78 +424,28 @@ class Icon(gtk.Image):
  type=object, getter=None, setter=set_xo_color)

  def set_fill_color(self, value):
-
-Parameters
---
-value :
-
-Returns
----
-None
-
-
  if self._buffer.fill_color != value:
  self._buffer.fill_color = value
  self.queue_draw()

  def get_fill_color(self):
-
-Parameters
---
-None
-
-Returns
----
-fill_color :
-
-
  return self

[Sugar-devel] [PATCH sugar-toolkit (shell-port)] SugarEventIcon: Port the CanvasIcon to a hippo-free implementation

2012-06-22 Thread Simon Schampijer
The icon consists of an GtkEventBox and an IconBuffer. The
GtkEventBox is a subclass of GtkBin which has its own window
and therefor is used to catch events for our IconBuffer
which does not have it's own window.

The EventIcon does emit the 'activated' signal when clicked
and uses the CursorInvoker to invoke a palette the same
way as the CanvasIcon did. The CursorInvoker had to be adopted
accordingly and made it hippo free as well.

We keep the same API as with the CanvasIcon, only the 'size'
property is changed to be called 'pixel_size' in order to
make clearer which values it expects to be passed. We don't
expect a GtkIconSize to be passed here.

Another option would have been to put a SugarIcon inside a
a GtkEventBox and make the properties available through an
icon property but the API would have not been as nice and
logically it seems to make more sense to have the IconBuffer
being the base for both the SugarIcon and the SugarEventIcon.

There are a few unnecessary docstrings removed from the
icon class.

This patch is highly based on the work from Walter Bender,
Daniel Drake and Raul Gutierrez Segales.

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

[1] http://developer.gnome.org/gtk/2.24/GtkEventBox.html
[2] 
http://developer.gnome.org/gtk/2.24/gtk-Themeable-Stock-Images.html#GtkIconSize
---
 src/sugar/graphics/icon.py  |  407 ---
 src/sugar/graphics/palettewindow.py |   25 ++-
 2 files changed, 61 insertions(+), 371 deletions(-)

diff --git a/src/sugar/graphics/icon.py b/src/sugar/graphics/icon.py
index 3f540d7..2fd136e 100644
--- a/src/sugar/graphics/icon.py
+++ b/src/sugar/graphics/icon.py
@@ -27,9 +27,9 @@ import logging
 
 import gobject
 import gtk
-import hippo
 import cairo
 
+from sugar.graphics import style
 from sugar.graphics.xocolor import XoColor
 from sugar.util import LRU
 
@@ -367,16 +367,6 @@ class Icon(gtk.Image):
 self._buffer.file_name = self.props.file
 
 def do_size_request(self, requisition):
-
-Parameters
---
-requisition :
-
-Returns
----
-None
-
-
 self._sync_image_properties()
 surface = self._buffer.get_surface()
 if surface:
@@ -389,16 +379,6 @@ class Icon(gtk.Image):
 requisition[0] = requisition[1] = 0
 
 def do_expose_event(self, event):
-
-Parameters
---
-event :
-
-Returns:
-
-None
-
-
 self._sync_image_properties()
 sensitive = (self.state != gtk.STATE_INSENSITIVE)
 surface = self._buffer.get_surface(sensitive, self)
@@ -436,16 +416,6 @@ class Icon(gtk.Image):
 cr.paint_with_alpha(self._alpha)
 
 def set_xo_color(self, value):
-
-Parameters
---
-value :
-
-Returns
----
-None
-
-
 if self._buffer.xo_color != value:
 self._buffer.xo_color = value
 self.queue_draw()
@@ -454,78 +424,28 @@ class Icon(gtk.Image):
 type=object, getter=None, setter=set_xo_color)
 
 def set_fill_color(self, value):
-
-Parameters
---
-value :
-
-Returns
----
-None
-
-
 if self._buffer.fill_color != value:
 self._buffer.fill_color = value
 self.queue_draw()
 
 def get_fill_color(self):
-
-Parameters
---
-None
-
-Returns
----
-fill_color :
-
-
 return self._buffer.fill_color
 
 fill_color = gobject.property(
 type=object, getter=get_fill_color, setter=set_fill_color)
 
 def set_stroke_color(self, value):
-
-Parameters
---
-value :
-
-Returns
----
-None
-
-
 if self._buffer.stroke_color != value:
 self._buffer.stroke_color = value
 self.queue_draw()
 
 def get_stroke_color(self):
-
-Parameters
---
-None
-
-Returns
----
-stroke_color :
-
-
 return self._buffer.stroke_color
 
 stroke_color = gobject.property(
 type=object, getter=get_stroke_color, setter=set_stroke_color)
 
 def set_badge_name(self, value):
-
-Parameters
---
-value:
-
-Returns
----
-None
-
-
 if self._buffer.badge_name != value:
 self._buffer.badge_name = value
 self.queue_resize()
@@ -553,272 +473,144 @@ class Icon(gtk.Image):
 type=float, setter=set_scale)
 
 
-class CanvasIcon(hippo.CanvasBox, hippo.CanvasItem):
+class EventIcon(gtk.EventBox):
 
-__gtype_name__ = 'CanvasIcon'
+__gtype_name__ = 'SugarEventIcon'
+__gsignals__ = {
+'activated': (gobject.SIGNAL_RUN_LAST

[Sugar-devel] [PATCH sugar-toolkit-gtk3 (shell-port)] The icon consists of an GtkEventBox and an IconBuffer. The GtkEventBox is a subclass of GtkBin which has its own window and therefor is used to ca

2012-06-22 Thread Simon Schampijer
The EventIcon does emit the 'activated' signal when clicked
and uses the CursorInvoker to invoke a palette the same
way as the CanvasIcon did.

We keep the same API as with the CanvasIcon, only the 'size'
property is changed to be called 'pixel_size' in order to
make clearer which values it expects to be passed. We don't
expect a GtkIconSize to be passed here.

Another option would have been to put a SugarIcon inside a
a GtkEventBox and make the properties available through an
icon property but the API would have not been as nice and
logically it seems to make more sense to have the IconBuffer
being the base for both the SugarIcon and the SugarEventIcon.

This patch has ben developed based on the one that is
proposed for the toolkit-gtk2.

Signed-off-by: Simon Schampijer si...@laptop.org
---
 src/sugar3/graphics/icon.py |  171 ++-
 1 file changed, 152 insertions(+), 19 deletions(-)

diff --git a/src/sugar3/graphics/icon.py b/src/sugar3/graphics/icon.py
index 9800559..6ed78bd 100644
--- a/src/sugar3/graphics/icon.py
+++ b/src/sugar3/graphics/icon.py
@@ -483,46 +483,179 @@ class EventIcon(Gtk.EventBox):
 cursor-positioned palette invoker.
 
 
-__gtype_name__ = 'EventIcon'
+__gtype_name__ = 'SugarEventIcon'
 __gsignals__ = {
 'activated': (GObject.SIGNAL_RUN_LAST, GObject.TYPE_NONE, []),
 }
 
 def __init__(self, **kwargs):
+self._buffer = _IconBuffer()
+self._alpha = 1.0
+
 Gtk.EventBox.__init__(self)
+for key, value in kwargs.iteritems():
+self.set_property(key, value)
 
 self.set_visible_window(False)
 self.set_above_child(True)
 
-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._palette_invoker.attach(self)
 self.connect('destroy', self.__destroy_cb)
 
+def do_draw(self, cr):
+surface = self._buffer.get_surface()
+if surface:
+allocation = self.get_allocation()
+
+x = (allocation.width - surface.get_width()) / 2
+y = (allocation.height - surface.get_height()) / 2
+
+cr.set_source_surface(surface, x, y)
+if self._alpha == 1.0:
+cr.paint()
+else:
+cr.paint_with_alpha(self._alpha)
+
+def do_get_preferred_height(self):
+surface = self._buffer.get_surface()
+if surface:
+height = surface.get_height()
+elif self._buffer.height:
+height = self._buffer.height
+else:
+height = 0
+return (height, height)
+
+def do_get_preferred_width(self):
+surface = self._buffer.get_surface()
+if surface:
+width = surface.get_width()
+elif self._buffer.width:
+width = self._buffer.width
+else:
+width = 0
+return (width, width)
+
 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 set_file_name(self, value):
+if self._buffer.file_name != value:
+self._buffer.file_name = value
+self.queue_draw()
+
+def get_file_name(self):
+return self._buffer.file_name
 
-def get_icon(self):
-return self._icon
+file_name = GObject.property(
+type=object, getter=get_file_name, setter=set_file_name)
 
-icon = GObject.property(
-type=object, getter=get_icon)
+def set_icon_name(self, value):
+if self._buffer.icon_name != value:
+self._buffer.icon_name = value
+self.queue_draw()
+
+def get_icon_name(self):
+return self._buffer.icon_name
+
+icon_name = GObject.property(
+type=object, getter=get_icon_name, setter=set_icon_name)
+
+def set_xo_color(self, value):
+if self._buffer.xo_color != value:
+self._buffer.xo_color = value
+self.queue_draw()
+
+xo_color = GObject.property(
+type=object, getter=None, setter=set_xo_color)
+
+def set_fill_color(self, value):
+if self._buffer.fill_color != value:
+self._buffer.fill_color = value
+self.queue_draw()
+
+def get_fill_color(self):
+return self._buffer.fill_color
+
+fill_color = GObject.property(
+type=object, getter=get_fill_color, setter=set_fill_color)
+
+def set_stroke_color(self, value):
+if self

[Sugar-devel] [PATCH] Make the child window of the event box insisible

2012-06-21 Thread Simon Schampijer
We do use the EventBox only to receive events, hence the
window that the even box creates should be a GDK_INPUT_ONLY
window, which means that it is invisible and only serves to
receive events [1].

A test program to see this is at [2].

[1] 
http://developer.gnome.org/gtk3/3.4/GtkEventBox.html#gtk-event-box-set-visible-window
[2] dev.laptop.org/~erikos/shell_port/invisible_window.py

Signed-off-by: Simon Schampijer si...@laptop.org
---
 src/sugar3/graphics/icon.py |2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/sugar3/graphics/icon.py b/src/sugar3/graphics/icon.py
index 970446a..d99af7d 100644
--- a/src/sugar3/graphics/icon.py
+++ b/src/sugar3/graphics/icon.py
@@ -561,6 +561,8 @@ class EventIcon(Gtk.EventBox):
 def __init__(self, **kwargs):
 Gtk.EventBox.__init__(self)
 
+self.set_visible_window(False)
+
 self._icon = Icon()
 for key, value in kwargs.iteritems():
 self._icon.set_property(key, value)
-- 
1.7.10.4

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


[Sugar-devel] [PATCH] EventIcon: all the events go directly to the event box

2012-06-21 Thread Simon Schampijer
Position the event box window above the windows of its child, that way
all events inside the event box will go to the event box. If the window is
below, events in windows of child widgets will first got to that widget,
and then to its parents [1].

[1] 
http://developer.gnome.org/gtk3/3.4/GtkEventBox.html#gtk-event-box-set-above-child

Signed-off-by: Simon Schampijer si...@laptop.org
---
 src/sugar3/graphics/icon.py |1 +
 1 file changed, 1 insertion(+)

diff --git a/src/sugar3/graphics/icon.py b/src/sugar3/graphics/icon.py
index d99af7d..175d235 100644
--- a/src/sugar3/graphics/icon.py
+++ b/src/sugar3/graphics/icon.py
@@ -562,6 +562,7 @@ class EventIcon(Gtk.EventBox):
 Gtk.EventBox.__init__(self)
 
 self.set_visible_window(False)
+self.set_above_child(True)
 
 self._icon = Icon()
 for key, value in kwargs.iteritems():
-- 
1.7.10.4

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


[Sugar-devel] [PATCH] EventIcon: Have a default create_palette method

2012-06-21 Thread Simon Schampijer
The create_palette mechanism allows to create
palettes on demand and not for each icon upfront
whether it will be needed or not.

If you hover over an EventIcon and there is no
palette already associated with the Invoker, the Invoker
will call create_palette to see if it can be created
on demand. With this patch the EventIcon will return None
here (see as well CellRendererIcon or ToggleToolButton which
are having the same default behavior).
When subclassing EventIcon the create_palette method can
be overwritten and a Palette returned (see for example
the ActivityIcon in the HomeView).

Without this patch you can see tracebacks when hovering
over the EventIcon because the Invoker tries to call
create_palette.

Signed-off-by: Simon Schampijer si...@laptop.org
---
 src/sugar3/graphics/icon.py |3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/sugar3/graphics/icon.py b/src/sugar3/graphics/icon.py
index 175d235..0c06bbc 100644
--- a/src/sugar3/graphics/icon.py
+++ b/src/sugar3/graphics/icon.py
@@ -594,6 +594,9 @@ class EventIcon(Gtk.EventBox):
 icon = GObject.property(
 type=object, getter=get_icon)
 
+def create_palette(self):
+return None
+
 def get_palette(self):
 return self._palette_invoker.palette
 
-- 
1.7.10.4

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


Re: [Sugar-devel] [PATCH] EventIcon: Have a default create_palette method

2012-06-21 Thread Simon Schampijer

Great, all three patches pushed, thanks a lot for the quick review.

Regards,
   Simon

On 06/21/2012 02:06 PM, Manuel Quiñones wrote:

2012/6/21 Benjamin Berg ben...@sugarlabs.org:

On Thu, 2012-06-21 at 10:52 +0200, Simon Schampijer wrote:

The create_palette mechanism allows to create
palettes on demand and not for each icon upfront
whether it will be needed or not.

If you hover over an EventIcon and there is no
palette already associated with the Invoker, the Invoker
will call create_palette to see if it can be created
on demand. With this patch the EventIcon will return None
here (see as well CellRendererIcon or ToggleToolButton which
are having the same default behavior).
When subclassing EventIcon the create_palette method can
be overwritten and a Palette returned (see for example
the ActivityIcon in the HomeView).

Without this patch you can see tracebacks when hovering
over the EventIcon because the Invoker tries to call
create_palette.


Duck typing at its best. Of course EventIcon needs to implement the
function.


:)

And here the test script from the previous patch is useful again. The
traceback AttributeError: 'EventIcon' object has no attribute
'create_palette' is gone.


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

Reviewed-by: Benjamin Berg ben...@sugarlabs.org

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



___
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] [REMINDER] Development team meeting --- 19. June 2012 (15:00 UTC)

2012-06-19 Thread Simon Schampijer

Hi,

today we will have our weekly development team meeting, the topics will be:

- Introducing new contributors

- Update list of action items

Time: 19. June 2012 (15:00 UTC)
Place: #sugar-meeting (freenode)

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


Re: [Sugar-devel] [REMINDER] Development team meeting --- 19. June 2012 (15:00 UTC)

2012-06-19 Thread Simon Schampijer

On 06/19/2012 03:44 PM, Manuel Kaufmann wrote:

On Tue, Jun 19, 2012 at 10:16 AM, Simon Schampijer si...@schampijer.de wrote:

Time: 19. June 2012 (15:00 UTC)
Place: #sugar-meeting (freenode)


Is this meeting is going to take place all the weeks? (just asking to
add it on my calendar)



Yes, it is on every week.

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


[Sugar-devel] [MINUTES] Development team meeting --- 19. June 2012 (15:00 UTC)

2012-06-19 Thread Simon Schampijer
Minutes: 
http://meeting.sugarlabs.org/sugar-meeting/meetings/2012-06-19T15:04:47.html
Log: 
http://meeting.sugarlabs.org/sugar-meeting/meetings/2012-06-19T15:04:47

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


Re: [Sugar-devel] [MINUTES] Development team meeting --- 19. June 2012 (15:00 UTC)

2012-06-19 Thread Simon Schampijer

On 06/19/2012 07:09 PM, Simon Schampijer wrote:

Minutes:
http://meeting.sugarlabs.org/sugar-meeting/meetings/2012-06-19T15:04:47.html

Log:
http://meeting.sugarlabs.org/sugar-meeting/meetings/2012-06-19T15:04:47


Updated the modules pages accordingly and added Manuel as a maintainer 
for sugar-toolkit-gtk3 and sugar-artwork [1].


Welcome on board, Manuel!

Regards,
   Simon

[1] http://wiki.sugarlabs.org/go/Development_Team/Release/Modules
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Branching Glucose modules

2012-06-17 Thread Simon Schampijer

On 06/16/2012 04:49 AM, Chris Leonard wrote:

On Thu, Jun 14, 2012 at 11:48 AM, Simon Schampijer si...@schampijer.de wrote:

Hi,

I just branched the various Glucose modules. The 'sucrose-0.96' branch will
be used for stable releases and the master branch to continue further
development. Bug fixes will be cherry-picked from the master branches to the
stable branches.

* sugar
* sugar-toolkit-gtk3
* sugar-artwork
* sugar-datastore

The branches for pootle should be created accordingly. Please don't do any
mass pushes to the stable branches for localization anymore. Only if a
translation coordinator feels confident about making their translations
available they should be present on the stable branches.

The following modules have not been branched due to deprecation:

* sugar-toolkit (will be replaced by sugar-toolkit-gtk3 and therefore only
see bugfixes)
* sugar-base (moved inside sugar-toolkit-gtk3)
* sugar-presence-service (has been deprecated for a long time already)


Simon,

sugar-presence-service is not present in Glucose (0.96), AFAICT, and
therefore branching it will not be needed,

I would like to request that you branch sugar-toolkit and sugar-base
creating sucrose-0.96 branches for them.

The reasons for this are as follows:

a) In spite of the fact that developer commits to these branches are
not anticipated due to their EOL status during the 0.97  0.98 release
cycle, it should be recognized that L10n commits to the 0.96 versions
of these modules will continue for some time, possibly even with new
languages being added as 0.96 is going to have a continuing
in-service lifetime of several years, depending on decisions made by
deployments.

b) Should any backports of features ever be considered to these
particular elements of the sucrose-0.96 series, it would be best if
there was an unambiguously named branch (as opposed to an un-versioned
master to which these commits could be made (however unlikely it is
that this will occur).

c) Creating named sucrose-0.96 branches of these modules will allow
me to create the newly branched Glucose 0.96 project in Pootle with
unambiguous commit links (needed at the time of set-up).

I appreciate your consideration of this request.

Regards,

cjl
Sugar Labs Translation Team Coordinator


Thanks for laing out the reasoning. Makes sense and if it helps you I am 
all for that.


Created the branches for sugar-base and sugar-toolkit.

Cheers,
   Simon


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


Re: [Sugar-devel] Sugar module build is broken by translations

2012-06-17 Thread Simon Schampijer

Hi Chris,

On 06/16/2012 10:19 AM, Chris Leonard wrote:

On Fri, Jun 15, 2012 at 10:52 AM, Simon Schampijer si...@schampijer.de wrote:

Chris, can you please have another look.

Thanks,
   Simon who awaits to have a buildbot again soon



Simon,

As unfortunate as it is that you've waited a day or more for a fix,
please allow me to point out that I had attempted raise this issue
proactively on this list over two weeks ago, and got absolutely not
response.


Ok, there might have been some misunderstanding. All the branches are 
now up for your consumption.


I am keen on the buildbot because that gives you a way to verify if 
pushes have been causing build breakage. Daniel's buildbot is what we 
have for now: http://176.58.108.37:8010/waterfall



With Sugar 0.96 released, when to fork Pootle?
http://lists.sugarlabs.org/archive/sugar-devel/2012-June/037775.html

Admittedly I mistakenly used the word fork when I should have said
branch, but my meaning should have been clear from context.

Please create the sucrose-0.96 branches for sugar-base and
sugar-toolkit as requested in my previous message so I can properly
and unambiguously branch in Pootle,  which will give me more latitude
to attempt fixes without risking unrecoverable loss of work by the
localization community.

In addition, I have had not yet gotten any feedback on whether the
trimming of the obsoleted strings had any impact on the issues
encountered with the aym or id PO files during the build process.
That would be very useful information to have, even if the km issue is
not exactly the same.


The aym and id files did build fine now. The km one is still broken. If 
that is the information you were asking for.



I sincerely appreciate the work you've done and continue to do as
release manager and understand all-too-well the frustration that can
result from waiting for someone else to do their part of a large
collaborative process with lots of rapidly moving pieces


I think you misunderstood here. At least I had no attention to sound 
frustrated at you. I just think that the buildbot is a great tool to 
help us deliver the best possible result, that's all. Of course we do 
see some build failures due to translations but I don't want to count 
the failures we had to those fuzzy coders :)


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


[Sugar-devel] [RELEASE] sugar-0.96.3

2012-06-15 Thread Simon Schampijer
== Source ==

http://download.sugarlabs.org/sources/sucrose/glucose/sugar/sugar-0.96.3.tar.bz2

== News ==

* Release 0.96.3 (Simon Schampijer)
* sugar-session: disable Metacity mouse button modifiers, OLPC #11781 (Daniel 
Drake)

Metacity provides mouse button modifier functionality which lets
you drag activity windows around the screen, amongst other things.
This is something we want to disable, similar to how we disable
metacity's key bindings.

In recent metacity releases, Alt is the default mouse button modifier.
We especially want to disable this functionality in this case because
Sugar uses Alt for other things, such as launching a new activity
instance (rather than a journal entry) from the home screen.

This patch depends on the metacity commit 
86fd12cbf06f693405650b9d6f7c6234757cc354
which adds a new 'metacity-message' option to 
enable-mouse-button-modifiers
and to disable-mouse-button-modifiers, in both cases it has to be set to
true. For example, this patch has been added to metacity-2.34.3-2.fc17 in
Fedora. Running Sugar with a metacity version that does not have this patch
does work fine, we exit gracefully and display a warning that the
disable-mouse-button-modifiers message could not be applied.

There are two ways to verify this:
- open the Terminal Activity, hold the alt-key down and try to
  click-drag the window --- dragging the window around should not
  be possible
- hold the alt key down and start an Activity from the home
  screen --- a new instance should be created rather than resuming
  an old one
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [PATCH Browse] Revert unintended change while releasing v138, in commit 7b16255c7f71123d17eddb4d2e3e9ea5faff9164

2012-06-15 Thread Simon Schampijer

On 06/15/2012 06:38 PM, Manuel Quiñones wrote:

My repository wasn't clean at the time of the release, sorry.

Signed-off-by: Manuel Quiñones ma...@laptop.org
---
  webactivity.py |   10 +++---
  1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/webactivity.py b/webactivity.py
index bca6b18..2149259 100644
--- a/webactivity.py
+++ b/webactivity.py
@@ -184,13 +184,9 @@ class WebActivity(activity.Activity):

  self._primary_toolbar.connect('go-home', self._go_home_button_cb)

-# self._edit_toolbar_button = ToolbarButton(
-# page=self._edit_toolbar,
-# icon_name='toolbar-edit')
-
-self._edit_toolbar_button = ToolbarButton()
-self._edit_toolbar_button.set_page(self._edit_toolbar)
-self._edit_toolbar_button.props.icon_name = 'toolbar-edit'
+self._edit_toolbar_button = ToolbarButton(
+page=self._edit_toolbar,
+icon_name='toolbar-edit')

  self._primary_toolbar.toolbar.insert(
  self._edit_toolbar_button, 1)



Ok, please go ahead.

Happens :)
   Simon

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


[Sugar-devel] Branching Glucose modules

2012-06-14 Thread Simon Schampijer

Hi,

I just branched the various Glucose modules. The 'sucrose-0.96' branch 
will be used for stable releases and the master branch to continue 
further development. Bug fixes will be cherry-picked from the master 
branches to the stable branches.


* sugar
* sugar-toolkit-gtk3
* sugar-artwork
* sugar-datastore

The branches for pootle should be created accordingly. Please don't do 
any mass pushes to the stable branches for localization anymore. Only if 
a translation coordinator feels confident about making their 
translations available they should be present on the stable branches.


The following modules have not been branched due to deprecation:

* sugar-toolkit (will be replaced by sugar-toolkit-gtk3 and therefore 
only see bugfixes)

* sugar-base (moved inside sugar-toolkit-gtk3)
* sugar-presence-service (has been deprecated for a long time already)

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


Re: [Sugar-devel] [PATCH] sugar-session: disable Metacity mouse button modifiers (OLPC#11781)

2012-06-14 Thread Simon Schampijer

On 06/07/2012 05:28 PM, Daniel Drake wrote:

Metacity provides mouse button modifier functionality which lets
you drag activity windows around the screen, amongst other things.
This is something we want to disable, similar to how we disable
metacity's key bindings.

In recent metacity releases, Alt is the default mouse button modifier.
We especially want to disable this functionality in this case because
Sugar uses Alt for other things, such as launching a new activity
instance (rather than a journal entry) from the home screen.

Signed-off-by: Daniel Drake d...@laptop.org


Hi Daniel,

thanks for the patch. As far as I understood it depends on a fix in 
metacity in order to work, your patch does log a warning if the 
'metacity-message' option is not available, so no harm in landing it. 
However this should be noted in the commit message.


Cheers,
   Simon

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


Re: [Sugar-devel] [PATCH] sugar-session: disable Metacity mouse button modifiers (OLPC#11781)

2012-06-14 Thread Simon Schampijer

On 06/14/2012 06:21 PM, Peter Robinson wrote:

On Thu, Jun 14, 2012 at 5:10 PM, Simon Schampijer si...@schampijer.de wrote:

On 06/07/2012 05:28 PM, Daniel Drake wrote:


Metacity provides mouse button modifier functionality which lets
you drag activity windows around the screen, amongst other things.
This is something we want to disable, similar to how we disable
metacity's key bindings.

In recent metacity releases, Alt is the default mouse button modifier.
We especially want to disable this functionality in this case because
Sugar uses Alt for other things, such as launching a new activity
instance (rather than a journal entry) from the home screen.

Signed-off-by: Daniel Drake d...@laptop.org



Hi Daniel,

thanks for the patch. As far as I understood it depends on a fix in metacity
in order to work, your patch does log a warning if the 'metacity-message'
option is not available, so no harm in landing it. However this should be
noted in the commit message.


Patched metacity is incoming shortly.

Peter



Great, thanks Peter! I can test then as well the this should be fixed 
now case, so far I only tested the new 'metacity-message' command not 
available one successfully.


Regards,
   Simon



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


Re: [Sugar-devel] [IAEP] Sugar as a Mac Ap?

2012-06-13 Thread Simon Schampijer
The question is what you refer to when you talk about Sugar. The concept of an 
app is similar to the concept of an Activity in Sugar. If you want to bring 
educational material to the ipad you have to look at specific Apps like 'Move 
the turtle' which is similar to Turtle Art. 'garageband' is another one 
interesting for older kids. 

Regards,
Simon



Am 13.06.2012 um 07:50 schrieb Steven Thompson steven_sen...@yahoo.com:

 Even just in English in Japan could help kids. The common denomenator for jhs 
 and hs kids is an iPhone or android and the iPad at home...much more so than 
 buying an Intel Classmate or having a hope of getting an XO. 
 
 It's not about price or energy requirements here, its about good education 
 for kids. 
 
 Can we get sugar as a Mac Ap at the Ap Store?
 
 From: Chris Leonard cjlhomeaddr...@gmail.com; 
 To: Steven Thompson steven_sen...@yahoo.com; 
 Cc: Walter Bender walter.ben...@gmail.com; 
 community-n...@lists.sugarlabs.org; i...@lists.sugarlabs.org; 
 sugar-devel@lists.sugarlabs.org; 
 Subject: Re: [IAEP] Sugar as a Mac Ap? 
 Sent: Wed, Jun 13, 2012 1:10:09 AM 
 
 
 
 On Tue, Jun 12, 2012 at 9:05 PM, Steven Thompson steven_sen...@yahoo.com 
 wrote:
 Thank you all in this community for your creative dedication. 
 
 I am considering using sugar for my 4 year old daughter and her friends. 
 Parents have access to iPads. We are in Osaka Japan. 
 
 Can Sugar be used on an iPad? 
 
 If not does anyone have any suggestions for getting a group if Japanese kids 
 involved? The benefit of the tablet us that very strong cases can be easily 
 purchased for kid use. Why buy an Intel Classmate when we already have iPads 
 lying around! 
 
 All suggestions welcome, 
 Steven
 
 
 
 Dear Steven,
  
 One of the first things that is needed is more complete Japanese localization.
 
 http://translate.sugarlabs.org/ja/ 
 
 cjl
 Sugar Labs Translation Team Coordinator
 
 ___
 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] [PATCH sugar-jhbuild] Remove obsolete fix_manifest call when building activities

2012-06-13 Thread Simon Schampijer
The fix_manifest command is obsolete.

Signed-off-by: Simon Schampijer si...@laptop.org
---
 sjhbuild/bundlemodule.py |4 
 1 file changed, 4 deletions(-)

diff --git a/sjhbuild/bundlemodule.py b/sjhbuild/bundlemodule.py
index 05b24e3..e7f7e1d 100644
--- a/sjhbuild/bundlemodule.py
+++ b/sjhbuild/bundlemodule.py
@@ -18,10 +18,6 @@ class BundleModule(distutils.DistutilsModule):
 srcdir = self.get_srcdir(buildscript)
 builddir = self.get_builddir(buildscript)
 python = os.environ.get('PYTHON', 'python')
-cmd = [python, 'setup.py', 'fix_manifest']
-if srcdir != builddir:
-cmd.extend(['--build-base', builddir])
-buildscript.execute(cmd, cwd = srcdir, extra_env = self.extra_env)
 
 cmd = [python, 'setup.py', 'build']
 if srcdir != builddir:
-- 
1.7.10.2

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


[Sugar-devel] [PATCH jukebox] setup.py: Remove the bundle name from bundlebuild start method

2012-06-13 Thread Simon Schampijer
bundle_name is deprecated, now comes from activity.info

Signed-off-by: Simon Schampijer si...@laptop.org
---
 setup.py |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/setup.py b/setup.py
index 318c786..d3ab3a3 100755
--- a/setup.py
+++ b/setup.py
@@ -18,4 +18,4 @@
 
 from sugar.activity import bundlebuilder
 
-bundlebuilder.start('Jukebox')
+bundlebuilder.start()
-- 
1.7.10.2

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


Re: [Sugar-devel] [PATCH Browse] Remove GObject threads - SL #3670

2012-06-13 Thread Simon Schampijer

Great, I think we can remove it indeed. It fixes the non-clean
shutdown of the activity. What would be great here is testing, so we
don't oversee an issue. Running our non-existing browse-smoke-test...:)

Regards,
   Simon

On 06/12/2012 03:19 PM, Manuel Quiñones wrote:

Having GObject threads is provoking segmentation faults.  They were
added previous to the GTK3 port to solve this bug:

http://dev.laptop.org/ticket/5639

which I can't reproduce anymore having threads removed.

Signed-off-by: Manuel Quiñonesma...@laptop.org
---
  webactivity.py |3 ---
  1 file changed, 3 deletions(-)

diff --git a/webactivity.py b/webactivity.py
index d33913f..69ad5ec 100644
--- a/webactivity.py
+++ b/webactivity.py
@@ -21,9 +21,6 @@ from gettext import gettext as _
  from gettext import ngettext
  import os

-from gi.repository import GObject
-GObject.threads_init()
-
  from gi.repository import Gtk
  from gi.repository import Gdk
  from gi.repository import GdkPixbuf


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


Re: [Sugar-devel] Sugar module build is broken by translations

2012-06-13 Thread Simon Schampijer

On 06/13/2012 05:15 PM, Daniel Narvaez wrote:

Hello,

the build on sugar git master has been broken for a few days for me on
Fedora 17.

aym.po:1912: duplicate message definition...
aym.po:1890: ...this is the location of the first definition
aym.po:1956: duplicate message definition...
aym.po:1895: ...this is the location of the first definition
aym.po:1995: duplicate message definition...
aym.po:1899: ...this is the location of the first definition
aym.po:2007: duplicate message definition...
aym.po:1903: ...this is the location of the first definition
aym.po:2012: duplicate message definition...
aym.po:1887: ...this is the location of the first definition
/usr/bin/msgfmt: found 5 fatal errors

A few other po files are broken in the same way.

Reverting the following commits fixes it.

commit 99fea71e63c01caf2fc600d887027dd80af41321
Author: Pootle daemonpoo...@pootle.sugarlabs.org
Date:   Thu Jun 7 17:50:48 2012 +0200

 Commit from Sugar Labs: Translation System by user cjl.: 387 of 387
messages

commit 606fe93cffad48dbe23b943874f8b1d18644c25a
Author: Pootle daemonpoo...@pootle.sugarlabs.org
Date:   Wed Jun 6 21:24:06 2012 -0400

 Push many PO files


Thanks,
Daniel


Thanks Daniel for the heads up. I have already asked Chris to take a look.

Sadly, we break rather often lately after pushes from pootle. There is 
no verification done inside pootle itself :/


Regards,
Simon


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


Re: [Sugar-devel] Sugar module build is broken by translations

2012-06-13 Thread Simon Schampijer

On 06/13/2012 06:50 PM, Daniel Narvaez wrote:

That's bad :( Would reverting the commit break pootle?


I though so. I still hope we get a pootle maintainer soon to help us on 
this end.



If we was using gerrit the commits could be pushed only after buildbot
verified they works :)


Once we have the buildbot using it for verification would be great. I 
think we need a verification in pootle before pushing. It breaks too 
often otherwise. From previous conversations I have heard you were 
interested in that...:)


Cheers,
   Simon


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


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

2012-06-12 Thread Simon Schampijer

Hi,

today we will have our weekly development team meeting, the topics will be:

- Introducing new contributors

- Update list of action items

- Porting of activities (GTK2 + Pygtk --- GTK3 + 
gobject-introspction/pygobject)


- 0.96 release status

- Environments for development: jhbuild on F17, activity development 
with F17+Sugar installed


Time: 12. June 2012 (15:00 UTC)
Place: #sugar-meeting (freenode)

Regards,
   Simon


=
Action items from the 5th of June 2012:

garycmartin to proove that Clock is not broken
manuq follow up on humitos list of non-translated activities
Gonzalo will have a look at #3407 #3388
Manuel will have a look at #3561 to do in the theme
humitos will have a look at the patches at #3605
erikos to review and push #3406
gonzalo look at soas
gonzalo look at soas for development of actviities
erikos posting his fedora-jhbuild patches
erikos working on Fedora 17 jhbuild
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


[Sugar-devel] [PATCH sugar-jhbuild] Update the Fedora dependencies

2012-06-12 Thread Simon Schampijer
telepathy-glib, telepathy-salut, python-telepathy and
telepathy-mission-control can be used from the
system.

Note: 'lsb_release' is called to determine which Fedora
release the user is running, 'redhat-lsb-core' which provides
that tool should maybe be added to the prerequisites to
not fallback on rawhide unintentionally.

Signed-off-by: Simon Schampijer si...@laptop.org
---
 config/sysdeps/50fedora-17.xml |   11 +++
 1 file changed, 11 insertions(+)
 create mode 100644 config/sysdeps/50fedora-17.xml

diff --git a/config/sysdeps/50fedora-17.xml b/config/sysdeps/50fedora-17.xml
new file mode 100644
index 000..e401b8d
--- /dev/null
+++ b/config/sysdeps/50fedora-17.xml
@@ -0,0 +1,11 @@
+?xml version=1.0?
+dependencies
+  package name=metacity source=metacity/
+  package name=pylint source=pylint/
+  package name=python-xklavier source=python-xklavier/
+  package name=telepathy-gabble source=telepathy-gabble/
+  package name=telepathy-glib source=telepathy-glib/
+  package name=telepathy-salut source=telepathy-salut/
+  package name=python-telepathy source=telepathy-python/
+  package name=telepathy-mission-control 
source=telepathy-mission-control/
+/dependencies
-- 
1.7.10.2

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


[Sugar-devel] [MINUTES] Development team meeting --- 12. June 2012 (15:00 UTC)

2012-06-12 Thread Simon Schampijer

http://meeting.sugarlabs.org/sugar-meeting/meetings/2012-06-12

http://meeting.sugarlabs.org/sugar-meeting/meetings/2012-06-12T14:47:04.html

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


Re: [Sugar-devel] [PATCH sugar] Create a default unencrypted keyring, OLPC #10290

2012-06-11 Thread Simon Schampijer
Follow-up: Upstream seem to work on the possibility to use the XDG dirs, 
so one can specify an alternative path.


https://bugzilla.gnome.org/show_bug.cgi?id=613644

Thanks to Marco for pointing that out,
   Simon

On 04/16/2012 12:33 PM, Simon Schampijer wrote:

This patch does create an ununcrypted default keyring
if there is not one available already. This will stop
prompts for unlocking the keyring after logging into
Sugar.

In GNOME the session manager deals with creating
that keyring. In the OLPC images we do create a default
keyring on image creation time (see olpc-configure), same
is true for Soas. This patch does check/create the
keyring on every Sugar run. The advantage is that
for example installs the live image to a disk install
using liveinst, or install Sugar from the Fedora installer
without installing or ever running GNOME that workaround
will work for them as well.

Signed-off-by: Peter Robinsonpbrobin...@fedoraproject.org
Signed-off-by: Simon Schampijersi...@laptop.org
---
  bin/sugar.in |   20 
  1 files changed, 20 insertions(+), 0 deletions(-)

diff --git a/bin/sugar.in b/bin/sugar.in
index 12098db..df27143 100644
--- a/bin/sugar.in
+++ b/bin/sugar.in
@@ -62,6 +62,26 @@ export LANGUAGE=${LANGUAGE:-${LANG}}
  # Set Sugar's telepathy accounts directory
  export MC_ACCOUNT_DIR=$HOME/.sugar/$SUGAR_PROFILE/accounts

+# Check if the keyring exists and create a default
+# unencrypted keyring (OLPC #10290)
+keyring_path=$HOME/.gnome2/keyrings
+if [ ! -e $keyring_path/login.keyring ]
+[ ! -e $keyring_path/default.keyring ]; then
+mkdir -p $keyring_path
+echo 'default'  $keyring_path/default
+TIME=$(/bin/date +%s)
+cat  $keyring_path/default.keyring.tmpEOF
+[keyring]
+display-name=default
+ctime=$TIME
+mtime=$TIME
+lock-on-idle=false
+lock-timeout=0
+EOF
+
+mv $keyring_path/default.keyring{.tmp,}
+fi
+
  # Workaround until gnome-keyring-daemon lets dbus activate it
  # https://bugzilla.gnome.org/show_bug.cgi?id=628302
  if test $SUGAR_EMULATOR = yes -a $(type gnome-keyring-daemon); then


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


[Sugar-devel] [PATCH sugar-toolkit-gtk3] Replacing set_data/get_data with a python attribute

2012-06-06 Thread Simon Schampijer
set_data/get_data not available anymore is not available anymore [1]. The
recommended approach is using a python attribute, which we do.

Changing to use the attribute in the activity class slipped by mistake
into 6330204e919a047c0b0f3579da36197630e8e400.

[1] https://bugzilla.gnome.org/show_bug.cgi?id=641944

Signed-off-by: Simon Schampijer si...@laptop.org
---
 src/sugar3/graphics/colorbutton.py   |4 ++--
 src/sugar3/graphics/menuitem.py  |4 ++--
 src/sugar3/graphics/palettewindow.py |4 ++--
 src/sugar3/graphics/toolbutton.py|5 ++---
 4 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/src/sugar3/graphics/colorbutton.py 
b/src/sugar3/graphics/colorbutton.py
index 9f490bb..c21da47 100644
--- a/src/sugar3/graphics/colorbutton.py
+++ b/src/sugar3/graphics/colorbutton.py
@@ -396,11 +396,11 @@ def _add_accelerator(tool_button):
 
 # TODO: should we remove the accelerator from the prev top level?
 
-accel_group = tool_button.get_toplevel().get_data('sugar-accel-group')
-if not accel_group:
+if not hasattr(tool_button.get_toplevel(), 'sugar_accel_group'):
 logging.warning('No Gtk.AccelGroup in the top level window.')
 return
 
+accel_group = tool_button.get_toplevel().sugar_accel_group
 keyval, mask = Gtk.accelerator_parse(tool_button.props.accelerator)
 # the accelerator needs to be set at the child, so the Gtk.AccelLabel
 # in the palette can pick it up.
diff --git a/src/sugar3/graphics/menuitem.py b/src/sugar3/graphics/menuitem.py
index 0844e9a..717f7e2 100644
--- a/src/sugar3/graphics/menuitem.py
+++ b/src/sugar3/graphics/menuitem.py
@@ -75,11 +75,11 @@ class MenuItem(Gtk.ImageMenuItem):
 
 # TODO: should we remove the accelerator from the prev top level?
 
-accel_group = self.get_toplevel().get_data('sugar-accel-group')
-if not accel_group:
+if not hasattr(self.get_toplevel(), 'sugar_accel_group'):
 logging.warning('No Gtk.AccelGroup in the top level window.')
 return
 
+accel_group = self.get_toplevel().sugar_accel_group
 keyval, mask = Gtk.accelerator_parse(self._accelerator)
 self.add_accelerator('activate', accel_group, keyval, mask,
  Gtk.AccelFlags.LOCKED | Gtk.AccelFlags.VISIBLE)
diff --git a/src/sugar3/graphics/palettewindow.py 
b/src/sugar3/graphics/palettewindow.py
index 449f550..c3431b7 100644
--- a/src/sugar3/graphics/palettewindow.py
+++ b/src/sugar3/graphics/palettewindow.py
@@ -80,7 +80,7 @@ class _PaletteMenuWidget(Gtk.Menu):
 Gtk.Menu.__init__(self)
 
 accel_group = Gtk.AccelGroup()
-self.set_data('sugar-accel-group', accel_group)
+self.sugar_accel_group = accel_group
 self.get_toplevel().add_accel_group(accel_group)
 
 self._popup_position = (0, 0)
@@ -248,7 +248,7 @@ class _PaletteWindowWidget(Gtk.Window):
 self.set_position(Gtk.WindowPosition.NONE)
 
 accel_group = Gtk.AccelGroup()
-self.set_data('sugar-accel-group', accel_group)
+self.sugar_accel_group = accel_group
 self.add_accel_group(accel_group)
 
 self._old_alloc = None
diff --git a/src/sugar3/graphics/toolbutton.py 
b/src/sugar3/graphics/toolbutton.py
index 1df7d4c..da02212 100644
--- a/src/sugar3/graphics/toolbutton.py
+++ b/src/sugar3/graphics/toolbutton.py
@@ -35,12 +35,11 @@ def _add_accelerator(tool_button):
 return
 
 # TODO: should we remove the accelerator from the prev top level?
-
-accel_group = tool_button.get_toplevel().get_data('sugar-accel-group')
-if not accel_group:
+if not hasattr(tool_button.get_toplevel(), 'sugar_accel_group'):
 logging.warning('No Gtk.AccelGroup in the top level window.')
 return
 
+accel_group = tool_button.get_toplevel().sugar_accel_group
 keyval, mask = Gtk.accelerator_parse(tool_button.props.accelerator)
 # the accelerator needs to be set at the child, so the Gtk.AccelLabel
 # in the palette can pick it up.
-- 
1.7.10.2

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


[Sugar-devel] [PATCH sugar-toolkit-gtk3] Make sure we have a widget before attaching an invoker, SL #3460

2012-06-06 Thread Simon Schampijer
The _ToolbarPalette does get passed the invoker on
initialisation. But we do create the PaletteWindowWidget
later. We do attach the invoker to the widget when calling
_setup_widget that is why it was still working without that
patch.

This patch prevents the traceback that we had because of not
having a widget at this point.

Signed-off-by: Simon Schampijer si...@laptop.org
---
 src/sugar3/graphics/palettewindow.py |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/sugar3/graphics/palettewindow.py 
b/src/sugar3/graphics/palettewindow.py
index c3431b7..2c8816c 100644
--- a/src/sugar3/graphics/palettewindow.py
+++ b/src/sugar3/graphics/palettewindow.py
@@ -498,7 +498,8 @@ class PaletteWindow(GObject.GObject):
 self._invoker_hids.remove(hid)
 
 self._invoker = invoker
-self._widget.set_invoker(self._invoker)
+if self._widget is not None:
+self._widget.set_invoker(invoker)
 if invoker is not None:
 self._invoker_hids.append(self._invoker.connect(
 'mouse-enter', self._invoker_mouse_enter_cb))
-- 
1.7.10.2

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


Re: [Sugar-devel] [PATCH sugar-toolkit-gtk3] Make sure we have a widget before attaching an invoker, SL #3460

2012-06-06 Thread Simon Schampijer

On 06/06/2012 02:51 PM, Manuel Quiñones wrote:

Tested-by: Manuel Quiñonesma...@laptop.org


Thanks Manuel for the quick feedback, pushed.

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] Replacing set_data/get_data with a python attribute

2012-06-06 Thread Simon Schampijer

On 06/06/2012 02:05 PM, Manuel Quiñones wrote:

2012/6/6 Simon Schampijersi...@schampijer.de:

set_data/get_data not available anymore is not available anymore [1]. The
recommended approach is using a python attribute, which we do.

Changing to use the attribute in the activity class slipped by mistake
into 6330204e919a047c0b0f3579da36197630e8e400.

[1] https://bugzilla.gnome.org/show_bug.cgi?id=641944


Looks good,


Signed-off-by: Simon Schampijersi...@laptop.org


Tested-by: Manuel Quiñonesma...@laptop.org


Thanks Manuel for the quick feedback, pushed.

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


[Sugar-devel] [RELEASE] sugar-toolkit-gtk3-0.96.4

2012-06-06 Thread Simon Schampijer
== Source ==

http://download.sugarlabs.org/sources/sucrose/glucose/sugar-toolkit-gtk3/sugar-toolkit-gtk3-0.96.4.tar.bz2

== News ==

* Release 0.96.4 (Simon Schampijer)
* Make sure we have a widget before attaching an invoker, SL #3460 (Simon 
Schampijer)
* Replacing set_data/get_data with a python attribute, PyGobject #641944 (Simon 
Schampijer)
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [PATCH sugar-toolkit] Move the translation initialisation to an earlier stage, SL #3654

2012-06-05 Thread Simon Schampijer


Am 05.06.2012 um 07:03 schrieb Manuel Quiñones ma...@laptop.org:

 2012/6/4 Daniel Drake d...@laptop.org:
 On Mon, Jun 4, 2012 at 10:52 AM, Simon Schampijer si...@schampijer.de 
 wrote:
 To not depend on gconf at this stage the shell does set
 an env variable when reading the GConf key. This is handled
 in sugar-activity deployed by the sugar-toolkit-gtk3.
 
 Thanks Simon, these 3 patches look good to me. Unobtrusive way to
 preserve the langpackdir functionality, and solves the issue in
 question.
 
 Tested the patches in the XO with olpc build os12, compile details
 below.  It fixes the issue for me in Physics, but not in Clock (I
 still see all tooltips in English, through I have the XO in Spanish).
 
 Compile details:
 
 I copied patched sugar, sugar-toolkit and sugar-toolkit-gtk.  Then I
 satisfied dependencies:
 
 for sugar: yum install git make gcc intltool pygtk2-devel GConf2-devel
 
 for sugar-toolkit: yum install libICE-devel libSM-devel alsa-lib-devel
 
 for sugar-toolkit-gtk3: yum install gobject-introspection-devel
 librsgv2-devel gtk3-devel
 
 Then I run for each, ./autogen.sh; make; make install
 
 -- 
 .. manuq ..

Thanks for testing Manuel.

In the case of Clock actually the po file is borked. Have a look at es.po for 
example, the strings like 'Nice Clock' are commented at the end of the file, 
uncommenting them and rerunning 'setup.py build' does bring them back for me. 
Except for the string 'Digital Clock' which seem to have not the right context. 

@Daniel, so only Physics is the activity with the early strings we are fixing 
with this patch? Are there any others we should verify?

@Sam, do we have a translation smoke test (could be to at least make sure all 
the activities and the shell are avialble in Spanish) Or a matrix that shows 
shell+activity translations per language so that we detect breakage?

Cheers,
   Simon

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


Re: [Sugar-devel] [PATCH sugar-toolkit] Move the translation initialisation to an earlier stage, SL #3654

2012-06-05 Thread Simon Schampijer

On 06/05/2012 08:06 AM, Simon Schampijer wrote:



Am 05.06.2012 um 07:03 schrieb Manuel Quiñonesma...@laptop.org:


2012/6/4 Daniel Draked...@laptop.org:

On Mon, Jun 4, 2012 at 10:52 AM, Simon Schampijersi...@schampijer.de  wrote:

To not depend on gconf at this stage the shell does set
an env variable when reading the GConf key. This is handled
in sugar-activity deployed by the sugar-toolkit-gtk3.


Thanks Simon, these 3 patches look good to me. Unobtrusive way to
preserve the langpackdir functionality, and solves the issue in
question.


Tested the patches in the XO with olpc build os12, compile details
below.  It fixes the issue for me in Physics, but not in Clock (I
still see all tooltips in English, through I have the XO in Spanish).

Compile details:

I copied patched sugar, sugar-toolkit and sugar-toolkit-gtk.  Then I
satisfied dependencies:

for sugar: yum install git make gcc intltool pygtk2-devel GConf2-devel

for sugar-toolkit: yum install libICE-devel libSM-devel alsa-lib-devel

for sugar-toolkit-gtk3: yum install gobject-introspection-devel
librsgv2-devel gtk3-devel

Then I run for each, ./autogen.sh; make; make install

--
.. manuq ..


Thanks for testing Manuel.

In the case of Clock actually the po file is borked. Have a look at es.po for 
example, the strings like 'Nice Clock' are commented at the end of the file, 
uncommenting them and rerunning 'setup.py build' does bring them back for me. 
Except for the string 'Digital Clock' which seem to have not the right context.


Btw, I was not seeing this before as I was running the previous Clock 
version. So the issue has been introduced with the latest version.


cc'ing Chris and Gary who might know where it broke and how to resolve it.

Cheers,
   Simon


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


Re: [Sugar-devel] [PATCH sugar-toolkit] Move the translation initialisation to an earlier stage, SL #3654

2012-06-05 Thread Simon Schampijer

On 06/05/2012 08:21 AM, Simon Schampijer wrote:

On 06/05/2012 08:06 AM, Simon Schampijer wrote:



Am 05.06.2012 um 07:03 schrieb Manuel Quiñonesma...@laptop.org:


2012/6/4 Daniel Draked...@laptop.org:

On Mon, Jun 4, 2012 at 10:52 AM, Simon
Schampijersi...@schampijer.de wrote:

To not depend on gconf at this stage the shell does set
an env variable when reading the GConf key. This is handled
in sugar-activity deployed by the sugar-toolkit-gtk3.


Thanks Simon, these 3 patches look good to me. Unobtrusive way to
preserve the langpackdir functionality, and solves the issue in
question.


Tested the patches in the XO with olpc build os12, compile details
below. It fixes the issue for me in Physics, but not in Clock (I
still see all tooltips in English, through I have the XO in Spanish).

Compile details:

I copied patched sugar, sugar-toolkit and sugar-toolkit-gtk. Then I
satisfied dependencies:

for sugar: yum install git make gcc intltool pygtk2-devel GConf2-devel

for sugar-toolkit: yum install libICE-devel libSM-devel alsa-lib-devel

for sugar-toolkit-gtk3: yum install gobject-introspection-devel
librsgv2-devel gtk3-devel

Then I run for each, ./autogen.sh; make; make install

--
.. manuq ..


Thanks for testing Manuel.

In the case of Clock actually the po file is borked. Have a look at
es.po for example, the strings like 'Nice Clock' are commented at the
end of the file, uncommenting them and rerunning 'setup.py build' does
bring them back for me. Except for the string 'Digital Clock' which
seem to have not the right context.


Btw, I was not seeing this before as I was running the previous Clock
version. So the issue has been introduced with the latest version.

cc'ing Chris and Gary who might know where it broke and how to resolve it.

Cheers,
Simon


That looks suspicious: http://bugs.sugarlabs.org/ticket/3453#comment:9

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


Re: [Sugar-devel] [PATCH sugar] Set the SUGAR_LANGPACKDIR env variable when reading the GConf key, part of SL #3654

2012-06-05 Thread Simon Schampijer

On 06/05/2012 01:19 PM, Sascha Silbe wrote:

Simon Schampijersi...@schampijer.de  writes:



We can not mix static and dynamic gconf bindings in one process,
|
export path as env variable so it can be read by sugar-activity
when launching the activity.


This patch series would have been easier to review if it had been a
single thread (with a cover letter explaining the overall design)
instead of three patches in separate threads with nothing obvious to
relate them to each other. Arranging patches from different repositories
to appear as a patch series in a single thread requires some minor
manual fiddling (adding the numbering to the subject prefix, passing the
Message-ID of the cover letter via --in-reply-to), but IMO nothing I
couldn't sensibly expect from a core contributor.

What I'm especially missing is explanations of what the problem is that
the patches are going to solve, how they attempt to solve it and why
this particular approach was chosen.


[bin/sugar-session]

+# can not mix static and dynamic gconf bindings in one process,
+# export path as env variable, SL #3654
+langpackdir = client.get_string('/desktop/sugar/i18n/langpackdir')
+if langpackdir is not None and langpackdir:
+os.environ['SUGAR_LANGPACKDIR'] = langpackdir


I don't really like adding code to sugar (the Shell) to work around a
shortcoming in the Python-based Activity Framework
(i.e. sugar-toolkit). You're modifying API for all Activities. That most
Activities are Python-based so far (with several notable exceptions, see
e.g. Scratch and Etoys) doesn't really make it any better from a
software architecture point of view, only in terms of the number of
developers affected.

Language packs are only really useful if they're picked up by _all_
applications. No non-Sugar applications and few non-Python Activities
are going to implement this language pack hack (be it the existing
/desktop/sugar/i18n/langpackdir gconf entry or the new SUGAR_LANGPACKDIR
environment variable). The right thing to do back when this feature was
introduced would have been to approach it at the gettext layer, as the
proof-of-concept code [1] by cscott already did. I can only assume that
hacking Sugar was deemed easier by the people implementing the feature
and since shipping Gnome on XO-1 isn't really practical, the limited
scope (only Activities) was considered acceptable. However, today the
situation is different. XO-1 is starting to reach its end-of-life and
AFAICT most deployments ship Gnome as part of their XO-1.5+ builds.

Combined with the apparent lack of use of this feature in the field
(please contradict me if you have evidence of it being used somewhere),
I'd rather remove it than to introduce hacks to keep it working for a
subset of applications.


It was API that was present and I can not say for sure it has not been 
used at all. Me and Daniel discussed this quite a bit and for a released 
version we wanted to do a bugfix only. If agreement can be found we can 
remove it next release.


Simon




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


Re: [Sugar-devel] [REMINDER] Development team meeting --- 05. June 2012 (15:00 UTC)

2012-06-05 Thread Simon Schampijer

On 06/05/2012 12:10 AM, Simon Schampijer wrote:

Oups, it should have been the Tuesday the 5th!

On 06/04/2012 06:08 PM, Simon Schampijer wrote:

Hi,

tomorrow we will have our weekly development team meeting after a few
weeks of absence, the topics will be:

- introducing new contributors

- celebrating 0.96 release, what is left to do?, where we do need help?

- environments for development: jhbuild on F17, activity development
with F17+Sugar installed


I have been talking a bit with Gonzalo about this, and there are
actually 5 areas we identified where we can improve:

- developing an Activity on non XO platforms: I think having a nice
guide how to do it in Fedora 17 with the sugar system installation would
already be a big win


I had a go at it:

http://wiki.sugarlabs.org/go/Activity_Team/Activity_Development_Fedora17

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


Re: [Sugar-devel] [SoaS] Etoys translations

2012-06-05 Thread Simon Schampijer

On 06/01/2012 05:24 PM, Bert Freudenberg wrote:

On 28.05.2012, at 21:48, Bert Freudenberg wrote:


On 28.05.2012, at 20:29, Peter Robinson wrote:


As mentioned previously look at the other Activities, like TurtleArt,
it works like the rest of the distro translation stuff, I'm not sure
if there's other sugar bits that assist with that.


Other activities have only a single mo file. Other activities use the gettext 
library so they do not have to worry about where the files are.

Etoys has multiple mo files. Etoys does not use gettext, so it needs to know 
where to find the translation files.


I would add that other activities only have translated LC_MESSAGES. Etoys also 
has translated QuickGuides, see its current locale directory.


It's precisely about those differences I'm asking you for clarification. See my 
previous message.

Until now, Etoys just did its own thing, and that worked fine. But there must 
be a good reason why you want the mo files in the system default directory. 
(What is that reason, btw?) So I'm trying to find a way to make it happen. If I 
know what the constraints are, we surely can find a way to make it fit.

- Bert -



So, what are the constraints?

- Bert -


Hi Bert,

so looks like the main issue about translations is installing the .mo 
files on a non standard place in a non standard way.


A few questions around the topic:

- can the mo files be in one file?
- if not, can they be renamed with a prefix like you suggested?
- as far as I understood you don't use gettext, I presume that is out of 
question, right?


I am sure we can sort this out in one way or another to make Peter's 
life easier.


Thanks,
   Simon

PS: I am sending you good energy to finally do the move handle presence 
inside Etoys, so we can kill the PS. I know you are on your own in Etoys 
land atm...but you are skilled :)





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


[Sugar-devel] [MINUTES] Development team meeting --- 05. June 2012 (15:00 UTC)

2012-06-05 Thread Simon Schampijer
Minutes: 
http://meeting.sugarlabs.org/sugar-meeting/meetings/2012-06-05T15:05:10.html


Log: 
http://meeting.sugarlabs.org/sugar-meeting/meetings/2012-06-05T15:05:10


Action items

garycmartin to proove that Clock is not broken
manuq follow up on humitos list of non-translated activities
Gonzalo will have a look at #3407 #3388
Manuel will have a look at #3561 to do in the theme
humitos will have a look at the patches at #3605
erikos to review and push #3406
gonzalo look at soas
gonzalo look at soas for development of actviities
erikos posting his fedora-jhbuild patches
erikos working on Fedora 17 jhbuild


People present (lines said)

erikos (208)
humitos (67)
manuq (56)
gonzalo_ (49)
silbe (45)
garycmartin (39)
dirakx (11)
jakeP (10)
pbrobinson (8)
bernie (7)
m_anish (6)
bertf (5)
cjb (2)
meeting (2)
alsroot (2)

Thanks for everyone who made this a productive meeting,
   Simon
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


[Sugar-devel] [PATCH sugar-toolkit-gtk3] Move the translation initialisation to an earlier stage, SL #3654

2012-06-05 Thread Simon Schampijer
Must be done early, some activities set translations globally. Remove
the support for the langpackdir.

Signed-off-by: Simon Schampijer si...@laptop.org
---
 bin/sugar-activity  |8 
 src/sugar3/activity/activity.py |6 --
 src/sugar3/activity/i18n.py |7 ---
 3 files changed, 8 insertions(+), 13 deletions(-)

diff --git a/bin/sugar-activity b/bin/sugar-activity
index 51ba6bf..5aef1ae 100644
--- a/bin/sugar-activity
+++ b/bin/sugar-activity
@@ -26,6 +26,8 @@ import dbus.service
 import dbus.glib
 
 from sugar3.activity import activityhandle
+from sugar3.activity import i18n
+import sugar3
 from sugar3.bundle.activitybundle import ActivityBundle
 from sugar3 import logger
 
@@ -97,6 +99,12 @@ def main():
 os.environ['SUGAR_BUNDLE_NAME'] = bundle.get_name()
 os.environ['SUGAR_BUNDLE_VERSION'] = str(bundle.get_activity_version())
 
+# must be done early, some activities set translations globally, SL #3654
+locale_path = i18n.get_locale_path(bundle.get_bundle_id())
+gettext.bindtextdomain(bundle.get_bundle_id(), locale_path)
+gettext.bindtextdomain('sugar-toolkit', sugar3.locale_path)
+gettext.textdomain(bundle.get_bundle_id())
+
 splitted_module = args[0].rsplit('.', 1)
 module_name = splitted_module[0]
 class_name = splitted_module[1]
diff --git a/src/sugar3/activity/activity.py b/src/sugar3/activity/activity.py
index 4dea554..711b247 100644
--- a/src/sugar3/activity/activity.py
+++ b/src/sugar3/activity/activity.py
@@ -259,12 +259,6 @@ class Activity(Window, Gtk.Container):
 
 
 # Stuff that needs to be done early
-
-locale_path = i18n.get_locale_path(self.get_bundle_id())
-gettext.bindtextdomain(self.get_bundle_id(), locale_path)
-gettext.bindtextdomain('sugar-toolkit', sugar3.locale_path)
-gettext.textdomain(self.get_bundle_id())
-
 icons_path = os.path.join(get_bundle_path(), 'icons')
 Gtk.IconTheme.get_default().append_search_path(icons_path)
 
diff --git a/src/sugar3/activity/i18n.py b/src/sugar3/activity/i18n.py
index 92acb96..8b8e663 100644
--- a/src/sugar3/activity/i18n.py
+++ b/src/sugar3/activity/i18n.py
@@ -17,8 +17,6 @@
 # Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
-from gi.repository import GConf
-
 from gettext import gettext
 import locale
 import os
@@ -135,11 +133,6 @@ def get_locale_path(bundle_id):
 if 'SUGAR_LOCALEDIR' in os.environ:
 candidate_dirs[os.environ['SUGAR_LOCALEDIR']] = 2
 
-gconf_client = GConf.Client.get_default()
-package_dir = gconf_client.get_string('/desktop/sugar/i18n/langpackdir')
-if package_dir is not None and package_dir is not '':
-candidate_dirs[package_dir] = 1
-
 candidate_dirs[os.path.join(sys.prefix, 'share', 'locale')] = 0
 
 for candidate_dir in candidate_dirs.keys():
-- 
1.7.10.2

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


[Sugar-devel] [PATCH sugar-toolkit] Move the translation initialisation to an earlier stage, SL #3654

2012-06-05 Thread Simon Schampijer
Remove the support for the langpackdir.

Signed-off-by: Simon Schampijer si...@laptop.org
---
 src/sugar/activity/activity.py |6 --
 src/sugar/activity/i18n.py |7 ---
 2 files changed, 13 deletions(-)

diff --git a/src/sugar/activity/activity.py b/src/sugar/activity/activity.py
index 34e9729..affe9c9 100644
--- a/src/sugar/activity/activity.py
+++ b/src/sugar/activity/activity.py
@@ -261,12 +261,6 @@ class Activity(Window, gtk.Container):
 
 
 # Stuff that needs to be done early
-
-locale_path = i18n.get_locale_path(self.get_bundle_id())
-gettext.bindtextdomain(self.get_bundle_id(), locale_path)
-gettext.bindtextdomain('sugar-toolkit', sugar.locale_path)
-gettext.textdomain(self.get_bundle_id())
-
 icons_path = os.path.join(get_bundle_path(), 'icons')
 gtk.icon_theme_get_default().append_search_path(icons_path)
 
diff --git a/src/sugar/activity/i18n.py b/src/sugar/activity/i18n.py
index 1ddbd79..8b8e663 100644
--- a/src/sugar/activity/i18n.py
+++ b/src/sugar/activity/i18n.py
@@ -17,8 +17,6 @@
 # Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
-import gconf
-
 from gettext import gettext
 import locale
 import os
@@ -135,11 +133,6 @@ def get_locale_path(bundle_id):
 if 'SUGAR_LOCALEDIR' in os.environ:
 candidate_dirs[os.environ['SUGAR_LOCALEDIR']] = 2
 
-gconf_client = gconf.client_get_default()
-package_dir = gconf_client.get_string('/desktop/sugar/i18n/langpackdir')
-if package_dir is not None and package_dir is not '':
-candidate_dirs[package_dir] = 1
-
 candidate_dirs[os.path.join(sys.prefix, 'share', 'locale')] = 0
 
 for candidate_dir in candidate_dirs.keys():
-- 
1.7.10.2

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


[Sugar-devel] [PATCH sugar] Remove the support for the langpackdir, SL #3654

2012-06-05 Thread Simon Schampijer
Signed-off-by: Simon Schampijer si...@laptop.org
---
 data/sugar.schemas.in |   12 
 1 file changed, 12 deletions(-)

diff --git a/data/sugar.schemas.in b/data/sugar.schemas.in
index 763aa38..579d24b 100644
--- a/data/sugar.schemas.in
+++ b/data/sugar.schemas.in
@@ -262,18 +262,6 @@
 /schema
 
 schema
-  key/schemas/desktop/sugar/i18n/langpackdir/key
-  applyto/desktop/sugar/i18n/langpackdir/applyto
-  ownersugar/owner
-  typestring/type
-  default/default
-  locale name=C
-shortDirectory to search for translations/short
-longAdditional directories which can contain updated 
translations./long
-  /locale
-/schema
-
-schema
   key/schemas/desktop/sugar/network/gsm/username/key
   applyto/desktop/sugar/network/gsm/username/applyto
   ownersugar/owner
-- 
1.7.10.2

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


[Sugar-devel] [RELEASE] sugar-toolkit-0.96.3

2012-06-05 Thread Simon Schampijer
== Source ==

http://download.sugarlabs.org/sources/sucrose/glucose/sugar-toolkit/sugar-toolkit-0.96.3.tar.bz2

== News ==

* Release 0.96.3 (Simon Schampijer)
* Move the translation initialisation to an earlier stage, SL #3654 (Simon 
Schampijer)
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


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

2012-06-04 Thread Simon Schampijer

Hi,

tomorrow we will have our weekly development team meeting after a few 
weeks of absence, the topics will be:


- introducing new contributors

- celebrating 0.96 release, what is left to do?, where we do need help?

- environments for development: jhbuild on F17, activity development 
with F17+Sugar installed


Time: 04. June 2012 (15:00 UTC)
Place: #sugar-meeting (freenode)

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


[Sugar-devel] [PATCH sugar] Set the SUGAR_LANGPACKDIR env variable when reading the GConf key, part of SL #3654

2012-06-04 Thread Simon Schampijer
We can not mix static and dynamic gconf bindings in one process,
|
export path as env variable so it can be read by sugar-activity
when launching the activity.

Signed-off-by: Simon Schampijer si...@laptop.org
---
 bin/sugar-session |6 ++
 1 file changed, 6 insertions(+)

diff --git a/bin/sugar-session b/bin/sugar-session
index 40c9db7..40f8905 100755
--- a/bin/sugar-session
+++ b/bin/sugar-session
@@ -239,6 +239,12 @@ def main():
 if timezone is not None and timezone:
 os.environ['TZ'] = timezone
 
+# can not mix static and dynamic gconf bindings in one process,
+# export path as env variable, SL #3654
+langpackdir = client.get_string('/desktop/sugar/i18n/langpackdir')
+if langpackdir is not None and langpackdir:
+os.environ['SUGAR_LANGPACKDIR'] = langpackdir
+
 set_fonts()
 
 # this must be added early, so that it executes and unfreezes the screen
-- 
1.7.10.2

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


[Sugar-devel] [PATCH sugar-toolkit] Move the translation initialisation to an earlier stage, SL #3654

2012-06-04 Thread Simon Schampijer
To not depend on gconf at this stage the shell does set
an env variable when reading the GConf key. This is handled
in sugar-activity deployed by the sugar-toolkit-gtk3.

Signed-off-by: Simon Schampijer si...@laptop.org
---
 src/sugar/activity/activity.py |6 --
 src/sugar/activity/i18n.py |8 ++--
 2 files changed, 2 insertions(+), 12 deletions(-)

diff --git a/src/sugar/activity/activity.py b/src/sugar/activity/activity.py
index 34e9729..affe9c9 100644
--- a/src/sugar/activity/activity.py
+++ b/src/sugar/activity/activity.py
@@ -261,12 +261,6 @@ class Activity(Window, gtk.Container):
 
 
 # Stuff that needs to be done early
-
-locale_path = i18n.get_locale_path(self.get_bundle_id())
-gettext.bindtextdomain(self.get_bundle_id(), locale_path)
-gettext.bindtextdomain('sugar-toolkit', sugar.locale_path)
-gettext.textdomain(self.get_bundle_id())
-
 icons_path = os.path.join(get_bundle_path(), 'icons')
 gtk.icon_theme_get_default().append_search_path(icons_path)
 
diff --git a/src/sugar/activity/i18n.py b/src/sugar/activity/i18n.py
index 1ddbd79..f179992 100644
--- a/src/sugar/activity/i18n.py
+++ b/src/sugar/activity/i18n.py
@@ -17,8 +17,6 @@
 # Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
-import gconf
-
 from gettext import gettext
 import locale
 import os
@@ -135,10 +133,8 @@ def get_locale_path(bundle_id):
 if 'SUGAR_LOCALEDIR' in os.environ:
 candidate_dirs[os.environ['SUGAR_LOCALEDIR']] = 2
 
-gconf_client = gconf.client_get_default()
-package_dir = gconf_client.get_string('/desktop/sugar/i18n/langpackdir')
-if package_dir is not None and package_dir is not '':
-candidate_dirs[package_dir] = 1
+if 'SUGAR_LANGPACKDIR' in os.environ:
+candidate_dirs[os.environ['SUGAR_LANGPACKDIR']] = 1
 
 candidate_dirs[os.path.join(sys.prefix, 'share', 'locale')] = 0
 
-- 
1.7.10.2

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


<    1   2   3   4   5   6   7   8   9   10   >