diff options
author | ZenWalker <[email protected]> | 2017-04-19 15:18:59 +0200 |
---|---|---|
committer | raveit65 <[email protected]> | 2017-05-12 10:56:41 +0200 |
commit | 5bed2111c37a1d39eaf7cdad489bd954b5f06227 (patch) | |
tree | 132993b013cde958cb2449b80ab60bf7ed94ba95 /pluma/pluma-window.c | |
parent | c271f003e7e24728bde3df9acff1d57e8f590dcb (diff) | |
download | pluma-5bed2111c37a1d39eaf7cdad489bd954b5f06227.tar.bz2 pluma-5bed2111c37a1d39eaf7cdad489bd954b5f06227.tar.xz |
double click to the right of the last open tab to open a new tab
New feature
Fixes #185
Diffstat (limited to 'pluma/pluma-window.c')
-rw-r--r-- | pluma/pluma-window.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/pluma/pluma-window.c b/pluma/pluma-window.c index 8bff1509..b24434df 100644 --- a/pluma/pluma-window.c +++ b/pluma/pluma-window.c @@ -3419,16 +3419,21 @@ notebook_button_press_event (GtkNotebook *notebook, GdkEventButton *event, PlumaWindow *window) { - if (GDK_BUTTON_PRESS == event->type && 3 == event->button) + if (event->type == GDK_BUTTON_PRESS) { - return show_notebook_popup_menu (notebook, window, event); + if (event->button == 3) + return show_notebook_popup_menu (notebook, window, event); + + else if (event->button == 2) + { + PlumaTab *tab; + tab = pluma_window_get_active_tab (window); + notebook_tab_close_request (PLUMA_NOTEBOOK (notebook), tab, GTK_WINDOW (window)); + } } - else if (GDK_BUTTON_PRESS == event->type && 2 == event->button) + else if ((event->type == GDK_2BUTTON_PRESS) && (event->button == 1)) { - PlumaTab *tab; - tab = pluma_window_get_active_tab (window); - notebook_tab_close_request (PLUMA_NOTEBOOK (notebook), tab, GTK_WINDOW (window)); - return FALSE; + pluma_window_create_tab (window, TRUE); } return FALSE; |