Bug#885751: teg: Port to GooCanvas / GTK+ 3 / GSettings

Yavor Doganov yavor at gnu.org
Thu Aug 30 00:53:47 BST 2018


tags 885751 + patch
thanks

Attached are patches that should fix this bug completely (removing all
dependencies on old libraries that are scheduled for removal), plus
the following issues of non-RC severity:

  * The package doesn't build twice in a row.
  * The build system is not parallel-safe.
  * The distclean target is not working properly.
  * Yelp does not display the manual when invoked from the menu.
  * Theme selection is broken.  The workaround with the shell script
    invoking gconftool-2 just masks the problem.  The real culprit is
    that a dynamically allocated string is assigned to static storage,
    which is then reused and ends up being garbage which GConf
    attempts to save as the value for the "theme" key.
  * The key msgshow_with_color ("Console Messages -> Show Players
    Messages with colors" in the Preferences window) is ignored as a
    FALSE value is always assigned programmatically on startup.
  * The mainstatus (the rectangle just below the toolbar) is not
    aligned with the main canvas (the map).
  * The ministatus (the small circle at the bottom right corner of the
    window) is not updated immediately when the user is disconnected.

I tested my patch intensively, including playing a network-based game
with two human players and a robot.  For the necessity to incorporate
GooCanvas code, please refer to the link that is in the patch
description.  It is almost impossible to play the game without it as
in many cases the wrong country is selected (e.g., the mouse pointer
is over Ethiopia but Egypt is chosen as the image rectangles overlap).
I'll try to rework my approach to avoid adding a member to a public
structure and will propose it upstream.

I also tested the GConf data migration on two machines.  It was not
working as expected initially, I had to add this explicit sleep call.

The switch from intltool to gettext was necessary to fix the build
system (AM_GLIB_GNU_GETTEXT is relying on mkinstalldirs which
debhelper removes but automake does not install as it is deprecated).

I also dropped the explicit datadir passed to configure as it makes
installation of schemas, .convert and .desktop files more cumbersome.
I saw this change was made in 0.11.1-3 but couldn't figure out why.
Installing images in a subdirectory of /usr/share/pixmaps is perfectly
fine and many packages are doing it.

Finally, it was very difficult for me to stick with the coding style
as it is extremely inconsistent -- even adjacent statements in one
function are written in different style :-(  There are many places
where I didn't know which style I have to follow.  The indentation
style is what Emacs guessed, and I tried to duplicate the leading tabs
so that the diff is more homogeneous and easier for review (and for
incorporation upstream, eventually).
-------------- next part --------------
Description: Port to Goocanvas, GTK+ and GSettings.
 This patch fixes some other minor bugs and annoyances and also
 migrates the package from intltool to gettext.
 .
 Due to a limitation of GooCanvasImage, a new subclass TegCanvasImage
 was necessary, code almost identical to GooCanvas' goocanvasimage.c.
 If/when this is fixed in GooCanvas upstream, tegcanvasimage.{h,c}
 should be removed, and teg_canvas_image_new should be replaced with
 goo_canvas_image_new, adding the appropriate versioned
 build-dependency.  For details, see the thread starting at
 https://mail.gnome.org/archives/goocanvas-list/2018-August/msg00000.html.
 .
 The drag & drop functionality is not entirely complete and was not
 tested as it is work in progress in the original code.
 .
 The GConf data migration code can be dropped during the bullseye
 development cycle along with the teg.convert file.
 .
 The code for handling the stock icons (originally borrowed from
 libgnomeui) was dropped entirely in favor of GtkIconTheme +
 GResource.  AFAIU there is no other way to implement stock icons
 (even app-specific) in GTK+ 3.
Bug-Debian: https://bugs.debian.org/885751
Author: Yavor Doganov <yavor at gnu.org>
Forwarded: no
Last-Update: 2018-08-30
---

--- teg-0.11.2+debian.orig/client/gui-gnome/Makefile.am
+++ teg-0.11.2+debian/client/gui-gnome/Makefile.am
@@ -1,9 +1,8 @@
 ## Process this file with automake to produce Makefile.in
-Gamesdir = $(datadir)/gnome/apps/Games
-
 noinst_LIBRARIES = libguiclient.a
 INCLUDES = \
 	$(TEG_LIBGNOME_CFLAGS)				\
+	$(XML_CFLAGS)					\
 	-I$(srcdir)/..					\
 	-I$(top_srcdir)/common				\
 	-I../../intl					\
@@ -36,19 +35,32 @@
 	preferences.c preferences.h \
 	g_scores.c g_scores.h \
 	locate_country.c locate_country.h \
+	tegcanvasimage.c tegcanvasimage.h \
+	stock_gresources.c stock_gresources.h \
 	fonts.h			\
 	robot.xpm
 
+CLEANFILES = stock_gresources.h stock_gresources.c
+RESOURCE = stock.gresource.xml
 
+stock.c: stock_gresources.h stock_gresources.c
+stock_gresources.c: $(RESOURCE) stock_gresources.h $(shell \
+	$(GLIB_COMPILE_RESOURCES) --generate-dependencies $(RESOURCE))
+	$(GLIB_COMPILE_RESOURCES) --target=$@ \
+	  --generate-source --manual-register --c-name=stock $<
+stock_gresources.h:  $(RESOURCE) $(shell \
+	$(GLIB_COMPILE_RESOURCES) --generate-dependencies $(RESOURCE))
+	$(GLIB_COMPILE_RESOURCES) --target=$@ \
+	  --generate-header --manual-register --c-name=stock $<
+
+EXTRA_DIST = $(gsettings_SCHEMAS) $(RESOURCE)
+
+gsettings_SCHEMAS = net.sf.teg.gschema.xml
 
- at INTLTOOL_DESKTOP_RULE@
-
-schemadir   = $(sysconfdir)/gconf/schemas
-schema_DATA = teg.schemas
-
-EXTRA_DIST = teg.desktop $(schema_DATA)
+ at GSETTINGS_RULES@
 
-Games_DATA = teg.desktop
+data_desktopdir = $(datadir)/applications
+dist_data_desktop_DATA = teg.desktop
 
-install-data-local:
-	GCONF_CONFIG_SOURCE=$(GCONF_CONFIG_SOURCE) $(GCONFTOOL) --makefile-install-rule $(srcdir)/$(schema_DATA)
+data_convertdir = $(datadir)/GConf/gsettings
+dist_data_convert_DATA = teg.convert
--- teg-0.11.2+debian.orig/configure.in
+++ teg-0.11.2+debian/configure.in
@@ -12,7 +12,6 @@
 AC_PROG_CC
 AC_PROG_CPP
 AC_PROG_CXX
-AC_PROG_INTLTOOL([0.29])
 AC_PROG_LIBTOOL
 AC_PROG_LN_S
 
@@ -94,37 +93,14 @@
   *)   AC_MSG_ERROR(bad value ${enableval} for --enable-ggz) ;;
 esac], [ggz=true])
 
-
-dnl
-dnl GCONF stuff
-dnl
-dnl Specify the gconf configuration source,
-dnl use specific location for SUSE Linux 10.0 if it exists and no value was given
-dnl default to xml::$(sysconfdir)/gconf/gconf.xml.defaults
-GCONF_CONFIG_SOURCE=
-
-if test -d "/etc/opt/gnome/gconf/gconf.xml.defaults"; then
-        GCONF_CONFIG_SOURCE="xml::/etc/opt/gnome/gconf/gconf.xml.defaults"
-fi
-
-AC_ARG_ENABLE(gconf-source, [  --enable-gconf-source=sourceaddress Where to install schema files.], GCONF_CONFIG_SOURCE=$enable_gconf_source,)
-
-if test "x$GCONF_CONFIG_SOURCE" = "x"; then
-	GCONF_CONFIG_SOURCE="xml::\${sysconfdir}/gconf/gconf.xml.defaults"
-fi
-
-AC_SUBST(GCONF_CONFIG_SOURCE)
-AC_SUBST(INSTALL_GCONF_CONFIG_SOURCE)
-
-AC_PATH_PROG(GCONFTOOL, gconftool-2)
-
+GLIB_GSETTINGS
 
 dnl does the robot needs something special ???
 dnl if test x$robot = xtrue; then
 dnl fi
 
 if test x$client = xtrue; then
-	PKG_CHECK_MODULES(TEG_LIBGNOME, libgnomeui-2.0)
+	PKG_CHECK_MODULES(TEG_LIBGNOME, goocanvas-2.0)
 	AC_SUBST(TEG_LIBGNOME_CFLAGS)
 	AC_SUBST(TEG_LIBGNOME_LIBS)
 fi
@@ -170,7 +146,9 @@
 AC_SUBST(GETTEXT_PACKAGE)
 AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], "$GETTEXT_PACKAGE", [Gettext package name])
 ALL_LINGUAS="es fr de gl pl it pt pt_BR hu_HU"
-AM_GLIB_GNU_GETTEXT
+AM_PATH_GLIB_2_0
+AM_GNU_GETTEXT_VERSION([0.19])
+AM_GNU_GETTEXT([external])
 
 
 dnl DATADIRNAME is generated by AM_GNU_GETTEXT; 
--- teg-0.11.2+debian.orig/client/gui-gnome/gui.c
+++ teg-0.11.2+debian/client/gui-gnome/gui.c
@@ -25,7 +25,8 @@
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
-#include <gnome.h>
+#include <gtk/gtk.h>
+#include <glib/gi18n.h>
 
 #include "gui.h"
 #include "client.h"
@@ -56,14 +57,6 @@
 
 static TEG_STATUS get_default_values( void );
 
-static const struct poptOption options[] = {
-#ifdef WITH_GGZ
-	{"ggz", '\0', POPT_ARG_NONE, &g_game.with_ggz, 0, N_("Enables GGZ mode"), NULL},
-#endif /* WITH_GGZ */
-	{"observe", '\0', POPT_ARG_NONE, &g_game.observer, 0, N_("Observe the game, dont play it"), NULL},
-	{NULL, '\0', POPT_ARG_NONE, 0, 0, NULL, NULL}
-};
-
 /* shows your secret mission */
 TEG_STATUS gui_mission()
 {
@@ -138,15 +131,78 @@
 TEG_STATUS gui_exit( char *str)
 {
 	locate_country_exit();
+	g_object_unref(settings);
 
 	gtk_main_quit();
 	return TEG_STATUS_SUCCESS;
 }
 
+static gchar *msg = NULL;
+
+/* Migrate old GConf settings to GSettings.  As it relies on gconf2
+   being available, that is almost certain to fail for users upgrading
+   from stretch to buster.  See
+   https://alioth-lists.debian.net/pipermail/pkg-gnome-maintainers/2018-August/145477.html */
+static void
+migrate_gconf_settings (const gchar *name)
+{
+  gboolean needed = TRUE;
+  GError *error = NULL;
+  GKeyFile *kf;
+  gchar **list;
+  gsize i, n;
+
+  kf = g_key_file_new ();
+
+  g_key_file_load_from_data_dirs (kf, "gsettings-data-convert",
+                                  NULL, G_KEY_FILE_NONE, NULL);
+  list = g_key_file_get_string_list (kf, "State", "converted", &n, NULL);
+
+  if (list)
+    {
+      for (i = 0; i < n; i++)
+        if (!g_strcmp0 (list[i], name))
+          {
+            needed = FALSE;
+            break;
+          }
+
+      g_strfreev (list);
+    }
+
+  g_key_file_free (kf);
+
+  if (needed)
+    {
+      g_spawn_command_line_sync ("gsettings-data-convert",
+                                 NULL, NULL, NULL, &error);
+
+      if (error)
+        {
+          msg = g_strdup_printf (_("Warning: Could not migrate old GConf "
+                                   "settings: %s\nPlease make sure that GConf "
+                                   "is installed and the "
+                                   "gsettings-data-convert tool is in your "
+                                   "PATH. Alternatively, ignore this message "
+                                   "and convert your old settings manually."),
+                                 error->message);
+          g_error_free (error);
+        }
+      else
+        {
+          msg = g_strdup (_("Old GConf settings were either missing or "
+                            "migrated successfully."));
+
+          /* Allow some time for the GSettings backend to record the
+             changes, otherwise get_default_values is called before
+             the old settings are in effect.  */
+          sleep (1);
+        }
+    }
+}
+
 TEG_STATUS gui_init( int argc, char **argv)
 {
-	GnomeClient *client;
-
 #ifdef ENABLE_NLS
 	/*
 	 * I'm not sure if I must call setlocale() or gtk_set_locale() or nothing, since the gnome-hello
@@ -158,19 +214,13 @@
 	textdomain(PACKAGE);
 #endif
 
-	gnome_program_init (PACKAGE, VERSION,
-			LIBGNOMEUI_MODULE,
-			argc, argv,
-			GNOME_PARAM_POPT_TABLE, options,
-			GNOME_PARAM_APP_DATADIR, DATADIR, NULL);
+	gtk_init (&argc, &argv);
 
-	/* Get the default GConfClient */
-	g_conf_client = gconf_client_get_default ();
+	settings = g_settings_new ("net.sf.teg");
 
 	stock_init();
 
-	client = gnome_master_client();
-
+	migrate_gconf_settings("teg.convert");
 	get_default_values();
 
 	theme_load(g_game.theme);
@@ -201,6 +251,10 @@
 	textmsg(M_ALL,_("Tenes Empanadas Graciela - Gnome client v%s - by Ricardo Quesada"),VERSION);
 	textmsg(M_ALL,_("Using theme '%s - v%s' by %s\n"),g_game.theme, gui_theme.version,gui_theme.author);
 
+	if (msg) {
+	  textmsg(M_ALL, msg);
+	  g_free(msg);
+	}
 	/* put the buttons in 'sensitive'*/
 	set_sensitive_tb();
 
@@ -218,10 +272,8 @@
 
 TEG_STATUS gui_disconnect(void)
 {
-	if( gui_private.tag >=0 )
-		gdk_input_remove( gui_private.tag );
 	if( gui_private.tag_ggz >=0 )
-		gdk_input_remove( gui_private.tag_ggz );
+		g_source_remove( gui_private.tag_ggz );
 
 	gui_private.tag=-1;
 	gui_private.tag_ggz=-1;
@@ -229,6 +281,8 @@
 
 	dices_unview();
 	armies_unview();
+	ministatus_update();
+	mainstatus_update();
 
 	return TEG_STATUS_SUCCESS;
 }
@@ -253,51 +307,36 @@
 {
 	gchar *string;
 
-	string = gconf_client_get_string( g_conf_client, "/apps/teg/playername",NULL);
-	if( string && string[0] )
+	string = g_settings_get_string( settings, "playername" );
+	if( g_ascii_strcasecmp(string, "") )
 		strncpy(g_game.myname,string,PLAYERNAME_MAX_LEN);
 	else
 		strncpy(g_game.myname,getenv("LOGNAME"),PLAYERNAME_MAX_LEN);
 
+	g_free( string );
 
-	g_game.mycolor = gconf_client_get_int( g_conf_client, "/apps/teg/color", NULL);
+	g_game.mycolor = g_settings_get_int( settings, "color" );
 
-	string = gconf_client_get_string( g_conf_client, "/apps/teg/servername",NULL);
-	if( string )
-		strncpy(g_game.sername,string,SERVER_NAMELEN);
-	else
-		strncpy(g_game.sername,"localhost",SERVER_NAMELEN);
+	string = g_settings_get_string( settings, "servername" );
+	strncpy(g_game.sername,string,SERVER_NAMELEN);
+	g_free(string);
+
+	g_game.msg_show = g_settings_get_int( settings, "msgshow" );
+	gui_private.msg_show_colors
+	  = g_settings_get_boolean (settings, "msgshow-with-color" );
+	gui_private.dialog_show = g_settings_get_int( settings, "dialog-show" );
+	string = g_settings_get_string( settings, "theme" );
+	strncpy( g_game.theme, string ,sizeof(g_game.theme) );
+	g_free( string );
 
-	g_game.msg_show = gconf_client_get_int( g_conf_client, "/apps/teg/msgshow",NULL);
-	gui_private.msg_show_colors =  gconf_client_get_bool( g_conf_client, "/apps/teg/msgshow_with_color",NULL);
-	gui_private.dialog_show =  gconf_client_get_int( g_conf_client, "/apps/teg/dialog_show",NULL);
-	string = gconf_client_get_string( g_conf_client, "/apps/teg/theme",NULL);
-	if( string )
-		strncpy( g_game.theme, string ,sizeof(g_game.theme) );
-	else
-		strncpy( g_game.theme, "m2" ,sizeof(g_game.theme) );
-	g_game.robot_in_server = gconf_client_get_bool( g_conf_client, "/apps/teg/robot_in_server",NULL);
+	g_game.robot_in_server = g_settings_get_boolean( settings,
+	                                                 "robot-in-server" );
 	
-	gui_private.status_show =  gconf_client_get_int( g_conf_client, "/apps/teg/status_show",NULL);
-	g_game.serport = gconf_client_get_int( g_conf_client, "/apps/teg/port",NULL);
-	// if serport is still 0 then this must be the first start of this program, so set serport and
-	// status_show to reasonable default values
-	if ( g_game.serport == 0 )
-	{
-		g_game.serport = 2000;
-		gui_private.status_show = 453;
-	}
-	
-	gconf_client_set_int   ( g_conf_client, "/apps/teg/port",  g_game.serport, NULL);
-	gconf_client_set_string( g_conf_client, "/apps/teg/servername",g_game.sername, NULL);
-	gconf_client_set_string( g_conf_client, "/apps/teg/playername",g_game.myname, NULL);
-	gconf_client_set_string( g_conf_client, "/apps/teg/theme",g_game.theme, NULL);
-	gconf_client_set_int( g_conf_client, "/apps/teg/color",g_game.mycolor, NULL);
-	gconf_client_set_int( g_conf_client, "/apps/teg/msgshow",g_game.msg_show, NULL);
-	gconf_client_set_bool( g_conf_client, "/apps/teg/msgshow_with_color",gui_private.msg_show_colors, NULL);
-	gconf_client_set_int( g_conf_client, "/apps/teg/status_show",gui_private.status_show, NULL);
-	gconf_client_set_int( g_conf_client, "/apps/teg/dialog_show",gui_private.dialog_show, NULL);
-	gconf_client_set_bool( g_conf_client, "/apps/teg/robot_in_server",g_game.robot_in_server, NULL);
+	gui_private.status_show = g_settings_get_int( settings, "status-show" );
+	g_game.serport = g_settings_get_int( settings, "port" );
+
+	g_settings_set_string( settings, "playername", g_game.myname );
+
 	return TEG_STATUS_SUCCESS;
 }
 
--- teg-0.11.2+debian.orig/client/gui-gnome/priv.h
+++ teg-0.11.2+debian/client/gui-gnome/priv.h
@@ -22,8 +22,7 @@
 #ifndef __TEG_GUI_GNOME_PRIV_H
 #define __TEG_GUI_GNOME_PRIV_H
 
-#include <gnome.h>
-#include <gconf/gconf-client.h>
+#include <gtk/gtk.h>
 
 enum {
 	DIALOG_ATTACK_TURN,
@@ -42,7 +41,7 @@
 
 extern struct _gui_private gui_private;
 
-extern GConfClient *g_conf_client;
+extern GSettings *settings;
 
 TEG_STATUS priv_init( void );
 
--- teg-0.11.2+debian.orig/client/gui-gnome/callbacks.h
+++ teg-0.11.2+debian/client/gui-gnome/callbacks.h
@@ -21,7 +21,7 @@
 #ifndef __GUI_GNOME_CALLBACKS_H
 #define __GUI_GNOME_CALLBACKS_H
 
-#include <gnome.h>
+#include <gtk/gtk.h>
 #include "gui.h"
 #include "client.h"
 
@@ -69,10 +69,12 @@
 
 void on_start_activate(GtkMenuItem  *menuitem, gpointer         user_data);
 
+void on_help_activate(GtkMenuItem *menuitem, gpointer user_data);
+
 void destroy_window( GtkWidget * widget, GtkWidget **window );
 
 void raise_and_focus (GtkWidget *widget);
 
-TEG_STATUS pre_client_recv( gpointer data, int sock, GdkInputCondition GDK_INPUT_READ );
+gboolean pre_client_recv(GIOChannel *source, GIOCondition cond, gpointer data);
 
 #endif /* __GUI_GNOME_CALLBACKS_H */
--- teg-0.11.2+debian.orig/client/gui-gnome/g_country.h
+++ teg-0.11.2+debian/client/gui-gnome/g_country.h
@@ -24,7 +24,7 @@
 #ifndef __TEG_GUI_GNOME_GCOUNTRY_H
 #define __TEG_GUI_GNOME_GCOUNTRY_H
 
-#include <gnome.h>
+#include <goocanvas.h>
 
 struct _G_countries {
 	char *gfx_name;			/**< name del archivo grafico del country */
@@ -34,10 +34,10 @@
 	gint y_len;			/**<		"" 				*/
 	gint x_center;			/**< si las fichas no estan centradas usar esto	*/
 	gint y_center;			/**<              ""				*/
-	GnomeCanvasGroup *country_group;	/**< contenedor del country */
-	GnomeCanvasItem *country_item;	/**< the figure of the map (png) */
-	GnomeCanvasItem *ellip_item;	/**< circle of armies of the country */
-	GnomeCanvasItem *text_item;	/**< the number of armies of the country */
+	GooCanvasItem *country_group;	/**< contenedor del country */
+	GooCanvasItem *country_item;	/**< the figure of the map (png) */
+	GooCanvasItem *ellip_item;	/**< circle of armies of the country */
+	GooCanvasItem *text_item;	/**< the number of armies of the country */
 }; 
 
 extern struct _G_countries G_countries[];
--- teg-0.11.2+debian.orig/client/gui-gnome/interface.h
+++ teg-0.11.2+debian/client/gui-gnome/interface.h
@@ -36,8 +36,6 @@
 TEG_STATUS set_sensitive_tb(void);
 void tropas_window( int src, int dst, int cant );
 void reagrupe_window( int src, int dst, int cant );
-void free_imlib_image (GtkObject *object, gpointer data);
-void free_imlib_image_ptr (GtkObject *object, gpointer *data);
 
 
 #endif /* __TEG_GUI_GNOME_INTERFACE_H */
--- teg-0.11.2+debian.orig/client/gui-gnome/dices.h
+++ teg-0.11.2+debian/client/gui-gnome/dices.h
@@ -26,6 +26,6 @@
 
 void dices_view();
 void dices_unview();
-void dices_init( GnomeCanvasGroup *root);
+void dices_init(GooCanvasItem *root);
 
 #endif 
--- teg-0.11.2+debian.orig/client/gui-gnome/armies.h
+++ teg-0.11.2+debian/client/gui-gnome/armies.h
@@ -27,7 +27,7 @@
 typedef struct _armies_pos {
 	int cant;
 	int orig_cant;
-	GnomeCanvasItem *armies_text;
+	GooCanvasItem *armies_text;
 } ARMIES_POS, *PARMIES_POS;
 
 TEG_STATUS armies_add(int country);
--- teg-0.11.2+debian.orig/client/gui-gnome/colors.h
+++ teg-0.11.2+debian/client/gui-gnome/colors.h
@@ -51,18 +51,15 @@
 extern GdkPixbuf	*g_color_players[];
 extern GdkPixbuf	*g_color_circles[];
 extern GdkPixbuf	*g_color_circle_over;
-extern GdkGC *g_colors_gc;
-extern GdkFont* g_pixmap_font10;
 
 TEG_STATUS colors_allocate( void );
-TEG_STATUS colors_free();
 TEG_STATUS colors_load_images( void );
-GdkColor* colors_get_player( int n );
-GdkColor* colors_get_player_from_color( int color );
-GdkColor* colors_get_player_ink(int n );
-GdkColor* colors_get_player_ink_from_color(int color );
-GdkColor* colors_get_player_virtual( int n );
-GdkColor* colors_get_common( int n );
+GdkRGBA* colors_get_player( int n );
+GdkRGBA* colors_get_player_from_color( int color );
+GdkRGBA* colors_get_player_ink(int n );
+GdkRGBA* colors_get_player_ink_from_color(int color );
+GdkRGBA* colors_get_player_virtual( int n );
+GdkRGBA* colors_get_common( int n );
 char * get_tag_for_color( int color );
 char * get_background_for_color( int c );
 char * get_foreground_for_color( int c );
--- teg-0.11.2+debian.orig/client/gui-gnome/callbacks.c
+++ teg-0.11.2+debian/client/gui-gnome/callbacks.c
@@ -25,7 +25,8 @@
 #  include <config.h>
 #endif
 
-#include <gnome.h>
+#include <gtk/gtk.h>
+#include <glib/gi18n.h>
 
 #include "gui.h"
 #include "client.h"
@@ -66,18 +67,18 @@
 /* Brings attention to a window by raising it and giving it focus */
 void raise_and_focus (GtkWidget *widget)
 {
-	g_assert (GTK_WIDGET_REALIZED (widget));
-	gdk_window_show (widget->window);
+	g_assert (gtk_widget_get_realized (widget));
+	gdk_window_show (gtk_widget_get_window (widget));
 	gtk_widget_grab_focus (widget);
 }
 
 /*
  * otras funciones
  */
-TEG_STATUS pre_client_recv( gpointer data, int sock, GdkInputCondition GDK_INPUT_READ )
+gboolean pre_client_recv (GIOChannel *source, GIOCondition cond, gpointer data)
 {
-	client_recv( sock );
-	return TEG_STATUS_SUCCESS;
+	client_recv( g_io_channel_unix_get_fd (source) );
+	return TRUE;
 }
 
 /*
@@ -91,6 +92,7 @@
 
 void on_disconnect_activate (GtkMenuItem *menuitem, gpointer user_data)
 {
+	shutdown_channel();
 	teg_disconnect();
 }
 
@@ -107,9 +109,9 @@
 
 void on_exit_activate (GtkWidget *widget, gpointer user_data)
 {
+	shutdown_channel();
 	teg_disconnect();
 	cards_free();
-	colors_free();
 	gtk_main_quit();
 }
 
@@ -170,14 +172,22 @@
 	set_sensitive_tb();
 }
 
-static void surrender_cb (int button, gpointer data)
-{
-	if (button == 0)
-		out_surrender();
-}
 void on_surrender_activate(GtkMenuItem *menuitem, gpointer user_data)
 {
-	gnome_question_dialog_parented (_("Really surrender ?"), surrender_cb, NULL, GTK_WINDOW(main_window));
+        GtkWidget *dialog;
+        gint response;
+
+        dialog = gtk_message_dialog_new (GTK_WINDOW (main_window),
+                                         GTK_DIALOG_DESTROY_WITH_PARENT,
+                                         GTK_MESSAGE_INFO,
+                                         GTK_BUTTONS_YES_NO,
+                                         _("Really surrender ?"));
+
+        response = gtk_dialog_run (GTK_DIALOG (dialog));
+        if (response == GTK_RESPONSE_YES)
+                out_surrender();
+
+        gtk_widget_destroy (dialog);
 }
 
 
@@ -223,9 +233,6 @@
 
 void on_about_activate(GtkMenuItem *menuitem, gpointer user_data)
 {
-	static GtkWidget *about = NULL;
-
-	GtkWidget *href, *hbox;
 	GdkPixbuf *pixbuf = NULL;
 	const gchar *documenters[] = {
 		"Ricardo Quesada, english",
@@ -234,17 +241,20 @@
 	};	
 	const gchar *translator_credits = _("translator_credits");
 	const char *authors[] = {
-		"Main Authors:",
-		"    Ricardo Quesada, main coder",
-		"    Wolfgang Morawetz, main artist",
+		"Ricardo Quesada, main coder",
 		"",
 		"Main Contributors:",
 		"    Thomas R. Koll",
 		"    Raymond Ostertag",
 		"",
 		"Detailed info in the PEOPLE file or in the homepage",
+                "",
 		NULL
 	};
+        const char *artists[] = {
+		"Wolfgang Morawetz, main artist",
+                NULL
+        };
 
 	{
      		gchar* logo_filename = NULL;
@@ -257,29 +267,25 @@
 		}
 	}
 
-	if (!about) {
-		about = gnome_about_new (
-			_("Tenes Empanadas Graciela"), VERSION,
-			_("Copyright (C) 2000, 2002 Ricardo Quesada"),
-			_("A clone of T.E.G. (a Risk clone)."),
-			(const char**) authors,
-			(const char**) documenters,
-			 strcmp (translator_credits, "translator_credits") != 0 ? translator_credits : NULL,
-			pixbuf);
-
-		gtk_signal_connect (GTK_OBJECT (about), "destroy",
-				    GTK_SIGNAL_FUNC (gtk_widget_destroyed),
-				    &about);
-
-
-		hbox = gtk_hbox_new (TRUE, 0);
-		href = gnome_href_new ("http://teg.sourceforge.net", _("TEG Home Page"));
-		gtk_box_pack_start (GTK_BOX (hbox), href, FALSE, FALSE, 0);
-		gtk_box_pack_start (GTK_BOX (GTK_DIALOG (about)->vbox),
-			    hbox, TRUE, FALSE, 0);
-		gtk_widget_show_all (hbox);
-	}
+        gtk_show_about_dialog (GTK_WINDOW (main_window),
+                               "program-name", _("Tenes Empanadas Graciela"),
+                               "version", VERSION,
+                               "copyright",
+                               _("Copyright (C) 2000, 2002 Ricardo Quesada"),
+                               "comments",
+                               _("A clone of T.E.G. (a Risk clone)."),
+                               "authors", authors,
+                               "documenters", documenters,
+                               "artists", artists,
+                               "translator-credits", translator_credits,
+                               "website", "http://teg.sourceforge.net",
+                               "website-label", _("TEG Home Page"),
+                               "logo", pixbuf,
+                               NULL);
+}
 
-	gtk_widget_show_now (about);
-	raise_and_focus (about);
+void on_help_activate(GtkMenuItem *item, gpointer user_data)
+{
+        gtk_show_uri_on_window (GTK_WINDOW (main_window), "ghelp:teg",
+                                GDK_CURRENT_TIME, NULL);
 }
--- teg-0.11.2+debian.orig/client/gui-gnome/interface.c
+++ teg-0.11.2+debian/client/gui-gnome/interface.c
@@ -33,7 +33,8 @@
 #include <unistd.h>
 #include <string.h>
 
-#include <gnome.h>
+#include <goocanvas.h>
+#include <glib/gi18n.h>
 
 #include "gui.h"
 #include "client.h"
@@ -93,36 +94,6 @@
 	ON_EXIT
 };
 
-static GnomeUIInfo game_menu_uiinfo[] =
-{
-	{ GNOME_APP_UI_ITEM, N_("_Connect"), N_("Connect to server"),
-	on_connect_activate, NULL, NULL,
-	GNOME_APP_PIXMAP_NONE, NULL,
-	0, 0, NULL },
-
-	{ GNOME_APP_UI_ITEM, N_("_Disconnect"), N_("Disconnect from server"),
-	on_disconnect_activate, NULL, NULL,
-	GNOME_APP_PIXMAP_NONE, NULL,
-	0, 0, NULL },
-
-	GNOMEUIINFO_SEPARATOR,
-
-	{ GNOME_APP_UI_ITEM, N_("_Launch robot"), N_("Launch a robot"), 
-	on_launchrobot_activate, NULL, NULL, 
-	GNOME_APP_PIXMAP_DATA, robot_xpm,
-	0, 0, NULL }, 
-
-	GNOMEUIINFO_SEPARATOR,
-
-	GNOMEUIINFO_MENU_SCORES_ITEM (on_scores_activate, NULL),
-
-	GNOMEUIINFO_SEPARATOR,
-
-	GNOMEUIINFO_MENU_EXIT_ITEM (on_exit_activate, NULL),
-	GNOMEUIINFO_END
-};
-
-
 /*
  * IMPORTANT:
  * Si se agrega o se saca algo de actions_menu_uiinfo, sacarlo de aca
@@ -140,72 +111,6 @@
 	ON_SURRENDER,
 };
 
-
-static GnomeUIInfo actions_menu_uiinfo[] =
-{
-	{ GNOME_APP_UI_ITEM, N_("Start"), N_("Start the game"),
-	on_start_activate, NULL, NULL,
-	GNOME_APP_PIXMAP_NONE, NULL,
-	0, 0, NULL },
-
-	{ GNOME_APP_UI_ITEM, N_("Send armies"), N_("Send the armies recently placed"),
-	on_enviarfichas_activate, NULL, NULL,
-	GNOME_APP_PIXMAP_NONE, NULL,
-	0, 0, NULL },
-
-	{ GNOME_APP_UI_ITEM, N_("_Update Map"), N_("Show the armies that others player had placed"),
-	on_updatemap_activate, NULL, NULL,
-	GNOME_APP_PIXMAP_NONE, NULL,
-	0, 0, NULL },
-
-	{ GNOME_APP_UI_ITEM, N_("_Reattck"), N_("Attack your enemy, again using same source and destination"),
-	on_enviarreattack_activate, NULL, NULL,
-	GNOME_APP_PIXMAP_NONE, NULL,
-	'r', GDK_CONTROL_MASK, NULL },
-
-	{ GNOME_APP_UI_ITEM, N_("Reset the attack"), N_("Start again selecting the source and destination country for the attack"),
-	on_enviarattackreset_activate, NULL, NULL,
-	GNOME_APP_PIXMAP_NONE, NULL,
-	0, 0, NULL },
-
-	{ GNOME_APP_UI_ITEM, N_("Re_group armies"), N_("Regroup your armies, moving from one country to another"),
-	on_reagrupe_activate, NULL, NULL,
-	GNOME_APP_PIXMAP_NONE, NULL,
-	0, 0, NULL },
-
-	{ GNOME_APP_UI_ITEM, N_("Get card"), N_("Get a country card"),
-	on_pedirtarjeta_activate, NULL, NULL,
-	GNOME_APP_PIXMAP_NONE, NULL,
-	0, 0, NULL },
-
-	{ GNOME_APP_UI_ITEM, N_("_End turn"), N_("Pass the turn to another player"),
-	on_endturn_activate, NULL, NULL,
-	GNOME_APP_PIXMAP_NONE, NULL,
-	0, 0, NULL },
-
-	GNOMEUIINFO_SEPARATOR,
-
-	{ GNOME_APP_UI_ITEM, N_("Surrender"), N_("I'm a coward"),
-	on_surrender_activate, NULL, NULL,
-	GNOME_APP_PIXMAP_NONE, NULL,
-	0, 0, NULL },
-
-	GNOMEUIINFO_END
-};
-
-/*
-static GnomeUIInfo edit_menu_uiinfo[] =
-{
-	GNOMEUIINFO_MENU_CUT_ITEM (on_cut1_activate, NULL),
-	GNOMEUIINFO_MENU_COPY_ITEM (on_copy1_activate, NULL),
-	GNOMEUIINFO_MENU_PASTE_ITEM (on_paste1_activate, NULL),
-	GNOMEUIINFO_MENU_CLEAR_ITEM (on_clear1_activate, NULL),
-	GNOMEUIINFO_SEPARATOR,
-	GNOMEUIINFO_MENU_PROPERTIES_ITEM (on_properties1_activate, NULL),
-	GNOMEUIINFO_END
-};
-*/
-
 /*
  * IMPORTANT:
  * Si se agrega o se saca algo de view_menu_uiinfo, sacarlo de aca
@@ -215,117 +120,6 @@
 	ON_MISSION,
 	ON_CARDS,
 };
-static GnomeUIInfo view_menu_uiinfo[] =
-{
-	{ GNOME_APP_UI_ITEM, N_("View _players"), N_("View the status of the players"),
-	on_status_activate, NULL, NULL,
-	GNOME_APP_PIXMAP_NONE, NULL,
-	0, 0, NULL },
-
-	{ GNOME_APP_UI_ITEM, N_("View _mission"), N_("View your mission of this game"),
-	on_viewmission_activate, NULL, NULL,
-	GNOME_APP_PIXMAP_NONE, NULL,
-	0, 0, NULL },
-
-	{ GNOME_APP_UI_ITEM, N_("View _cards"), N_("View all the card that you won"),
-	on_viewcards_activate, NULL, NULL,
-	GNOME_APP_PIXMAP_NONE, NULL,
-	0, 0, NULL },
-
-#if 0
-	{ GNOME_APP_UI_TOGGLEITEM, N_("View _dices"), N_("View the result of the dices"),
-	on_viewdices_activate, NULL, NULL,
-	GNOME_APP_PIXMAP_NONE, NULL,
-	0, 0, NULL },
-#endif
-
-	GNOMEUIINFO_SEPARATOR,
-
-	{ GNOME_APP_UI_ITEM, N_("Zoom In"), N_("Increase zoom factor by 5%"),
-	canvas_map_zoom_in, NULL, NULL,
-	GNOME_APP_PIXMAP_NONE, NULL,
-	'=', GDK_CONTROL_MASK, NULL },
-
-	{ GNOME_APP_UI_ITEM, N_("Zoom Out"), N_("Decrease zoom factor by 5%"),
-	canvas_map_zoom_out, NULL, NULL,
-	GNOME_APP_PIXMAP_NONE, NULL,
-	'-', GDK_CONTROL_MASK, NULL },
-
-	{ GNOME_APP_UI_ITEM, N_("Zoom _1:1"), N_("Display the map at 1:1 scale"),
-	canvas_map_zoom_1, NULL, NULL,
-	GNOME_APP_PIXMAP_NONE, NULL,
-	'1', GDK_CONTROL_MASK, NULL },
-
-	GNOMEUIINFO_END
-};
-
-static GnomeUIInfo settings_menu_uiinfo[] =
-{
-	GNOMEUIINFO_MENU_PREFERENCES_ITEM (on_preferences1_activate, NULL),
-	GNOMEUIINFO_END
-};
-
-static GnomeUIInfo help_menu_uiinfo[] =
-{
-        GNOMEUIINFO_HELP("teg"),
-	GNOMEUIINFO_MENU_ABOUT_ITEM (on_about_activate, NULL),
-	GNOMEUIINFO_END
-};
-
-static GnomeUIInfo menubar_uiinfo[] =
-{
-	GNOMEUIINFO_MENU_GAME_TREE (game_menu_uiinfo),
-	GNOMEUIINFO_SUBTREE(N_("_Actions"), actions_menu_uiinfo),
-/*	GNOMEUIINFO_MENU_EDIT_TREE (edit_menu_uiinfo), */
-	GNOMEUIINFO_MENU_VIEW_TREE (view_menu_uiinfo),
-	GNOMEUIINFO_MENU_SETTINGS_TREE (settings_menu_uiinfo),
-	GNOMEUIINFO_MENU_HELP_TREE (help_menu_uiinfo),
-	GNOMEUIINFO_END
-};
-
-GnomeUIInfo toolbar_main[] =
-{
-	{GNOME_APP_UI_ITEM, N_("Connect"), N_("Connect to server"),
-	on_connect_activate, NULL, NULL,
-	GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_PIXMAP_NEW, 0, 0, NULL},
-
-	{GNOME_APP_UI_ITEM, N_("Start"), N_("Start the game"),
-	on_start_activate, NULL, NULL,
-	GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_PIXMAP_TIMER, 0, 0, NULL},
-
-	GNOMEUIINFO_SEPARATOR,
-
-	GNOMEUIINFO_ITEM_STOCK (N_("Send armies"), N_("Send your armies"), on_enviarfichas_activate, STOCK_SENDARMIES),
-
-	{GNOME_APP_UI_ITEM, N_("1. Regroup"), N_("Regroup your armies, moving from one country to another"),
-	on_reagrupe_activate, NULL, NULL,
-	GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_PIXMAP_REFRESH, 0, 0, NULL},
-
-	GNOMEUIINFO_ITEM_STOCK (N_("2. Get card"), N_("Get a country card"), on_pedirtarjeta_activate, STOCK_GETCARD),
-
-	GNOMEUIINFO_ITEM_STOCK (N_("3. End turn"), N_("Pass the turn to another player"), on_endturn_activate, STOCK_ENDTURN),
-
-	GNOMEUIINFO_SEPARATOR,
-
-	GNOMEUIINFO_ITEM_STOCK (N_("View players"), N_("View players status"), on_status_activate, STOCK_VIEWPLAYERS),
-#if 0
-	GNOMEUIINFO_ITEM_STOCK (N_("In"), NULL, canvas_map_zoom_in, STOCK_ZOOM_IN),
-	GNOMEUIINFO_ITEM_STOCK (N_("Out"), NULL,canvas_map_zoom_out, STOCK_ZOOM_OUT),
-	GNOMEUIINFO_ITEM_STOCK (N_("1:1"), NULL,canvas_map_zoom_1, STOCK_ZOOM_1),
-	GNOMEUIINFO_SEPARATOR,
-#endif
-
-
-#if 0
-	GNOMEUIINFO_SEPARATOR,
-	{GNOME_APP_UI_ITEM, N_("Exit"), N_("Exit TEG"),
-	on_exit_activate, NULL, NULL,
-	GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_PIXMAP_EXIT, 0, 0, NULL},
-#endif
-
-	GNOMEUIINFO_END
-};
-
 
 struct _SensiData {
 	GtkWidget *connect_button;
@@ -342,25 +136,25 @@
 canvas_map_zoom_1(GtkWidget *widget, gpointer data)
 {
 	canvas_map_zoom = 1.0;
-	gnome_canvas_set_pixels_per_unit ((GnomeCanvas*)canvas_map, canvas_map_zoom);
+	goo_canvas_set_scale ((GooCanvas*)canvas_map, canvas_map_zoom);
 }
 
 static void
 canvas_map_zoom_in(GtkWidget *widget, gpointer data)
 {
 	canvas_map_zoom *= 1.05;
-	gnome_canvas_set_pixels_per_unit ((GnomeCanvas*)canvas_map, canvas_map_zoom);
+	goo_canvas_set_scale ((GooCanvas*)canvas_map, canvas_map_zoom);
 }
 
 static void
 canvas_map_zoom_out(GtkWidget *widget, gpointer data)
 {
 	canvas_map_zoom *= 0.95;
-	gnome_canvas_set_pixels_per_unit ((GnomeCanvas*)canvas_map, canvas_map_zoom);
+	goo_canvas_set_scale ((GooCanvas*)canvas_map, canvas_map_zoom);
 }
 
 static TEG_STATUS
-canvas_create_countries( GnomeCanvasGroup *group)
+canvas_create_countries(GooCanvasItem *group)
 {
 	int i=0;
 
@@ -377,9 +171,11 @@
 #if 0
 	for(i=0;i<n;i++) {
 		if( G_countries[i].ellip_item)
-			gnome_canvas_item_raise_to_top ( G_countries[i].ellip_item );
+	                goo_canvas_item_raise ( G_countries[i].ellip_item,
+	                                        NULL );
 		if( G_countries[i].text_item)
-			gnome_canvas_item_raise_to_top ( G_countries[i].text_item );
+	                goo_canvas_item_raise ( G_countries[i].text_item,
+	                                        NULL );
 	}
 #endif
 	return TEG_STATUS_SUCCESS;
@@ -388,48 +184,59 @@
 static TEG_STATUS canvas_create_map( void )
 {
 	char *filename;
-	GnomeCanvasGroup* root;
+	GooCanvasItem* root;
 	GdkPixbuf *im;
-	GnomeCanvasItem *image;
 
-	gtk_widget_push_colormap (gdk_rgb_get_cmap ());
-	canvas_map = gnome_canvas_new ();
-	root = gnome_canvas_root(GNOME_CANVAS(canvas_map));
+	canvas_map = goo_canvas_new ();
+	root = goo_canvas_get_root_item(GOO_CANVAS(canvas_map));
 
 	filename = theme_load_file( gui_theme.board );
 
 	im = gdk_pixbuf_new_from_file(filename, NULL);
 
 	if (im){
-		image = gnome_canvas_item_new (
+		goo_canvas_image_new (
 				root,
-				gnome_canvas_pixbuf_get_type (),
-				"pixbuf", im,
-				"x", 0.0,
-				"y", 0.0,
+				im,
+				0.0,
+				0.0,
 				"width", (double) gdk_pixbuf_get_width(im),
 				"height", (double) gdk_pixbuf_get_height(im),
-				"anchor", GTK_ANCHOR_NW,
 				NULL);
 		canvas_create_countries(root);
 		armies_init(root);
 		dices_init(root);
-		gnome_canvas_set_scroll_region(GNOME_CANVAS(canvas_map),0,0,gdk_pixbuf_get_width(im),gdk_pixbuf_get_height(im));
+		goo_canvas_set_bounds(GOO_CANVAS(canvas_map),0,0,
+		                      gdk_pixbuf_get_width(im),
+		                      gdk_pixbuf_get_height(im));
 
-		gdk_pixbuf_unref(im);
+		g_object_unref(im);
 
 	} else {
 		g_warning (_("Could not find the %s file"),gui_theme.board);
 		return TEG_STATUS_ERROR;
 	}
 
-
-	gtk_widget_pop_colormap ();
-	gtk_widget_pop_visual ();
-
 	return TEG_STATUS_SUCCESS;
 }
 
+static GtkWidget *connect_menu;
+static GtkWidget *disconnect_menu;
+static GtkWidget *robot_menu;
+static GtkWidget *scores_menu;
+static GtkWidget *start_menu;
+static GtkWidget *send_menu;
+static GtkWidget *update_menu;
+static GtkWidget *reattack_menu;
+static GtkWidget *reset_menu;
+static GtkWidget *regroup_menu;
+static GtkWidget *get_menu;
+static GtkWidget *end_menu;
+static GtkWidget *surrender_menu;
+static GtkWidget *players_menu;
+static GtkWidget *mission_menu;
+static GtkWidget *cards_menu;
+
 /**
  * @fn GtkWidget* create_mainwin (void)
  * Crea la ventana principal
@@ -438,6 +245,40 @@
 {
 	GtkWidget *app1;
 	GtkWidget *dock1;
+	GtkWidget *menubar;
+	GtkAccelGroup *accel_group;
+	GtkWidget *gamemenu;
+	GtkWidget *game_menu;
+	GdkPixbuf *robot;
+	GtkWidget *hbox;
+	GtkWidget *icon;
+	GtkWidget *label;
+	GtkWidget *separator;
+	GtkWidget *quit_menu;
+	GtkWidget *actionmenu;
+	GtkWidget *action_menu;
+	GtkWidget *viewmenu;
+	GtkWidget *view_menu;
+	GtkWidget *zoomin_menu;
+	GtkWidget *zoomout_menu;
+	GtkWidget *zoom1_menu;
+	GtkWidget *settingsmenu;
+	GtkWidget *settings_menu;
+	GtkWidget *prefs_menu;
+	GtkWidget *helpmenu;
+	GtkWidget *help_menu;
+	GtkWidget *manual_menu;
+	GtkWidget *about_menu;
+	GtkWidget *toolbar_main;
+	GtkWidget *image;
+	GtkToolItem *button1;
+	GtkToolItem *button2;
+	GtkToolItem *button3;
+	GtkToolItem *button4;
+	GtkToolItem *button5;
+	GtkToolItem *button6;
+	GtkToolItem *button7;
+	GtkToolItem *sep;
 	GtkWidget *eventbox1;
 	GtkWidget *viewport1;
 	GtkWidget *vbox_main;
@@ -449,54 +290,359 @@
 	GtkWidget *sw;
 	GtkWidget *ahbox;
 
-	app1 = gnome_app_new ( PACKAGE, "Tenes Empanadas Graciela");
-	gtk_object_set_data (GTK_OBJECT (app1), "app1", app1);
-	gtk_window_set_default_size (GTK_WINDOW (app1), 664, 640);
-	gtk_window_set_policy (GTK_WINDOW (app1), TRUE, TRUE, FALSE);
-
-	dock1 = GNOME_APP (app1)->dock;
-	gtk_widget_ref (dock1);
-	gtk_object_set_data_full (GTK_OBJECT (app1), "dock1", dock1,
-		(GtkDestroyNotify) gtk_widget_unref);
+	app1 = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+	gtk_window_set_title (GTK_WINDOW (app1), "Tenes Empanadas Graciela");
+	g_object_set_data (G_OBJECT (app1), "app1", app1);
+	gtk_window_set_default_size (GTK_WINDOW (app1), 664, 650);
+
+	dock1 = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
+	g_object_ref (dock1);
+	g_object_set_data_full (G_OBJECT (app1), "dock1", dock1,
+		(GDestroyNotify) g_object_unref);
 	gtk_widget_show (dock1);
+	gtk_container_add (GTK_CONTAINER (app1), dock1);
 
-	gnome_app_create_menus (GNOME_APP (app1), menubar_uiinfo);
-	gnome_app_create_toolbar(GNOME_APP(app1), toolbar_main);
+	menubar = gtk_menu_bar_new ();
+	gtk_container_add (GTK_CONTAINER (dock1), menubar);
 
+	accel_group = gtk_accel_group_new ();
+	gtk_window_add_accel_group (GTK_WINDOW (app1), accel_group);
+
+	gamemenu = gtk_menu_new ();
+	gtk_menu_set_accel_group (GTK_MENU (gamemenu), accel_group);
+	game_menu = gtk_menu_item_new_with_mnemonic (_("_Game"));
+	gtk_menu_item_set_submenu (GTK_MENU_ITEM (game_menu), gamemenu);
+	gtk_menu_shell_append (GTK_MENU_SHELL (menubar), game_menu);
+
+	connect_menu = gtk_menu_item_new_with_mnemonic (_("_Connect"));
+	gtk_widget_set_tooltip_text (connect_menu, _("Connect to server"));
+	gtk_menu_shell_append (GTK_MENU_SHELL (gamemenu), connect_menu);
+	g_signal_connect (connect_menu, "activate",
+	                  G_CALLBACK (on_connect_activate), NULL);
+
+	disconnect_menu = gtk_menu_item_new_with_mnemonic (_("_Disconnect"));
+	gtk_widget_set_tooltip_text (disconnect_menu,
+	                             _("Disconnect from server"));
+	gtk_menu_shell_append (GTK_MENU_SHELL (gamemenu), disconnect_menu);
+	g_signal_connect (disconnect_menu, "activate",
+	                  G_CALLBACK (on_disconnect_activate), NULL);
+
+	/* Emulate GtkImageMenuItem.  This was the author's intention
+	   but it doesn't work in the original code.  */
+	hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
+	robot = gdk_pixbuf_new_from_xpm_data (robot_xpm);
+	icon = gtk_image_new_from_pixbuf (robot);
+	g_object_unref (robot);
+	label = gtk_label_new_with_mnemonic (_("_Launch robot"));
+	gtk_widget_set_tooltip_text (label, _("Launch a robot"));
+	robot_menu = gtk_menu_item_new ();
+	gtk_container_add (GTK_CONTAINER (hbox), icon);
+	gtk_container_add (GTK_CONTAINER (hbox), label);
+	gtk_container_add (GTK_CONTAINER (robot_menu), hbox);
+	gtk_menu_shell_append (GTK_MENU_SHELL (gamemenu), robot_menu);
+	g_signal_connect (robot_menu, "activate",
+	                  G_CALLBACK (on_launchrobot_activate), NULL);
+
+	separator = gtk_separator_menu_item_new ();
+	gtk_menu_shell_append (GTK_MENU_SHELL (gamemenu), separator);
+
+	scores_menu = gtk_menu_item_new_with_mnemonic (_("_Scores..."));
+	gtk_widget_set_tooltip_text (scores_menu, _("View the scores"));
+	gtk_menu_shell_append (GTK_MENU_SHELL (gamemenu), scores_menu);
+	g_signal_connect (scores_menu, "activate",
+	                  G_CALLBACK (on_scores_activate), NULL);
+
+	separator = gtk_separator_menu_item_new ();
+	gtk_menu_shell_append (GTK_MENU_SHELL (gamemenu), separator);
+
+	quit_menu = gtk_menu_item_new_with_mnemonic (_("_Quit"));
+	gtk_widget_set_tooltip_text (quit_menu, _("Quit the application"));
+	gtk_menu_shell_append (GTK_MENU_SHELL (gamemenu), quit_menu);
+	gtk_widget_add_accelerator (quit_menu, "activate", accel_group,
+	                            GDK_KEY_Q, GDK_CONTROL_MASK,
+	                            GTK_ACCEL_VISIBLE);
+	g_signal_connect (quit_menu, "activate",
+	                  G_CALLBACK (on_exit_activate), NULL);
+
+	actionmenu = gtk_menu_new ();
+	gtk_menu_set_accel_group (GTK_MENU (actionmenu), accel_group);
+	action_menu = gtk_menu_item_new_with_mnemonic (_("_Actions"));
+	gtk_menu_item_set_submenu (GTK_MENU_ITEM (action_menu), actionmenu);
+	gtk_menu_shell_append (GTK_MENU_SHELL (menubar), action_menu);
+
+	start_menu = gtk_menu_item_new_with_label (_("Start"));
+	gtk_widget_set_tooltip_text (start_menu, _("Start the game"));
+	gtk_menu_shell_append (GTK_MENU_SHELL (actionmenu), start_menu);
+	g_signal_connect (start_menu, "activate",
+	                  G_CALLBACK (on_start_activate), NULL);
+
+	send_menu = gtk_menu_item_new_with_label (_("Send armies"));
+	gtk_widget_set_tooltip_text (send_menu,
+	                             _("Send the armies recently placed"));
+	gtk_menu_shell_append (GTK_MENU_SHELL (actionmenu), send_menu);
+	g_signal_connect (send_menu, "activate",
+	                  G_CALLBACK (on_enviarfichas_activate), NULL);
+
+	update_menu = gtk_menu_item_new_with_mnemonic (_("_Update Map"));
+	gtk_widget_set_tooltip_text (update_menu,
+	                             _("Show the armies that other players "
+	                             "had placed"));
+	gtk_menu_shell_append (GTK_MENU_SHELL (actionmenu), update_menu);
+	g_signal_connect (update_menu, "activate",
+	                  G_CALLBACK (on_updatemap_activate), NULL);
+
+	reattack_menu = gtk_menu_item_new_with_mnemonic (_("_Reattack"));
+	gtk_widget_set_tooltip_text (reattack_menu,
+	                             _("Attack your enemy, again using same "
+	                               "source and destination"));
+	gtk_menu_shell_append (GTK_MENU_SHELL (actionmenu), reattack_menu);
+	gtk_widget_add_accelerator (reattack_menu, "activate", accel_group,
+	                            GDK_KEY_r, GDK_CONTROL_MASK,
+	                            GTK_ACCEL_VISIBLE);
+	g_signal_connect (reattack_menu, "activate",
+	                  G_CALLBACK (on_enviarreattack_activate), NULL);
+
+	reset_menu = gtk_menu_item_new_with_label (_("Reset the attack"));
+	gtk_widget_set_tooltip_text (reset_menu,
+	                             _("Start again selecting the source and "
+	                               "destination country for the attack"));
+	gtk_menu_shell_append (GTK_MENU_SHELL (actionmenu), reset_menu);
+	g_signal_connect (reset_menu, "activate",
+	                  G_CALLBACK (on_enviarattackreset_activate), NULL);
+
+	regroup_menu = gtk_menu_item_new_with_mnemonic (_("Re_group armies"));
+	gtk_widget_set_tooltip_text (regroup_menu,
+	                             _("Regroup your armies, moving from "
+	                               "one country to another"));
+	gtk_menu_shell_append (GTK_MENU_SHELL (actionmenu), regroup_menu);
+	g_signal_connect (regroup_menu, "activate",
+	                  G_CALLBACK (on_reagrupe_activate), NULL);
+
+	get_menu = gtk_menu_item_new_with_label (_("Get card"));
+	gtk_widget_set_tooltip_text (get_menu, _("Get a country card"));
+	gtk_menu_shell_append (GTK_MENU_SHELL (actionmenu), get_menu);
+	g_signal_connect (get_menu, "activate",
+	                  G_CALLBACK (on_pedirtarjeta_activate), NULL);
+
+	end_menu = gtk_menu_item_new_with_mnemonic (_("_End turn"));
+	gtk_widget_set_tooltip_text (end_menu,
+	                             _("Pass the turn to another player"));
+	gtk_menu_shell_append (GTK_MENU_SHELL (actionmenu), end_menu);
+	g_signal_connect (end_menu, "activate",
+	                  G_CALLBACK (on_endturn_activate), NULL);
+
+	separator = gtk_separator_menu_item_new ();
+	gtk_menu_shell_append (GTK_MENU_SHELL (actionmenu), separator);
+
+	surrender_menu = gtk_menu_item_new_with_label (_("Surrender"));
+	gtk_widget_set_tooltip_text (surrender_menu, _("I'm a coward"));
+	gtk_menu_shell_append (GTK_MENU_SHELL (actionmenu), surrender_menu);
+	g_signal_connect (surrender_menu, "activate",
+	                  G_CALLBACK (on_surrender_activate), NULL);
+
+	viewmenu = gtk_menu_new ();
+	gtk_menu_set_accel_group (GTK_MENU (viewmenu), accel_group);
+	view_menu = gtk_menu_item_new_with_mnemonic (_("_View"));
+	gtk_menu_item_set_submenu (GTK_MENU_ITEM (view_menu), viewmenu);
+	gtk_menu_shell_append (GTK_MENU_SHELL (menubar), view_menu);
+
+	players_menu = gtk_menu_item_new_with_mnemonic (_("View _players"));
+	gtk_widget_set_tooltip_text (players_menu,
+	                             _("View the status of the players"));
+	gtk_menu_shell_append (GTK_MENU_SHELL (viewmenu), players_menu);
+	g_signal_connect (players_menu, "activate",
+	                  G_CALLBACK (on_status_activate), NULL);
+
+	mission_menu = gtk_menu_item_new_with_mnemonic (_("View _mission"));
+	gtk_widget_set_tooltip_text (mission_menu,
+	                             _("View your mission of this game"));
+	gtk_menu_shell_append (GTK_MENU_SHELL (viewmenu), mission_menu);
+	g_signal_connect (mission_menu, "activate",
+	                  G_CALLBACK (on_viewmission_activate), NULL);
+
+	cards_menu = gtk_menu_item_new_with_mnemonic (_("View _cards"));
+	gtk_widget_set_tooltip_text (cards_menu,
+	                             _("View all the cards that you won"));
+	gtk_menu_shell_append (GTK_MENU_SHELL (viewmenu), cards_menu);
+	g_signal_connect (cards_menu, "activate",
+	                  G_CALLBACK (on_viewcards_activate), NULL);
+
+	separator = gtk_separator_menu_item_new ();
+	gtk_menu_shell_append (GTK_MENU_SHELL (viewmenu), separator);
+
+	zoomin_menu = gtk_menu_item_new_with_label (_("Zoom In"));
+	gtk_widget_set_tooltip_text (zoomin_menu,
+	                             _("Increase zoom factor by 5%"));
+	gtk_menu_shell_append (GTK_MENU_SHELL (viewmenu), zoomin_menu);
+	gtk_widget_add_accelerator (zoomin_menu, "activate", accel_group,
+	                            GDK_KEY_equal, GDK_CONTROL_MASK,
+	                            GTK_ACCEL_VISIBLE);
+	g_signal_connect (zoomin_menu, "activate",
+	                  G_CALLBACK (canvas_map_zoom_in), NULL);
+
+	zoomout_menu = gtk_menu_item_new_with_label (_("Zoom out"));
+	gtk_widget_set_tooltip_text (zoomout_menu,
+	                             _("Decrease zoom factor by 5%"));
+	gtk_menu_shell_append (GTK_MENU_SHELL (viewmenu), zoomout_menu);
+	gtk_widget_add_accelerator (zoomout_menu, "activate", accel_group,
+	                            GDK_KEY_minus, GDK_CONTROL_MASK,
+	                            GTK_ACCEL_VISIBLE);
+	g_signal_connect (zoomout_menu, "activate",
+	                  G_CALLBACK (canvas_map_zoom_out), NULL);
+
+	zoom1_menu = gtk_menu_item_new_with_mnemonic (_("Zoom _1:1"));
+	gtk_widget_set_tooltip_text (zoom1_menu,
+	                             _("Display the map at 1:1 scale"));
+	gtk_menu_shell_append (GTK_MENU_SHELL (viewmenu), zoom1_menu);
+	gtk_widget_add_accelerator (zoom1_menu, "activate", accel_group,
+	                            GDK_KEY_1, GDK_CONTROL_MASK,
+	                            GTK_ACCEL_VISIBLE);
+	g_signal_connect (zoom1_menu, "activate",
+	                  G_CALLBACK (canvas_map_zoom_1), NULL);
+
+	settingsmenu = gtk_menu_new ();
+	settings_menu = gtk_menu_item_new_with_mnemonic (_("_Settings"));
+	gtk_widget_set_name (settings_menu, "settings");
+	gtk_menu_item_set_submenu (GTK_MENU_ITEM (settings_menu), settingsmenu);
+	gtk_menu_shell_append (GTK_MENU_SHELL (menubar), settings_menu);
+
+	prefs_menu = gtk_menu_item_new_with_mnemonic (_("Prefere_nces"));
+	gtk_widget_set_tooltip_text (prefs_menu,
+	                             _("Configure the application"));
+	gtk_widget_set_name (prefs_menu, "preferences");
+	gtk_menu_shell_append (GTK_MENU_SHELL (settingsmenu), prefs_menu);
+	g_signal_connect (prefs_menu, "activate",
+	                  G_CALLBACK (on_preferences1_activate), NULL);
+
+	helpmenu = gtk_menu_new ();
+	gtk_menu_set_accel_group (GTK_MENU (helpmenu), accel_group);
+	help_menu = gtk_menu_item_new_with_mnemonic (_("_Help"));
+	gtk_menu_item_set_submenu (GTK_MENU_ITEM (help_menu), helpmenu);
+	gtk_menu_shell_append (GTK_MENU_SHELL (menubar), help_menu);
+
+	manual_menu = gtk_menu_item_new_with_mnemonic (_("_Contents"));
+	gtk_widget_set_tooltip_text (manual_menu,
+	                             _("View help for this application"));
+	gtk_menu_shell_append (GTK_MENU_SHELL (helpmenu), manual_menu);
+	gtk_widget_add_accelerator (manual_menu, "activate", accel_group,
+	                            GDK_KEY_F1, GDK_CONTROL_MASK,
+	                            GTK_ACCEL_VISIBLE);
+	g_signal_connect (manual_menu, "activate",
+	                  G_CALLBACK (on_help_activate), NULL);
+
+	about_menu = gtk_menu_item_new_with_mnemonic (_("_About"));
+	gtk_widget_set_tooltip_text (about_menu, _("About this application"));
+	gtk_menu_shell_append (GTK_MENU_SHELL (helpmenu), about_menu);
+	g_signal_connect (about_menu, "activate",
+	                  G_CALLBACK (on_about_activate), NULL);
+
+	gtk_widget_show_all (menubar);
+
+	toolbar_main = gtk_toolbar_new ();
+	gtk_toolbar_set_style (GTK_TOOLBAR (toolbar_main), GTK_TOOLBAR_BOTH);
+	gtk_widget_show (toolbar_main);
+	gtk_container_add (GTK_CONTAINER (dock1), toolbar_main);
+
+	image = gtk_image_new_from_icon_name ("document-new",
+	                                      GTK_ICON_SIZE_LARGE_TOOLBAR);
+	button1 = gtk_tool_button_new (image, _("Connect"));
+	gtk_tool_item_set_tooltip_text (button1, _("Connect to server"));
+	gtk_toolbar_insert (GTK_TOOLBAR (toolbar_main), button1, -1);
+	g_signal_connect (button1, "clicked",
+	                  G_CALLBACK (on_connect_activate), NULL);
+
+	image = gtk_image_new_from_icon_name ("appointment-new",
+	                                      GTK_ICON_SIZE_LARGE_TOOLBAR);
+	button2 = gtk_tool_button_new (image, _("Start"));
+	gtk_tool_item_set_tooltip_text (button2, _("Start the game"));
+	gtk_toolbar_insert (GTK_TOOLBAR (toolbar_main), button2, -1);
+	g_signal_connect (button2, "clicked",
+	                  G_CALLBACK (on_start_activate), NULL);
+
+	sep = gtk_separator_tool_item_new ();
+	gtk_toolbar_insert (GTK_TOOLBAR (toolbar_main), sep, -1);
+
+	image = gtk_image_new_from_icon_name (STOCK_SENDARMIES,
+	                                      GTK_ICON_SIZE_LARGE_TOOLBAR);
+	button3 = gtk_tool_button_new (image, _("Send armies"));
+	gtk_tool_item_set_tooltip_text (button3, _("Send your armies"));
+	gtk_toolbar_insert (GTK_TOOLBAR (toolbar_main), button3, -1);
+	g_signal_connect (button3, "clicked",
+	                  G_CALLBACK (on_enviarfichas_activate), NULL);
+
+	image = gtk_image_new_from_icon_name ("view-refresh",
+	                                      GTK_ICON_SIZE_LARGE_TOOLBAR);
+	button4 = gtk_tool_button_new (image, _("1. Regroup"));
+	gtk_tool_item_set_tooltip_text (button4,
+	                                _("Regroup your armies, moving from "
+	                                  "one country to another"));
+	gtk_toolbar_insert (GTK_TOOLBAR (toolbar_main), button4, -1);
+	g_signal_connect (button4, "clicked",
+	                  G_CALLBACK (on_reagrupe_activate), NULL);
+
+	image = gtk_image_new_from_icon_name (STOCK_GETCARD,
+	                                      GTK_ICON_SIZE_LARGE_TOOLBAR);
+	button5 = gtk_tool_button_new (image, _("2. Get card"));
+	gtk_tool_item_set_tooltip_text (button5, _("Get a country card"));
+	gtk_toolbar_insert (GTK_TOOLBAR (toolbar_main), button5, -1);
+	g_signal_connect (button5, "clicked",
+	                  G_CALLBACK (on_pedirtarjeta_activate), NULL);
+
+	image = gtk_image_new_from_icon_name (STOCK_ENDTURN,
+	                                      GTK_ICON_SIZE_LARGE_TOOLBAR);
+	button6 = gtk_tool_button_new (image, _("3. End turn"));
+	gtk_tool_item_set_tooltip_text (button6,
+	                                _("Pass the turn to another player"));
+	gtk_toolbar_insert (GTK_TOOLBAR (toolbar_main), button6, -1);
+	g_signal_connect (button6, "clicked",
+	                  G_CALLBACK (on_endturn_activate), NULL);
+
+	sep = gtk_separator_tool_item_new ();
+	gtk_toolbar_insert (GTK_TOOLBAR (toolbar_main), sep, -1);
+
+	image = gtk_image_new_from_icon_name (STOCK_VIEWPLAYERS,
+	                                      GTK_ICON_SIZE_LARGE_TOOLBAR);
+	button7 = gtk_tool_button_new (image, _("View players"));
+	gtk_tool_item_set_tooltip_text (button7, _("View players' status"));
+	gtk_toolbar_insert (GTK_TOOLBAR (toolbar_main), button7, -1);
+	g_signal_connect (button7, "clicked",
+	                  G_CALLBACK (on_status_activate), NULL);
+
+	gtk_widget_show_all (toolbar_main);
 	/* TODO: ask in GNOME if this is wanted */
 	/* gtk_menu_item_right_justify( GTK_MENU_ITEM(menubar_uiinfo[4].widget)); */
 
 	gtk_widget_realize (app1);
 
-	gtk_signal_connect ( GTK_OBJECT(app1), "destroy",
-		GTK_SIGNAL_FUNC( on_exit_activate ), NULL );
+	g_signal_connect ( G_OBJECT(app1), "destroy",
+		G_CALLBACK( on_exit_activate ), NULL );
 
-	gtk_signal_connect ( GTK_OBJECT(app1), "delete_event",
-		GTK_SIGNAL_FUNC( on_exit_activate ), NULL );
+	g_signal_connect ( G_OBJECT(app1), "delete_event",
+		G_CALLBACK( on_exit_activate ), NULL );
 
 
-	SensiData.connect_button = toolbar_main[0].widget;
-	SensiData.start_button = toolbar_main[1].widget;
+	SensiData.connect_button = GTK_WIDGET (button1);
+	SensiData.start_button = GTK_WIDGET (button2);
 	/* 2 is a separator */
-	SensiData.enviarfichas_button = toolbar_main[3].widget;
-	SensiData.reagrupe_button = toolbar_main[4].widget;
-	SensiData.getcard_button = toolbar_main[5].widget;
-	SensiData.endturn_button = toolbar_main[6].widget;
+	SensiData.enviarfichas_button = GTK_WIDGET (button3);
+	SensiData.reagrupe_button = GTK_WIDGET (button4);
+	SensiData.getcard_button = GTK_WIDGET (button5);
+	SensiData.endturn_button = GTK_WIDGET (button6);
 	/* 7 is a separator */
-	SensiData.status_button = toolbar_main[8].widget;
+	SensiData.status_button = GTK_WIDGET (button7);
 
 	eventbox1 = gtk_event_box_new ();
-	gtk_widget_ref (eventbox1);
-	gtk_object_set_data_full (GTK_OBJECT (app1), "eventbox1", eventbox1,
-		(GtkDestroyNotify) gtk_widget_unref);
+	g_object_ref (eventbox1);
+	g_object_set_data_full (G_OBJECT (app1), "eventbox1", eventbox1,
+		(GDestroyNotify) g_object_unref);
 	gtk_widget_show (eventbox1);
-	gnome_app_set_contents (GNOME_APP (app1), eventbox1);
+	gtk_box_pack_start (GTK_BOX (dock1), eventbox1, TRUE, TRUE, 0);
 
 	viewport1 = gtk_viewport_new (NULL, NULL);
 	gtk_widget_show (viewport1);
 	gtk_container_add (GTK_CONTAINER (eventbox1), viewport1);
 
-	vbox_main = gtk_vbox_new (FALSE, 0);
+	vbox_main = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
 	gtk_widget_show (vbox_main);
 	gtk_container_add (GTK_CONTAINER (viewport1), vbox_main);
 
@@ -504,11 +650,12 @@
 	if( mainstatus_create(&window_mainstatus) != TEG_STATUS_SUCCESS )
 		goto error;
 	gtk_box_pack_start( GTK_BOX(vbox_main), window_mainstatus, FALSE,FALSE,0);
+	gtk_widget_set_halign (window_mainstatus, GTK_ALIGN_CENTER);
 
 	/* paned */
-	paned = gtk_vpaned_new();
+	paned = gtk_paned_new(GTK_ORIENTATION_VERTICAL);
 	gtk_box_pack_start( GTK_BOX( vbox_main ), paned, TRUE, TRUE, 0 );
-	vbox_paned = gtk_vbox_new (FALSE, 0);
+	vbox_paned = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
 	gtk_paned_add1(GTK_PANED(paned), vbox_paned);
 	gtk_widget_show (vbox_paned);
 
@@ -517,19 +664,23 @@
 	gtk_scrolled_window_set_policy( GTK_SCROLLED_WINDOW(scrolledwindow),
 			GTK_POLICY_AUTOMATIC,
 			GTK_POLICY_AUTOMATIC);
-	gtk_widget_set_usize(scrolledwindow, 640, 394);
+	gtk_scrolled_window_set_min_content_width (GTK_SCROLLED_WINDOW
+	                                           (scrolledwindow), 641);
+	gtk_scrolled_window_set_min_content_height (GTK_SCROLLED_WINDOW
+	                                            (scrolledwindow), 394);
 
 	if( canvas_create_map() != TEG_STATUS_SUCCESS )
 		goto error;
 
 	gtk_container_add(GTK_CONTAINER(scrolledwindow), canvas_map);
-	gtk_container_add(GTK_CONTAINER(vbox_paned),scrolledwindow);
+	gtk_widget_set_halign(vbox_paned, GTK_ALIGN_CENTER);
+	gtk_box_pack_start(GTK_BOX(vbox_paned), scrolledwindow, TRUE, TRUE, 0);
 	gtk_widget_show (canvas_map);
 	gtk_widget_show (scrolledwindow);
 
 
 	/* text */
-	ahbox = gtk_hbox_new(FALSE, 2);
+	ahbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 2);
 	gtk_paned_pack2(GTK_PANED(paned), ahbox, TRUE, TRUE);
 
 	sw = gtk_scrolled_window_new(NULL, NULL);
@@ -570,30 +721,27 @@
 
 
 	/* status bar */
-	statusbar = gnome_appbar_new (FALSE, TRUE, GNOME_PREFERENCES_NEVER);
-	gtk_widget_ref (statusbar);
-	gtk_object_set_data_full (GTK_OBJECT (app1), "statusbar", statusbar,
-		(GtkDestroyNotify) gtk_widget_unref);
+	statusbar = gtk_statusbar_new ();
+	g_object_ref (statusbar);
+	g_object_set_data_full (G_OBJECT (app1), "statusbar", statusbar,
+		(GDestroyNotify) g_object_unref);
 	gtk_widget_show (statusbar);
-	gnome_app_set_statusbar (GNOME_APP (app1), statusbar);
+	gtk_container_add (GTK_CONTAINER (dock1), statusbar);
 
 	gtk_box_pack_start(GTK_BOX(statusbar),
 		ministatus_build(), FALSE, TRUE, 0);
 
 
-	gnome_appbar_set_status(GNOME_APPBAR(statusbar),
+	gtk_statusbar_push (GTK_STATUSBAR (statusbar), 0,
 				_("Welcome to TEG!"));
 
-	gnome_app_install_menu_hints( GNOME_APP(app1), menubar_uiinfo );
-
 	/* icono */
 	{
-		GdkBitmap *mask;
-		GdkPixmap *icono;
+		GdkPixbuf *icono;
 		#include "../teg_pix/teg_icono.xpm"
 		gtk_widget_realize (app1);
-		icono = gdk_pixmap_create_from_xpm_d( app1->window, &mask, &app1->style->bg[GTK_STATE_NORMAL],teg_icono_xpm );
-		gdk_window_set_icon (app1->window, NULL, icono , mask );
+		icono = gdk_pixbuf_new_from_xpm_data (teg_icono_xpm);
+		gtk_window_set_icon (GTK_WINDOW (app1), icono);
 	}
 
 	gtk_widget_show(app1);
@@ -614,125 +762,125 @@
 
 	/* CONNECT & START */
 	if( e == PLAYER_STATUS_DESCONECTADO ) {
-		gtk_widget_set_sensitive( game_menu_uiinfo[ON_CONNECT].widget,TRUE);
-		gtk_widget_set_sensitive( game_menu_uiinfo[ON_DISCONNECT].widget,FALSE);
-		gtk_widget_set_sensitive( actions_menu_uiinfo[ON_START].widget,FALSE);
+		gtk_widget_set_sensitive (connect_menu, TRUE);
+		gtk_widget_set_sensitive (disconnect_menu, FALSE);
+		gtk_widget_set_sensitive (start_menu, FALSE);
 		gtk_widget_set_sensitive (SensiData.connect_button, TRUE);
 		gtk_widget_set_sensitive (SensiData.start_button, FALSE);
 
 	} else if( e == PLAYER_STATUS_HABILITADO ) {
-		gtk_widget_set_sensitive( game_menu_uiinfo[ON_CONNECT].widget,FALSE);
-		gtk_widget_set_sensitive( game_menu_uiinfo[ON_DISCONNECT].widget,TRUE);
-		gtk_widget_set_sensitive( actions_menu_uiinfo[ON_START].widget,TRUE);
+		gtk_widget_set_sensitive (connect_menu, FALSE);
+		gtk_widget_set_sensitive (disconnect_menu, TRUE);
+		gtk_widget_set_sensitive (start_menu, TRUE);
 		gtk_widget_set_sensitive (SensiData.connect_button, FALSE);
 		gtk_widget_set_sensitive (SensiData.start_button, TRUE);
 
 	} else {
-		gtk_widget_set_sensitive( game_menu_uiinfo[ON_CONNECT].widget,FALSE);
-		gtk_widget_set_sensitive( game_menu_uiinfo[ON_DISCONNECT].widget,TRUE);
-		gtk_widget_set_sensitive( actions_menu_uiinfo[ON_START].widget,FALSE);
+		gtk_widget_set_sensitive (connect_menu, FALSE);
+		gtk_widget_set_sensitive (disconnect_menu, TRUE);
+		gtk_widget_set_sensitive (start_menu, FALSE);
 		gtk_widget_set_sensitive (SensiData.connect_button, FALSE);
 		gtk_widget_set_sensitive (SensiData.start_button, FALSE);
 	}
 
 	if( g_game.with_ggz ) {
-		gtk_widget_set_sensitive( game_menu_uiinfo[ON_CONNECT].widget,FALSE);
+		gtk_widget_set_sensitive (connect_menu, FALSE);
 		gtk_widget_set_sensitive (SensiData.connect_button, FALSE);
 	} 
 	if( g_game.observer ) {
-		gtk_widget_set_sensitive( actions_menu_uiinfo[ON_START].widget,FALSE);
+		gtk_widget_set_sensitive (start_menu, FALSE);
 		gtk_widget_set_sensitive (SensiData.start_button, FALSE);
 	}
 
 	/* STATUS */
 	if( e == PLAYER_STATUS_DESCONECTADO ) {
-		gtk_widget_set_sensitive( view_menu_uiinfo[ON_STATUS].widget,FALSE);
+		gtk_widget_set_sensitive (players_menu, FALSE);
 		gtk_widget_set_sensitive (SensiData.status_button, FALSE);
 	} else {
-		gtk_widget_set_sensitive( view_menu_uiinfo[ON_STATUS].widget,TRUE);
+		gtk_widget_set_sensitive (players_menu, TRUE);
 		gtk_widget_set_sensitive (SensiData.status_button, TRUE);
 	}
 
 	/* ATAQUE */
 	if( e == PLAYER_STATUS_ATAQUE ) {
-		gtk_widget_set_sensitive( actions_menu_uiinfo[ON_ATTACK_RE].widget,TRUE);
-		gtk_widget_set_sensitive( actions_menu_uiinfo[ON_ATTACK_RESET].widget,TRUE);
+		gtk_widget_set_sensitive (reattack_menu, TRUE);
+		gtk_widget_set_sensitive (reset_menu, TRUE);
 	} else {
-		gtk_widget_set_sensitive( actions_menu_uiinfo[ON_ATTACK_RE].widget,FALSE);
-		gtk_widget_set_sensitive( actions_menu_uiinfo[ON_ATTACK_RESET].widget,FALSE);
+		gtk_widget_set_sensitive (reattack_menu, FALSE);
+		gtk_widget_set_sensitive (reset_menu, FALSE);
 	}
 
 	/* ENVIAR FICHAS */
 	if( e==PLAYER_STATUS_FICHAS || e==PLAYER_STATUS_FICHAS2 || e==PLAYER_STATUS_FICHASC ) {
-		gtk_widget_set_sensitive( actions_menu_uiinfo[ON_FICHAS].widget,TRUE);
+		gtk_widget_set_sensitive (send_menu, TRUE);
 		gtk_widget_set_sensitive (SensiData.enviarfichas_button, TRUE);
 	} else {
-		gtk_widget_set_sensitive( actions_menu_uiinfo[ON_FICHAS].widget,FALSE);
+		gtk_widget_set_sensitive (send_menu, FALSE);
 		gtk_widget_set_sensitive (SensiData.enviarfichas_button, FALSE);
 	}
 
 	/* REAGRUPE */
 	if( e==PLAYER_STATUS_ATAQUE || e==PLAYER_STATUS_TROPAS ) {
-		gtk_widget_set_sensitive( actions_menu_uiinfo[ON_REGROUP].widget,TRUE);
+		gtk_widget_set_sensitive (regroup_menu, TRUE);
 		gtk_widget_set_sensitive (SensiData.reagrupe_button, TRUE);
 	} else {
-		gtk_widget_set_sensitive( actions_menu_uiinfo[ON_REGROUP].widget,FALSE);
+		gtk_widget_set_sensitive (regroup_menu, FALSE);
 		gtk_widget_set_sensitive (SensiData.reagrupe_button, FALSE);
 	}
 
 	/* GET CARD */
 	if( e==PLAYER_STATUS_ATAQUE || e==PLAYER_STATUS_TROPAS || e==PLAYER_STATUS_REAGRUPE ) {
-		gtk_widget_set_sensitive( actions_menu_uiinfo[ON_GETCARD].widget,TRUE);
+		gtk_widget_set_sensitive (get_menu, TRUE);
 		gtk_widget_set_sensitive (SensiData.getcard_button, TRUE);
 	} else {
-		gtk_widget_set_sensitive( actions_menu_uiinfo[ON_GETCARD].widget,FALSE);
+		gtk_widget_set_sensitive (get_menu, FALSE);
 		gtk_widget_set_sensitive (SensiData.getcard_button, FALSE);
 	}
 
 	/* END TURN */
 	if( e==PLAYER_STATUS_ATAQUE || e==PLAYER_STATUS_TROPAS || e==PLAYER_STATUS_REAGRUPE || e==PLAYER_STATUS_TARJETA) {
-		gtk_widget_set_sensitive( actions_menu_uiinfo[ON_ENDTURN].widget,TRUE);
+		gtk_widget_set_sensitive (end_menu, TRUE);
 		gtk_widget_set_sensitive (SensiData.endturn_button, TRUE);
 	} else {
-		gtk_widget_set_sensitive( actions_menu_uiinfo[ON_ENDTURN].widget,FALSE);
+		gtk_widget_set_sensitive (end_menu, FALSE);
 		gtk_widget_set_sensitive (SensiData.endturn_button, FALSE);
 	}
 
 	/* UPDATE MAP */
 	if( e >= PLAYER_STATUS_START || (g_game.observer && e >= PLAYER_STATUS_CONNECTED) ) {
-		gtk_widget_set_sensitive( actions_menu_uiinfo[ON_UPDATEMAP].widget,TRUE);
+		gtk_widget_set_sensitive (update_menu, TRUE);
 	} else {
-		gtk_widget_set_sensitive( actions_menu_uiinfo[ON_UPDATEMAP].widget,FALSE);
+		gtk_widget_set_sensitive (update_menu, FALSE);
 	}
 
 	/* VIEW CARDS, MISSION */
 	if( e >= PLAYER_STATUS_START ) {
-		gtk_widget_set_sensitive( view_menu_uiinfo[ON_MISSION].widget,TRUE);
-		gtk_widget_set_sensitive( view_menu_uiinfo[ON_CARDS].widget,TRUE);
+		gtk_widget_set_sensitive (mission_menu, TRUE);
+		gtk_widget_set_sensitive (cards_menu, TRUE);
 	} else {
-		gtk_widget_set_sensitive( view_menu_uiinfo[ON_MISSION].widget,FALSE);
-		gtk_widget_set_sensitive( view_menu_uiinfo[ON_CARDS].widget,FALSE);
+		gtk_widget_set_sensitive (mission_menu, FALSE);
+		gtk_widget_set_sensitive (cards_menu, FALSE);
 	}
 
 	/* LAUNCH ROBOT */
 	if( e >= PLAYER_STATUS_CONNECTED && e < PLAYER_STATUS_START ) {
-		gtk_widget_set_sensitive( game_menu_uiinfo[ON_LAUNCHROBOT].widget,TRUE);
+		gtk_widget_set_sensitive (robot_menu, TRUE);
 	} else {
-		gtk_widget_set_sensitive( game_menu_uiinfo[ON_LAUNCHROBOT].widget,FALSE);
+		gtk_widget_set_sensitive (robot_menu, FALSE);
 	}
 
 	/* SURRENDER */
 	if( e>=PLAYER_STATUS_START ) {
-		gtk_widget_set_sensitive( actions_menu_uiinfo[ON_SURRENDER].widget,TRUE);
+		gtk_widget_set_sensitive (surrender_menu, TRUE);
 	} else {
-		gtk_widget_set_sensitive( actions_menu_uiinfo[ON_SURRENDER].widget,FALSE);
+		gtk_widget_set_sensitive (surrender_menu, FALSE);
 	}
 
 	/* SCORES */
 	if( e >= PLAYER_STATUS_CONNECTED ) {
-		gtk_widget_set_sensitive( game_menu_uiinfo[ON_SCORES].widget,TRUE);
+		gtk_widget_set_sensitive (scores_menu, TRUE);
 	} else {
-		gtk_widget_set_sensitive( game_menu_uiinfo[ON_SCORES].widget,FALSE);
+		gtk_widget_set_sensitive (scores_menu, FALSE);
 	}
 
 
@@ -743,21 +891,22 @@
 /*
  * tropas
  */
-static void tropas_close_cb (GtkWidget *window )
-{
-//	out_tropas( tropas_src, tropas_dst, 0 );
-	gtk_widget_destroy(tropas_dialog);
-}
 
+#define GNOME_PAD 8
 
-static void tropas_ok_cb (GtkWidget *window )
+static void tropas_response_cb (GtkDialog *dialog, gint id, gpointer data)
 {
-	tropas_cant = (gint) gtk_range_get_adjustment(GTK_RANGE(tropas_hscale_cant))->value;
+	if (id == GTK_RESPONSE_OK) {
+	        if (GTK_IS_RANGE( tropas_hscale_cant ))
+	                tropas_cant = (gint) gtk_adjustment_get_value
+	                        (gtk_range_get_adjustment
+	                         (GTK_RANGE( tropas_hscale_cant )));
 
-	if( tropas_cant > 0)
-		out_tropas( tropas_src, tropas_dst, tropas_cant );
+	        if( tropas_cant > 0 )
+	                out_tropas( tropas_src, tropas_dst, tropas_cant );
+	}
 
-	gtk_widget_destroy(tropas_dialog);
+	gtk_widget_destroy(GTK_WIDGET(dialog));
 }
 
 /* shows how many armies you can move after an attack */
@@ -774,43 +923,36 @@
 	tropas_src = src;
 	tropas_dst = dst;
 
-	if( tropas_dialog != NULL ) {
-		gdk_window_show( tropas_dialog->window);
-		gdk_window_raise( tropas_dialog->window);
-		return ;
-	}
-
 	tropas_cant = 0;
 
 //	tropas_dialog = gnome_dialog_new(_("A country was conquered"),GNOME_STOCK_BUTTON_OK,NULL);
 	tropas_dialog = teg_dialog_new(_("A country was conquered"),_("A country was conquered"));
-	gnome_dialog_append_button( GNOME_DIALOG(tropas_dialog),GNOME_STOCK_BUTTON_OK);
+	gtk_dialog_add_button( GTK_DIALOG(tropas_dialog), _("_OK"),
+	                       GTK_RESPONSE_OK );
 
-	gnome_dialog_set_parent (GNOME_DIALOG (tropas_dialog),
+	gtk_window_set_transient_for (GTK_WINDOW (tropas_dialog),
 			GTK_WINDOW (main_window));
 
-	gtk_signal_connect (GTK_OBJECT (tropas_dialog), "destroy",
-			GTK_SIGNAL_FUNC (gtk_widget_destroyed), &tropas_dialog);
+	g_signal_connect (G_OBJECT (tropas_dialog), "destroy",
+	                  G_CALLBACK (gtk_widget_destroyed), &tropas_dialog);
 
-	if( cant > 0 )
-		gnome_dialog_button_connect(GNOME_DIALOG(tropas_dialog), 0, GTK_SIGNAL_FUNC(tropas_ok_cb), NULL);
-	else
-		gnome_dialog_button_connect(GNOME_DIALOG(tropas_dialog), 0, GTK_SIGNAL_FUNC(tropas_close_cb), NULL);
+	g_signal_connect (tropas_dialog, "response",
+	                  G_CALLBACK (tropas_response_cb), NULL);
 
-	vbox_dia = GNOME_DIALOG(tropas_dialog)->vbox;
+	vbox_dia = gtk_dialog_get_content_area (GTK_DIALOG (tropas_dialog));
 
-	table = gtk_table_new (2, 2, FALSE);
-	gtk_container_border_width (GTK_CONTAINER (table), GNOME_PAD);
-	gtk_table_set_row_spacings (GTK_TABLE (table), GNOME_PAD);
-	gtk_table_set_col_spacings (GTK_TABLE (table), GNOME_PAD);
+	table = gtk_grid_new ();
+	gtk_container_set_border_width (GTK_CONTAINER (table), GNOME_PAD);
+	gtk_grid_set_row_spacing (GTK_GRID (table), GNOME_PAD);
+	gtk_grid_set_column_spacing (GTK_GRID (table), GNOME_PAD);
 
 	gtk_box_pack_start( GTK_BOX( vbox_dia), table, TRUE, TRUE, 0);
 
 	frame = gtk_frame_new (_("A new country"));
-	gtk_container_border_width (GTK_CONTAINER (frame), 0);
+	gtk_container_set_border_width (GTK_CONTAINER (frame), 0);
 
-	vbox = gtk_vbox_new (TRUE, 0);
-	gtk_container_border_width (GTK_CONTAINER (vbox), GNOME_PAD);
+	vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
+	gtk_container_set_border_width (GTK_CONTAINER (vbox), GNOME_PAD);
 
 	snprintf(buf,sizeof(buf)-1,_("You conquered '%s' in your attack from '%s'!!\n"), countries_get_name(dst), countries_get_name(src) );
 	buf[ sizeof(buf) -1 ] = 0;
@@ -818,13 +960,14 @@
 	gtk_box_pack_start( GTK_BOX( vbox), label, TRUE, TRUE, 0);
 
 	if( cant >  0) {
-		hbox = gtk_hbox_new( FALSE, 0);
+		hbox = gtk_box_new( GTK_ORIENTATION_HORIZONTAL, 0 );
 		gtk_container_add( GTK_CONTAINER( vbox ), hbox );
 		label = gtk_label_new(_("Armies to move"));
 		gtk_box_pack_start( GTK_BOX( hbox), label, TRUE, TRUE, 0);
 		adj = (GtkAdjustment *) gtk_adjustment_new( 0.0, 0.0, (gfloat) (cant + 1), 1.0, 1.0, 1.0 );
 		// tropas_spinner_cant = gtk_spin_button_new( adj, 0.0, 0);
-		tropas_hscale_cant = gtk_hscale_new( adj);
+		tropas_hscale_cant = gtk_scale_new( GTK_ORIENTATION_HORIZONTAL,
+                                                    adj );
 		gtk_box_pack_start( GTK_BOX( hbox), tropas_hscale_cant, TRUE, TRUE, 0);
 		gtk_scale_set_digits(GTK_SCALE(tropas_hscale_cant), 0);
 		gtk_scale_set_draw_value(GTK_SCALE(tropas_hscale_cant),1);
@@ -838,27 +981,32 @@
 
 	gtk_container_add (GTK_CONTAINER (frame), vbox);
 
-	gtk_table_attach (GTK_TABLE (table), frame, 0, 1, 0, 1, GTK_EXPAND |
-			GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+	gtk_grid_attach (GTK_GRID (table), frame, 0, 0, 1, 1);
 
 
-	if (!GTK_WIDGET_VISIBLE (tropas_dialog))
+	if (!gtk_widget_get_visible (tropas_dialog))
 		gtk_widget_show_all (tropas_dialog);
 	else
 		gtk_widget_destroy (tropas_dialog);
 }
 
 /* regroup */
-static void reagrupe_ok_cb (GtkWidget *window )
+static void reagrupe_response_cb (GtkDialog *dialog, gint id, gpointer data )
 {
-	reagrupe_cant = (gint) gtk_range_get_adjustment(GTK_RANGE(reagrupe_hscale_cant))->value;
-
-	if( reagrupe_cant > 0) {
-		reagrupe_out( reagrupe_src, reagrupe_dst, reagrupe_cant );
-	} else
-		reagrupe_reset();
+	if (id == GTK_RESPONSE_OK) {
+	        if (GTK_IS_RANGE (reagrupe_hscale_cant))
+	                reagrupe_cant = (gint) gtk_adjustment_get_value
+	                        (gtk_range_get_adjustment
+	                         (GTK_RANGE(reagrupe_hscale_cant)));
+
+	        if( reagrupe_cant > 0) {
+	                reagrupe_out( reagrupe_src, reagrupe_dst,
+	                              reagrupe_cant );
+	        } else
+	                reagrupe_reset();
+	}
 
-	gtk_widget_destroy(reagrupe_dialog);
+	gtk_widget_destroy(GTK_WIDGET(reagrupe_dialog));
 }
 
 /* window that shows armies to move in a regroup */
@@ -875,54 +1023,50 @@
 	reagrupe_src = src;
 	reagrupe_dst = dst;
 
-	if( reagrupe_dialog != NULL ) {
-		gdk_window_show( reagrupe_dialog->window);
-		gdk_window_raise( reagrupe_dialog->window);
-		return ;
-	}
-
 	reagrupe_cant = 0;
 
 //	reagrupe_dialog = gnome_dialog_new(_("Regrouping armies"),GNOME_STOCK_BUTTON_OK,NULL);
 	reagrupe_dialog = teg_dialog_new(_("Regrouping armies"),_("Regroup your armies"));
 
-	gnome_dialog_append_button(GNOME_DIALOG(reagrupe_dialog), GNOME_STOCK_BUTTON_OK);
+	gtk_dialog_add_button(GTK_DIALOG(reagrupe_dialog), _("_OK"),
+                              GTK_RESPONSE_OK);
 
-	gnome_dialog_set_parent (GNOME_DIALOG (reagrupe_dialog),
+	gtk_window_set_transient_for (GTK_WINDOW (reagrupe_dialog),
 			GTK_WINDOW (main_window));
 
-	gtk_signal_connect (GTK_OBJECT (reagrupe_dialog), "destroy",
-			GTK_SIGNAL_FUNC (gtk_widget_destroyed), &reagrupe_dialog);
+	g_signal_connect (G_OBJECT (reagrupe_dialog), "destroy",
+	                  G_CALLBACK (gtk_widget_destroyed), &reagrupe_dialog);
 
-	gnome_dialog_button_connect(GNOME_DIALOG(reagrupe_dialog), 0, GTK_SIGNAL_FUNC(reagrupe_ok_cb), NULL);
+	g_signal_connect (reagrupe_dialog, "response",
+	                  G_CALLBACK (reagrupe_response_cb), NULL);
 
-	vbox_dia = GNOME_DIALOG(reagrupe_dialog)->vbox;
+	vbox_dia = gtk_dialog_get_content_area(GTK_DIALOG(reagrupe_dialog));
 
-	table = gtk_table_new (2, 2, FALSE);
-	gtk_container_border_width (GTK_CONTAINER (table), GNOME_PAD);
-	gtk_table_set_row_spacings (GTK_TABLE (table), GNOME_PAD);
-	gtk_table_set_col_spacings (GTK_TABLE (table), GNOME_PAD);
+	table = gtk_grid_new ();
+	gtk_container_set_border_width (GTK_CONTAINER (table), GNOME_PAD);
+	gtk_grid_set_row_spacing (GTK_GRID (table), GNOME_PAD);
+	gtk_grid_set_column_spacing (GTK_GRID (table), GNOME_PAD);
 
 	gtk_box_pack_start( GTK_BOX( vbox_dia), table, TRUE, TRUE, 0);
 
 	frame = gtk_frame_new (_("Regrouping"));
-	gtk_container_border_width (GTK_CONTAINER (frame), 0);
+	gtk_container_set_border_width (GTK_CONTAINER (frame), 0);
 
-	vbox = gtk_vbox_new (TRUE, 0);
-	gtk_container_border_width (GTK_CONTAINER (vbox), GNOME_PAD);
+	vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
+	gtk_container_set_border_width (GTK_CONTAINER (vbox), GNOME_PAD);
 
 	snprintf(buf, sizeof(buf) -1, _("Moving armies from '%s' to '%s'\n"), countries_get_name(src), countries_get_name(dst) );
 	buf[ sizeof(buf) -1 ] = 0;
 	label = gtk_label_new(buf);
 	gtk_box_pack_start( GTK_BOX( vbox), label, TRUE, TRUE, 0);
 
-	hbox = gtk_hbox_new( FALSE, 0);
+	hbox = gtk_box_new( GTK_ORIENTATION_HORIZONTAL, 0 );
 	gtk_container_add( GTK_CONTAINER( vbox ), hbox );
 	label = gtk_label_new(_("Armies to move"));
 	gtk_box_pack_start( GTK_BOX( hbox), label, TRUE, TRUE, 0);
 	adj = (GtkAdjustment *) gtk_adjustment_new( 0.0, 0.0, (gfloat) (cant + 1), 1.0, 1.0, 1.0 );
 
-	reagrupe_hscale_cant = gtk_hscale_new( adj);
+	reagrupe_hscale_cant = gtk_scale_new( GTK_ORIENTATION_HORIZONTAL, adj );
 
 	gtk_box_pack_start( GTK_BOX( hbox), reagrupe_hscale_cant, TRUE, TRUE, 0);
 	gtk_scale_set_digits(GTK_SCALE(reagrupe_hscale_cant), 0);
@@ -936,11 +1080,10 @@
 
 	gtk_container_add (GTK_CONTAINER (frame), vbox);
 
-	gtk_table_attach (GTK_TABLE (table), frame, 0, 1, 0, 1, GTK_EXPAND |
-			GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+	gtk_grid_attach (GTK_GRID (table), frame, 0, 0, 1, 1);
 
 
-	if (!GTK_WIDGET_VISIBLE (reagrupe_dialog))
+	if (!gtk_widget_get_visible (reagrupe_dialog))
 		gtk_widget_show_all (reagrupe_dialog);
 	else
 		gtk_widget_destroy (reagrupe_dialog);
--- teg-0.11.2+debian.orig/client/gui-gnome/g_cont.h
+++ teg-0.11.2+debian/client/gui-gnome/g_cont.h
@@ -22,17 +22,17 @@
 #ifndef __TEG_GUI_GNOME_GCONT_H
 #define __TEG_GUI_GNOME_GCONT_H
 
-#include <gnome.h>
+#include <goocanvas.h>
 
 struct _G_conts {
-	GnomeCanvasGroup *cont_group;
+	GooCanvasItem *cont_group;
 	int x;
 	int y;
 };
 
 extern struct _G_conts G_conts[];
 
-void G_cont_create( int cont, GnomeCanvasGroup *root );
+void G_cont_create( int cont, GooCanvasItem *root );
 int G_cont_tot();
 
 #endif /* __TEG_GUI_GNOME_GCONT_H */
--- teg-0.11.2+debian.orig/client/gui-gnome/chatline.c
+++ teg-0.11.2+debian/client/gui-gnome/chatline.c
@@ -15,7 +15,8 @@
 #include <config.h>
 #endif
 
-#include <gnome.h>
+#include <gtk/gtk.h>
+#include <glib/gi18n.h>
 
 #include <stdio.h>
 #include <stdlib.h>
--- teg-0.11.2+debian.orig/client/gui-gnome/priv.c
+++ teg-0.11.2+debian/client/gui-gnome/priv.c
@@ -22,7 +22,7 @@
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
-#include <gnome.h>
+#include <gtk/gtk.h>
 
 #include "gui.h"
 #include "client.h"
@@ -33,13 +33,14 @@
 struct _gui_private gui_private;
 
 /* Prefs */
-GConfClient *g_conf_client = NULL;
+GSettings *settings = NULL;
 
 TEG_STATUS priv_init( void )
 {
 	gui_private.tag = -1;
 	gui_private.tag_ggz = -1;
-	gui_private.msg_show_colors = 0;
+	gui_private.msg_show_colors
+	  = g_settings_get_boolean( settings, "msgshow-with-color" );
 	gui_private.country_i_am = -1;
 
 	return TEG_STATUS_SUCCESS;
--- teg-0.11.2+debian.orig/client/gui-gnome/support.c
+++ teg-0.11.2+debian/client/gui-gnome/support.c
@@ -30,7 +30,8 @@
 #include <stdio.h>
 #include <iconv.h>
 
-#include <gnome.h>
+#include <goocanvas.h>
+#include <glib/gi18n.h>
 
 #include "gui.h"
 #include "client.h"
@@ -48,8 +49,6 @@
 
 void generic_window_set_parent (GtkWidget * dialog, GtkWindow   * parent)
 {
-	gint x, y, w, h, dialog_x, dialog_y;
-
 	g_return_if_fail(dialog != NULL);
 	g_return_if_fail(parent != NULL);
 	g_return_if_fail(GTK_IS_WINDOW(parent));
@@ -58,25 +57,11 @@
 
 
 
-	if ( ! GTK_WIDGET_VISIBLE(parent)) return; /* Can't get its
+	if ( ! gtk_widget_get_visible(GTK_WIDGET(parent))) return; /* Can't get its
 						  size/pos */
 
-	/* Throw out other positioning */
-	gtk_window_set_position(GTK_WINDOW(dialog),GTK_WIN_POS_NONE);
-
-	gdk_window_get_origin (GTK_WIDGET(parent)->window, &x, &y);
-	gdk_window_get_size   (GTK_WIDGET(parent)->window, &w, &h);
-
-	/*
-	 * The problem here is we don't know how big the dialog is.
-	 * So "centered" isn't really true. We'll go with 
-	 * "kind of more or less on top"
-	 */
-
-	dialog_x = x + w/4;
-	dialog_y = y + h/4;
-
-	gtk_widget_set_uposition(GTK_WIDGET(dialog), dialog_x, dialog_y); 
+	gtk_window_set_position(GTK_WINDOW(dialog),
+	                        GTK_WIN_POS_CENTER_ON_PARENT);
 }
 
 /**
@@ -94,10 +79,7 @@
 	if( f == NULL )
 		return NULL;
 
-	filename = gnome_pixmap_file (f);
-	if( filename == NULL ) {
-		filename = g_strconcat( PIXMAPDIR,f,NULL );
-	}
+	filename = g_strconcat( PIXMAPDIR,f,NULL );
 	g_free( f );
 	return filename;
 }
@@ -113,71 +95,68 @@
 {
 	GtkWidget* dialog;
 	GtkWidget* canvas;
-	GnomeCanvasItem *item;
-
-	dialog = gnome_dialog_new(title, 
-			GNOME_STOCK_BUTTON_OK,
-			NULL );
-	gnome_dialog_set_parent( GNOME_DIALOG(dialog), GTK_WINDOW(main_window));
-	gnome_dialog_set_close( GNOME_DIALOG(dialog), TRUE );
-	
-
-	canvas = gnome_canvas_new();
-	gtk_widget_set_usize (canvas, TEG_DIALOG_X, TEG_DIALOG_Y );
-	gnome_canvas_set_scroll_region (GNOME_CANVAS (canvas), 0, 0, TEG_DIALOG_X, TEG_DIALOG_Y );
-
-	item = gnome_canvas_item_new(
-		gnome_canvas_root(GNOME_CANVAS(canvas)),
-		gnome_canvas_rect_get_type (),
-		"x1", 0.0,
-		"y1", 0.0,
-		"x2", (double) TEG_DIALOG_X,
-		"y2", 45.0,
-		"fill_color","black",
-		"outline_color","black",
-		NULL);
-
-	item = gnome_canvas_item_new(
-		gnome_canvas_root(GNOME_CANVAS(canvas)),
-		gnome_canvas_rect_get_type (),
-		"x1", 0.0,
-		"y1", 45.0,
-		"x2", (double) TEG_DIALOG_X,
-		"y2", (double) TEG_DIALOG_Y,
-		"fill_color","light green",
-		"outline_color","light green",
-		NULL);
 
-	item = gnome_canvas_item_new(
-		gnome_canvas_root(GNOME_CANVAS(canvas)),
-		gnome_canvas_text_get_type(),
-		"text",bigtitle,
-		"x", (double) (TEG_DIALOG_X/2),
-		"y", (double) 10,
-		"x_offset", (double) -1,
-		"y_offset", (double) -1,
+	dialog = gtk_dialog_new_with_buttons(title,
+	                                     GTK_WINDOW(main_window),
+	                                     GTK_DIALOG_DESTROY_WITH_PARENT,
+	                                     _("_OK"), GTK_RESPONSE_OK,
+	                                     NULL );
+
+	canvas = goo_canvas_new();
+	gtk_widget_set_size_request ( canvas, TEG_DIALOG_X, TEG_DIALOG_Y );
+	goo_canvas_set_bounds (GOO_CANVAS (canvas), 0, 0, TEG_DIALOG_X,
+	                       TEG_DIALOG_Y);
+
+	goo_canvas_rect_new(
+		goo_canvas_get_root_item(GOO_CANVAS(canvas)),
+		0.0,
+		0.0,
+		(double) TEG_DIALOG_X,
+		45.0,
+		"fill-color","black",
+		"stroke-color","black",
+		NULL);
+
+	goo_canvas_rect_new(
+		goo_canvas_get_root_item(GOO_CANVAS(canvas)),
+		0.0,
+		45.0,
+		(double) TEG_DIALOG_X,
+		(double) TEG_DIALOG_Y,
+		"fill-color","light green",
+		"stroke-color","light green",
+		NULL);
+
+	goo_canvas_text_new(
+		goo_canvas_get_root_item(GOO_CANVAS(canvas)),
+		bigtitle,
+		(double) (TEG_DIALOG_X/2),
+		(double) 10,
+		-1,
+		GOO_CANVAS_ANCHOR_NORTH,
 		"font", HELVETICA_20_BFONT,
-		"fill_color", "white",
-		"anchor",GTK_ANCHOR_NORTH,
+		"fill-color", "white",
 		NULL);
 
-	item = gnome_canvas_item_new(
-		gnome_canvas_root(GNOME_CANVAS(canvas)),
-		gnome_canvas_text_get_type(),
-		"text",data,
-		"x", (double) 4,
-		"y", (double) 60,
-		"x_offset", (double) -1,
-		"y_offset", (double) -1,
+	goo_canvas_text_new(
+		goo_canvas_get_root_item(GOO_CANVAS(canvas)),
+		data,
+		(double) 4,
+		(double) 60,
+		-1,
+		GOO_CANVAS_ANCHOR_NORTH_WEST,
 		"font", HELVETICA_12_FONT,
-		"fill_color", "black",
-		"anchor",GTK_ANCHOR_NW,
+		"fill-color", "black",
 		NULL);
 
-	gtk_box_pack_start_defaults( GTK_BOX(GNOME_DIALOG(dialog)->vbox), GTK_WIDGET(canvas));
+	gtk_box_pack_start( GTK_BOX(gtk_dialog_get_content_area
+	                            (GTK_DIALOG(dialog))), GTK_WIDGET(canvas),
+	                    TRUE, TRUE, 0);
 
 	gtk_widget_show (canvas);
 	gtk_widget_show_all(dialog);
+	gtk_dialog_run (GTK_DIALOG (dialog));
+	gtk_widget_destroy (dialog);
 
 	return;
 }
@@ -190,42 +169,44 @@
 {
 	GtkWidget* dialog;
 	GtkWidget* canvas;
-	GnomeCanvasItem *item;
 
-	dialog = gnome_dialog_new(title, NULL );
+	dialog = gtk_dialog_new ();
 
-	gnome_dialog_set_parent( GNOME_DIALOG(dialog), GTK_WINDOW(main_window));
-
-	canvas = gnome_canvas_new();
-	gtk_widget_set_usize (canvas, TEG_DIALOG_X, TEG_DIALOG_Y_NEW );
-	gnome_canvas_set_scroll_region (GNOME_CANVAS (canvas), 0, 0, TEG_DIALOG_X, TEG_DIALOG_Y_NEW );
-
-	item = gnome_canvas_item_new(
-		gnome_canvas_root(GNOME_CANVAS(canvas)),
-		gnome_canvas_rect_get_type (),
-		"x1", 0.0,
-		"y1", 0.0,
-		"x2", (double) TEG_DIALOG_X,
-		"y2", 45.0,
-		"fill_color","black",
-		"outline_color","black",
-		NULL);
-
-	item = gnome_canvas_item_new(
-		gnome_canvas_root(GNOME_CANVAS(canvas)),
-		gnome_canvas_text_get_type(),
-		"text",bigtitle,
-		"x", (double) (TEG_DIALOG_X/2),
-		"y", (double) 10,
-		"x_offset", (double) -1,
-		"y_offset", (double) -1,
+	gtk_window_set_title (GTK_WINDOW (dialog), title);
+	gtk_window_set_transient_for ( GTK_WINDOW(dialog),
+	                               GTK_WINDOW(main_window) );
+
+	canvas = goo_canvas_new();
+	gtk_widget_set_size_request (canvas, TEG_DIALOG_X, TEG_DIALOG_Y_NEW);
+	gtk_widget_set_halign (canvas, GTK_ALIGN_CENTER);
+	goo_canvas_set_bounds (GOO_CANVAS (canvas), 0, 0, TEG_DIALOG_X,
+	                       TEG_DIALOG_Y_NEW);
+
+	goo_canvas_rect_new(
+		goo_canvas_get_root_item(GOO_CANVAS(canvas)),
+		0.0,
+		0.0,
+		(double) TEG_DIALOG_X,
+		45.0,
+		"fill-color","black",
+		"stroke-color","black",
+		NULL);
+
+	goo_canvas_text_new(
+		goo_canvas_get_root_item(GOO_CANVAS(canvas)),
+		bigtitle,
+		(double) (TEG_DIALOG_X/2),
+		(double) 10,
+		-1,
+		GOO_CANVAS_ANCHOR_NORTH,
 		"font", HELVETICA_20_BFONT,
-		"fill_color", "white",
-		"anchor",GTK_ANCHOR_NORTH,
+		"fill-color", "white",
 		NULL);
 
 
-	gtk_box_pack_start_defaults( GTK_BOX(GNOME_DIALOG(dialog)->vbox), GTK_WIDGET(canvas));
+	gtk_box_pack_start( GTK_BOX(gtk_dialog_get_content_area
+	                            (GTK_DIALOG(dialog))), GTK_WIDGET(canvas),
+	                    TRUE, TRUE, 0 );
 
 	gtk_widget_show (canvas);
 
@@ -240,12 +221,12 @@
 {
 	GtkWidget *dialog = (GtkWidget*) data;
 
-	gnome_dialog_close( GNOME_DIALOG(dialog) );
+	gtk_widget_destroy( dialog );
 	return;
 }
 
 
-GtkWidget * teg_dialog_gameover( int numjug, int mission )
+void teg_dialog_gameover( int numjug, int mission )
 {
 	GtkWidget *dialog;
 	PCPLAYER pJ;
@@ -265,14 +246,15 @@
 		dialog = teg_dialog_new(_("Game Over"),buf);
 	}
 
-	hbox = gtk_hbox_new ( FALSE, 3);
+	hbox = gtk_box_new ( GTK_ORIENTATION_HORIZONTAL, 3 );
 
-	gtk_box_pack_start_defaults( GTK_BOX(GNOME_DIALOG(dialog)->vbox), hbox);
+	gtk_box_pack_start(GTK_BOX(gtk_dialog_get_content_area
+	                           (GTK_DIALOG(dialog))), hbox, TRUE, TRUE, 0);
 
 
 	/* show mission */
 	frame = gtk_frame_new( _("Accomplished mission") );
-	gtk_container_border_width( GTK_CONTAINER(frame), 3 );
+	gtk_container_set_border_width( GTK_CONTAINER(frame), 3 );
 	gtk_container_add( GTK_CONTAINER(hbox), frame );
 
 	mission_view_fake_number( frame, mission );
@@ -280,21 +262,16 @@
 
 	/* show scores */
 	frame = gtk_frame_new( _("Players' Scores") );
-	gtk_container_border_width( GTK_CONTAINER(frame), 3 );
+	gtk_container_set_border_width( GTK_CONTAINER(frame), 3 );
 	gtk_container_add( GTK_CONTAINER(hbox), frame );
 
 	gui_scores_embed( frame );
 	
-	gnome_dialog_append_buttons(GNOME_DIALOG(dialog),
-			GNOME_STOCK_BUTTON_OK,
-			NULL );
-	gnome_dialog_button_connect (GNOME_DIALOG(dialog),
-			0, GTK_SIGNAL_FUNC(dialog_close), dialog );
-
-	gtk_widget_show_all(dialog);
-	raise_and_focus(dialog);
+	gtk_dialog_add_button(GTK_DIALOG(dialog), _("_OK"), GTK_RESPONSE_OK);
 
-	return dialog;
+	gtk_widget_show_all (dialog);
+	gtk_dialog_run (GTK_DIALOG (dialog));
+	gtk_widget_destroy (dialog);
 }
 
 gchar *translate_to_utf8(const gchar *string )
--- teg-0.11.2+debian.orig/client/gui-gnome/support.h
+++ teg-0.11.2+debian/client/gui-gnome/support.h
@@ -27,7 +27,7 @@
 void teg_dialog( char* title, char* bigtitle, char* data );
 GtkWidget* teg_dialog_new( char* title, char* bigtitle );
 void dialog_close( GtkWidget *button, gpointer data );
-GtkWidget * teg_dialog_gameover( int numjug, int mission );
+void teg_dialog_gameover( int numjug, int mission );
 gchar *translate_to_utf8(const gchar *string );
 
 #endif /* __TEG_GUI_GNOME_SUPPORT_H */
--- teg-0.11.2+debian.orig/client/gui-gnome/g_cont.c
+++ teg-0.11.2+debian/client/gui-gnome/g_cont.c
@@ -21,7 +21,7 @@
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
-#include <gnome.h>
+#include <goocanvas.h>
 
 #include "gui.h"
 #include "client.h"
@@ -53,16 +53,15 @@
 	initialized = 1;
 }
 
-void G_cont_create( int cont, GnomeCanvasGroup *root )
+void G_cont_create( int cont, GooCanvasItem *root )
 {
 	if(!initialized)
 		G_cont_init();
 
-	G_conts[cont].cont_group = GNOME_CANVAS_GROUP(
-			gnome_canvas_item_new (
+	G_conts[cont].cont_group =
+			goo_canvas_group_new (
 				root,
-				gnome_canvas_group_get_type (),
 				"x", (double) G_conts[cont].x,
 				"y", (double) G_conts[cont].y,
-				NULL));
+				NULL);
 }
--- teg-0.11.2+debian.orig/client/gui-gnome/g_country.c
+++ teg-0.11.2+debian/client/gui-gnome/g_country.c
@@ -24,7 +24,8 @@
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
-#include <gnome.h>
+#include <goocanvas.h>
+#include <glib/gi18n.h>
 
 #include "gui.h"
 #include "client.h"
@@ -38,6 +39,7 @@
 #include "fonts.h"
 #include "priv.h"
 #include "status.h"
+#include "tegcanvasimage.h"
 
 #undef GENERATE_LIMITROFE
 #undef DRAG_DROP_COUNTRIES
@@ -45,245 +47,252 @@
 struct _G_countries G_countries[COUNTRIES_CANT];
 
 static int initialized = 0;
+static double x, y;
+double new_x, new_y;
+double item_x, item_y;
+static int dragging;
+
+static gboolean
+enter_notify_cb (GooCanvasItem *item, GooCanvasItem *target,
+                 GdkEventCrossing *event, gpointer data)
+{
+        PCOUNTRY country = (PCOUNTRY) data;
+        char buff[250];
+
+        if (country->ejercitos > 0)
+                snprintf(buff,sizeof(buff)-1,_("%s armies: %d"), countries_get_name(country->id),country->ejercitos);
+        else
+                snprintf(buff,sizeof(buff)-1, "%s", countries_get_name(country->id));
+
+        gtk_statusbar_push( GTK_STATUSBAR(statusbar),  0, buff);
+
+        gui_private.country_i_am = country->id;
+        mainstatus_update();
+
+        switch( ESTADO_GET() ) {
+        case PLAYER_STATUS_FICHAS:
+        case PLAYER_STATUS_FICHAS2:
+        case PLAYER_STATUS_FICHASC:
+                fichas_enter( country );
+                break;
+        case PLAYER_STATUS_ATAQUE:
+        case PLAYER_STATUS_TROPAS:
+                attack_enter( country );
+                break;
+        case PLAYER_STATUS_REAGRUPE:
+                reagrupe_enter( country );
+                break;
+        default:
+                break;
+        }
+
+        return TRUE;
+}
+
+static gboolean
+leave_notify_cb (GooCanvasItem *item, GooCanvasItem *target,
+                 GdkEventCrossing *event, gpointer data)
+{
+        PCOUNTRY country = (PCOUNTRY) data;
 
-static gint
-item_event (GnomeCanvasItem *item, GdkEvent *event, gpointer data)
+        gtk_statusbar_remove_all( GTK_STATUSBAR(statusbar), 0 );
+
+        gui_private.country_i_am = -1;
+        mainstatus_update();
+
+        switch( ESTADO_GET() ) {
+        case PLAYER_STATUS_FICHAS:
+        case PLAYER_STATUS_FICHAS2:
+        case PLAYER_STATUS_FICHASC:
+                fichas_leave( country );
+                break;
+        case PLAYER_STATUS_ATAQUE:
+        case PLAYER_STATUS_TROPAS:
+                attack_leave( country );
+                break;
+        case PLAYER_STATUS_REAGRUPE:
+                reagrupe_leave( country );
+                break;
+        default:
+                break;
+        }
+
+        return FALSE;
+}
+
+static gboolean
+button_press_cb (GooCanvasItem *item, GooCanvasItem *targent,
+                 GdkEventButton *event, gpointer data)
 {
-	static double x, y;
-	double new_x, new_y;
+        PCOUNTRY country = (PCOUNTRY) data;
 #ifdef DRAG_DROP_COUNTRIES
 	GdkCursor *fleur;
 #endif /* DRAG_DROP_COUNTRIES */
-	static int dragging;
-	double item_x, item_y;
-	PCOUNTRY country = (PCOUNTRY) data;
-
-#ifdef GENERATE_LIMITROFE
-	static int borrame=0;
-	static int buf[50];
-	static FILE *fp=NULL;
-#endif /* GENERATE_LIMITROFE */
 
-	/* set item_[xy] to the event x,y position in the parent's item-relative coordinates */
-	item_x = event->button.x;
-	item_y = event->button.y;
-	gnome_canvas_item_w2i (item->parent, &item_x, &item_y);
-
-	switch (event->type) {
-	case GDK_ENTER_NOTIFY:
-		{
-			char buff[250];
-			if (country->ejercitos > 0)
-				snprintf(buff,sizeof(buff)-1,_("%s armies: %d"), countries_get_name(country->id),country->ejercitos);
-			else
-				snprintf(buff,sizeof(buff)-1, "%s", countries_get_name(country->id));
-
-			gnome_appbar_set_status( GNOME_APPBAR(statusbar),  buff);
-
-			gui_private.country_i_am = country->id;
-			mainstatus_update();
-
-			switch( ESTADO_GET() ) {
-			case PLAYER_STATUS_FICHAS:
-			case PLAYER_STATUS_FICHAS2:
-			case PLAYER_STATUS_FICHASC:
-				fichas_enter( country );
-				break;
-			case PLAYER_STATUS_ATAQUE:
-			case PLAYER_STATUS_TROPAS:
-				attack_enter( country );
-				break;
-			case PLAYER_STATUS_REAGRUPE:
-				reagrupe_enter( country );
-				break;
-			default:
-				break;
-			}
-		}
-		break;
-	case GDK_LEAVE_NOTIFY:
-		gnome_appbar_set_status( GNOME_APPBAR(statusbar),"" );
-
-		gui_private.country_i_am = -1;
-		mainstatus_update();
-
-		switch( ESTADO_GET() ) {
-		case PLAYER_STATUS_FICHAS:
-		case PLAYER_STATUS_FICHAS2:
-		case PLAYER_STATUS_FICHASC:
-			fichas_leave( country );
-			break;
-		case PLAYER_STATUS_ATAQUE:
-		case PLAYER_STATUS_TROPAS:
-			attack_leave( country );
-			break;
-		case PLAYER_STATUS_REAGRUPE:
-			reagrupe_leave( country );
-			break;
-		default:
-			break;
-		}
-		break;
-	case GDK_BUTTON_PRESS:
-		switch (event->button.button) {
-		case 1:
-			switch( ESTADO_GET() ) {
+        switch (event->button) {
+        case 1:
+                switch( ESTADO_GET() ) {
 #ifdef GENERATE_LIMITROFE
-			case PLAYER_STATUS_DESCONECTADO:
-				if( country->id < borrame ) {
-					textmsg(M_DBG,"not added :%s", countries_get_name(country->id) );
-					break;
-				}
-				buf[ country->id ] = 1;
-				textmsg(M_DBG,"added :%s",countries_get_name(country->id) );
-				break;
+                case PLAYER_STATUS_DESCONECTADO:
+                        if( country->id < borrame ) {
+                                textmsg(M_DBG,"not added :%s", countries_get_name(country->id) );
+                                break;
+                        }
+                        buf[ country->id ] = 1;
+                        textmsg(M_DBG,"added :%s",countries_get_name(country->id) );
+                        break;
 #endif /* GENERATE_LIMITROFE */
-			case PLAYER_STATUS_FICHAS:
-			case PLAYER_STATUS_FICHAS2:
-			case PLAYER_STATUS_FICHASC:
-				if( fichas_add( country ) == TEG_STATUS_SUCCESS ) {
-					G_country_draw_ejer(country->id);
-					armies_add( country->id );
-				}; 
-				break;
-			case PLAYER_STATUS_ATAQUE:
-			case PLAYER_STATUS_TROPAS:
-				attack_click( country );
-				break;
-			case PLAYER_STATUS_REAGRUPE:
-				reagrupe_click( country );
-				break;
-			default:
-				break;
-			}
+                case PLAYER_STATUS_FICHAS:
+                case PLAYER_STATUS_FICHAS2:
+                case PLAYER_STATUS_FICHASC:
+                        if( fichas_add( country ) == TEG_STATUS_SUCCESS ) {
+                                G_country_draw_ejer(country->id);
+                                armies_add( country->id );
+                        };
+                        break;
+                case PLAYER_STATUS_ATAQUE:
+                case PLAYER_STATUS_TROPAS:
+                        attack_click( country );
+                        break;
+                case PLAYER_STATUS_REAGRUPE:
+                        reagrupe_click( country );
+                        break;
+                default:
+                        break;
+                }
 
-			/* XXX: Remove this block when the game is finished */
+                /* XXX: Remove this block when the game is finished */
 #ifdef DRAG_DROP_COUNTRIES
-			{
-				if (event->button.state & GDK_SHIFT_MASK)
-					gtk_object_destroy (GTK_OBJECT (item));
-				else {
-					x = item_x;
-					y = item_y;
-
-					fleur = gdk_cursor_new (GDK_FLEUR);
-					gnome_canvas_item_grab (item,
-								GDK_POINTER_MOTION_MASK | GDK_BUTTON_RELEASE_MASK,
-								fleur,
-								event->button.time);
-					gdk_cursor_destroy (fleur);
-					dragging = TRUE;
-				}
-			}
+                {
+                        if (event->state & GDK_SHIFT_MASK)
+                                g_object_unref (G_OBJECT (item));
+                        else {
+                                x = item_x;
+                                y = item_y;
+
+                                fleur = gdk_cursor_new (GDK_FLEUR);
+                                gnome_canvas_item_grab (item,
+                                                        GDK_POINTER_MOTION_MASK | GDK_BUTTON_RELEASE_MASK,
+                                                        fleur,
+                                                        event->button.time);
+                                gdk_cursor_destroy (fleur);
+                                dragging = TRUE;
+                        }
+                }
 #endif	/* DRAG_DROP_COUNTRIES */
-			break;
+                break;
+
+        case 2:
 
-		case 2:
-			
 #ifdef GENERATE_LIMITROFE
-			{
-				int i;
-				for(i=0;i<50;i++)
-					buf[i]=0;
-				borrame=0;
-
-				if( fp ) fclose( fp );
-				fp = fopen( "test.h", "w+" );
-				textmsg(M_DBG,"Processing %s", countries_get_name(borrame) );
-				break;
-			}
+        {
+                int i;
+                for(i=0;i<50;i++)
+                        buf[i]=0;
+                borrame=0;
+
+                if( fp ) fclose( fp );
+                fp = fopen( "test.h", "w+" );
+                textmsg(M_DBG,"Processing %s", countries_get_name(borrame) );
+                break;
+        }
 #endif /* GENERATE_LIMITROFE */
-#ifdef DRAG_DROP_COUNTRIES 
-			{
-			int xx,yy;
-			int cont = country->continente;
-			xx= G_conts[cont].x ;
-			yy= G_conts[cont].y ;
-			
-			printf("%s :%f %f\n",countries_get_name(country->id),item->x1-xx,item->y1-yy);
-
-			if (event->button.state & GDK_SHIFT_MASK)
-				gnome_canvas_item_lower_to_bottom (item);
-			else
-				gnome_canvas_item_lower (item, 1);
-			break;
-			}
+#ifdef DRAG_DROP_COUNTRIES
+        {
+                int xx,yy;
+                int cont = country->continente;
+                xx= G_conts[cont].x ;
+                yy= G_conts[cont].y ;
+
+                printf("%s :%f %f\n",countries_get_name(country->id),item->x1-xx,item->y1-yy);
+
+                if (event->button.state & GDK_SHIFT_MASK)
+                        gnome_canvas_item_lower_to_bottom (item);
+                else
+                        gnome_canvas_item_lower (item, 1);
+                break;
+        }
 #endif /* DRAG_DROP_COUNTRIES */
-			break;
-		case 3:
-			switch( ESTADO_GET() ) {
+        break;
+        case 3:
+                switch( ESTADO_GET() ) {
 #ifdef GENERATE_LIMITROFE
-			case PLAYER_STATUS_DESCONECTADO:
-				{
-					int i;
-
-					if( !fp ) break;
-					buf[borrame] = 2;
-
-					fprintf(fp,"{");
-					for(i=0;i<50;i++) {
-						fprintf( fp,"%d,",buf[i] );
-					}
-					fprintf(fp,"} /* %s (%d) */\n", countries_get_name(borrame),g_countries[borrame].id);
-
-					borrame++;
-
-					for(i=0;i<50;i++)
-						buf[i]=0;
-
-					if( borrame == 50 )
-						fclose( fp );
-					textmsg(M_DBG,"Processing %s", countries_get_name(borrame) );
-					break;
-				}
+                case PLAYER_STATUS_DESCONECTADO:
+                {
+                        int i;
+
+                        if( !fp ) break;
+                        buf[borrame] = 2;
+
+                        fprintf(fp,"{");
+                        for(i=0;i<50;i++) {
+                                fprintf( fp,"%d,",buf[i] );
+                        }
+                        fprintf(fp,"} /* %s (%d) */\n", countries_get_name(borrame),g_countries[borrame].id);
+
+                        borrame++;
+
+                        for(i=0;i<50;i++)
+                                buf[i]=0;
+
+                        if( borrame == 50 )
+                                fclose( fp );
+                        textmsg(M_DBG,"Processing %s", countries_get_name(borrame) );
+                        break;
+                }
 #endif /* GENERATE_LIMITROFE */
-			case PLAYER_STATUS_FICHAS:
-			case PLAYER_STATUS_FICHAS2:
-			case PLAYER_STATUS_FICHASC:
-				if( fichas_sub( country ) == TEG_STATUS_SUCCESS ) {
-					G_country_draw_ejer(country->id);
-					armies_del( country->id );
-				}
-				break;
-			default:
-				break;
-			}
+                case PLAYER_STATUS_FICHAS:
+                case PLAYER_STATUS_FICHAS2:
+                case PLAYER_STATUS_FICHASC:
+                        if( fichas_sub( country ) == TEG_STATUS_SUCCESS ) {
+                                G_country_draw_ejer(country->id);
+                                armies_del( country->id );
+                        }
+                        break;
+                default:
+                        break;
+                }
 
 #ifdef DRAG_DROP_COUNTRIES
-			if (event->button.state & GDK_SHIFT_MASK)
-				gnome_canvas_item_raise_to_top (item);
-			else
-				gnome_canvas_item_raise (item, 1);
-			break;
+                if (event->button.state & GDK_SHIFT_MASK)
+                        gnome_canvas_item_raise_to_top (item);
+                else
+                        gnome_canvas_item_raise (item, 1);
+                break;
 #endif /* DRAG_DROP_COUNTRIES */
 
-		default:
-			break;
-		}
+        default:
+                break;
+        }
 
-		break;
+        return FALSE;
+}
 
-	case GDK_MOTION_NOTIFY:
-		if (dragging && (event->motion.state & GDK_BUTTON1_MASK)) {
-			new_x = item_x;
-			new_y = item_y;
-
-			gnome_canvas_item_move (item, new_x - x, new_y - y);
-			x = new_x;
-			y = new_y;
-		}
-		break;
+static gboolean
+motion_notify_cb (GooCanvasItem *item, GooCanvasItem *target,
+                  GdkEventMotion *event, gpointer data)
+{
+        if (dragging && (event->state & GDK_BUTTON1_MASK)) {
+                new_x = item_x;
+                new_y = item_y;
+
+                goo_canvas_item_translate (item, new_x - x, new_y - y);
+                x = new_x;
+                y = new_y;
+        }
 
-	case GDK_BUTTON_RELEASE:
-		gnome_canvas_item_ungrab (item, event->button.time);
-		dragging = FALSE;
-		break;
+        return FALSE;
+}
 
-	default:
-		break;
-	}
+static gboolean
+button_release_cb (GooCanvasItem *item, GooCanvasItem *target,
+                   GdkEventButton *event, gpointer data)
+{
+        goo_canvas_pointer_ungrab (goo_canvas_item_get_canvas (item),
+                                   item, event->time);
+        dragging = FALSE;
 
-	return FALSE;
+        return FALSE;
 }
 
 /**
@@ -323,6 +332,21 @@
 }
 
 
+static void
+setup_dnd_handlers (GooCanvasItem *item, PCOUNTRY country)
+{
+        g_signal_connect (item, "enter-notify-event",
+                          G_CALLBACK (enter_notify_cb), country);
+        g_signal_connect (item, "leave-notify-event",
+                          G_CALLBACK (leave_notify_cb), country);
+        g_signal_connect (item, "button-press-event",
+                          G_CALLBACK (button_press_cb), country);
+        g_signal_connect (item, "motion-notify-event",
+                          G_CALLBACK (motion_notify_cb), country);
+        g_signal_connect (item, "button-release-event",
+                          G_CALLBACK (button_release_cb), country);
+}
+
 /**
  * @fn void G_country_create( int country )
  * Crea el country country
@@ -333,18 +357,16 @@
 	if (!initialized)
 		G_country_init();
 
-	G_countries[country].country_group = GNOME_CANVAS_GROUP(
-			gnome_canvas_item_new (
+	G_countries[country].country_group =
+			goo_canvas_group_new (
 				G_conts[g_countries[country].continente].cont_group,
-				gnome_canvas_group_get_type (),
 				"x", (float) G_countries[country].x,
 				"y", (float) G_countries[country].y,
-//				"anchor", GTK_ANCHOR_NW,
-				NULL));
+				NULL);
+
 	if( G_countries[country].country_group != NULL )
-		gtk_signal_connect (GTK_OBJECT (G_countries[country].country_group), "event",
-				    (GtkSignalFunc) item_event,
-				    &g_countries[country]);
+	        setup_dnd_handlers (G_countries[country].country_group,
+	                            &g_countries[country]);
 }
 
 /* Draw the country 'country' */
@@ -371,18 +393,20 @@
 		G_countries[country].x_len = gdk_pixbuf_get_width( im );
 		G_countries[country].y_len = gdk_pixbuf_get_height( im );
 
-		G_countries[country].country_item = gnome_canvas_item_new(
+                /* Country images use a custom subclass of
+                   GooCanvasItemSimple, almost identical to
+                   GooCanvasImage.  For details, see the thread at
+                   https://mail.gnome.org/archives/goocanvas-list/2018-August/msg00000.html.  */
+		G_countries[country].country_item = teg_canvas_image_new(
 				G_countries[country].country_group,
-				gnome_canvas_pixbuf_get_type (),
-				"pixbuf", im,
-				"x", 0.0,
-				"y", 0.0,
+				im,
+				0.0,
+				0.0,
 				"width", (double) gdk_pixbuf_get_width( im ),
 				"height", (double) gdk_pixbuf_get_height( im ),
-				"anchor", GTK_ANCHOR_NW,
 				NULL);
 				
-		gdk_pixbuf_unref(im);
+		g_object_unref(im);
 	};
 }
 
@@ -392,7 +416,7 @@
 	PCPLAYER j;
 	double size, size_tmp;
 	int color;
-	GnomeCanvasItem *e;
+	GooCanvasItem *e;
 	int x,y;
 	char size_string[10];
 
@@ -419,12 +443,15 @@
 		default: size = 11; size_tmp = 0;break;
 	}
 
+	if( G_countries[country].ellip_item != NULL) {
+		goo_canvas_item_remove( G_countries[country].ellip_item );
+		G_countries[country].ellip_item = NULL;
+	}
 
-	if( G_countries[country].ellip_item != NULL)
-		gtk_object_destroy(GTK_OBJECT ( G_countries[country].ellip_item ) );
-
-	if( G_countries[country].text_item != NULL)
-		gtk_object_destroy(GTK_OBJECT ( G_countries[country].text_item ) );
+	if( G_countries[country].text_item != NULL) {
+		goo_canvas_item_remove(  G_countries[country].text_item );
+		G_countries[country].text_item = NULL;
+	}
 
 	if( G_countries[country].country_group == NULL)
 		g_warning("G_country_draw_ejer()");
@@ -433,16 +460,15 @@
 	x = G_countries[country].x_len + G_countries[country].x_center;
 	y = G_countries[country].y_len + G_countries[country].y_center;
 
-	e = gnome_canvas_item_new(
+	e = goo_canvas_ellipse_new(
 		G_countries[country].country_group,
-		gnome_canvas_ellipse_get_type(),
-		"x1", (double) x/2-size-size_tmp,
-		"y1", (double) y/2-size,
-		"x2", (double) x/2+size+size_tmp,
-		"y2", (double) y/2+size,
-		"fill_color", G_colores[color].ellip_color,
-		"outline_color", "black",
-		"width_units", (double) 1,
+		(double) x/2,
+		(double) y/2,
+		(double) size+size_tmp,
+		(double) size+size_tmp,
+		"fill-color", G_colores[color].ellip_color,
+		"stroke-color", "black",
+		"line-width", (double) 1,
 		NULL);
 
 	/* 'e' puede ser NULL, pero si es NULL me interesa que ellip lo sea tambien */
@@ -456,17 +482,16 @@
 			sprintf(size_string,"%s", "?");
 		else
 			sprintf(size_string,"%d", g_countries[country].ejercitos);
-		e = gnome_canvas_item_new(
+		e = goo_canvas_text_new(
 			G_countries[country].country_group,
-			gnome_canvas_text_get_type(),
-			"text", size_string,
-			"x", (double) x/2,
-			"y", (double) y/2,
-			"x_offset", (double) -1,
-			"y_offset", (double) -1,
+			size_string,
+			(double) x/2,
+			(double) y/2,
+			(double) -1,
+			GOO_CANVAS_ANCHOR_CENTER,
+			"height", (double) -1,
 			"font", HELVETICA_10_FONT,
-			"fill_color", G_colores[color].text_color,
-			"anchor",GTK_ANCHOR_CENTER,
+			"fill-color", G_colores[color].text_color,
 			NULL);
 
 	} else {
@@ -489,31 +514,31 @@
 		return TEG_STATUS_ERROR;
 
 	if( g_countries[country].selected == COUNTRY_SELECT_NONE ) {
-		gnome_canvas_item_set(
+		g_object_set(
 			G_countries[country].ellip_item, 
-			"outline_color", "black",
-			"width_units", (double) 1,
+			"stroke-color", "black",
+			"line-width", (double) 1,
 			NULL);
 	}
 	if( g_countries[country].selected & COUNTRY_SELECT_FICHAS_IN ) {
-		gnome_canvas_item_set(
+		g_object_set(
 			G_countries[country].ellip_item, 
-			"outline_color", "white",
-			"width_units", (double) 2,
+			"stroke-color", "white",
+			"line-width", (double) 2,
 			NULL);
 	}
 	if( g_countries[country].selected & COUNTRY_SELECT_FICHAS_OUT ) {
-		gnome_canvas_item_set(
+		g_object_set(
 			G_countries[country].ellip_item, 
-			"outline_color", "DarkOrange1",
-			"width_units", (double) 2,
+			"stroke-color", "DarkOrange1",
+			"line-width", (double) 2,
 			NULL);
 	}
 	if( g_countries[country].selected & COUNTRY_SELECT_ATTACK_ENTER ) {
-		gnome_canvas_item_set(
+		g_object_set(
 			G_countries[country].ellip_item, 
-			"outline_color", "white",
-			"width_units", (double) 2,
+			"stroke-color", "white",
+			"line-width", (double) 2,
 			NULL);
 	}
 #if 0
@@ -526,10 +551,10 @@
 	}
 #endif
 	if( g_countries[country].selected & COUNTRY_SELECT_REGROUP_ENTER ) {
-		gnome_canvas_item_set(
+		g_object_set(
 			G_countries[country].ellip_item, 
-			"outline_color", "white",
-			"width_units", (double) 2,
+			"stroke-color", "white",
+			"line-width", (double) 2,
 			NULL);
 	}
 #if 0
@@ -543,25 +568,21 @@
 #endif
 
 	if( g_countries[country].selected & COUNTRY_SELECT_ATTACK_SRC ) {
-		gnome_canvas_item_set(
+		g_object_set(
 			G_countries[country].ellip_item, 
-			"outline_color", "white",
-			"width_units", (double) 2,
+			"stroke-color", "white",
+			"line-width", (double) 2,
 			NULL);
 	}
 
 	if( g_countries[country].selected & COUNTRY_SELECT_ATTACK_DST ) {
-		gnome_canvas_item_set(
+		g_object_set(
 			G_countries[country].ellip_item, 
-			"outline_color", "white",
-			"width_units", (double) 2,
+			"stroke-color", "white",
+			"line-width", (double) 2,
 			NULL);
 	}
 
-
-	if (GNOME_CANVAS(canvas_map)->idle_id == 0)
-		gnome_canvas_update_now( GNOME_CANVAS(canvas_map) );
-
 	return TEG_STATUS_SUCCESS;
 }
 
--- teg-0.11.2+debian.orig/client/gui-gnome/stock.c
+++ teg-0.11.2+debian/client/gui-gnome/stock.c
@@ -19,65 +19,16 @@
  */
 
 #include <config.h>
-#include <gnome.h>
+#include <gtk/gtk.h>
+#include <glib/gi18n.h>
 #include "stock.h"
-
-
-#include "stock/stock-getcard.xpm"
-#include "stock/stock-sendarmies.xpm"
-#include "stock/stock-endturn.xpm"
-#include "stock/stock-viewplayers.xpm"
-
-
-/* from libgnomeui2/gnome-stock-icons.c */
-static void add_sized (GtkIconFactory *factory,
-           const char   **xpm_data,
-           GtkIconSize     size,
-           const gchar    *stock_id)
-{
-	GtkIconSet *set;
-	GtkIconSource *source;
-	GdkPixbuf *pixbuf;
-
-	pixbuf = gdk_pixbuf_new_from_xpm_data(xpm_data);
-
-	source = gtk_icon_source_new ();
-	gtk_icon_source_set_pixbuf (source, pixbuf);
-	gtk_icon_source_set_size (source, size);
-
-	set = gtk_icon_set_new ();                
-	gtk_icon_set_add_source (set, source);
-
-	gtk_icon_factory_add (factory, stock_id, set);
-
-	g_object_unref (G_OBJECT (pixbuf));
-	gtk_icon_source_free (source);
-	gtk_icon_set_unref (set);
-}
+#include "stock_gresources.h"
 
 void stock_init (void)
 {
-	static gboolean initialized = FALSE;
-	GtkIconFactory *factory;
-
-	static GtkStockItem entries[] ={
-		{ STOCK_GETCARD, N_("Get Card"), 0, 0, GETTEXT_PACKAGE },
-		{ STOCK_SENDARMIES, N_("Send Armies"), 0, 0, GETTEXT_PACKAGE },
-		{ STOCK_ENDTURN, N_("End Turn"), 0, 0, GETTEXT_PACKAGE },
-		{ STOCK_VIEWPLAYERS, N_("View Players"), 0, 0, GETTEXT_PACKAGE }
-	};
-
-	if (initialized)
-		return;
-	else
-		initialized = TRUE;
-
-    	factory = gtk_icon_factory_new ();
-	add_sized (factory, stock_getcard_xpm, GTK_ICON_SIZE_BUTTON, STOCK_GETCARD);
-	add_sized (factory, stock_sendarmies_xpm, GTK_ICON_SIZE_BUTTON, STOCK_SENDARMIES);
-	add_sized (factory, stock_endturn_xpm, GTK_ICON_SIZE_BUTTON, STOCK_ENDTURN);
-	add_sized (factory, stock_viewplayers_xpm, GTK_ICON_SIZE_BUTTON, STOCK_VIEWPLAYERS);
+	GtkIconTheme *theme;
 
-	gtk_icon_factory_add_default (factory);
-	gtk_stock_add_static( entries, G_N_ELEMENTS(entries) );
+	stock_register_resource ();
+	theme = gtk_icon_theme_get_default ();
+	gtk_icon_theme_add_resource_path (theme, "/net/sf/teg/icons");
 }
--- teg-0.11.2+debian.orig/client/gui-gnome/cards.c
+++ teg-0.11.2+debian/client/gui-gnome/cards.c
@@ -26,7 +26,8 @@
 #  include <config.h>
 #endif
 
-#include <gnome.h>
+#include <goocanvas.h>
+#include <glib/gi18n.h>
 #include <assert.h>
 
 #include "gui.h"
@@ -128,19 +129,24 @@
 	return selected;
 }
 
-static void cards_cb_button_canje (GtkWidget *widget )
+static void cards_cb_button_canje (GtkDialog *dialog, gint id, gpointer data)
 {
 	int sel;
 	int countries[TEG_MAX_TARJETAS];
 
-	assert(widget);
+	assert(dialog);
 
-	sel = cuantos_selected( countries );
-	if( sel != 3 ) {
-		textmsg(M_ERR,"Error, you must select 3 cards and not %d.",sel);
-		return;
+	if (id == 0) {
+	        sel = cuantos_selected( countries );
+	        if( sel != 3 ) {
+	                textmsg(M_ERR,"Error, you must select 3 cards and "
+	                        "not %d.",sel);
+	                return;
+	        }
+	        canje_out( countries[0], countries[1], countries[2] );
 	}
-	canje_out( countries[0], countries[1], countries[2] );
+
+	gtk_widget_destroy (GTK_WIDGET (dialog));
 }
 
 static void cards_cb_button_armies (GtkWidget *widget, int index )
@@ -181,7 +187,7 @@
 	GtkWidget	*button_select;
 	GtkWidget	*button_locate;
 	PCOUNTRY		pP;
-	GnomeCanvasItem *image;
+	GooCanvasItem *image;
 	int i;
 	TCards cards;
 
@@ -196,84 +202,88 @@
 
 	pP = (PCOUNTRY) COUNTRY_FROM_TARJETA( pT );
 
-	vbox = gtk_vbox_new (FALSE, 0);
+	vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
 	if( !vbox ) return NULL;
 
 	/* create picture of card (canvas with labels) */
-	canvas = gnome_canvas_new();
+	canvas = goo_canvas_new();
 	if( !canvas ) {
 		textmsg( M_ERR, _("Error creating canvas\n"));
 		return NULL;
 	}
 
-	gtk_widget_set_usize (canvas, gdk_pixbuf_get_width(tarjs[i].tar), gdk_pixbuf_get_height(tarjs[i].tar) );
-	gnome_canvas_set_scroll_region (GNOME_CANVAS (canvas), 0, 0, gdk_pixbuf_get_width(tarjs[i].tar), gdk_pixbuf_get_height(tarjs[i].tar) );
-	image = gnome_canvas_item_new(
-		gnome_canvas_root(GNOME_CANVAS(canvas)),
-		gnome_canvas_pixbuf_get_type (),
-		"pixbuf", tarjs[i].tar,
-		"x", 0.0,
-		"y", 0.0,
+	gtk_widget_set_size_request (canvas,
+	                             gdk_pixbuf_get_width(tarjs[i].tar),
+	                             gdk_pixbuf_get_height(tarjs[i].tar));
+	goo_canvas_set_bounds (GOO_CANVAS (canvas), 0, 0,
+	                       gdk_pixbuf_get_width(tarjs[i].tar),
+	                       gdk_pixbuf_get_height(tarjs[i].tar));
+	image = goo_canvas_image_new(
+		goo_canvas_get_root_item(GOO_CANVAS(canvas)),
+		tarjs[i].tar,
+		0.0,
+		0.0,
 		"width", (double) gdk_pixbuf_get_width(tarjs[i].tar),
 		"height", (double) gdk_pixbuf_get_height(tarjs[i].tar),
-		"anchor", GTK_ANCHOR_NW,
 		NULL);
 
 	if( !image ) textmsg( M_ERR, _("Error creating image\n"));
 
-	image = gnome_canvas_item_new(
-		gnome_canvas_root(GNOME_CANVAS(canvas)),
-		gnome_canvas_text_get_type(),
-		"text", countries_get_name(pP->id),
-		"x", (double) gdk_pixbuf_get_width(tarjs[i].tar)/2,
-		"y", (double) cards.pos_y,
-		"x_offset", (double) -1,
-		"y_offset", (double) -1,
+	image = goo_canvas_text_new(
+		goo_canvas_get_root_item(GOO_CANVAS(canvas)),
+		countries_get_name(pP->id),
+		(double) gdk_pixbuf_get_width(tarjs[i].tar)/2,
+		(double) cards.pos_y,
+		(double) -1,
+		GOO_CANVAS_ANCHOR_NORTH,
+		"height", (double) -1,
 //		"font", "-adobe-helvetica-medium-r-normal--12-*-72-72-p-*-iso8859-1",
 		"font", HELVETICA_12_FONT,
-		"fill_color", "brown",
-		"anchor",GTK_ANCHOR_NORTH,
+		"fill-color", "brown",
 		NULL);
 
 	if( !image ) textmsg( M_ERR, _("Error creating image\n"));
 
-	image = gnome_canvas_item_new(
-		gnome_canvas_root(GNOME_CANVAS(canvas)),
-		gnome_canvas_text_get_type(),
-		"text", cont_get_name(pP->continente),
-		"x", (double) gdk_pixbuf_get_width(tarjs[i].tar)/2,
-		"y", (double) cards.pos_y + 15,
-		"x_offset", (double) -1,
-		"y_offset", (double) -1,
+	image = goo_canvas_text_new(
+		goo_canvas_get_root_item(GOO_CANVAS(canvas)),
+		cont_get_name(pP->continente),
+		(double) gdk_pixbuf_get_width(tarjs[i].tar)/2,
+		(double) cards.pos_y + 15,
+		(double) -1,
+		GOO_CANVAS_ANCHOR_NORTH,
+		"height", (double) -1,
 //		"font", "-adobe-helvetica-medium-r-normal--9-*-72-72-p-*-iso8859-1",
 		"font", HELVETICA_8_FONT,
-		"fill_color", "brown",
-		"anchor",GTK_ANCHOR_NORTH,
+		"fill-color", "brown",
 		NULL);
 
 	if( !image ) textmsg( M_ERR, _("Error creating image\n"));
 
-	gtk_box_pack_start_defaults( GTK_BOX(vbox), GTK_WIDGET(canvas));
+	gtk_box_pack_start( GTK_BOX(vbox), GTK_WIDGET(canvas), TRUE, TRUE, 0 );
 	gtk_widget_show (canvas);
 
 	/* botones */
 //	hbox = gtk_hbox_new( FALSE, 0);
 	button_armies = gtk_button_new_with_label(_("Put 2 armies"));
-	gtk_box_pack_start_defaults( GTK_BOX(vbox), GTK_WIDGET(button_armies));
-	gtk_signal_connect (GTK_OBJECT (button_armies), "clicked", GTK_SIGNAL_FUNC
-			(cards_cb_button_armies), (void* )tarjs_index);
+	gtk_box_pack_start( GTK_BOX(vbox), GTK_WIDGET(button_armies),
+	                    TRUE, TRUE, 0 );
+	g_signal_connect (G_OBJECT (button_armies), "clicked",
+	                  G_CALLBACK (cards_cb_button_armies),
+	                  GINT_TO_POINTER(tarjs_index));
 	gtk_widget_show(button_armies);
 
 	button_select = gtk_check_button_new_with_label(_("Select this card"));
-	gtk_box_pack_start_defaults( GTK_BOX(vbox), GTK_WIDGET(button_select));
-	gtk_signal_connect (GTK_OBJECT (button_select), "clicked", GTK_SIGNAL_FUNC
-			(cards_cb_button_select), (void* )tarjs_index);
+        gtk_box_pack_start( GTK_BOX(vbox), GTK_WIDGET(button_select), TRUE, TRUE, 0);
+	g_signal_connect (G_OBJECT (button_select), "clicked", G_CALLBACK
+                          (cards_cb_button_select), GINT_TO_POINTER(tarjs_index));
 	gtk_widget_show(button_select);
 
 	button_locate = gtk_button_new_with_label(_("Locate country"));
-	gtk_box_pack_start_defaults( GTK_BOX(vbox), GTK_WIDGET(button_locate));
-	gtk_signal_connect (GTK_OBJECT (button_locate), "clicked", GTK_SIGNAL_FUNC
-			(cards_cb_button_locate), (void* )tarjs_index);
+	gtk_box_pack_start( GTK_BOX(vbox), GTK_WIDGET(button_locate),
+	                    TRUE, TRUE, 0 );
+	g_signal_connect (G_OBJECT (button_locate), "clicked",
+	                  G_CALLBACK (cards_cb_button_locate),
+	                  GINT_TO_POINTER(tarjs_index));
 	gtk_widget_show(button_locate);
 
 //	gtk_box_pack_start_defaults( GTK_BOX(vbox), GTK_WIDGET(hbox));
@@ -297,7 +307,7 @@
 {
 	GtkWidget *vbox;
 	GtkWidget *scrolledwindow;
-	static GtkTable	*table = NULL;
+	static GtkGrid	*table = NULL;
 	GtkWidget	*tarjeta;	
 
 
@@ -313,31 +323,35 @@
 		cards_init();
 		cards_load();
 
-		cards_dialog = gnome_dialog_new(_("Country Cards"), _("Exchange"), GNOME_STOCK_BUTTON_CLOSE, NULL );
-		gnome_dialog_set_parent( GNOME_DIALOG(cards_dialog), GTK_WINDOW(main_window));
-
-		gnome_dialog_button_connect ( GNOME_DIALOG(cards_dialog),
-				0, GTK_SIGNAL_FUNC(cards_cb_button_canje), cards_dialog);
+		cards_dialog
+		  = gtk_dialog_new_with_buttons (_("Country Cards"),
+		                                 GTK_WINDOW (main_window),
+	                                         GTK_DIALOG_DESTROY_WITH_PARENT,
+	                                         _("Exchange"), 0,
+	                                         _("_Close"), 1,
+	                                         NULL);
 
-		gnome_dialog_button_connect (GNOME_DIALOG(cards_dialog),
-				1, GTK_SIGNAL_FUNC(dialog_close), cards_dialog);
+	        g_signal_connect (cards_dialog, "response",
+	                          G_CALLBACK (cards_cb_button_canje), NULL);
 
-		gtk_signal_connect( GTK_OBJECT(cards_dialog),
-				"destroy", GTK_SIGNAL_FUNC(destroy_window),
+		g_signal_connect( G_OBJECT(cards_dialog),
+				"destroy", G_CALLBACK(destroy_window),
 				&cards_dialog);
 
-		vbox = GNOME_DIALOG(cards_dialog)->vbox;
+	        vbox = gtk_dialog_get_content_area(GTK_DIALOG(cards_dialog));
 
 		scrolledwindow = gtk_scrolled_window_new (NULL, NULL);
 		gtk_scrolled_window_set_policy( GTK_SCROLLED_WINDOW(scrolledwindow),
 				GTK_POLICY_AUTOMATIC,
 				GTK_POLICY_AUTOMATIC);
-		gtk_widget_set_usize(scrolledwindow, 300, 160);
+		gtk_widget_set_size_request(scrolledwindow, 300, 160);
 
 
-		table    = GTK_TABLE( gtk_table_new ( 1, 3, TRUE) );
-		gtk_table_set_col_spacings (table, 1);
-		gtk_table_set_row_spacings (table, 5);
+	        table = GTK_GRID( gtk_grid_new ());
+		gtk_grid_set_column_spacing (table, 1);
+		gtk_grid_set_row_spacing (table, 5);
+		gtk_grid_set_column_homogeneous (table, TRUE);
+		gtk_grid_set_row_homogeneous (table, TRUE);
 
 		{
 			int x=0,y=0, index=0;
@@ -349,12 +363,12 @@
 				if(x >= 3 ) {
 					x=0;
 					y++;
-					gtk_table_resize(table,y+1,3);
 				}
 				tarjeta = cards_create( pT, index );
 				if( tarjeta ) {
 					gtk_widget_show (tarjeta );
-					gtk_table_attach_defaults ( table, tarjeta, x, x+1, y, y+1);
+	                                gtk_grid_attach (table, tarjeta,
+	                                                 x, y, 1, 1);
 				}
 				x++, index++;
 
@@ -373,14 +387,14 @@
 			if(x >= 3 ) {
 				x=0;
 				y++;
-				gtk_table_resize(table,y+1,3);
 			}
 
 			if( tarjs_sensi[i].country == NULL ) {
 				tarjeta = cards_create( &g_countries[country].tarjeta, i );
 				if( tarjeta ) {
 					gtk_widget_show (tarjeta );
-					gtk_table_attach_defaults ( table, tarjeta, x, x+1, y, y+1);
+	                                gtk_grid_attach (table, tarjeta,
+	                                                 x, y, 1, 1);
 				}
 				break;
 			}
@@ -483,9 +497,11 @@
 	}
 
 	if( ESTADO_ES( PLAYER_STATUS_FICHASC ) && canje_puedo(NULL,NULL,NULL)==TEG_STATUS_SUCCESS)
-		gnome_dialog_set_sensitive( GNOME_DIALOG(cards_dialog), 0, TRUE );
+		gtk_dialog_set_response_sensitive( GTK_DIALOG(cards_dialog),
+	                                           0, TRUE );
 	else
-		gnome_dialog_set_sensitive( GNOME_DIALOG(cards_dialog), 0, FALSE );
+		gtk_dialog_set_response_sensitive( GTK_DIALOG(cards_dialog),
+	                                           0, FALSE );
 }
 
 /**
@@ -505,10 +521,10 @@
 				(tarjs_sensi[i].country->id == p2 ) ||
 				(tarjs_sensi[i].country->id == p3 ) ) {
 			tarjs_sensi[i].selected = TRUE;
-			GTK_TOGGLE_BUTTON(tarjs_sensi[i].button_select)->active=1;
+	                gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(tarjs_sensi[i].button_select), TRUE);
 		} else {
 			tarjs_sensi[i].selected = FALSE;
-			GTK_TOGGLE_BUTTON(tarjs_sensi[i].button_select)->active=0;
+	                gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(tarjs_sensi[i].button_select), FALSE);
 		}
 	}
 
--- teg-0.11.2+debian.orig/client/gui-gnome/dices.c
+++ teg-0.11.2+debian/client/gui-gnome/dices.c
@@ -26,7 +26,8 @@
 #  include <config.h>
 #endif
 
-#include <gnome.h>
+#include <goocanvas.h>
+#include <glib/gi18n.h>
 
 #include "gui.h"
 #include "client.h"
@@ -46,9 +47,9 @@
 
 
 static GdkPixbuf *dices[DICES_CANT] = { NULL, NULL, NULL, NULL, NULL, NULL };
-static GnomeCanvasItem *images[DICES_CANT] = { NULL, NULL, NULL, NULL, NULL, NULL };
-static GnomeCanvasItem *text[2] = {NULL,NULL};
-static GnomeCanvasGroup* dices_group=NULL;
+static GooCanvasItem *images[DICES_CANT] = { NULL, NULL, NULL, NULL, NULL, NULL };
+static GooCanvasItem *text[2] = {NULL,NULL};
+static GooCanvasItem* dices_group=NULL;
 static int dices_initialized=0;
 
 struct _dices_coord {
@@ -113,20 +114,21 @@
 
 static void dices_show_text( int country, dices_type_t type )
 {
-	if( text[type] )
-		gtk_object_destroy( GTK_OBJECT( text[type] ));
+	if( text[type] ) {
+	        goo_canvas_item_remove( text[type] );
+	        text[type] = NULL;
+	}
 
-	text[type] = gnome_canvas_item_new(
+	text[type] = goo_canvas_text_new(
 		dices_group,
-		gnome_canvas_text_get_type(),
-		"text", countries_get_name(country),
-		"x", (double) (type == DICES_ATTACKER ) ? dices_pos.attacker_text.x :  dices_pos.defender_text.x,
-		"y", (double) (type == DICES_ATTACKER ) ? dices_pos.attacker_text.y :  dices_pos.defender_text.y,
-		"x_offset", (double) -1,
-		"y_offset", (double) -1,
+		countries_get_name(country),
+		(double) (type == DICES_ATTACKER ) ? dices_pos.attacker_text.x :  dices_pos.defender_text.x,
+		(double) (type == DICES_ATTACKER ) ? dices_pos.attacker_text.y :  dices_pos.defender_text.y,
+		(double) -1,
+		GOO_CANVAS_ANCHOR_NORTH,
+		"height", (double) -1,
 		"font", HELVETICA_12_BFONT,
-		"fill_color", gui_theme.dices_color,
-		"anchor",GTK_ANCHOR_NORTH,
+		"fill-color", gui_theme.dices_color,
 		NULL);
 }
 
@@ -149,46 +151,31 @@
 	}
 
 	if( images[i] == NULL ) {
-		images[i] = gnome_canvas_item_new(
+		images[i] = goo_canvas_image_new(
 			dices_group,
-			gnome_canvas_pixbuf_get_type (),
-			"pixbuf", dices[dice_index],
-			"x", x,
-			"y", y,
+			dices[dice_index],
+			x,
+			y,
 			"width", (double) gdk_pixbuf_get_width(dices[dice_index]),
 			"height", (double) gdk_pixbuf_get_height(dices[dice_index]),
-			"anchor", GTK_ANCHOR_NW,
 			NULL);
 
 	} else {
-		gnome_canvas_item_set( images[i],
+		g_object_set( images[i],
 			"pixbuf", dices[dice_index],
 			"x", x,
 			"y", y,
 			"width", (double) gdk_pixbuf_get_width(dices[dice_index]),
 			"height", (double) gdk_pixbuf_get_height(dices[dice_index]),
-			"anchor", GTK_ANCHOR_NW,
+	                "visibility", GOO_CANVAS_ITEM_VISIBLE,
 			NULL);
-		gnome_canvas_item_show( images[i] );
-	}
-}
-
-static void free_dices (GtkObject *object, gpointer *data)
-{
-	int i;
-
-	for(i=0;i<DICES_CANT;i++) {
-/*		if( dices[i] )
-			gdk_imlib_destroy_image(dices[i]);
-*/
-		dices[i] = NULL;
 	}
 }
 
 /*
  * exported functions 
  */
-void dices_init( GnomeCanvasGroup *root)
+void dices_init( GooCanvasItem *root )
 {
 	if( dices_initialized )
 		return;
@@ -196,22 +183,17 @@
 	if( !root )
 		return;
 
-	dices_group = GNOME_CANVAS_GROUP(
-		gnome_canvas_item_new(
+	dices_group =
+		goo_canvas_group_new(
 			root,
-			gnome_canvas_group_get_type (),
 			"x",(float) gui_theme.dices_x,
 			"y",(float) gui_theme.dices_y,
-			NULL)
+			NULL
 		);
 
 	if( !dices_group )
 		return;
 
-	gtk_signal_connect (GTK_OBJECT (dices_group), "destroy",
-		(GtkSignalFunc) free_dices,
-		NULL);
-
 	dices_load();
 
 
@@ -260,13 +242,14 @@
 
 	for(i=0;i<DICES_CANT;i++) {
 		if( images[i] )
-			gnome_canvas_item_hide( images[i] );
+	                g_object_set( images[i], "visibility",
+	                              GOO_CANVAS_ITEM_INVISIBLE, NULL );
 	}
 
 	for(i=0;i<2;i++) {
 		if( text[i] ) {
-			gtk_object_destroy( GTK_OBJECT( text[i] ));
-			text[i] = NULL;
+	                goo_canvas_item_remove( text[i] );
+	                text[i] = NULL;
 		}
 	}
 }
@@ -285,7 +268,8 @@
 	/* hide all dices */
 	for(i=0;i<DICES_CANT;i++) {
 		if( images[i] )
-			gnome_canvas_item_hide( images[i] );
+	                g_object_set( images[i], "visibility",
+	                              GOO_CANVAS_ITEM_INVISIBLE, NULL );
 	}
 
 	for(i=0;i<3;i++) {
--- teg-0.11.2+debian.orig/client/gui-gnome/mission.c
+++ teg-0.11.2+debian/client/gui-gnome/mission.c
@@ -26,7 +26,8 @@
 #  include <config.h>
 #endif
 
-#include <gnome.h>
+#include <goocanvas.h>
+#include <glib/gi18n.h>
 
 #include "gui.h"
 #include "client.h"
@@ -58,56 +59,78 @@
 	return TEG_STATUS_SUCCESS;
 }
 
-static TEG_STATUS mission_view_number( GtkWidget *dialog )
+static GtkWidget     *canvas=NULL;
+static GooCanvasItem *imagetxt=NULL;
+static GooCanvasItem *imagetxt2=NULL;
+
+static void nullify_canvas( void )
 {
-	static GtkWidget	*canvas=NULL;
-	static GnomeCanvasItem *imagebg=NULL;
-	static GnomeCanvasItem *imagetxt=NULL;
-	static GnomeCanvasItem *imagetxt2=NULL;
+	canvas = NULL;
+	imagetxt = NULL;
+	imagetxt2 = NULL;
+}
 
+static TEG_STATUS mission_view_number( GtkWidget *dialog )
+{
 	if( mission_number == -1 )
 		return TEG_STATUS_ERROR;
 
 	if( canvas == NULL ) {
-		canvas = gnome_canvas_new();
-		gtk_widget_set_usize (canvas, gdk_pixbuf_get_width(tar_mission), gdk_pixbuf_get_height(tar_mission) );
-		gnome_canvas_set_scroll_region (GNOME_CANVAS (canvas), 0, 0, gdk_pixbuf_get_width(tar_mission), gdk_pixbuf_get_height(tar_mission) );
-		imagebg = gnome_canvas_item_new(
-			gnome_canvas_root(GNOME_CANVAS(canvas)),
-			gnome_canvas_pixbuf_get_type (),
-			"pixbuf", tar_mission,
-			"x", 0.0,
-			"y", 0.0,
+		canvas = goo_canvas_new();
+		/* Destroying the dialog unrefs the canvas and all of
+		 * its children, however sometimes some of them become
+		 * dangling pointers while the logic relies them to be
+		 * NULL.  Macros like GOO_IS_CANVAS_ITEM cannot be
+		 * used instead because these are invalid objects so a
+		 * crash is inevitable.  */
+		g_signal_connect_swapped (dialog, "destroy",
+		                          nullify_canvas, NULL);
+		gtk_widget_set_halign (canvas, GTK_ALIGN_CENTER);
+		gtk_widget_set_size_request (canvas,
+	                                     gdk_pixbuf_get_width(tar_mission),
+	                                     gdk_pixbuf_get_height(tar_mission));
+		goo_canvas_set_bounds (GOO_CANVAS (canvas), 0, 0,
+	                               gdk_pixbuf_get_width(tar_mission),
+	                               gdk_pixbuf_get_height(tar_mission));
+		goo_canvas_image_new(
+			goo_canvas_get_root_item(GOO_CANVAS(canvas)),
+			tar_mission,
+			0.0,
+			0.0,
 			"width", (double) gdk_pixbuf_get_width(tar_mission),
 			"height", (double) gdk_pixbuf_get_height(tar_mission),
-			"anchor", GTK_ANCHOR_NW,
 			NULL);
 
 
-		gdk_pixbuf_unref(tar_mission);
+	        g_object_unref(tar_mission);
+	        tar_mission = NULL;
 
-		gtk_box_pack_start_defaults( GTK_BOX(GNOME_DIALOG(dialog)->vbox), GTK_WIDGET(canvas));
+	        gtk_box_pack_start( GTK_BOX(gtk_dialog_get_content_area
+	                                    (GTK_DIALOG(dialog))),
+	                            GTK_WIDGET(canvas), TRUE, TRUE, 0 );
 	}
 
-	if( imagetxt )
-		gtk_object_destroy( GTK_OBJECT(imagetxt) );
 
-	imagetxt = gnome_canvas_item_new(
-		gnome_canvas_root(GNOME_CANVAS(canvas)),
-		gnome_canvas_text_get_type(),
-		"text", missions_get_name( mission_number ),
-		"x", (double) 4,
-		"y", (double) 10,
-		"x_offset", (double) -1,
-		"y_offset", (double) -1,
+	if( imagetxt ) {
+	        goo_canvas_item_remove( imagetxt );
+	        imagetxt = NULL;
+	}
+
+	imagetxt = goo_canvas_text_new(
+		goo_canvas_get_root_item(GOO_CANVAS(canvas)),
+		missions_get_name( mission_number ),
+		(double) 4,
+		(double) 10,
+		(double) -1,
+		GOO_CANVAS_ANCHOR_NORTH_WEST,
+		"height", (double) -1,
 		"font", HELVETICA_12_FONT,
-		"fill_color", "brown",
-		"anchor",GTK_ANCHOR_NW,
+		"fill-color", "brown",
 		NULL);
 
 	if( imagetxt2 ) {
-		gtk_object_destroy( GTK_OBJECT(imagetxt2) );
-		imagetxt2 = NULL;
+	        goo_canvas_item_remove( imagetxt2 );
+	        imagetxt2 = NULL;
 	}
 
 	if( mission_number == g_game.secret_mission || mission_number == MISSION_COMMON) {
@@ -118,17 +141,16 @@
 		else 
 			text = _("[This is the common mission.]");
 
-		imagetxt2 = gnome_canvas_item_new(
-			gnome_canvas_root(GNOME_CANVAS(canvas)),
-			gnome_canvas_text_get_type(),
-			"text",text,
-			"x", (double) 4,
-			"y", (double) 124,
-			"x_offset", (double) -1,
-			"y_offset", (double) -1,
+		imagetxt2 = goo_canvas_text_new(
+			goo_canvas_get_root_item(GOO_CANVAS(canvas)),
+			text,
+			(double) 4,
+			(double) 124,
+			(double) -1,
+			GOO_CANVAS_ANCHOR_NORTH_WEST,
+			"height", (double) -1,
 			"font", HELVETICA_10_FONT,
-			"fill_color", "brown",
-			"anchor",GTK_ANCHOR_NW,
+			"fill-color", "brown",
 			NULL);
 	}
 
@@ -139,110 +161,103 @@
 
 TEG_STATUS mission_view_fake_number( GtkWidget *frame, int mission )
 {
-	GtkWidget	*canvas;
-	GnomeCanvasItem	*imagebg;
-	GnomeCanvasItem	*imagetxt;
-	GnomeCanvasItem	*imagetxt2;
+	GtkWidget	*fcanvas;
 	char *text;
 
 	if( mission_load() != TEG_STATUS_SUCCESS )
 		return TEG_STATUS_ERROR;
 
-	canvas = gnome_canvas_new();
-	gtk_widget_set_usize (canvas, gdk_pixbuf_get_width(tar_mission), gdk_pixbuf_get_height(tar_mission) );
-	gnome_canvas_set_scroll_region (GNOME_CANVAS (canvas), 0, 0, gdk_pixbuf_get_width(tar_mission), gdk_pixbuf_get_height(tar_mission) );
-	imagebg = gnome_canvas_item_new(
-		gnome_canvas_root(GNOME_CANVAS(canvas)),
-		gnome_canvas_pixbuf_get_type (),
-		"pixbuf", tar_mission,
-		"x", 0.0,
-		"y", 0.0,
+	fcanvas = goo_canvas_new();
+	gtk_widget_set_size_request (fcanvas,
+	                             gdk_pixbuf_get_width(tar_mission),
+	                             gdk_pixbuf_get_height(tar_mission));
+	goo_canvas_set_bounds (GOO_CANVAS (fcanvas), 0, 0,
+	                       gdk_pixbuf_get_width(tar_mission),
+	                       gdk_pixbuf_get_height(tar_mission));
+	goo_canvas_image_new(
+		goo_canvas_get_root_item(GOO_CANVAS(fcanvas)),
+		tar_mission,
+		0.0,
+		0.0,
 		"width", (double) gdk_pixbuf_get_width(tar_mission),
 		"height", (double) gdk_pixbuf_get_height(tar_mission),
-		"anchor", GTK_ANCHOR_NW,
 		NULL);
 
+	g_object_unref (tar_mission);
+	tar_mission = NULL;
 #if 0
 	gtk_signal_connect (GTK_OBJECT (imagebg), "destroy",
 		(GtkSignalFunc) free_imlib_image,
 		tar_mission);
 #endif
 
-	imagetxt = gnome_canvas_item_new(
-		gnome_canvas_root(GNOME_CANVAS(canvas)),
-		gnome_canvas_text_get_type(),
-		"text", missions_get_name(mission),
-		"x", (double) 4,
-		"y", (double) 10,
-		"x_offset", (double) -1,
-		"y_offset", (double) -1,
+	goo_canvas_text_new(
+		goo_canvas_get_root_item(GOO_CANVAS(fcanvas)),
+		missions_get_name(mission),
+		(double) 4,
+		(double) 10,
+		(double) -1,
+		GOO_CANVAS_ANCHOR_NORTH_WEST,
+		"height", (double) -1,
 		"font", HELVETICA_12_FONT,
-		"fill_color", "brown",
-		"anchor",GTK_ANCHOR_NW,
+		"fill-color", "brown",
 		NULL);
 
 	text = _("[Accomplished mission]");
 
-	imagetxt2 = gnome_canvas_item_new(
-		gnome_canvas_root(GNOME_CANVAS(canvas)),
-		gnome_canvas_text_get_type(),
-		"text",text,
-		"x", (double) 4,
-		"y", (double) 124,
-		"x_offset", (double) -1,
-		"y_offset", (double) -1,
+	goo_canvas_text_new(
+		goo_canvas_get_root_item(GOO_CANVAS(fcanvas)),
+		text,
+		(double) 4,
+		(double) 124,
+		(double) -1,
+		GOO_CANVAS_ANCHOR_NORTH_WEST,
+		"height", (double) -1,
 		"font", HELVETICA_10_FONT,
-		"fill_color", "brown",
-		"anchor",GTK_ANCHOR_NW,
+		"fill-color", "brown",
 		NULL);
 
-	gtk_container_add (GTK_CONTAINER (frame),GTK_WIDGET(canvas));
+	gtk_container_add (GTK_CONTAINER (frame),GTK_WIDGET(fcanvas));
 
 	return TEG_STATUS_SUCCESS;
 }
 
-void mission_view_prev( GtkWidget *button, gpointer data )
+void mission_view_cb( GtkDialog *dialog, gint id, gpointer data )
 {
-	GtkWidget *dialog = (GtkWidget*) data;
 	int last = missions_cant();
 	int first_mission;
 
-	if( mission_number == -1 )
-		return;
-
-	first_mission = g_game.with_common_mission ? MISSION_COMMON : MISSION_COMMON + 1;
-
-	mission_number--;
-	if( mission_number < first_mission )
-		mission_number = last -1;
-
-	mission_view_number( dialog );
-	return;
-}
-
-void mission_view_next( GtkWidget *button, gpointer data )
-{
-	GtkWidget *dialog = (GtkWidget*) data;
-	int last = missions_cant();
-	int first_mission;
+	if ( id < 1 ) {
+	        gtk_widget_destroy (GTK_WIDGET (dialog));
+	        return;
+	}
 
 	if( mission_number == -1 )
 		return;
 
 	first_mission = g_game.with_common_mission ? MISSION_COMMON : MISSION_COMMON + 1;
 
-	mission_number++;
-	if( mission_number >= last-1 )
-		mission_number = first_mission;
+	switch (id) {
+	case 1:
+	        mission_number--;
+	        if( mission_number < first_mission )
+	                mission_number = last -1;
+	        break;
+	case 2:
+	        mission_number++;
+	        if( mission_number >  last-1 )
+	                mission_number = first_mission;
+	default:
+	        break;
+	}
 
-	mission_view_number( dialog );
-	return;
+	mission_view_number( GTK_WIDGET (dialog) );
 }
 
 /* funciones de creacion */
 void mission_view()
 {
-	static GtkWidget *dialog=NULL;
+	GtkWidget *dialog=NULL;
 
 
 	if( g_game.secret_mission < 0 ) {
@@ -261,40 +276,25 @@
 	}
 	
 
-	if( dialog == NULL ) {
-
-		dialog = teg_dialog_new(_("Secret mission"),_("Your mission")); 
-		gnome_dialog_append_buttons(GNOME_DIALOG(dialog),
-				GNOME_STOCK_BUTTON_PREV,
-				GNOME_STOCK_BUTTON_NEXT,
-				GNOME_STOCK_BUTTON_CLOSE,
-				NULL );
-		gnome_dialog_close_hides( GNOME_DIALOG(dialog), TRUE );
-		gnome_dialog_set_default(GNOME_DIALOG(dialog),2);
-
-		/* signals de los botones */
-		gnome_dialog_button_connect (GNOME_DIALOG(dialog),
-						0, GTK_SIGNAL_FUNC(mission_view_prev),dialog);
-		gnome_dialog_button_connect (GNOME_DIALOG(dialog),
-						1, GTK_SIGNAL_FUNC(mission_view_next),dialog);
-		gnome_dialog_button_connect (GNOME_DIALOG(dialog),
-						2, GTK_SIGNAL_FUNC(dialog_close), dialog );
-
-		/* create picture of card (canvas with labels) */
-
-	}
+	dialog = teg_dialog_new(_("Secret mission"),_("Your mission"));
+	gtk_dialog_add_buttons(GTK_DIALOG(dialog), _("_Previous"), 1,
+	                       _("_Next"), 2, _("_Close"), 0, NULL );
+	gtk_dialog_set_default_response (GTK_DIALOG (dialog), 2);
+
+	/* signals de los botones */
+	g_signal_connect (dialog, "response",
+	                  G_CALLBACK (mission_view_cb), NULL);
+	/* create picture of card (canvas with labels) */
 
 	if( g_game.secret_mission == MISSION_CONQWORLD ) {
-		gnome_dialog_set_sensitive( GNOME_DIALOG(dialog),0,FALSE);
-		gnome_dialog_set_sensitive( GNOME_DIALOG(dialog),1,FALSE);
+	        gtk_dialog_set_response_sensitive( GTK_DIALOG(dialog),1,FALSE);
+	        gtk_dialog_set_response_sensitive( GTK_DIALOG(dialog),2,FALSE);
 	} else {
-		gnome_dialog_set_sensitive( GNOME_DIALOG(dialog),0,TRUE);
-		gnome_dialog_set_sensitive( GNOME_DIALOG(dialog),1,TRUE);
+	        gtk_dialog_set_response_sensitive( GTK_DIALOG(dialog),1,TRUE);
+	        gtk_dialog_set_response_sensitive( GTK_DIALOG(dialog),2,TRUE);
 	}
-	gnome_dialog_set_default( GNOME_DIALOG(dialog),2);
+	gtk_dialog_set_default_response( GTK_DIALOG(dialog),0);
 
 	mission_view_number( dialog );
-
-	gtk_widget_show_all(dialog);
-	raise_and_focus(dialog);
+	gtk_dialog_run(GTK_DIALOG(dialog));
 }
--- teg-0.11.2+debian.orig/client/gui-gnome/status.c
+++ teg-0.11.2+debian/client/gui-gnome/status.c
@@ -26,7 +26,9 @@
 #endif
 
 #include <assert.h>
-#include <gnome.h>
+#include <math.h>
+#include <goocanvas.h>
+#include <glib/gi18n.h>
 
 #include "gui.h"
 #include "client.h"
@@ -56,53 +58,12 @@
 
 static GtkWidget* mainstatus_canvas = NULL;
 
-static GnomeCanvasItem *players_color[TEG_MAX_PLAYERS];
-static GnomeCanvasItem *color_started_item;
-static GnomeCanvasItem *round_number_item;
-static GnomeCanvasItem *players_color_over;
+static GooCanvasItem *players_color[TEG_MAX_PLAYERS];
+static GooCanvasItem *color_started_item;
+static GooCanvasItem *round_number_item;
+static GooCanvasItem *players_color_over;
 
-
-static gint status_boton_clicked_cb(GtkWidget *area, GdkEventExpose *event, gpointer user_data)
-{
-	out_status();
-	return FALSE;
-}
-
-static TEG_STATUS status_paint_color( int color, GdkPixmap **pixmap )
-{
-	int i, h, w;
-
-	assert( pixmap );
-
-	i = (color<0 || color>=TEG_MAX_PLAYERS) ? TEG_MAX_PLAYERS : color;
-
-	*pixmap = gdk_pixmap_new(status_dialog->window,
-		48, 16, gtk_widget_get_visual(status_dialog)->depth);
-
-	if( *pixmap == NULL )
-		return TEG_STATUS_ERROR;
-
-
-	gdk_gc_set_foreground(g_colors_gc, colors_get_player_from_color(color));
-	gdk_draw_rectangle( *pixmap, g_colors_gc, TRUE, 0, 0, 47, 15);
-
-	gdk_gc_set_foreground(g_colors_gc, colors_get_common(COLORS_BLACK));
-	gdk_draw_rectangle( *pixmap, g_colors_gc, FALSE, 0, 0, 47, 15);
-
-	gdk_gc_set_foreground(g_colors_gc, colors_get_player_ink_from_color(color));
-
-
-
-	h = gdk_string_height (g_pixmap_font10, _(g_colores[i]) );
-	w = gdk_string_width  (g_pixmap_font10, _(g_colores[i]) );
-
-	gdk_draw_string( *pixmap, g_pixmap_font10, g_colors_gc, 
-			((48 - w )/2),
-			((16 - h)/2) + h, _(g_colores[i]));
-	return TEG_STATUS_SUCCESS;
-}
-
-static GtkTreeModel *
+static GtkListStore *
 status_create_model (void)
 {
 	GtkListStore *store;
@@ -123,7 +84,7 @@
 			G_TYPE_BOOLEAN	/* started the turn */
 			);
 
-	return GTK_TREE_MODEL (store);
+	return store;
 }
 
 static void status_add_columns (GtkTreeView *treeview)
@@ -227,46 +188,13 @@
 	status_update_visibility_of_columns();
 }
 
-
-TEG_STATUS status_turn_color(PCPLAYER pJ, GdkPixmap **pixmap)
-{
-	int i;
-
-	assert( pixmap );
-	assert( pJ );
-
-
-	if( pJ->empezo_turno )
-		i = pJ->numjug;
-	else
-		i = -1;
-
-	*pixmap = gdk_pixmap_new(status_dialog->window,
-		16, 16, gtk_widget_get_visual(status_dialog)->depth);
-
-	if( *pixmap == NULL )
-		return TEG_STATUS_ERROR;
-
-	gdk_gc_set_foreground(g_colors_gc, colors_get_player(i));
-	gdk_draw_rectangle( *pixmap, g_colors_gc, TRUE, 0, 0, 15, 15);
-
-	gdk_gc_set_foreground(g_colors_gc, colors_get_common(COLORS_BLACK));
-	gdk_draw_rectangle( *pixmap, g_colors_gc, FALSE, 0, 0, 15, 15);
-
-	return TEG_STATUS_SUCCESS;
-}
-
-
-static TEG_STATUS status_update_model( GtkTreeModel *model)
+static TEG_STATUS status_update_model( GtkListStore *store )
 {
-	GtkListStore *store;
 	GtkTreeIter iter;
 	PCPLAYER pJ;
 	PLIST_ENTRY l = g_list_player.Flink;
 
 
-	store = GTK_LIST_STORE( model );
-
 	gtk_list_store_clear( store );
 
 	while( !IsListEmpty( &g_list_player ) && (l != &g_list_player) )
@@ -302,7 +230,7 @@
 	GtkTreeViewColumn *column;
 	int i;
 
-	if( status_treeview == NULL )
+	if( !GTK_IS_WIDGET (status_treeview) )
 		return TEG_STATUS_ERROR;
 
 	for( i=0; i < STATUS_COLUMN_LAST; i++ ) {
@@ -315,68 +243,60 @@
 
 TEG_STATUS status_update_dialog()
 {
-	static GtkTreeModel *model = NULL;
+	static GtkListStore *model = NULL;
 
 	if( status_dialog == NULL )
 		return TEG_STATUS_ERROR;
 
-	if( status_treeview == NULL ) {
+	/* create tree model */
+	model = status_create_model ();
 
-		/* create tree model */
-		model = status_create_model ();
+	/* create tree view */
+	status_treeview = gtk_tree_view_new_with_model (GTK_TREE_MODEL (model));
+	gtk_tree_view_set_search_column (GTK_TREE_VIEW (status_treeview),
+	                                 STATUS_COLUMN_SCORE);
+
+	gtk_box_pack_start( GTK_BOX(gtk_dialog_get_content_area
+	                            (GTK_DIALOG(status_dialog))),
+	                    GTK_WIDGET(status_treeview), TRUE, TRUE, 0 );
 
-		/* create tree view */
-		status_treeview = gtk_tree_view_new_with_model (model);
-		gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (status_treeview), TRUE);
-		gtk_tree_view_set_search_column (GTK_TREE_VIEW (status_treeview),
-				STATUS_COLUMN_SCORE);
-
-		g_object_unref (G_OBJECT (model)); 
-		gtk_box_pack_start_defaults( GTK_BOX(GNOME_DIALOG(status_dialog)->vbox), GTK_WIDGET(status_treeview));
-
-		/* add columns to the tree view */
-		status_add_columns (GTK_TREE_VIEW (status_treeview));
-
-	}
+	/* add columns to the tree view */
+	status_add_columns (GTK_TREE_VIEW (status_treeview));
 
 	status_update_model( model );
 
-	gtk_widget_show_all( status_treeview );
 	return TEG_STATUS_SUCCESS;
 }
 
 /* view the status of players */
 void status_view()
 {
-	if( status_dialog == NULL) {
+	status_dialog = teg_dialog_new(_("Status of Players"),
+	                               _("Status of Players"));
 
-		status_dialog = teg_dialog_new(_("Status of Players"),_("Status of Players")); 
+	gtk_window_set_transient_for(GTK_WINDOW(status_dialog),
+	                             GTK_WINDOW(main_window));
 
-		gtk_window_set_transient_for (GTK_WINDOW(status_dialog), NULL);
+	gtk_dialog_add_buttons(GTK_DIALOG(status_dialog), _("_Refresh"), 0,
+	                       _("_Close"), 1, NULL);
 
-		gnome_dialog_append_buttons(GNOME_DIALOG(status_dialog),
-				GNOME_STOCK_PIXMAP_REFRESH,
-				GNOME_STOCK_BUTTON_CLOSE,
-				NULL );
-
-		gnome_dialog_close_hides( GNOME_DIALOG(status_dialog), TRUE );
-		gnome_dialog_set_default(GNOME_DIALOG(status_dialog),1);
-
-		/* signals de los botones */
-		gnome_dialog_button_connect (GNOME_DIALOG(status_dialog),
-						0, GTK_SIGNAL_FUNC(status_boton_clicked_cb),status_dialog);
-		gnome_dialog_button_connect (GNOME_DIALOG(status_dialog),
-						1, GTK_SIGNAL_FUNC(dialog_close),status_dialog);
-		gnome_dialog_set_default( GNOME_DIALOG(status_dialog),1);
-
-	}
+	gtk_dialog_set_default_response(GTK_DIALOG(status_dialog), 1);
 
+	out_status();
 	status_update_dialog();
 
 	gtk_widget_show_all(status_dialog);
-	raise_and_focus(status_dialog);
 
-	out_status();
+	while (gtk_dialog_run(GTK_DIALOG(status_dialog)) == 0) {
+	        out_status();
+	        status_update_dialog();
+	        gtk_widget_queue_draw(status_dialog);
+	}
+
+	if (GTK_IS_WIDGET(status_dialog)) {
+	        gtk_widget_destroy(status_dialog);
+	        status_dialog = NULL;
+	}
 }
 
 
@@ -390,35 +310,32 @@
 	if( ministatus == NULL )
 		return TEG_STATUS_ERROR;
 
-	gtk_widget_draw( ministatus, NULL);
+	gtk_widget_queue_draw(ministatus);
 
 	return TEG_STATUS_SUCCESS;
 }
 
-static gint ministatus_expose_cb(GtkWidget *area, GdkEventExpose *event, gpointer user_data)
+static gboolean ministatus_expose_cb(GtkWidget *area, cairo_t *cr, gpointer user_data)
 {
-	static GdkGC *ms_gc = NULL;
+	gint width, height;
 	int i=0;
 
-	if( area == NULL )
-		return FALSE;
-
-	if( area->window == NULL )
-		return FALSE;;
-
-	if( ms_gc == NULL )
-		ms_gc = gdk_gc_new(area->window);
-
 	if( ESTADO_GET() == PLAYER_STATUS_DESCONECTADO || g_game.observer )
 		i = -1;
 	else
 		i = g_game.numjug;
 
-	gdk_gc_set_foreground(ms_gc, colors_get_player(i));
-	gdk_draw_arc( area->window, ms_gc, TRUE, 0, 3, 10, 10, 0, 360 * 64);
+	width = gtk_widget_get_allocated_width (area);
+	height = gtk_widget_get_allocated_height (area);
 
-	gdk_gc_set_foreground(ms_gc, colors_get_common(COLORS_BLACK));
-	gdk_draw_arc( area->window, ms_gc, FALSE, 0, 3, 10, 10, 0, 360* 64);
+	gdk_cairo_set_source_rgba (cr, colors_get_player(i));
+	cairo_arc (cr, width / 2, height / 2, 5, 0, 2 * M_PI);
+	cairo_fill (cr);
+
+	gdk_cairo_set_source_rgba (cr, colors_get_common(COLORS_BLACK));
+	cairo_set_line_width (cr, 1.0);
+	cairo_arc (cr, width / 2, height / 2, 5, 0, 2 * M_PI);
+	cairo_stroke (cr);
 
 	return FALSE;
 }
@@ -428,10 +345,10 @@
 	if( ministatus == NULL ) {
 		ministatus = gtk_drawing_area_new();
 
-		gtk_signal_connect(GTK_OBJECT(ministatus), "expose_event",
-			   GTK_SIGNAL_FUNC(ministatus_expose_cb), NULL);
+	        g_signal_connect(G_OBJECT(ministatus), "draw",
+	                         G_CALLBACK(ministatus_expose_cb), NULL);
 	}
-	gtk_widget_set_usize(ministatus, 15, -1);
+	gtk_widget_set_size_request(ministatus, 15, -1);
 	gtk_widget_show( ministatus );
 
 	return ministatus;
@@ -442,8 +359,8 @@
  * Main Status
  */
 
-#define MAINSTATUS_X (642)
-#define MAINSTATUS_Y (30)
+#define MAINSTATUS_X (641)
+#define MAINSTATUS_Y (48)
 TEG_STATUS mainstatus_create( GtkWidget **window )
 {
 	int i;
@@ -452,15 +369,17 @@
 	if( mainstatus_canvas )
 		goto error;
 
-	mainstatus_canvas = gnome_canvas_new();
+	mainstatus_canvas = goo_canvas_new();
 	if( ! mainstatus_canvas )
 		goto error;
 
 	/* load colors for started_item, and player_colors */
 	colors_load_images();
 
-	gtk_widget_set_usize ( mainstatus_canvas, MAINSTATUS_X, MAINSTATUS_Y + 1 );
-	gnome_canvas_set_scroll_region (GNOME_CANVAS (mainstatus_canvas), 0, 0, MAINSTATUS_X, MAINSTATUS_Y);
+	gtk_widget_set_size_request ( mainstatus_canvas,
+	                              MAINSTATUS_X, MAINSTATUS_Y + 1 );
+	goo_canvas_set_bounds (GOO_CANVAS (mainstatus_canvas), 0, 0,
+	                       MAINSTATUS_X, MAINSTATUS_Y);
 
 	/* background */
 	if( gui_theme.toolbar_custom && gui_theme.toolbar_name )
@@ -470,133 +389,124 @@
 		im = gdk_pixbuf_new_from_file(filename, NULL);
 
 		if( im ) {
-			gnome_canvas_item_new(
-				gnome_canvas_root(GNOME_CANVAS(mainstatus_canvas)),
-				gnome_canvas_pixbuf_get_type (),
-				"pixbuf", im,
-				"x", 0.0,
-				"y", 0.0,
+			goo_canvas_image_new(
+				goo_canvas_get_root_item(GOO_CANVAS(mainstatus_canvas)),
+				im,
+				0.0,
+				0.0,
 				/* "width", (double) gdk_pixbuf_get_width(im), */
 				/* "height", (double) gdk_pixbuf_get_height(im), */
 				"width", (double) MAINSTATUS_X,
 				"height", (double) MAINSTATUS_Y,
-				"anchor", GTK_ANCHOR_NW,
+	                        "scale-to-fit", TRUE,
 				NULL);
 
 			failed = 0;
 
-			gdk_pixbuf_unref( im );
+			g_object_unref( im );
 		}
 	}
 
 	/* load default background */
 	if( failed ) {
-		gnome_canvas_item_new(
-			gnome_canvas_root(GNOME_CANVAS(mainstatus_canvas)),
-			gnome_canvas_rect_get_type (),
-			"x1", 0.0,
-			"y1", 0.0,
-			"x2", (double) MAINSTATUS_X,
-			"y2", (double) MAINSTATUS_Y,
-			"fill_color","light green",
-			"outline_color","black",
+		goo_canvas_rect_new(
+			goo_canvas_get_root_item(GOO_CANVAS(mainstatus_canvas)),
+			0.0,
+			0.0,
+			(double) MAINSTATUS_X,
+			(double) MAINSTATUS_Y,
+			"fill-color","light green",
+			"stroke-color","black",
 			NULL);
 	}
 
 	/* round started by */
-	gnome_canvas_item_new(
-		gnome_canvas_root(GNOME_CANVAS(mainstatus_canvas)),
-		gnome_canvas_text_get_type(),
-		"text",_("Round started by:"),
-		"x", (double) ROUND_OFFSET,
-		"y", (double) 3,
-		"x_offset", (double) -1,
-		"y_offset", (double) -1,
+	goo_canvas_text_new(
+		goo_canvas_get_root_item(GOO_CANVAS(mainstatus_canvas)),
+		_("Round started by:"),
+		(double) ROUND_OFFSET,
+		(double) 3,
+		(double) -1,
+		GOO_CANVAS_ANCHOR_NORTH_EAST,
+		"height", (double) -1,
 		"font", HELVETICA_10_FONT,
-		"fill_color", gui_theme.toolbar_custom && gui_theme.toolbar_text_color ? gui_theme.toolbar_text_color : "black",
-		"anchor",GTK_ANCHOR_NE,
+		"fill-color", gui_theme.toolbar_custom && gui_theme.toolbar_text_color ? gui_theme.toolbar_text_color : "black",
 		NULL);
 
-	color_started_item = gnome_canvas_item_new(
-		gnome_canvas_root(GNOME_CANVAS(mainstatus_canvas)),
-		gnome_canvas_pixbuf_get_type (),
-		"pixbuf", g_color_circles[TEG_MAX_PLAYERS],
-		"x", (double) ROUND_OFFSET + 4,
-		"y", (double) 4,
+	color_started_item = goo_canvas_image_new(
+		goo_canvas_get_root_item(GOO_CANVAS(mainstatus_canvas)),
+		g_color_circles[TEG_MAX_PLAYERS],
+		(double) ROUND_OFFSET + 4,
+		(double) 4,
 		"width", (double) gdk_pixbuf_get_width(g_color_circles[TEG_MAX_PLAYERS]),
 		"height", (double) gdk_pixbuf_get_height(g_color_circles[TEG_MAX_PLAYERS]),
-		"anchor",GTK_ANCHOR_NW,
 		NULL);
-	gnome_canvas_item_hide( color_started_item );
+	g_object_set( color_started_item, "visibility",
+	              GOO_CANVAS_ITEM_INVISIBLE, NULL );
 
 	/* round number */
-	gnome_canvas_item_new(
-		gnome_canvas_root(GNOME_CANVAS(mainstatus_canvas)),
-		gnome_canvas_text_get_type(),
-		"text",_("Round number:"),
-		"x", (double) ROUND_OFFSET,
-		"y", (double) MAINSTATUS_Y/2 + 1,
-		"x_offset", (double) -1,
-		"y_offset", (double) -1,
+	goo_canvas_text_new(
+		goo_canvas_get_root_item(GOO_CANVAS(mainstatus_canvas)),
+		_("Round number:"),
+		(double) ROUND_OFFSET,
+		(double) MAINSTATUS_Y/2 + 1,
+		(double) -1,
+		GOO_CANVAS_ANCHOR_NORTH_EAST,
+		"height", (double) -1,
 		"font", HELVETICA_10_FONT,
-		"fill_color", gui_theme.toolbar_custom && gui_theme.toolbar_text_color ? gui_theme.toolbar_text_color : "black",
-		"anchor",GTK_ANCHOR_NE,
+		"fill-color", gui_theme.toolbar_custom && gui_theme.toolbar_text_color ? gui_theme.toolbar_text_color : "black",
 		NULL);
 
-	round_number_item = gnome_canvas_item_new(
-		gnome_canvas_root(GNOME_CANVAS(mainstatus_canvas)),
-		gnome_canvas_text_get_type(),
-		"text",_("?"),
-		"x", (double) ROUND_OFFSET + 4,
-		"y", (double) MAINSTATUS_Y/2 + 2,
-		"x_offset", (double) -1,
-		"y_offset", (double) -1,
+	round_number_item = goo_canvas_text_new(
+		goo_canvas_get_root_item(GOO_CANVAS(mainstatus_canvas)),
+		_("?"),
+		(double) ROUND_OFFSET + 4,
+		(double) MAINSTATUS_Y/2 + 2,
+		(double) -1,
+		GOO_CANVAS_ANCHOR_NORTH_WEST,
+		"height", (double) -1,
 		"font", HELVETICA_12_FONT,
-		"fill_color", gui_theme.toolbar_custom && gui_theme.toolbar_text_color ? gui_theme.toolbar_text_color : "black",
-		"anchor",GTK_ANCHOR_NW,
+		"fill-color", gui_theme.toolbar_custom && gui_theme.toolbar_text_color ? gui_theme.toolbar_text_color : "black",
 		NULL);
 
 	/* players turn */
-	gnome_canvas_item_new(
-		gnome_canvas_root(GNOME_CANVAS(mainstatus_canvas)),
-		gnome_canvas_text_get_type(),
-		"text",_("Players turn:"),
-		"x", (double) PLAYERS_COLORS_OFFSET - 4,
-		"y", (double) 3,
-		"x_offset", (double) -1,
-		"y_offset", (double) -1,
+	goo_canvas_text_new(
+		goo_canvas_get_root_item(GOO_CANVAS(mainstatus_canvas)),
+		_("Players turn:"),
+		(double) PLAYERS_COLORS_OFFSET - 4,
+		(double) 3,
+		(double) -1,
+		GOO_CANVAS_ANCHOR_NORTH_EAST,
+		"height", (double) -1,
 		"font", HELVETICA_10_FONT,
-		"fill_color", gui_theme.toolbar_custom && gui_theme.toolbar_text_color ? gui_theme.toolbar_text_color : "black",
-		"anchor",GTK_ANCHOR_NE,
+		"fill-color", gui_theme.toolbar_custom && gui_theme.toolbar_text_color ? gui_theme.toolbar_text_color : "black",
 		NULL);
 
 	/* create canvas for the circles & and load the circles */
 	for(i=0;i<TEG_MAX_PLAYERS;i++)
 	{
-		players_color[i] = gnome_canvas_item_new(
-			gnome_canvas_root(GNOME_CANVAS(mainstatus_canvas)),
-			gnome_canvas_pixbuf_get_type (),
-			"pixbuf", g_color_circles[TEG_MAX_PLAYERS],
-			"x", 0.0,
-			"y", 0.0,
+		players_color[i] = goo_canvas_image_new(
+			goo_canvas_get_root_item(GOO_CANVAS(mainstatus_canvas)),
+			g_color_circles[TEG_MAX_PLAYERS],
+			0.0,
+			0.0,
 			"width", (double) gdk_pixbuf_get_width(g_color_circles[TEG_MAX_PLAYERS]),
 			"height", (double) gdk_pixbuf_get_height(g_color_circles[TEG_MAX_PLAYERS]),
-			"anchor", GTK_ANCHOR_NW,
 			NULL);
-		gnome_canvas_item_hide( players_color[i] );
+	        g_object_set( players_color[i], "visibility",
+	                      GOO_CANVAS_ITEM_INVISIBLE, NULL );
 	}
 
-	players_color_over = gnome_canvas_item_new(
-		gnome_canvas_root(GNOME_CANVAS(mainstatus_canvas)),
-		gnome_canvas_pixbuf_get_type (),
-		"pixbuf", g_color_circle_over,
-		"x", 0.0,
-		"y", 0.0,
+	players_color_over = goo_canvas_image_new(
+		goo_canvas_get_root_item(GOO_CANVAS(mainstatus_canvas)),
+		g_color_circle_over,
+		0.0,
+		0.0,
 		"width", (double) gdk_pixbuf_get_width(g_color_circle_over),
 		"height", (double) gdk_pixbuf_get_height(g_color_circle_over),
-		"anchor", GTK_ANCHOR_NW,
 		NULL);
-	gnome_canvas_item_hide( players_color_over );
+	g_object_set( players_color_over, "visibility",
+	              GOO_CANVAS_ITEM_INVISIBLE, NULL );
 
 
 	mainstatus_update();
@@ -622,29 +532,30 @@
 
 	i=0;
 
-	gnome_canvas_item_hide( players_color_over );
+	g_object_set( players_color_over, "visibility",
+	              GOO_CANVAS_ITEM_INVISIBLE, NULL );
 	while( !IsListEmpty( &g_list_player ) && (l != &g_list_player) )
 	{
 		pJ = (PCPLAYER) l;
 
 		if( pJ->color >= 0 && pJ->numjug >= 0 ) {
-			gnome_canvas_item_show( players_color[i] );
+	                g_object_set( players_color[i], "visibility",
+	                              GOO_CANVAS_ITEM_VISIBLE, NULL );
 
 			if( g_game.whos_turn == pJ->numjug )
 			{
-				gnome_canvas_item_set(
+				g_object_set(
 					players_color_over,
 					"pixbuf", g_color_circle_over,
 					"x", (double) PLAYERS_COLORS_OFFSET - 1 + (i%3) * 14,
 					"y", (double) 2 + 13 * (i<3?0:1),
 					"width", (double) gdk_pixbuf_get_width(g_color_circle_over) + 4,
 					"height", (double) gdk_pixbuf_get_height(g_color_circle_over) + 4,
+					"visibility", GOO_CANVAS_ITEM_VISIBLE,
 					NULL);
-
-				gnome_canvas_item_show( players_color_over );
 			}
 
-			gnome_canvas_item_set(
+			g_object_set(
 				players_color[i],
 				"pixbuf", g_color_circles[pJ->color],
 				"x", (double) PLAYERS_COLORS_OFFSET + (i%3) * 14,
@@ -664,22 +575,24 @@
 
 	{
 		PCPLAYER pJ;
-		gnome_canvas_item_hide( color_started_item );
+	        g_object_set( color_started_item, "visibility",
+	                      GOO_CANVAS_ITEM_INVISIBLE, NULL );
 		if( g_game.who_started_round >= 0 && g_game.who_started_round < TEG_MAX_PLAYERS ) {
 
 			if( player_whois( g_game.who_started_round, &pJ ) == TEG_STATUS_SUCCESS )
 			{
-				gnome_canvas_item_set(
+				g_object_set(
 					color_started_item,
 					"pixbuf", g_color_circles[pJ->color],
+	                                "visibility", GOO_CANVAS_ITEM_VISIBLE,
 					NULL);
-				gnome_canvas_item_show( color_started_item );
 			}
 		}
 	}
 
 	for( ; i < TEG_MAX_PLAYERS ; i++ )
-			gnome_canvas_item_hide( players_color[i] );
+	        g_object_set( players_color[i], "visibility",
+	                      GOO_CANVAS_ITEM_INVISIBLE, NULL );
 
 	return TEG_STATUS_SUCCESS;
 }
@@ -688,9 +601,9 @@
 {
 	char buffer[256];
 	static int offset_right=-1, offset_left=-1;
-	static GnomeCanvasItem *gamestatus_item = NULL;
-	static GnomeCanvasItem *country_item = NULL;
-	static GnomeCanvasItem *cont_item = NULL;
+	static GooCanvasItem *gamestatus_item = NULL;
+	static GooCanvasItem *country_item = NULL;
+	static GooCanvasItem *cont_item = NULL;
 
 
 	if( ! mainstatus_canvas )
@@ -703,80 +616,85 @@
 	}
 
 	/* game status */
-	if( gamestatus_item  )
-		gtk_object_destroy( GTK_OBJECT(gamestatus_item) );
 
-	gamestatus_item = gnome_canvas_item_new(
-		gnome_canvas_root(GNOME_CANVAS(mainstatus_canvas)),
-		gnome_canvas_text_get_type(),
-		"text",_(g_estados[g_game.estado]),
-		"x", (double) (MAINSTATUS_X + offset_right),
-		"y", (double) (MAINSTATUS_Y/2),
-		"x_offset", (double) -1,
-		"y_offset", (double) -1,
+	if( gamestatus_item  ) {
+		goo_canvas_item_remove( gamestatus_item );
+	        gamestatus_item = NULL;
+	}
+
+	gamestatus_item = goo_canvas_text_new(
+		goo_canvas_get_root_item(GOO_CANVAS(mainstatus_canvas)),
+		_(g_estados[g_game.estado]),
+		(double) (MAINSTATUS_X + offset_right),
+		(double) (MAINSTATUS_Y/2),
+		(double) -1,
+		GOO_CANVAS_ANCHOR_EAST,
+		"height", (double) -1,
 		"font", HELVETICA_14_FONT,
-		"fill_color", gui_theme.toolbar_custom && gui_theme.toolbar_text_color ? gui_theme.toolbar_text_color : "black",
-		"anchor",GTK_ANCHOR_EAST,
+		"fill-color", gui_theme.toolbar_custom && gui_theme.toolbar_text_color ? gui_theme.toolbar_text_color : "black",
 		NULL);
 
 	/* country */
-	if( country_item  )
-		gtk_object_destroy( GTK_OBJECT(country_item) );
+	if( country_item  ) {
+		goo_canvas_item_remove( country_item );
+	        country_item = NULL;
+	}
 
 	if( gui_private.country_i_am < 0 || gui_private.country_i_am >= COUNTRIES_CANT )
 		snprintf(buffer,sizeof(buffer)-1," ");
 	else
 		snprintf(buffer,sizeof(buffer)-1,"%s", countries_get_name(gui_private.country_i_am) );
 		
-	country_item = gnome_canvas_item_new(
-		gnome_canvas_root(GNOME_CANVAS(mainstatus_canvas)),
-		gnome_canvas_text_get_type(),
-		"text",buffer,
-		"x", (double) offset_left,
-		"y", (double) (2),
-		"x_offset", (double) -1,
-		"y_offset", (double) -1,
+	country_item = goo_canvas_text_new(
+		goo_canvas_get_root_item(GOO_CANVAS(mainstatus_canvas)),
+		buffer,
+		(double) offset_left,
+		(double) (2),
+		(double) -1,
+		GOO_CANVAS_ANCHOR_NORTH_WEST,
+		"height", (double) -1,
 		"font", HELVETICA_12_FONT,
-		"fill_color", gui_theme.toolbar_custom && gui_theme.toolbar_text_color ? gui_theme.toolbar_text_color : "black",
-		"anchor",GTK_ANCHOR_NW,
+		"fill-color", gui_theme.toolbar_custom && gui_theme.toolbar_text_color ? gui_theme.toolbar_text_color : "black",
 		NULL);
 
 	/* continent */
-	if( cont_item  )
-		gtk_object_destroy( GTK_OBJECT(cont_item) );
+	if( cont_item  ) {
+		goo_canvas_item_remove( cont_item );
+	        cont_item = NULL;
+	}
 
 	if( gui_private.country_i_am < 0 || gui_private.country_i_am >= COUNTRIES_CANT )
 		snprintf(buffer,sizeof(buffer)-1," ");
 	else
 		snprintf(buffer,sizeof(buffer)-1,"%s", cont_get_name( g_countries[gui_private.country_i_am].continente )  );
 		
-	cont_item = gnome_canvas_item_new(
-		gnome_canvas_root(GNOME_CANVAS(mainstatus_canvas)),
-		gnome_canvas_text_get_type(),
-		"text",buffer,
-		"x", (double) offset_left,
-		"y", (double) (16),
-		"x_offset", (double) -1,
-		"y_offset", (double) -1,
+	cont_item = goo_canvas_text_new(
+		goo_canvas_get_root_item(GOO_CANVAS(mainstatus_canvas)),
+		buffer,
+		(double) offset_left,
+		(double) (16),
+		(double) -1,
+		GOO_CANVAS_ANCHOR_NORTH_WEST,
+		"height", (double) -1,
 		"font", HELVETICA_10_FONT,
-		"fill_color", gui_theme.toolbar_custom && gui_theme.toolbar_text_color ? gui_theme.toolbar_text_color : "black",
-		"anchor",GTK_ANCHOR_NW,
+		"fill-color", gui_theme.toolbar_custom && gui_theme.toolbar_text_color ? gui_theme.toolbar_text_color : "black",
 		NULL);
 
 	/* round number */
 	{
 		char buffer[256];
 
-		gnome_canvas_item_hide( round_number_item );
+	        g_object_set( round_number_item, "visibility",
+	                      GOO_CANVAS_ITEM_INVISIBLE, NULL );
 		if( g_game.round_number >= 0 ) {
 
 			sprintf(buffer,"%d",g_game.round_number );
 
-			gnome_canvas_item_set(
+			g_object_set(
 				round_number_item,
 				"text",buffer,
+	                        "visibility", GOO_CANVAS_ITEM_VISIBLE,
 				NULL);
-			gnome_canvas_item_show( round_number_item );
 		}
 	}
 
--- teg-0.11.2+debian.orig/client/gui-gnome/connect.c
+++ teg-0.11.2+debian/client/gui-gnome/connect.c
@@ -28,8 +28,8 @@
 #endif
 
 #include <assert.h>
-#include <gnome.h>
-#include <gconf/gconf-client.h>
+#include <goocanvas.h>
+#include <glib/gi18n.h>
 
 #include "gui.h"
 #include "client.h"
@@ -41,6 +41,8 @@
 #include "colors.h"
 #include "ggz_client.h"
 
+#define GNOME_PAD_SMALL 4
+
 static GtkWidget *connect_window = NULL;
 static GtkWidget *con_entry_name=NULL;
 static GtkWidget *con_spinner_port=NULL;
@@ -76,16 +78,32 @@
 	METASERVER_COMMENT,
 };
 
+static GIOChannel *channel = NULL;
 
+void shutdown_channel(void)
+{
+	if ( gui_private.tag > 0 ) {
+	        g_source_remove (gui_private.tag);
+	        g_io_channel_shutdown (channel, FALSE, NULL);
+	        g_io_channel_unref (channel);
+	        channel = NULL;
+	}
+}
 
 static TEG_STATUS connect_real()
 {
 	if( teg_connect() == TEG_STATUS_SUCCESS ) {
-		gui_private.tag = gdk_input_add( g_game.fd, GDK_INPUT_READ, (GdkInputFunction) pre_client_recv, (gpointer) NULL );
+	        if ( !channel )
+	                channel = g_io_channel_unix_new ( g_game.fd );
+
+	        gui_private.tag = g_io_add_watch_full( channel,
+	                                               G_PRIORITY_DEFAULT,
+	                                               G_IO_IN,
+	                                               (GIOFunc) pre_client_recv,
+	                                               NULL, NULL );
 
 		if( !g_game.with_ggz ) {
 			out_id();
-			if( connect_window ) destroy_window( connect_window, &connect_window );
 		}
 #ifdef WITH_GGZ
 		else {
@@ -98,26 +116,28 @@
 	return TEG_STATUS_ERROR;
 }
 
-static gint connect_button_con_cb(GtkWidget *area, GdkEventExpose *event, gpointer user_data)
+static void connect_button_con_cb(GtkDialog *dialog, gint id, gpointer user_data)
 {
+        if ( id != 0 )
+                return;
+
 	strncpy(g_game.myname,gtk_entry_get_text(GTK_ENTRY(con_entry_name)),PLAYERNAME_MAX_LEN);
 	strncpy(g_game.sername,gtk_entry_get_text(GTK_ENTRY(con_entry_server)),SERVER_NAMELEN);
 	g_game.serport = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(con_spinner_port));
 
-	g_game.observer = GTK_TOGGLE_BUTTON(button_observe)->active;
+	g_game.observer = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON
+	                                               (button_observe));
 
 	/* if you checked "start local server" we'll copy "localhost" to g_game.sername */
 	if( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON(button_launch) ) ) {
-		launch_server(g_game.serport);
+	        launch_server(g_game.serport);
 	}
 
-	gconf_client_set_int(g_conf_client, "/apps/teg/port", g_game.serport, NULL);
-	gconf_client_set_string(g_conf_client, "/apps/teg/servername", g_game.sername, NULL);
-	gconf_client_set_string(g_conf_client, "/apps/teg/playername", g_game.myname, NULL);
+	g_settings_set_int(settings, "port", g_game.serport);
+	g_settings_set_string(settings, "servername", g_game.sername);
+	g_settings_set_string(settings, "playername", g_game.myname);
 
 	connect_real();
-
-	return FALSE;
 }
 
 /*
@@ -158,75 +178,57 @@
 	}
 #endif /* WITH_GGZ */
 
-
-	if( connect_window != NULL ) {
-		gtk_widget_show_all(connect_window);
-		raise_and_focus(connect_window);
-		return ;
-	}
-
 	connect_window = teg_dialog_new(_("Connect to server"),_("Connect to server")); 
-	gnome_dialog_append_buttons(GNOME_DIALOG(connect_window),
-		GNOME_STOCK_BUTTON_OK,
-		GNOME_STOCK_BUTTON_CANCEL,
+	gtk_dialog_add_buttons(GTK_DIALOG(connect_window),
+	                       _("_OK"), 0, _("_Cancel"), 1,
 		NULL );
-	gnome_dialog_set_default(GNOME_DIALOG(connect_window),0);
-
-	gnome_dialog_button_connect (GNOME_DIALOG(connect_window),
-		1, GTK_SIGNAL_FUNC(destroy_window),&connect_window);
-
-	gnome_dialog_button_connect (GNOME_DIALOG(connect_window),
-		0, GTK_SIGNAL_FUNC(connect_button_con_cb),connect_window);
-
-	gtk_signal_connect( GTK_OBJECT(connect_window),
-			"delete_event", GTK_SIGNAL_FUNC(destroy_window),
-			&connect_window);
-
-	gtk_signal_connect( GTK_OBJECT(connect_window),
-			"destroy", GTK_SIGNAL_FUNC(destroy_window),
-			&connect_window);
-
+	gtk_dialog_set_default_response(GTK_DIALOG(connect_window),0);
 
+	g_signal_connect (connect_window, "response",
+	                  G_CALLBACK (connect_button_con_cb), NULL);
 
 /* notebook: TEG Server Selection */
 	book = gtk_notebook_new();
-	gtk_box_pack_start(GTK_BOX(GNOME_DIALOG(connect_window)->vbox), book, TRUE, TRUE, 0);
+	gtk_box_pack_start(GTK_BOX(gtk_dialog_get_content_area
+	                           (GTK_DIALOG(connect_window))), book,
+	                   TRUE, TRUE, 0);
 	label=gtk_label_new(_("TEG Server Selection"));
-	vbox=gtk_vbox_new(FALSE, 0);
+	vbox=gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
 	gtk_notebook_append_page(GTK_NOTEBOOK (book), vbox, label);
 
 
 	/* server options */
-	table = gtk_table_new (3, 2, TRUE);
-	gtk_container_border_width (GTK_CONTAINER (table), GNOME_PAD_SMALL);
-	gtk_table_set_row_spacings (GTK_TABLE (table), GNOME_PAD_SMALL);
-	gtk_table_set_col_spacings (GTK_TABLE (table), GNOME_PAD_SMALL);
+	table = gtk_grid_new ();
+	gtk_grid_set_column_homogeneous (GTK_GRID (table), TRUE);
+	gtk_container_set_border_width (GTK_CONTAINER (table), GNOME_PAD_SMALL);
+	gtk_grid_set_row_spacing (GTK_GRID (table), GNOME_PAD_SMALL);
+	gtk_grid_set_column_spacing (GTK_GRID (table), GNOME_PAD_SMALL);
 
 	frame = gtk_frame_new (_("Server Options"));
-	gtk_container_border_width (GTK_CONTAINER (frame), 1);
+	gtk_container_set_border_width (GTK_CONTAINER (frame), 1);
 	gtk_container_add(GTK_CONTAINER(vbox), frame);
 
 	/* server port */
 	label = gtk_label_new(_("Server port:"));
-	gtk_table_attach_defaults( GTK_TABLE(table), label, 0, 1, 0, 1 );
+	gtk_grid_attach( GTK_GRID(table), label, 0, 0, 1, 1 );
 	adj = (GtkAdjustment *) gtk_adjustment_new( g_game.serport, 1.0, 65536.0, 1.0, 5.0, 1.0 );
 	con_spinner_port = gtk_spin_button_new( adj, 0.0, 0);
-	gtk_table_attach_defaults( GTK_TABLE(table), con_spinner_port, 1, 2, 0, 1 );
+	gtk_grid_attach (GTK_GRID(table), con_spinner_port, 1, 0, 1, 1);
 
 	/* server name */
 	label = gtk_label_new(_("Server name:"));
-	gtk_table_attach_defaults( GTK_TABLE(table), label, 0, 1, 1, 2 );
+	gtk_grid_attach( GTK_GRID(table), label, 0, 1, 1, 1);
 	con_entry_server = gtk_entry_new( );
 	gtk_entry_set_text( GTK_ENTRY( con_entry_server ), g_game.sername);
-	gtk_table_attach_defaults( GTK_TABLE(table), con_entry_server, 1, 2, 1, 2 );
+	gtk_grid_attach (GTK_GRID (table), con_entry_server, 1, 1, 1, 1);
 	
 
 	/* player name */
 	label = gtk_label_new(_("Name:"));
-	gtk_table_attach_defaults( GTK_TABLE(table), label, 0, 1, 2, 3 );
+	gtk_grid_attach( GTK_GRID(table), label, 0, 2, 1, 1);
 	con_entry_name = gtk_entry_new( );
 	gtk_entry_set_text( GTK_ENTRY( con_entry_name ), g_game.myname);
-	gtk_table_attach_defaults( GTK_TABLE(table), con_entry_name, 1, 2, 2, 3 );
+	gtk_grid_attach( GTK_GRID(table), con_entry_name, 1, 2, 1, 1 );
 
 
 	gtk_container_add(GTK_CONTAINER( frame), table );
@@ -234,8 +236,8 @@
 	/* launch localhost server */
 	button_launch = gtk_check_button_new_with_label(_("Start server locally"));
 	gtk_container_add(GTK_CONTAINER(vbox), button_launch);
-	gtk_signal_connect (GTK_OBJECT (button_launch), "toggled",
-	    	GTK_SIGNAL_FUNC (prop_changed), NULL);
+	g_signal_connect (G_OBJECT (button_launch), "toggled",
+	    	G_CALLBACK (prop_changed), NULL);
 
 	/* observer mode */
 	button_observe = gtk_check_button_new_with_label(_("Dont play, just observe"));
@@ -243,7 +245,7 @@
 
 /* notebook: TEG Server Selection */
 	label=gtk_label_new(_("Metaserver"));
-	vbox=gtk_vbox_new(FALSE, 0);
+	vbox=gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
 	gtk_notebook_append_page(GTK_NOTEBOOK (book), vbox, label);
 
 	metaserver_store = gtk_list_store_new(4, G_TYPE_STRING, G_TYPE_INT, G_TYPE_STRING, G_TYPE_STRING );
@@ -279,13 +281,14 @@
 
 /* end*/
 	gtk_widget_show_all(connect_window);
-	raise_and_focus(connect_window);
+	gtk_dialog_run(GTK_DIALOG (connect_window));
+	gtk_widget_destroy(connect_window);
 }
 
 /*
  * Select a color
  */
-static void colortype_ok_cb (GtkWidget *window )
+static void colortype_ok_cb (GtkDialog *dialog, gint id, gpointer data )
 {
 	int i;
 
@@ -295,47 +298,44 @@
 	}
 
 	out_color( i );
-
-	gtk_widget_destroy(colortype_dialog);
-	colortype_dialog = NULL;
 }
 
 static GtkWidget *create_color_button( int i )
 {
 	GtkWidget *vbox;
-	GnomeCanvasItem *image;
+	GooCanvasItem *image;
 	GtkWidget	*canvas;
 
 	if( i < 0 || i >= TEG_MAX_PLAYERS )
 		return NULL;
 
-	vbox = gtk_vbox_new (FALSE, 0);
+	vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
 	if( ! vbox )
 		return NULL;
 
-	canvas = gnome_canvas_new();
+	canvas = goo_canvas_new();
 	if( ! canvas )
 		return NULL;
 
-	gtk_widget_set_usize (canvas, gdk_pixbuf_get_width(g_color_players[i]), gdk_pixbuf_get_height(g_color_players[i]) );
-	gnome_canvas_set_scroll_region (GNOME_CANVAS (canvas), 0, 0, 
+	gtk_widget_set_size_request (canvas,
+	                             gdk_pixbuf_get_width(g_color_players[i]),
+	                             gdk_pixbuf_get_height(g_color_players[i]));
+	goo_canvas_set_bounds (GOO_CANVAS (canvas), 0, 0,
 			gdk_pixbuf_get_width(g_color_players[i]),
 			gdk_pixbuf_get_height(g_color_players[i]) );
-	image = gnome_canvas_item_new(
-		gnome_canvas_root(GNOME_CANVAS(canvas)),
-		gnome_canvas_pixbuf_get_type (),
-		"pixbuf", g_color_players[i],
-		"x", 0.0,
-		"y", 0.0,
+	image = goo_canvas_image_new(
+		goo_canvas_get_root_item(GOO_CANVAS(canvas)),
+		g_color_players[i],
+		0.0,
+		0.0,
 		"width", (double) gdk_pixbuf_get_width(g_color_players[i]),
 		"height", (double) gdk_pixbuf_get_height(g_color_players[i]),
-		"anchor", GTK_ANCHOR_NW,
 		NULL);
 
 	if( ! image )
 		return NULL;
 
-	gtk_box_pack_start_defaults( GTK_BOX(vbox), GTK_WIDGET(canvas));
+	gtk_box_pack_start(GTK_BOX(vbox), GTK_WIDGET(canvas), TRUE, TRUE, 0);
 	gtk_widget_show (canvas);
 
 	if( i==0 ) {
@@ -344,7 +344,7 @@
 		boton_color[i] = gtk_radio_button_new_with_label_from_widget ( GTK_RADIO_BUTTON(boton_color[0]), _(g_colores[i]));
 	}
 
-	gtk_box_pack_start_defaults(GTK_BOX (vbox), boton_color[i]);
+	gtk_box_pack_start(GTK_BOX (vbox), boton_color[i], TRUE, TRUE, 0);
 	gtk_widget_show ( boton_color[i] );
 
 	return vbox;
@@ -359,40 +359,33 @@
 	int i;
 	int first_active =1;
 
-	if( colortype_dialog != NULL ) {
-		gdk_window_show( colortype_dialog->window);
-		gdk_window_raise( colortype_dialog->window);
-		return ;
-	}
-
 	colortype_dialog = teg_dialog_new(_("Select your color"),_("Select your color"));
 
-	gtk_signal_connect (GTK_OBJECT (colortype_dialog), "destroy",
-			GTK_SIGNAL_FUNC (gtk_widget_destroyed), &colortype_dialog);
+	gtk_dialog_add_button( GTK_DIALOG(colortype_dialog), _("_OK"), 0);
 
-	gnome_dialog_append_button( GNOME_DIALOG(colortype_dialog), GNOME_STOCK_BUTTON_OK);
+	g_signal_connect (colortype_dialog, "response",
+	                  G_CALLBACK (colortype_ok_cb), NULL);
 
-	gnome_dialog_button_connect(GNOME_DIALOG(colortype_dialog), 0, GTK_SIGNAL_FUNC(colortype_ok_cb), NULL);
-
-	vbox_dia = GNOME_DIALOG(colortype_dialog)->vbox;
+	vbox_dia = gtk_dialog_get_content_area (GTK_DIALOG(colortype_dialog));
 
 	/* desired color */
 	frame = gtk_frame_new (_("Select your desired color"));
-	gtk_container_border_width (GTK_CONTAINER (frame), 0);
+	gtk_container_set_border_width (GTK_CONTAINER (frame), 0);
 
-	table = gtk_table_new (2, 3, TRUE);
-	gtk_container_border_width (GTK_CONTAINER (table), GNOME_PAD_SMALL);
-	gtk_table_set_row_spacings (GTK_TABLE (table), GNOME_PAD_SMALL);
-	gtk_table_set_col_spacings (GTK_TABLE (table), GNOME_PAD_SMALL);
+	table = gtk_grid_new ();
+	gtk_container_set_border_width (GTK_CONTAINER (table), GNOME_PAD_SMALL);
+	gtk_grid_set_row_spacing (GTK_GRID (table), GNOME_PAD_SMALL);
+	gtk_grid_set_column_spacing (GTK_GRID (table), GNOME_PAD_SMALL);
+	gtk_grid_set_column_homogeneous (GTK_GRID (table), TRUE);
 
 
 	for(i=0;i<TEG_MAX_PLAYERS;i++) {
 		GtkWidget *button = create_color_button( i );
 
 		if( i%2 == 0 ) {
-			gtk_table_attach_defaults( GTK_TABLE(table), button, i/2, (i/2)+1, 0, 1 );
+	                gtk_grid_attach(GTK_GRID(table), button, i/2, 0, 1, 1);
 		} else {
-			gtk_table_attach_defaults( GTK_TABLE(table), button, (i-1)/2, ((i-1)/2)+1, 1, 2 );
+	                gtk_grid_attach(GTK_GRID(table), button, (i-1)/2, 1, 1, 1);
 		}
 
 		/* UGLY: I know that boton_color[i] is used... */
@@ -406,18 +399,19 @@
 	gtk_container_add (GTK_CONTAINER (frame), table);
 	gtk_container_add (GTK_CONTAINER( vbox_dia), frame );
 
-	/* show all */
-	if (!GTK_WIDGET_VISIBLE (colortype_dialog))
-		gtk_widget_show_all (colortype_dialog);
-	else
-		gtk_widget_destroy (colortype_dialog);
+	gtk_widget_show_all (colortype_dialog);
+	gtk_dialog_run (GTK_DIALOG (colortype_dialog));
+	gtk_widget_destroy (colortype_dialog);
 }
 
 /* type of game: with secret missions, or to conquer the world */
-static void gametype_ok_cb (GtkWidget *window )
+static void gametype_ok_cb (GtkDialog *dialog, gint id, gpointer data)
 {
 	int a,b,c,ar1,ar2;
 
+	if ( id != 0 )
+	        return;
+
 	a = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(gametype_button_conqworld));
 	b = ! gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(gametype_button_viewall));
 	c = gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON(gametype_button_commonmission) );
@@ -426,9 +420,6 @@
 
 	out_set_typeofgame( a, b, c, ar1, ar2 );
 	out_start();
-
-	gtk_widget_destroy(gametype_dialog);
-	gametype_dialog = NULL;
 }
 
 /* Shows the dialog that choose the game type */
@@ -438,47 +429,44 @@
 	GtkWidget *vbox_dia,*vbox, *hbox, *label;
         GtkAdjustment *adj;
 
-	if( gametype_dialog != NULL ) {
-		gdk_window_show( gametype_dialog->window);
-		gdk_window_raise( gametype_dialog->window);
-		return ;
-	}
-
 	gametype_dialog = teg_dialog_new(_("Select type of game"),_("Select type of game"));
 
-	gtk_signal_connect (GTK_OBJECT (gametype_dialog), "destroy",
-			GTK_SIGNAL_FUNC (gtk_widget_destroyed), &gametype_dialog);
+	gtk_dialog_add_button( GTK_DIALOG(gametype_dialog), _("_OK"), 0);
 
-	gnome_dialog_append_button( GNOME_DIALOG(gametype_dialog), GNOME_STOCK_BUTTON_OK);
+	g_signal_connect (gametype_dialog, "response",
+	                  G_CALLBACK (gametype_ok_cb), NULL);
 
-	gnome_dialog_button_connect(GNOME_DIALOG(gametype_dialog), 0, GTK_SIGNAL_FUNC(gametype_ok_cb), NULL);
-
-	vbox_dia = GNOME_DIALOG(gametype_dialog)->vbox;
+	vbox_dia = gtk_dialog_get_content_area (GTK_DIALOG(gametype_dialog));
 
 	/* Conquer the world / Secret missions */
 	frame = gtk_frame_new (_("Missions"));
-	gtk_container_border_width (GTK_CONTAINER (frame), 0);
+	gtk_container_set_border_width (GTK_CONTAINER (frame), 0);
 
-	vbox = gtk_vbox_new (FALSE, 0);
+	vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
 
 	gametype_button_conqworld =
 		gtk_radio_button_new_with_label (
 				NULL, _("Play to conquer the world"));
-	gtk_box_pack_start_defaults(GTK_BOX (vbox), gametype_button_conqworld);
+	gtk_box_pack_start(GTK_BOX (vbox), gametype_button_conqworld,
+	                  TRUE, TRUE, 0);
 	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (gametype_button_conqworld), TRUE);
 
 	gametype_button_secret =
 		gtk_radio_button_new_with_label (
-			gtk_radio_button_group (GTK_RADIO_BUTTON (gametype_button_conqworld)), _("Play with secret missions"));
-	gtk_box_pack_start_defaults(GTK_BOX (vbox), gametype_button_secret);
-	gtk_signal_connect (GTK_OBJECT (gametype_button_secret), "toggled",
-	    	GTK_SIGNAL_FUNC (button_secret_enabled), NULL);
+	                gtk_radio_button_get_group(GTK_RADIO_BUTTON
+	                                           (gametype_button_conqworld)),
+	                _("Play with secret missions"));
+	gtk_box_pack_start(GTK_BOX (vbox), gametype_button_secret,
+	                   TRUE, TRUE, 0);
+	g_signal_connect (G_OBJECT (gametype_button_secret), "toggled",
+	                  G_CALLBACK (button_secret_enabled), NULL);
 
-	hbox = gtk_hbox_new( FALSE, 0 );
+	hbox = gtk_box_new( GTK_ORIENTATION_HORIZONTAL, 0 );
 	gametype_button_commonmission = gtk_check_button_new_with_label(_("Play with common mission\n(One wins, also, conquering 30 countries)"));
 	gtk_widget_set_sensitive( gametype_button_commonmission, 0 );
-	gtk_box_pack_start_defaults(GTK_BOX (hbox), gametype_button_commonmission);
-	gtk_box_pack_start_defaults(GTK_BOX (vbox), hbox);
+	gtk_box_pack_start(GTK_BOX (hbox), gametype_button_commonmission,
+	                   TRUE, TRUE, 0);
+	gtk_box_pack_start(GTK_BOX (vbox), hbox, TRUE, TRUE, 0);
 
 	gtk_container_add (GTK_CONTAINER (frame), vbox);
 
@@ -486,20 +474,23 @@
 
 	/* Fog of War / Normal */
 	frame = gtk_frame_new (_("Visibility"));
-	gtk_container_border_width (GTK_CONTAINER (frame), 0);
+	gtk_container_set_border_width (GTK_CONTAINER (frame), 0);
 
-	vbox = gtk_vbox_new (TRUE, 0);
+	vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
 
 	gametype_button_viewall=
 		gtk_radio_button_new_with_label (
 				NULL, _("Standard (You see all countries)"));
-	gtk_box_pack_start_defaults(GTK_BOX (vbox), gametype_button_viewall);
+	gtk_box_pack_start(GTK_BOX (vbox), gametype_button_viewall,
+	                   TRUE, TRUE, 0);
 	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (gametype_button_viewall), TRUE);
 
 	gametype_button_fow=
 		gtk_radio_button_new_with_label (
-			gtk_radio_button_group (GTK_RADIO_BUTTON (gametype_button_viewall)), _("Fog of War (You see only border countries)"));
-	gtk_box_pack_start_defaults(GTK_BOX (vbox), gametype_button_fow);
+			gtk_radio_button_get_group (GTK_RADIO_BUTTON
+	                                            (gametype_button_viewall)),
+	                _("Fog of War (You see only border countries)"));
+	gtk_box_pack_start(GTK_BOX (vbox), gametype_button_fow, TRUE, TRUE, 0);
 
 	gtk_container_add (GTK_CONTAINER (frame), vbox);
 
@@ -507,26 +498,28 @@
 
 	/* Armies */
 	frame = gtk_frame_new (_("Armies"));
-	gtk_container_border_width (GTK_CONTAINER (frame), 0);
+	gtk_container_set_border_width (GTK_CONTAINER (frame), 0);
 
-	vbox = gtk_vbox_new (TRUE, 0);
+	vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
 
 	/* 1 */
-	hbox = gtk_hbox_new( FALSE, 0 );
+	hbox = gtk_box_new( GTK_ORIENTATION_HORIZONTAL, 0 );
 	label = gtk_label_new(_("Armies to place in the 1st step"));
-	gtk_box_pack_start_defaults(GTK_BOX (hbox), label);
+	gtk_box_pack_start(GTK_BOX (hbox), label, TRUE, TRUE, 0);
 	adj = (GtkAdjustment *) gtk_adjustment_new( 5, 1.0, 30.0, 1.0, 5.0, 1.0 );
 	gametype_spinner_armies1 = gtk_spin_button_new( adj, 0.0, 0);
-	gtk_box_pack_start_defaults(GTK_BOX (hbox), gametype_spinner_armies1);
+	gtk_box_pack_start(GTK_BOX (hbox), gametype_spinner_armies1,
+	                   TRUE, TRUE, 0);
 	gtk_container_add (GTK_CONTAINER (vbox), hbox);
 
 	/* 2 */
-	hbox = gtk_hbox_new( FALSE, 0 );
+	hbox = gtk_box_new( GTK_ORIENTATION_HORIZONTAL, 0 );
 	label = gtk_label_new(_("Armies to place in the 2nd step"));
-	gtk_box_pack_start_defaults(GTK_BOX (hbox), label);
+	gtk_box_pack_start(GTK_BOX (hbox), label, TRUE, TRUE, 0);
 	adj = (GtkAdjustment *) gtk_adjustment_new( 3, 1.0, 25.0, 1.0, 5.0, 1.0 );
 	gametype_spinner_armies2 = gtk_spin_button_new( adj, 0.0, 0);
-	gtk_box_pack_start_defaults(GTK_BOX (hbox), gametype_spinner_armies2);
+	gtk_box_pack_start (GTK_BOX (hbox), gametype_spinner_armies2,
+	                    TRUE, TRUE, 0);
 	gtk_container_add (GTK_CONTAINER (vbox), hbox);
 
 
@@ -534,12 +527,9 @@
 
 	gtk_container_add (GTK_CONTAINER( vbox_dia), frame );
 
-
-	/* show all */
-	if (!GTK_WIDGET_VISIBLE (gametype_dialog))
-		gtk_widget_show_all (gametype_dialog);
-	else
-		gtk_widget_destroy (gametype_dialog);
+	gtk_widget_show_all (gametype_dialog);
+	gtk_dialog_run (GTK_DIALOG (gametype_dialog));
+	gtk_widget_destroy (gametype_dialog);
 }
 
 
--- teg-0.11.2+debian.orig/client/gui-gnome/armies.c
+++ teg-0.11.2+debian/client/gui-gnome/armies.c
@@ -26,7 +26,8 @@
 #  include <config.h>
 #endif
 
-#include <gnome.h>
+#include <goocanvas.h>
+#include <glib/gi18n.h>
 
 #include "gui.h"
 #include "client.h"
@@ -50,50 +51,56 @@
 
 static int initialized=0;
 
-GnomeCanvasGroup *armies_group;
+GooCanvasItem *armies_group;
 
-static gint
-armies_event (GnomeCanvasItem *item, GdkEvent *event, gpointer data)
+static double x, y;
+double new_x, new_y;
+double item_x, item_y;
+static gboolean dragging;
+
+static gboolean
+button_press_cb (GooCanvasItem *item, GooCanvasItem *target,
+                 GdkEventButton *event, GooCanvas *canvas)
 {
-	static double x, y;
-	double new_x, new_y;
-	double item_x, item_y;
-	static int dragging;
-
-	item_x = event->button.x;
-	item_y = event->button.y;
-	gnome_canvas_item_w2i (item->parent, &item_x, &item_y);
-
-	switch (event->type) {
-
-	case GDK_BUTTON_PRESS:
-		x = item_x;
-		y = item_y;
-		dragging = TRUE;
-		break;
-
-	case GDK_MOTION_NOTIFY:
-		if (dragging && (event->motion.state & GDK_BUTTON1_MASK)) {
-			new_x = item_x;
-			new_y = item_y;
-			gnome_canvas_item_move (item, new_x - x, new_y - y);
-			x = new_x;
-			y = new_y;
-		}
-		break;
-
-	case GDK_BUTTON_RELEASE:
-		gnome_canvas_item_ungrab (item, event->button.time);
-		dragging = FALSE;
-		break;
+	if (!dragging && event->button == 1) {
+	        item_x = event->x;
+	        item_y = event->y;
+	        dragging = TRUE;
+	        g_object_get (item, "x", &x, "y", &y, NULL);
+	        goo_canvas_pointer_grab (canvas, item,
+	                                 GDK_POINTER_MOTION_MASK |
+	                                 GDK_BUTTON_RELEASE_MASK,
+	                                 NULL, event->time);
+	}
+
+	return FALSE;
+}
 
-	default:
-		break;
+static gboolean
+motion_notify_cb (GooCanvasItem *item, GooCanvasItem *target,
+                  GdkEventMotion *event, gpointer data)
+{
+	if (dragging && (event->state & GDK_BUTTON1_MASK)) {
+	        new_x = event->x - x;
+	        new_y = event->y - y;
+	        g_object_set (item, "x", item_x + new_x,
+	                      "y", item_y + new_y, NULL);
 	}
 
 	return FALSE;
 }
 
+static gboolean
+button_release_cb (GooCanvasItem *item, GooCanvasItem *target,
+                   GdkEventButton *event, GooCanvas *canvas)
+{
+	if (dragging && item != NULL) {
+	        goo_canvas_pointer_ungrab (canvas, item, event->time);
+	        dragging = FALSE;
+	}
+
+	return FALSE;
+}
 
 static TEG_STATUS armies_view_cant_x_cont( int i )
 {
@@ -105,7 +112,7 @@
 		return TEG_STATUS_ERROR;
 
 	if( armies_prop[i].armies_text ) {
-		gtk_object_destroy(GTK_OBJECT ( armies_prop[i].armies_text) );
+	        goo_canvas_item_remove( armies_prop[i].armies_text );
 		armies_prop[i].armies_text = NULL;
 	}
 
@@ -114,17 +121,16 @@
 	else
 		snprintf(buffer,sizeof(buffer)-1,"%d",armies_prop[i].cant);
 
-	armies_prop[i].armies_text = gnome_canvas_item_new(
+	armies_prop[i].armies_text = goo_canvas_text_new(
 		armies_group,
-		gnome_canvas_text_get_type(),
-		"text", buffer,
-		"x", (double) 100,
-		"y", (double) i*12+15,
-		"x_offset", (double) -1,
-		"y_offset", (double) -1,
+		buffer,
+		(double) 100,
+		(double) i*12+15,
+		(double) -1,
+		GOO_CANVAS_ANCHOR_NORTH_EAST,
+		"height", (double) -1,
 		"font", HELVETICA_12_FONT,
-		"fill_color", ( armies_prop[i].cant > 0 ) ? "black" : "grey",
-		"anchor",GTK_ANCHOR_NE,
+		"fill-color", ( armies_prop[i].cant > 0 ) ? "black" : "grey",
 		NULL);
 
 	return TEG_STATUS_SUCCESS;
@@ -138,28 +144,27 @@
 	memset(buffer,0,sizeof(buffer));
 
 
-	gnome_canvas_item_raise_to_top ( GNOME_CANVAS_ITEM(armies_group));
+	goo_canvas_item_raise ( GOO_CANVAS_ITEM(armies_group), NULL );
 
 	for(i=0;i<CONT_CANT;i++)
 		armies_view_cant_x_cont( i );
 
 	if( armies_prop[CONT_CANT].armies_text ) {
-		gtk_object_destroy(GTK_OBJECT ( armies_prop[CONT_CANT].armies_text) );
+	        goo_canvas_item_remove( armies_prop[CONT_CANT].armies_text );
 		armies_prop[CONT_CANT].armies_text = NULL;
 	}
 
 	snprintf(buffer,sizeof(buffer)-1,"%d",armies_prop[CONT_CANT].cant);
-	armies_prop[CONT_CANT].armies_text = gnome_canvas_item_new(
+	armies_prop[CONT_CANT].armies_text = goo_canvas_text_new(
 		armies_group,
-		gnome_canvas_text_get_type(),
-		"text", buffer,
-		"x", (double) 100,
-		"y", (double) 1,
-		"x_offset", (double) -1,
-		"y_offset", (double) -1,
+		buffer,
+		(double) 100,
+		(double) 1,
+		(double) -1,
+		GOO_CANVAS_ANCHOR_NORTH_EAST,
+		"height", (double) -1,
 		"font", HELVETICA_12_FONT,
-		"fill_color", ( armies_prop[CONT_CANT].cant > 0 ) ? "black" : "grey",
-		"anchor",GTK_ANCHOR_NE,
+		"fill-color", ( armies_prop[CONT_CANT].cant > 0 ) ? "black" : "grey",
 		NULL);
 }
 
@@ -200,7 +205,8 @@
 
 	armies_prop[CONT_CANT].cant += cant;
 
-	gnome_canvas_item_show( GNOME_CANVAS_ITEM(armies_group) );
+	g_object_set( armies_group, "visibility",
+	              GOO_CANVAS_ITEM_VISIBLE, NULL );
 
 	armies_view_cant();
 
@@ -225,7 +231,8 @@
 		conts >>= 1;
 	}
 
-	gnome_canvas_item_show( GNOME_CANVAS_ITEM(armies_group) );
+	g_object_set( armies_group, "visibility",
+	              GOO_CANVAS_ITEM_VISIBLE, NULL );
 
 	armies_view_cant();
 
@@ -236,14 +243,28 @@
 {
 	if(!initialized) return TEG_STATUS_ERROR;
 
-	gnome_canvas_item_hide( GNOME_CANVAS_ITEM(armies_group) );
+	g_object_set( armies_group, "visibility",
+	              GOO_CANVAS_ITEM_INVISIBLE, NULL );
 	return TEG_STATUS_SUCCESS;
 }
 
-TEG_STATUS armies_init( GnomeCanvasGroup *group )
+static void
+setup_dnd_handlers (GooCanvasItem *item)
+{
+	GooCanvas *canvas = goo_canvas_item_get_canvas (item);
+
+	g_signal_connect (item, "button-press-event",
+	                  G_CALLBACK (button_press_cb), canvas);
+	g_signal_connect (item, "motion-notify-event",
+	                  G_CALLBACK (motion_notify_cb), NULL);
+	g_signal_connect (item, "button-release-event",
+	                  G_CALLBACK (button_release_cb), canvas);
+}
+
+TEG_STATUS armies_init( GooCanvasItem *group )
 {
 	int i;
-	GnomeCanvasItem *item;
+	GooCanvasItem *item;
 
 	if(!group)
 		return TEG_STATUS_ERROR;
@@ -251,70 +272,64 @@
 	if(initialized)
 		return TEG_STATUS_ERROR;
 
-	armies_group = GNOME_CANVAS_GROUP(
-			gnome_canvas_item_new (
+	armies_group =
+			goo_canvas_group_new (
 				group,
-				gnome_canvas_group_get_type (),
 				"x", (float) gui_theme.armies_x,
 				"y", (float) gui_theme.armies_y,
-				NULL));
+				NULL);
 
 
 	if( armies_group ) {
-		item = gnome_canvas_item_new(
+		item = goo_canvas_rect_new(
 			armies_group,
-			gnome_canvas_rect_get_type (),
-			"x1", 0.0,
-			"y1", 0.0,
-			"x2", (double) 100,
-			"y2", (double) 90,
+			0.0,
+			0.0,
+			(double) 100,
+			(double) 90,
 			NULL);
 
 		if( gui_theme.armies_background )
-			gnome_canvas_item_set(
+			g_object_set(
 				item,
-				"fill_color","light yellow",
-				"outline_color","black",
+				"fill-color","light yellow",
+				"stroke-color","black",
 				NULL );
 
 
-		item = gnome_canvas_item_new(
+		item = goo_canvas_text_new(
 			armies_group,
-			gnome_canvas_text_get_type(),
-			"text",_("Total"),
-			"x", (double) 1,
-			"y", (double) 1,
-			"x_offset", (double) -1,
-			"y_offset", (double) -1,
+			_("Total"),
+			(double) 1,
+			(double) 1,
+			(double) -1,
+			GOO_CANVAS_ANCHOR_NORTH_WEST,
+			"height", (double) -1,
 			"font", HELVETICA_12_FONT,
-			"fill_color", "black",
-			"anchor",GTK_ANCHOR_NW,
+			"fill-color", "black",
 			NULL);
 
 
 		for(i=0;i<CONT_CANT;i++) {
 
-			item = gnome_canvas_item_new(
+			item = goo_canvas_text_new(
 				armies_group,
-				gnome_canvas_text_get_type(),
-				"text", cont_get_name(i),
-				"x", (double) 1,
-				"y", (double) i*12+15,
-				"x_offset", (double) -1,
-				"y_offset", (double) -1,
+				cont_get_name(i),
+				(double) 1,
+				(double) i*12+15,
+				(double) -1,
+				GOO_CANVAS_ANCHOR_NORTH_WEST,
+				"height", (double) -1,
 				"font", HELVETICA_10_FONT,
-				"fill_color", "black",
-				"anchor",GTK_ANCHOR_NW,
+				"fill-color", "black",
 				NULL);
 
 		};
-		gnome_canvas_item_hide( GNOME_CANVAS_ITEM(armies_group) );
+	        g_object_set( armies_group, "visibility",
+	                      GOO_CANVAS_ITEM_INVISIBLE, NULL );
 
 		if( gui_theme.armies_dragable )
-			gtk_signal_connect (GTK_OBJECT (armies_group), "event",
-					    (GtkSignalFunc) armies_event,
-					    &armies_group);
-
+	                setup_dnd_handlers (armies_group);
 	}
 
 	initialized=1;
--- teg-0.11.2+debian.orig/client/gui-gnome/colors.c
+++ teg-0.11.2+debian/client/gui-gnome/colors.c
@@ -24,7 +24,8 @@
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
-#include <gnome.h>
+#include <gtk/gtk.h>
+#include <glib/gi18n.h>
 
 #include "gui.h"
 #include "client.h"
@@ -38,9 +39,6 @@
 
 extern TTheme gui_theme;
 
-GdkGC *g_colors_gc = NULL;
-GdkFont* g_pixmap_font10 = NULL;
-
 static int allocated=0;
 
 struct _G_colores G_colores[] = {
@@ -53,13 +51,13 @@
 	{"grey", "black"},		/* Color no usado por playeres */
 };
 #define NR_COLORS (sizeof(G_colores)/sizeof(G_colores[0]))
-GdkColor colors_players[NR_COLORS];
+GdkRGBA colors_players[NR_COLORS];
 
 char *G_colores_common[] = {
 	"white", "black"
 };
 #define NR_COLORS_COMMON (2)
-GdkColor colors_common[NR_COLORS_COMMON];
+GdkRGBA colors_common[NR_COLORS_COMMON];
 
 int colors_foreground[] = { 0,1,0,0,1,1,1 };
 
@@ -148,27 +146,19 @@
 /* allocate colors */
 TEG_STATUS colors_allocate( void )
 {
-	GdkColormap *colormap;
 	int i;
 
 	if(allocated)
 		return TEG_STATUS_ERROR;
 
-    	colormap = gtk_widget_get_colormap(main_window);
-
 	for(i=0;i<NR_COLORS;i++) {
-		gdk_color_parse( G_colores[i].ellip_color, &colors_players[i]);
-		gdk_colormap_alloc_color( colormap, &colors_players[i], FALSE, TRUE);
+	        gdk_rgba_parse( &colors_players[i], G_colores[i].ellip_color );
 	}
 
 	for(i=0;i<NR_COLORS_COMMON;i++) {
-		gdk_color_parse( G_colores_common[i], &colors_common[i]);
-		gdk_colormap_alloc_color( colormap, &colors_common[i], FALSE, TRUE);
+	        gdk_rgba_parse( &colors_common[i], G_colores_common[i] );
 	}
 
-	g_colors_gc = gdk_gc_new(main_window->window);
-	g_pixmap_font10 = gdk_font_load (HELVETICA_10_FONT_OLD);
-
 	colors_load_images();
 
 	allocated=1;
@@ -176,54 +166,7 @@
 	return TEG_STATUS_SUCCESS;
 }
 
-/* free color's resources */
-TEG_STATUS colors_free()
-{
-	GdkColormap *colormap;
-	int i;
-
-	if(allocated)
-		return TEG_STATUS_ERROR;
-
-    	colormap = gtk_widget_get_colormap(main_window);
-
-	gdk_colormap_free_colors(colormap,(GdkColor*)&colors_players,NR_COLORS);
-	gdk_colormap_free_colors(colormap,(GdkColor*)&colors_common,COLORS_LAST);
-
-	for(i=0; i < G_N_ELEMENTS(g_color_circles); i++ ) {
-		if( g_color_players[i] ) {
-			gdk_pixbuf_unref( g_color_players[i] );
-			g_color_players[i] = NULL;
-		}
-
-		if( g_color_circles[i] ) {
-			gdk_pixbuf_unref( g_color_circles[i] );
-			g_color_circles[i] = NULL;
-		}
-	}
-
-	if( g_color_circle_over ) {
-		gdk_pixbuf_unref( g_color_circle_over );
-		g_color_circle_over = NULL;
-	}
-
-
-	if( g_colors_gc ) {
-		gdk_gc_unref( g_colors_gc );
-		g_colors_gc = NULL;
-	}
-
-	if( g_pixmap_font10 ) {
-		gdk_font_unref( g_pixmap_font10 );
-		g_pixmap_font10 = NULL;
-	}
-
-	allocated=0;
-
-	return TEG_STATUS_SUCCESS;
-}
-
-GdkColor* colors_get_player( int n )
+GdkRGBA* colors_get_player( int n )
 {
 	PCPLAYER pJ;
 
@@ -235,14 +178,14 @@
 	return &colors_players[pJ->color];
 }
 
-GdkColor* colors_get_player_from_color( int color )
+GdkRGBA* colors_get_player_from_color( int color )
 {
 	if(color<0 || color>=NR_COLORS)
 		return &colors_players[NR_COLORS-1];
 	return &colors_players[color];
 }
 
-GdkColor* colors_get_player_ink(int n )
+GdkRGBA* colors_get_player_ink(int n )
 {
 	PCPLAYER pJ;
 
@@ -254,21 +197,21 @@
 	return &colors_common[colors_foreground[pJ->color]];
 }
 
-GdkColor* colors_get_player_ink_from_color(int color )
+GdkRGBA* colors_get_player_ink_from_color(int color )
 {
 	if(color<0 || color>=NR_COLORS)
 		return &colors_common[COLORS_BLACK];
 	return &colors_common[colors_foreground[color]];
 }
 
-GdkColor* colors_get_player_virtual( int n )
+GdkRGBA* colors_get_player_virtual( int n )
 {
 	if( n == g_game.numjug )
 		return &colors_players[COLORS_P_BLUE];
 	return &colors_players[COLORS_P_RED];
 }
 
-GdkColor* colors_get_common( int n )
+GdkRGBA* colors_get_common( int n )
 {
 	if(n<0 || n>=NR_COLORS_COMMON)
 		return &colors_players[NR_COLORS_COMMON-1];
@@ -298,13 +241,13 @@
 char * get_foreground_for_color( int c )
 {
 	if(c<0 || c>=NR_COLORS)
-		return G_colores[NR_COLORS].text_color;
+		return G_colores[NR_COLORS-1].text_color;
 	return G_colores[c].text_color;
 }
 
 char * get_background_for_color( int c )
 {
 	if(c<0 || c>=NR_COLORS)
-		return G_colores[NR_COLORS].ellip_color;
+		return G_colores[NR_COLORS-1].ellip_color;
 	return G_colores[c].ellip_color;
 }
--- teg-0.11.2+debian.orig/client/gui-gnome/preferences.c
+++ teg-0.11.2+debian/client/gui-gnome/preferences.c
@@ -26,7 +26,7 @@
 #  include <config.h>
 #endif
 
-#include <gnome.h>
+#include <gtk/gtk.h>
 #include "client.h"
 #include "gui.h"
 #include "priv.h"
@@ -90,29 +90,31 @@
 		theme_widget = NULL;
 	}
 
+	if ( !GTK_IS_FRAME (theme_frame_prev) )
+	        return;
+
 	filename = theme_load_fake_file("mini_shot.png",theme);
 	theme_widget = gtk_image_new_from_file(filename);
 	if( theme_widget ) {
 		gtk_container_add( GTK_CONTAINER(theme_frame_prev), theme_widget );
 		gtk_widget_show(theme_widget);
-		gtk_signal_connect (GTK_OBJECT(theme_widget), "destroy",
-			GTK_SIGNAL_FUNC (free_pixmap), NULL);
+		g_signal_connect (G_OBJECT(theme_widget), "destroy",
+	                          G_CALLBACK (free_pixmap), NULL);
 	} else
 		g_warning (_("Could not find the %s file"),"mini_shot.png");
 }
 
-static void prop_box_changed_callback (GtkWidget *widget, gpointer data)
+static void theme_activated_callback (GtkComboBox *combo, gpointer data)
 {
-	if(pref_dialog==NULL)
-		return;
-	gnome_property_box_changed (GNOME_PROPERTY_BOX (pref_dialog));
-}
+	gchar *sel;
 
-static void theme_activated_callback (GtkWidget *widget, gpointer data)
-{
-	theme_activated = data;
-	load_preview(data);
-	prop_box_changed_callback (widget,data);
+	if ( !pref_dialog )
+	        return;
+
+	sel = gtk_combo_box_text_get_active_text (GTK_COMBO_BOX_TEXT (combo));
+	theme_activated = g_strdup (sel);
+	load_preview(sel);
+	g_free(sel);
 }
 
 static void
@@ -123,112 +125,121 @@
 
 
 
-static void apply_cb (GtkWidget *widget, gint pagenum, gpointer data)
+static void apply_cb (GtkDialog *widget, gint id, gpointer data)
 {
-	if (pagenum != -1)
-		return;
+	if (id != GTK_RESPONSE_ACCEPT)
+	        return;
  
 	/** dialogs **/
 
 
-	if (GTK_TOGGLE_BUTTON(conf_cb_showattackturn)->active)
+	if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON
+	                                  (conf_cb_showattackturn)))
 		gui_private.dialog_show |= (1 << DIALOG_ATTACK_TURN);
 	else
 		gui_private.dialog_show &= ~(1 << DIALOG_ATTACK_TURN);
 
-	if (GTK_TOGGLE_BUTTON(conf_cb_showplacearmies)->active)
+	if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON
+	                                  (conf_cb_showplacearmies)))
 		gui_private.dialog_show |= (1 << DIALOG_PLACE_ARMIES);
 	else
 		gui_private.dialog_show &= ~(1 << DIALOG_PLACE_ARMIES);
 	
-	if (GTK_TOGGLE_BUTTON(conf_cb_showregrouparmies)->active)
+	if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON
+	                                  (conf_cb_showregrouparmies)))
 		gui_private.dialog_show |= (1 << DIALOG_REGROUP_ARMIES);
 	else
 		gui_private.dialog_show &= ~(1 << DIALOG_REGROUP_ARMIES);
 	
 
 	/** messages **/
-	if (GTK_TOGGLE_BUTTON( conf_cb_showerr )->active)
+	if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON( conf_cb_showerr )))
 		g_game.msg_show |= M_ERR;
 	else
 		g_game.msg_show &= ~M_ERR;
 
 
-	if (GTK_TOGGLE_BUTTON( conf_cb_showimp )->active)
+	if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON( conf_cb_showimp )))
 		g_game.msg_show |= M_IMP;
 	else
 		g_game.msg_show &= ~M_IMP;
 
 
-	if (GTK_TOGGLE_BUTTON( conf_cb_showmsg )->active)
+	if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON( conf_cb_showmsg )))
 		g_game.msg_show |= M_MSG;
 	else
 		g_game.msg_show &= ~M_MSG;
 
 
-	if (GTK_TOGGLE_BUTTON( conf_cb_showmsgcolor )->active)
+	if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON
+	                                  ( conf_cb_showmsgcolor )))
 		gui_private.msg_show_colors = 1;
 	else
 		gui_private.msg_show_colors = 0;
 
 
-	if (GTK_TOGGLE_BUTTON( conf_cb_showinf )->active)
+	if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON( conf_cb_showinf )))
 		g_game.msg_show |= M_INF;
 	else
 		g_game.msg_show &= ~M_INF;
 
 	/** status **/
-	if (GTK_TOGGLE_BUTTON( conf_cb_stscolor)->active)
+	if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON( conf_cb_stscolor)))
 		gui_private.status_show |= (1 << STATUS_COLUMN_COLOR);
 	else
 		gui_private.status_show &= ~(1 << STATUS_COLUMN_COLOR);
 
-	if (GTK_TOGGLE_BUTTON( conf_cb_stsnumber)->active)
+	if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON
+	                                  ( conf_cb_stsnumber)))
 		gui_private.status_show |= (1 << STATUS_COLUMN_NUMBER);
 	else
 		gui_private.status_show &= ~(1 << STATUS_COLUMN_NUMBER);
 
-	if (GTK_TOGGLE_BUTTON( conf_cb_stsname)->active)
+	if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON( conf_cb_stsname)))
 		gui_private.status_show |= (1 << STATUS_COLUMN_NAME);
 	else
 		gui_private.status_show &= ~(1 << STATUS_COLUMN_NAME);
 
-	if (GTK_TOGGLE_BUTTON( conf_cb_stsscore)->active)
+	if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON( conf_cb_stsscore)))
 		gui_private.status_show |= (1 << STATUS_COLUMN_SCORE);
 	else
 		gui_private.status_show &= ~(1 << STATUS_COLUMN_SCORE);
 
-	if (GTK_TOGGLE_BUTTON( conf_cb_stsaddress )->active)
+	if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON
+	                                  ( conf_cb_stsaddress )))
 		gui_private.status_show |= (1 << STATUS_COLUMN_ADDR);
 	else
 		gui_private.status_show &= ~(1 << STATUS_COLUMN_ADDR);
 
-	if (GTK_TOGGLE_BUTTON( conf_cb_stshuman)->active)
+	if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON( conf_cb_stshuman)))
 		gui_private.status_show |= (1 << STATUS_COLUMN_HUMAN);
 	else
 		gui_private.status_show &= ~(1 << STATUS_COLUMN_HUMAN);
 
-	if (GTK_TOGGLE_BUTTON( conf_cb_stscountries)->active)
+	if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON
+	                                  ( conf_cb_stscountries )))
 		gui_private.status_show |= (1 << STATUS_COLUMN_COUNTRIES);
 	else
 		gui_private.status_show &= ~(1 << STATUS_COLUMN_COUNTRIES);
 
-	if (GTK_TOGGLE_BUTTON( conf_cb_stsarmies)->active)
+	if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON
+	                                  ( conf_cb_stsarmies )))
 		gui_private.status_show |= (1 << STATUS_COLUMN_ARMIES);
 	else
 		gui_private.status_show &= ~(1 << STATUS_COLUMN_ARMIES);
 
-	if (GTK_TOGGLE_BUTTON( conf_cb_stscards)->active)
+	if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON (conf_cb_stscards)))
 		gui_private.status_show |= (1 << STATUS_COLUMN_CARDS);
 	else
 		gui_private.status_show &= ~(1 << STATUS_COLUMN_CARDS);
 
-	if (GTK_TOGGLE_BUTTON( conf_cb_stsstatus)->active)
+	if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON
+	                                  ( conf_cb_stsstatus )))
 		gui_private.status_show |= (1 << STATUS_COLUMN_STATUS);
 	else
 		gui_private.status_show &= ~(1 << STATUS_COLUMN_STATUS);
 
-	if (GTK_TOGGLE_BUTTON( conf_cb_stswho)->active)
+	if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON( conf_cb_stswho)))
 		gui_private.status_show |= (1 << STATUS_COLUMN_WHO);
 	else
 		gui_private.status_show &= ~(1 << STATUS_COLUMN_WHO);
@@ -241,17 +252,33 @@
 
 	
 	/* save new configurations */
-	gconf_client_set_int( g_conf_client, "/apps/teg/msgshow",g_game.msg_show, NULL);
-	gconf_client_set_bool( g_conf_client, "/apps/teg/msgshow_with_color",gui_private.msg_show_colors, NULL);
-	gconf_client_set_int( g_conf_client, "/apps/teg/status_show",gui_private.status_show, NULL);
-	gconf_client_set_int( g_conf_client, "/apps/teg/dialog_show",gui_private.dialog_show, NULL);
-	gconf_client_set_bool( g_conf_client, "/apps/teg/robot_in_server",g_game.robot_in_server, NULL);
+	g_settings_delay( settings );
+	g_settings_set_int( settings, "msgshow", g_game.msg_show );
+	g_settings_set_boolean( settings, "msgshow-with-color",
+	                        gui_private.msg_show_colors );
+	g_settings_set_int( settings, "status-show", gui_private.status_show );
+	g_settings_set_int( settings, "dialog-show", gui_private.dialog_show );
+	g_settings_set_boolean( settings, "robot-in-server",
+	                        g_game.robot_in_server );
 
 	if( theme_activated ){
-		gconf_client_set_string( g_conf_client, "/apps/teg/theme",theme_activated, NULL);
-		if( strcmp(theme_activated,g_game.theme) )
-			gnome_ok_dialog_parented(_("You have to restart TEG to use the new theme."),GTK_WINDOW(main_window));
+		g_settings_set_string( settings, "theme", theme_activated);
+		if( strcmp(theme_activated,g_game.theme) ) {
+	          GtkWidget *dlg;
+
+	          dlg = gtk_message_dialog_new (GTK_WINDOW (main_window),
+	                                        GTK_DIALOG_DESTROY_WITH_PARENT,
+	                                        GTK_MESSAGE_INFO,
+	                                        GTK_BUTTONS_CLOSE,
+	                                        _("You have to restart TEG to"
+	                                          " use the new theme."));
+	          gtk_dialog_run (GTK_DIALOG (dlg));
+	          gtk_widget_destroy (dlg);
+	        }
 	}
+
+	/* Apply all settings atomically.  */
+	g_settings_apply (settings);
 }
 
 
@@ -262,7 +289,6 @@
 	TInfo Info;
 	pTInfo pI;
 	char *s;
-	GtkWidget *item;
 	int i=0;
 
 	if( theme_enum_themes(&Info) != TEG_STATUS_SUCCESS ) {
@@ -272,22 +298,20 @@
 
 	for( pI=&Info; pI != NULL; pI = pI->next ) {
 		s = strdup (pI->name);
-		item = gtk_menu_item_new_with_label (s);
-		gtk_widget_show (item);
-		gtk_menu_append (GTK_MENU(menu), item);
-		gtk_signal_connect (GTK_OBJECT(item), "activate",
-			    GTK_SIGNAL_FUNC (theme_activated_callback),s);
+	        gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (menu), s);
+		g_signal_connect (G_OBJECT(menu), "changed",
+			    G_CALLBACK (theme_activated_callback), NULL);
 
-		gtk_signal_connect (GTK_OBJECT(item), "destroy",
-			    GTK_SIGNAL_FUNC (free_str), s);
+		g_signal_connect (G_OBJECT(menu), "destroy",
+                                  G_CALLBACK (free_str), s);
 
 		if( !strcmp(pI->name, g_game.theme ))
-			gtk_menu_set_active(GTK_MENU(menu), i);
+			gtk_combo_box_set_active(GTK_COMBO_BOX(menu), i);
 		i++;
 	}
 }
 
-
+#define GNOME_PAD 8
 
 /**
  * @fn void preferences_activate(void)
@@ -301,38 +325,31 @@
 	GtkWidget *robot_frame;
 	GtkWidget *theme_frame_sel, *theme_vbox;
 	GtkWidget *vbox, *hbox;
-	GtkWidget *menu, *omenu;
-
-	if( pref_dialog != NULL ) {
-		gdk_window_show( pref_dialog->window);
-		gdk_window_raise( pref_dialog->window);
-		return ;
-	}
-
+	GtkWidget *omenu, *nb;
 
 	/* Theme options */
-	theme_vbox = gtk_vbox_new (FALSE, 0);
+	theme_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
 	
 	theme_frame_sel = gtk_frame_new (_("Select theme"));
-	gtk_container_border_width (GTK_CONTAINER (theme_frame_sel), GNOME_PAD);
-	omenu = gtk_option_menu_new ();
-	menu = gtk_menu_new ();
-	fill_menu (menu);
+	gtk_container_set_border_width (GTK_CONTAINER (theme_frame_sel),
+	                                GNOME_PAD);
+	omenu = gtk_combo_box_text_new ();
+	fill_menu (omenu);
 	gtk_widget_show (omenu);
-	gtk_option_menu_set_menu (GTK_OPTION_MENU(omenu), menu);
 	label = gtk_label_new (_("Select theme"));
 	gtk_widget_show (label);
 
-	hbox = gtk_hbox_new (TRUE, 0);
-	gtk_container_border_width (GTK_CONTAINER (hbox), GNOME_PAD);
+	hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
+	gtk_container_set_border_width (GTK_CONTAINER (hbox), GNOME_PAD);
 
-	gtk_box_pack_start( GTK_BOX( hbox ), label, FALSE, FALSE, 0);
-	gtk_box_pack_start( GTK_BOX( hbox ), omenu, FALSE, FALSE, 0);
+	gtk_box_pack_start( GTK_BOX( hbox ), label, TRUE, TRUE, 0);
+	gtk_box_pack_start( GTK_BOX( hbox ), omenu, TRUE, TRUE, 0);
 	gtk_container_add (GTK_CONTAINER (theme_frame_sel), hbox);
 	gtk_widget_show(theme_frame_sel);
 
 	theme_frame_prev = gtk_frame_new (_("Preview"));
-	gtk_container_border_width (GTK_CONTAINER (theme_frame_prev), GNOME_PAD);
+	gtk_container_set_border_width (GTK_CONTAINER (theme_frame_prev),
+	                                GNOME_PAD);
 	gtk_widget_show(theme_frame_prev);
 
 	load_preview(g_game.theme);
@@ -342,41 +359,36 @@
 
 	/* Message Options */
 	msg_frame = gtk_frame_new (_("Console Messages"));
-	gtk_container_border_width (GTK_CONTAINER (msg_frame), GNOME_PAD);
+	gtk_container_set_border_width (GTK_CONTAINER (msg_frame), GNOME_PAD);
 
-	vbox = gtk_vbox_new (FALSE, 0);
-	gtk_container_border_width (GTK_CONTAINER (vbox), GNOME_PAD);
+	vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
+	gtk_container_set_border_width (GTK_CONTAINER (vbox), GNOME_PAD);
 
 
 	conf_cb_showerr = gtk_check_button_new_with_label(_("Show Error Messages"));
-	GTK_TOGGLE_BUTTON(conf_cb_showerr)->active = (g_game.msg_show & M_ERR) ?1:0;
+	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(conf_cb_showerr),
+	                              (g_game.msg_show & M_ERR) ?1:0);
 	gtk_box_pack_start( GTK_BOX( vbox ), conf_cb_showerr, FALSE, FALSE, 0);
-	gtk_signal_connect (GTK_OBJECT (conf_cb_showerr), "clicked", GTK_SIGNAL_FUNC
-			(prop_box_changed_callback), NULL);
 
 	conf_cb_showimp = gtk_check_button_new_with_label(_("Show Important Messages"));
-	GTK_TOGGLE_BUTTON(conf_cb_showimp)->active = (g_game.msg_show & M_IMP) ?1:0;
+	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(conf_cb_showimp),
+	                              (g_game.msg_show & M_IMP) ?1:0);
 	gtk_box_pack_start( GTK_BOX( vbox ), conf_cb_showimp, FALSE, FALSE, 0);
-	gtk_signal_connect (GTK_OBJECT (conf_cb_showimp), "clicked", GTK_SIGNAL_FUNC
-			(prop_box_changed_callback), NULL);
 
 	conf_cb_showmsg = gtk_check_button_new_with_label(_("Show Players Messages"));
-	GTK_TOGGLE_BUTTON(conf_cb_showmsg)->active = (g_game.msg_show & M_MSG) ?1:0;
+	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(conf_cb_showmsg),
+	                              (g_game.msg_show & M_MSG) ?1:0);
 	gtk_box_pack_start( GTK_BOX( vbox ), conf_cb_showmsg, FALSE, FALSE, 0);
-	gtk_signal_connect (GTK_OBJECT (conf_cb_showmsg), "clicked", GTK_SIGNAL_FUNC
-			(prop_box_changed_callback), NULL);
 
 	conf_cb_showmsgcolor = gtk_check_button_new_with_label(_("Show Players Messages with colors"));
-	GTK_TOGGLE_BUTTON(conf_cb_showmsgcolor)->active = (gui_private.msg_show_colors & 1) ?1:0;
+	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(conf_cb_showmsgcolor),
+	                              (gui_private.msg_show_colors & 1) ?1:0);
 	gtk_box_pack_start( GTK_BOX( vbox ), conf_cb_showmsgcolor, FALSE, FALSE, 0);
-	gtk_signal_connect (GTK_OBJECT (conf_cb_showmsgcolor), "clicked", GTK_SIGNAL_FUNC
-			(prop_box_changed_callback), NULL);
 
 	conf_cb_showinf = gtk_check_button_new_with_label(_("Show Informative Messages"));
-	GTK_TOGGLE_BUTTON(conf_cb_showinf)->active = (g_game.msg_show & M_INF) ?1:0;
+	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(conf_cb_showinf),
+	                              (g_game.msg_show & M_INF) ?1:0);
 	gtk_box_pack_start( GTK_BOX( vbox ), conf_cb_showinf, FALSE, FALSE, 0);
-	gtk_signal_connect (GTK_OBJECT (conf_cb_showinf), "clicked", GTK_SIGNAL_FUNC
-			(prop_box_changed_callback), NULL);
 
 	gtk_container_add (GTK_CONTAINER (msg_frame), vbox);
 
@@ -384,88 +396,77 @@
 	/** Status options **/
 
 	sts_frame = gtk_frame_new (_("Status Of Players"));
-	gtk_container_border_width (GTK_CONTAINER (sts_frame), GNOME_PAD);
+	gtk_container_set_border_width (GTK_CONTAINER (sts_frame), GNOME_PAD);
 
-	hbox = gtk_hbox_new (TRUE, 0);
-	vbox = gtk_vbox_new (FALSE, 0);
-	gtk_container_border_width (GTK_CONTAINER (hbox), GNOME_PAD);
-	gtk_container_border_width (GTK_CONTAINER (vbox), 0);
+	hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
+	vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
+	gtk_container_set_border_width (GTK_CONTAINER (hbox), GNOME_PAD);
+	gtk_container_set_border_width (GTK_CONTAINER (vbox), 0);
 
 
 	conf_cb_stscolor = gtk_check_button_new_with_label(_("Show Color"));
-	GTK_TOGGLE_BUTTON(conf_cb_stscolor)->active = (gui_private.status_show & (1 <<STATUS_COLUMN_COLOR) ) ?1:0;
+	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(conf_cb_stscolor),
+	                              (gui_private.status_show & (1 <<STATUS_COLUMN_COLOR) ) ?1:0);
 	gtk_box_pack_start( GTK_BOX( vbox ), conf_cb_stscolor, FALSE, FALSE, 0);
-	gtk_signal_connect (GTK_OBJECT (conf_cb_stscolor), "clicked", GTK_SIGNAL_FUNC
-			(prop_box_changed_callback), NULL);
 
 
 	conf_cb_stsnumber = gtk_check_button_new_with_label(_("Show Player Number"));
-	GTK_TOGGLE_BUTTON(conf_cb_stsnumber)->active = (gui_private.status_show & (1 << STATUS_COLUMN_NUMBER) ) ?1:0;
+	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(conf_cb_stsnumber),
+	                              (gui_private.status_show & (1 << STATUS_COLUMN_NUMBER) ) ?1:0);
 	gtk_box_pack_start( GTK_BOX( vbox ), conf_cb_stsnumber, FALSE, FALSE, 0);
-	gtk_signal_connect (GTK_OBJECT (conf_cb_stsnumber), "clicked", GTK_SIGNAL_FUNC
-			(prop_box_changed_callback), NULL);
 
 
 	conf_cb_stsname = gtk_check_button_new_with_label(_("Show Name"));
-	GTK_TOGGLE_BUTTON(conf_cb_stsname)->active = (gui_private.status_show & (1 <<STATUS_COLUMN_NAME) ) ?1:0;
+	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(conf_cb_stsname),
+	                              (gui_private.status_show & (1 <<STATUS_COLUMN_NAME) ) ?1:0);
 	gtk_box_pack_start( GTK_BOX( vbox ), conf_cb_stsname, FALSE, FALSE, 0);
-	gtk_signal_connect (GTK_OBJECT (conf_cb_stsname), "clicked", GTK_SIGNAL_FUNC
-			(prop_box_changed_callback), NULL);
 
 
 	conf_cb_stsscore= gtk_check_button_new_with_label(_("Show Score"));
-	GTK_TOGGLE_BUTTON(conf_cb_stsscore)->active = (gui_private.status_show & (1 << STATUS_COLUMN_SCORE) ) ?1:0;
+	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(conf_cb_stsscore),
+	                              (gui_private.status_show & (1 << STATUS_COLUMN_SCORE) ) ?1:0);
 	gtk_box_pack_start( GTK_BOX( vbox ), conf_cb_stsscore, FALSE, FALSE, 0);
-	gtk_signal_connect (GTK_OBJECT (conf_cb_stsscore), "clicked", GTK_SIGNAL_FUNC
-			(prop_box_changed_callback), NULL);
 
 	conf_cb_stsaddress = gtk_check_button_new_with_label(_("Show IP Address"));
-	GTK_TOGGLE_BUTTON(conf_cb_stsaddress)->active = (gui_private.status_show & (1 << STATUS_COLUMN_ADDR) ) ?1:0;
+	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(conf_cb_stsaddress),
+	                              (gui_private.status_show & (1 << STATUS_COLUMN_ADDR) ) ?1:0);
 	gtk_box_pack_start( GTK_BOX( vbox ), conf_cb_stsaddress, FALSE, FALSE, 0);
-	gtk_signal_connect (GTK_OBJECT (conf_cb_stsaddress), "clicked", GTK_SIGNAL_FUNC
-			(prop_box_changed_callback), NULL);
 
 	conf_cb_stshuman= gtk_check_button_new_with_label(_("Show Human/Robot"));
-	GTK_TOGGLE_BUTTON(conf_cb_stshuman)->active = (gui_private.status_show & (1 << STATUS_COLUMN_HUMAN) ) ?1:0;
+	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(conf_cb_stshuman),
+	                              (gui_private.status_show & (1 << STATUS_COLUMN_HUMAN) ) ?1:0);
 	gtk_box_pack_start( GTK_BOX( vbox ), conf_cb_stshuman, FALSE, FALSE, 0);
-	gtk_signal_connect (GTK_OBJECT (conf_cb_stshuman), "clicked", GTK_SIGNAL_FUNC
-			(prop_box_changed_callback), NULL);
 
 	// now start the left box
 	gtk_box_pack_start ( GTK_BOX (hbox), vbox, FALSE, TRUE, 0);
-	vbox = gtk_vbox_new (FALSE, 0);
-	gtk_container_border_width (GTK_CONTAINER (vbox), 0);
+	vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
+	gtk_container_set_border_width (GTK_CONTAINER (vbox), 0);
 
 
 	conf_cb_stscountries = gtk_check_button_new_with_label(_("Show Countries"));
-	GTK_TOGGLE_BUTTON(conf_cb_stscountries)->active = (gui_private.status_show & (1 << STATUS_COLUMN_COUNTRIES) ) ?1:0;
+	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(conf_cb_stscountries),
+	                              (gui_private.status_show & (1 << STATUS_COLUMN_COUNTRIES) ) ?1:0);
 	gtk_box_pack_start( GTK_BOX( vbox ), conf_cb_stscountries, FALSE, FALSE, 0);
-	gtk_signal_connect (GTK_OBJECT (conf_cb_stscountries), "clicked", GTK_SIGNAL_FUNC
-			(prop_box_changed_callback), NULL);
 
 	conf_cb_stsarmies = gtk_check_button_new_with_label(_("Show Armies"));
-	GTK_TOGGLE_BUTTON(conf_cb_stsarmies)->active = (gui_private.status_show & (1 << STATUS_COLUMN_ARMIES) ) ?1:0;
+	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(conf_cb_stsarmies),
+	                              (gui_private.status_show & (1 << STATUS_COLUMN_ARMIES) ) ?1:0);
 	gtk_box_pack_start( GTK_BOX( vbox ), conf_cb_stsarmies, FALSE, FALSE, 0);
-	gtk_signal_connect (GTK_OBJECT (conf_cb_stsarmies), "clicked", GTK_SIGNAL_FUNC
-			(prop_box_changed_callback), NULL);
 
 	conf_cb_stscards = gtk_check_button_new_with_label(_("Show Cards"));
-	GTK_TOGGLE_BUTTON(conf_cb_stscards)->active = (gui_private.status_show & (1 << STATUS_COLUMN_CARDS) ) ?1:0;
+	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(conf_cb_stscards),
+	                              (gui_private.status_show & (1 << STATUS_COLUMN_CARDS) ) ?1:0);
 	gtk_box_pack_start( GTK_BOX( vbox ), conf_cb_stscards, FALSE, FALSE, 0);
-	gtk_signal_connect (GTK_OBJECT (conf_cb_stscards), "clicked", GTK_SIGNAL_FUNC
-			(prop_box_changed_callback), NULL);
 
 	conf_cb_stsstatus = gtk_check_button_new_with_label(_("Show Status"));
-	GTK_TOGGLE_BUTTON(conf_cb_stsstatus)->active = (gui_private.status_show & (1 << STATUS_COLUMN_STATUS) ) ?1:0;
+	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(conf_cb_stsstatus),
+	                              (gui_private.status_show & (1 << STATUS_COLUMN_STATUS) ) ?1:0);
 	gtk_box_pack_start( GTK_BOX( vbox ), conf_cb_stsstatus, FALSE, FALSE, 0);
-	gtk_signal_connect (GTK_OBJECT (conf_cb_stsstatus), "clicked", GTK_SIGNAL_FUNC
-			(prop_box_changed_callback), NULL);
 
 	conf_cb_stswho = gtk_check_button_new_with_label(_("Show Who Started"));
-	GTK_TOGGLE_BUTTON(conf_cb_stswho)->active = ( gui_private.status_show & (1<<STATUS_COLUMN_WHO) ) ?1:0;
+	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(conf_cb_stswho),
+	                              ( gui_private.status_show & (1<<STATUS_COLUMN_WHO) ) ?1:0);
 	gtk_box_pack_start( GTK_BOX( vbox ), conf_cb_stswho, FALSE, FALSE, 0);
-	gtk_signal_connect (GTK_OBJECT (conf_cb_stswho), "clicked", GTK_SIGNAL_FUNC
-			(prop_box_changed_callback), NULL);
 
 	/* hbox contains two vboxes which contain the buttons/labels */
 	gtk_box_pack_start ( GTK_BOX (hbox), vbox, FALSE, TRUE, 0);
@@ -476,24 +477,20 @@
 	/* Robot Options */
 
 	robot_frame = gtk_frame_new (_("Launch Robot"));
-	gtk_container_border_width (GTK_CONTAINER (robot_frame), GNOME_PAD);
+	gtk_container_set_border_width (GTK_CONTAINER (robot_frame), GNOME_PAD);
 
-	vbox = gtk_vbox_new (FALSE, 0);
-	gtk_container_border_width (GTK_CONTAINER (vbox), GNOME_PAD);
+	vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
+	gtk_container_set_border_width (GTK_CONTAINER (vbox), GNOME_PAD);
 
 	conf_cb_robotserver = gtk_radio_button_new_with_label ( NULL, 
 			_("Starts the robots in the server (faster)"));
 	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (conf_cb_robotserver), g_game.robot_in_server );
 	gtk_box_pack_start( GTK_BOX(vbox), conf_cb_robotserver, FALSE, FALSE, 0);
-	gtk_signal_connect (GTK_OBJECT (conf_cb_robotserver), "clicked",
-			GTK_SIGNAL_FUNC(prop_box_changed_callback), NULL);
 
 	conf_cb_robotclient = gtk_radio_button_new_with_label_from_widget( GTK_RADIO_BUTTON(conf_cb_robotserver),
 			_("Starts the robots in the client (preserves localization)"));
 	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (conf_cb_robotclient), ! g_game.robot_in_server );
 	gtk_box_pack_start( GTK_BOX(vbox), conf_cb_robotclient, FALSE, FALSE, 0);
-	gtk_signal_connect (GTK_OBJECT (conf_cb_robotclient), "clicked",
-			GTK_SIGNAL_FUNC(prop_box_changed_callback), NULL);
 
 
 	gtk_container_add (GTK_CONTAINER (robot_frame), vbox);
@@ -501,73 +498,70 @@
 
 	/* Dialogs Options */
 	dialog_frame = gtk_frame_new (_("Popup Dialogs"));
-	gtk_container_border_width (GTK_CONTAINER (dialog_frame), GNOME_PAD);
+	gtk_container_set_border_width (GTK_CONTAINER (dialog_frame), GNOME_PAD);
 
-	vbox = gtk_vbox_new (FALSE, 0);
-	gtk_container_border_width (GTK_CONTAINER (vbox), GNOME_PAD);
+	vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
+	gtk_container_set_border_width (GTK_CONTAINER (vbox), GNOME_PAD);
 
 	conf_cb_showattackturn = gtk_check_button_new_with_label (_("Show 'your turn for attack' dialog"));
-	GTK_TOGGLE_BUTTON(conf_cb_showattackturn)->active =
-		( gui_private.dialog_show & (1<<DIALOG_ATTACK_TURN) ) ?1:0;
+	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(conf_cb_showattackturn),
+	                              ( gui_private.dialog_show & (1<<DIALOG_ATTACK_TURN) ) ?1:0);
 	gtk_box_pack_start( GTK_BOX(vbox), conf_cb_showattackturn, FALSE, FALSE, 0);
-	gtk_signal_connect (GTK_OBJECT (conf_cb_showattackturn), "clicked",
-			GTK_SIGNAL_FUNC(prop_box_changed_callback), NULL);
 
 	conf_cb_showregrouparmies = gtk_check_button_new_with_label (_("Show 'regroup your armies' dialog"));
-	GTK_TOGGLE_BUTTON(conf_cb_showregrouparmies)->active =
-		( gui_private.dialog_show & (1<<DIALOG_REGROUP_ARMIES) ) ?1:0;
+	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(conf_cb_showregrouparmies),
+	                              ( gui_private.dialog_show & (1<<DIALOG_REGROUP_ARMIES) ) ?1:0);
 	gtk_box_pack_start( GTK_BOX(vbox), conf_cb_showregrouparmies, FALSE, FALSE, 0);
-	gtk_signal_connect (GTK_OBJECT (conf_cb_showregrouparmies), "clicked",
-			GTK_SIGNAL_FUNC(prop_box_changed_callback), NULL);
 
 	conf_cb_showplacearmies = gtk_check_button_new_with_label (_("Show 'place your armies' dialog"));
-	GTK_TOGGLE_BUTTON(conf_cb_showplacearmies)->active =
-		( gui_private.dialog_show & (1<<DIALOG_PLACE_ARMIES) ) ?1:0;
+	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(conf_cb_showplacearmies),
+	                              ( gui_private.dialog_show & (1<<DIALOG_PLACE_ARMIES) ) ?1:0);
 	gtk_box_pack_start( GTK_BOX(vbox), conf_cb_showplacearmies, FALSE, FALSE, 0);
-	gtk_signal_connect (GTK_OBJECT (conf_cb_showplacearmies), "clicked",
-			GTK_SIGNAL_FUNC(prop_box_changed_callback), NULL);
 
 	gtk_container_add (GTK_CONTAINER (dialog_frame), vbox);
 
 
 	/** end **/
 
-	pref_dialog = gnome_property_box_new ();
-	gnome_dialog_set_parent (GNOME_DIALOG (pref_dialog),
-			GTK_WINDOW (main_window));
-	gtk_window_set_title (GTK_WINDOW (pref_dialog),
-			_("TEG Preferences"));
-	gtk_signal_connect (GTK_OBJECT (pref_dialog), "destroy",
-			GTK_SIGNAL_FUNC (gtk_widget_destroyed), &pref_dialog);
-
+	pref_dialog = gtk_dialog_new_with_buttons (_("TEG Preferences"),
+	                                           GTK_WINDOW (main_window),
+	                                           GTK_DIALOG_DESTROY_WITH_PARENT,
+	                                           _("_OK"),
+	                                           GTK_RESPONSE_ACCEPT,
+	                                           _("_Cancel"),
+	                                           GTK_RESPONSE_REJECT,
+	                                           NULL);
+
+	nb = gtk_notebook_new ();
+	gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area
+	                                  (GTK_DIALOG (pref_dialog))), nb);
 
 	label = gtk_label_new (_("Themes"));
-	gnome_property_box_append_page (GNOME_PROPERTY_BOX (pref_dialog),
+	gtk_notebook_append_page (GTK_NOTEBOOK (nb),
 			theme_vbox, label);
 
 	label = gtk_label_new (_("Console Messages"));
-	gnome_property_box_append_page (GNOME_PROPERTY_BOX (pref_dialog),
+	gtk_notebook_append_page (GTK_NOTEBOOK (nb),
 			msg_frame, label);
 
 	label = gtk_label_new (_("Status Of Players"));
-	gnome_property_box_append_page (GNOME_PROPERTY_BOX (pref_dialog),
+	gtk_notebook_append_page (GTK_NOTEBOOK (nb),
 			sts_frame, label);
 
 	label = gtk_label_new (_("Robot"));
-	gnome_property_box_append_page (GNOME_PROPERTY_BOX (pref_dialog),
+	gtk_notebook_append_page (GTK_NOTEBOOK (nb),
 			robot_frame, label);
 
 	label = gtk_label_new (_("Popup Dialogs"));
-	gnome_property_box_append_page (GNOME_PROPERTY_BOX (pref_dialog),
+	gtk_notebook_append_page (GTK_NOTEBOOK (nb),
 			dialog_frame, label);
 
 
 
-	gtk_signal_connect (GTK_OBJECT (pref_dialog), "apply", GTK_SIGNAL_FUNC
+	g_signal_connect (G_OBJECT (pref_dialog), "response", G_CALLBACK
 			(apply_cb), NULL);
 
-	if (!GTK_WIDGET_VISIBLE (pref_dialog))
-		gtk_widget_show_all (pref_dialog);
-	else
-		gtk_widget_destroy (pref_dialog);
+	gtk_widget_show_all (pref_dialog);
+	gtk_dialog_run (GTK_DIALOG (pref_dialog));
+	gtk_widget_destroy (pref_dialog);
 }
--- teg-0.11.2+debian.orig/client/gui-gnome/g_scores.c
+++ teg-0.11.2+debian/client/gui-gnome/g_scores.c
@@ -26,7 +26,8 @@
 #endif
 
 #include <assert.h>
-#include <gnome.h>
+#include <gtk/gtk.h>
+#include <glib/gi18n.h>
 
 #include "gui.h"
 #include "client.h"
@@ -40,6 +41,7 @@
 
 
 static GtkWidget *gui_scores_dialog=NULL;
+static GtkListStore *store=NULL;
 
 enum {
 	COLUMN_POSNUMBER,
@@ -54,18 +56,10 @@
 
 #define S_CLIST_MAX 100
 
-static gint boton_clicked_refresh(GtkWidget *area, GdkEventExpose *event, gpointer user_data)
-{
-	out_scores();
-	return FALSE;
-}
-
 
-static GtkTreeModel *
+static GtkListStore *
 scores_create_model (void)
 {
-	GtkListStore *store;
-
 	/* create list store */
 	store = gtk_list_store_new (
 			COLUMN_LAST,
@@ -76,7 +70,7 @@
 			G_TYPE_STRING,
 			G_TYPE_BOOLEAN);
 
-	return GTK_TREE_MODEL (store);
+	return store;
 }
 
 static void scores_add_columns (GtkTreeView *treeview)
@@ -141,51 +135,68 @@
 /*
  * helper funcion used by mini_scores & big score
  */
-static TEG_STATUS paint_color( GtkWidget *dialog, int color, GdkPixmap **pixmap )
+static TEG_STATUS paint_color( GtkWidget *dialog, int color, GdkPixbuf **pixmap )
 {
-	int i, h, w;
+	GdkWindow *window;
+	PangoLayout *layout;
+	PangoAttrList *list;
+	PangoAttribute *attr;
+	cairo_surface_t *surface;
+	cairo_t *cr;
+	int i, width;
 
 	assert( pixmap );
 
 	i = (color<0 || color>=TEG_MAX_PLAYERS) ? TEG_MAX_PLAYERS : color;
 
-	*pixmap = gdk_pixmap_new( dialog->window,
-		48, 16, gtk_widget_get_visual( dialog)->depth);
-
-	if( *pixmap == NULL )
-		return TEG_STATUS_ERROR;
-
-	gdk_gc_set_foreground(g_colors_gc, colors_get_player_from_color(color));
-	gdk_draw_rectangle( *pixmap, g_colors_gc, TRUE, 0, 0, 47, 15);
-
-	gdk_gc_set_foreground(g_colors_gc, colors_get_common(COLORS_BLACK));
-	gdk_draw_rectangle( *pixmap, g_colors_gc, FALSE, 0, 0, 47, 15);
-
-	gdk_gc_set_foreground(g_colors_gc, colors_get_player_ink_from_color(color));
+	window = gtk_widget_get_window (dialog);
+	surface = gdk_window_create_similar_image_surface (window,
+	                                                   CAIRO_FORMAT_ARGB32,
+	                                                   48, 16, 0);
+
+	cr = cairo_create (surface);
+	gdk_cairo_set_source_rgba (cr, colors_get_player_from_color(color));
+	cairo_rectangle (cr, 0, 0, 47, 15);
+	cairo_fill (cr);
+	cairo_paint (cr);
+
+	gdk_cairo_set_source_rgba (cr, colors_get_common(COLORS_BLACK));
+	cairo_rectangle(cr, 0, 0, 47, 15);
+	cairo_stroke (cr);
+
+	gdk_cairo_set_source_rgba (cr,
+	                           colors_get_player_ink_from_color(color));
+
+	layout = pango_cairo_create_layout (cr);
+	list = pango_attr_list_new ();
+	attr = pango_attr_size_new_absolute (10 * PANGO_SCALE);
+	pango_attr_list_insert (list, attr);
+	pango_layout_set_attributes (layout, list);
+	pango_layout_set_text (layout, _(g_colores[i]), -1);
+	pango_layout_get_size (layout, &width, NULL);
+	cairo_move_to (cr, (47 - width / PANGO_SCALE) / 2, 0);
+	pango_cairo_show_layout (cr, layout);
+
+	*pixmap = gdk_pixbuf_get_from_surface (surface, 0, 0, 47, 15);
+
+	pango_attr_list_unref (list);
+	g_object_unref (layout);
+	cairo_destroy (cr);
+	cairo_surface_destroy (surface);
 
-
-	h = gdk_string_height (g_pixmap_font10, _(g_colores[i]) );
-	w = gdk_string_width	(g_pixmap_font10, _(g_colores[i]) );
-
-	gdk_draw_string( *pixmap, g_pixmap_font10, g_colors_gc, 
-			((48 - w )/2),
-			((16 - h)/2) + h, _(g_colores[i]));
 	return TEG_STATUS_SUCCESS;
 }
 
 
-static TEG_STATUS scores_update_model( GtkTreeModel *model)
+static TEG_STATUS scores_update_model( GtkListStore *store)
 {
 	PSCORES pS;
 	int row;
-	GtkListStore *store;
 	GtkTreeIter iter;
 	PLIST_ENTRY list = scores_get_list();
 	PLIST_ENTRY l = list->Flink;
 
 
-	store = GTK_LIST_STORE( model );
-
 	gtk_list_store_clear( store );
 
 	row = 0;
@@ -219,32 +230,33 @@
 static TEG_STATUS scores_update_dialog()
 {
 	static GtkWidget *scores_treeview=NULL;
-	static GtkTreeModel *model = NULL;
 
 	if( gui_scores_dialog == NULL )
 		return TEG_STATUS_ERROR;
 
 
-	if( scores_treeview == NULL ) {
+	if ( !GTK_IS_WIDGET(scores_treeview) ) {
 
 		/* create tree model */
-		model = scores_create_model ();
+	        if ( !store )
+	                store = scores_create_model ();
 
 		/* create tree view */
-		scores_treeview = gtk_tree_view_new_with_model (model);
-		gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (scores_treeview), TRUE);
+	        scores_treeview = gtk_tree_view_new_with_model (GTK_TREE_MODEL
+	                                                        (store));
 		gtk_tree_view_set_search_column (GTK_TREE_VIEW (scores_treeview),
 				COLUMN_SCORE);
 
-		g_object_unref (G_OBJECT (model)); 
-		gtk_box_pack_start_defaults( GTK_BOX(GNOME_DIALOG(gui_scores_dialog)->vbox), GTK_WIDGET(scores_treeview));
+	        gtk_box_pack_start(GTK_BOX(gtk_dialog_get_content_area
+	                                   (GTK_DIALOG(gui_scores_dialog))),
+	                           GTK_WIDGET(scores_treeview), TRUE, TRUE, 0);
 
 		/* add columns to the tree view */
 		scores_add_columns (GTK_TREE_VIEW (scores_treeview));
 
 	}
 
-	scores_update_model( model );
+	scores_update_model( store );
 
 	gtk_widget_show_all( scores_treeview );
 	return TEG_STATUS_SUCCESS;
@@ -255,26 +267,24 @@
 	if( gui_scores_dialog == NULL) {
 
 		gui_scores_dialog = teg_dialog_new(_("High Scores"),_("High Scores")); 
-		gnome_dialog_append_buttons(GNOME_DIALOG(gui_scores_dialog),
-				GNOME_STOCK_PIXMAP_REFRESH,
-				GNOME_STOCK_BUTTON_CLOSE,
+		gtk_dialog_add_buttons(GTK_DIALOG(gui_scores_dialog),
+                                       _("_Refresh"), 0,
+                                       _("_Close"), 1,
 				NULL );
-		gnome_dialog_close_hides( GNOME_DIALOG(gui_scores_dialog), TRUE );
-		gnome_dialog_set_default(GNOME_DIALOG(gui_scores_dialog),1);
 
-		/* signals de los botones */
-		gnome_dialog_button_connect (GNOME_DIALOG(gui_scores_dialog),
-						0, GTK_SIGNAL_FUNC(boton_clicked_refresh),gui_scores_dialog);
-		gnome_dialog_button_connect (GNOME_DIALOG(gui_scores_dialog),
-						1, GTK_SIGNAL_FUNC(dialog_close), gui_scores_dialog );
+		gtk_dialog_set_default_response(GTK_DIALOG(gui_scores_dialog),1);
 
-		gnome_dialog_set_default( GNOME_DIALOG(gui_scores_dialog),1);
 	}
 
 	scores_update_dialog();
 
-	gtk_widget_show_all( gui_scores_dialog);
-	raise_and_focus( gui_scores_dialog);
+	if (gtk_dialog_run (GTK_DIALOG (gui_scores_dialog)) == 0)
+	        out_scores ();
+
+	if (GTK_IS_WIDGET(gui_scores_dialog)) {
+	        gtk_widget_destroy (gui_scores_dialog);
+	        gui_scores_dialog = NULL;
+	}
 }
 
 
@@ -291,67 +301,88 @@
 
 	MINISCORE_CLIST_LAST
 };
-static TEG_STATUS update_mini_clist( GtkWidget *dialog, GtkWidget *clist )
+static TEG_STATUS update_mini_clist( GtkWidget *dialog, GtkListStore *store,
+                                     GtkWidget *clist )
 {
 	PLIST_ENTRY list = &g_list_player;
 	PLIST_ENTRY l = list->Flink;
 	PCPLAYER pJ;
-	char clist_text[MINISCORE_CLIST_LAST][S_CLIST_MAX];
-	char *clist_texts[MINISCORE_CLIST_LAST];
-	int i, row;
-	GdkPixmap *pixmap;
-
-	gtk_clist_freeze(GTK_CLIST(clist));
-
-	for(i=0;i<MINISCORE_CLIST_LAST;i++) {
-		clist_texts[i] = clist_text[i];
-		memset( clist_text[i],0,S_CLIST_MAX);
-	}
+	int row;
+	GdkPixbuf *pixmap;
+	GtkTreeIter iter;
 
 	row = 0;
 	while( !IsListEmpty( list )&& (l != list ) )
 	{
-		gchar *name;
+	        gchar *name, *score;
 
 		pJ = (PCPLAYER) l;
 
 		name = translate_to_utf8( pJ->name );
+	        score = g_strdup_printf ("%d", pJ->score);
 
-		snprintf(clist_texts[MINISCORE_CLIST_NAME],S_CLIST_MAX-1,"%s",name);
-		snprintf(clist_texts[MINISCORE_CLIST_SCORE],S_CLIST_MAX-1,"%d",pJ->score);
-
+	        gtk_list_store_append (store, &iter);
+	        gtk_list_store_set (store, &iter,
+	                            MINISCORE_CLIST_NAME, name,
+	                            MINISCORE_CLIST_SCORE, score, -1);
 		free( name );
+	        g_free( score );
 
-		gtk_clist_append (GTK_CLIST (clist), clist_texts);
+	        paint_color( dialog, pJ->color, &pixmap );
 
-		if( paint_color( dialog, pJ->color, &pixmap ) == TEG_STATUS_SUCCESS )
-			gtk_clist_set_pixmap(GTK_CLIST(clist), row, MINISCORE_CLIST_COLOR, pixmap, NULL);
+	        gtk_list_store_set (store, &iter, MINISCORE_CLIST_COLOR,
+	                            pixmap, -1);
+	        g_object_unref (pixmap);
 
 		l = LIST_NEXT(l);
 		row ++;
 	}
-	gtk_clist_thaw(GTK_CLIST(clist));
 
 	return TEG_STATUS_SUCCESS;
 }
 
 void gui_scores_embed( GtkWidget *frame )
 {
-	int i;
 	static GtkWidget *mini_scores_clist=NULL;
-	char *titles[MINISCORE_CLIST_LAST] = {
-		_("Name"), _("Score"), _("Color"),
-	};
-
-	mini_scores_clist = gtk_clist_new_with_titles (MINISCORE_CLIST_LAST, titles);
-
-	gtk_clist_set_selection_mode (GTK_CLIST (mini_scores_clist), GTK_SELECTION_EXTENDED);
-	for (i = 0; i < MINISCORE_CLIST_LAST; i++) {
-		gtk_clist_set_column_justification (GTK_CLIST (mini_scores_clist), i, GTK_JUSTIFY_CENTER);
-		gtk_clist_set_column_auto_resize (GTK_CLIST (mini_scores_clist), i, TRUE);
-	}
+	GtkListStore *store = NULL;
+	GtkCellRenderer *renderer;
+	GtkTreeViewColumn *name, *score, *color;
 
-	update_mini_clist( frame, mini_scores_clist );
+	store = gtk_list_store_new (MINISCORE_CLIST_LAST, G_TYPE_STRING,
+	                            G_TYPE_STRING, G_TYPE_OBJECT);
+	mini_scores_clist = gtk_tree_view_new_with_model (GTK_TREE_MODEL
+	                                                  (store));
+
+	gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (mini_scores_clist),
+	                                   TRUE);
+
+	renderer = gtk_cell_renderer_text_new ();
+	g_object_set (renderer, "xalign", 0.5, NULL);
+	name = gtk_tree_view_column_new_with_attributes (_("Name"), renderer,
+	                                                 "text",
+	                                                 MINISCORE_CLIST_NAME,
+	                                                 NULL);
+	gtk_tree_view_column_set_alignment (name, 0.5);
+	gtk_tree_view_append_column (GTK_TREE_VIEW (mini_scores_clist), name);
+
+	score = gtk_tree_view_column_new_with_attributes (_("Score"), renderer,
+	                                                  "text",
+	                                                  MINISCORE_CLIST_SCORE,
+	                                                  NULL);
+	gtk_tree_view_column_set_alignment (score, 0.5);
+	gtk_tree_view_append_column (GTK_TREE_VIEW (mini_scores_clist), score);
+
+	renderer = gtk_cell_renderer_pixbuf_new ();
+	color = gtk_tree_view_column_new_with_attributes (_("Color"), renderer,
+	                                                  "pixbuf",
+	                                                  MINISCORE_CLIST_COLOR,
+	                                                  NULL);
+	gtk_tree_view_column_set_alignment (color, 0.5);
+	gtk_tree_view_append_column (GTK_TREE_VIEW (mini_scores_clist), color);
+
+	update_mini_clist( frame, store, mini_scores_clist );
+	gtk_widget_show (mini_scores_clist);
+	gtk_tree_view_columns_autosize (GTK_TREE_VIEW (mini_scores_clist));
 
 	gtk_container_add (GTK_CONTAINER (frame),GTK_WIDGET(mini_scores_clist));
 }
--- teg-0.11.2+debian.orig/client/gui-gnome/locate_country.c
+++ teg-0.11.2+debian/client/gui-gnome/locate_country.c
@@ -24,7 +24,7 @@
 #  include <config.h>
 #endif
 
-#include <gnome.h>
+#include <goocanvas.h>
 #include <assert.h>
 
 #include "gui.h"
@@ -71,14 +71,14 @@
 
 		if( list_locate_countries[i].is_hidden ) {
 			list_locate_countries[i].is_hidden = FALSE;
-			gnome_canvas_item_show( G_countries[ list_locate_countries[i].country ].country_item );
+	                g_object_set( G_countries[ list_locate_countries[i].country ].country_item, "visibility", TRUE, NULL );
 
 			if( ++list_locate_countries[i].number_times_refreshed == MAX_REFRESHES_COUNTRY ) {
 				locate_country_init_entry( &list_locate_countries[i] );
 			}
 		} else {
 			list_locate_countries[i].is_hidden = TRUE;
-			gnome_canvas_item_hide( G_countries[ list_locate_countries[i].country ].country_item );
+	                g_object_set( G_countries[ list_locate_countries[i].country ].country_item, "visibility", FALSE, NULL );
 		}
 
 	}
@@ -91,16 +91,16 @@
 
 		if( list_locate_armies[i].is_hidden ) {
 			list_locate_armies[i].is_hidden = FALSE;
-			gnome_canvas_item_show( G_countries[ list_locate_armies[i].country ].ellip_item );
-			gnome_canvas_item_show( G_countries[ list_locate_armies[i].country ].text_item );
+	                g_object_set( G_countries[ list_locate_armies[i].country ].ellip_item, "visibility", TRUE, NULL );
+	                g_object_set( G_countries[ list_locate_armies[i].country ].text_item, "visibility", TRUE, NULL );
 
 			if( ++list_locate_armies[i].number_times_refreshed == MAX_REFRESHES_ARMY ) {
 				locate_country_init_entry( &list_locate_armies[i] );
 			}
 		} else {
 			list_locate_armies[i].is_hidden = TRUE;
-			gnome_canvas_item_hide( G_countries[ list_locate_armies[i].country ].ellip_item );
-			gnome_canvas_item_hide( G_countries[ list_locate_armies[i].country ].text_item );
+	                g_object_set( G_countries[ list_locate_armies[i].country ].ellip_item, "visibility", FALSE, NULL );
+	                g_object_set( G_countries[ list_locate_armies[i].country ].text_item, "visibility", FALSE, NULL );
 		}
 
 	}
@@ -111,7 +111,7 @@
 TEG_STATUS locate_country_init()
 {
 	int i;
-	timeout_id = gtk_timeout_add( 300, timeout_cb, NULL );
+	timeout_id = g_timeout_add( 300, timeout_cb, NULL );
 
 	for(i=0;i<MAX_LOCATE_COUNTRIES;i++)
 	{
@@ -126,7 +126,7 @@
 TEG_STATUS locate_country_exit()
 {
 	if( timeout_id >= 0 )
-		gtk_timeout_remove( timeout_id );
+		g_source_remove( timeout_id );
 
 	return TEG_STATUS_SUCCESS;
 }
--- /dev/null
+++ teg-0.11.2+debian/client/gui-gnome/tegcanvasimage.c
@@ -0,0 +1,696 @@
+/*
+ * GooCanvas. Copyright (C) 2005 Damon Chaplin.
+ * Released under the GNU LGPL license. See COPYING for details.
+ */
+
+#include <glib/gi18n.h>
+#include "tegcanvasimage.h"
+
+typedef struct _TegCanvasImagePrivate TegCanvasImagePrivate;
+struct _TegCanvasImagePrivate {
+  gboolean scale_to_fit;
+  gdouble alpha;
+  gdouble scale_to_units;
+};
+
+#define TEG_CANVAS_IMAGE_GET_PRIVATE(image) \
+  (G_TYPE_INSTANCE_GET_PRIVATE ((image), TEG_TYPE_CANVAS_IMAGE, \
+                                TegCanvasImagePrivate))
+#define TEG_CANVAS_IMAGE_MODEL_GET_PRIVATE(image) \
+  (G_TYPE_INSTANCE_GET_PRIVATE ((image), TEG_TYPE_CANVAS_IMAGE_MODEL, \
+                                TegCanvasImagePrivate))
+
+enum {
+  PROP_0,
+
+  PROP_PATTERN,
+  PROP_X,
+  PROP_Y,
+  PROP_WIDTH,
+  PROP_HEIGHT,
+  PROP_SCALE_TO_FIT,
+  PROP_ALPHA,
+
+  PROP_PIXBUF
+};
+
+static void
+teg_canvas_image_dispose (GObject *object);
+static void
+teg_canvas_image_finalize (GObject *object);
+static void
+canvas_item_interface_init (GooCanvasItemIface *iface);
+static void
+teg_canvas_image_get_property (GObject    *object,
+                               guint       param_id,
+                               GValue     *value,
+                               GParamSpec *pspec);
+static void
+teg_canvas_image_set_property (GObject      *object,
+                               guint         param_id,
+                               const GValue *value,
+                               GParamSpec   *pspec);
+
+G_DEFINE_TYPE_WITH_CODE (TegCanvasImage, teg_canvas_image,
+                         GOO_TYPE_CANVAS_ITEM_SIMPLE,
+                         G_IMPLEMENT_INTERFACE (GOO_TYPE_CANVAS_ITEM,
+                                                canvas_item_interface_init))
+
+static void
+teg_canvas_image_install_common_properties (GObjectClass *gobject_class)
+{
+  g_object_class_install_property (gobject_class, PROP_PATTERN,
+                                   g_param_spec_boxed ("pattern",
+                                                       _("Pattern"),
+                                                       _("The cairo pattern "
+                                                         "to paint"),
+                                                       GOO_TYPE_CAIRO_PATTERN,
+                                                       G_PARAM_READWRITE));
+
+  g_object_class_install_property (gobject_class, PROP_X,
+                                   g_param_spec_double ("x",
+                                                        "X",
+                                                        _("The x coordinate "
+                                                          "of the image"),
+                                                        -G_MAXDOUBLE,
+                                                        G_MAXDOUBLE, 0.0,
+                                                        G_PARAM_READWRITE));
+
+  g_object_class_install_property (gobject_class, PROP_Y,
+                                   g_param_spec_double ("y",
+                                                        "Y",
+                                                        _("The y coordinate "
+                                                          "of the image"),
+                                                        -G_MAXDOUBLE,
+                                                        G_MAXDOUBLE, 0.0,
+                                                        G_PARAM_READWRITE));
+
+  g_object_class_install_property (gobject_class, PROP_WIDTH,
+                                   g_param_spec_double ("width",
+                                                        _("Width"),
+                                                        _("The width of the "
+                                                          "image"),
+                                                        0.0, G_MAXDOUBLE, 0.0,
+                                                        G_PARAM_READWRITE));
+
+  g_object_class_install_property (gobject_class, PROP_HEIGHT,
+                                   g_param_spec_double ("height",
+                                                        _("Height"),
+                                                        _("The height of the "
+                                                          "image"),
+                                                        0.0, G_MAXDOUBLE, 0.0,
+                                                        G_PARAM_READWRITE));
+
+  g_object_class_install_property (gobject_class, PROP_SCALE_TO_FIT,
+                                   g_param_spec_boolean ("scale-to-fit",
+                                                         _("Scale To Fit"),
+                                                         _("If the image is "
+                                                           "scaled to fit the "
+                                                           "width and height "
+                                                           "settings"),
+                                                         FALSE,
+                                                         G_PARAM_READWRITE));
+
+  g_object_class_install_property (gobject_class, PROP_ALPHA,
+                                   g_param_spec_double ("alpha",
+                                                        _("Alpha"),
+                                                        _("The opacity of the "
+                                                          "image, 0.0 is fully"
+                                                          " transparent, and "
+                                                          "1.0 is opaque."),
+                                                        0.0, 1.0, 1.0,
+                                                        G_PARAM_READWRITE));
+
+  g_object_class_install_property (gobject_class, PROP_PIXBUF,
+                                   g_param_spec_object ("pixbuf",
+                                                        _("Pixbuf"),
+                                                        _("The GdkPixbuf to "
+                                                          "display"),
+                                                        GDK_TYPE_PIXBUF,
+                                                        G_PARAM_WRITABLE));
+}
+
+/* Gets the private data to use, from the model or from the item itself. */
+static TegCanvasImagePrivate*
+teg_canvas_image_get_private (gpointer object)
+{
+  GooCanvasItemSimple *simple;
+
+  if (TEG_IS_CANVAS_IMAGE (object))
+    {
+      simple = (GooCanvasItemSimple*) object;
+      if (simple->model)
+        return TEG_CANVAS_IMAGE_MODEL_GET_PRIVATE (simple->model);
+      else
+        return TEG_CANVAS_IMAGE_GET_PRIVATE (object);
+    }
+  else
+    return TEG_CANVAS_IMAGE_MODEL_GET_PRIVATE (object);
+}
+
+
+static void
+teg_canvas_image_init (TegCanvasImage *image)
+{
+  TegCanvasImagePrivate *priv = TEG_CANVAS_IMAGE_GET_PRIVATE (image);
+
+  image->image_data = g_slice_new0 (TegCanvasImageData);
+
+  priv->alpha = 1.0;
+}
+
+/*
+ * Convert the width and height to the canvas's units, from the
+ * pixbuf's size in pixels.
+ */
+static void
+teg_canvas_image_convert_pixbuf_sizes (GooCanvasItem *item,
+                                       TegCanvasImageData *image_data)
+{
+  TegCanvasImagePrivate *priv = teg_canvas_image_get_private (item);
+
+  const double original_width = image_data->width;
+
+  GooCanvas *canvas = goo_canvas_item_get_canvas (item);
+  if (canvas)
+    {
+      goo_canvas_convert_units_from_pixels (canvas,
+                                            &(image_data->width),
+                                            &(image_data->height));
+    }
+
+  if(image_data->width) /* Avoid division by zero. */
+    priv->scale_to_units = original_width / image_data->width;
+  else
+    priv->scale_to_units = 1.0f;
+}
+
+GooCanvasItem*
+teg_canvas_image_new (GooCanvasItem *parent,
+                      GdkPixbuf     *pixbuf,
+                      gdouble        x,
+                      gdouble        y,
+                      ...)
+{
+  GooCanvasItem *item;
+  TegCanvasImage *image;
+  TegCanvasImageData *image_data;
+  const char *first_property;
+  va_list var_args;
+
+  item = g_object_new (TEG_TYPE_CANVAS_IMAGE, NULL);
+
+  /* Put it in the parent first because other property setters might need
+   * access to the parent.
+   */
+  if (parent)
+    {
+      goo_canvas_item_add_child (parent, item, -1);
+      g_object_unref (item);
+    }
+
+  image = (TegCanvasImage*) item;
+
+  image_data = image->image_data;
+  image_data->x = x;
+  image_data->y = y;
+
+  if (pixbuf)
+    {
+      image_data->pattern = goo_canvas_cairo_pattern_from_pixbuf (pixbuf);
+      image_data->pixbuf = gdk_pixbuf_copy (pixbuf);
+      image_data->width = gdk_pixbuf_get_width (pixbuf);
+      image_data->height = gdk_pixbuf_get_height (pixbuf);
+
+      teg_canvas_image_convert_pixbuf_sizes (item, image_data);
+    }
+
+  va_start (var_args, y);
+  first_property = va_arg (var_args, char*);
+  if (first_property)
+    g_object_set_valist ((GObject*) item, first_property, var_args);
+  va_end (var_args);
+
+  return item;
+}
+
+static void
+teg_canvas_image_dispose (GObject *object)
+{
+  GooCanvasItemSimple *simple = (GooCanvasItemSimple*) object;
+  TegCanvasImage *image = (TegCanvasImage*) object;
+
+  if (!simple->model)
+    {
+      cairo_pattern_destroy (image->image_data->pattern);
+      image->image_data->pattern = NULL;
+      g_object_unref (image->image_data->pixbuf);
+      image->image_data->pixbuf = NULL;
+    }
+
+  G_OBJECT_CLASS (teg_canvas_image_parent_class)->dispose (object);
+}
+
+static void
+teg_canvas_image_finalize (GObject *object)
+{
+  GooCanvasItemSimple *simple = (GooCanvasItemSimple*) object;
+  TegCanvasImage *image = (TegCanvasImage*) object;
+
+  /* Free our data if we didn't have a model. (If we had a model it would
+     have been reset in dispose() and simple_data will be NULL.) */
+  if (simple->simple_data)
+    g_slice_free (TegCanvasImageData, image->image_data);
+  image->image_data = NULL;
+
+  G_OBJECT_CLASS (teg_canvas_image_parent_class)->finalize (object);
+}
+
+static void
+teg_canvas_image_get_common_property (GObject            *object,
+                                      TegCanvasImageData *image_data,
+                                      guint               prop_id,
+                                      GValue             *value,
+                                      GParamSpec         *pspec)
+{
+  TegCanvasImagePrivate *priv = teg_canvas_image_get_private (object);
+
+  switch (prop_id)
+    {
+    case PROP_PATTERN:
+      g_value_set_boxed (value, image_data->pattern);
+      break;
+    case PROP_X:
+      g_value_set_double (value, image_data->x);
+      break;
+    case PROP_Y:
+      g_value_set_double (value, image_data->y);
+      break;
+    case PROP_WIDTH:
+      g_value_set_double (value, image_data->width);
+      break;
+    case PROP_HEIGHT:
+      g_value_set_double (value, image_data->height);
+      break;
+    case PROP_SCALE_TO_FIT:
+      g_value_set_boolean (value, priv->scale_to_fit);
+      break;
+    case PROP_ALPHA:
+      g_value_set_double (value, priv->alpha);
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+      break;
+  }
+}
+
+static void
+teg_canvas_image_get_property (GObject    *object,
+                               guint       prop_id,
+                               GValue     *value,
+                               GParamSpec *pspec)
+{
+  TegCanvasImage *image = (TegCanvasImage*) object;
+
+  teg_canvas_image_get_common_property (object, image->image_data, prop_id,
+                                        value, pspec);
+}
+
+static gboolean
+teg_canvas_image_set_common_property (GObject            *object,
+                                      TegCanvasImageData *image_data,
+                                      guint               prop_id,
+                                      const GValue       *value,
+                                      GParamSpec         *pspec)
+{
+  TegCanvasImagePrivate *priv = teg_canvas_image_get_private (object);
+  GdkPixbuf *pixbuf;
+  gboolean recompute_bounds = TRUE;
+
+  switch (prop_id)
+    {
+    case PROP_PATTERN:
+      cairo_pattern_destroy (image_data->pattern);
+      image_data->pattern = g_value_get_boxed (value);
+      cairo_pattern_reference (image_data->pattern);
+      break;
+    case PROP_X:
+      image_data->x = g_value_get_double (value);
+      break;
+    case PROP_Y:
+      image_data->y = g_value_get_double (value);
+      break;
+    case PROP_WIDTH:
+      image_data->width = g_value_get_double (value);
+      break;
+    case PROP_HEIGHT:
+      image_data->height = g_value_get_double (value);
+      break;
+    case PROP_SCALE_TO_FIT:
+      priv->scale_to_fit = g_value_get_boolean (value);
+      break;
+    case PROP_PIXBUF:
+      cairo_pattern_destroy (image_data->pattern);
+      pixbuf = g_value_get_object (value);
+      image_data->pattern = pixbuf
+        ? goo_canvas_cairo_pattern_from_pixbuf (pixbuf)
+        : NULL;
+      image_data->width = pixbuf ? gdk_pixbuf_get_width (pixbuf) : 0;
+      image_data->height = pixbuf ? gdk_pixbuf_get_height (pixbuf) : 0;
+
+      if (GOO_IS_CANVAS_ITEM (object))
+        teg_canvas_image_convert_pixbuf_sizes (GOO_CANVAS_ITEM (object),
+                                               image_data);
+
+      break;
+    case PROP_ALPHA:
+      priv->alpha = g_value_get_double (value);
+      recompute_bounds = FALSE;
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+      break;
+  }
+
+  return recompute_bounds;
+}
+
+static void
+teg_canvas_image_set_property (GObject      *object,
+                               guint         prop_id,
+                               const GValue *value,
+                               GParamSpec   *pspec)
+{
+  GooCanvasItemSimple *simple = (GooCanvasItemSimple*) object;
+  TegCanvasImage *image = (TegCanvasImage*) object;
+  gboolean recompute_bounds;
+
+  if (simple->model)
+    {
+      g_warning ("Can't set property of a canvas item with a model - "
+                 "set the model property instead");
+      return;
+    }
+
+  recompute_bounds = teg_canvas_image_set_common_property (object,
+                                                           image->image_data,
+                                                           prop_id,
+                                                           value, pspec);
+  goo_canvas_item_simple_changed (simple, recompute_bounds);
+}
+
+static gboolean
+teg_canvas_image_is_item_at (GooCanvasItemSimple *simple,
+                             gdouble              x,
+                             gdouble              y,
+                             cairo_t             *cr,
+                             gboolean             is_pointer_event)
+{
+  TegCanvasImage *image = (TegCanvasImage*) simple;
+  TegCanvasImageData *image_data = image->image_data;
+  guchar *src;
+
+  if (x < image_data->x || (x > image_data->x + image_data->width)
+      || y < image_data->y || (y > image_data->y + image_data->height))
+    return FALSE;
+
+  /* Check whether the pixel where the pointer is is translucent.  */
+  src = gdk_pixbuf_get_pixels (image_data->pixbuf)
+    + (int) y * gdk_pixbuf_get_rowstride (image_data->pixbuf)
+    + (int) x * gdk_pixbuf_get_n_channels (image_data->pixbuf);
+
+  if (src[3] < 128)
+    return FALSE;
+
+  return TRUE;
+}
+
+
+static void
+teg_canvas_image_update (GooCanvasItemSimple *simple,
+                         cairo_t             *cr)
+{
+  TegCanvasImage *image = (TegCanvasImage*) simple;
+  TegCanvasImageData *image_data = image->image_data;
+
+  /* Compute the new bounds. */
+  simple->bounds.x1 = image_data->x;
+  simple->bounds.y1 = image_data->y;
+  simple->bounds.x2 = image_data->x + image_data->width;
+  simple->bounds.y2 = image_data->y + image_data->height;
+}
+
+static void
+teg_canvas_image_paint (GooCanvasItemSimple   *simple,
+                        cairo_t               *cr,
+                        const GooCanvasBounds *bounds)
+{
+  TegCanvasImagePrivate *priv = teg_canvas_image_get_private (simple);
+  TegCanvasImage *image = (TegCanvasImage*) simple;
+  TegCanvasImageData *image_data = image->image_data;
+  cairo_matrix_t matrix = { 1, 0, 0, 1, 0, 0 };
+  cairo_surface_t *surface;
+  gdouble width, height;
+
+  if (!image_data->pattern)
+    return;
+
+  /* scale-to-fit means a simple scale, not keeping the aspect ratio.
+     This does not need to consider the units used. */
+  if (priv->scale_to_fit)
+    {
+      if (cairo_pattern_get_surface (image_data->pattern, &surface)
+          == CAIRO_STATUS_SUCCESS
+          && cairo_surface_get_type (surface) == CAIRO_SURFACE_TYPE_IMAGE)
+        {
+          width = cairo_image_surface_get_width (surface);
+          height = cairo_image_surface_get_height (surface);
+          cairo_matrix_scale (&matrix, width / image_data->width,
+                              height / image_data->height);
+        }
+    } else if (priv->scale_to_units && (priv->scale_to_units != 1.0f))
+   {
+      /* Scale the image to fit the size in units.
+         We have already scaled the width and height numbers. */
+      if (cairo_pattern_get_surface (image_data->pattern, &surface)
+          == CAIRO_STATUS_SUCCESS
+          && cairo_surface_get_type (surface) == CAIRO_SURFACE_TYPE_IMAGE)
+        {
+          cairo_matrix_scale (&matrix, priv->scale_to_units,
+                              priv->scale_to_units);
+        }
+    }
+
+  cairo_matrix_translate (&matrix, -image_data->x, -image_data->y);
+
+  cairo_pattern_set_matrix (image_data->pattern, &matrix);
+  goo_canvas_style_set_fill_options (simple->simple_data->style, cr);
+  cairo_set_source (cr, image_data->pattern);
+  cairo_rectangle (cr, image_data->x, image_data->y,
+                   image_data->width, image_data->height);
+  /* To have better performance, we don't use cairo_paint_with_alpha if
+   * the image is not transparent at all. */
+  if (priv->alpha != 1.0)
+    {
+      cairo_clip (cr);
+      cairo_paint_with_alpha (cr, priv->alpha);
+    }
+  else
+    cairo_fill (cr);
+}
+
+static void
+teg_canvas_image_set_model (GooCanvasItem      *item,
+                            GooCanvasItemModel *model)
+{
+  GooCanvasItemSimple *simple = (GooCanvasItemSimple*) item;
+  TegCanvasImage *image = (TegCanvasImage*) item;
+  TegCanvasImageModel *imodel = (TegCanvasImageModel*) model;
+
+  /* If our data was allocated, free it. */
+  if (!simple->model)
+    {
+      cairo_pattern_destroy (image->image_data->pattern);
+      g_slice_free (TegCanvasImageData, image->image_data);
+    }
+
+  /* Now use the new model's data instead. */
+  image->image_data = &imodel->image_data;
+
+  /* Let the parent GooCanvasItemSimple code do the rest. */
+  goo_canvas_item_simple_set_model (simple, model);
+}
+
+static void
+canvas_item_interface_init (GooCanvasItemIface *iface)
+{
+  iface->set_model = teg_canvas_image_set_model;
+}
+
+static void
+teg_canvas_image_class_init (TegCanvasImageClass *klass)
+{
+  GObjectClass *gobject_class = (GObjectClass*) klass;
+  GooCanvasItemSimpleClass *simple_class = (GooCanvasItemSimpleClass*) klass;
+
+  g_type_class_add_private (gobject_class, sizeof (TegCanvasImagePrivate));
+
+  gobject_class->dispose  = teg_canvas_image_dispose;
+  gobject_class->finalize = teg_canvas_image_finalize;
+
+  gobject_class->get_property = teg_canvas_image_get_property;
+  gobject_class->set_property = teg_canvas_image_set_property;
+
+  simple_class->simple_update      = teg_canvas_image_update;
+  simple_class->simple_paint       = teg_canvas_image_paint;
+  simple_class->simple_is_item_at  = teg_canvas_image_is_item_at;
+
+  teg_canvas_image_install_common_properties (gobject_class);
+}
+
+static void
+item_model_interface_init (GooCanvasItemModelIface *iface);
+static void
+teg_canvas_image_model_dispose (GObject *object);
+static void
+teg_canvas_image_model_get_property (GObject    *object,
+                                     guint       param_id,
+                                     GValue     *value,
+                                     GParamSpec *pspec);
+static void
+teg_canvas_image_model_set_property (GObject       *object,
+                                     guint         param_id,
+                                     const GValue *value,
+                                     GParamSpec   *pspec);
+
+G_DEFINE_TYPE_WITH_CODE (TegCanvasImageModel, teg_canvas_image_model,
+                         GOO_TYPE_CANVAS_ITEM_MODEL_SIMPLE,
+                         G_IMPLEMENT_INTERFACE (GOO_TYPE_CANVAS_ITEM_MODEL,
+                                                item_model_interface_init))
+
+static void
+teg_canvas_image_model_class_init (TegCanvasImageModelClass *klass)
+{
+  GObjectClass *gobject_class = (GObjectClass*) klass;
+
+  g_type_class_add_private (gobject_class, sizeof (TegCanvasImagePrivate));
+
+  gobject_class->dispose      = teg_canvas_image_model_dispose;
+
+  gobject_class->get_property = teg_canvas_image_model_get_property;
+  gobject_class->set_property = teg_canvas_image_model_set_property;
+
+  teg_canvas_image_install_common_properties (gobject_class);
+}
+
+static void
+teg_canvas_image_model_init (TegCanvasImageModel *emodel)
+{
+  TegCanvasImagePrivate *priv = TEG_CANVAS_IMAGE_MODEL_GET_PRIVATE (emodel);
+
+  priv->alpha = 1.0;
+}
+
+GooCanvasItemModel*
+teg_canvas_image_model_new (GooCanvasItemModel *parent,
+                            GdkPixbuf          *pixbuf,
+                            gdouble             x,
+                            gdouble             y,
+                            ...)
+{
+  GooCanvasItemModel *model;
+  TegCanvasImageModel *imodel;
+  TegCanvasImageData *image_data;
+  const char *first_property;
+  va_list var_args;
+
+  model = g_object_new (TEG_TYPE_CANVAS_IMAGE_MODEL, NULL);
+  imodel = (TegCanvasImageModel*) model;
+
+  image_data = &imodel->image_data;
+  image_data->x = x;
+  image_data->y = y;
+
+  if (pixbuf)
+    {
+      image_data->pattern = goo_canvas_cairo_pattern_from_pixbuf (pixbuf);
+      image_data->width = gdk_pixbuf_get_width (pixbuf);
+      image_data->height = gdk_pixbuf_get_height (pixbuf);
+
+      /* This is not possible with a model, because we don't know the canvas
+	 units being used. */
+      /*goo_canvas_image_convert_pixbuf_sizes (item, image_data);*/
+    }
+
+  va_start (var_args, y);
+  first_property = va_arg (var_args, char*);
+  if (first_property)
+    g_object_set_valist ((GObject*) model, first_property, var_args);
+  va_end (var_args);
+
+  if (parent)
+    {
+      goo_canvas_item_model_add_child (parent, model, -1);
+      g_object_unref (model);
+    }
+
+  return model;
+}
+
+static void
+teg_canvas_image_model_dispose (GObject *object)
+{
+  TegCanvasImageModel *imodel = (TegCanvasImageModel*) object;
+
+  cairo_pattern_destroy (imodel->image_data.pattern);
+  imodel->image_data.pattern = NULL;
+
+  G_OBJECT_CLASS (teg_canvas_image_model_parent_class)->dispose (object);
+}
+
+static void
+teg_canvas_image_model_get_property (GObject    *object,
+                                     guint       prop_id,
+                                     GValue     *value,
+                                     GParamSpec *pspec)
+{
+  TegCanvasImageModel *imodel = (TegCanvasImageModel*) object;
+
+  teg_canvas_image_get_common_property (object, &imodel->image_data, prop_id,
+                                        value, pspec);
+}
+
+
+static void
+teg_canvas_image_model_set_property (GObject      *object,
+                                     guint         prop_id,
+                                     const GValue *value,
+                                     GParamSpec   *pspec)
+{
+  TegCanvasImageModel *imodel = (TegCanvasImageModel*) object;
+  gboolean recompute_bounds;
+
+  recompute_bounds = teg_canvas_image_set_common_property (object,
+                                                           &imodel->image_data,
+                                                           prop_id,
+                                                           value, pspec);
+  g_signal_emit_by_name (imodel, "changed", recompute_bounds);
+}
+
+static GooCanvasItem*
+teg_canvas_image_model_create_item (GooCanvasItemModel *model,
+                                    GooCanvas          *canvas)
+{
+  GooCanvasItem *item;
+
+  item = g_object_new (TEG_TYPE_CANVAS_IMAGE, NULL);
+  goo_canvas_item_set_model (item, model);
+
+  return item;
+}
+
+static void
+item_model_interface_init (GooCanvasItemModelIface *iface)
+{
+  iface->create_item    = teg_canvas_image_model_create_item;
+}
--- /dev/null
+++ teg-0.11.2+debian/client/gui-gnome/tegcanvasimage.h
@@ -0,0 +1,96 @@
+/*
+ * GooCanvas. Copyright (C) 2005 Damon Chaplin.
+ * Released under the GNU LGPL license. See COPYING for details.
+ */
+
+#include <goocanvas.h>
+
+/* This is a private GooCanvas function we can't do without.  */
+cairo_pattern_t* goo_canvas_cairo_pattern_from_pixbuf (GdkPixbuf *pixbuf);
+
+typedef struct _TegCanvasImageData   TegCanvasImageData;
+
+struct _TegCanvasImageData
+{
+  cairo_pattern_t *pattern;
+        GdkPixbuf *pixbuf;
+
+  gdouble x, y, width, height;
+};
+
+#define TEG_TYPE_CANVAS_IMAGE (teg_canvas_image_get_type ())
+#define TEG_CANVAS_IMAGE(obj) \
+  (G_TYPE_CHECK_INSTANCE_CAST ((obj), TEG_TYPE_CANVAS_IMAGE, TegCanvasImage))
+#define TEG_CANVAS_IMAGE_CLASS(klass) \
+  (G_TYPE_CHECK_CLASS_CAST ((klass), TEG_TYPE_CANVAS_IMAGE, \
+                            TegCanvasImageClass))
+#define TEG_IS_CANVAS_IMAGE(obj) \
+  (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TEG_TYPE_CANVAS_IMAGE))
+#define TEG_IS_CANVAS_IMAGE_CLASS(klass) \
+  (G_TYPE_CHECK_CLASS_TYPE ((klass), TEG_TYPE_CANVAS_IMAGE))
+#define TEG_CANVAS_IMAGE_GET_CLASS(obj) \
+  (G_TYPE_INSTANCE_GET_CLASS ((obj), TEG_TYPE_CANVAS_IMAGE, \
+                              TegCanvasImageClass))
+
+typedef struct _TegCanvasImage       TegCanvasImage;
+typedef struct _TegCanvasImageClass  TegCanvasImageClass;
+
+struct _TegCanvasImage
+{
+  GooCanvasItemSimple parent_object;
+  TegCanvasImageData *image_data;
+};
+
+struct _TegCanvasImageClass
+{
+  GooCanvasItemSimpleClass parent_class;
+};
+
+GType
+teg_canvas_image_get_type (void) G_GNUC_CONST;
+
+GooCanvasItem*
+teg_canvas_image_new (GooCanvasItem      *parent,
+                      GdkPixbuf          *pixbuf,
+                      gdouble             x,
+                      gdouble             y,
+                      ...);
+
+#define TEG_TYPE_CANVAS_IMAGE_MODEL (teg_canvas_image_model_get_type ())
+#define TEG_CANVAS_IMAGE_MODEL(obj) \
+  (G_TYPE_CHECK_INSTANCE_CAST ((obj), TEG_TYPE_CANVAS_IMAGE_MODEL, \
+                               TegCanvasImageModel))
+#define TEG_CANVAS_IMAGE_MODEL_CLASS(klass) \
+  (G_TYPE_CHECK_CLASS_CAST ((klass), TEG_TYPE_CANVAS_IMAGE_MODEL, \
+                            TegCanvasImageModelClass))
+#define TEG_IS_CANVAS_IMAGE_MODEL(obj) \
+  (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TEG_TYPE_CANVAS_IMAGE_MODEL))
+#define TEG_IS_CANVAS_IMAGE_MODEL_CLASS(klass) \
+  (G_TYPE_CHECK_CLASS_TYPE ((klass), TEG_TYPE_CANVAS_IMAGE_MODEL))
+#define TEG_CANVAS_IMAGE_MODEL_GET_CLASS(obj) \
+  (G_TYPE_INSTANCE_GET_CLASS ((obj), TEG_TYPE_CANVAS_IMAGE_MODEL, \
+                              TegCanvasImageModelClass))
+
+typedef struct _TegCanvasImageModel       TegCanvasImageModel;
+typedef struct _TegCanvasImageModelClass  TegCanvasImageModelClass;
+
+struct _TegCanvasImageModel
+{
+  GooCanvasItemModelSimple parent_object;
+  TegCanvasImageData image_data;
+};
+
+struct _TegCanvasImageModelClass
+{
+  GooCanvasItemModelSimpleClass parent_class;
+};
+
+GType
+teg_canvas_image_model_get_type (void) G_GNUC_CONST;
+
+GooCanvasItemModel*
+teg_canvas_image_model_new (GooCanvasItemModel *parent,
+                            GdkPixbuf          *pixbuf,
+                            gdouble             x,
+                            gdouble             y,
+                            ...);
--- /dev/null
+++ teg-0.11.2+debian/client/gui-gnome/stock.gresource.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<gresources>
+  <gresource prefix="/net/sf/teg/icons">
+    <file alias="stock-endturn.xpm">stock/stock-endturn.xpm</file>
+    <file alias="stock-getcard.xpm">stock/stock-getcard.xpm</file>
+    <file alias="stock-sendarmies.xpm">stock/stock-sendarmies.xpm</file>
+    <file alias="stock-viewplayers.xpm">stock/stock-viewplayers.xpm</file>
+  </gresource>
+</gresources>
--- teg-0.11.2+debian.orig/client/gui-gnome/stock.h
+++ teg-0.11.2+debian/client/gui-gnome/stock.h
@@ -29,10 +29,10 @@
 #define STOCK_ZOOM_FIT	"TEG_stock_zoom_fit"
 #define STOCK_ZOOM_IN	"TEG_stock_zoom_in"
 #define STOCK_ZOOM_OUT	"TEG_stock_zoom_out"
-#define STOCK_GETCARD	"TEG_stock_getcard"
-#define STOCK_SENDARMIES	"TEG_stock_sendarmies"
-#define STOCK_ENDTURN	"TEG_stock_endturn"
-#define STOCK_VIEWPLAYERS	"TEG_stock_viewplayers"
+#define STOCK_GETCARD	"stock-getcard"
+#define STOCK_SENDARMIES	"stock-sendarmies"
+#define STOCK_ENDTURN	"stock-endturn"
+#define STOCK_VIEWPLAYERS	"stock-viewplayers"
 
 
 void stock_init (void);
--- /dev/null
+++ teg-0.11.2+debian/po/Makevars
@@ -0,0 +1,53 @@
+# Makefile variables for PO directory in any package using GNU gettext.
+
+# Usually the message domain is the same as the package name.
+DOMAIN = $(PACKAGE)
+
+# These two variables depend on the location of this directory.
+subdir = po
+top_builddir = ..
+
+# These options get passed to xgettext.
+XGETTEXT_OPTIONS = --keyword=_ --keyword=N_
+
+# This is the copyright holder that gets inserted into the header of the
+# $(DOMAIN).pot file.  Set this to the copyright holder of the surrounding
+# package.  (Note that the msgstr strings, extracted from the package's
+# sources, belong to the copyright holder of the package.)  Translators are
+# expected to transfer the copyright for their translations to this person
+# or entity, or to disclaim their copyright.  The empty string stands for
+# the public domain; in this case the translators are expected to disclaim
+# their copyright.
+COPYRIGHT_HOLDER = Ricardo Quesada
+
+# This is the email address or URL to which the translators shall report
+# bugs in the untranslated strings:
+# - Strings which are not entire sentences, see the maintainer guidelines
+#   in the GNU gettext documentation, section 'Preparing Strings'.
+# - Strings which use unclear terms or require additional context to be
+#   understood.
+# - Strings which make invalid assumptions about notation of date, time or
+#   money.
+# - Pluralisation problems.
+# - Incorrect English spelling.
+# - Incorrect formatting.
+# It can be your email address, or a mailing list address where translators
+# can write to without being subscribed, or the URL of a web page through
+# which the translators can contact you.
+MSGID_BUGS_ADDRESS = teg-list at lists.sourceforge.net
+
+# This is the list of locale categories, beyond LC_MESSAGES, for which the
+# message catalogs shall be used.  It is usually empty.
+EXTRA_LOCALE_CATEGORIES =
+
+# This tells whether the $(DOMAIN).pot file contains messages with an 'msgctxt'
+# context.  Possible values are "yes" and "no".  Set this to yes if the
+# package uses functions taking also a message context, like pgettext(), or
+# if in $(XGETTEXT_OPTIONS) you define keywords with a context argument.
+USE_MSGCTXT = no
+
+# These options get passed to msgmerge.
+# Useful options are in particular:
+#   --previous            to keep previous msgids of translated messages,
+#   --quiet               to reduce the verbosity.
+MSGMERGE_OPTIONS =
--- teg-0.11.2+debian.orig/client/gui-gnome/robot.xpm
+++ teg-0.11.2+debian/client/gui-gnome/robot.xpm
@@ -1,5 +1,5 @@
 /* XPM */
-static char * robot_xpm[] = {
+static const char * robot_xpm[] = {
 "21 19 9 1",
 " 	c None",
 ".	c #F91616",
--- teg-0.11.2+debian.orig/client/teg_pix/teg_icono.xpm
+++ teg-0.11.2+debian/client/teg_pix/teg_icono.xpm
@@ -1,5 +1,5 @@
 /* XPM */
-static char * teg_icono_xpm[] = {
+static const char * teg_icono_xpm[] = {
 "49 48 839 2",
 "  	c None",
 ". 	c #BA833A",
--- teg-0.11.2+debian.orig/client/gui-gnome/connect.h
+++ teg-0.11.2+debian/client/gui-gnome/connect.h
@@ -24,6 +24,7 @@
 #ifndef __GUI_GNOME_CONECTAR_H
 #define __GUI_GNOME_CONECTAR_H
 
+void shutdown_channel();
 void connect_view();
 void gametype_view();
 void colortype_view( char *colores);
--- /dev/null
+++ teg-0.11.2+debian/client/gui-gnome/net.sf.teg.gschema.xml
@@ -0,0 +1,44 @@
+<schemalist gettext-domain="teg">
+  <schema id="net.sf.teg" path="/net/sf/teg/">
+    <key name="port" type="i">
+      <default>2000</default>
+      <summary>The port where the TEG sever is listen to</summary>
+    </key>
+    <key name="servername" type="s">
+      <default>'localhost'</default>
+      <summary>The TEG server name</summary>
+    </key>
+    <key name="playername" type="s">
+      <default>''</default>
+      <summary>Your name in the game</summary>
+    </key>
+    <key name="theme" type="s">
+      <default>'m2'</default>
+      <summary>TEG's theme name</summary>
+    </key>
+    <key name="color" type="i">
+      <default>1</default>
+      <summary>Desired color</summary>
+    </key>
+    <key name="msgshow" type="i">
+      <default>254</default>
+      <summary>Which messages to show</summary>
+    </key>
+    <key name="msgshow-with-color" type="b">
+      <default>false</default>
+      <summary>Show names with color</summary>
+    </key>
+    <key name="status-show" type="i">
+      <default>453</default>
+      <summary>Which columns of the status dialog to show</summary>
+    </key>
+    <key name="dialog-show" type="i">
+      <default>7</default>
+      <summary>Which dialogs should be shown</summary>
+    </key>
+    <key name="robot-in-server" type="b">
+      <default>true</default>
+      <summary>Launch robot in server</summary>
+    </key>
+  </schema>
+</schemalist>
--- /dev/null
+++ teg-0.11.2+debian/client/gui-gnome/teg.convert
@@ -0,0 +1,11 @@
+[net.sf.teg]
+port = /apps/teg/port
+servername = /apps/teg/servername
+playername = /apps/teg/playername
+theme = /apps/teg/theme
+color = /apps/teg/color
+msgshow = /apps/teg/msgshow
+msgshow-with-color = /apps/teg/msgshow_with_color
+status-show = /apps/teg/status_show
+dialog-show = /apps/teg/dialog_show
+robot-in-server = /apps/teg/robot_in_server
--- teg-0.11.2+debian.orig/client/gui-gnome/teg.schemas
+++ /dev/null
@@ -1,126 +0,0 @@
-<gconfschemafile>
-    <schemalist>    
-
-      <schema>
-        <key>/schemas/apps/teg/port</key>
-        <applyto>/apps/teg/port</applyto>
-        <owner>teg</owner>
-        <type>int</type>
-        <default>2000</default>
-        <locale name="C">
-          <short>server port</short>
-          <long>The port where the TEG sever is listen to</long>
-        </locale>
-      </schema>
-
-      <schema>
-        <key>/schemas/apps/teg/servername</key>
-	<applyto>/apps/teg/servername</applyto>
-	<owner>teg</owner>
-	<type>string</type>
-	<default>localhost</default>
-	<locale name="C">
-	  <short>server name</short>
-	  <long>The TEG server name</long>
-	</locale>
-      </schema>
-
-      <schema>
-        <key>/schemas/apps/teg/playername</key>
-	<applyto>/apps/teg/playername</applyto>
-	<owner>teg</owner>
-	<type>string</type>
-	<default></default>
-	<locale name="C">
-	  <short>your name</short>
-	  <long>Your name in the game</long>
-	</locale>
-      </schema>
-
-      <schema>
-        <key>/schemas/apps/teg/theme</key>
-	<applyto>/apps/teg/theme</applyto>
-	<owner>teg</owner>
-	<type>string</type>
-	<default>m2</default>
-	<locale name="C">
-	  <short>TEG's theme</short>
-	  <long>TEG's theme name</long>
-	</locale>
-      </schema>
-
-      <schema>
-        <key>/schemas/apps/teg/color</key>
-	<applyto>/apps/teg/color</applyto>
-	<owner>teg</owner>
-	<type>int</type>
-	<default>1</default>
-	<locale name="C">
-	  <short>desired color</short>
-	  <long>desired color</long>
-	</locale>
-      </schema>
-
-      <schema>
-        <key>/schemas/apps/teg/msgshow</key>
-	<applyto>/apps/teg/msgshow</applyto>
-	<owner>teg</owner>
-	<type>int</type>
-	<default>254</default>
-	<locale name="C">
-	  <short>which messages to show</short>
-	  <long>which messages to show</long>
-	</locale>
-      </schema>
-
-      <schema>
-        <key>/schemas/apps/teg/msgshow_with_color</key>
-	<applyto>/apps/teg/msgshow_with_color</applyto>
-	<owner>teg</owner>
-	<type>bool</type>
-	<default>false</default>
-	<locale name="C">
-	  <short>show names with color</short>
-	  <long>show names with color</long>
-	</locale>
-      </schema>
-     
-      <schema>
-        <key>/schemas/apps/teg/status_show</key>
-	<applyto>/apps/teg/status_show</applyto>
-	<owner>teg</owner>
-	<type>int</type>
-	<default>65485</default>
-	<locale name="C">
-	  <short>which columns of the status dialog show</short>
-	  <long>which columns of the status dialog show</long>
-	</locale>
-      </schema>
-
-      <schema>
-        <key>/schemas/apps/teg/dialog_show</key>
-	<applyto>/apps/teg/dialog_show</applyto>
-	<owner>teg</owner>
-	<type>int</type>
-	<default>7</default>
-	<locale name="C">
-	  <short>which dialogs should be shown</short>
-	  <long>which dialogs should be shown</long>
-	</locale>
-      </schema>
-
-      <schema>
-        <key>/schemas/apps/teg/robot_in_server</key>
-	<applyto>/apps/teg/robot_in_server</applyto>
-	<owner>teg</owner>
-	<type>bool</type>
-	<default>true</default>
-	<locale name="C">
-	  <short>launch robot in server</short>
-	  <long>launch robot in server</long>
-	</locale>
-      </schema>
-
-  </schemalist>
-  
-</gconfschemafile>
--- teg-0.11.2+debian.orig/client/gui-gnome/teg.desktop
+++ teg-0.11.2+debian/client/gui-gnome/teg.desktop
@@ -6,7 +6,7 @@
 Comment[es]=Cliente del Tenes Empanadas Graciela
 Comment[de]=Client für Tenes Empanadas Graciela
 Exec=tegclient
-Icon=teg
+Icon=teg_icono
 Terminal=false
 Type=Application
 Categories=GTK;GNOME;Game;StrategyGame;
--- teg-0.11.2+debian.orig/po/POTFILES.in
+++ teg-0.11.2+debian/po/POTFILES.in
@@ -46,6 +46,7 @@
 client/gui-gnome/stock.c
 client/gui-gnome/support.c
 client/gui-gnome/preferences.c
+client/gui-gnome/net.sf.teg.gschema.xml
 server/helper.c
 server/console.c
 server/player.c
-------------- next part --------------
  * debian/control: Adjust Build-Depends.
  * debian/copyright: Add GooCanvas license (LGPL) and copyright notice.
  * debian/patches/series: Self-explanatory.
  * debian/rules:
    - enable autoreconf and parallel builds
    - don't set datadir
    - remove overrides for dh_clean and dh_install
    - run maintainer-clean in the dh_auto_clean override
  * debian/tegclient.sh: Delete as the bug has been fixed.


--- orig/debian/control
+++ new/debian/control
@@ -8,27 +8,10 @@ Standards-Version: 4.0.0
 Build-Depends:
  debhelper (>= 10),
  gettext,
- intltool,
- libart-2.0-dev,
- libatk1.0-dev,
- libbonobo2-dev,
- libbonoboui2-dev,
- libfreetype6-dev,
- libgconf2-dev,
- libglib2.0-dev,
- libgnome2-dev,
- libgnomecanvas2-dev,
- libgnomeui-dev,
- libgnomevfs2-dev,
- libgtk2.0-dev,
- liborbit2-dev,
- libpango1.0-dev,
- libpopt-dev,
+ libgoocanvas-2.0-dev,
  libreadline-dev,
- librsvg2-dev,
  libtool,
- libxml2-dev,
- zlib1g-dev
+ libxml2-dev
 Homepage: http://teg.sourceforge.net/
 Vcs-Svn: svn://anonscm.debian.org/pkg-games/packages/trunk/teg/
 Vcs-Browser: https://anonscm.debian.org/viewvc/pkg-games/packages/trunk/teg/
--- orig/debian/copyright
+++ new/debian/copyright
@@ -47,5 +47,13 @@ This program is free software; you can r
 it under the terms of the GNU General Public License as published by
 the Free Software Foundation; only version 2 of the License
 
+./client/gui-gnome/tegcanvasimage.c
+./client/gui-gnome/tegcanvasimage.h
+Copyright (C) 2005 Damon Chaplin
+Released under the GNU LGPL license. See COPYING for details.
+
 On Debian GNU/Linux systems, the text of the GPL-2 can be found in
 /usr/share/common-licenses/GPL-2.
+
+On Debian systems, the full text of the LGPL can be found in
+/usr/share/common-licenses/LGPL-2.
--- orig/debian/patches/series
+++ new/debian/patches/series
@@ -5,3 +5,4 @@ x-terminal-emulator.diff
 keywords.patch
 unescaped-left-brace.patch
 remove-deprecated-USE_GNOME2_MACROS.patch
+goocanvas-gsettings-port.patch
--- orig/debian/rules
+++ new/debian/rules
@@ -4,59 +4,20 @@ export DEB_BUILD_MAINT_OPTIONS = hardeni
 export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
 
 %:
-	dh $@ --no-parallel --without autoreconf --with autotools_dev
+	dh $@
 
 override_dh_auto_configure:
 	dh_auto_configure -- \
 		--prefix=/usr \
 		--bindir=/usr/games \
-		--sysconfdir=/etc \
-		--datadir=/usr/share/games/teg \
-		--disable-ggz
+		--sysconfdir=/etc
 
 override_dh_auto_clean:
-	# Do nothing here because make distclean does not work correctly.
-
-override_dh_clean:
-	dh_clean
-	-find docs/gnome-help -name '*.html' -delete
-	-find . -name '*.o' -delete
-	-find . -name '*.a' -delete
-	-find . -name '*.pot' -delete
-	-find . -name '*.dsc' -delete
-	-find . -name 'Makefile' -delete
-	dh_clean \
-		po/*.gmo \
-		robot/tegrobot \
-		client/tegclient \
-		server/tegserver \
-		configure-stamp \
-		build-stamp \
-		config.log \
-		config.status \
-		libtool \
-		config.h \
-		po/Makefile.in \
-		intltool-update
-
-override_dh_auto_install:
-	$(MAKE) install DESTDIR=$(CURDIR)/debian/teg
-	rm -rf $(CURDIR)/debian/teg/usr/share/pixmaps/teg_pix
-
-override_dh_install:
-	dh_install
-	dh_install client/gui-gnome/teg.desktop /usr/share/applications
-	mkdir -p debian/teg/usr/share/pixmaps
-	install -m 644 client/teg_pix/teg_icono.png \
-		debian/teg/usr/share/pixmaps/teg.png
-	# Work around for #281164
-	mkdir -p $(CURDIR)/debian/teg/usr/lib/games/teg
-	cp debian/teg/usr/games/tegclient debian/teg/usr/lib/games/teg/tegclient
-	cp debian/tegclient.sh debian/teg/usr/games/tegclient
+	[ ! -f Makefile ] || $(MAKE) maintainer-clean
+	dh_auto_clean
 
 override_dh_installdocs:
 	dh_installdocs AUTHORS HACKING PEOPLE README.GGZ TODO
 
 override_dh_installman:
 	dh_installman debian/tegserver.6 debian/tegclient.6 debian/tegrobot.6
-
--- orig/debian/tegclient.sh
+++ new/debian/tegclient.sh
@@ -1,21 +0,0 @@
-#!/bin/sh
-# Gonéri Le Bouder <goneri at rulezlan.org>
-# See http://bugs.debian.org/281164
-
-DEFAULT="m2"
-THEME=`gconftool-2 --get /apps/teg/theme`
-
-if [ "$THEME" = "" ]; then
-	NEEDTOFIX=1
-fi
-
-if [ "`ls /usr/share/games/teg/pixmaps/teg_pix/themes|grep "$THEME"`" = "" ]; then
-	NEEDTOFIX=1
-fi
-
-if [ "$NEEDTOFIX" = "1" ]; then
-	echo "fixing default theme"
-	gconftool-2 --type string --set /apps/teg/theme $DEFAULT
-fi
-
-exec /usr/lib/games/teg/tegclient


More information about the Pkg-games-devel mailing list