summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorey Berla <corey@berla.me>2022-11-01 17:11:11 -0700
committerAntónio Fernandes <antoniof@gnome.org>2023-01-09 22:28:39 -0500
commitcdb34eb3426735d7f1f762cef3fc35211d135bc9 (patch)
tree115a70b262029726a51a3b6b61377ffedeb5b515
parent0f2974590dafc5d4f4be810227c48d31f5b51207 (diff)
downloadnautilus-cdb34eb3426735d7f1f762cef3fc35211d135bc9.tar.gz
window: Make new tabs use location from menu tab or current tab
New tabs are always taking the location of the current tab even if the new tab was generated from a non-current tab using the tab bar context menu. (cherry picked from commit 2282fa5a57b082abcd38312a3e3085f18362b6f3)
-rw-r--r--src/nautilus-window.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/nautilus-window.c b/src/nautilus-window.c
index 7cb56b75b..107f1be95 100644
--- a/src/nautilus-window.c
+++ b/src/nautilus-window.c
@@ -744,10 +744,12 @@ void
nautilus_window_new_tab (NautilusWindow *window)
{
NautilusWindowSlot *current_slot;
+ AdwTabPage *page;
GFile *location;
g_autofree gchar *uri = NULL;
- current_slot = nautilus_window_get_active_slot (window);
+ page = get_current_page (window);
+ current_slot = NAUTILUS_WINDOW_SLOT (adw_tab_page_get_child (page));
location = nautilus_window_slot_get_location (current_slot);
if (location != NULL)