mirror of
https://gitlab.gnome.org/GNOME/nautilus
synced 2024-08-25 02:36:07 +00:00
notebook: Add middle click tab close support
It was requested for some time given that browsers do it. It's also quite harmless. Closes https://gitlab.gnome.org/GNOME/nautilus/issues/47
This commit is contained in:
parent
ad95c95be3
commit
c01dda9483
|
@ -160,6 +160,14 @@ button_press_cb (NautilusNotebook *notebook,
|
|||
/* switch to the page the mouse is over, but don't consume the event */
|
||||
gtk_notebook_set_current_page (GTK_NOTEBOOK (notebook), tab_clicked);
|
||||
}
|
||||
else if (event->type == GDK_BUTTON_PRESS &&
|
||||
event->button == GDK_BUTTON_MIDDLE)
|
||||
{
|
||||
GtkWidget *slot;
|
||||
|
||||
slot = gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook), tab_clicked);
|
||||
g_signal_emit (notebook, signals[TAB_CLOSE_REQUEST], 0, slot);
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue