diff -u ../xfce4-terminal-0.6.3-old/terminal/terminal-preferences.c terminal/terminal-preferences.c --- ../xfce4-terminal-0.6.3-old/terminal/terminal-preferences.c 2013-12-26 22:31:10.000000000 +0100 +++ terminal/terminal-preferences.c 2015-09-15 20:33:22.566798724 +0200 @@ -103,6 +103,7 @@ PROP_WORD_CHARS, PROP_TAB_ACTIVITY_COLOR, PROP_TAB_ACTIVITY_TIMEOUT, + PROP_MIDDLE_CLICK_OPEN_URI, N_PROPERTIES, }; @@ -910,6 +911,17 @@ "-A-Za-z0-9,./?%&#:_=+@~", G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); + /** + * TerminalPreferences:middle-click-open-uri: + **/ + preferences_props[PROP_MIDDLE_CLICK_OPEN_URI] = + g_param_spec_boolean ("middle-click-open-uri", + NULL, + "MiddleClickOpenUri", + TRUE, + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); + + /* install all properties */ g_object_class_install_properties (gobject_class, N_PROPERTIES, preferences_props); } diff -u ../xfce4-terminal-0.6.3-old/terminal/terminal-widget.c terminal/terminal-widget.c --- ../xfce4-terminal-0.6.3-old/terminal/terminal-widget.c 2013-12-26 22:31:10.000000000 +0100 +++ terminal/terminal-widget.c 2015-09-15 20:16:01.000000000 +0200 @@ -398,13 +398,20 @@ GdkEventButton *event) { gboolean committed = FALSE; + gboolean middle_click_open_uri; gchar *match; guint signal_id = 0; gint tag; - if (event->button == 2 && event->type == GDK_BUTTON_PRESS) + /* check whether to use ctrl-click or middle click to open URI */ + g_object_get (G_OBJECT (TERMINAL_WIDGET (widget)->preferences), + "middle-click-open-uri", &middle_click_open_uri, NULL); + + if ((event->type == GDK_BUTTON_PRESS) && + (middle_click_open_uri ? (event->button == 2) : + ((event->button == 1) && (event->state & GDK_CONTROL_MASK)))) { - /* middle-clicking on an URI fires the responsible application */ + /* clicking on an URI fires the responsible application */ match = vte_terminal_match_check (VTE_TERMINAL (widget), event->x / VTE_TERMINAL (widget)->char_width, event->y / VTE_TERMINAL (widget)->char_height,