summaryrefslogtreecommitdiff
path: root/pluma/pluma-window.c
diff options
context:
space:
mode:
authorbl0ckeduser <[email protected]>2016-01-22 17:05:28 -0500
committerbl0ckeduser <[email protected]>2016-01-22 17:06:19 -0500
commit9d1bf65037d56ced8c3d4396902e83e286222914 (patch)
treee5b178930c2a1fe640f3570e61735e44f9fecae9 /pluma/pluma-window.c
parent4ff576d7f43a1c9061998eab09f2211bbc71119d (diff)
downloadpluma-9d1bf65037d56ced8c3d4396902e83e286222914.tar.bz2
pluma-9d1bf65037d56ced8c3d4396902e83e286222914.tar.xz
Implement middle-click tab closing (#143)
Diffstat (limited to 'pluma/pluma-window.c')
-rw-r--r--pluma/pluma-window.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/pluma/pluma-window.c b/pluma/pluma-window.c
index 0126ec30..8430443d 100644
--- a/pluma/pluma-window.c
+++ b/pluma/pluma-window.c
@@ -3434,6 +3434,13 @@ notebook_button_press_event (GtkNotebook *notebook,
{
return show_notebook_popup_menu (notebook, window, event);
}
+ else if (GDK_BUTTON_PRESS == event->type && 2 == event->button)
+ {
+ GtkWidget *tab;
+ tab = GTK_WIDGET (pluma_window_get_active_tab (window));
+ notebook_tab_close_request (notebook, tab, window);
+ return FALSE;
+ }
return FALSE;
}