Hoppa över navigation

Over the last couple of months I’ve been reading pvanhoof’s blog about his email reader called tinymail. I think he did the first posts about 3 million row treeview before christmas last year, and ever since I’ve been determined to get my hands dirty with the feared GtkTreeView widget.

Earlier this week, ehm last week (past midnight it seems), I started writing on what has now become a custom tree model specialized for xmms2 metadata.

GtkTreeView is a jungle. I almost gave up because of the dangerously high risk of braindamage when working with GtkTreeView, but the people at #gtk+ were helpful and about half an hour ago I finally managed to get it right.

There are still some bugs I have to take care of before letting it loose for client writers to use and abuse, but all the basics are there. It takes about 2 seconds to populate about 7500 rows of medialib ids and I think I know of a couple of places where speed could be noticeably improved. Another issue is the speed of resolving. When scrolling the list you see the entries resolve. It would be nice if the model could keep the 10 entries above and below the visible entries in memory, have to look into that later.

This is also the first project I’ve written using gob2, The GObject Builder, which is an object oriented language around C which you compile to regular C-sources later. It has been such a delight to use gob2. You don’t have to edit header files as you change your API, all the boilerplate code gets generated and you have nice macros for dealing with the common stuff. It also gives a much clearer view of the code. Another plus is that it’s possible to generate C++ code too. Gob2 is definatly the tool to use when writing GObjects.

The dynamic loading tree view model is also a part of my grand plans for a DJ application which I now think about writing in C++ using gtkmm as GUI toolkit. Andreas emailed me his phase vocoder some days ago and juhovh has been working on integrating it into xmms2, and nailing the last bugs. With the phase vocoder in xmms2, the last piece is in place and using xmms2 as a DJ backend is suddenly not so far away. The Hercules DJ Console works like a charm these days and I’ve been hacking on some alsa sequencer glib mainloop integration lately. When that has been accomplished it’s just loads and loads of gui code to write, but with just one week left of school and 3 months of nothingness ahead of me, it might just happen.



Fyll i dina uppgifter nedan eller klicka på en ikon för att logga in:

WordPress.com Logo

Du kommenterar med ditt WordPress.com-konto. Logga ut /  Ändra )


Du kommenterar med ditt Google+-konto. Logga ut /  Ändra )


Du kommenterar med ditt Twitter-konto. Logga ut /  Ändra )


Du kommenterar med ditt Facebook-konto. Logga ut /  Ändra )


Ansluter till %s

%d bloggare gillar detta: