Шта је ново за програмере
Следеће промене су важне програмерима који користе Гномову платформу у издању 2.24. Ако вас не занимају измене, прескочите на Одељак 5 ― Шта је ново поводом „Гнома за у покрету“.
- 4.1. Припрема за Глиб и ГТК+ 3.0
- 4.2. GLib 2.18
- 4.3. GTK+ 2.14
- 4.4. Instant Messaging Libraries
- 4.5. Чаробна линија
4.1. Припрема за Глиб и ГТК+ 3.0
Како би започели припрему програмера за Глиб и ГТК+ 3.0, наредна издања обе библиотеке ће укључити заставице за постављање строжијих контрола сагласности.
Глиб, ГТК+ и АТК 3.0 ће захтевати да само заглавља највишег нивоа (нпр. glib.h, gobject.h, gio.h) буду укључена у код програма. Ова промена је неопходна како уклањање и преименовање појединачних заглавља не би утицало на изворни код програма.
Програмери могу проверити сагласност кода већ сада, користећи опције G_DISABLE_SINGLE_INCLUDES за Глиб, GTK_DISABLE_SINGLE_INCLUDES за ГТК+ и ATK_DISABLE_SINGLE_INCLUDES за АТК у тренутку превођења.
Проследите ове заставице компилатору при изградњи програма (нпр. -DG_DISABLE_SINGLE_INCLUDES) да се уверите у исправност вашег програма.
Глиб, ГТК+ и придружене библиотеке такође обезбеђују заставице које можете користити да проверите сагласност са ГТК+ издањем 3.0.
Подршку за застареле симболе и класе који ће бити уклоњени у издању 3.0 можете искључити дефинисањем следећих симбола у тренутку превођења: ATK_DISABLE_DEPRECATED, PANGO_DISABLE_DEPRECATED, G_DISABLE_DEPRECATED, GDK_PIXBUF_DISABLE_DEPRECATED, GDK_DISABLE_DEPRECATED и GTK_DISABLE_DEPRECATED за АТК, Панго, Глиб, GdkPixbuf, ГДК и ГТК+ тим редоследом.
You can test that your program only uses functions that properly support multihead (multiple monitor) systems by defining GDK_MULTIHEAD_SAFE and GTK_MULTIHEAD_SAFE.
4.2. GLib 2.18
GNOME 2.24 is the first version of GNOME release to depend on GLib 2.18.
GLib 2.18 features better support for providing context in string translations with C_() and NC_() macros as well as additional API in GIO.
A complete list of new symbols is available for GLib and GIO.
4.3. GTK+ 2.14
GNOME 2.24 is the first GNOME release to depend on GTK+ 2.14.
An important change in this version of GTK+ is that all widgets that inherit from GtkAdjustment (e.g. spinbuttons and sliders) now strictly enforce their range as [lower, upper - page size], as per the documentation. If you want to ensure a range of [lower, upper], set page_size to 0.
All versions of Glade (including 3.4.1) currently create GtkSpinButton, GtkHScale and GtkVScale with a page_size of 10 by default. Developers should check any Glade files they have created to ensure the page size is a value that makes sense.
A new class, GtkMountOperation has been provided for passing to g_volume_mount. GtkMountOperation is a GMountOperation that is able to display an authentication dialog to the user if required.
A portable method for opening files and other URIs using the default application is now available using the function gtk_show_uri(), rather than having to depend on libgnome. GDK now provides an implementation of GAppLaunchContext for handling graphical applications (including startup notification and focus stealing prevention), GdkAppLaunchContext.
Also new in GTK+ 2.14 is a GFile-based API for GtkFileChooser and the ability for GtkBuilder to build fragments of an XML tree.
A complete list of new symbols is available for GTK+ and GDK.
4.4. Instant Messaging Libraries
Along with its new instant messaging client (see Одељак 2.1 ― Останите у контакту), GNOME 2.24 includes the libraries libempathy, libempathy-gtk and telepathy-glib that can be used to integrate instant messaging features into any GNOME application.
4.5. Чаробна линија
The Match interface now includes two new methods: set_snippet and get_snippet. If a snippet is set it will be displayed in a new line underneath the match's get_verb value.
The Action interface has gained a new method get_tooltip. Overriding this method allows a tooltip to be shown when the user hovers the mouse over a match or action.