Josip Janzic 2017-05-11 23:49:12 +02:00 committed by Jelle van der Waa
parent 285f4d77a3
commit 14ee4ff101
3 changed files with 11 additions and 0 deletions

1
config
View File

@ -15,6 +15,7 @@ font = Monospace 9
scrollback_lines = 10000 scrollback_lines = 10000
#search_wrap = true #search_wrap = true
#urgent_on_bell = true #urgent_on_bell = true
#hyperlinks = false
# $BROWSER is used by default if set, with xdg-open as a fallback # $BROWSER is used by default if set, with xdg-open as a fallback
#browser = xdg-open #browser = xdg-open

View File

@ -18,6 +18,9 @@ Set the default browser for opening links. If its not set,
.IP \fIclickable_url\fR .IP \fIclickable_url\fR
Auto-detected URLs can be clicked on to open them in your browser. Only Auto-detected URLs can be clicked on to open them in your browser. Only
enabled if a browser is configured or detected. enabled if a browser is configured or detected.
.IP \fIhyperlinks\fR
Enable support for applications to mark text as hyperlinks. Requires
clickable_url to be set.
.IP \fIcursor_blink\fR .IP \fIcursor_blink\fR
Specify the how the terminal's cursor should behave. Accepts Specify the how the terminal's cursor should behave. Accepts
\fBsystem\fR to respect the gtk global configuration, \fBon\fR and \fBsystem\fR to respect the gtk global configuration, \fBon\fR and

View File

@ -1169,7 +1169,11 @@ gboolean position_overlay_cb(GtkBin *overlay, GtkWidget *widget, GdkRectangle *a
gboolean button_press_cb(VteTerminal *vte, GdkEventButton *event, const config_info *info) { gboolean button_press_cb(VteTerminal *vte, GdkEventButton *event, const config_info *info) {
if (info->clickable_url && event->type == GDK_BUTTON_PRESS) { if (info->clickable_url && event->type == GDK_BUTTON_PRESS) {
#if VTE_CHECK_VERSION (0, 49, 1)
auto match = make_unique(vte_terminal_hyperlink_check_event(vte, (GdkEvent*)event), g_free);
#else
auto match = make_unique(check_match(vte, event), g_free); auto match = make_unique(check_match(vte, event), g_free);
#endif
if (!match) if (!match)
return FALSE; return FALSE;
@ -1459,6 +1463,9 @@ static void set_config(GtkWindow *window, VteTerminal *vte, GtkWidget *scrollbar
vte_terminal_set_mouse_autohide(vte, cfg_bool("mouse_autohide", FALSE)); vte_terminal_set_mouse_autohide(vte, cfg_bool("mouse_autohide", FALSE));
vte_terminal_set_allow_bold(vte, cfg_bool("allow_bold", TRUE)); vte_terminal_set_allow_bold(vte, cfg_bool("allow_bold", TRUE));
vte_terminal_search_set_wrap_around(vte, cfg_bool("search_wrap", TRUE)); vte_terminal_search_set_wrap_around(vte, cfg_bool("search_wrap", TRUE));
#if VTE_CHECK_VERSION (0, 49, 1)
vte_terminal_set_allow_hyperlink(vte, cfg_bool("hyperlinks", FALSE));
#endif
info->dynamic_title = cfg_bool("dynamic_title", TRUE); info->dynamic_title = cfg_bool("dynamic_title", TRUE);
info->urgent_on_bell = cfg_bool("urgent_on_bell", TRUE); info->urgent_on_bell = cfg_bool("urgent_on_bell", TRUE);
info->clickable_url = cfg_bool("clickable_url", TRUE); info->clickable_url = cfg_bool("clickable_url", TRUE);