diff options
author | Corey Berla <corey@berla.me> | 2022-11-02 08:02:56 -0700 |
---|---|---|
committer | António Fernandes <antoniof@gnome.org> | 2023-01-09 11:06:43 +0000 |
commit | 191a1787b6a9a413a47b8edf0e661cc16f2f197f (patch) | |
tree | 39b2c12baf1f595ec795fe82d0d6d664649f8c75 | |
parent | c2103f77387d3de7d530d7396a30a5e01bd44f87 (diff) | |
download | nautilus-191a1787b6a9a413a47b8edf0e661cc16f2f197f.tar.gz |
window: Add detach tab menu option
-rw-r--r-- | src/nautilus-window.c | 13 | ||||
-rw-r--r-- | src/resources/ui/nautilus-window.ui | 4 |
2 files changed, 17 insertions, 0 deletions
diff --git a/src/nautilus-window.c b/src/nautilus-window.c index dbbc4889d..eaa297db2 100644 --- a/src/nautilus-window.c +++ b/src/nautilus-window.c @@ -1428,6 +1428,18 @@ tab_view_create_window_cb (AdwTabView *tab_view, } static void +action_tab_move_new_window (GSimpleAction *action, + GVariant *parameter, + gpointer user_data) +{ + NautilusWindow *window = user_data; + AdwTabPage *page = get_current_page (window); + AdwTabView *new_view = tab_view_create_window_cb (window->tab_view, window); + + adw_tab_view_transfer_page (window->tab_view, page, new_view, 0); +} + +static void setup_tab_view (NautilusWindow *window) { g_signal_connect (window->tab_view, "close-page", @@ -1473,6 +1485,7 @@ const GActionEntry win_entries[] = { "go-starred", action_go_starred }, { "tab-move-left", action_tab_move_left }, { "tab-move-right", action_tab_move_right }, + { "tab-move-new-window", action_tab_move_new_window }, { "prompt-root-location", action_prompt_for_location_root }, { "prompt-home-location", action_prompt_for_location_home }, { "go-to-tab", NULL, "i", "0", action_go_to_tab }, diff --git a/src/resources/ui/nautilus-window.ui b/src/resources/ui/nautilus-window.ui index c0b46c53b..e7ae95809 100644 --- a/src/resources/ui/nautilus-window.ui +++ b/src/resources/ui/nautilus-window.ui @@ -10,6 +10,10 @@ </section> <section> <item> + <attribute name="label" translatable="yes">Move Tab to New _Window</attribute> + <attribute name="action">win.tab-move-new-window</attribute> + </item> + <item> <attribute name="label" translatable="yes" comments="Translators: use “Move Tab _Right” for RTL languages">Move Tab _Left</attribute> <attribute name="action">win.tab-move-left</attribute> </item> |