A Coruña

General No Comments

I’ve been meaning to post something for awhile, and just never seem to get around to it. But I’ve gotten a few emails from people asking about GtkOffscreenWindow, so I figured I should post something about it.

So last month there was a WebkitGTK hackfest in A Coruña, and that was really cool. Nice to see some friends again and to meet some cool new people.

People from the WebkitGTK hackfest

People from the WebkitGTK hackfest


WebKitGTK Hackfest people at Torre de Hércules

WebKitGTK Hackfest people at Torre de Hércules

We wanted to explore the possibility of rendering GTK+ widgets offscreen, rather than calling into the theming system to draw the widget. It turned out there wasn’t a convenient way to do this. There’s gtk_widget_get_snapshot(), but it seems to be more about taking screenshots of things that are displayed because you can’t really get a snapshot of something that you can’t already see. The window embedding stuff seemed a little low-level, complicated to setup, and in general not quite right for a task like this.

So now there is GtkOffscreenWindow. This is a totally offscreen, toplevel container widget that facilitates retrieving snapshots of widgets without them needing to be on the screen anywhere. You can setup a widget or a hierarchy of widgets and throw them in the container. You’ll have to wait until it’s processed an expose event, but then you can call gtk_offscreen_window_get_pixbuf() or gtk_offscreen_window_get_pixmap().

I must confess one obvious problem in this widget’s API, though. The widget derives from GtkWindow, but you should treat it as though it derives from GtkBin. This is kind of weird and unfortunate, but it’s for kind of internal reasons relating to the GTK+ theme system. If I (or someone else) is able to find a solution that can make the theming work correctly when this widget derives from GtkBin, then I will try to change it in GTK+ 3.0. So you’ve been warned!

The cool news is that GtkOffscreenWindow will be available soon in the upcoming release of GTK+ 2.20.

Gabriel and Fumika

Gabriel and Fumika

And just before I left I got a chance to meet with Gabriel and Fumika, who both played violin in my old string quartet during undergrad. They are married now and live in A Coruña, and they play violin in the orchestra that is based there, Orquesta Sinfónica de Galicia. Interestingly, back when our quartet was together we were invited to perform at the opening of the Meadows Museum in Dallas and we had the opportunity to perform for the Spanish royal family. It was really nice to get to see them again finally and to see their children, Claudio Kenta and Lidia Aimi.

So I must say, the trip was really awesome. It was great to meet everyone, great to do some hacking. Thanks to the GNOME Foundation for sponsoring people and the event, thanks to Igalia for hosting the WebKitGTK hackfest, and thanks to Canonical for giving me a few days off to go and hack on open source with other people!
sponsored-badge-shadow

Nokia N900

General 1 Comment

I feel like the only person who isn’t so excited by the N900. It looks like a beautiful device, and it’s built on the current Maemo platform that I’ve always liked and there’s so much to be excited about. But I’m not.

I feel like we’ve been wanting Nokia to make this device since Maemo was first released. They released an Internet tablet, and I figured maybe it’s just to get the platform out the door. Fine. But then they release another Internet tablet, and then another. They were cool devices, but I had no use for them. I just never wanted to carry around yet another device.

So now they release what I’ve been wanting for all this time, but on a platform that they’ve already declared is a dead end. Am I missing something, or does this feel very pointless?

I’m not trying to start any discussion about the toolkits, that’s not at all the point. It’s just confusing that they would never make a useful device that anyone really cares about until after they’ve declared an end to the platform. Now that they have a device I want to buy, there’s no point in buying it since it appears to has no future.

ECMA C# standards community promise

General No Comments

Only a few days ago Richard Stallman was speaking here at the Gran Canaria Desktop Summit and the subject of Mono inevitably came up. There was heated debate between Richard and others in the community. His position seemed to be that Mono was an important tool for migrating foreign software to a free platform, but it should be discouraged for use in developing new free software, regardless of technical advantages, because he was unconvinced that we would be allowed to continue using it (that Microsoft would sue us and require us to stop using it, etc).

I had the opportunity to ask him a question about this, which was something roughly like, “Is there anything Microsoft could do or say that would resolve some of the uncertainty around this issue?” I was very happy that Richard’s response was “yes”, and he went on to say how Microsoft could be more clear in their position of allowing free implementations of C#.

Interestingly, news regarding the C# standards were released today that will hopefully clear up things for people who were not convinced before. Undoubtedly there will be haters who continue to hate, but I really will be interested to see what Richard’s position will be after this (not that his position will affect mine, but I’m still curious).

Moving history between git repos

General 1 Comment

So GLib and GTK+ have officially moved from svn to git this week. I had been doing some work in my own git repos, but they were based on various git-svn checkouts and they were all hashed differently, so it wasn’t possible to just merge from one of them into the new official git repos.

It turns out that it’s quite easy to merge your history over, though. Here’s what I did.

Say there is an old git repo with a branch called new-awesome-stuff. You want to create a branch in the new git repo with the same name, and merge the history over.

(in the old repo)

git checkout new-awesome-stuff
git format-patch master

This generates patches for each revision.. say there were 34 revisions in this branch. You’ll get 34 patch files whose names begin with 00nn (where nn is 01..34).

(in the new repo)

git checkout -b new-awesome-stuff
git am 00*.patch

If you’re putting things on github as I am, this should help you maintain your work in a single repo instead of having four different repos for the same project as I had. 🙂

Project Ridle^H^H^H^H^HGiggity!

General 1 Comment

There’s been some interest in getting some of the features from Christian Hammond’s awesome libsexy merged into GTK+, and I’m happy to report that some progress is finally being made on this. I just committed support for icons in entries into GTK+ a few minutes ago, and this will be available in GTK+ 2.16. This is based on SexyIconEntry, but supports some additional cool features that weren’t in SexyIconEntry. Some new things:

  • Set icons from pixbufs, stock items, GIcons, and icon names
  • Control sensitivity of each icon
  • Tooltips on icons
  • Drag and drop with icons

It’s also more memory efficient now, allocating the data and subwindows on demand. This is important since the new feature has been merged into GtkEntry itself rather than providing a new widget, and would more than double the size of every GtkEntry otherwise.

Thanks to everyone who helped: Matthias Clasen (tooltips, drag/drop support, patch review), Emanuele Bassi (review), Ross Burton (review), Christian Dywan (review, testing in Midori browser), and of course to Christian Hammond for making SexyIconEntry!

Project Ridley doesn’t explicitly mention libsexy, so I hereby create a new project specifically for merging libsexy features: Project Giggity!

Next I want to finish working on URL labels, like SexyUrlLabel.

Project Giggity

Project Giggity

Gtk# 2.12.3 Win32 installer

General No Comments

There’s been a lot of talk on the Gtk# mailing lists about the lack of a 2.12 installer for Win32. I finally took the time to roll a new MSI installer for Gtk# 2.12.3. But Medsphere is not using Gtk# 2.12, and we’re not planning to use it any time soon so I don’t think we really want to provide support for 2.12, or for 2.14 once it comes out, until we’re actually using them.

My long-term plan has been that I want to get gtk.org distributing its own official msi/msm installers for each component of the stack. Then other projects, such as gtk# or any gtk+ app, could consume the msm installers for their own msi containers.

Boston Summit is coming up pretty soon, and Brad and I plan to take the opportunity there to try to get Medsphere’s installer code into shape to do this and then push it into an upstream svn module, probably on Gnome’s svn.

Vista. You know, the other one.

General No Comments

Linux Journal has an article entitled The *Other* Vista: Successful and Open Source. It’s a brief introduction to the VistA system that is used by the VA and now many private hospitals, and which is the basis for Medsphere’s current products. The article talks a bit about Medsphere’s open source GTK-based OpenVista CIS, the new Medsphere.org initiative, and Congressman Pete Stark’s proposed Health-e Information Technology Act of 2008 bill that would advance open source medical software in the US if it were passed.

It’s really cool to see that our work is being noticed, and that people are starting to think about how open source can affect the medical industry.

Ding Dong, the Witch Is Dead!

General 1 Comment

Seven years, 157 comments later.. IT IS DONE!

Witch

GTK Printing on Win32

General 1 Comment

Now that things have settled down a little at work, we’re finally in the process of moving to gtk# 2.10 now. One of the cooler things that we can finally use now is the Gtk printing system. Previously we were using Gnome.Print on Linux and System.Windows.Forms.PrintDialog on Windows, which sucked for various reasons that you can probably guess. Obviously what we really needed was something we could use easily from both Linux and Windows.

Gtk.Print to the rescue! Except that it didn’t work on Windows yet. But in Berlin Behdad pointed me to #488833, to add support for cairo_win32_printing_surface to GTK. So once I got home I finished up the patch and it’s now committed to gtk+ svn trunk. Since it requires a new (and unstable) version of Cairo I can’t commit this support to gtk-2-12 branch, so I think I’m going to have to maintain a branch for Medsphere’s use.

This doesn’t solve print preview, though, so that’s the next thing I want to work on.

Hello from Berlin!

General No Comments

So I’m in Berlin at the GTK Hackfest, and it’s a lot of fun. I finally get to meet a lot more of the GTK hackers, and hear everyone’s thoughts and ideas for the future of GTK. Plus, we’re having a lot of fun hacking. It just wouldn’t be a hackfest otherwise.

Brandenburg Gate in Berlin

I’ve been doing some hacking on a few different things. Worked on rewriting the test program for the sensitivity bug, using Tim’s GTester framework this time. Worked on the GtkIconEntry (merging from libsexy’s SexyIconEntry). Tonight I decided to see if I could get some WebKit action going from gtk#, and it was really simple.

WebKit test from gtk#

This should be a lot of fun to play with, and I think Cesar will be interested in it as well. 🙂

Jenny is in Italy now, but should be arriving on Friday or Saturday I think. So that will be really cool, and I’m going to go hang out with her for a bit. I’m really looking forward to seeing her again.

« Previous Entries