Index: configure.in
===================================================================
RCS file: /cvs/gnome/gnumeric/configure.in,v
retrieving revision 1.765
diff -u -3 -p -r1.765 configure.in
--- configure.in	6 Nov 2005 02:21:56 -0000	1.765
+++ configure.in	11 Nov 2005 17:34:22 -0000
@@ -236,7 +236,8 @@ hildon=false
 HILDON_CFLAGS=""
 HILDON_LIBS=""
 
-AC_ARG_ENABLE(hildon,[  --enable-hildon    Turn on hildon ],[
+AC_ARG_ENABLE(hildon,
+	AC_HELP_STRING([--enable-hildon],[Compile with hildon support]),[
 	if test "x$enableval" = "xyes"; then
 		hildon=true
 	fi
Index: src/Makefile.am
===================================================================
RCS file: /cvs/gnome/gnumeric/src/Makefile.am,v
retrieving revision 1.387
diff -u -3 -p -r1.387 Makefile.am
--- src/Makefile.am	4 Oct 2005 12:09:15 -0000	1.387
+++ src/Makefile.am	11 Nov 2005 17:34:22 -0000
@@ -390,12 +390,23 @@ uninstall-hook:
 
 # include conditional files to ensure everything gets distributed no matter
 # what the build
+if USE_HILDON
+EXTRA_DIST = HILDON_Gnumeric-gtk.xml.in				\
+	    main-component.c					\
+	    $(GNUMERIC_GNOME) README.gnm_float			\
+	    gnumeric.rc gnm-i18n.h
+else
 EXTRA_DIST = GNOME_Gnumeric-gtk.xml.in				\
 	    main-component.c					\
 	    $(GNUMERIC_GNOME) README.gnm_float			\
 	    gnumeric.rc gnm-i18n.h
+endif
 
+if USE_HILDON
+DISTCLEANFILES = HILDON_Gnumeric-gtk.xml
+else
 DISTCLEANFILES = GNOME_Gnumeric-gtk.xml
+endif
 
 ##check_PROGRAMS += number-match
 
@@ -408,10 +419,18 @@ DISTCLEANFILES = GNOME_Gnumeric-gtk.xml
 ##	$(INTLLIBS)
 
 gtkactiondir=$(gnumeric_datadir)
+
+if USE_HILDON
+gtkaction_DATA = HILDON_Gnumeric-gtk.xml
+
+HILDON_Gnumeric-gtk.xml: HILDON_Gnumeric-gtk.xml.in
+	sed -e 's/ _name *=/ name=/' <$<  >$@
+else
 gtkaction_DATA = GNOME_Gnumeric-gtk.xml
 
 GNOME_Gnumeric-gtk.xml: GNOME_Gnumeric-gtk.xml.in
 	sed -e 's/ _name *=/ name=/' <$<  >$@
+endif
 
 ## Bonobo requires things to be in a subdir of this form
 ##bonobo_component_uidir=$(gnumeric_datadir)/gnome-2.0/ui
Index: src/gnumeric-canvas.c
===================================================================
RCS file: /cvs/gnome/gnumeric/src/gnumeric-canvas.c,v
retrieving revision 1.344
diff -u -3 -p -r1.344 gnumeric-canvas.c
--- src/gnumeric-canvas.c	18 Sep 2005 02:39:53 -0000	1.344
+++ src/gnumeric-canvas.c	11 Nov 2005 17:34:22 -0000
@@ -5,6 +5,10 @@
  * Author:
  *     Miguel de Icaza (miguel@kernel.org)
  *     Jody Goldberg (jody@gnome.org)
+ *
+ * Port to Maemo:
+ * 	Eduardo Lima  (eduardo.lima@indt.org.br)
+ * 	Renato Araujo (renato.filho@indt.org.br)
  */
 #include <gnumeric-config.h>
 #include <glib/gi18n.h>
@@ -503,7 +507,9 @@ gnm_canvas_key_release (GtkWidget *widge
 static gint
 gnm_canvas_focus_in (GtkWidget *widget, GdkEventFocus *event)
 {
+#ifndef USE_HILDON
 	gtk_im_context_focus_in (GNM_CANVAS (widget)->im_context);
+#endif
 	return (*GTK_WIDGET_CLASS (parent_klass)->focus_in_event) (widget, event);
 }
 
Index: src/gui-file.c
===================================================================
RCS file: /cvs/gnome/gnumeric/src/gui-file.c,v
retrieving revision 1.123
diff -u -3 -p -r1.123 gui-file.c
--- src/gui-file.c	6 May 2005 16:02:48 -0000	1.123
+++ src/gui-file.c	11 Nov 2005 17:34:22 -0000
@@ -6,6 +6,10 @@
  *    Jon K Hellan (hellan@acm.org)
  *    Zbigniew Chyla (cyba@gnome.pl)
  *    Andreas J. Guelzow (aguelzow@taliesin.ca)
+ *
+ * Port to Maemo:
+ * 	Eduardo Lima  (eduardo.lima@indt.org.br)
+ * 	Renato Araujo (renato.filho@indt.org.br) 
  */
 #include <gnumeric-config.h>
 #include <glib/gi18n.h>
@@ -40,6 +44,12 @@
 #include <errno.h>
 #include <string.h>
 
+#ifdef USE_HILDON
+	#include <hildon-lgpl/hildon-widgets/hildon-app.h>
+	#include <hildon-lgpl/hildon-widgets/hildon-appview.h>
+	#include <hildon-fm/hildon-widgets/hildon-file-chooser-dialog.h>
+#endif
+
 typedef struct {
 	GOCharmapSel *go_charmap_sel;
 	GtkWidget	*charmap_label;
@@ -95,6 +105,30 @@ gui_wb_view_show (WorkbookControlGUI *wb
 	WorkbookControlGUI *new_wbcg = NULL;
 	Workbook *tmp_wb = wb_control_workbook (WORKBOOK_CONTROL (wbcg));
 
+#ifdef USE_HILDON
+	if (workbook_is_dirty (tmp_wb)) {
+		switch (wbcg_show_save_dialog (wbcg, tmp_wb, FALSE)) {
+
+			case GTK_RESPONSE_YES:
+			case GNM_RESPONSE_SAVE_ALL:
+				gui_file_save (wbcg, wb_control_view (WORKBOOK_CONTROL (wbcg)));
+				break;
+
+			case GTK_RESPONSE_NO:
+			case GNM_RESPONSE_DISCARD_ALL:
+				/* Do nothing */
+				break;
+			
+			default:  /* CANCEL */
+				return;
+		}
+	}
+
+	g_object_ref (wbcg);
+	g_object_unref (tmp_wb);
+	wb_control_set_view (WORKBOOK_CONTROL (wbcg), wbv, NULL);
+	wb_control_init_state (WORKBOOK_CONTROL (wbcg));
+#else
 	if (workbook_is_pristine (tmp_wb)) {
 		g_object_ref (wbcg);
 		g_object_unref (tmp_wb);
@@ -109,6 +143,7 @@ gui_wb_view_show (WorkbookControlGUI *wb
 
 		wbcg_copy_toolbar_visibility (new_wbcg, wbcg);
 	}
+#endif
 
 	sheet_update (wb_view_cur_sheet	(wbv));
 }
@@ -214,6 +249,9 @@ gui_file_open (WorkbookControlGUI *wbcg,
 	gtk_widget_set_sensitive (GTK_WIDGET (format_combo), opener_default == 0);
 	file_format_changed_cb (format_combo, &data);
 
+#ifdef USE_HILDON
+	fsel = GTK_FILE_CHOOSER (hildon_file_chooser_dialog_new (wbcg_toplevel (wbcg), GTK_FILE_CHOOSER_ACTION_OPEN));
+#else
 	fsel = GTK_FILE_CHOOSER
 		(g_object_new (GTK_TYPE_FILE_CHOOSER_DIALOG,
 			       "action", GTK_FILE_CHOOSER_ACTION_OPEN,
@@ -224,6 +262,7 @@ gui_file_open (WorkbookControlGUI *wbcg,
 				GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
 				GTK_STOCK_OPEN, GTK_RESPONSE_OK,
 				NULL);
+#endif
 	gtk_dialog_set_default_response (GTK_DIALOG (fsel), GTK_RESPONSE_OK);
 
 	/* Add Templates bookmark */
@@ -357,6 +396,9 @@ gui_file_save_as (WorkbookControlGUI *wb
 	}
 	savers = g_list_sort (savers, file_saver_description_cmp);
 
+#ifdef USE_HILDON
+	fsel = GTK_FILE_CHOOSER (hildon_file_chooser_dialog_new (wbcg_toplevel (wbcg), GTK_FILE_CHOOSER_ACTION_SAVE));
+#else
 	fsel = GTK_FILE_CHOOSER
 		(g_object_new (GTK_TYPE_FILE_CHOOSER_DIALOG,
 			       "action", GTK_FILE_CHOOSER_ACTION_SAVE,
@@ -367,6 +409,8 @@ gui_file_save_as (WorkbookControlGUI *wb
 				GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
 				GTK_STOCK_SAVE, GTK_RESPONSE_OK,
 				NULL);
+#endif
+
 	gtk_dialog_set_default_response (GTK_DIALOG (fsel), GTK_RESPONSE_OK);
 
 	/* Filters */
Index: src/item-grid.c
===================================================================
RCS file: /cvs/gnome/gnumeric/src/item-grid.c,v
retrieving revision 1.355
diff -u -3 -p -r1.355 item-grid.c
--- src/item-grid.c	2 Oct 2005 22:55:30 -0000	1.355
+++ src/item-grid.c	11 Nov 2005 17:34:22 -0000
@@ -7,6 +7,10 @@
  * Authors:
  *     Miguel de Icaza (miguel@kernel.org)
  *     Jody Goldberg (jody@gnome.org)
+ *
+ * Port to Maemo:
+ * 	Eduardo Lima  (eduardo.lima@indt.org.br)
+ * 	Renato Araujo (renato.filho@indt.org.br)
  */
 
 #include <gnumeric-config.h>
@@ -892,8 +896,12 @@ item_grid_button_press (ItemGrid *ig, Gd
 				      NULL);
 
 			if ((ig->last_click_time + double_click_time) > event->time &&
-			    wbcg_edit_start (scg->wbcg, FALSE, FALSE))
+			    wbcg_edit_start (scg->wbcg, FALSE, FALSE)) {
+#ifdef USE_HILDON
+				gtk_im_context_focus_in (GNM_CANVAS (canvas)->im_context);
+#endif
 				break;
+			}
 		}
 
 		ig->last_click_time = event->time;
Index: src/wbc-gtk.c
===================================================================
RCS file: /cvs/gnome/gnumeric/src/wbc-gtk.c,v
retrieving revision 1.77
diff -u -3 -p -r1.77 wbc-gtk.c
--- src/wbc-gtk.c	28 Sep 2005 13:13:47 -0000	1.77
+++ src/wbc-gtk.c	11 Nov 2005 17:34:22 -0000
@@ -18,6 +18,10 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301
  * USA
+ *
+ * Port to Maemo:
+ * 	Eduardo Lima  (eduardo.lima@indt.org.br)
+ * 	Renato Araujo (renato.filho@indt.org.br)
  */
 #include <gnumeric-config.h>
 #include "gnumeric.h"
@@ -60,6 +64,14 @@
 #include <errno.h>
 #include <string.h>
 
+#ifdef USE_HILDON
+	#include <gtk/gtktable.h>
+	#include <gtk/gtktoolbutton.h>
+	#include <goffice/gtk/go-combo-text.h>
+	#include <hildon-lgpl/hildon-widgets/hildon-app.h>
+	#include <hildon-lgpl/hildon-widgets/hildon-appview.h>
+#endif
+
 #define CHECK_MENU_UNDERLINES
 
 struct _WBCgtk {
@@ -171,7 +183,11 @@ wbc_gtk_init_zoom (WBCgtk *gtk)
 				  "name", "Zoom",
 				  "label", _("_Zoom"),
 				  NULL);
+#ifdef USE_HILDON
+	go_action_combo_text_set_width (gtk->zoom,  "100000000%");
+#else
 	go_action_combo_text_set_width (gtk->zoom,  "10000%");
+#endif
 	for (i = 0; preset_zoom[i] != NULL ; ++i)
 		go_action_combo_text_add_item (gtk->zoom, preset_zoom[i]);
 
@@ -423,8 +439,13 @@ create_undo_redo (WBCgtk *gtk, char cons
 		"stock-id",	stock_id,
 		"sensitive",	FALSE,
 		NULL);
+	
+#ifdef USE_HILDON
+	gtk_action_group_add_action (gtk->actions, GTK_ACTION (res));
+#else
 	gtk_action_group_add_action_with_accel (gtk->actions,
 		GTK_ACTION (res), accel);
+#endif
 	return res;
 }
 
@@ -803,11 +824,38 @@ wbc_gtk_set_action_label (WorkbookContro
 		gboolean  sensitive = TRUE;
 
 		if (suffix == NULL) {
+#ifndef USE_HILDON
 			suffix = _("Nothing");
+#endif
 			sensitive = FALSE;
 		}
 
+#ifdef USE_HILDON
+		text = g_strdup (prefix);
+
+		{
+			/* Set hildon toolbuttons (in)sensitive */
+			GtkToolbar * toolbar = hildon_appview_get_toolbar (HILDON_APPVIEW (wbcg->toplevel));
+			GList * l;
+			
+			for (l = gtk_container_get_children (GTK_CONTAINER (toolbar)); l; l = l->next) {
+				if (GTK_IS_TOOL_BUTTON (l->data)) {
+					gchar * label;
+					g_object_get (l->data, "label", &label, NULL);
+					
+					if (strstr (label, action) != NULL) {
+						g_object_set (G_OBJECT (l->data), "sensitive", sensitive, NULL);
+						g_free(label);
+						break;
+					}
+
+					g_free(label);
+				}
+			}
+		}
+#else
 		text = g_strdup_printf ("%s : %s", prefix, suffix);
+#endif
 		g_object_set (G_OBJECT (a),
 			      "label",	   text,
 			      "sensitive", sensitive,
@@ -1209,9 +1257,18 @@ cb_add_menus_toolbars (G_GNUC_UNUSED Gtk
 {
 	if (GTK_IS_TOOLBAR (w)) {
 		WorkbookControlGUI *wbcg = (WorkbookControlGUI *)gtk;
+		char const *name = gtk_widget_get_name (w);
+#ifdef USE_HILDON
+		if (0 == strcmp (name, "HildonToolbar")) {
+			hildon_appview_set_toolbar (HILDON_APPVIEW (wbcg->toplevel), GTK_TOOLBAR (w));
+			gtk_widget_show_all (w);
+		} else if (0 == strcmp (name, "HildonTopToolbar")) {
+			gtk_table_attach (GTK_TABLE (wbcg->table), w, 1, 2, 0, 1,
+					  GTK_FILL | GTK_EXPAND , 0, 0, 0);
+		}
+#else
 		GtkWidget *box = gtk_handle_box_new ();
 		GtkToggleActionEntry entry;
-		char const *name = gtk_widget_get_name (w);
 		char *toggle_name = g_strdup_printf ("ViewMenuToolbar%s", name);
 		char *tooltip = g_strdup_printf (_("Show/Hide toolbar %s"), _(name));
 		gboolean visible = gnm_gconf_get_toolbar_visible (name);
@@ -1256,6 +1313,7 @@ cb_add_menus_toolbars (G_GNUC_UNUSED Gtk
 
 		g_free (tooltip);
 		g_free (toggle_name);
+#endif
 	} else {
 		gtk_box_pack_start (GTK_BOX (gtk->menu_zone), w, FALSE, TRUE, 0);
 		gtk_widget_show_all (w);
@@ -1378,20 +1436,31 @@ wbc_gtk_init (GObject *obj)
 	unsigned	    i;
 	GError *error = NULL;
 
-	wbcg_set_toplevel (wbcg, gtk_window_new (GTK_WINDOW_TOPLEVEL));
-	g_signal_connect (wbcg->toplevel, "window_state_event",
-			  G_CALLBACK (cb_wbcg_window_state_event),
-			  wbcg);
-	gtk_window_set_title (wbcg->toplevel, "Gnumeric");
-	gtk_window_set_wmclass (wbcg->toplevel, "Gnumeric", "Gnumeric");
 	gtk->menu_zone = gtk_vbox_new (TRUE, 0);
 	gtk->toolbar_zone = gtk_vbox_new (FALSE, 0);
 	gtk->everything = gtk_vbox_new (FALSE, 0);
 
+#ifdef USE_HILDON
+	GtkWidget *appview = hildon_appview_new ("Gnumeric");
+	wbcg->app = hildon_app_new_with_appview (HILDON_APPVIEW (appview));
+	wbcg_set_toplevel (wbcg, appview);
+#else
+	wbcg_set_toplevel (wbcg, gtk_window_new (GTK_WINDOW_TOPLEVEL));
+	g_signal_connect (wbcg_toplevel (wbcg), "window_state_event",
+			  G_CALLBACK (cb_wbcg_window_state_event),
+			  wbcg);
 	gtk_box_pack_start (GTK_BOX (gtk->everything),
 		gtk->menu_zone, FALSE, TRUE, 0);
 	gtk_box_pack_start (GTK_BOX (gtk->everything),
 		gtk->toolbar_zone, FALSE, TRUE, 0);
+#endif
+
+	gtk_window_set_title (wbcg_toplevel (wbcg), "Gnumeric");
+	gtk_window_set_wmclass (wbcg_toplevel (wbcg), "Gnumeric", "Gnumeric");
+
+#ifdef USE_HILDON
+	gtk_widget_show_all (GTK_WIDGET (wbcg_toplevel (wbcg)));
+#endif
 #if 0
 	bonobo_dock_set_client_area (BONOBO_DOCK (gtk->dock), wbcg->table);
 #endif
@@ -1435,10 +1504,14 @@ wbc_gtk_init (GObject *obj)
 	gtk_ui_manager_insert_action_group (gtk->ui, gtk->permanent_actions, 0);
 	gtk_ui_manager_insert_action_group (gtk->ui, gtk->actions, 0);
 	gtk_ui_manager_insert_action_group (gtk->ui, gtk->font_actions, 0);
-
-	gtk_window_add_accel_group (wbcg->toplevel, 
+	gtk_window_add_accel_group (wbcg_toplevel (wbcg), 
 		gtk_ui_manager_get_accel_group (gtk->ui));
+
+#ifdef USE_HILDON	
+	uifile = g_build_filename (gnm_sys_data_dir (), "HILDON_Gnumeric-gtk.xml", NULL);
+#else
 	uifile = g_build_filename (gnm_sys_data_dir (), "GNOME_Gnumeric-gtk.xml", NULL);
+#endif
 	if (!gtk_ui_manager_add_ui_from_file (gtk->ui, uifile, &error)) {
 		g_message ("building menus failed: %s", error->message);
 		g_error_free (error);
@@ -1469,6 +1542,20 @@ wbc_gtk_init (GObject *obj)
 		NULL);
 
 	gtk_ui_manager_ensure_update (gtk->ui);
+
+#ifdef USE_HILDON
+	{
+		GtkWidget *hildonMenu = GTK_WIDGET (hildon_appview_get_menu (HILDON_APPVIEW (wbcg->toplevel)));
+		GList *list = gtk_container_get_children (GTK_CONTAINER (gtk->menu_zone));
+		
+		for (list = gtk_container_get_children (GTK_CONTAINER (list->data)); list; list = list->next) {
+			gtk_widget_reparent (GTK_WIDGET (list->data), hildonMenu);
+		}
+
+		gtk_widget_show_all (GTK_WIDGET (hildonMenu));
+	}
+#endif
+
 	gtk_container_add (GTK_CONTAINER (wbcg->toplevel), gtk->everything);
 
 #ifdef CHECK_MENU_UNDERLINES
Index: src/wbcg-actions.c
===================================================================
RCS file: /cvs/gnome/gnumeric/src/wbcg-actions.c,v
retrieving revision 1.100
diff -u -3 -p -r1.100 wbcg-actions.c
--- src/wbcg-actions.c	15 Oct 2005 04:33:45 -0000	1.100
+++ src/wbcg-actions.c	11 Nov 2005 17:34:23 -0000
@@ -18,6 +18,10 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301
  * USA
+ *
+ * Port to Maemo:
+ * 	Eduardo Lima  (eduardo.lima@indt.org.br)
+ * 	Renato Araujo (renato.filho@indt.org.br)
  */
 #include <gnumeric-config.h>
 #include "gnumeric.h"
@@ -77,14 +81,51 @@
 #include <gsf/gsf-input.h>
 #include <string.h>
 
+#ifdef USE_HILDON
+#include <wbc-gtk.h>
+#include <hildon-lgpl/hildon-widgets/hildon-appview.h>
+#include <hildon-widgets/hildon-color-selector.h>
+#include <hildon-widgets/hildon-font-selection-dialog.h>
+#endif
+
 static GNM_ACTION_DEF (cb_file_new)
 {
 	GdkScreen *screen = gtk_window_get_screen (wbcg_toplevel (wbcg));
 	Workbook *wb = workbook_new_with_sheets
 		(gnm_app_prefs->initial_sheet_number);
+
+#ifdef USE_HILDON
+	WorkbookControl * wbc = (WorkbookControl *) wbcg;
+	Workbook *tmp_wb = wb_control_workbook (WORKBOOK_CONTROL (wbcg));
+
+	if (workbook_is_dirty (tmp_wb)) {
+		switch (wbcg_show_save_dialog (wbcg, tmp_wb, FALSE)) {
+
+			case GTK_RESPONSE_YES:
+			case GNM_RESPONSE_SAVE_ALL:
+				gui_file_save (wbcg, wb_control_view (WORKBOOK_CONTROL (wbcg)));
+				break;
+
+			case GTK_RESPONSE_NO:
+			case GNM_RESPONSE_DISCARD_ALL:
+				/* Do nothing */
+				break;
+			
+			default:  /* CANCEL */
+				return;
+		}
+	}
+
+	g_object_ref (wbcg);
+	g_object_unref (wb_control_workbook (WORKBOOK_CONTROL (wbcg)));
+	wb_control_set_view (wbc, NULL, wb);
+	wb_control_init_state (wbc);
+	sheet_update (wb_view_cur_sheet (wb_control_view (wbc)));
+#else
 	WorkbookControl *new_wbc = workbook_control_gui_new (NULL, wb, screen);
 	WorkbookControlGUI *new_wbcg = WORKBOOK_CONTROL_GUI (new_wbc);
 	wbcg_copy_toolbar_visibility (new_wbcg, wbcg);	
+#endif
 }
 
 static GNM_ACTION_DEF (cb_file_open)	{ gui_file_open (wbcg, NULL); }
@@ -316,6 +357,18 @@ static GNM_ACTION_DEF (cb_edit_duplicate
 	cmd_clone_sheet (wbc, old_sheet);
 }
 
+#ifdef USE_HILDON
+static GNM_ACTION_DEF (cb_edit_undo)
+{
+	command_undo (WORKBOOK_CONTROL (wbcg));
+}
+
+static GNM_ACTION_DEF (cb_edit_redo)
+{
+	command_redo (WORKBOOK_CONTROL (wbcg));
+}
+#endif
+
 static void
 common_cell_goto (WorkbookControlGUI *wbcg, Sheet *sheet, GnmCellPos const *pos)
 {
@@ -522,10 +575,20 @@ static GNM_ACTION_DEF (cb_view_zoom_in)
 
 static GNM_ACTION_DEF (cb_view_fullscreen)
 {
+#ifdef USE_HILDON
+	if (wbcg->is_fullscreen || hildon_appview_get_fullscreen (HILDON_APPVIEW (wbcg->toplevel))) {
+		wbcg->is_fullscreen = FALSE;
+		hildon_appview_set_fullscreen (HILDON_APPVIEW (wbcg->toplevel), FALSE);
+	} else {
+		wbcg->is_fullscreen = TRUE;
+		hildon_appview_set_fullscreen (HILDON_APPVIEW (wbcg->toplevel), TRUE);
+	}
+#else
 	if (wbcg->is_fullscreen)
 		gtk_window_unfullscreen (wbcg_toplevel (wbcg));
 	else
 		gtk_window_fullscreen (wbcg_toplevel (wbcg));
+#endif
 }
 
 static GNM_ACTION_DEF (cb_view_zoom)	{ dialog_zoom (wbcg, wbcg_cur_sheet (wbcg)); }
@@ -1479,6 +1542,14 @@ static GtkActionEntry const permanent_ac
 	{ "EditPaste", GTK_STOCK_PASTE, NULL,
 		NULL, N_("Paste the clipboard"),
 		G_CALLBACK (cb_edit_paste) },
+#ifdef USE_HILDON
+	{ "UndoHildon", GTK_STOCK_UNDO, N_("_Undo"), 
+		NULL, N_("Undo the last action"), 
+		G_CALLBACK (cb_edit_undo) },
+	{ "RedoHildon", GTK_STOCK_REDO, N_("_Redo"),
+		NULL, N_("Redo the undone action"), 
+		G_CALLBACK (cb_edit_redo) },
+#endif		
 
 	{ "HelpDocs", GTK_STOCK_HELP, N_("_Contents"),
 		"F1", N_("Open a viewer for Gnumeric's documentation"),
@@ -1618,7 +1689,11 @@ static GtkActionEntry const actions[] = 
 	{ "SheetInsert", NULL, N_("_Sheet"),
 		NULL, N_("Insert a new sheet"),
 		G_CALLBACK (wbcg_insert_sheet) },
+#ifdef USE_HILDON
+	{ "InsertSheetAtEnd", NULL, N_("_New"),
+#else
 	{ "InsertSheetAtEnd", NULL, N_("_Append"),
+#endif
 		NULL, N_("Append a new sheet"),
 		G_CALLBACK (wbcg_append_sheet) },
 	{ "EditDuplicateSheet", NULL, N_("_Duplicate"),
@@ -2120,7 +2195,11 @@ static GtkToggleActionEntry const toggle
 
 	{ "ViewFullScreen", GTK_STOCK_ZOOM_FIT,
 		N_("F_ull Screen"), "F11",
+#ifdef USE_HILDON
+		N_("Full Screen"), G_CALLBACK (cb_view_fullscreen), FALSE }
+#else
 		N_("in or out"), G_CALLBACK (cb_view_fullscreen), FALSE }
+#endif
 };
 
 static GtkToggleActionEntry const font_toggle_actions[] = {
Index: src/workbook-control-gui-priv.h
===================================================================
RCS file: /cvs/gnome/gnumeric/src/workbook-control-gui-priv.h,v
retrieving revision 1.63
diff -u -3 -p -r1.63 workbook-control-gui-priv.h
--- src/workbook-control-gui-priv.h	26 Jun 2005 00:54:02 -0000	1.63
+++ src/workbook-control-gui-priv.h	11 Nov 2005 17:34:23 -0000
@@ -13,7 +13,10 @@
 struct _WorkbookControlGUI {
 	WorkbookControl	wb_control;
 
-	GtkWindow   *toplevel;
+	GtkWidget   *toplevel;
+#ifdef USE_HILDON
+	GtkWidget   * app;
+#endif
 	GtkNotebook *notebook;
 	GtkWidget   *progress_bar;
 
@@ -100,12 +103,17 @@ typedef struct {
 
 #define WORKBOOK_CONTROL_GUI_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), WORKBOOK_CONTROL_GUI_TYPE, WorkbookControlGUIClass))
 
+#define GNM_RESPONSE_SAVE_ALL -1000
+#define GNM_RESPONSE_DISCARD_ALL -1001
+
 /* Protected functions */
 void	 wbcg_set_toplevel	      (WorkbookControlGUI *wbcg, GtkWidget *w);
 gboolean wbcg_scroll_wheel_support_cb (GtkWidget *ignored,
 				       GdkEventScroll *event,
 				       WorkbookControlGUI *wbcg);
 gboolean wbcg_close_control	      (WorkbookControlGUI *wbcg);
+int 	 wbcg_show_save_dialog	      (WorkbookControlGUI *wbcg, 
+				       Workbook * wb, gboolean exiting);
 int	 wbcg_close_if_user_permits   (WorkbookControlGUI *wbcg,
 				       WorkbookView *wb_view, gboolean close_clean,
 				       gboolean exiting, gboolean ask_user);
Index: src/workbook-control-gui.c
===================================================================
RCS file: /cvs/gnome/gnumeric/src/workbook-control-gui.c,v
retrieving revision 1.589
diff -u -3 -p -r1.589 workbook-control-gui.c
--- src/workbook-control-gui.c	2 Oct 2005 22:55:30 -0000	1.589
+++ src/workbook-control-gui.c	11 Nov 2005 17:34:23 -0000
@@ -18,6 +18,10 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301
  * USA
+ *
+ * Port to Maemo:
+ * 	Eduardo Lima  (eduardo.lima@indt.org.br)
+ * 	Renato Araujo (renato.filho@indt.org.br)
  */
 
 #include <gnumeric-config.h>
@@ -94,8 +98,10 @@
 #include <string.h>
 #include <errno.h>
 
-#define GNM_RESPONSE_SAVE_ALL -1000
-#define GNM_RESPONSE_DISCARD_ALL -1001
+#ifdef USE_HILDON
+	#include <hildon-widgets/hildon-app.h>
+	#include <hildon-widgets/hildon-appview.h>
+#endif
 
 #define WBCG_CLASS(o) WORKBOOK_CONTROL_GUI_CLASS (G_OBJECT_GET_CLASS (o))
 #define WBCG_VIRTUAL_FULL(func, handle, arglist, call)		\
@@ -112,6 +118,12 @@ void wbcg_ ## func arglist				\
 #define WBCG_VIRTUAL(func, arglist, call) \
         WBCG_VIRTUAL_FULL(func, func, arglist, call)
 
+#ifdef USE_HILDON
+#define TABLE_COLUMNS  2
+#else
+#define TABLE_COLUMNS  1	
+#endif
+
 enum {
 	TARGET_URI_LIST,
 	TARGET_SHEET
@@ -206,7 +218,11 @@ wbcg_toplevel (WorkbookControlGUI *wbcg)
 {
 	g_return_val_if_fail (IS_WORKBOOK_CONTROL_GUI (wbcg), NULL);
 
-	return wbcg->toplevel;
+#ifdef USE_HILDON
+	return GTK_WINDOW (gtk_widget_get_parent (wbcg->toplevel));
+#else
+	return GTK_WINDOW (wbcg->toplevel);
+#endif
 }
 
 void
@@ -1205,6 +1221,64 @@ wbcg_error_error_info (GOCmdContext *cc,
 		wbcg_toplevel (WORKBOOK_CONTROL_GUI (cc)), error);
 }
 
+int
+wbcg_show_save_dialog (WorkbookControlGUI *wbcg, 
+		       Workbook * wb, gboolean exiting)
+{
+	GtkWidget *d;
+	char *msg;
+	const char *wb_uri = workbook_get_uri (wb);
+	int ret = 0;
+
+	if (wb_uri) {
+		char *base = go_basename_from_uri (wb_uri);
+		msg = g_strdup_printf (
+			_("Save changes to workbook '%s' before closing?"),
+			base);
+		g_free (base);
+	} else {
+		msg = g_strdup (_("Save changes to workbook before closing?"));
+	}
+
+	d = gnumeric_message_dialog_new (wbcg_toplevel (wbcg),
+					 GTK_DIALOG_DESTROY_WITH_PARENT,
+					 GTK_MESSAGE_WARNING,
+					 msg,
+					 _("If you close without saving, changes will be discarded."));
+	atk_object_set_role (gtk_widget_get_accessible (d), ATK_ROLE_ALERT);
+
+	if (exiting) {
+		int n_of_wb = g_list_length (gnm_app_workbook_list ());
+		if (n_of_wb > 1) {
+			go_gtk_dialog_add_button (GTK_DIALOG(d), _("Discard all"), 
+				GTK_STOCK_DELETE, GNM_RESPONSE_DISCARD_ALL);
+			go_gtk_dialog_add_button (GTK_DIALOG(d), _("Discard"), 
+				GTK_STOCK_DELETE, GTK_RESPONSE_NO);
+			go_gtk_dialog_add_button (GTK_DIALOG(d), _("Save all"), 
+				GTK_STOCK_SAVE, GNM_RESPONSE_SAVE_ALL);
+			go_gtk_dialog_add_button (GTK_DIALOG(d), _("Don't quit"), 
+				GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL);
+		} else {
+			go_gtk_dialog_add_button (GTK_DIALOG(d), _("Discard"),
+				GTK_STOCK_DELETE, GTK_RESPONSE_NO);
+			go_gtk_dialog_add_button (GTK_DIALOG(d), _("Don't quit"), 
+				GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL);
+		}
+	} else {
+		go_gtk_dialog_add_button (GTK_DIALOG(d), _("Discard"), 
+					    GTK_STOCK_DELETE, GTK_RESPONSE_NO);
+		go_gtk_dialog_add_button (GTK_DIALOG(d), _("Don't close"), 
+					    GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL);
+	}
+
+	gtk_dialog_add_button (GTK_DIALOG(d), GTK_STOCK_SAVE, GTK_RESPONSE_YES);
+	gtk_dialog_set_default_response (GTK_DIALOG (d), GTK_RESPONSE_YES);
+	ret = go_gtk_dialog_run (GTK_DIALOG (d), wbcg_toplevel (wbcg));
+	g_free (msg);
+
+	return ret;
+}
+
 /**
  * wbcg_close_if_user_permits : If the workbook is dirty the user is
  *  		prompted to see if they should exit.
@@ -1245,56 +1319,8 @@ wbcg_close_if_user_permits (WorkbookCont
 		}
 	}
 	while (workbook_is_dirty (wb) && !done) {
-		GtkWidget *d;
-		char *msg;
-		char const *wb_uri = workbook_get_uri (wb);
-
 		iteration++;
-
-		if (wb_uri) {
-			char *base = go_basename_from_uri (wb_uri);
-			msg = g_strdup_printf (
-				_("Save changes to workbook '%s' before closing?"),
-				base);
-			g_free (base);
-		} else
-			msg = g_strdup (_("Save changes to workbook before closing?"));
-
-		d = gnumeric_message_dialog_new (wbcg_toplevel (wbcg),
-						 GTK_DIALOG_DESTROY_WITH_PARENT,
-						 GTK_MESSAGE_WARNING,
-						 msg,
-						 _("If you close without saving, changes will be discarded."));
-		atk_object_set_role (gtk_widget_get_accessible (d), ATK_ROLE_ALERT);
-
-		if (exiting) {
-			int n_of_wb = g_list_length (gnm_app_workbook_list ());
-			if (n_of_wb > 1) {
-				go_gtk_dialog_add_button (GTK_DIALOG(d), _("Discard all"), 
-					GTK_STOCK_DELETE, GNM_RESPONSE_DISCARD_ALL);
-				go_gtk_dialog_add_button (GTK_DIALOG(d), _("Discard"), 
-					GTK_STOCK_DELETE, GTK_RESPONSE_NO);
-				go_gtk_dialog_add_button (GTK_DIALOG(d), _("Save all"), 
-					GTK_STOCK_SAVE, GNM_RESPONSE_SAVE_ALL);
-				go_gtk_dialog_add_button (GTK_DIALOG(d), _("Don't quit"), 
-					GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL);
-			} else {
-				go_gtk_dialog_add_button (GTK_DIALOG(d), _("Discard"),
-					GTK_STOCK_DELETE, GTK_RESPONSE_NO);
-				go_gtk_dialog_add_button (GTK_DIALOG(d), _("Don't quit"), 
-					GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL);
-			}
-		} else {
-			go_gtk_dialog_add_button (GTK_DIALOG(d), _("Discard"), 
-						    GTK_STOCK_DELETE, GTK_RESPONSE_NO);
-			go_gtk_dialog_add_button (GTK_DIALOG(d), _("Don't close"), 
-						    GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL);
-		}
-
-		gtk_dialog_add_button (GTK_DIALOG(d), GTK_STOCK_SAVE, GTK_RESPONSE_YES);
-		gtk_dialog_set_default_response (GTK_DIALOG (d), GTK_RESPONSE_YES);
-		button = go_gtk_dialog_run (GTK_DIALOG (d), wbcg_toplevel (wbcg));
-		g_free (msg);
+		button = wbcg_show_save_dialog(wbcg, wb, exiting); 
 
 		switch (button) {
 		case GTK_RESPONSE_YES:
@@ -1614,7 +1640,7 @@ wbcg_finalize (GObject *obj)
 
 	wbcg_auto_complete_destroy (wbcg);
 
-	gtk_window_set_focus (GTK_WINDOW (wbcg->toplevel), NULL);
+	gtk_window_set_focus (wbcg_toplevel (wbcg), NULL);
 
 	if (wbcg->toplevel != NULL) {
 		gtk_object_destroy (GTK_OBJECT (wbcg->toplevel));
@@ -1634,6 +1660,10 @@ wbcg_finalize (GObject *obj)
 	g_hash_table_destroy (wbcg->visibility_widgets);
 	g_hash_table_destroy (wbcg->toggle_for_fullscreen);
 
+#ifdef USE_HILDON	
+	if (wbcg->app != 0)
+		gtk_object_destroy (GTK_OBJECT (wbcg->app));
+#endif	
 	(*parent_class->finalize) (obj);
 }
 
@@ -1738,12 +1768,17 @@ workbook_setup_sheets (WorkbookControlGU
 		G_CALLBACK (cb_notebook_switch_page), wbcg);
 
 	gtk_table_attach (GTK_TABLE (wbcg->table), GTK_WIDGET (wbcg->notebook),
-			  0, 1, 1, 2,
+			  0, TABLE_COLUMNS, 1, 2,
 			  GTK_FILL | GTK_EXPAND | GTK_SHRINK,
 			  GTK_FILL | GTK_EXPAND | GTK_SHRINK,
 			  0, 0);
 
 	gtk_widget_show (GTK_WIDGET (wbcg->notebook));
+
+#ifdef USE_HILDON	
+	gtk_notebook_set_show_border (wbcg->notebook, FALSE);
+	gtk_notebook_set_show_tabs (wbcg->notebook, FALSE);
+#endif
 }
 
 void
@@ -1987,22 +2022,23 @@ cb_select_auto_expr (GtkWidget *widget, 
 static int
 show_gui (WorkbookControlGUI *wbcg)
 {
+	SheetControlGUI *scg;
+#ifndef USE_HILDON
 	WorkbookView *wbv = wb_control_view (WORKBOOK_CONTROL (wbcg));
 	int sx, sy;
 	gdouble fx, fy;
 	GdkRectangle rect;
-	SheetControlGUI *scg;
 
 	/* In a Xinerama setup, we want the geometry of the actual display
 	 * unit, if available. See bug 59902.  */
-	gdk_screen_get_monitor_geometry (wbcg->toplevel->screen, 0, &rect);
+	gdk_screen_get_monitor_geometry (wbcg_toplevel (wbcg)->screen, 0, &rect);
 	sx = MAX (rect.width, 600);
 	sy = MAX (rect.height, 200);
 
 	fx = gnm_app_prefs->horizontal_window_fraction;
 	fy = gnm_app_prefs->vertical_window_fraction;
 	if (x_geometry && wbcg->toplevel &&
-	    gtk_window_parse_geometry (wbcg->toplevel, x_geometry)) {
+	    gtk_window_parse_geometry (wbcg_toplevel (wbcg), x_geometry)) {
 		/* Successfully parsed geometry string
 		   and urged WM to comply */
 	} else if (wbcg->notebook != NULL &&
@@ -2038,14 +2074,15 @@ show_gui (WorkbookControlGUI *wbcg)
 		}
 	} else {
 		/* Use default */
-		gtk_window_set_default_size (wbcg->toplevel, sx * fx, sy * fy);
+		gtk_window_set_default_size (wbcg_toplevel (wbcg), sx * fx, sy * fy);
 	}
+#endif /* ifndef  USE_HILDON */ 
 
 	if (NULL != (scg = wbcg_cur_scg (wbcg)))
 		cb_direction_change (NULL, NULL, scg);
 
 	x_geometry = NULL;
-	gtk_widget_show (GTK_WIDGET (wbcg->toplevel));
+	gtk_widget_show (GTK_WIDGET (wbcg_toplevel (wbcg)));
 
 	/* rehide headers if necessary */
 	if (NULL != scg && wb_control_cur_sheet (WORKBOOK_CONTROL (wbcg)))
@@ -2190,7 +2227,7 @@ wbcg_create_edit_area (WorkbookControlGU
 
 	/* Set a reasonable width for the selection box. */
 	len = go_pango_measure_string (
-		gtk_widget_get_pango_context (GTK_WIDGET (wbcg->toplevel)),
+		gtk_widget_get_pango_context (GTK_WIDGET (wbcg_toplevel (wbcg))),
 		GTK_WIDGET (entry)->style->font_desc,
 		cell_coord_name (SHEET_MAX_COLS - 1, SHEET_MAX_ROWS - 1));
 	/*
@@ -2292,7 +2329,9 @@ wbcg_create_status_area (WorkbookControl
 		gtk_widget_get_pango_context (GTK_WIDGET (wbcg->toplevel)),
 		tmp->style->font_desc, "W") * 15, -1);
 
+#ifndef USE_HILDON
 	wbcg_class->create_status_area (wbcg, wbcg->progress_bar, wbcg->status_text, frame);
+#endif
 }
 
 void
@@ -2305,10 +2344,12 @@ wbcg_set_toplevel (WorkbookControlGUI *w
 	};
 
 	g_return_if_fail (wbcg->toplevel == NULL);
+
+	wbcg->toplevel = w;
+	w = GTK_WIDGET (wbcg_toplevel (wbcg));
 	g_return_if_fail (GTK_IS_WINDOW (w));
 
-	wbcg->toplevel = GTK_WINDOW (w);
-	g_object_set (G_OBJECT (wbcg->toplevel),
+	g_object_set (G_OBJECT (w),
 		"allow-grow", TRUE,
 		"allow-shrink", TRUE,
 		NULL);
@@ -2697,7 +2738,8 @@ wbcg_create (WorkbookControlGUI *wbcg,
 		G_CALLBACK (wbcg_sheet_order_changed), wbcg, G_CONNECT_SWAPPED);
 
 	if (optional_screen)
-		gtk_window_set_screen (wbcg->toplevel, optional_screen);
+		gtk_window_set_screen (wbcg_toplevel (wbcg), optional_screen);
+
 	/* Postpone showing the GUI, so that we may resize it freely. */
 	g_idle_add ((GSourceFunc) show_gui, wbcg);
 }
