[epiphany/mcatanzaro/#916] notebook: middle-click should not close pinned tabs
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/mcatanzaro/#916] notebook: middle-click should not close pinned tabs
- Date: Sun, 8 Sep 2019 17:40:09 +0000 (UTC)
commit 088c638e43533019bf4977d54181b2cd9cb029d5
Author: Michael Catanzaro <mcatanzaro gnome org>
Date: Sun Sep 8 12:39:38 2019 -0500
notebook: middle-click should not close pinned tabs
Fixes #916
src/ephy-notebook.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/src/ephy-notebook.c b/src/ephy-notebook.c
index 8d76bfec3..b3ce9e837 100644
--- a/src/ephy-notebook.c
+++ b/src/ephy-notebook.c
@@ -226,8 +226,11 @@ button_press_cb (EphyNotebook *notebook,
if (event->type == GDK_BUTTON_PRESS && event->button == GDK_BUTTON_MIDDLE) {
GtkWidget *tab = gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook), tab_clicked);
- g_signal_emit (notebook, signals[TAB_CLOSE_REQUEST], 0, tab);
- return GDK_EVENT_STOP;
+
+ if (!ephy_notebook_tab_is_pinned (notebook, EPHY_EMBED (tab))) {
+ g_signal_emit (notebook, signals[TAB_CLOSE_REQUEST], 0, tab);
+ return GDK_EVENT_STOP;
+ }
}
if (event->type == GDK_BUTTON_PRESS &&
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]