epiphany r8664 - trunk/src



Author: xan
Date: Sun Jan  4 14:46:33 2009
New Revision: 8664
URL: http://svn.gnome.org/viewvc/epiphany?rev=8664&view=rev

Log:
ephy-window: also open in new tab for ctrl+click.

Modified:
   trunk/src/ephy-window.c

Modified: trunk/src/ephy-window.c
==============================================================================
--- trunk/src/ephy-window.c	(original)
+++ trunk/src/ephy-window.c	Sun Jan  4 14:46:33 2009
@@ -2518,12 +2518,16 @@
 {
 	WebKitWebNavigationReason reason;
 	gint button;
+	gint state;
 
 	reason = webkit_web_navigation_action_get_reason (action);
 	button = webkit_web_navigation_action_get_button (action);
+	state = webkit_web_navigation_action_get_modifier_state (action);
 
+	/* Open in new tab for middle click or ctrl+click */
 	if (reason == WEBKIT_WEB_NAVIGATION_REASON_LINK_CLICKED &&
-	    button == 2 /* middle button */) {
+	    (button == 2 /* middle button */ ||
+	     (button == 1 && state == GDK_CONTROL_MASK) /* ctrl + left button */)) {
 		const char *uri;
 		EphyEmbed *embed;
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]