Photo Manager, version 1.0

I've finally got around to releasing the first version of my little photo collection organizing program, which I've given the inspiring name Photo Manager. The screenshots are the quickest way to see what it's all about.

It's already slightly useful to me, but I'm implementing features as I need them, so I don't know how useful it would be to other people. For now it's very simple, but even so the interface isn't very intuitive.

It turns out that the most unintuitive parts are due to the list of images in the main window being paged. It shows you the first 100 pictures, but to get to the rest you have to use the Forward button. I want to be able to select sets of images to tag with keywords, so I've ended up keeping track of a selection over multiple pages, which means you can't always see which images are selected when you try to tag or delete them. This can easily lead to loss of information.

I was originally hoping to show all the images in the list, by loading them on demand as the user scrolled through. I'm not sure if the database retrieval and thumbnail loading would have been fast enough to do that, but I actually didn't get as far as finding out.

Gtk2 has a whole infrastructure for creating list and tree widgets that can load information from a backend ‘model’ as necessary. This is a more flexible way of doing things than simply loading the whole list/tree with information at the start. For one thing, if you need to store your list data in some special format and also display it in a list then you can do that without having a separate copy passed over to Gtk. You can give Gtk callback functions which it will use to ask for the information when it needs it. You can also have multiple views of the same data without storing multiple copies.

I was also expecting this to be a good way of displaying large lists without having to load all the data into the list widget in one go when we start up. Most of the data wouldn't even have to be loaded from the database. We would do a query to work out how many records there are in total, so that the scrollbars can be set to roughly the right size, and then just load information for the records which are visible. That would make it very quick and easy to look through the whole list, and very quick to update after a search. The selection of images would work intuitively, just like for any other list.

Unfortunately this doesn't seem to work. I started trying to write a generic CPAN module to provide a tree model for a database query, but it seems that Gtk wants to load all the data from the model straight away, whether it's visible or not. It calls the ITER_NEXT and GET_VALUE callbacks for all records. I think it might be doing this in order to calculate the exact height of each record's row and the width each column should be set to, so there might be a way to give it this information explicitly and avoid the problem. The source code is complicated though, but I might ask about this on the mailing list. I just wanted to get something written that would work for the time being.

< Early morning farmyard pictures | Make Poverty History march >

Miniblog

(nuggets of inanity)

Tuesday Apr 24th 2007, 16:54 »
Just took the annual web design survey that AListApart do. I don't realy consider myself to be a web designer, but I have been doing a lot of HTML and CSS lately.
Monday Apr 23rd 2007, 18:23 »
Strange, there appears to be a bare-knuckle boxing match going on in the field outside my flat. Wish they wouldn't make so much noise about it.
Thursday Mar 1st 2007, 18:47 »
“In its written form, Hebrew has no vowels, making it the ideal language for texting.”
—Said in jest on some Radio 4 programme just now.

Archive: 2007 · 2006 · 2005 · 2004
Feed