So, I finally hold my new Nokia N800 in my hands. Nokia was so kind to give a discount code to me for the work we did on Maemomm for openismus. Thanks to Nokia and Murray for organizing this discout!

So its simply incredible! l switched it on connected the wifi and write my first N800 blog now.

I should really start to read the manual now but I am just suprised of some things:
– It’s damn small. Of course I knew the size in cm before I bought it but it should feels much smaller with this 800×600 display.
– The display is very sharp though you need good eyes to be able to read webpages in full-size mode.
– Accidently pushed the button to the right and a webcam moved out
– You can use handwriting to edit text and that works amazing

I will continue playing…

Usually, I think there are better ways to write code today but often vim is simply useful because you are on an ssh connection or in a virtual environment or whatever.

Anyway, to get the IMHO quite cool auto-indent feature when pressing
“Tab” like emacs does, simply put this in your .vimrc:


set cindent
set smartindent
set autoindent
set expandtab
set tabstop=2
set shiftwidth=2
set cinkeys=0{,0},:,0#,!,!^F

Of course you can read more about the vim indenting feature in the documentation. Of course, I think most of you will know that already, so this entry is more a reminder for me.

[EDIT] uws remindend me, that the first three lines were missing. Seems the default on my system already included them. Thanks!

gettext ?!

23. October 2006

While trying to add import and export of .po files in glom I try to understand how libgettext-po handles erros. In gettext-po.h:


/* Signal a problem of the given severity.
MESSAGE and/or FILENAME + LINENO indicate where the problem occurred.
If FILENAME is NULL, FILENAME and LINENO and COLUMN should be ignored.
If LINENO is (size_t)(-1), LINENO and COLUMN should be ignored.
If COLUMN is (size_t)(-1), it should be ignored.
MESSAGE_TEXT is the problem description (if MULTILINE_P is true,
multiple lines of text, each terminated with a newline, otherwise
usually a single line).
Must not return if SEVERITY is PO_SEVERITY_FATAL_ERROR. */
void (*xerror) (int severity,
po_message_t message,
const char *filename, size_t lineno, size_t column,
int multiline_p, const char *message_text);

This is a callback passed to po_write_file which is called on failure. Hmm, so this method is required not to return if “SEVERITY is PO_SEVERITY_FATAL_ERROR”. How could I do this? Of course I could call exit() but that not really good. An application should usually not die if an error occours. FATAL error occours for example, if the file is not writeable.

The only solution that came into my mind yet was to start another thread that would simply exit if something goes wrong but that is really ugly. Anyone here with better ideas? Maybe I just miss the point.

LibTpz and C++

20. October 2006

I am able to write that in the moment because I am hacking on the glom po import/export feature and g++ is just that damn slow that I takes ages to build glom on my Pentium M 1.73 (which is usually not really slow and has great beryl effects now).

Anyway, I have some api suggestions for libtpz (for ThreePointZero). There also is a Project at gna for it now:


Interface TpzIter
{
next();
prev();

get();

equal();
}

Interface TpzList
{
prepend();
append();
remove();

foreach();
copy();

get_length();

Iter* begin(); // first item
Iter* end(); // after last item
}


I have some initial code here but it needs some polishment to be added to svn. I still would like to derive GInterfaces but I doubt that this is possible in C. The design is very close to what the C++ STL provides.

Some might say now, what the advantage over GList* is so here are two points:
– GList* is used for the whole list and for an individual item – that is confusing
– [Edit: Removed]*

So there is another more important point: You can hide your list implementation. In fact, you do not have to use a “list” at all, you could have a tree, an array or any other data structure that you can wrap on that interface. This way, you can also add optimations that are not possible with GList*.

Of course there is a perfomance impact but I think that is not that major that we should not try it. Maybe someone wants to create benchmarks later.

Another thing: Dear Lazyweb, how can I configure beryl to maximize a window like metacity when I double-click on the title bar?

*[EDIT]
This point was not very good but it is still here:
– Writing loops is more intuitive, instead of

/*GList* node = list;
while (node)
{
/* do something */
node = g_list_next(node);
}*/

[EDIT] Some pointed out (correctly) that it is better to write
GList* node;
for (node = list; node != NULL; node = node->next)
{
/* do something */
}

you can use
TpzIter* iter;
for (iter = tpz_list_begin(list); !tpz_iter_equal(iter, tpz_list_end(list)); tpz_iter_next(iter))
{
/* do something */
}

“API stable”

13. October 2006

Of course it is very nice to keep a platform stable over a period of time. But if we want to do that, we should do it correctly. And for me API stability means, that all widgets behave the same they behaved in the stable release before, even if the behaviour was a bit wrong in the previous release.

So Gtk+ 2.10 introduces this bug because the behaviour of GtkAboutDialog changed. I guess the behaviour was not correct before but that really doesn’t matter.

I just imagine how many bugs an application written for Gnome 2.0 and Gtk+ 2.0 will have today if it had not been changed since.

So please do not argue that there is not need for 3.0 because we don’t need API changes…

BTW, thanks much to Don Scorgie for helping so much fixing this help bug.

jhs vs. m4 1:1

14. September 2006

More or less the whole day I improved the gtkmm patch to be able to build without the Atkmm api which is particular usefull on platforms like Maemo.

I had to fight a lot with m4, perl and the bad error messages of the C preprocessor. It only tells you that some #ifdef was not closed but it does not really mention where. After I finally also got the conditional building using automake/autoconf working, the updated patch is now in bugzilla.

Yet anther Glom bug!

8. September 2006

Today, I made a patch for Bug #349358. The patch itself is quite trivial but I took me some time to find out why all this happens.

In the meantime im trying to fill my brain with stuff related to production engineering for my exam on monday. There are just 300 pages left I have to learn by rote, so it might become a very funny weekend.

Hello Planet Gnome!

7. September 2006

So I am finally here! For those who do not know me, I am a maintainer of Anjuta and work for Murray Cumming’s company Openismus on several GTK/GNOME related things.

Today, I created a new patch for #346896. I have to thank Dodji for his tips and apoligize that it was not at all a gtksourceviewmm problem. I have attached a screenshot for those who need some bling!

GtkSourceViewmm issues

6. September 2006

I am currently trying to fix Bug 436896 but encountered that gtksourceviewmm has a problem with SourceView::get_source_buffer() because this always fails. I will have to fix that first before I can go on because there is no other way to set the SourceLanguage

Finally, the patch is here!

29. August 2006

The “–enable-api-atk=no” patch for gtkmm and glibmm was finished today. I hope this will make things easier on platfroms were atk does not really make sense like maemo. If you want to test it check out the patches in Bugzilla.