Implement middle-click tab closing (#143)
This commit is contained in:
parent
4ff576d7f4
commit
9d1bf65037
|
@ -614,7 +614,7 @@ button_press_cb (PlumaNotebook *notebook,
|
||||||
NULL);
|
NULL);
|
||||||
}
|
}
|
||||||
else if ((event->type == GDK_BUTTON_PRESS) &&
|
else if ((event->type == GDK_BUTTON_PRESS) &&
|
||||||
(event->button == 3))
|
(event->button == 3 || event->button == 2))
|
||||||
{
|
{
|
||||||
if (tab_clicked == -1)
|
if (tab_clicked == -1)
|
||||||
{
|
{
|
||||||
|
|
|
@ -3434,6 +3434,13 @@ notebook_button_press_event (GtkNotebook *notebook,
|
||||||
{
|
{
|
||||||
return show_notebook_popup_menu (notebook, window, event);
|
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;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue