[epiphany/wip/exalm/menu: 42/43] window: Remove tab.detach action




commit b7f5061d32d5319a3080a3858c0d1ba37a21fd48
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Mon Sep 7 23:02:39 2020 +0500

    window: Remove tab.detach action
    
    It's never used.

 src/ephy-lockdown.c   | 11 -----------
 src/ephy-window.c     |  1 -
 src/window-commands.c | 25 -------------------------
 src/window-commands.h |  3 ---
 4 files changed, 40 deletions(-)
---
diff --git a/src/ephy-lockdown.c b/src/ephy-lockdown.c
index 43f311386..19d35af5f 100644
--- a/src/ephy-lockdown.c
+++ b/src/ephy-lockdown.c
@@ -111,10 +111,6 @@ static const BindAction popup_actions[] = {
   { EPHY_PREFS_LOCKDOWN_FULLSCREEN, "open-link-in-new-window", "enabled" }
 };
 
-static const BindAction tab_actions[] = {
-  { EPHY_PREFS_LOCKDOWN_FULLSCREEN, "detach", "enabled" }
-};
-
 static const BindAction toolbar_actions[] = {
   { EPHY_PREFS_LOCKDOWN_HISTORY, "navigation-back", "enabled" },
   { EPHY_PREFS_LOCKDOWN_HISTORY, "navigation-forward", "enabled" }
@@ -226,13 +222,6 @@ window_added_cb (GtkApplication *application,
                              window_actions,
                              G_N_ELEMENTS (window_actions));
 
-  action_group = gtk_widget_get_action_group (GTK_WIDGET (window),
-                                              "tab");
-  bind_settings_and_actions (EPHY_SETTINGS_LOCKDOWN,
-                             action_group,
-                             tab_actions,
-                             G_N_ELEMENTS (tab_actions));
-
   action_group = gtk_widget_get_action_group (GTK_WIDGET (window),
                                               "toolbar");
   bind_settings_and_actions (EPHY_SETTINGS_LOCKDOWN,
diff --git a/src/ephy-window.c b/src/ephy-window.c
index 0247993d9..249adea6d 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -878,7 +878,6 @@ static const GActionEntry tab_entries [] = {
   { "previous", window_cmd_tabs_previous },
   { "next", window_cmd_tabs_next },
   { "duplicate", window_cmd_tabs_duplicate },
-  { "detach", window_cmd_tabs_detach },
   { "close", window_cmd_tabs_close },
   { "close-left", window_cmd_tabs_close_left },
   { "close-right", window_cmd_tabs_close_right },
diff --git a/src/window-commands.c b/src/window-commands.c
index 35a35581c..a64107a80 100644
--- a/src/window-commands.c
+++ b/src/window-commands.c
@@ -2735,31 +2735,6 @@ window_cmd_tabs_duplicate (GSimpleAction *action,
     ephy_web_view_load_url (EPHY_WEB_VIEW (new_view), webkit_web_view_get_uri (view));
 }
 
-void
-window_cmd_tabs_detach (GSimpleAction *action,
-                        GVariant      *variant,
-                        gpointer       user_data)
-{
-  EphyEmbed *embed;
-  GtkNotebook *notebook;
-  EphyWindow *new_window;
-
-  notebook = GTK_NOTEBOOK (ephy_window_get_notebook (EPHY_WINDOW (user_data)));
-  if (gtk_notebook_get_n_pages (notebook) <= 1)
-    return;
-
-  embed = ephy_embed_container_get_active_child (EPHY_EMBED_CONTAINER (user_data));
-
-  g_object_ref_sink (embed);
-  gtk_notebook_remove_page (notebook, gtk_notebook_page_num (notebook, GTK_WIDGET (embed)));
-
-  new_window = ephy_window_new ();
-  ephy_embed_container_add_child (EPHY_EMBED_CONTAINER (new_window), embed, 0, FALSE);
-  g_object_unref (embed);
-
-  gtk_window_present_with_time (GTK_WINDOW (new_window), gtk_get_current_event_time ());
-}
-
 void
 window_cmd_tabs_close (GSimpleAction *action,
                        GVariant      *parameter,
diff --git a/src/window-commands.h b/src/window-commands.h
index ca80dcf63..c11a66cfe 100644
--- a/src/window-commands.h
+++ b/src/window-commands.h
@@ -191,9 +191,6 @@ void window_cmd_tabs_move_right                 (GSimpleAction *action,
 void window_cmd_tabs_duplicate                  (GSimpleAction *action,
                                                  GVariant      *state,
                                                  gpointer       user_data);
-void window_cmd_tabs_detach                     (GSimpleAction *action,
-                                                 GVariant      *state,
-                                                 gpointer       user_data);
 void window_cmd_tabs_close                      (GSimpleAction *action,
                                                  GVariant      *parameter,
                                                  gpointer       user_data);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]