[sugar] A place to point new developers
Marco Pesenti Gritti
Mon Apr 9 12:24:56 EDT 2007
On Mon, 2007-04-09 at 16:14 +0100, Dafydd Harries wrote:
> I've written a new chat activity based on Telepathy. I've made it as simple as
> possible: when you launch it, it joins the Jabber multi-user chat
> chat at conference.olpc.collabora.co.uk.
> Right now, it's hard-coded to use Gabble (the XMPP backed for Telepathy), but
> it should be pretty easy to make it use Salut (for local network Jabber). If
> you want to run this, you'll need to have the telepathy-gabble binary and its
> .service file installed.
> Git repository is here:
Cool! Can we move this on dev.laptop.org and add it to jhbuild?
> (This is my first time with git, so I'm not sure if I got that right.)
> There's one really annoying bug I couldn't work out: the conversation is
> inside a Gtk scroll area, using a hack I lifted from the journal code. The UI
> structure looks like this:
> - hippo.Canvas
> - hippo.CanvasWidget
> - gtk.ScrolledWindow
> - gtk.Viewport
> - hippo.Canvas (*)
> - hippo.CanvasBox
> - (conversation items)
> - sugar.graphics.entry.Entry
> It seems that the inner hippo.Canvas gets allocated more space than it wants,
> which messes up the vertical adjustment of the ScrolledWindow. It turns out
> that the allocation is always 804 pixels larger than the request, which I'm
> guess is 844 (screen height) - 40 pixels for the Entry. This is annoying
> because I want to scroll the conversation down when somebody says something,
> but it ends up showing a mass of empty space if I scroll to what should be the
> bottom. Hence this gross hack which makes it kinda work:
> adj.set_value(adj.upper - adj.page_size - 804)
> If somebody can shed some light on this, I'd be very happy.
I can have a look at it once it's added to the build.
Btw please do not use raw pixels to specify margin, padding etc. You can
use the sugar/graphics/units.py helpers to do conversion from points. A
little annoying but it ensure stuff looks good both in the emulator and
on the XO.
At some point we want to add support for units to HippoCanvas (and a way
to set the canvas zoom factor) to avoid the extra typing.
More information about the Sugar-devel