mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2024-12-28 06:56:00 +01:00
Implement 'double-click-follow' option
This commit is contained in:
parent
48514b4d56
commit
d61fe4a374
2 changed files with 6 additions and 1 deletions
|
@ -983,7 +983,9 @@ cb_zathura_page_widget_button_release_event(GtkWidget* widget, GdkEventButton* b
|
|||
if (priv->mouse.selection.y2 == -1 && priv->mouse.selection.x2 == -1 ) {
|
||||
/* simple single click */
|
||||
/* get links */
|
||||
if (priv->zathura->global.double_click_follow) {
|
||||
evaluate_link_at_mouse_position(page, oldx, oldy);
|
||||
}
|
||||
} else {
|
||||
zathura_rectangle_t tmp = priv->mouse.selection;
|
||||
|
||||
|
@ -996,6 +998,8 @@ cb_zathura_page_widget_button_release_event(GtkWidget* widget, GdkEventButton* b
|
|||
if (text != NULL && *text != '\0') {
|
||||
/* emit text-selected signal */
|
||||
g_signal_emit(ZATHURA_PAGE(widget), signals[TEXT_SELECTED], 0, text);
|
||||
} else if (priv->zathura->global.double_click_follow == false) {
|
||||
evaluate_link_at_mouse_position(page, oldx, oldy);
|
||||
}
|
||||
g_free(text);
|
||||
}
|
||||
|
|
|
@ -96,6 +96,7 @@ zathura_create(void)
|
|||
/* global settings */
|
||||
zathura->global.search_direction = FORWARD;
|
||||
zathura->global.sandbox = ZATHURA_SANDBOX_NORMAL;
|
||||
zathura->global.double_click_follow = true;
|
||||
|
||||
/* plugins */
|
||||
zathura->plugins.manager = zathura_plugin_manager_new();
|
||||
|
|
Loading…
Reference in a new issue