[grisbi-cvs] [SCM] grisbi branch, master, updated. upstream_version_1_1_1-17-g50a4fe2

Pierre Biava nobody at users.sourceforge.net
Sun Jan 6 07:45:00 CET 2013


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "grisbi".

The branch, master has been updated
       via  50a4fe2628a0869f8a50617f837b43f354f30e2c (commit)
      from  190e8ed905e43b4017606d603e66ac23348b2a82 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 50a4fe2628a0869f8a50617f837b43f354f30e2c
Author: pbiava <pierre.biava at nerim.net>
Date:   Sat Jan 5 19:58:53 2013 +0100

    remove files go-*

-----------------------------------------------------------------------

Changes:
diff --git a/src/go-charmap-sel.c b/src/go-charmap-sel.c
deleted file mode 100644
index 6c1ffb8..0000000
--- a/src/go-charmap-sel.c
+++ /dev/null
@@ -1,759 +0,0 @@
-/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * A charmap selector widget.
- *
- *  Copyright (C) 2003-2005 Andreas J. Guelzow
- *
- *  based on code by:
- *  Copyright (C) 2000 Marco Pesenti Gritti
- *  from the galeon code base
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2, or (at your option)
- *  any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "include.h"
-#include <glib/gi18n.h>
-
-/*START_INCLUDE*/
-#include "go-charmap-sel.h"
-#include "go-optionmenu.h"
-#include "utils_str.h"
-/*END_INCLUDE*/
-
-struct cb_find_entry {
-	const char *enc;
-	gboolean found;
-	int i;
-	GSList *path;
-};
-
-/*START_STATIC*/
-static void cb_find_entry (GtkMenuItem *w, struct cb_find_entry *cl);
-static int charset_order (const void *_a, const void *_b);
-static void cs_build_menu (GOCharmapSel *cs);
-static void cs_class_init (GtkWidgetClass *widget_klass);
-static void cs_emphasize_label (GtkLabel *label);
-static void cs_get_property (GObject     *object,
-		 guint        prop_id,
-		 GValue      *value,
-		 GParamSpec  *pspec);
-static void cs_init (GOCharmapSel *cs);
-static gboolean cs_mnemonic_activate (GtkWidget *w, gboolean group_cycling);
-static void cs_set_property (GObject      *object,
-		 guint         prop_id,
-		 const GValue *value,
-		 GParamSpec   *pspec);
-static void encodings_changed_cb (GOOptionMenu *optionmenu, GOCharmapSel *cs);
-static char const * get_locale_encoding_name (GOCharmapSel *cs);
-static const char * go_charmap_sel_get_encoding_name (G_GNUC_UNUSED GOCharmapSel *cs,
-				    const char *encoding);
-static gboolean iconv_supported (const char *to, const char *from);
-static int lgroups_order (const void *_a, const void *_b);
-static void set_menu_to_default (GOCharmapSel *cs, gint item);
-/*END_STATIC*/
-
-/*START_EXTERN*/
-/*END_EXTERN*/
-
-
-#include <gtk/gtkcheckmenuitem.h>
-#include <gtk/gtkhbox.h>
-#include <gtk/gtklabel.h>
-#include <gtk/gtkmenu.h>
-#include <gtk/gtkmenuitem.h>
-#include <gtk/gtkseparatormenuitem.h>
-#include <string.h>
-#include <stdlib.h>
-
-#define CS(x) GO_CHARMAP_SEL (x)
-
-#define CHARMAP_NAME_KEY "Name of Character Encoding"
-
-
-/* name -> CharsetInfo* mapping */
-static GHashTable *encoding_hash;
-
-struct _GOCharmapSel {
-	GtkHBox box;
-	GOOptionMenu *encodings;
-	GtkMenu *encodings_menu;
-	GOCharmapSelTestDirection test;
-};
-
-typedef struct {
-	GtkHBoxClass parent_class;
-
-	gboolean (* charmap_changed) (GOCharmapSel *cs, char const *new_charmap);
-} GOCharmapSelClass;
-
-
-typedef GOCharmapSel Cs;
-typedef GOCharmapSelClass CsClass;
-
-/* Signals we emit */
-enum {
-	CHARMAP_CHANGED,
-	LAST_SIGNAL
-};
-
-enum {
-	PROP_0,
-	PROP_TEST_DIRECTION
-};
-
-#define	GSF_CLASS_FULL(name, prefix, base_init, base_finalize, \
-			   class_init, class_finalize, instance_init, parent_type, \
-		       abstract, interface_decl) \
-GType									\
-prefix ## _get_type (void)						\
-{									\
-	static GType type = 0;						\
-	if (type == 0) {						\
-		static GTypeInfo const object_info = {			\
-			sizeof (name ## Class),				\
-			(GBaseInitFunc) base_init,			\
-			(GBaseFinalizeFunc) base_finalize,		\
-			(GClassInitFunc) class_init,			\
-			(GClassFinalizeFunc) class_finalize,		\
-			NULL,	/* class_data */			\
-			sizeof (name),					\
-			0,	/* n_preallocs */			\
-			(GInstanceInitFunc) instance_init,		\
-			NULL						\
-		};							\
-		type = g_type_register_static (parent_type, #name,	\
-			&object_info, (GTypeFlags) abstract);		\
-		interface_decl						\
-	}								\
-	return type;							\
-}
-#define	GSF_CLASS(name, prefix, class_init, instance_init, parent) \
-	GSF_CLASS_FULL(name, prefix, NULL, NULL, class_init, NULL, \
-				instance_init, parent, 0, {})
-GSF_CLASS (GOCharmapSel, go_charmap_sel,
-	   cs_class_init, cs_init, GTK_TYPE_HBOX)
-
-/* ------------------------------------------------------------------------- */
-
-typedef enum {
-	LG_ARABIC,
-	LG_BALTIC,
-	LG_CENTRAL_EUROPEAN,
-	LG_CHINESE,
-	LG_CYRILLIC,
-	LG_GREEK,
-	LG_HEBREW,
-	LG_INDIAN,
-	LG_JAPANESE,
-	LG_KOREAN,
-	LG_TURKISH,
-	LG_UNICODE,
-	LG_VIETNAMESE,
-	LG_WESTERN,
-	LG_OTHER,
-	LG_LAST
-} LanguageGroup;
-
-typedef struct {
-        char const *group_name;
-	LanguageGroup const lgroup;
-	/* Generated stuff follows.  */
-	char *collate_key;
-} LGroupInfo;
-
-static LGroupInfo lgroups[] = {
-	{N_("Arabic"), LG_ARABIC},
-	{N_("Baltic"), LG_BALTIC},
-	{N_("Central European"), LG_CENTRAL_EUROPEAN},
-	{N_("Chinese"), LG_CHINESE},
-	{N_("Cyrillic"), LG_CYRILLIC},
-	{N_("Greek"), LG_GREEK},
-	{N_("Hebrew"), LG_HEBREW},
-	{N_("Indian"), LG_INDIAN},
-	{N_("Japanese"), LG_JAPANESE},
-	{N_("Korean"), LG_KOREAN},
-	{N_("Turkish"), LG_TURKISH},
-	{N_("Unicode"), LG_UNICODE},
-	{N_("Vietnamese"), LG_VIETNAMESE},
-	{N_("Western"), LG_WESTERN},
-	{N_("Other"), LG_OTHER},
-	{NULL, LG_LAST}
-};
-
-static int lgroups_order (const void *_a, const void *_b)
-{
-	const LGroupInfo *a = (const LGroupInfo *)_a;
-	const LGroupInfo *b = (const LGroupInfo *)_b;
-
-	return strcmp (a->collate_key, b->collate_key);
-}
-
-/* ------------------------------------------------------------------------- */
-
-typedef enum {
-     CI_MINOR,
-     CI_MAJOR
-} CharsetImportance;
-
-typedef struct {
-	gchar const *charset_title;
-	gchar const *aliases;
-	LanguageGroup const lgroup;
-	CharsetImportance const imp;
-	/* Generated stuff follows.  */
-	char *collate_key;
-	char *to_utf8_iconv_name, *from_utf8_iconv_name;
-} CharsetInfo;
-
-static CharsetInfo charset_trans_array[] = {
-	{N_("Arabic (IBM-864)"),                  "IBM864",                LG_ARABIC, CI_MINOR},
-	{N_("Arabic (IBM-864-I)"),                "IBM864i",               LG_ARABIC, CI_MINOR},
-	{N_("Arabic (ISO-8859-6)"),               "ISO-8859-6",            LG_ARABIC, CI_MINOR},
-	{N_("Arabic (ISO-8859-6-E)"),             "ISO-8859-6-E",          LG_ARABIC, CI_MINOR},
-
-	{N_("Arabic (ISO-8859-6-I)"),             "ISO-8859-6-I",          LG_ARABIC, CI_MINOR},
-	{N_("Arabic (MacArabic)"),                "x-mac-arabic",          LG_ARABIC, CI_MINOR},
-	{N_("Arabic (Windows-1256)"),             "windows-1256",          LG_ARABIC, CI_MINOR},
-	{N_("Armenian (ARMSCII-8)"),              "armscii-8", 	           LG_OTHER, CI_MINOR},
-	{N_("Baltic (ISO-8859-13)"),              "ISO-8859-13",           LG_BALTIC, CI_MINOR},
-	{N_("Baltic (ISO-8859-4)"),               "ISO-8859-4",            LG_BALTIC, CI_MINOR},
-	{N_("Baltic (Windows-1257)"),             "windows-1257",          LG_BALTIC, CI_MINOR},
-	{N_("Celtic (ISO-8859-14)"),              "ISO-8859-14",           LG_OTHER, CI_MINOR},
-	{N_("Central European (IBM-852)"),        "IBM852",                LG_CENTRAL_EUROPEAN, CI_MINOR},
-	{N_("Central European (ISO-8859-2)"),     "ISO-8859-2",	           LG_CENTRAL_EUROPEAN, CI_MINOR},
-	{N_("Central European (MacCE)"),          "x-mac-ce",              LG_CENTRAL_EUROPEAN, CI_MINOR},
-	{N_("Central European (Windows-1250)"),   "windows-1250",          LG_CENTRAL_EUROPEAN, CI_MINOR},
-	{N_("Chinese Simplified (GB18030)"),      "gb18030",               LG_CHINESE, CI_MINOR},
-	{N_("Chinese Simplified (GB2312)"),       "GB2312",                LG_CHINESE, CI_MINOR},
-	{N_("Chinese Simplified (GBK)"),          "x-gbk",                 LG_CHINESE, CI_MINOR},
-	{N_("Chinese Simplified (HZ)"),           "HZ-GB-2312",	           LG_CHINESE, CI_MINOR},
-	{N_("Chinese Simplified (Windows-936)"),  "windows-936",           LG_CHINESE, CI_MINOR},
-	{N_("Chinese Traditional (Big5)"),        "Big5",                  LG_CHINESE, CI_MINOR},
-	{N_("Chinese Traditional (Big5-HKSCS)"),  "Big5-HKSCS",	           LG_CHINESE, CI_MINOR},
-	{N_("Chinese Traditional (EUC-TW)"),      "x-euc-tw",              LG_CHINESE, CI_MINOR},
-	{N_("Croatian (MacCroatian)"),            "x-mac-croatian",        LG_CENTRAL_EUROPEAN, CI_MINOR},
-	{N_("Cyrillic (IBM-855)"),                "IBM855",                LG_CYRILLIC, CI_MINOR},
-	{N_("Cyrillic (ISO-8859-5)"),             "ISO-8859-5",	           LG_CYRILLIC, CI_MINOR},
-	{N_("Cyrillic (ISO-IR-111)"),             "ISO-IR-111",	           LG_CYRILLIC, CI_MINOR},
-	{N_("Cyrillic (KOI8-R)"),                 "KOI8-R",                LG_CYRILLIC, CI_MINOR},
-	{N_("Cyrillic (MacCyrillic)"),            "x-mac-cyrillic",        LG_CYRILLIC, CI_MINOR},
-	{N_("Cyrillic (Windows-1251)"),           "windows-1251",          LG_CYRILLIC, CI_MINOR},
-	{N_("Russian (CP-866)"),                  "IBM866",                LG_CYRILLIC, CI_MINOR},
-	{N_("Ukrainian (KOI8-U)"),                "KOI8-U",                LG_CYRILLIC, CI_MINOR},
-	{N_("Ukrainian (MacUkrainian)"),          "x-mac-ukrainian",       LG_CYRILLIC, CI_MINOR},
-	{N_("English (ASCII)"),                   "ANSI_X3.4-1968#ASCII",  LG_WESTERN, CI_MAJOR},
-	{N_("Farsi (MacFarsi)"),                  "x-mac-farsi",           LG_OTHER, CI_MINOR},
-	{N_("Georgian (GEOSTD8)"),                "geostd8",               LG_OTHER, CI_MINOR},
-	{N_("Greek (ISO-8859-7)"),                "ISO-8859-7",            LG_GREEK, CI_MINOR},
-	{N_("Greek (MacGreek)"),                  "x-mac-greek",           LG_GREEK, CI_MINOR},
-	{N_("Greek (Windows-1253)"),              "windows-1253",          LG_GREEK, CI_MINOR},
-	{N_("Gujarati (MacGujarati)"),            "x-mac-gujarati",        LG_INDIAN, CI_MINOR},
-	{N_("Gurmukhi (MacGurmukhi)"),            "x-mac-gurmukhi",        LG_INDIAN, CI_MINOR},
-	{N_("Hebrew (IBM-862)"),                  "IBM862",                LG_HEBREW, CI_MINOR},
-	{N_("Hebrew (ISO-8859-8-E)"),             "ISO-8859-8-E",          LG_HEBREW, CI_MINOR},
-	{N_("Hebrew (ISO-8859-8-I)"),             "ISO-8859-8-I",          LG_HEBREW, CI_MINOR},
-	{N_("Hebrew (MacHebrew)"),                "x-mac-hebrew",          LG_HEBREW, CI_MINOR},
-	{N_("Hebrew (Windows-1255)"),             "windows-1255",          LG_HEBREW, CI_MINOR},
-	{N_("Hindi (MacDevanagari)"),             "x-mac-devanagari",      LG_INDIAN, CI_MINOR},
-	{N_("Icelandic (MacIcelandic)"),          "x-mac-icelandic",       LG_OTHER, CI_MINOR},
-	{N_("Japanese (EUC-JP)"),                 "EUC-JP",                LG_JAPANESE, CI_MINOR},
-	{N_("Japanese (ISO-2022-JP)"),            "ISO-2022-JP",           LG_JAPANESE, CI_MINOR},
-	{N_("Japanese (Shift_JIS)"),              "Shift_JIS",             LG_JAPANESE, CI_MINOR},
-	{N_("Korean (EUC-KR)"),                   "EUC-KR",                LG_KOREAN, CI_MINOR},
-	{N_("Korean (ISO-2022-KR)"),              "ISO-2022-KR",           LG_KOREAN, CI_MINOR},
-	{N_("Korean (JOHAB)"),                    "x-johab",               LG_KOREAN, CI_MINOR},
-	{N_("Korean (UHC)"),                      "x-windows-949",         LG_KOREAN, CI_MINOR},
-	{N_("Nordic (ISO-8859-10)"),              "ISO-8859-10",           LG_OTHER, CI_MINOR},
-	{N_("Romanian (MacRomanian)"),            "x-mac-romanian",        LG_OTHER, CI_MINOR},
-	{N_("Romanian (ISO-8859-16)"),            "ISO-8859-16",           LG_OTHER, CI_MINOR},
-	{N_("South European (ISO-8859-3)"),       "ISO-8859-3",            LG_OTHER, CI_MINOR},
-	{N_("Thai (TIS-620)"),                    "TIS-620",               LG_OTHER, CI_MINOR},
-	{N_("Turkish (IBM-857)"),                 "IBM857",                LG_TURKISH, CI_MINOR},
-	{N_("Turkish (ISO-8859-9)"),              "ISO-8859-9",            LG_TURKISH, CI_MINOR},
-	{N_("Turkish (MacTurkish)"),              "x-mac-turkish",         LG_TURKISH, CI_MINOR},
-	{N_("Turkish (Windows-1254)"),            "windows-1254",          LG_TURKISH, CI_MINOR},
-	{N_("Unicode (UTF-7)"),                   "UTF-7",                 LG_UNICODE, CI_MINOR},
-	{N_("Unicode (UTF-8)"),                   "UTF-8",                 LG_UNICODE, CI_MAJOR},
-	{N_("Unicode (UTF-16BE)"),                "UTF-16BE",              LG_UNICODE, CI_MINOR},
-	{N_("Unicode (UTF-16LE)"),                "UTF-16LE",              LG_UNICODE, CI_MINOR},
-	{N_("Unicode (UTF-32BE)"),                "UTF-32BE",              LG_UNICODE, CI_MINOR},
-	{N_("Unicode (UTF-32LE)"),                "UTF-32LE",              LG_UNICODE, CI_MINOR},
-	{N_("User Defined"),                      "x-user-defined",        LG_OTHER, CI_MINOR},
-	{N_("Vietnamese (TCVN)"),                 "x-viet-tcvn5712",       LG_VIETNAMESE, CI_MINOR},
-	{N_("Vietnamese (VISCII)"),               "VISCII",                LG_VIETNAMESE, CI_MINOR},
-	{N_("Vietnamese (VPS)"),                  "x-viet-vps",            LG_VIETNAMESE, CI_MINOR},
-	{N_("Vietnamese (Windows-1258)"),         "windows-1258",          LG_VIETNAMESE, CI_MINOR},
-	{N_("Visual Hebrew (ISO-8859-8)"),        "ISO-8859-8",            LG_HEBREW, CI_MINOR},
-	{N_("Western (IBM-850)"),                 "IBM850",                LG_WESTERN, CI_MINOR},
-	{N_("Western (ISO-8859-1)"),              "ISO-8859-1",            LG_WESTERN, CI_MAJOR},
-	{N_("Western (ISO-8859-15)"),             "ISO-8859-15",           LG_WESTERN, CI_MINOR},
-	{N_("Western (MacRoman)"),                "x-mac-roman",           LG_WESTERN, CI_MINOR},
-	{N_("Western (Windows-1252)"),            "windows-1252",          LG_WESTERN, CI_MINOR},
-	/* charsets without possibly translatable names */
-	{"T61.8bit",                              "T61.8bit",              LG_OTHER, CI_MINOR},
-	{"x-imap4-modified-utf7",                 "x-imap4-modified-utf7", LG_UNICODE, CI_MINOR},
-	{"x-u-escaped",                           "x-u-escaped",           LG_OTHER, CI_MINOR},
-	{NULL,                                    NULL,                    LG_LAST, 0}
-};
-
-static int charset_order (const void *_a, const void *_b)
-{
-	const CharsetInfo *a = (const CharsetInfo *)_a;
-	const CharsetInfo *b = (const CharsetInfo *)_b;
-
-	if (a->lgroup != b->lgroup)
-		return (int)b->lgroup - (int)a->lgroup;
-
-	if (a->imp != b->imp)
-		return (int)b->imp - (int)a->imp;
-
-	return strcmp (a->collate_key, b->collate_key);
-}
-
-/* ------------------------------------------------------------------------- */
-
-static guint cs_signals[LAST_SIGNAL] = { 0 };
-
-static void cs_set_property      (GObject          *object,
-				  guint             prop_id,
-				  const GValue     *value,
-				  GParamSpec       *pspec);
-
-static void cs_get_property      (GObject          *object,
-				  guint             prop_id,
-				  GValue           *value,
-				  GParamSpec       *pspec);
-
-static gboolean iconv_supported (const char *to, const char *from)
-{
-	GIConv ic = g_iconv_open (to, from);
-	if (ic == NULL || ic == (GIConv)-1)
-		return FALSE;
-
-	g_iconv_close (ic);
-	return TRUE;
-}
-
-const char * go_charmap_sel_get_encoding_name (G_GNUC_UNUSED GOCharmapSel *cs,
-				    const char *encoding)
-{
-	CharsetInfo const *ci;
-
-	g_return_val_if_fail (encoding != NULL, NULL);
-
-	ci = g_hash_table_lookup (encoding_hash, encoding);
-	return ci ? _(ci->charset_title) : NULL;
-}
-
-static char const * get_locale_encoding_name (GOCharmapSel *cs)
-{
-	char const *locale_encoding;
-	char const *name;
-
-	g_get_charset (&locale_encoding);
-	name = go_charmap_sel_get_encoding_name (cs, locale_encoding);
-	return name ? name : locale_encoding;
-}
-
-static void encodings_changed_cb (GOOptionMenu *optionmenu, GOCharmapSel *cs)
-{
-	g_return_if_fail (IS_GO_CHARMAP_SEL (cs));
-	g_return_if_fail (optionmenu == cs->encodings);
-
-	g_signal_emit (G_OBJECT (cs),
-		       cs_signals[CHARMAP_CHANGED],
-		       0,
-		       go_charmap_sel_get_encoding (cs));
-}
-
-static void set_menu_to_default (GOCharmapSel *cs, gint item)
-{
-	GSList sel = { GINT_TO_POINTER (item - 1), NULL};
-
-	g_return_if_fail (cs != NULL && IS_GO_CHARMAP_SEL (cs));
-
-	go_option_menu_set_history (cs->encodings, &sel);
-}
-
-static gboolean cs_mnemonic_activate (GtkWidget *w, gboolean group_cycling)
-{
-	GOCharmapSel *cs = GO_CHARMAP_SEL (w);
-	gtk_widget_grab_focus (GTK_WIDGET (cs->encodings));
-	return TRUE;
-}
-
-static void cs_emphasize_label (GtkLabel *label)
-{
-	char *text = g_strconcat ("<b>", gtk_label_get_label (label), "</b>", NULL);
-
-	gtk_label_set_use_underline (label, FALSE);
-	gtk_label_set_use_markup (label, TRUE);
-	gtk_label_set_label (label, text);
-	g_free (text);
-}
-
-static void cs_init (GOCharmapSel *cs)
-{
-	cs->test = GO_CHARMAP_SEL_TO_UTF8;
-
-	/* There is a problem in mk_include as we access
-	 * go_option_menu_get_type(); through a macro.  So, KEEP this
-	 * comment to make mk_include happy.  --benj  */
-	cs->encodings = GO_OPTION_MENU (go_option_menu_new ());
-
-	g_signal_connect (G_OBJECT (cs->encodings), "changed",
-                          G_CALLBACK (encodings_changed_cb), cs);
-        gtk_box_pack_start (GTK_BOX (cs), GTK_WIDGET (cs->encodings),
-                            TRUE, TRUE, 0);
-}
-
-
-static void cs_build_menu (GOCharmapSel *cs)
-{
-        GtkWidget *item;
-	GtkMenu *menu;
-	LGroupInfo const *lgroup = lgroups;
-	gint lg_cnt = 0;
-
-        menu = GTK_MENU (gtk_menu_new ());
-
-	while (lgroup->group_name) {
-		CharsetInfo const *charset_trans;
-		GtkMenu *submenu;
-		gint cnt = 0;
-
-		item = gtk_menu_item_new_with_label (_(lgroup->group_name));
-
-		submenu = GTK_MENU (gtk_menu_new ());
-		charset_trans = charset_trans_array;
-
-		while (charset_trans->lgroup != LG_LAST) {
-			GtkWidget *subitem;
-			if (charset_trans->lgroup == lgroup->lgroup) {
-				const char *name = (cs->test == GO_CHARMAP_SEL_TO_UTF8)
-					? charset_trans->to_utf8_iconv_name
-					: charset_trans->from_utf8_iconv_name;
-				if (name) {
-					subitem = gtk_check_menu_item_new_with_label
-						(_(charset_trans->charset_title));
-					gtk_widget_show (subitem);
-					gtk_menu_shell_append ( GTK_MENU_SHELL (submenu), subitem );
-					if (charset_trans->imp == CI_MAJOR)
-						cs_emphasize_label (GTK_LABEL (gtk_bin_get_child (GTK_BIN (subitem))));
-					g_object_set_data (G_OBJECT (subitem), CHARMAP_NAME_KEY,
-							   (gpointer)name);
-					cnt++;
-				} else if (0) {
-					g_print ("Unsupported: %s\n", charset_trans->aliases);
-				}
-			}
-			charset_trans++;
-		}
-		if (cnt > 0) {
-			gtk_menu_item_set_submenu ( GTK_MENU_ITEM (item), GTK_WIDGET (submenu) );
-			gtk_widget_show (item);
-			gtk_menu_shell_append ( GTK_MENU_SHELL (menu), item );
-			lg_cnt++;
-		} else {
-			g_object_unref (item);
-		}
-                lgroup++;
-        }
-	item = gtk_separator_menu_item_new ();
-	gtk_widget_show (item);
-	gtk_menu_shell_append ( GTK_MENU_SHELL (menu), item );
-	lg_cnt++;
-
-	{
-		char *locale_encoding_menu_title = g_strconcat (_("Locale: "),
-							      get_locale_encoding_name (cs),
-							      NULL);
-		item = gtk_check_menu_item_new_with_label (locale_encoding_menu_title);
-		g_free (locale_encoding_menu_title);
-		gtk_widget_show (item);
-		gtk_menu_shell_append ( GTK_MENU_SHELL (menu), item );
-		lg_cnt++;
-		cs_emphasize_label (GTK_LABEL (gtk_bin_get_child (GTK_BIN (item))));
-	}
-
-	go_option_menu_set_menu (cs->encodings, GTK_WIDGET (menu));
-	cs->encodings_menu = menu;
-	set_menu_to_default (cs, lg_cnt);
-}
-
-static void cs_class_init (GtkWidgetClass *widget_klass)
-{
-	CharsetInfo *ci;
-	size_t i;
-
-	GObjectClass *gobject_class = G_OBJECT_CLASS (widget_klass);
-	widget_klass->mnemonic_activate = cs_mnemonic_activate;
-
-	gobject_class->set_property = cs_set_property;
-	gobject_class->get_property = cs_get_property;
-
-	cs_signals[CHARMAP_CHANGED] =
-		g_signal_new ("charmap_changed",
-			      GO_CHARMAP_SEL_TYPE,
-			      G_SIGNAL_RUN_LAST,
-			      G_STRUCT_OFFSET (GOCharmapSelClass, charmap_changed),
-			      NULL, NULL,
-			      g_cclosure_marshal_VOID__POINTER,
-			      G_TYPE_NONE, 1, G_TYPE_POINTER);
-
-	g_object_class_install_property (gobject_class,
-					 PROP_TEST_DIRECTION,
-					 g_param_spec_uint ("TestDirection",
-							    _("Conversion Direction"),
-							    _("This value determines which iconv test to perform."),
-							    (guint)GO_CHARMAP_SEL_TO_UTF8,
-							    (guint)GO_CHARMAP_SEL_FROM_UTF8,
-							    (guint)GO_CHARMAP_SEL_TO_UTF8,
-							    G_PARAM_READWRITE));
-
-	/* ---------------------------------------- */
-	/* Sort the groups by translated name.  */
-
-	for (i = 0; i < G_N_ELEMENTS (lgroups) - 2; i++) {
-		const char *cgroup_name = lgroups[i].group_name;
-		const char *group_name = _(cgroup_name);
-		lgroups[i].collate_key = g_utf8_collate_key (group_name, -1);
-		if (!lgroups[i].collate_key) {
-			g_warning ("Failed to generate collation key for [%s] [%s]",
-				   cgroup_name, group_name);
-			if ( lgroups[i].collate_key )
-			     g_free ( lgroups[i].collate_key );
-			lgroups[i].collate_key = my_strdup (group_name);
-		}
-	}
-	qsort (lgroups, G_N_ELEMENTS (lgroups) - 2, sizeof (lgroups[0]),
-	       lgroups_order);
-	for (i = 0; i < G_N_ELEMENTS (lgroups) - 2; i++) {
-		g_free (lgroups[i].collate_key);
-		lgroups[i].collate_key = NULL;
-	}
-
-	/* ---------------------------------------- */
-	/* Sort charsets by group/importance/title.  */
-
-	for (i = 0; i < G_N_ELEMENTS (charset_trans_array) - 1; i++) {
-		const char *ctitle = charset_trans_array[i].charset_title;
-		const char *title = _(ctitle);
-		charset_trans_array[i].collate_key = g_utf8_collate_key (title, -1);
-		if (!charset_trans_array[i].collate_key) {
-			g_warning ("Failed to generate collation key for [%s] [%s]",
-				   ctitle, title);
-			if ( charset_trans_array[i].collate_key )
-			    g_free ( charset_trans_array[i].collate_key );
-			charset_trans_array[i].collate_key = my_strdup (title);
-		}
-	}
-	qsort (charset_trans_array, G_N_ELEMENTS (charset_trans_array) - 1,
-	       sizeof (charset_trans_array[0]), charset_order);
-	for (i = 0; i < G_N_ELEMENTS (charset_trans_array) - 1; i++) {
-		g_free (charset_trans_array[i].collate_key);
-		charset_trans_array[i].collate_key = NULL;
-	}
-
-	/* ---------------------------------------- */
-
-	encoding_hash =
-		g_hash_table_new_full (g_str_hash,
-				       g_str_equal,
-				       (GDestroyNotify)g_free,
-				       NULL);
-
-	for (ci = charset_trans_array; ci->charset_title; ci++) {
-		const char *aliases = ci->aliases;
-		char *autoaliases = NULL;
-
-		if (strchr (aliases, '#') == 0) {
-			/* Sigh.  This sucks quite a lot.  */
-			if (strncmp (aliases, "ISO-", 4) == 0) {
-				autoaliases =
-					g_strconcat (aliases,
-						     "#ISO", aliases + 4,
-						     "#ISO_", aliases + 4,
-						     NULL);
-			}
-
-			if (autoaliases)
-				aliases = autoaliases;
-		}
-
-		ci->to_utf8_iconv_name = ci->from_utf8_iconv_name = NULL;
-		while (aliases) {
-			const char *sep = strchr (aliases, '#');
-			char *alias;
-
-			if (sep) {
-				alias = g_strndup (aliases, sep - aliases);
-				aliases = sep + 1;
-			} else {
-				alias = my_strdup (aliases);
-				aliases = NULL;
-			}
-
-			if (ci->to_utf8_iconv_name == NULL &&
-			    iconv_supported ("UTF-8", alias)) {
-			        if ( ci->to_utf8_iconv_name )
-				    g_free ( ci->to_utf8_iconv_name );
-				ci->to_utf8_iconv_name = my_strdup (alias);
-			}
-
-			if (ci->from_utf8_iconv_name == NULL &&
-			    iconv_supported (alias, "UTF-8")) {
-				if ( ci->from_utf8_iconv_name )
-				    g_free ( ci->from_utf8_iconv_name );
-				ci->from_utf8_iconv_name = my_strdup (alias);
-			}
-
-			g_hash_table_insert (encoding_hash, alias, ci);
-		}
-
-		g_free (autoaliases);
-	}
-}
-
-GtkWidget * go_charmap_sel_new (GOCharmapSelTestDirection test)
-{
-	return g_object_new (GO_CHARMAP_SEL_TYPE, "TestDirection", test, NULL);
-}
-
-gchar const * go_charmap_sel_get_encoding (GOCharmapSel *cs)
-{
-    GtkMenuItem *selection;
-    char const *locale_encoding;
-    char const *encoding;
-
-    g_get_charset (&locale_encoding);
-
-    g_return_val_if_fail (IS_GO_CHARMAP_SEL (cs), locale_encoding);
-
-    selection = GTK_MENU_ITEM (go_option_menu_get_history (cs->encodings));
-    encoding = (char const *) g_object_get_data (G_OBJECT (selection),
-						 CHARMAP_NAME_KEY);
-    return encoding ? encoding : locale_encoding;
-}
-
-static void cb_find_entry (GtkMenuItem *w, struct cb_find_entry *cl)
-{
-	GtkWidget *sub;
-
-	if (cl->found)
-		return;
-
-	sub = gtk_menu_item_get_submenu (w);
-	if (sub) {
-		GSList *tmp = cl->path = g_slist_prepend (cl->path, GINT_TO_POINTER (cl->i));
-		cl->i = 0;
-
-		gtk_container_foreach (GTK_CONTAINER (sub), (GtkCallback)cb_find_entry, cl);
-		if (cl->found)
-			return;
-
-		cl->i = GPOINTER_TO_INT (cl->path->data);
-		cl->path = cl->path->next;
-		g_slist_free_1 (tmp);
-	} else {
-		const char *this_enc =
-			g_object_get_data (G_OBJECT (w), CHARMAP_NAME_KEY);
-		if (this_enc && strcmp (this_enc, cl->enc) == 0) {
-			cl->found = TRUE;
-			cl->path = g_slist_prepend (cl->path, GINT_TO_POINTER (cl->i));
-			cl->path = g_slist_reverse (cl->path);
-			return;
-		}
-	}
-	cl->i++;
-}
-
-/*
- * TODO dOm : this function seems not to be used :
- * warning: ‘go_charmap_sel_set_encoding’ defined but not used
- * Is it possible to remove it ? */
-gboolean go_charmap_sel_set_encoding (GOCharmapSel *cs, const char *enc)
-{
-	struct cb_find_entry cl;
-	CharsetInfo const *ci;
-
-	g_return_val_if_fail (IS_GO_CHARMAP_SEL (cs), FALSE);
-	g_return_val_if_fail (enc != NULL, FALSE);
-
-	ci = g_hash_table_lookup (encoding_hash, enc);
-	if (!ci)
-		return FALSE;
-
-	enc = ci->to_utf8_iconv_name;
-	if (!enc)
-		return FALSE;
-
-	cl.enc = enc;
-	cl.found = FALSE;
-	cl.i = 0;
-	cl.path = NULL;
-
-	gtk_container_foreach (GTK_CONTAINER (cs->encodings_menu),
-			       (GtkCallback)cb_find_entry,
-			       &cl);
-	if (!cl.found)
-		return FALSE;
-
-	go_option_menu_set_history (cs->encodings, cl.path);
-	g_slist_free (cl.path);
-
-	return TRUE;
-}
-
-
-static void cs_set_property (GObject      *object,
-		 guint         prop_id,
-		 const GValue *value,
-		 GParamSpec   *pspec)
-{
-	GOCharmapSel *cs = GO_CHARMAP_SEL (object);
-
-	switch (prop_id) {
-	case PROP_TEST_DIRECTION:
-		cs->test = g_value_get_uint (value);
-		cs_build_menu (cs);
-		break;
-	default:
-		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
-		break;
-	}
-}
-
-
-static void cs_get_property (GObject     *object,
-		 guint        prop_id,
-		 GValue      *value,
-		 GParamSpec  *pspec)
-{
-	GOCharmapSel *cs = GO_CHARMAP_SEL (object);
-
-	switch (prop_id) {
-	case PROP_TEST_DIRECTION:
-		g_value_set_uint (value, (guint)cs->test);
-		break;
-	default:
-		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
-		break;
-	}
-}
diff --git a/src/go-charmap-sel.h b/src/go-charmap-sel.h
deleted file mode 100644
index f9f8809..0000000
--- a/src/go-charmap-sel.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- *  Copyright (C) 2003 Andreas J. Guelzow
- *
- *  based on code by:
- *  Copyright (C) 2000 Marco Pesenti Gritti
- *  from the galeon code base
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2, or (at your option)
- *  any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA.
- */
-
-#ifndef _GO_CHARMAP_SEL_H_
-#define _GO_CHARMAP_SEL_H_
-
-#include <gtk/gtk.h>
-
-G_BEGIN_DECLS
-
-#define GO_CHARMAP_SEL_TYPE        (go_charmap_sel_get_type ())
-#define GO_CHARMAP_SEL(obj)        (G_TYPE_CHECK_INSTANCE_CAST((obj), GO_CHARMAP_SEL_TYPE, GOCharmapSel))
-#define IS_GO_CHARMAP_SEL(obj)     (G_TYPE_CHECK_INSTANCE_TYPE((obj), GO_CHARMAP_SEL_TYPE))
-
-typedef struct _GOCharmapSel GOCharmapSel;
-
-typedef enum {
-	GO_CHARMAP_SEL_TO_UTF8 = 0,
-	GO_CHARMAP_SEL_FROM_UTF8
-} GOCharmapSelTestDirection;
-
-/* START_INCLUDE_H */
-/* END_INCLUDE_H */
-
-/* START_DECLARATION */
-gchar const * go_charmap_sel_get_encoding (GOCharmapSel *cs);
-GtkWidget * go_charmap_sel_new (GOCharmapSelTestDirection test);
-gboolean go_charmap_sel_set_encoding (GOCharmapSel *cs, const char *enc);
-/* END_DECLARATION */
-
-G_END_DECLS
-
-#endif /* _GO_CHARMAP_SEL_H_ */
diff --git a/src/go-optionmenu.c b/src/go-optionmenu.c
deleted file mode 100644
index e740b55..0000000
--- a/src/go-optionmenu.c
+++ /dev/null
@@ -1,1079 +0,0 @@
-/*
- * go-optionmenu.c
- *
- * Copyright (C) 2002 Andreas J. Guelzow <aguelzow at taliesin.ca>
- *
- * based extensively on:
- *
- * GTK - The GIMP Toolkit
- * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
- *
- * Modified by the GTK+ Team and others 1997-2000.  See the GTK AUTHORS
- * file for a list of people on the GTK+ Team.  See the ChangeLog
- * files for a list of changes.  These files are distributed with
- * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
- *
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301
- * USA.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "include.h"
-#include <glib/gi18n.h>
-
-/*START_INCLUDE*/
-#include "go-optionmenu.h"
-#include <gtk/gtkmenu.h>
-#include <gtk/gtkmenuitem.h>
-#include <gtk/gtkcheckmenuitem.h>
-#include <gdk/gdkkeysyms.h>
-/*END_INCLUDE*/
-
-/*START_STATIC*/
-static void connect_menu_signals (GtkMenu *menu, gpointer data);
-static void connect_menu_signals_to_submenu (GtkMenuItem *item, gpointer data);
-static gint go_option_menu_button_press (GtkWidget      *widget,
-			      GdkEventButton *event);
-static void go_option_menu_calc_size (GOOptionMenu *option_menu);
-static void go_option_menu_changed (GOOptionMenu *option_menu);
-static GType go_option_menu_child_type (GtkContainer       *container);
-static void go_option_menu_class_init (GOOptionMenuClass *class);
-static void go_option_menu_destroy (GtkObject *object);
-static void go_option_menu_detacher (GtkWidget     *widget,
-				     GtkMenu	*menu) ;
-static gint go_option_menu_expose (GtkWidget      *widget,
-			GdkEventExpose *event);
-static void go_option_menu_get_property (GObject            *object,
-				   guint               prop_id,
-				   GValue             *value,
-				   GParamSpec         *pspec);
-static void go_option_menu_get_props (GOOptionMenu       *option_menu,
-			   GOOptionMenuProps  *props);
-static void go_option_menu_hide_all (GtkWidget *widget);
-static void go_option_menu_init (GOOptionMenu *option_menu);
-static void go_option_menu_item_destroy_cb (GtkWidget     *widget,
-				 GOOptionMenu *option_menu);
-static void go_option_menu_item_state_changed_cb (GtkWidget      *widget,
-				       GtkStateType    previous_state,
-				       GOOptionMenu  *option_menu);
-static gint go_option_menu_key_press (GtkWidget   *widget,
-			   GdkEventKey *event);
-static gboolean go_option_menu_mnemonic_activate (GtkWidget *widget,
-				   gboolean   group_cycling);
-static void go_option_menu_paint (GtkWidget    *widget,
-		       GdkRectangle *area);
-static void go_option_menu_position (GtkMenu  *menu,
-			  gint     *x,
-			  gint     *y,
-			  gboolean *push_in,
-			  gpointer  user_data);
-static void go_option_menu_remove_contents (GOOptionMenu *option_menu);
-static void go_option_menu_remove_menu (GOOptionMenu *option_menu);
-static gint go_option_menu_scroll_event (GtkWidget          *widget,
-			      GdkEventScroll     *event);
-static void go_option_menu_select_first_sensitive (GOOptionMenu *option_menu);
-static void go_option_menu_selection_done (GtkMenu  *menu,
-				GOOptionMenu *option_menu);
-static void go_option_menu_set_property (GObject            *object,
-			      guint               prop_id,
-			      const GValue       *value,
-			      GParamSpec         *pspec);
-static void go_option_menu_show_all (GtkWidget *widget);
-static void go_option_menu_size_allocate (GtkWidget     *widget,
-				    GtkAllocation *allocation);
-static void go_option_menu_size_request (GtkWidget      *widget,
-				   GtkRequisition *requisition);
-static void go_option_menu_update_contents (GOOptionMenu *option_menu, GtkMenu *menu);
-static void go_option_menu_update_contents_real (GOOptionMenu *option_menu,
-					   GtkMenu *menu, GtkMenuItem *menu_item);
-/*END_STATIC*/
-
-/*START_EXTERN*/
-/*END_EXTERN*/
-
-
-static void go_option_menu_class_init      (GOOptionMenuClass *klass);
-static void go_option_menu_init            (GOOptionMenu      *option_menu);
-static void go_option_menu_destroy         (GtkObject          *object);
-static void go_option_menu_set_property    (GObject            *object,
-						  guint               prop_id,
-						  const GValue       *value,
-						  GParamSpec         *pspec);
-static void go_option_menu_get_property    (GObject            *object,
-						  guint               prop_id,
-						  GValue             *value,
-						  GParamSpec         *pspec);
-static void go_option_menu_size_request    (GtkWidget          *widget,
-						  GtkRequisition     *requisition);
-static void go_option_menu_size_allocate   (GtkWidget          *widget,
-						  GtkAllocation      *allocation);
-static void go_option_menu_paint           (GtkWidget          *widget,
-						  GdkRectangle       *area);
-static gint go_option_menu_expose          (GtkWidget          *widget,
-						  GdkEventExpose     *event);
-static gint go_option_menu_button_press    (GtkWidget          *widget,
-						  GdkEventButton     *event);
-static gint go_option_menu_key_press       (GtkWidget          *widget,
-						  GdkEventKey        *event);
-static void go_option_menu_selection_done  (GtkMenu            *menu,
-						  GOOptionMenu *option_menu);
-static void go_option_menu_update_contents (GOOptionMenu *option_menu, GtkMenu *menu);
-static void go_option_menu_remove_contents (GOOptionMenu *option_menu);
-static void go_option_menu_calc_size       (GOOptionMenu *option_menu);
-static void go_option_menu_position        (GtkMenu            *menu,
-						  gint               *x,
-						  gint               *y,
-						  gint               *scroll_offet,
-						  gpointer            user_data);
-static void go_option_menu_show_all        (GtkWidget          *widget);
-static void go_option_menu_hide_all        (GtkWidget          *widget);
-static gboolean go_option_menu_mnemonic_activate (GtkWidget    *widget,
-							gboolean      group_cycling);
-static GType go_option_menu_child_type   (GtkContainer       *container);
-static gint go_option_menu_scroll_event    (GtkWidget          *widget,
-						  GdkEventScroll     *event);
-
-enum
-{
-  CHANGED,
-  LAST_SIGNAL
-};
-
-enum
-{
-  PROP_0,
-  PROP_MENU,
-  LAST_PROP
-};
-
-static const GOOptionMenuProps default_props = {
-  TRUE,
-  { 7, 13 },
-  { 7, 5, 2, 2 },		/* Left, right, top, bottom */
-  1,
-  0
-};
-
-static GtkButtonClass *parent_class = NULL;
-static guint           signals[LAST_SIGNAL] = { 0 };
-
-
-GType go_option_menu_get_type (void)
-{
-  static GType option_menu_type = 0;
-
-  if (!option_menu_type)
-    {
-      static const GTypeInfo option_menu_info =
-      {
-	sizeof (GOOptionMenuClass),
-	NULL,		/* base_init */
-	NULL,		/* base_finalize */
-	(GClassInitFunc) go_option_menu_class_init,
-	NULL,		/* class_finalize */
-	NULL,		/* class_data */
-	sizeof (GOOptionMenu),
-	0,		/* n_preallocs */
-	(GInstanceInitFunc) go_option_menu_init,
-      };
-
-      option_menu_type =
-	g_type_register_static (GTK_TYPE_BUTTON, "GOOptionMenu",
-				&option_menu_info, 0);
-    }
-
-  return option_menu_type;
-}
-
-static void go_option_menu_class_init (GOOptionMenuClass *class)
-{
-  GObjectClass *gobject_class;
-  GtkObjectClass *object_class;
-  GtkWidgetClass *widget_class;
-  GtkButtonClass *button_class;
-  GtkContainerClass *container_class;
-
-  gobject_class = (GObjectClass*) class;
-  object_class = (GtkObjectClass*) class;
-  widget_class = (GtkWidgetClass*) class;
-  button_class = (GtkButtonClass*) class;
-  container_class = (GtkContainerClass*) class;
-
-  parent_class = g_type_class_peek_parent (class);
-
-  signals[CHANGED] =
-    g_signal_new ("changed",
-                  G_OBJECT_CLASS_TYPE (class),
-                  G_SIGNAL_RUN_LAST,
-                  G_STRUCT_OFFSET (GOOptionMenuClass, changed),
-                  NULL, NULL,
-                  g_cclosure_marshal_VOID__VOID,
-                  G_TYPE_NONE, 0);
-
-  gobject_class->set_property = go_option_menu_set_property;
-  gobject_class->get_property = go_option_menu_get_property;
-  object_class->destroy = go_option_menu_destroy;
-
-  widget_class->size_request = go_option_menu_size_request;
-  widget_class->size_allocate = go_option_menu_size_allocate;
-  widget_class->expose_event = go_option_menu_expose;
-  widget_class->button_press_event = go_option_menu_button_press;
-  widget_class->key_press_event = go_option_menu_key_press;
-  widget_class->scroll_event = go_option_menu_scroll_event;
-  widget_class->show_all = go_option_menu_show_all;
-  widget_class->hide_all = go_option_menu_hide_all;
-  widget_class->mnemonic_activate = go_option_menu_mnemonic_activate;
-
-  container_class->child_type = go_option_menu_child_type;
-
-  g_object_class_install_property (gobject_class,
-                                   PROP_MENU,
-                                   g_param_spec_object ("menu",
-                                                        _("Menu"),
-                                                        _("The menu of options"),
-                                                        GTK_TYPE_MENU,
-                                                        G_PARAM_READABLE | G_PARAM_WRITABLE));
-
-  gtk_widget_class_install_style_property (widget_class,
-					   g_param_spec_boxed ("indicator_size",
-							       _("Indicator Size"),
-							       _("Size of dropdown indicator"),
-							       GTK_TYPE_REQUISITION,
-							       G_PARAM_READABLE));
-  gtk_widget_class_install_style_property (widget_class,
-					   g_param_spec_boxed ("indicator_spacing",
-							       _("Indicator Spacing"),
-							       _("Spacing around indicator"),
-							       GTK_TYPE_BORDER,
-							       G_PARAM_READABLE));
-}
-
-static GType go_option_menu_child_type (GtkContainer       *container)
-{
-  return G_TYPE_NONE;
-}
-
-static void go_option_menu_init (GOOptionMenu *option_menu)
-{
-  GTK_WIDGET_SET_FLAGS (option_menu, GTK_CAN_FOCUS);
-  GTK_WIDGET_UNSET_FLAGS (option_menu, GTK_CAN_DEFAULT | GTK_RECEIVES_DEFAULT);
-
-  option_menu->menu = NULL;
-  option_menu->select_menu = NULL;
-  option_menu->menu_item = NULL;
-  option_menu->old_menu_item = NULL;
-  option_menu->last_signaled_menu_item = NULL;
-  option_menu->selection = NULL;
-  option_menu->new_selection = TRUE;
-  option_menu->width = 0;
-  option_menu->height = 0;
-}
-
-GtkWidget* go_option_menu_new (void)
-{
-  return g_object_new (GO_TYPE_OPTION_MENU, NULL);
-}
-
-/* TODO dOm : this function seems not to be used. Is it possible to remove it ?
-GtkWidget* go_option_menu_get_menu (GOOptionMenu *option_menu)
-{
-  g_return_val_if_fail (GO_IS_OPTION_MENU (option_menu), NULL);
-
-  return option_menu->menu;
-}
-*/
-
-static void go_option_menu_detacher (GtkWidget     *widget,
-				     GtkMenu	*menu)
-{
-  GOOptionMenu *option_menu;
-
-  g_return_if_fail (GO_IS_OPTION_MENU (widget));
-
-  option_menu = GO_OPTION_MENU (widget);
-  g_return_if_fail (option_menu->menu == (GtkWidget*) menu);
-
-  go_option_menu_remove_contents (option_menu);
-  g_signal_handlers_disconnect_by_func (option_menu->menu,
-					go_option_menu_selection_done,
-					option_menu);
-  g_signal_handlers_disconnect_by_func (option_menu->menu,
-					go_option_menu_calc_size,
-					option_menu);
-
-  option_menu->menu = NULL;
-  g_object_notify (G_OBJECT (option_menu), "menu");
-}
-
-static void connect_menu_signals (GtkMenu *menu, gpointer data);
-
-static void connect_menu_signals_to_submenu (GtkMenuItem *item, gpointer data)
-{
-	GtkMenu *menu = GTK_MENU(gtk_menu_item_get_submenu (item));
-
-	if (menu)
-		connect_menu_signals (menu, data);
-}
-
-
-static void connect_menu_signals (GtkMenu *menu, gpointer data)
-{
-	GList *children;
-
-	g_signal_connect_after (menu, "selection_done",
-				G_CALLBACK (go_option_menu_selection_done),
-				data);
-	children = gtk_container_get_children (GTK_CONTAINER(menu));
-	g_list_foreach (children, (GFunc)connect_menu_signals_to_submenu, data);
-	g_list_free (children);
-}
-
-
-void go_option_menu_set_menu (GOOptionMenu *option_menu,
-			       GtkWidget *menu)
-{
-  g_return_if_fail (GO_IS_OPTION_MENU (option_menu));
-  g_return_if_fail (GTK_IS_MENU (menu));
-
-  if (option_menu->menu != menu)
-    {
-      go_option_menu_remove_menu (option_menu);
-
-      option_menu->menu = menu;
-      gtk_menu_attach_to_widget (GTK_MENU (menu),
-				 GTK_WIDGET (option_menu),
-				 go_option_menu_detacher);
-
-      go_option_menu_calc_size (option_menu);
-
-      connect_menu_signals (GTK_MENU(option_menu->menu), option_menu);
-
-      g_signal_connect_swapped (option_menu->menu, "size_request",
-				G_CALLBACK (go_option_menu_calc_size),
-				option_menu);
-
-      if (GTK_WIDGET (option_menu)->parent)
-	gtk_widget_queue_resize (GTK_WIDGET (option_menu));
-
-      go_option_menu_update_contents (option_menu, NULL);
-
-      g_object_notify (G_OBJECT (option_menu), "menu");
-    }
-}
-
-void go_option_menu_remove_menu (GOOptionMenu *option_menu)
-{
-  g_return_if_fail (GO_IS_OPTION_MENU (option_menu));
-
-  if (option_menu->menu)
-    {
-      if (GTK_MENU_SHELL (option_menu->menu)->active)
-	g_signal_emit_by_name (option_menu->menu, "cancel", 0);
-
-      gtk_menu_detach (GTK_MENU (option_menu->menu));
-    }
-}
-
-void go_option_menu_set_history (GOOptionMenu *option_menu, GSList *selection)
-{
-  GtkWidget *item;
-
-  g_return_if_fail (selection != NULL);
-  g_return_if_fail (GO_IS_OPTION_MENU (option_menu));
-
-  if (option_menu->menu)
-    {
-	    GtkMenu *menu = GTK_MENU(option_menu->menu);
-
-	    while (selection->next) {
-		    GList *children = gtk_container_get_children (GTK_CONTAINER(menu));
-		    gint index = GPOINTER_TO_INT (selection->data);
-		    item = GTK_WIDGET(g_list_nth_data (children, index));
-		    menu = GTK_MENU(gtk_menu_item_get_submenu (GTK_MENU_ITEM(item)));
-		    selection = selection->next;
-		    g_list_free (children);
-	    }
-
-	    gtk_menu_set_active (menu,  GPOINTER_TO_INT (selection->data));
-	    item = gtk_menu_get_active (menu);
-	    if (item != option_menu->menu_item)
-		    go_option_menu_update_contents (option_menu, menu);
-	    g_slist_free (option_menu->selection);
-	    option_menu->selection = g_slist_copy (selection);
-    }
-}
-
-/**
- * go_option_menu_get_history:
- * @option_menu: a #GOOptionMenu
- *
- * Retrieves the currently selected menu item. The menu
- * items are numbered from top to bottom, starting with 0.
- *
- * Return value: the selected menu_item
- **/
-
-GtkWidget * go_option_menu_get_history (GOOptionMenu *option_menu)
-{
-     return GTK_WIDGET(option_menu->menu_item);
-}
-
-
-
-
-static void go_option_menu_set_property (GObject            *object,
-			      guint               prop_id,
-			      const GValue       *value,
-			      GParamSpec         *pspec)
-{
-  GOOptionMenu *option_menu = GO_OPTION_MENU (object);
-
-  switch (prop_id)
-    {
-    case PROP_MENU:
-      go_option_menu_set_menu (option_menu, g_value_get_object (value));
-      break;
-
-    default:
-      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
-      break;
-    }
-}
-
-static void go_option_menu_get_property (GObject            *object,
-				   guint               prop_id,
-				   GValue             *value,
-				   GParamSpec         *pspec)
-{
-  GOOptionMenu *option_menu = GO_OPTION_MENU (object);
-
-  switch (prop_id)
-    {
-    case PROP_MENU:
-      g_value_set_object (value, option_menu->menu);
-      break;
-
-    default:
-      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
-      break;
-    }
-}
-
-static void go_option_menu_destroy (GtkObject *object)
-{
-  GOOptionMenu *option_menu;
-
-  g_return_if_fail (GO_IS_OPTION_MENU (object));
-
-  option_menu = GO_OPTION_MENU (object);
-
-  if (option_menu->selection) {
-	  g_slist_free (option_menu->selection);
-	  option_menu->selection = NULL;
-  }
-
-  if (option_menu->menu)
-    gtk_widget_destroy (option_menu->menu);
-
-  if (GTK_OBJECT_CLASS (parent_class)->destroy)
-    (* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
-}
-
-static void go_option_menu_get_props (GOOptionMenu       *option_menu,
-			   GOOptionMenuProps  *props)
-{
-  GtkRequisition *indicator_size;
-  GtkBorder *indicator_spacing;
-
-  gtk_widget_style_get (GTK_WIDGET (option_menu),
-			"indicator_size", &indicator_size,
-			"indicator_spacing", &indicator_spacing,
-			"interior_focus", &props->interior_focus,
-			"focus_line_width", &props->focus_width,
-			"focus_padding", &props->focus_pad,
-			NULL);
-
-  if (indicator_size)
-    props->indicator_size = *indicator_size;
-  else
-    props->indicator_size = default_props.indicator_size;
-
-  if (indicator_spacing)
-    props->indicator_spacing = *indicator_spacing;
-  else
-    props->indicator_spacing = default_props.indicator_spacing;
-
-  g_free (indicator_size);
-  g_free (indicator_spacing);
-}
-
-static void go_option_menu_size_request (GtkWidget      *widget,
-				   GtkRequisition *requisition)
-{
-  GOOptionMenu *option_menu = GO_OPTION_MENU (widget);
-  GOOptionMenuProps props;
-  gint tmp;
-  GtkRequisition child_requisition = { 0, 0 };
-
-  go_option_menu_get_props (option_menu, &props);
-
-  if (GTK_BIN (option_menu)->child && GTK_WIDGET_VISIBLE (GTK_BIN (option_menu)->child))
-    {
-      gtk_widget_size_request (GTK_BIN (option_menu)->child, &child_requisition);
-
-      requisition->width += child_requisition.width;
-      requisition->height += child_requisition.height;
-    }
-
-  requisition->width = ((GTK_CONTAINER (widget)->border_width +
-			 GTK_WIDGET (widget)->style->xthickness + props.focus_pad) * 2 +
-			MAX (child_requisition.width, option_menu->width) +
- 			props.indicator_size.width +
- 			props.indicator_spacing.left + props.indicator_spacing.right +
-			CHILD_LEFT_SPACING + CHILD_RIGHT_SPACING + props.focus_width * 2);
-  requisition->height = ((GTK_CONTAINER (widget)->border_width +
-			  GTK_WIDGET (widget)->style->ythickness + props.focus_pad) * 2 +
-			 MAX (child_requisition.height, option_menu->height) +
-			 CHILD_TOP_SPACING + CHILD_BOTTOM_SPACING + props.focus_width * 2);
-
-  tmp = (requisition->height - MAX (child_requisition.height, option_menu->height) +
-	 props.indicator_size.height + props.indicator_spacing.top + props.indicator_spacing.bottom);
-  requisition->height = MAX (requisition->height, tmp);
-}
-
-static void go_option_menu_size_allocate (GtkWidget     *widget,
-				    GtkAllocation *allocation)
-{
-  GtkWidget *child;
-  GtkButton *button = GTK_BUTTON (widget);
-  GtkAllocation child_allocation;
-  GOOptionMenuProps props;
-  gint border_width;
-
-  go_option_menu_get_props (GO_OPTION_MENU (widget), &props);
-  border_width = GTK_CONTAINER (widget)->border_width;
-
-  widget->allocation = *allocation;
-  if (GTK_WIDGET_REALIZED (widget))
-    gdk_window_move_resize (button->event_window,
-			    allocation->x + border_width, allocation->y + border_width,
-			    allocation->width - border_width * 2, allocation->height - border_width * 2);
-
-  child = GTK_BIN (widget)->child;
-  if (child && GTK_WIDGET_VISIBLE (child))
-    {
-      gint xthickness = GTK_WIDGET (widget)->style->xthickness;
-      gint ythickness = GTK_WIDGET (widget)->style->ythickness;
-
-      child_allocation.x = widget->allocation.x + border_width + xthickness + props.focus_width + props.focus_pad + CHILD_LEFT_SPACING;
-      child_allocation.y = widget->allocation.y + border_width + ythickness + props.focus_width + props.focus_pad + CHILD_TOP_SPACING;
-      child_allocation.width = MAX (1, allocation->width - (border_width + xthickness + props.focus_width + props.focus_pad) * 2 -
-				    props.indicator_size.width - props.indicator_spacing.left - props.indicator_spacing.right -
-				    CHILD_LEFT_SPACING - CHILD_RIGHT_SPACING);
-      child_allocation.height = MAX (1, allocation->height - (border_width + ythickness + props.focus_width + props.focus_pad) * 2 -
-				     CHILD_TOP_SPACING - CHILD_BOTTOM_SPACING);
-
-      if (gtk_widget_get_direction (GTK_WIDGET (widget)) == GTK_TEXT_DIR_RTL)
-	child_allocation.x += props.indicator_size.width + props.indicator_spacing.left + props.indicator_spacing.right;
-
-      gtk_widget_size_allocate (child, &child_allocation);
-    }
-}
-
-static void go_option_menu_paint (GtkWidget    *widget,
-		       GdkRectangle *area)
-{
-  GdkRectangle button_area;
-  GOOptionMenuProps props;
-  gint border_width;
-  gint tab_x;
-
-  g_return_if_fail (GO_IS_OPTION_MENU (widget));
-  g_return_if_fail (area != NULL);
-
-  if (GTK_WIDGET_DRAWABLE (widget))
-    {
-      border_width = GTK_CONTAINER (widget)->border_width;
-      go_option_menu_get_props (GO_OPTION_MENU (widget), &props);
-
-      button_area.x = widget->allocation.x + border_width;
-      button_area.y = widget->allocation.y + border_width;
-      button_area.width = widget->allocation.width - 2 * border_width;
-      button_area.height = widget->allocation.height - 2 * border_width;
-
-      if (!props.interior_focus && GTK_WIDGET_HAS_FOCUS (widget))
-	{
-	  button_area.x += props.focus_width + props.focus_pad;
-	  button_area.y += props.focus_width + props.focus_pad;
-	  button_area.width -= 2 * (props.focus_width + props.focus_pad);
-	  button_area.height -= 2 * (props.focus_width + props.focus_pad);
-	}
-
-      gtk_paint_box (widget->style, widget->window,
-		     GTK_WIDGET_STATE (widget), GTK_SHADOW_OUT,
-		     area, widget, "optionmenu",
-		     button_area.x, button_area.y,
-		     button_area.width, button_area.height);
-
-      if (gtk_widget_get_direction (GTK_WIDGET (widget)) == GTK_TEXT_DIR_RTL)
-	tab_x = button_area.x + props.indicator_spacing.right +
-	  widget->style->xthickness;
-      else
-	tab_x = button_area.x + button_area.width -
-	  props.indicator_size.width - props.indicator_spacing.right -
-	  widget->style->xthickness;
-
-      gtk_paint_tab (widget->style, widget->window,
-		     GTK_WIDGET_STATE (widget), GTK_SHADOW_OUT,
-		     area, widget, "optionmenutab",
-		     tab_x,
-		     button_area.y + (button_area.height - props.indicator_size.height) / 2,
-		     props.indicator_size.width, props.indicator_size.height);
-
-      if (GTK_WIDGET_HAS_FOCUS (widget))
-	{
-	  if (props.interior_focus)
-	    {
-	      button_area.x += widget->style->xthickness + props.focus_pad;
-	      button_area.y += widget->style->ythickness + props.focus_pad;
-	      button_area.width -= 2 * (widget->style->xthickness + props.focus_pad) +
-		      props.indicator_spacing.left +
-		      props.indicator_spacing.right +
-		      props.indicator_size.width;
-	      button_area.height -= 2 * (widget->style->ythickness + props.focus_pad);
-	      if (gtk_widget_get_direction (GTK_WIDGET (widget)) == GTK_TEXT_DIR_RTL)
-		button_area.x += props.indicator_spacing.left +
-		  props.indicator_spacing.right +
-		  props.indicator_size.width;
-	    }
-	  else
-	    {
-	      button_area.x -= props.focus_width + props.focus_pad;
-	      button_area.y -= props.focus_width + props.focus_pad;
-	      button_area.width += 2 * (props.focus_width + props.focus_pad);
-	      button_area.height += 2 * (props.focus_width + props.focus_pad);
-	    }
-
-	  gtk_paint_focus (widget->style, widget->window, GTK_WIDGET_STATE (widget),
-			   area, widget, "button",
-			   button_area.x,
-			   button_area.y,
-			   button_area.width,
-			   button_area.height);
-	}
-    }
-}
-
-static gint go_option_menu_expose (GtkWidget      *widget,
-			GdkEventExpose *event)
-{
-  g_return_val_if_fail (GO_IS_OPTION_MENU (widget), FALSE);
-  g_return_val_if_fail (event != NULL, FALSE);
-
-  if (GTK_WIDGET_DRAWABLE (widget))
-    {
-      go_option_menu_paint (widget, &event->area);
-
-      if (GTK_BIN (widget)->child)
-	gtk_container_propagate_expose (GTK_CONTAINER (widget),
-					GTK_BIN (widget)->child,
-					event);
-    }
-
-  return FALSE;
-}
-
-static gint go_option_menu_button_press (GtkWidget      *widget,
-			      GdkEventButton *event)
-{
-  GOOptionMenu *option_menu;
-  GtkWidget *menu_item;
-
-  g_return_val_if_fail (GO_IS_OPTION_MENU (widget), FALSE);
-  g_return_val_if_fail (event != NULL, FALSE);
-
-  option_menu = GO_OPTION_MENU (widget);
-
-  if ((event->type == GDK_BUTTON_PRESS) &&
-      (event->button == 1))
-    {
-	    option_menu->new_selection = TRUE;
-	    option_menu->old_menu_item = option_menu->menu_item;
-	    go_option_menu_remove_contents (option_menu);
-	    gtk_menu_popup (GTK_MENU (option_menu->menu), NULL, NULL,
-			    go_option_menu_position, option_menu,
-			    event->button, event->time);
-	    menu_item = gtk_menu_get_active (GTK_MENU (option_menu->menu));
-	    if (menu_item)
-		    gtk_menu_shell_select_item (GTK_MENU_SHELL (option_menu->menu), menu_item);
-	    else
-		    gtk_menu_shell_select_item (GTK_MENU_SHELL (option_menu->select_menu),
-						option_menu->old_menu_item);
-
-      return TRUE;
-    }
-
-  return FALSE;
-}
-
-static gint go_option_menu_key_press (GtkWidget   *widget,
-			   GdkEventKey *event)
-{
-  GOOptionMenu *option_menu;
-  GtkWidget *menu_item;
-
-  g_return_val_if_fail (GO_IS_OPTION_MENU (widget), FALSE);
-  g_return_val_if_fail (event != NULL, FALSE);
-
-  option_menu = GO_OPTION_MENU (widget);
-
-  switch (event->keyval)
-    {
-    case GDK_KP_Space:
-    case GDK_space:
-	    option_menu->new_selection= TRUE;
-	    option_menu->old_menu_item = option_menu->menu_item;
-	    go_option_menu_remove_contents (option_menu);
-	    gtk_menu_popup (GTK_MENU (option_menu->menu), NULL, NULL,
-			    go_option_menu_position, option_menu,
-			    0, event->time);
-	    menu_item = gtk_menu_get_active (GTK_MENU (option_menu->menu));
-	    if (menu_item)
-		    gtk_menu_shell_select_item (GTK_MENU_SHELL (option_menu->menu), menu_item);
-	    else
-		    gtk_menu_shell_select_item (GTK_MENU_SHELL (option_menu->select_menu),
-						option_menu->old_menu_item);
-	    return TRUE;
-    }
-
-  return FALSE;
-}
-
-static void go_option_menu_selection_done (GtkMenu  *menu,
-				GOOptionMenu *option_menu)
-{
-  g_return_if_fail (menu != NULL);
-  g_return_if_fail (GO_IS_OPTION_MENU (option_menu));
-
-  go_option_menu_update_contents (option_menu, menu);
-}
-
-static void go_option_menu_changed (GOOptionMenu *option_menu)
-{
-  g_return_if_fail (GO_IS_OPTION_MENU (option_menu));
-
-  if (option_menu->last_signaled_menu_item && GTK_IS_CHECK_MENU_ITEM(option_menu->last_signaled_menu_item))
-	  gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM(option_menu->last_signaled_menu_item),
-					  FALSE);
-
-  option_menu->last_signaled_menu_item = option_menu->menu_item;
-  if (option_menu->last_signaled_menu_item
-      && GTK_IS_CHECK_MENU_ITEM(option_menu->last_signaled_menu_item))
-          gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM(option_menu->last_signaled_menu_item),
-					  TRUE);
-
-  g_signal_emit (option_menu, signals[CHANGED], 0);
-}
-
-static void go_option_menu_select_first_sensitive (GOOptionMenu *option_menu)
-{
-}
-
-static void go_option_menu_item_state_changed_cb (GtkWidget      *widget,
-				       GtkStateType    previous_state,
-				       GOOptionMenu  *option_menu)
-{
-  GtkWidget *child = GTK_BIN (option_menu)->child;
-
-  if (child && GTK_WIDGET_SENSITIVE (child) != GTK_WIDGET_IS_SENSITIVE (widget))
-    gtk_widget_set_sensitive (child, GTK_WIDGET_IS_SENSITIVE (widget));
-}
-
-static void go_option_menu_item_destroy_cb (GtkWidget     *widget,
-				 GOOptionMenu *option_menu)
-{
-  GtkWidget *child = GTK_BIN (option_menu)->child;
-
-  if (child)
-    {
-      g_object_ref (child);
-      go_option_menu_remove_contents (option_menu);
-      gtk_widget_destroy (child);
-      g_object_unref (child);
-
-      go_option_menu_select_first_sensitive (option_menu);
-    }
-}
-
-static void go_option_menu_update_contents_real (GOOptionMenu *option_menu,
-					   GtkMenu *menu, GtkMenuItem *menu_item)
-{
-	GtkWidget *child;
-	GtkRequisition child_requisition;
-
-	g_return_if_fail (option_menu != NULL);
-	g_return_if_fail (menu_item != NULL);
-	g_return_if_fail (menu != NULL);
-
-	go_option_menu_remove_contents (option_menu);
-	option_menu->menu_item = GTK_WIDGET(menu_item);
-	option_menu->old_menu_item = NULL;
-	option_menu->select_menu = GTK_WIDGET(menu);
-	g_object_ref (option_menu->menu_item);
-	child = GTK_BIN (option_menu->menu_item)->child;
-	if (child)
-	{
-		if (!GTK_WIDGET_IS_SENSITIVE (option_menu->menu_item))
-			gtk_widget_set_sensitive (child, FALSE);
-		gtk_widget_reparent (child, GTK_WIDGET (option_menu));
-	}
-
-	g_signal_connect (option_menu->menu_item, "state_changed",
-			  G_CALLBACK (go_option_menu_item_state_changed_cb), option_menu);
-	g_signal_connect (option_menu->menu_item, "destroy",
-			  G_CALLBACK (go_option_menu_item_destroy_cb), option_menu);
-
-	gtk_widget_size_request (child, &child_requisition);
-	gtk_widget_size_allocate (GTK_WIDGET (option_menu),
-				  &(GTK_WIDGET (option_menu)->allocation));
-
-	if (GTK_WIDGET_DRAWABLE (option_menu))
-		gtk_widget_queue_draw (GTK_WIDGET (option_menu));
-}
-
-
-
-static void go_option_menu_update_contents (GOOptionMenu *option_menu, GtkMenu *menu)
-{
-  g_return_if_fail (GO_IS_OPTION_MENU (option_menu));
-
-  if (option_menu->menu)
-  {
-	  GtkWidget *old_item = option_menu->menu_item;
-	  GtkWidget *new_item;
-
-	  new_item = menu ? gtk_menu_get_active (menu) :
-		  gtk_menu_get_active (GTK_MENU(option_menu->menu));
-
- 	  if (new_item && !gtk_menu_item_get_submenu (GTK_MENU_ITEM(new_item))) {
-		  g_slist_free (option_menu->selection);
-		  option_menu->selection = NULL;
-
-		  go_option_menu_update_contents_real (option_menu,
-							     menu ? menu : GTK_MENU(option_menu->menu),
-							     GTK_MENU_ITEM(new_item));
-	  } else {
-		  if (option_menu->old_menu_item)
-			  go_option_menu_update_contents_real (option_menu,
-								     GTK_MENU(option_menu->select_menu),
-								     GTK_MENU_ITEM(option_menu->old_menu_item));
-	  }
-	  if (new_item && !(gtk_menu_item_get_submenu (GTK_MENU_ITEM(new_item)) && option_menu->new_selection)) {
-		  GList *children = gtk_container_get_children (GTK_CONTAINER(menu ? menu : GTK_MENU(option_menu->menu)));
-		  option_menu->selection = g_slist_prepend(option_menu->selection,
-							   GINT_TO_POINTER(g_list_position
-									   (children, g_list_find (children, new_item))));
-		  g_list_free (children);
-		  option_menu->new_selection = FALSE;
-	  }
-
-	  if (old_item != option_menu->menu_item)
-		  go_option_menu_changed (option_menu);
-  }
-}
-
-static void go_option_menu_remove_contents (GOOptionMenu *option_menu)
-{
-  GtkWidget *child;
-
-  g_return_if_fail (GO_IS_OPTION_MENU (option_menu));
-
-  if (option_menu->menu_item)
-    {
-      child = GTK_BIN (option_menu)->child;
-
-      if (child)
-	{
-	  gtk_widget_set_sensitive (child, TRUE);
-	  gtk_widget_reparent (child, option_menu->menu_item);
-	}
-
-      g_signal_handlers_disconnect_by_func (option_menu->menu_item,
-					    go_option_menu_item_state_changed_cb,
-					    option_menu);
-      g_signal_handlers_disconnect_by_func (option_menu->menu_item,
-					    go_option_menu_item_destroy_cb,
-					    option_menu);
-      g_object_unref (option_menu->menu_item);
-      option_menu->menu_item = NULL;
-    }
-}
-
-static void go_option_menu_calc_size (GOOptionMenu *option_menu)
-{
-  GtkWidget *child;
-  GList *children;
-  GtkRequisition child_requisition;
-  gint old_width = option_menu->width;
-  gint old_height = option_menu->height;
-
-  g_return_if_fail (GO_IS_OPTION_MENU (option_menu));
-
-  option_menu->width = 0;
-  option_menu->height = 0;
-
-  if (option_menu->menu)
-    {
-      children = GTK_MENU_SHELL (option_menu->menu)->children;
-      while (children)
-	{
-	  child = children->data;
-	  children = children->next;
-
-	  if (GTK_WIDGET_VISIBLE (child))
-	    {
-	      GtkWidget *inner = GTK_BIN (child)->child;
-
-	      if (inner)
-		{
-		  gtk_widget_size_request (inner, &child_requisition);
-
-		  option_menu->width = MAX (option_menu->width, child_requisition.width);
-		  option_menu->height = MAX (option_menu->height, child_requisition.height);
-		}
-	    }
-	}
-    }
-
-  if (old_width != option_menu->width || old_height != option_menu->height)
-    gtk_widget_queue_resize (GTK_WIDGET (option_menu));
-}
-
-static void go_option_menu_position (GtkMenu  *menu,
-			  gint     *x,
-			  gint     *y,
-			  gboolean *push_in,
-			  gpointer  user_data)
-{
-  GOOptionMenu *option_menu;
-  GtkWidget *active;
-  GtkWidget *child;
-  GtkWidget *widget;
-  GtkRequisition requisition;
-  GList *children;
-  gint screen_width;
-  gint menu_xpos;
-  gint menu_ypos;
-  gint menu_width;
-
-  g_return_if_fail (GO_IS_OPTION_MENU (user_data));
-
-  option_menu = GO_OPTION_MENU (user_data);
-  widget = GTK_WIDGET (option_menu);
-
-  gtk_widget_get_child_requisition (GTK_WIDGET (menu), &requisition);
-  menu_width = requisition.width;
-
-  active = gtk_menu_get_active (GTK_MENU (option_menu->menu));
-  gdk_window_get_origin (widget->window, &menu_xpos, &menu_ypos);
-
-  menu_xpos += widget->allocation.x;
-  menu_ypos += widget->allocation.y + widget->allocation.height / 2 - 2;
-
-  if (active != NULL)
-    {
-      gtk_widget_get_child_requisition (active, &requisition);
-      menu_ypos -= requisition.height / 2;
-    }
-
-  children = GTK_MENU_SHELL (option_menu->menu)->children;
-  while (children)
-    {
-      child = children->data;
-
-      if (active == child)
-	break;
-
-      if (GTK_WIDGET_VISIBLE (child))
-	{
-	  gtk_widget_get_child_requisition (child, &requisition);
-	  menu_ypos -= requisition.height;
-	}
-
-      children = children->next;
-    }
-
-  screen_width = gdk_screen_get_width (gtk_widget_get_screen (widget));
-
-  if (menu_xpos < 0)
-    menu_xpos = 0;
-  else if ((menu_xpos + menu_width) > screen_width)
-    menu_xpos -= ((menu_xpos + menu_width) - screen_width);
-
-  *x = menu_xpos;
-  *y = menu_ypos;
-  *push_in = TRUE;
-}
-
-
-static void go_option_menu_show_all (GtkWidget *widget)
-{
-  GtkContainer *container;
-  GOOptionMenu *option_menu;
-
-  g_return_if_fail (GO_IS_OPTION_MENU (widget));
-  container = GTK_CONTAINER (widget);
-  option_menu = GO_OPTION_MENU (widget);
-
-  gtk_widget_show (widget);
-  gtk_container_foreach (container, (GtkCallback) gtk_widget_show_all, NULL);
-  if (option_menu->menu)
-    gtk_widget_show_all (option_menu->menu);
-  if (option_menu->menu_item)
-    gtk_widget_show_all (option_menu->menu_item);
-  if (option_menu->last_signaled_menu_item)
-    gtk_widget_show_all (option_menu->last_signaled_menu_item);
-  if (option_menu->select_menu)
-	  gtk_widget_show_all (option_menu->select_menu);
-}
-
-
-static void go_option_menu_hide_all (GtkWidget *widget)
-{
-  GtkContainer *container;
-
-  g_return_if_fail (GO_IS_OPTION_MENU (widget));
-  container = GTK_CONTAINER (widget);
-
-  gtk_widget_hide (widget);
-  gtk_container_foreach (container, (GtkCallback) gtk_widget_hide_all, NULL);
-}
-
-static gboolean go_option_menu_mnemonic_activate (GtkWidget *widget,
-				   gboolean   group_cycling)
-{
-  gtk_widget_grab_focus (widget);
-  return TRUE;
-}
-
-static gint go_option_menu_scroll_event (GtkWidget          *widget,
-			      GdkEventScroll     *event)
-{
-  return TRUE;
-}
diff --git a/src/go-optionmenu.h b/src/go-optionmenu.h
deleted file mode 100644
index 92c02f3..0000000
--- a/src/go-optionmenu.h
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- * go-optionmenu.h
- *
- * Copyright (C) 2002-2005 Andreas J. Guelzow <aguelzow at taliesin.ca>
- *
- * based extensively on:
- *
- * GTK - The GIMP Toolkit
- * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
- *
- * Modified by the GTK+ Team and others 1997-2000.  See the GTK AUTHORS
- * file for a list of people on the GTK+ Team.  See the ChangeLog
- * files for a list of changes.  These files are distributed with
- * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
- *
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301
- * USA.
- */
-
-#ifndef _GO_OPTIONMENU_H_
-#define _GO_OPTIONMENU_H_
-
-
-#include <gdk/gdk.h>
-#include <gtk/gtkbutton.h>
-
-G_BEGIN_DECLS
-
-#define GO_TYPE_OPTION_MENU              (go_option_menu_get_type ())
-#define GO_OPTION_MENU(obj)              (G_TYPE_CHECK_INSTANCE_CAST ((obj), GO_TYPE_OPTION_MENU, GOOptionMenu))
-#define GO_OPTION_MENU_CLASS(klass)      (G_TYPE_CHECK_CLASS_CAST ((klass), GO_TYPE_OPTION_MENU, GOOptionMenuClass))
-#define GO_IS_OPTION_MENU(obj)           (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GO_TYPE_OPTION_MENU))
-#define GO_IS_OPTION_MENU_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE ((klass), GO_TYPE_OPTION_MENU))
-#define GO_OPTION_MENU_GET_CLASS(obj)    (G_TYPE_INSTANCE_GET_CLASS ((obj), GO_TYPE_OPTION_MENU, GOOptionMenuClass))
-
-
-/* START_INCLUDE_H */
-/* END_INCLUDE_H */
-
-typedef struct _GOOptionMenu       GOOptionMenu;
-typedef struct _GOOptionMenuClass  GOOptionMenuClass;
-
-struct _GOOptionMenu
-{
-	GtkButton button;
-
-	GtkWidget *menu;
-	GtkWidget *select_menu;
-	GtkWidget *menu_item;
-	GtkWidget *old_menu_item;
-
-	GtkWidget *last_signaled_menu_item;
-
-	GSList *selection;
-	gboolean new_selection;
-
-	guint16 width;
-	guint16 height;
-};
-
-struct _GOOptionMenuClass
-{
-  GtkButtonClass parent_class;
-
-  void (*changed) (GOOptionMenu *option_menu);
-
-  /* Padding for future expansion */
-  void (*_gtk_reserved1) (void);
-  void (*_gtk_reserved2) (void);
-  void (*_gtk_reserved3) (void);
-  void (*_gtk_reserved4) (void);
-};
-
-
-#define CHILD_LEFT_SPACING        4
-#define CHILD_RIGHT_SPACING       1
-#define CHILD_TOP_SPACING         1
-#define CHILD_BOTTOM_SPACING      1
-
-typedef struct _GOOptionMenuProps GOOptionMenuProps;
-
-struct _GOOptionMenuProps
-{
-  gboolean interior_focus;
-  GtkRequisition indicator_size;
-  GtkBorder indicator_spacing;
-  gint focus_width;
-  gint focus_pad;
-};
-
-
-/* START_DECLARATION */
-GtkWidget * go_option_menu_get_history (GOOptionMenu *option_menu);
-GType go_option_menu_get_type (void);
-GtkWidget* go_option_menu_new (void);
-void go_option_menu_set_history (GOOptionMenu *option_menu, GSList *selection);
-void go_option_menu_set_menu (GOOptionMenu *option_menu,
-			       GtkWidget *menu);
-/* END_DECLARATION */
-
-
-G_END_DECLS
-
-#endif /* _GO_OPTIONMENU_H_ */
diff --git a/src/import.c b/src/import.c
index 3502d1a..b673b64 100644
--- a/src/import.c
+++ b/src/import.c
@@ -29,6 +29,7 @@
 #include "include.h"
 #include <glib/gstdio.h>
 #include <glib/gi18n.h>
+#include <goffice/goffice.h>
 
 /*START_INCLUDE*/
 #include "import.h"
@@ -37,7 +38,6 @@
 #include "import_csv.h"
 #include "dialog.h"
 #include "utils_file_selection.h"
-#include "go-charmap-sel.h"
 #include "gsb_account.h"
 #include "gsb_account_property.h"
 #include "gsb_assistant.h"
diff --git a/src/utils_files.c b/src/utils_files.c
index f6b344e..4423ee3 100644
--- a/src/utils_files.c
+++ b/src/utils_files.c
@@ -29,11 +29,11 @@
 
 #include "include.h"
 #include <glib/gi18n.h>
+#include <goffice/goffice.h>
 
 /*START_INCLUDE*/
 #include "utils_files.h"
 #include "dialog.h"
-#include "go-charmap-sel.h"
 #include "gsb_dirs.h"
 #include "gsb_file.h"
 #include "gsb_file_config.h"


hooks/post-receive
-- 
grisbi


More information about the cvs mailing list