Šta je novo za programere

Sledeće promene su važne programerima koji koriste Gnomovu platformu u izdanju 2.24. Ako vas ne zanimaju izmene, preskočite na Odeljak 5 ― Šta je novo povodom „Gnoma za u pokretu“.

4.1. Priprema za Glib i GTK+ 3.0

Kako bi započeli pripremu programera za Glib i GTK+ 3.0, naredna izdanja obe biblioteke će uključiti zastavice za postavljanje strožijih kontrola saglasnosti.

Glib, GTK+ i ATK 3.0 će zahtevati da samo zaglavlja najvišeg nivoa (npr. glib.h, gobject.h, gio.h) budu uključena u kod programa. Ova promena je neophodna kako uklanjanje i preimenovanje pojedinačnih zaglavlja ne bi uticalo na izvorni kod programa.

Programeri mogu proveriti saglasnost koda već sada, koristeći opcije G_DISABLE_SINGLE_INCLUDES za Glib, GTK_DISABLE_SINGLE_INCLUDES za GTK+ i ATK_DISABLE_SINGLE_INCLUDES za ATK u trenutku prevođenja.

Prosledite ove zastavice kompilatoru pri izgradnji programa (npr. -DG_DISABLE_SINGLE_INCLUDES) da se uverite u ispravnost vašeg programa.

Dalja provera saglasnosti

Glib, GTK+ i pridružene biblioteke takođe obezbeđuju zastavice koje možete koristiti da proverite saglasnost sa GTK+ izdanjem 3.0.

Podršku za zastarele simbole i klase koji će biti uklonjeni u izdanju 3.0 možete isključiti definisanjem sledećih simbola u trenutku prevođenja: ATK_DISABLE_DEPRECATED, PANGO_DISABLE_DEPRECATED, G_DISABLE_DEPRECATED, GDK_PIXBUF_DISABLE_DEPRECATED, GDK_DISABLE_DEPRECATED i GTK_DISABLE_DEPRECATED za ATK, Pango, Glib, GdkPixbuf, GDK i GTK+ tim redosledom.

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.

Glade and GTK+ 2.14

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 Odeljak 2.1 ― Ostanite u kontaktu), 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. Čarobna linija

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.