Wednesday, February 18, 2009

One more call for help: please upload your activity bundles

Activity maintainers, please upload the latest versions of your activity bundles to http://addons.sugarlabs.org.

Also, note that you can now upload screenshots of your activity, see the "Edit previews" link in the editing options.

Thanks!

Tuesday, February 17, 2009

Call for help: pyabiword in Ubuntu Jaunty

Seems like, unless we make a strong final push, Write and other cool activities that make use of abiword won't run out of the box on the next Ubuntu release. This would mean a significantly less useful Sugar on what may be the widest available Linux distribution.

It would be a real pity because, in addition to the great work that Debian and Ubuntu packagers have already put during the last weeks, we'll have to tell people to use any of the other distributions that will package the whole of Sugar 0.84: Alt Linux, Fedora, Gentoo, Mandriva, openSUSE and Caixa Magica Magalhaes (as per http://sugarlabs.org/go/DevelopmentTeam/Packaging).

We still may have time to change this fate if we manage to convince the Ubuntu developers to accept a patch that will build abiword with the libabiword support we need, and package pyabiword.

So this is a call for people that can help with:
  • modify the abiword package in Ubuntu to produce libabiword.so and the accompanying -devel stuff,

  • package the pyabiword bindings,

  • push this through the Ubuntu processes so it gets into their next release,

  • forward this call for help to other forums.

Who in this community can help with this or knows someone who may be able to help?

Please update the wiki page linked above with the status of your efforts.

Monday, February 2, 2009

desktop specialization

Two recent posts in the GNOME Planet broadened my belief in that Sugar can give something back to the GNOME community.

Stormy's GNOME Mobile: bringing the desktop and the internet together:

While most people outside of GNOME Mobile probably think of cell phones when they think of mobile, GNOME Mobile is really about making the desktop fit the new form factors (phones, netbooks, devices, ...) and making it work well with a non traditional user interface.

J5's 10 thoughts on what is needed for the Linux Desktop to win:

#5 Forget about the general purpose desktop - ok don’t forget about it upstream but when making a product you are going to run into the “this doesn’t work like Windows” syndrome. [...] The general purpose desktop is just too big a target and will always get compared to the current leader.

I think that they pointed out the two most relevant aspects that define how Sugar relates to GNOME Mobile:

- adaptation to new form factors, and

- search for an user experience better suited to a well-defined population group.

And not only because of the very good marketing reasons that J5 mentioned, but mainly because what works for an office worker may not work best for a young learner. So doing things differently is critical to our mission.

I hope that other people will also realize that computers are not only useful in an office context and that we need to adapt to the new times. And hope as well that many will choose GNOME Mobile as a base for their products.

I'm happy to say that the GNOME bits we have been using to date have worked pretty well for us, and more importantly, each release brings more and more goodies that are specially useful in our niche.

I'm going to FOSDEM, the Free and Open Source Software Developers' European Meeting

At the talk I'm going to give this week at FOSDEM, I will point out how GNOME Mobile was useful for us and which are our biggest issues and how we could move forward.

Tuesday, January 27, 2009

Sugar now on Mandriva's cooker

Today I managed to run Mandriva's development stream (cooker) on kvm-qemu and gave a test to the Sugar packages that Aleksey Lim has been working on during the last weeks.

And all I have to say is big kudos to Aleksey. Thanks to him we have Sugar on the path to be well supported in one more major distribution, and one that is working hard to put linux to work on education.

Galeon and learning

Reinout van Schouwen said about Embedding Mozilla...
> Let's build a GTK+ shell around it and call it Galeon! =)

Actually, that's an interesting point. What I talked about is more like a mixture of embedding a browser (Galeon) and messing with the document content in a scripting language (Greasemonkey).

So, nothing new under the sun, but one more way of doing the same that may be more convenient in some occasions.

In Sugar, the single reason why we cooked our own solution is so the user can study the code of our browser and make modifications to it as easily as possible (freedom 3). We don't want the user to just 'use' the software we provide and to calmly wait for the next release, but we want them to 'create' new tools based on what we provide.

If we had kept using gtkmozembed, our browser would have had a bigger proportion of C/C++ code (less easy to study and modify) and would have mixed javascript and python (more effort required to study and modify).

At the end of the day, Sugar is not one more productivity desktop, but a learning platform. And in the same way that each individual learns in his/her own way, they need to be able to suit their learning tools to their learning habits.

Perhaps not everybody that uses Sugar will learn to code, but at least those people that have the inclination to write small amounts of code (spreadsheet macros, for example) will be able to add a button there, transform the document viewed, etc. And then share it with their friends.

Monday, January 26, 2009

Embedding Mozilla

To finish this series on embedding existing GNOME stuff in new apps, this is one of the design mockups of the browser in Sugar:


We are implementing it with Mozilla for now (though would love to have an alternative in WebKit as well, code welcome) and after some time using gtkmozembed, Marco decided that we would be better off with something lighter (read less buggy), with less amount of C code and with easy access to PyXPCOM. Then hulahop was born.

This is the simplest snippet that will bring you an embedded instance of mozilla into your pygtk app:

import os

import gobject
gobject.threads_init()
import gtk

import hulahop
hulahop.startup(os.path.expanduser('~/.hulahop_test_profile'))
from hulahop.webview import WebView

w = gtk.Window()
w.show()

v = WebView()
w.add(v)
v.show()

v.load_uri('http://planet.gnome.org')

gtk.main()


But that isn't anything that gtkmozembed cannot do, so if you add the following snippet just before the call to gtk.main(), you will get something more interesting ;)

import xpcom
from xpcom.components import interfaces

class ProgressListener(object):
_com_interfaces_ = interfaces.nsIWebProgressListener

def onStateChange(self, webProgress, request, stateFlags, status):
if not (stateFlags & interfaces.nsIWebProgressListener.STATE_IS_NETWORK and \
stateFlags & interfaces.nsIWebProgressListener.STATE_STOP):
return

images = v.dom_window.document.documentElement.getElementsByTagName('IMG')
for i in range(images.length):
image = images.item(i)
if image.src.startswith('http://planet.gnome.org/heads'):
image.height *= 3
image.width /= 3

listener = ProgressListener()
wrapped_listener = xpcom.server.WrapObject(listener,
interfaces.nsIWebProgressListener)
v.web_progress.addProgressListener(wrapped_listener,
interfaces.nsIWebProgress.NOTIFY_STATE_ALL)

As you can see, with hulahop you have ready access to most mozilla internals, in the example above we are manipulating the document DOM, but you can also access network stuff, security, user events, etc

Right now, those snippets will work only on Fedora 10 unless you build your own stuff. But as in the abiword case, people are already working on packaging hulahop for all the major distros.

And what about the future? I would love to see more applications to provide their canvases as proper gtk widgets and moving them to libraries. The ones on the top of my list are gnumeric and inkscape, any suggestion?

Tuesday, January 20, 2009

Embedding abiword

After yesterdays bit about how really soon we'll be able to easily embed evince in any gtk app, today is abiword's turn.

This is the UI that Eben designed for the Write activity in Sugar:



And this is one of the quickest ways to embed abiword using python:


from abiword import Canvas
import gtk

w = gtk.Window()
w.show()

c = Canvas()
w.add(c)
c.show()

gtk.main()


If you are curious about what you can do programaticaly with that Canvas instance, just type pydoc abiword.Canvas.

The only distros I know where this snippet should work are Fedora 10 and 11, but there are already some beautiful souls in #sugar who are working to make sure that it will be available in the next releases of Ubuntu, Debian, Mandriva, Gentoo, OpenSUSE and others.

Update: more and better info about PyAbiword here.