This site has been retired. For up to date information, see handbook.gnome.org or gitlab.gnome.org.


[Home] [TitleIndex] [WordIndex

GNOME Goal: Remove deprecated GTK+ symbols

Summary

The goal is to remove the deprecated GTK+, GDK and gdk-pixbuf symbols (functions, structs, macros, etc.) and replace them with something that fits better (usually a newer symbol). This has to be done for each GNOME module (application or library).

Guidelines

Compile your application with :

make CFLAGS+="-DGDK_PIXBUF_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED"

For help on these symbols, you may give a look to the lists of deprecated symbols in gdk-pixbuf, GDK 2 and GTK+ 2. Those lists are generated automatically and always up-to-date.

Guidelines for modules written in C/C++

Step 1: Detect if the module uses deprecated symbols

You don't need to compile the module for that. Just get its source code, a file that contains the deprecated symbols to look for, and use the git grep command to look for deprecated symbols in the module source code.

For example, the following command uses a file that contains the name of the deprecated symbols, and looks for them in each source file:

git grep -w -f deprecated-gtk-2.24-symbols.txt

You may download files that lists those deprecated symbols for use with the above command:

Module

Version

Deprecated symbols file

GTK+

2.24

deprecated-gtk-2.24-symbols.txt

GDK

2.24

deprecated-gdk-2.24-symbols.txt

gdk-pixbuf

2.24

deprecated-gdk-pixbuf-2.24-symbols.txt

Step 2: Compile the module

Compile the module without doing any modifications, just to make sure you're able to compile it without errors. You should be able to compile it alone.

Step 3: Compile the module with the deprecated symbols disabled

Compile the module again, but this time, define the GDK_PIXBUF_DISABLE_DEPRECATED, GDK_DISABLE_DEPRECATED and GTK_DISABLE_DEPRECATED symbol, which will disable deprecated GTK+, gdk-pixbuf and gdk symbols. There's more than one way to do it. You can for example use :

make CFLAGS+="-DGDK_PIXBUF_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED"

If you're using Jhbuild, you can make him use this setting by adding the following line to your .jhbuildrc (and putting the right module name)

module_makeargs['name-of-the-module'] = makeargs + 'CFLAGS+="-DGDK_PIXBUF_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED"'

If your module uses the GNOME autoconf macros, you can ensure GNOME_MAINTAINER_MODE_DEFINES is used in your configure.in, and that $(DISABLE_DEPRECATED) is included in the *_CPPFLAGS variables for all your compilation targets. $(DISABLE_DEPRECATED) is defined by GNOME_MAINTAINER_MODE_DEFINES, and has *_DISABLE_DEPRECATED flags for GTK+, GDK+ and GLib, amongst others.

To enable compilation with GDK_PIXBUF_DISABLE_DEPRECATED, GDK_DISABLE_DEPRECATED and GTK_DISABLE_DEPRECATED defined, simply pass the --enable-maintainer-mode argument when calling the configure script. If using jhbuild, you can put it in the module_autogenargs string for your module in your .jhbuildrc:

module_autogenargs['name-of-the-module'] = autogenargs + ' --enable-maintainer-mode'

Step 4: Replace the obsolete symbols by something that works and that is not deprecated

This is where most of the work takes place. There are several different deprecated symbols, so there's no single answer on how to do it. Sometimes the API documentation will give you the answer, or an hint, and sometimes you'll have to think by yourself.

Status of this goal

{i} Tip: If you choose to work on a module, create the bug report on the GNOME bugzilla and mark it as blocking this tracker bug.

State

Markup

todo

<: #ff8080> todo

patch

<: #ffc849> [GnomeBug:xxxxx patch]

done

<: #80ff80> [GnomeBug:xxxxx done]

not needed

<: #80ff80> not needed

Above are the states and corresponding markup to update the modules state table below.

Tarball

Status

Desktop

alacarte

not needed

brasero

done

bug-buddy

not needed

cheese

done

control-center

done

dasher

done

deskbar-applet

done

ekiga

done

empathy

not needed

eog

not needed

epiphany

done

evince

done

evolution-data-server

done

evolution

done

evolution-exchange

done

evolution-mapi

done

evolution-webcal

done

file-roller

done

gcalctool

done

gconf-editor

done

gdm

done

gedit

done

gnome-applets

done

gnome-backgrounds

not needed

gnome-desktop

not needed

gnome-doc-utils

not needed

gnome-games

done

gnome-icon-theme

not needed

gnome-keyring

done

gnome-netstatus

done

gnome-nettool

done

gnome-mag

done

gnome-media

done

gnome-menus

not needed

gnome-panel

done

gnome-power-manager

done

gnome-python-desktop

done

gnome-screensaver

done

gnome-session

done

gnome-settings-daemon

done

gnome-speech

not needed

gnome-system-monitor

done

gnome-system-tools

done

gnome-terminal

done

gnome-themes

not needed

gnome-user-docs

not needed

gnome-user-share

done

gnome-utils

done

gok

done

gstreamer

done

gst-plugins-base

done

gst-plugins-good

done

gtk-engines

done

fixed in 2.90

gtkhtml

done

gtksourceview

not needed

gucharmap

not needed

gvfs

not needed

hamster

done

libgail-gnome

done

libgnomekbd

done

libgtop

not needed

libgweather

done

liboobs

done

librsvg

done

libsoup

not needed

libwnck

done

metacity

done

mousetweaks

done

nautilus

done

orca

done

pygtksourceview

done

seahorse

done

seahorse-plugins

done

sound-juicer

done

swfdec-gnome

done

tomboy

done

totem-pl-parser

not needed

totem

done

vinagre

done

vino

done

vte

not needed

yelp

done

zenity

done

Desktop (to be deprecated)

libgnomeprint

not needed

not used in 2.27 anymore

libgnomeprintui

not needed

not used in 2.27 anymore

Platform

GConf

done

at-spi

done

atk

not needed

gail

not needed

merged into GTK+

glib

not needed

gnome-vfs

not needed

not used in 2.27 anymore

gtk+

not needed

gtk-doc

not needed

intltool

not needed

libglade

to do

libxml2

not needed

libxslt

not needed

pango

done

pkgconfig

not needed

Platform (to be deprecated)

ORBit2

not needed

audiofile

not needed

esound

not needed

libIDL

not needed

libart_lgpl

not needed

libbonobo

not needed

libbonoboui

to do

libgnome

to do

libgnomecanvas

done

libgnomeui

to do

Admin

pessulus

to do

sabayon

to do

Development Tools

accerciser

done

anjuta

done

devhelp

done

gdl

done

glade3

done

gnome-devel-docs

not needed

Mobile

gconf-dbus

to do

evolution-data-server-dbus

to do

Bindings (C++)

glibmm

to do

gtkmm

to do

libglademm

to do

gconfmm

to do

libgnomecanvasmm

to do

libgnome-vfsmm

to do

libgnomemm

to do

libgnomeuimm

to do

libxml++

to do

Bindings (java)

glib-java (jg-common)

to do

libgtk-java

to do

libgnome-java

to do

libgconf-java

to do

libglade-java

to do

Bindings (perl)

Glib

not needed

Gtk2

to do

Gtk2-GladeXML

Patch

Gnome2-GConf

to do

Gnome2-Canvas

to do

Gnome2-VFS

to do

Gnome2

to do

Bindings (python)

pygobject

not needed

pygtk

Patch

gnome-python

not needed

Bindings (mono)

gtk-sharp

to do

External dependencies

PolicyKit-gnome

done

libcanberra

done

Other

abiword

to do

atomix

to do

balsa

done

banshee

not needed

banter

to do

beagle

to do

contact-lookup-applet

to do

dia

patch

eggcups

to do

f-spot

done

gegl

done

gimp

to do

glom

done

gnome-blog

to do

gnome-bluetooth

to do

gnome-cups-manager

not needed

gnome-main-menu

to do

gnome-mud

to do

goocanvas

not needed

only in commented code

GParted

not needed

GNOME Phone Manager

to do

gnome-pilot

done

Gnumeric

done

gossip

to do

gtetrinet

to do

gthumb

to do

gtranslator

done

krb5-auth-dialog

to do

leafpad

to do

libbtctl

to do

libgda

done

libgnomekbd

done

libgoffice

to do

libgsf

to do

libslab

patch

modest

done

mutter

done

nautilus-sendto

done

nautilus-vcs

to do

nemiver

not needed

NetworkManager

done

network-manager-applet

done

ontv

done

planner

to do

rhythmbox

done

tinymail

done

tracker

done

Transmission

not needed

webkit

done

xchat-gnome

done


CategoryOptimization


2024-10-23 11:17