[epiphany/gnome-3-34] Exclude pinned tabs from "close other tabs" and "close tabs to the left/right"
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/gnome-3-34] Exclude pinned tabs from "close other tabs" and "close tabs to the left/right"
- Date: Tue, 5 Nov 2019 23:33:08 +0000 (UTC)
commit b27908b4248b2c71ea63e1f412f0a3608ea61052
Author: Jan-Michael Brummer <jan brummer tabos org>
Date: Tue Nov 5 15:38:24 2019 +0000
Exclude pinned tabs from "close other tabs" and "close tabs to the left/right"
Fixes: https://gitlab.gnome.org/GNOME/epiphany/issues/975
(cherry picked from commit cd45a0805e6c4baee697b0cbfcb5ea5c42b92328)
src/window-commands.c | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/src/window-commands.c b/src/window-commands.c
index bbc3c4eab..2b48f2855 100644
--- a/src/window-commands.c
+++ b/src/window-commands.c
@@ -2605,7 +2605,9 @@ window_cmd_tabs_close_left (GSimpleAction *action,
for (int i = 0; i < current_page_no; i++) {
embed = EPHY_EMBED (gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook), i));
- pages_to_close = g_slist_prepend (pages_to_close, embed);
+
+ if (!ephy_notebook_tab_is_pinned (EPHY_NOTEBOOK (notebook), embed))
+ pages_to_close = g_slist_prepend (pages_to_close, embed);
}
for (GSList *l = pages_to_close; l != NULL; l = l->next) {
@@ -2633,7 +2635,9 @@ window_cmd_tabs_close_right (GSimpleAction *action,
for (int i = current_page_no + 1; i < n_pages; i++) {
embed = EPHY_EMBED (gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook), i));
- pages_to_close = g_slist_prepend (pages_to_close, embed);
+
+ if (!ephy_notebook_tab_is_pinned (EPHY_NOTEBOOK (notebook), embed))
+ pages_to_close = g_slist_prepend (pages_to_close, embed);
}
for (GSList *l = pages_to_close; l != NULL; l = l->next) {
@@ -2662,7 +2666,9 @@ window_cmd_tabs_close_others (GSimpleAction *action,
for (int i = 0; i < n_pages; i++) {
if (i != current_page) {
embed = EPHY_EMBED (gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook), i));
- pages_to_close = g_slist_prepend (pages_to_close, embed);
+
+ if (!ephy_notebook_tab_is_pinned (EPHY_NOTEBOOK (notebook), embed))
+ pages_to_close = g_slist_prepend (pages_to_close, embed);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]