| Mon | Tue | Wed | Thu | Fri | Sat | Sun |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | |||
| 5 | 6 | 7 | 8 | 9 | 10 | 11 |
| 12 | 13 | 14 | 15 | 16 | 17 | 18 |
| 19 | 20 | 21 | 22 | 23 | 24 | 25 |
| 26 | 27 | 28 | 29 | 30 |
![]()
This section:
Blog postings by Operational Dynamics partners and staff
Use the links at top left for a consolidated feed of all the posts made on this
site.
Please note the disclaimer at the bottom of this page.
Mon, 26 Nov 2007
java-gnome 4.0.5 released!
This blog post is the release note from the NEWS file which you can read
online … or in the
sources,
of course!
java-gnome 4.0.5 (26 Nov 2007)
TreeView is here!
It’s always a great feeling when you bag a milestone, and with this release we have reached a major goal on our way to having outstanding Java bindings for the GNOME platform: coverage of GTK’s powerful yet complex TreeView & TreeModel API.
TreeView
TreeViews are a central part of almost every application. GUIs use lists for all sorts of things, and so a significant goal was to make coding TreeViews and their backing TreeModels as straight forward as possible.
The most challenging and complex part was to design the Java side API, which was no small matter. As a native library, the GtkTreeView API is complex and very much written with programming in the C language in mind, and as such our algorithmic mapping of the underlying libraries into Java doesn’t entirely fit. Long experience with the TreeViews in the previous bindings had made it clear just how nasty to use the API could be, and so the hardest part of the work was to come up with a mapping and a usage pattern that would be both faithful to GTK and be sensible to use.
The other significant challenge was to document the work effectively. Our Java side API documentation is a major feature of java-gnome, and merely exposing classes and methods is not sufficient; they need to be clearly explained in our JavaDoc as well.
along with numerous test cases in our unit test suite, and several comprehensively worked examples.
This was a monster patch, and the culmination of not just three months direct effort, but also where we’ve been heading since we first started the re-engineering of Java bindings for GNOME. Although largely written by Andrew Cowie, a significant contribution was made by Srichand Pendyala who not only exhaustively evaluated the design but also threw in some serious chunks of code. The work benefited from comprehensive input from Peter Miller on the modelling and design, and the comments of Bryan Clark, Owen Taylor, and Hanna Wallach were all really positive and helped us know that we’d gone in the right direction. Finally, thanks to Behdad Esfahbod and the GNOME Foundation who made it possible for us to meet in Boston at the GNOME Summit and so accomplish much of the final pulling together of this branch.
Continuing Improvement
Meanwhile, steady work continues on to the fundamental base classes, with a whack of additional signals and methods on Widget and especially Window, along with expansion of coverage in numerous other classes.
We’ve begun to get the basics of image handling in place,
One nice piece of contributed work came from Vreixo Formoso and Thomas Schmitz
with coverage of the Dialog Window functionality in GTK. It took a bit of
doing to map the int response codes used by GTK into something suitably
strongly-typed, but all good.
Finally, minor improvements to all sorts of stuff, notably from new contributor Mario Torre. Awesome!
For further details you can always grab a copy of the sources and run
$ bzr diff -r tag:v4.0.4..tag:v4.0.5
to see the complete code delta.
Screenshots
For fun we built in a capability to
create demonstrations to be captured as screenshots to illustrate various
things. It doesn’t get more basic than the example on the
Window documentation page, but it’s a nice touch. :) We’ve
screenshots for a number of Dialog classes and one for the TreeView page. I
imagine we’ll build up a nice library of images in the next few months (yes,
dear contributors, you can add snapshots to the list of things we’ll be
expecting along with well written documentation and unit tests when submitting
additions to the public API).
Building and requirements
The library now depends on GTK >= 2.12. Those packaging java-gnome for their distributions please take note.
Looking ahead
Continuing to expand the coverage levels in the classes already exposed will continue to dominate our attention; there’s still a long way to go but we’re pleased with the progress we’ve made so far; you can definitely build real applications with java-gnome now.
The next release also ought to include preliminary coverage of GConf and Cairo. Doing each justice will again take a serious amount of work, but will continue to grow the fun things you can do with java-gnome.
You can download java-gnome from ftp.gnome.org or easily checkout a branch from mainline using Bazaar:
$ bzr clone bzr://research.operationaldynamics.com/bzr/java-gnome/mainline java-gnome
This release marks a particularly satisfying milestone for me. I have three+ years of work that’s been waiting to be ported to java-gnome 4.0, but I’ve needed a new TreeView binding in place before I could do so. So this is a big deal for me. At last I can start thinking about getting back to actually hacking on the applications I actually want to be working on, and not spending so much of time on the underlying bindings themselves. There’s still a lot that needs doing on java-gnome, but it’s getting closer.
AfC
Thu, 22 Nov 2007
Do you have what it takes to be a volunteer at a conference?
Speaking of tireless volunteers:
The amazing thing about Open Source is that there are so many ways to be involved. Unlike any other area of human endeavour, you are not limited by race, gender, or the requirements of joining a profession. The only barrier to entry is that you participate.
Like most things, Open Source is about people. And a great way to meet other people is by getting involved at conferences. Technical conferences always need people to help out, and so it’s a great way to be able to spend time with the local community and with the speakers who have come from near and far. And just think of all the free T-Shirts you’ll collect. Geek nirvana, really.
Two really amazing conferences are coming up. If you’re anywhere in Asia, you should be making plans to get down to Bangalore for India’s greatest Linux & Free Software event, foss.in. And whether you’re in Australia, New Zealand, or France you should be booking your flights to get to Melbourne for the eighth linux.conf.au. Both conferences are the wonderful experiences they are in no small part because of the energy and enthusiasm of the volunteers who help with everything from A/V to picking up speakers at the airport to helping get people registered to making sure a conference network is up and running [hackers get grumpy when they can’t get their email :)]. If you’ve got a little time, if you’re looking for a way to get involved, then consider signing up as a volunteer to help out.
The Call for Volunteers for foss.in/2007 is out, and time is running out to sign up, so act fast!
I promised Atul that I wouldn’t subvert his volunteers this year. Last time around, the person who was supposed to to be monitoring the time and telling me to wind up was so enthralled by what I was saying (and now he’s a major contributor to the project that I was talking about; go figure) that they completely forgot to tell me to sit down. See? Me going overtime isn’t always my fault. Honest!
AfC
Many ways to contribute
The GNOME Foundation is presently going through it’s annual election cycle. I want to note my appreciation of the time and energy of all those who are running.
I’ve got something over 21 years cumulative experience as a Director, most of it in the not-for-profit organization space. Large NGOs are generally very professionally run, but one of the things I’ve observed quite often about the tiny associations that typically arise around local events and civic initiatives: there is a tendency for the Membership to expect the Board to do all the work.
This is likewise true of groups in the Open Source space. Such organizations usually don’t have full staff and the Board, which should be concerning itself with a governance role, ends up being called upon to act additionally as both Executive and Secretariat. Everyone else in the community contentedly sits back, expecting herculean efforts from the poor suckers who got elected. Every half baked idea has to be followed up and every last initiative to be successfully carried out. The inevitable result is burn-out of the very people who are your most passionate advocates.
Wide open spaces
Predictably, people have been attempting to force the various candidates into making solemn promises about all the many things they are going to do for GNOME in the coming year. Which is all a bit ridiculous: Hello! These people are unpaid volunteers!
Nevertheless, being candidates, most are replying with various exciting statements as to what they are going to achieve if elected Directors. Replying to one such platform, David Neary writes:
What has prevented you from doing/encouraging these things as an ordinary member? The marketing team is open to all, several members propose/organise local events… What makes you think you will be more able to do these things as a board member?
It’s a fine question; and as is the case with most of the organizations that exist only to provide a legal structure around a Free Software community (eg GNOME, The Perl Foundation, Linux Australia, etc), ultimately the organization and its Board matters little because it is those who write the code, package the software, do the promotional work, complete translations, who set the direction. And that’s not to mention the courage of the individual who convinces his or her peers and superiors that a particular piece of software should be used in their organization.
Promoting enthusiasm
I should make it clear that I do value the work of the Directors of these various umbrella organizations. I’ve been in their shoes. I wouldn’t go so far as to call it enjoyable work, but it can be rewarding. None the less, it takes a huge amount of effort to prepare financial statements and to maintain relationships with sponsors. Even just context switching in order to attend a conference call is a burden. It’s thankless toil that even in titularly transparent organizations largely goes on behind the scenes.
In early 2003, Linux Australia expressed that it’s purpose was to “facilitate the enthusiasm” of people in the Open Source community. Really, that’s what all such supporting organizations are about. The hard work of all the volunteers, be they at Board level, those carrying out marketing campaigns, the miracle workers making awesome posters and promotional material, the fun people manning booths at trade shows, and the tireless volunteers helping out at our premier conferences and events, are what make being a part of the Linux movement the amazing experience that it is.
AfC
Wed, 21 Nov 2007
Automatically rendering and capturing screenshots
One of the things I’ve often noted in the API documentation for the various GNOME libraries is that the examle screenshots always seem out of date. I think this is mostly because the look and feel we all interpret as “modern” is just that which happens to be shipping with the current version of the GNOME Desktop we’re using — and that default changes fairly frequently.
As I’ve been working on the GTK coverage in java-gnome, I’ve had in the back of my mind that it would be really cool if we had illustrations of the various Widgets and whatnot under discussion. More than cool, actually; a lot of the people developing with java-gnome are experienced programmers but new to Linux and the GNOME Desktop, so it’s probably pretty important that we help them along in learning which controls on their desktop correspond to which Widget classes. Capturing such screenshots manually is a bit of a pain, though, and even if we did that we’d still end up with them looking out of date within a year or so.
So I had a bit of fun last week and knocked something together that would automatically take screenshots of individual Windows or fragments thereof such that we could use them in the java-gnome API documentation.
Snapshots
First I cooked up a scheme to make it easy to write the little programlets that draw the Windows and Widgets (I used the term Snapshot to refer to these; nothing as elegant as the JUnit API, but hopefully it’ll improve over time). Then I wrote a harness to instantiate the sequence of Snapshot programs and to capture a screenshot of each one in turn.
GNOME ships with a tool in gnome-utils called gnome-screenshot which is handy, but a bit too focused on being a user driven program and is not available as a library in any event. So we pulled out the parts that actually capture the image (my Lord, talk about ninja voodoo X programming — I remember working directly with Xlib back in the late 80s;I am so glad we don’t have to do that anymore) and made it accessible programmatically. So all Harness has to do is something like:
window = snapshot[i].getWindow();
window.showAll();
window.present();
pixbuf = Screenshot.capture();
and then save the Pixbuf to disk in the right place so that <img> tags in our JavaDoc can pick them up. I did up examples for Window, Button, a few MessageDialogs, and TreeView. They’ll be in java-gnome 4.0.5 which will be out within the next week or so.
Off screen
If you did this as a zillion Windows popping up in front of you, though, you’d probably end up capturing the wrong thing if you accidentally changed apps or something. So instead I tried to figure out how to do it off screen. The solution I came up with was using the virtual X server that ships with xorg, Xvfb. By doing:
$ Xvfb :1 -ac -screen 0 640x480x24 -wr
we have a new X server running on :1, and then by passing --display=:1 to the Gtk.init() call used to initialize GTK, the Windows rendered by the program will be sent to the virtual server, not the desktop running on :0, and then we can take our screenshots there.
I’ve had this in mind for a while as a way to do unit tests that absolutely need to have the Window mapped to the screen. Unlike the unit test scenario, though, there’s a catch: you want the Windows to look right, ie just as they would if they were on a user’s desktop. That doesn’t happen in a naked X server though; you need a window manager running and also the magic program that makes the GTK themes according to your current preferences:
$ metacity --display=:1
$ gnome-settings-daemon --display=:1
otherwise you get that rather ugly default built-in GTK fallback theme and no window decorations, which would defeat the whole point of the exercise. So hook that all up to be exec()d when the Harness program starts and everything works great!
I’ll have to remember to switch themes back to Clearlooks before generating the screenshots for our next release… :)
AfC
Sun, 11 Nov 2007
Taking much for granted
“At the 11th hour on the 11th day of the 11th month, one minute of silence will be observed to mark the signing of the Armistice and to remember all those who fell in the cause of their nations.”
In one of the better texts documenting the South Atlantic war, I found this letter from an officer of 3 Commando Brigade, Royal Marines, writing home to his wife:
“It shouldn’t be too long, and I promise you I shan’t take needless risks. I think of you all so much and I love you all so dearly. Darling, I know what it must be like, always waiting for news and being so much at the mercy of events, but I know that you have the courage and the character to win through the difficult time and keep the family together. I so long to be back with you and I shall value our life together as never before after this. One takes so much for granted…”
— as quoted by Max Hastings and Simon Jenkins in Battle for the Falklands (Norton, 1983) pg 288.
While we remember, pause a moment to think too on all those who came home, of those who waited, and of those who wait still.
AfC
11:00 hrs
11 November 2007
Category Specific Feeds.
Use these links for an RSS or ATOM feed limited to this category and its descendants.
Technorati Profile


