Category Archives: General

Glom Precise Printouts

At some time I’ll have to implement a type of printout or report in Glom that uses fixed positioning. For instance, to enter text into the correct spaces on pre-printed forms, or just so that printouts always look the same. At the moment, printouts take up as much space as necessary, and flow appropriately (I “print out” to HTML in the browser at the moment).

So, suggestions are welcome for some code that I should reuse, or adapt. I guess it would need the following abilities.

  • Specify text areas precisely, such as specifying the position and size.
  • Optionally specify the position in terms of alignment, so that text areas slide left or right.
  • Flowing text into those areas, and simply truncating the text if it’s too big. (Or maybe making the font size smaller.)
  • Text justification inside the text areas.
  • Specifying page margins.
  • Coping with a changing page size (e.g. A4 versus Letter) by increasing/cutting-off margins.
  • Have a nice GTK+-based UI for doing this.

Something using cairo and pango would be nice.

Glom Buttons

Extending Glom via python is such a marketable feature that I spent a couple of days to add a button layout item so it’ll be in version 1.0. Glom already supports calculation of field values with python, but this allows arbitrary actions when the user clicks the buttons, equivalent to FileMaker’s “scripts”. The example has a slightly-modified pygtk helloworld program in the button.

Glom Buttons

The python script already has access to the record details. In future we could add API so that python code can, for instance, add records, navigate to tables and records, find, and print.

In the Viertel

We’ve managed it. We found a three room Altbau (pre-war building, but possibly code for “high ceilings”) in Munich’s Glockenbachviertel, with rent a little under our limit, and without an agent’s fee (usually 2 month’s rent), noch.

Baumstrasse 11IMG_0681It’s just across the road from our favourite cafe – Cafe Maria (too cool to have a website), and just a street away from the river.

Looking for Altbaus in the Glockenbachviertel and Haidhausen has started to give me some idea of what parts of Munich were still standing after the war, and made me notice how many of the buildings are post-war. I wish I could find some before/after pictures of the various neighbourhoods.

noapic is like a new laptop

Every now and then I search for new information on my Travelmate 4101WLMI laptop in case someone has had more luck getting all the components to work. I found a note on the German Ubuntu site suggesting that I boot with noapic (in /boot/grub/menu.1st) instead of pci=noacpi (which is itself better than acpi=off). I was so pleased to get working sound and built-in wired and wireless networking. It’s like a new laptop. This suggests that the boot hang is caused by APIC (clock advanced interrupts system) rather than ACPI (power management).
So, I still don’t have

  • the battery status in the GNOME panel. Apparently Acer Travelmate’s tend to have the wrong DSDT in the bios. I tried doing the recompile-the-DSDT thing without success. But it bothers me that the bios seems just fine for Windows. Apparently Windows uses the Smart Battery interface instead and the GNOME applet needs to support that. I clicked on the “upstream request” link in Ubuntu’s (awkward) Malone bug-tracker. I’m not sure if it did anything.
  • the widescreen display resolution.

But I can live with that more or less.

Glom across borders

Boring technical bit

It’s been a hard week. I’ve been doing some major (more repetitive than conceptual) refactoring of the Glom source code, to make it use smartpointers for lots of the information, instead of copying by values lots. Copying by value gave me stability when I wasn’t sure how things should work, but now I’m more sure about where things should be explicitly created, shared, or copied. The memory management feels a bit like Java, but at least I still have the const keyword, and at least I still have strong compile-time typing. I’d be lost without them.

Exciting new feature

The point of this was to support translations of everything in Glom that can have a human-visible title instead of just an identifying name, such as tables, fields, reports, layout parts, relationships, etc. Rather than have little translation buttons next to each title, I chose to pull it all into one list. And if you develop a system in French but then later have to deploy it in Germany, that should be OK too. You can even test it without changing your locale, though you’d have, for instance, German field titles with Spanish menus and buttons.

Glom Translations Window

It would be very easy for someone to implement Import and Export to/from regular gettext .po files. Maybe I can even check them into cvs so that the wonderful GNOME translation teams translate the example Glom system for me.

I had considered this a post-1.0 feature, in Glom’s list of planned features, but I realise that I need this for clients in Germany, so I can still use English as my first development language when creating Glom solutions. As usual, don’t forget that your company may fund me to implement the remaining features.

Unfortunately, it only uses the first part of locale names at the moment, such as “de” for “de_DE.UTF-8”, so, for instance, you must use the same German translation for Germany, Austria, and Switzerland. That’s because I can’t find any list of real locales (whose names should also be translated themselves). iso-files seems to have only language names instead of locales.

gtkmm manual styled

Jonathan Jongsma has recently pushed, pulled, and tweaked the gtkmm manual a bit. He’s added extra semantic markup and created a stylesheet to present it properly. It’s a big improvement on the old non-styled version. For instance, the view part of the gtkmm treeview section.

Jonathan Jongsma is the kind of person that I’d like to encourage to get more and more involved. He’s also doing lots of work on the Cairo C++ bindings (cairomm) and has already written the Cairo chapter in the gtkmm book.

Glom feeling good

I’ve put lots of work into Glom over the last few days. There are a couple of nice new features, needed for (my idea of) version 1.0 completeness. I guess this will be available in Ubuntu (maybe only Dapper) real quick, thanks to Daniel Holbach. It is a little difficult to get all the dependencies when building it yourself.

Found Set

As in FileMaker, you are always looking at either all the records or a set of records based on a Find that you just did. Now there’s visual feedback about this at the bottom-right of the window, and a button to get back to seeing all records.

Glom's Found Set

Quick Find

Whenever I built systems with FileMaker I would always create a big concatenated calculated field for doing quick full-text searches, and I’d make this show up on the Find screens. Glom just gives you this feature for free. There are probably more efficient ways of phrasing the SQL, but that can be improved behind the scenes.

Glom's Quick Find

Examples

The glom example now contains example data, including an attractive picture of me in a record in the Contacts table, some made-up products, and some invoices that use them. And now you don’t need to be aware any more of the name of the database on the postgres server. Glom automatically chooses a new database name and associates the new file (created from the example, like a template file.) with the database.

Karslruhe, Berlin, Lisbon, Munich

It’s the new year and I’m back in Munich. Working on the project for Web.de in Karlsruhe was great but being away from home during the week is always difficult. I’ll try extra hard to work only in Munich now.

I spent Christmas in Karlsruhe with the various parts of my girlfriend’s family there. Then we visited Berlin because our Lisbon flight included a free train ticket and my sister was visiting. I’ve never seen Berlin under so much snow. It makes everything quiet.

Lisbon was a great place to spend New Year’s, walking up and down the old streets under blue skies and winter sun. It’s old and crumbling like Venice, but younger and alive. Barrio Bairro Alto, where we had an apartment, seems to be nocturnal. The population sleeps all day and parties all night. Trust Fernando “nightlife” Herrera when visiting Lisbon – I wish that we had visited Chapito sooner.Lisbon New Year's fireworks
Lisbon, Bario Alto

Now that I’m back I’l start work again on Glom, and finish off the Maemo/Hildon C++ bindings for Nokia.

My other big project is to find a new apartment, now that my girlfriend has finally decided to move in together, to my amazement and delight. We have quite high aims – a 3 or 4 room altbau place in the Glockenbachviertel with a big kitchen and a balcony. We’ve looked at five so far, but each lacked something. Maybe someone knows an apartment to rent and wants to save the agent’s fee?

Where’s my parport0?

I need to call on the lazyweb once more.

The odd Windows program (Ashlar Vellum) that I need to use inside vmware has a copy-protection dongle that attaches to the parallel port. But vmware can’t seem to find the parallel port. By default it looks for /dev/parport0, which does not exist. If I use /dev/lp0 then it says “parallel0: We have detected an LP style device. This type of device has been deprecated in VMware Workstation. We have guessed that “/dev/parport0” corresponds to “/dev/lp0″ and will use that instead.”

So I guess that /dev/parport is the new thing in Linux, so I wonder why I don’t have it (with Ubuntu Breezy).This doesn’t seem like a vmware problem.

I have tried changing the IRQ number used for the parallel port in the BIOS, without effect.

Update:
$ lsmod | grep ppdev
$ insmod ppdev
insmod: can’t read ‘ppdev’: No such file or directory

But
$modprobe ppdev works
and it is loaded at startup if I put it in /etc/modules.

But I need to
$rmmod lp
to prevent it from claiming the port. I have added lp to /dev/hotplug/blacklist and a few other files that look similar, but it is still loaded at startup.

The dongle still isn’t recognised, but I haven’t tried it under non-vmwared Windows either.