Index: help/C/epiphany-extensions.xml
===================================================================
--- help/C/epiphany-extensions.xml	(révision 1611)
+++ help/C/epiphany-extensions.xml	(copie de travail)
@@ -28,7 +28,7 @@
 <!-- appropriate code -->
   <articleinfo>
     <abstract role="description">
-      <para>Various extensions for Epiphany Web browser.</para>
+      <para>Variuous extensions for Epiphany Web browser.</para>
     </abstract>
     <title>Epiphany Extensions Manual</title>       
 
@@ -872,7 +872,88 @@
 			</sect3>
 		</sect2>
 	</sect1>
-	
+
+	<sect1 id="epi-ext-hotkeys">
+		<title>Hotkeys</title>
+
+		<sect2 id="epi-ext-hotkeys-intro">
+			<title>Introduction</title>
+
+			<para>Hotkeys extension is targeted at making easier
+			the navigation through links, using only the
+			keyboard.</para>
+		</sect2>
+
+		<sect2 id="epi-ext-hotkeys-usage">
+			<title>Usage</title>
+
+			<para>When a given key is pressed (currently the <keycap>h</keycap> key,
+			which is not configurable yet), the hotkeys mode gets enabled, and an icon
+			appears in the statusbar, as well as the number of links available through
+			the hotkeys. Once the extension has been configured, the links as well as
+			their hotkeys get emphasized. The hotkeys mode remains enabled until the
+			<keycap>ESC</keycap> key is pressed.</para>
+
+			<para>Then on each key press, if they're a single link matching, this URL
+			gets loaded. If they are several, the first link is highlighted, and each
+			time the same key is pressed, the highlighted link cycles through the
+			available links matching it. The currently highlighted link is loaded when
+			the <keycap>Enter</keycap> key is pressed.</para>
+		</sect2>
+
+		<sect2 id="epi-ext-hotkeys-config">
+			<title>Configuration</title>
+
+			<para>The extension uses CSS properties to emphasize the hotkeys and the
+			highlighted link (if any). Since it might be uneasy to disable some
+			hardcoded values, no default CSS property is provided, but rather an
+			an example below, as well as instructions to set such CSS properties.</para>
+
+			<para>First, choose <menuchoice> <guimenu>Edit</guimenu>
+			<guimenuitem>Preferences</guimenuitem></menuchoice>. Then move to the
+			<guilabel>Fonts and Styles</guilabel> tab.</para>
+
+			<para>You have to tick the <guilabel>Use custom stylesheet</guilabel>
+			checkbox, and then edit the custom stylesheet using the
+			<guibutton>Edit Stylesheet</guibutton> button.</para>
+
+			<para>An example of configuration follows, featuring hotkeys displayed as
+			white text on black background, with a grey border, toggling to black text
+			on white background when the hotkey is highlighted.</para>
+
+			<programlisting>
+span.epiphany-extensions-hotkeys-normal {
+	text-decoration: none;
+	padding: 3px;
+	border: solid 2px grey;
+	font-weight: bold;
+	background-color: black;
+	color: white;
+}
+
+span.epiphany-extensions-hotkeys-selected {
+	text-decoration: none;
+	padding: 3px;
+	border: solid 2px grey;
+	font-weight: bold;
+	background-color: white;
+	color: black;
+}</programlisting>
+		</sect2>
+
+		<sect2 id="epi-ext-hotkeys-limitation">
+			<title>Limitations</title>
+
+			<para>It is not (yet) possible to grab some keys like modifiers (e.g. the
+			<keycap>Control</keycap> key), which might better fit this purpose than the
+			current key.</para>
+
+			<para>Also, when a textbox (in an HTML form) has the focus, it is needed to
+			move the focus away from it to be able to enable the hotkeys mode, which
+			can be achieved by pressing the <keycap>Tab</keycap>.</para>
+		</sect2>
+	</sect1>
+
 	<sect1 id="epi-ext-javaconsole">
 		<title>Java Console</title>	
 
Index: extensions/hotkeys/ephy-hotkeys-extension.c
===================================================================
--- extensions/hotkeys/ephy-hotkeys-extension.c	(révision 0)
+++ extensions/hotkeys/ephy-hotkeys-extension.c	(révision 0)
@@ -0,0 +1,505 @@
+/*
+ *  Copyright © 2007 Cyril Brulebois
+ *
+ *  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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ *
+ *  Based on the following file from the sample-mozilla extension
+ *  (released under the same license).
+ *
+ *  $Id: ephy-sample2-extension.c 1376 2006-09-13 19:01:42Z chpe $
+ *
+ *  Copyright © 2003 Marco Pesenti Gritti
+ *  Copyright © 2003 Christian Persch
+ */
+
+#include "config.h"
+
+#include "ephy-hotkeys-extension.h"
+#include "mozilla-hotkeys.h"
+#include "ephy-debug.h"
+
+#include <epiphany/ephy-extension.h>
+#include <epiphany/ephy-statusbar.h>
+
+#include <glib/gi18n-lib.h>
+#include <gmodule.h>
+
+#include <gdk/gdkkeysyms.h>  /* GDK_Escape    */
+#include <gtk/gtkeventbox.h>
+#include <gtk/gtkhbox.h>
+#include <gtk/gtkimage.h>
+#include <gtk/gtklabel.h>
+
+#include <glib.h>
+#ifdef LOG
+#undef LOG
+#endif
+#define LOG(...) g_print(__VA_ARGS__); g_print("\n")
+
+#define EPHY_HOTKEYS_EXTENSION_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), EPHY_TYPE_HOTKEYS_EXTENSION, EphyHotkeysExtensionPrivate))
+
+struct _EphyHotkeysExtensionPrivate
+{
+	gpointer	dummy;
+	gboolean	display_hotkeys;
+	EphyEmbed	*embed;
+	gpointer	hotkeys_data;
+};
+
+enum
+{
+	PROP_0
+};
+
+static GObjectClass *parent_class = NULL;
+static GType type = 0;
+
+/* Status Bar stuff */
+#define WINDOW_DATA_KEY	"EphyHotkeysExtensionWindowData"
+#define HOTKEYS_ICON	"hotkeys"
+//#define HOTKEYS_ICON_ABSOLUTE_FILENAME "/usr/share/epiphany-browser/icons/hicolor/scalable/status/hotkeys.svg"
+
+/* Mostly used for the Status Bar at the moment */
+typedef struct
+{
+	EphyHotkeysExtension *extension;
+	GtkWidget *evbox;
+	GtkWidget *label;
+} WindowData;
+
+static guint
+ephy_toggle_hotkeys (EphyWindow *window, gboolean toggled)
+{
+	WindowData* data;
+	EphyHotkeysExtension *extension;
+	EphyEmbed *embed;
+	guint link_count;
+	GValue value = { 0, };
+
+	/* Get the data from the window */
+	data = (WindowData *) g_object_get_data (G_OBJECT (window),
+						 WINDOW_DATA_KEY);
+	g_return_val_if_fail (data != NULL, 0);
+
+	/* Get the embed from the window */
+	g_value_init (&value, GTK_TYPE_WIDGET);
+	g_object_get_property (G_OBJECT (window), "active-tab", &value);
+	embed = EPHY_EMBED (g_value_get_object (&value));
+	g_value_unset (&value);
+	//TODO: g_return_val_if_fail (EPHY_IS_EMBED (embed), 0);
+
+	/* Then get the extension from the WindowData */
+	extension = data->extension;
+	g_return_val_if_fail (extension != NULL, 0);
+
+	/* Visibility is set to FALSE since setting it to TRUE is only
+	   needed when enabling and the caller has to do it, by
+	   refreshing the label first, with the returned guint */
+	g_object_set (data->evbox, "visible", FALSE, NULL);
+
+	/* Enable the hotkeys, only if needed */
+	if (extension->priv->display_hotkeys == FALSE
+	    && toggled == TRUE)
+	{
+		link_count = mozilla_enable_hotkeys (embed,
+						     &extension->priv->hotkeys_data);
+
+		/* As late as possible to ensure that no hotkey
+		   disabling happens when mozilla_enable_hotkeys is
+		   still running */
+		extension->priv->display_hotkeys = TRUE;
+
+		return link_count;
+	}
+
+	/* Disable the hotkeys, only if needed */
+	if (extension->priv->display_hotkeys == TRUE
+	    && toggled == FALSE)
+	{
+		/* As early as possible to ensure that
+		   mozilla_disable_hotkey isn't run twice in a row */
+		extension->priv->display_hotkeys = FALSE;
+
+		mozilla_disable_hotkeys (embed,
+					 &extension->priv->hotkeys_data);
+
+		g_object_set (data->evbox, "visible", FALSE, NULL);
+
+		return 1;
+	}
+
+	/* No-op otherwise */
+	return 0;
+}
+
+static gboolean
+ephy_hotkeys_ge_content_cb (EphyEmbed *embed,
+			    char *uri,
+			    EphyWindow *window)
+{
+	LOG ("Content changed callback");
+
+	/* Disable hotkeys */
+	ephy_toggle_hotkeys (window, FALSE);
+
+	return TRUE;
+}
+
+static gboolean
+ephy_hotkeys_sync_active_tab (EphyWindow *window,
+			      GParamSpec *pspec,
+			      gpointer dummy)
+{
+	LOG ("Sync active tabs");
+
+	/* Disable hotkeys */
+	ephy_toggle_hotkeys (window, FALSE);
+
+	return TRUE;
+}
+
+
+static gboolean
+ephy_hotkeys_statusbar_icon_clicked_cb (GtkWidget *widget,
+					GdkEventButton *event,
+					EphyWindow *window)
+{
+	if (event->button == 1)
+	{
+		/* ephy_hotkeys_dialog_display (window); */
+
+		return TRUE;
+	}
+
+	return FALSE;
+}
+
+static void
+ephy_hotkeys_create_statusbar_icon (EphyWindow *window,
+				    WindowData *data)
+{
+	EphyStatusbar *statusbar;
+	GtkWidget *icon;
+	GtkWidget *hbox;
+
+	statusbar = EPHY_STATUSBAR (ephy_window_get_statusbar (window));
+	g_return_if_fail (statusbar != NULL);
+
+	data->evbox = gtk_event_box_new ();
+	gtk_event_box_set_visible_window (GTK_EVENT_BOX (data->evbox), FALSE);
+
+	/* TODO: Check whether there is a nice constant for this */
+	hbox = gtk_hbox_new (FALSE, 5);
+	gtk_container_add (GTK_CONTAINER (data->evbox), hbox);
+	gtk_widget_show (hbox);
+
+	icon = gtk_image_new_from_icon_name (HOTKEYS_ICON, GTK_ICON_SIZE_MENU);
+	gtk_container_add (GTK_CONTAINER (hbox), icon);
+	gtk_widget_show (icon);
+
+	data->label = gtk_label_new (_("0 link found"));
+	gtk_container_add (GTK_CONTAINER (hbox), data->label);
+	gtk_widget_show (data->label);
+
+	ephy_statusbar_add_widget (statusbar, data->evbox);
+
+	/* TODO: Might be nice to disconnect it, although not needed */
+	g_signal_connect_after (data->evbox, "button-press-event",
+				G_CALLBACK (ephy_hotkeys_statusbar_icon_clicked_cb),
+				window);
+}
+
+static void
+ephy_hotkeys_destroy_statusbar_icon (EphyWindow *window,
+				     WindowData *data)
+{
+	EphyStatusbar *statusbar;
+
+	statusbar = EPHY_STATUSBAR (ephy_window_get_statusbar (window));
+	g_return_if_fail (statusbar != NULL);
+
+	g_return_if_fail (data->evbox != NULL);	
+
+	ephy_statusbar_remove_widget (statusbar, GTK_WIDGET (data->evbox));
+}
+
+static void
+ephy_hotkeys_extension_init (EphyHotkeysExtension *extension)
+{
+	extension->priv = EPHY_HOTKEYS_EXTENSION_GET_PRIVATE (extension);
+	extension->priv->display_hotkeys = FALSE;
+	extension->priv->hotkeys_data = NULL;
+
+	LOG ("EphyHotkeysExtension initialising");
+}
+
+static void
+ephy_hotkeys_extension_finalize (GObject *object)
+{
+	EphyHotkeysExtension *extension = EPHY_HOTKEYS_EXTENSION (object);
+
+	LOG ("EphyHotkeysExtension finalising");
+
+	/* No need to ensure extension->priv->hotkeys_data is freed
+	   before this point, since the sync_active_tab callback has
+	   been called automatically */
+
+	G_OBJECT_CLASS (parent_class)->finalize (object);
+}
+
+static gboolean
+dom_mouse_down_cb (EphyEmbed *embed,
+		   EphyEmbedEvent *event,
+		   EphyHotkeysExtension *extension)
+{
+	gpointer dom_event;
+
+	dom_event = ephy_embed_event_get_dom_event (event);
+
+	LOG ("DOM Event %p", dom_event);
+
+	mozilla_do_something (dom_event);
+
+	return FALSE;
+}
+
+/* Prototype taken from ephy-gesture.c */
+static gboolean
+dom_key_press_cb (GtkWidget *widget,
+		  GdkEventKey *event,
+		  EphyWindow *window)
+{
+	WindowData		*data;
+	EphyHotkeysExtension	*extension;
+	EphyEmbed		*embed;
+	const char*		new_url;
+	guint			link_count;
+	GValue value = { 0, };
+
+	/* Get the data from the window */
+	data = (WindowData *) g_object_get_data (G_OBJECT (window), WINDOW_DATA_KEY);
+	g_return_val_if_fail (data != NULL, FALSE);
+
+	/* Then get the extension from the WindowData */
+	extension = data->extension;
+
+	/* Get the embed from the window */
+	g_value_init (&value, GTK_TYPE_WIDGET);
+	g_object_get_property (G_OBJECT (window), "active-tab", &value);
+	embed = EPHY_EMBED (g_value_get_object (&value));
+	g_value_unset (&value);
+	//TODO: g_return_val_if_fail (EPHY_IS_EMBED (embed), 0);
+
+	/* Switch the hotkeys display 'on'? */
+	if (extension->priv->display_hotkeys == FALSE
+	    && event->keyval == 'h')
+	{
+		link_count = ephy_toggle_hotkeys (window, TRUE);
+
+		gtk_label_set_label (GTK_LABEL (data->label),
+				     g_strdup_printf (_("%u hotlinks"), link_count));
+
+		g_object_set (data->evbox, "visible", TRUE, NULL);
+
+		return TRUE;
+	}
+
+	/* Switch the hotkeys display 'off'? */
+	if (extension->priv->display_hotkeys == TRUE
+	    && event->keyval == GDK_Escape)
+	{
+		ephy_toggle_hotkeys (window, FALSE);
+		return TRUE;
+	}
+
+	/* Hotkeys 'on' and key in the mapping? */
+	if (extension->priv->display_hotkeys == TRUE)
+	{
+		new_url = mozilla_is_a_hotkey (event->keyval,
+					       &extension->priv->hotkeys_data);
+		if (new_url)
+		{
+			ephy_toggle_hotkeys (window, FALSE);
+			ephy_embed_load_url (embed, new_url);
+			g_free (new_url);
+			return TRUE;
+		}
+	}
+
+	return FALSE;
+}
+
+static void
+impl_attach_window (EphyExtension *ext,
+		    EphyWindow *window)
+{
+	WindowData *data;
+
+	LOG ("EphyHotkeysExtension attach_window");
+
+	/* Store data */
+	data = g_new (WindowData, 1);
+	data->extension = (EphyHotkeysExtension *) ext;
+
+	g_object_set_data_full (G_OBJECT (window), WINDOW_DATA_KEY, data,
+				(GDestroyNotify) g_free);
+
+	/* Create the status bar icon */
+	ephy_hotkeys_create_statusbar_icon (window, data);
+
+	/* Register for tab switch events */
+	g_signal_connect_after (window, "notify::active-tab",
+				G_CALLBACK (ephy_hotkeys_sync_active_tab), NULL);
+	LOG ("window attached");
+}
+
+static void
+impl_detach_window (EphyExtension *ext,
+		    EphyWindow *window)
+{
+	WindowData *data;
+
+	LOG ("EphyHotkeysExtension detach_window");
+
+	/* Remove the data */
+	data = (WindowData *) g_object_get_data (G_OBJECT (window), WINDOW_DATA_KEY);
+	g_return_if_fail (data != NULL);
+
+	/* Remove the status bar icon */
+	ephy_hotkeys_destroy_statusbar_icon (window, data);
+
+	/* Destroy data (new association => destruction of the old one */
+	g_object_set_data (G_OBJECT (window), WINDOW_DATA_KEY, NULL);
+
+	/* Remove the tab switch notification */
+	g_signal_handlers_disconnect_by_func
+		(window, G_CALLBACK (ephy_hotkeys_sync_active_tab), NULL);
+
+	LOG ("window detached");
+}
+
+static void
+impl_attach_tab (EphyExtension *ext,
+		 EphyWindow *window,
+		 EphyEmbed *embed)
+{
+	LOG ("impl_attach_tab");
+
+	// TODO: Check EPHY_IS_EMBED (embed)?
+
+	/* TODO: Check the usage of connect/connect_after */
+	g_signal_connect (embed, "ge_dom_mouse_down",
+			  G_CALLBACK (dom_mouse_down_cb), ext);
+
+	g_signal_connect (embed, "ge-search-key-press",
+			  G_CALLBACK (dom_key_press_cb), window);
+
+	g_signal_connect_after (embed, "ge-content-change",
+				G_CALLBACK (ephy_hotkeys_ge_content_cb), window);
+
+	/* Force sync */
+	ephy_hotkeys_sync_active_tab (window, NULL, NULL);
+
+	LOG ("tab attached");
+}
+
+static void
+impl_detach_tab (EphyExtension *ext,
+		 EphyWindow *window,
+		 EphyEmbed *embed)
+{
+	LOG ("impl_detach_tab");
+
+	// TODO: Check EPHY_IS_EMBED (embed)?
+
+	g_signal_handlers_disconnect_by_func
+		(embed, G_CALLBACK (dom_mouse_down_cb), ext);
+
+	/* TODO: There's a missing disconnect here: dom_key_press_cb
+	   but that isn't very important, besides connect/disconnect
+	   symmetry */
+
+	g_signal_handlers_disconnect_by_func
+		(embed, G_CALLBACK (ephy_hotkeys_ge_content_cb), window);
+
+	/* Force sync */
+	ephy_hotkeys_sync_active_tab (window, NULL, NULL);
+
+	LOG ("tab detached");
+}
+
+static void
+ephy_hotkeys_extension_iface_init (EphyExtensionIface *iface)
+{
+	iface->attach_window = impl_attach_window;
+	iface->detach_window = impl_detach_window;
+	iface->attach_tab = impl_attach_tab;
+	iface->detach_tab = impl_detach_tab;
+}
+
+static void
+ephy_hotkeys_extension_class_init (EphyHotkeysExtensionClass *klass)
+{
+	GObjectClass *object_class = G_OBJECT_CLASS (klass);
+
+	parent_class = g_type_class_peek_parent (klass);
+
+	object_class->finalize = ephy_hotkeys_extension_finalize;
+
+	g_type_class_add_private (object_class, sizeof (EphyHotkeysExtensionPrivate));
+}
+
+GType
+ephy_hotkeys_extension_get_type (void)
+{
+	return type;
+}
+
+GType
+ephy_hotkeys_extension_register_type (GTypeModule *module)
+{
+	const GTypeInfo our_info =
+	{
+		sizeof (EphyHotkeysExtensionClass),
+		NULL, /* base_init */
+		NULL, /* base_finalize */
+		(GClassInitFunc) ephy_hotkeys_extension_class_init,
+		NULL,
+		NULL, /* class_data */
+		sizeof (EphyHotkeysExtension),
+		0, /* n_preallocs */
+		(GInstanceInitFunc) ephy_hotkeys_extension_init
+	};
+
+	const GInterfaceInfo extension_info =
+	{
+		(GInterfaceInitFunc) ephy_hotkeys_extension_iface_init,
+		NULL,
+		NULL
+	};
+
+	type = g_type_module_register_type (module,
+					    G_TYPE_OBJECT,
+					    "EphyHotkeysExtension",
+					    &our_info, 0);
+
+	g_type_module_add_interface (module,
+				     type,
+				     EPHY_TYPE_EXTENSION,
+				     &extension_info);
+
+	return type;
+}
Index: extensions/hotkeys/ephy-hotkeys-extension.h
===================================================================
--- extensions/hotkeys/ephy-hotkeys-extension.h	(révision 0)
+++ extensions/hotkeys/ephy-hotkeys-extension.h	(révision 0)
@@ -0,0 +1,66 @@
+/*
+ *  Copyright © 2007 Cyril Brulebois
+ *
+ *  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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ *
+ *  Based on the following file from the sample-mozilla extension
+ *  (released under the same license).
+ *
+ *  $Id: ephy-sample2-extension.h 1376 2006-09-13 19:01:42Z chpe $
+ *
+ *  Copyright © 2003 Marco Pesenti Gritti
+ *  Copyright © 2003 Christian Persch
+ */
+
+#ifndef EPHY_HOTKEYS_EXTENSION_H
+#define EPHY_HOTKEYS_EXTENSION_H
+
+#include <glib.h>
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+#define EPHY_TYPE_HOTKEYS_EXTENSION		(ephy_hotkeys_extension_get_type ())
+#define EPHY_HOTKEYS_EXTENSION(o)		(G_TYPE_CHECK_INSTANCE_CAST ((o), EPHY_TYPE_HOTKEYS_EXTENSION, EphyHotkeysExtension))
+#define EPHY_HOTKEYS_EXTENSION_CLASS(k)		(G_TYPE_CHECK_CLASS_CAST((k), EPHY_TYPE_HOTKEYS_EXTENSION, EphyHotkeysExtensionClass))
+#define EPHY_IS_HOTKEYS_EXTENSION(o)		(G_TYPE_CHECK_INSTANCE_TYPE ((o), EPHY_TYPE_HOTKEYS_EXTENSION))
+#define EPHY_IS_HOTKEYS_EXTENSION_CLASS(k)	(G_TYPE_CHECK_CLASS_TYPE ((k), EPHY_TYPE_HOTKEYS_EXTENSION))
+#define EPHY_HOTKEYS_EXTENSION_GET_CLASS(o)	(G_TYPE_INSTANCE_GET_CLASS ((o), EPHY_TYPE_HOTKEYS_EXTENSION, EphyHotkeysExtensionClass))
+
+typedef struct _EphyHotkeysExtension		EphyHotkeysExtension;
+typedef struct _EphyHotkeysExtensionClass	EphyHotkeysExtensionClass;
+typedef struct _EphyHotkeysExtensionPrivate	EphyHotkeysExtensionPrivate;
+
+struct _EphyHotkeysExtensionClass
+{
+	GObjectClass parent_class;
+};
+
+struct _EphyHotkeysExtension
+{
+	GObject parent_instance;
+
+	/*< private >*/
+	EphyHotkeysExtensionPrivate *priv;
+};
+
+GType	ephy_hotkeys_extension_get_type		(void);
+
+GType	ephy_hotkeys_extension_register_type	(GTypeModule *module);
+
+G_END_DECLS
+
+#endif
Index: extensions/hotkeys/hotkeys-mozilla.c
===================================================================
--- extensions/hotkeys/hotkeys-mozilla.c	(révision 0)
+++ extensions/hotkeys/hotkeys-mozilla.c	(révision 0)
@@ -0,0 +1,50 @@
+/*
+ *  Copyright © 2007 Cyril Brulebois
+ *
+ *  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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ *
+ *  Based on the following file from the sample-mozilla extension
+ *  (released under the same license).
+ *
+ *  $Id: sample-mozilla.c 1376 2006-09-13 19:01:42Z chpe $
+ *
+ *  Copyright © 2003 Marco Pesenti Gritti
+ *  Copyright © 2003 Christian Persch
+ */
+
+#include "config.h"
+
+#include "ephy-hotkeys-extension.h"
+#include "ephy-debug.h"
+
+#include <gmodule.h>
+#include <glib/gi18n-lib.h>
+
+G_MODULE_EXPORT GType register_module (GTypeModule *module);
+
+G_MODULE_EXPORT GType
+register_module (GTypeModule *module)
+{
+	LOG ("Registering EphyHotkeysExtension");
+
+#ifdef ENABLE_NLS
+       /* Initialise the i18n stuff */
+        bindtextdomain (GETTEXT_PACKAGE, EPHY_EXTENSIONS_LOCALEDIR);
+        bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");	
+#endif /* ENABLE_NLS */
+
+	return ephy_hotkeys_extension_register_type (module);
+}
Index: extensions/hotkeys/hotkeys.ephy-extension.in.in
===================================================================
--- extensions/hotkeys/hotkeys.ephy-extension.in.in	(révision 0)
+++ extensions/hotkeys/hotkeys.ephy-extension.in.in	(révision 0)
@@ -0,0 +1,11 @@
+[Epiphany Extension]
+_Name=Hotkeys (Mozilla)
+_Description=A hotkeys extension (with mozilla backend) to ease keyboard-driven navigation
+Authors=Cyril Brulebois <cyril.brulebois@enst-bretagne.fr>
+Version=1
+URL=http://www.ikibiki.org/projects/epiphany-accessibility/
+
+
+[Loader]
+Type=shlib
+Library=%EXTENSION_DIR%/%LIBRARY%
Index: configure.ac
===================================================================
--- configure.ac	(révision 1611)
+++ configure.ac	(copie de travail)
@@ -161,15 +161,15 @@
 
 AC_MSG_CHECKING([which extensions to build])
 
-ALL_EXTENSIONS="actions adblock auto-reload auto-scroller certificates error-viewer extensions-manager-ui gestures greasemonkey java-console livehttpheaders page-info permissions push-scroller rss sample sample-mozilla select-stylesheet sidebar smart-bookmarks tab-groups tab-states"
-USEFUL_EXTENSIONS="actions adblock auto-reload auto-scroller certificates error-viewer extensions-manager-ui gestures java-console page-info push-scroller select-stylesheet sidebar smart-bookmarks tab-groups tab-states"
+ALL_EXTENSIONS="actions adblock auto-reload auto-scroller certificates error-viewer extensions-manager-ui gestures greasemonkey hotkeys java-console livehttpheaders page-info permissions push-scroller rss sample sample-mozilla select-stylesheet sidebar smart-bookmarks tab-groups tab-states"
+USEFUL_EXTENSIONS="actions adblock auto-reload auto-scroller certificates error-viewer extensions-manager-ui gestures hotkeys java-console page-info push-scroller select-stylesheet sidebar smart-bookmarks tab-groups tab-states"
 DEFAULT_EXTENSIONS="actions adblock auto-scroller certificates error-viewer extensions-manager-ui gestures java-console page-info push-scroller select-stylesheet sidebar smart-bookmarks tab-groups tab-states"
 
 PYTHON_ALL_EXTENSIONS="python-console sample-python favicon cc-license-viewer epilicious"
 PYTHON_USEFUL_EXTENSIONS="python-console favicon cc-license-viewer"
 PYTHON_DEFAULT_EXTENSIONS="python-console favicon cc-license-viewer"
 
-MOZILLA_ALL_EXTENSIONS="error-viewer greasemonkey java-console livehttpheaders page-info sample-mozilla select-stylesheet smart-bookmarks"
+MOZILLA_ALL_EXTENSIONS="error-viewer greasemonkey hotkeys java-console livehttpheaders page-info sample-mozilla select-stylesheet smart-bookmarks"
 
 DIST_EXTENSIONS="$ALL_EXTENSIONS $PYTHON_ALL_EXTENSIONS"
 
@@ -190,8 +190,8 @@
 			  build the specified extensions. Available:
 			  actions, adblock, auto-reload, auto-scroller, cc-license-viewer,
 			  certificates, error-viewer, extensions-manager-ui, favicon,
-			  gestures, greasemonkey, java-console, livehttpheaders, page-info,
-			  permissions, push-scroller, python-console, rss, sample,
+			  gestures, greasemonkey, hotkeys, java-console, livehttpheaders,
+			  page-info, permissions, push-scroller, python-console, rss, sample,
 			  sample-mozilla, sample-python, select-stylesheet, sidebar,
 			  smart-bookmarks, tab-groups, tab-states,
 			  as well as the aliases default, all, and really-all],
@@ -390,6 +390,8 @@
 extensions/favicon/Makefile
 extensions/greasemonkey/Makefile
 extensions/greasemonkey/mozilla/Makefile
+extensions/hotkeys/Makefile
+extensions/hotkeys/mozilla/Makefile
 extensions/livehttpheaders/Makefile
 extensions/livehttpheaders/mozilla/Makefile
 extensions/page-info/Makefile
Index: data/icons/hicolor_status_16x16_hotkeys.png
===================================================================
Impossible d'afficher : fichier considéré comme binaire.
svn:mime-type = application/octet-stream

Modification de propriétés sur data/icons/hicolor_status_16x16_hotkeys.png
___________________________________________________________________
Nom : svn:mime-type
   + application/octet-stream

Index: data/icons/Makefile.am
===================================================================
--- data/icons/Makefile.am	(révision 1611)
+++ data/icons/Makefile.am	(copie de travail)
@@ -6,6 +6,11 @@
 	hicolor_status_24x24_feed-presence.png \
 	hicolor_status_32x32_feed-presence.png \
 	hicolor_status_scalable_feed-presence.svg \
+	hicolor_status_16x16_hotkeys.png \
+	hicolor_status_22x22_hotkeys.png \
+	hicolor_status_24x24_hotkeys.png \
+	hicolor_status_32x32_hotkeys.png \
+	hicolor_status_scalable_hotkeys.svg \
 	$(NULL)
 
 noinst_DATA = \
Index: data/icons/hicolor_status_22x22_hotkeys.png
===================================================================
Impossible d'afficher : fichier considéré comme binaire.
svn:mime-type = application/octet-stream

Modification de propriétés sur data/icons/hicolor_status_22x22_hotkeys.png
___________________________________________________________________
Nom : svn:mime-type
   + application/octet-stream

Index: data/icons/hicolor_status_32x32_hotkeys.png
===================================================================
Impossible d'afficher : fichier considéré comme binaire.
svn:mime-type = application/octet-stream

Modification de propriétés sur data/icons/hicolor_status_32x32_hotkeys.png
___________________________________________________________________
Nom : svn:mime-type
   + application/octet-stream

Index: data/icons/hicolor_status_scalable_hotkeys.svg
===================================================================
--- data/icons/hicolor_status_scalable_hotkeys.svg	(révision 0)
+++ data/icons/hicolor_status_scalable_hotkeys.svg	(révision 0)
@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://web.resource.org/cc/"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="64px"
+   height="64px"
+   id="svg17818"
+   sodipodi:version="0.32"
+   inkscape:version="0.45.1"
+   sodipodi:docbase="/home/kibi/hacking/epiphany-extensions.git/extensions/hotkeys/icons/scalable/status"
+   sodipodi:docname="hotkeys.svg"
+   inkscape:output_extension="org.inkscape.output.svg.inkscape">
+  <defs
+     id="defs17820" />
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="3.8890873"
+     inkscape:cx="29.875524"
+     inkscape:cy="29.36108"
+     inkscape:current-layer="layer1"
+     showgrid="true"
+     inkscape:document-units="px"
+     inkscape:grid-bbox="true"
+     showguides="true"
+     inkscape:guide-bbox="true"
+     inkscape:window-width="1024"
+     inkscape:window-height="721"
+     inkscape:window-x="0"
+     inkscape:window-y="31">
+    <sodipodi:guide
+       orientation="horizontal"
+       position="67.454545"
+       id="guide18797" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata17823">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <cc:license
+           rdf:resource="http://web.resource.org/cc/PublicDomain" />
+        <dc:creator>
+          <cc:Agent>
+            <dc:title>Cyril Brulebois &lt;cyril.brulebois@enst-bretagne.fr&gt;</dc:title>
+          </cc:Agent>
+        </dc:creator>
+        <dc:description />
+        <dc:title>H(ot)key.</dc:title>
+      </cc:Work>
+      <cc:License
+         rdf:about="http://web.resource.org/cc/PublicDomain">
+        <cc:permits
+           rdf:resource="http://web.resource.org/cc/Reproduction" />
+        <cc:permits
+           rdf:resource="http://web.resource.org/cc/Distribution" />
+        <cc:permits
+           rdf:resource="http://web.resource.org/cc/DerivativeWorks" />
+      </cc:License>
+    </rdf:RDF>
+  </metadata>
+  <g
+     id="layer1"
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer">
+    <rect
+       style="opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:6.423419;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+       id="rect18799"
+       width="52.321667"
+       height="52.321667"
+       x="5.8391662"
+       y="5.8391662" />
+    <path
+       style="font-size:66.42156982px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:FreeMono"
+       d="M 14.708254,16.047754 C 14.708253,14.018244 16.047753,13.003471 18.726758,13.003433 L 25.789584,13.003433 L 25.789584,27.311744 C 28.225027,24.835722 31.005505,23.597699 34.131026,23.597672 C 37.378279,23.597699 39.976097,24.531291 41.924489,26.398448 C 43.913416,28.225064 44.907893,30.660519 44.907924,33.70482 L 44.907924,44.907924 L 45.273243,44.907924 C 47.952212,44.90793 49.291712,45.922702 49.291747,47.952245 C 49.291712,49.981794 47.952212,50.996567 45.273243,50.996567 L 38.453962,50.996567 C 35.734346,50.996567 34.374551,49.981794 34.374571,47.952245 C 34.374551,45.922702 35.734346,44.90793 38.453962,44.907924 L 38.819281,44.907924 L 38.819281,34.496344 C 38.819256,32.953905 38.453938,31.776769 37.723325,30.96493 C 37.033256,30.112541 35.612574,29.686337 33.461275,29.686315 C 32.040573,29.686337 30.843141,29.950178 29.868975,30.477839 C 28.894777,31.005541 27.534982,32.101496 25.789584,33.765706 L 25.789584,44.907924 L 26.154903,44.907924 C 28.874482,44.90793 30.234278,45.922702 30.234294,47.952245 C 30.234278,49.981794 28.874482,50.996567 26.154903,50.996567 L 19.335622,50.996567 C 16.656617,50.996567 15.317116,49.981794 15.317118,47.952245 C 15.317116,45.922702 16.656617,44.90793 19.335622,44.907924 L 19.700941,44.907924 L 19.700941,19.092076 L 18.726758,19.092076 C 17.427844,19.092108 16.433367,18.889153 15.743323,18.483212 C 15.053276,18.036744 14.708253,17.224926 14.708254,16.047754"
+       id="text18801" />
+  </g>
+</svg>
Index: data/icons/hicolor_status_24x24_hotkeys.png
===================================================================
Impossible d'afficher : fichier considéré comme binaire.
svn:mime-type = application/octet-stream

Modification de propriétés sur data/icons/hicolor_status_24x24_hotkeys.png
___________________________________________________________________
Nom : svn:mime-type
   + application/octet-stream

