What’s new in maemo2.0 gtk+?

This is a brief overview of changes done to the maemo-modified gtk+ between maemo1.x and maemo2.0.

Baseline is now gtk+ 2.6.10 with associated bugs and fixes. See release announcements:
GTK+ 2.6.10, GTK+ 2.6.9,
GTK+ 2.6.8,
GTK+ 2.6.7,
GTK+ 2.6.6,
GTK+ 2.6.5

UI Changes

GtkTreeView branches collapse only when tapping on already focused branch. Previously the branch was collapsed even when selecting the branch for the first time, which made using File Manager more complicated in some cases.

GtkComboBox is now themed in “appears-as-list” mode which gives it a scrollbar which is nicer to use than menu arrows.

Changed APIs

GtkIMContext extensions have been redesigned. The old API is still available, but it is recommended that applications use the new API instead, see Maemo 2.0 Porting HOWTO. The old API will probably disappear in the future.

New APIs

GtkEntryCompletion is adapted to work in Maemo environment. It is currently used in the Browser location entry. It can be used with any GtkEntry but other uses have not been as widely tested and there may be some issues. Feedback (and patches) appreciated.

GtkExpander and GtkHPaned
are themed to match the rest of the UI.

GtkWindow::urgency-hint was backported from gtk+ 2.8. This can be used to make your application icon blink in the Task Navigator.

gtk_tree_store_insert_with_values() was introduced as more efficient way to insert values into GtkTreeStore. See also gtk_list_store_insert_with-values()

Memory and performance

Avoid doing UTF-8 <-> ISO-8859-1 conversions and needlessly loading iconv. There’s a minor API change related.[*]

g_slice_*() was backported to replace GMemChunks.

Packaging

Debian packages can be built from trunk directly. No longer having the code in one place and debian/rules in another. It was a nice idea, but just didn’t work out.

Static libraries are not built. Due to various dynamically loadable modules you can not really get completely static gtk+ anyway. Besides, there is really no point in statically linking gtk+ in a Maemo application.

Localised messages have been removed to save space. Most visible result from this is that gtk+ stock items do not display translated labels.

Obsolete/broken APIs removed

gtk_window_{get,set}_prev_focus_widget() were intended only for special cases in focus handling. It never really worked and everything works just fine without them. The functions are still there, but do nothing. If you’re using these, please stop now.

GtkLabel::translate, gtk_label_{get,set}_translate(), gtk_label_retranslate() were never really implemented nor documented. They were part of an attempted solution that isn’t feasible in the end.

[*] Legacy window manager hints (WM_NAME, …) are not set, only the newer EWMH counterparts (_NET_WM_NAME, …) are. If you’re affected by this, please join us in this century.

Update: *sigh* why does planet maemo get all messed up so easily?

4 comments ↓

#1 Murray Cumming on 06.13.06 at 4:47 pm

Have you noticed any significant code size, memory size, or speed improvements just from using the new EABI?

#2 Tommi Komulainen on 06.13.06 at 8:29 pm

From the EABI alone, no, I wouldn’t expect much changes. But the thumb code reduced the size of libgtk-x11-2.0.so.0.600.10 from 2.9M to 2.3M

#3 Murray Cumming on 06.14.06 at 6:52 pm

You mean the thumb keyboard? How did _adding_ that feature reduce code size?

#4 Tommi Komulainen on 06.14.06 at 7:38 pm

Ha ha. No I mean “gcc -mthumb”