[bt-devel] New mainindex

Eeli Kaikkonen eekaikko at mail.student.oulu.fi
Thu Nov 8 05:13:44 MST 2007


I just made many commits which were in random order, sorry about the
mess.  Anyways, the whole thing should work now. The main change is the
maindex (bookshelf view). I almost rewrote it. It's not ready though:
the bookmarks are missing. This is the first phase in redisigning the
bookshelf. Next phases are to make two tabs, one for the current module
tree view and the other for the bookmarks.

The bookmarks view is easy to write, we can use the old code almost
as-is. It's now in the new "bookmarks" subdirectory. After it works and
the code has been cleaned up and refactored/restructured it can be moved
back to mainindex/ directory if it feels better.

The new bookshelf uses the btmoduletreeview. The code is shorter now
especially because the bookmark code is not there anymore but also
because constructing and using the view is simpler. Instead of 5
non-bookmark item classes there are now 3 and they are shorter and
simpler than the old ones. There's still much room for improvements, I'm
not totally satisfied with the code, especially the Action/popup menu
handling.

I also added a new feature which I talked about earlier: users can
change the grouping. Open the RMB menu and you'll see. As far as I can
see we have lost only one feature, namely the second language name in
Glossary Languages. It can be added for example into btmoduletreeview if
it feels necessary, but it would work well only with Category/Language
grouping.

I also added some icons. Mainindex uses different icons for categories.
Actually it looks ugly. I think it would be a good idea to use different
icons but they should be simple and coherent, for example folder with a
small additional marker. The new Oxygen style folder is just bad and
ugly IMHO, therefore I wanted to get rid of it.

There is also a small icon cache in the icon loader function. I added it
because I noticed that the SVG rendering takes a loooooong time.
Creating a tree view without icons was lightning fast, with icons it
took maybe hundred or thousand times as long. With the cache it's again
instant with subsequent calls, only the first time takes longer.

Somehow my icon loading changes affected to Config dialog icons - they
are not there anymore. I have to investigate that. I also found that
some icons are just not found even though they should be there, e.g. RMB
menu "Unlock" item in mainindex. Maybe I have missed something obvious.

  Yours,
	Eeli Kaikkonen (Mr.), Oulu, Finland
	e-mail: eekaikko at mailx.studentx.oulux.fix (with no x)



More information about the bt-devel mailing list