summaryrefslogtreecommitdiff
path: root/src/terminal-window.c
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2017-12-26 01:37:17 +0100
committerPablo Barciela <[email protected]>2017-12-29 16:26:03 +0100
commit294ce367b2d376bb4b53017136c82af94a15026e (patch)
tree9a3e707e56eda23f6214c465ccba479a462b1a91 /src/terminal-window.c
parent26ded92d74412cba21b8f7f6c822d386f6a5e909 (diff)
downloadmate-terminal-294ce367b2d376bb4b53017136c82af94a15026e.tar.bz2
mate-terminal-294ce367b2d376bb4b53017136c82af94a15026e.tar.xz
middle click on a tab: add the gsettings key to enable the feature
Closes https://github.com/mate-desktop/mate-terminal/issues/184
Diffstat (limited to 'src/terminal-window.c')
-rw-r--r--src/terminal-window.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/terminal-window.c b/src/terminal-window.c
index 26655cb..5cdb6a4 100644
--- a/src/terminal-window.c
+++ b/src/terminal-window.c
@@ -2941,8 +2941,12 @@ notebook_button_press_cb (GtkWidget *widget,
int page_num;
int before_pages;
int later_pages;
+ GSettings *settings;
+
+ settings = g_settings_new ("org.mate.terminal.global");
- if (event->type == GDK_BUTTON_PRESS && event->button == 2)
+ if ((event->type == GDK_BUTTON_PRESS && event->button == 2) &&
+ (g_settings_get_boolean (settings, "middle-click-closes-tabs")))
{
tab_clicked = find_tab_num_at_pos (notebook, event->x_root, event->y_root);
if (tab_clicked >= 0)