Archive for December, 2009

My first (major) GTK+ patch

Monday, December 21st, 2009

Matthias Clasen cleaned up and pushed my first major patch to GTK+ yesterday. It allows the underlines on menus and buttons to be hidden until the alt key is pressed, similar to behaviour seen on recent versions of Windows. It is configurable via GtkSettings and off by default.

I’d like to thank Matthias and Emmanuele Bassi for their help reviewing the patch and to Intel for allowing me to develop it at work (it was a requirement for Moblin from our illustrious interaction designer, Nick Richards).

The final menu behaviour is a little different from my original idea and I’ve attached a patch to the bug that implements my preferred behaviour. You can try out the new setting by grabbing GTK+ from git and adding gtk-auto-mnemonics=1 into your ~/.gtkrc-2.0 file.

Moblin UI Toolkit 0.3.0

Friday, December 11th, 2009

A little bit earlier than previously advertised, today I have made version 0.3.0 of the Moblin UI Toolkit available.

Disclaimer

This is a development release. API and ABI are very likely to change. Compatibility with future and previous versions is not guaranteed. It has had only limited testing and there are unfinished features and plenty of bugs in this release. It should definitively not be used in production environments.

Changes

Here is the least of new features and fixes, from the NEWS file:

0.3.0

Changes since 0.2.0

  • New toolbar widget
  • Convert MxBin to abstract class
  • Add MxFrame as a drop-in replacement for plain instances of MxBin
  • Use the i-beam insertion mouse cursor in MxEntry
  • Clean up MxGrid API to be more consistent with other widgets
  • Add support for font-weight property to buttons and labels
  • Add animation layout support to MxBoxLayout
  • Add special styling for ComboBoxes inside a toolbar
  • Implement font styling in ComboBox
  • Fix expander label visibility
  • Add missing public headers and single include guards (Bastian Winkler)
  • Clean up various references to removed functions (Bastian Winkler)
  • Documentation improvements (Elliot Smith)

Sources

Sources are available from download.moblin.org:

http://download.moblin.org/sources/mx/0.3/

or from git:

http://git.moblin.org/cgit.cgi/mx/

git clone git://git.moblin.org/mx

Layout Animations in Clutter

Thursday, December 10th, 2009

I’ve been playing around with layout animations in Clutter recently and made a video of what I have achieved. Currently, Clutter has very good and understood support for animations using fixed positioning, but I wanted to experiment with animations inside a layout manager. After a lot of thought, the solution was simpler than I had imagined. In its current form, it involves storing the child allocations at the start of the animation and then simply calculating the children’s positions between the start and final destinations based on the alpha value from the timeline. Animation is disabled for most allocations, but is started by certain events such as changing child properties or orientation. The add and remove animations required some additional logic to make sure the new actor faded in once the animation had finished.

I made a video of MxBoxLayout that shows changing packing options (expand, fill and alignment) as well as adding and removing children, and changing orientation (the layout children are just ClutterRectangles):

The work is currently in a branch of the Moblin UI Toolkit repository (animated-box-layout) which I will merge once I have added an enable-animations property to the actor.

In other news, there is now a page on Moblin.org for the Moblin UI Toolkit, and I expect API reference documentation to be available on-line soon too. There is also a new component in Moblin bugzilla specifically for the new toolkit (under “Moblin Distribution”).

Festive Beers

Friday, December 4th, 2009

With the festive season fast approaching, Hylke and I realised that we hadn’t had a GNOME beer event recently and that if we wanted to do one before the end of the year, it would have to be pretty soon. So, a little on the short notice side, is anyone up for beers in London next Friday (11th)? If so, drop your name onto the wiki page and we’ll see you then!

Moblin Toolkit 0.2.0

Tuesday, December 1st, 2009

Yesterday I announced a new development snapshot of the Moblin Toolkit, along with a preliminary schedule. I’m hoping to be API and ABI stable by February and have the first stable release at the beginning of March.

We’re working on the bugzilla component, but for the moment issues should be reported in the “nbtk” component of bugzilla.moblin.org.

Quite a few people asked before about language bindings. I don’t anticipate supporting a lot of language bindings, but I will be ensuring GObject introspection works well. I hope that will help people generate any bindings they wish to use and keep them up to date with relative ease. Personally, I have already been using Javascript (via Gjs) to test some aspects of the project.

The interesting features in this release are:

  • “long-press” signal added to MxButton (inspired by the “touch-and-hold” discussion in Gnome bugzilla)
  • Added an “always-on-top” base class, which helps in creating the always-on-top actors such as tooltips and menus.
  • Improved error reporting and various other bug fixes