Index: toolbar.c
===================================================================
RCS file: /cvs/gnome/epiphany/src/toolbar.c,v
retrieving revision 1.75
diff -u -p -r1.75 toolbar.c
--- toolbar.c	9 Jan 2004 22:04:55 -0000	1.75
+++ toolbar.c	5 Apr 2004 15:19:55 -0000
@@ -166,7 +166,35 @@ arbitrary_url_notifier (GConfClient *cli
 static void
 go_location_cb (GtkAction *action, char *location, EphyWindow *window)
 {
-	ephy_window_load_url (window, location);
+	GdkEvent *event;
+	gboolean new_tab = FALSE;
+
+	event = gtk_get_current_event ();
+	if (event != NULL)
+	{
+		/* middle-click or control-click */
+		if ((event->type == GDK_BUTTON_PRESS && event->button.button == 2) ||
+		    (event->type == GDK_BUTTON_RELEASE && event->button.button == 1 &&
+		     event->button.state & GDK_CONTROL_MASK))
+		{
+			new_tab = TRUE;
+		}
+
+		gdk_event_free (event);
+	}
+
+	if (new_tab)
+	{
+		ephy_shell_new_tab (ephy_shell, window,
+				    ephy_window_get_active_tab (window),
+				    location,
+				    EPHY_NEW_TAB_OPEN_PAGE |
+				    EPHY_NEW_TAB_IN_EXISTING_WINDOW);
+	}
+	else
+	{
+		ephy_window_load_url (window, location);
+	}
 }
 
 static void
Index: bookmarks/ephy-bookmark-action.c
===================================================================
RCS file: /cvs/gnome/epiphany/src/bookmarks/ephy-bookmark-action.c,v
retrieving revision 1.30
diff -u -p -r1.30 ephy-bookmark-action.c
--- bookmarks/ephy-bookmark-action.c	17 Mar 2004 09:08:08 -0000	1.30
+++ bookmarks/ephy-bookmark-action.c	5 Apr 2004 15:19:55 -0000
@@ -327,6 +327,19 @@ activate_cb (GtkWidget *widget, GtkActio
 	g_free (text);
 }
 
+static gboolean
+button_press_cb (GtkWidget *widget,
+		 GdkEventButton *event,
+		 GtkAction *action)
+{
+	if (event->button == 2)	
+	{
+		activate_cb (widget, action);
+	}
+
+	return FALSE;
+}
+
 static void
 connect_proxy (GtkAction *action, GtkWidget *proxy)
 {
@@ -352,6 +365,8 @@ connect_proxy (GtkAction *action, GtkWid
 	{
 		button = GTK_WIDGET (g_object_get_data (G_OBJECT (proxy), "button"));
 		g_signal_connect (button, "clicked", G_CALLBACK (activate_cb), action);
+		g_signal_connect (button, "button-press-event",
+				  G_CALLBACK (button_press_cb), action);
 
 		entry = GTK_WIDGET (g_object_get_data (G_OBJECT (proxy), "entry"));
 		g_signal_connect (entry, "activate", G_CALLBACK (activate_cb), action);
