[epiphany] Remove the overview widget and use the html based one instead



commit 05b453413675b765a121d33fd7ab4536851b1695
Author: Carlos Garcia Campos <cgarcia igalia com>
Date:   Mon Feb 10 20:35:25 2014 +0100

    Remove the overview widget and use the html based one instead

 embed/Makefile.am                            |    2 -
 embed/ephy-about-handler.c                   |    2 +-
 embed/ephy-embed.c                           |   88 +---
 embed/ephy-embed.h                           |    5 -
 embed/ephy-overview.c                        |  169 ------
 embed/ephy-overview.h                        |   60 --
 embed/ephy-web-view.c                        |   15 +-
 embed/ephy-web-view.h                        |    1 +
 lib/widgets/Makefile.am                      |   15 -
 lib/widgets/ephy-overview-store.c            |    6 -
 lib/widgets/ephy-overview-store.h            |   16 +-
 lib/widgets/ephy-removable-pixbuf-renderer.c |  244 --------
 lib/widgets/ephy-removable-pixbuf-renderer.h |   66 ---
 lib/widgets/gd-main-icon-view.c              |  221 --------
 lib/widgets/gd-main-icon-view.h              |   74 ---
 lib/widgets/gd-main-list-view.c              |  224 --------
 lib/widgets/gd-main-list-view.h              |   80 ---
 lib/widgets/gd-main-view-generic.c           |  176 ------
 lib/widgets/gd-main-view-generic.h           |   99 ----
 lib/widgets/gd-main-view.c                   |  780 --------------------------
 lib/widgets/gd-main-view.h                   |  108 ----
 lib/widgets/gd-toggle-pixbuf-renderer.c      |  198 -------
 lib/widgets/gd-toggle-pixbuf-renderer.h      |   75 ---
 lib/widgets/gd-two-lines-renderer.c          |  528 -----------------
 lib/widgets/gd-two-lines-renderer.h          |   75 ---
 src/ephy-navigation-history-action.c         |    6 -
 src/ephy-shell.c                             |    2 +-
 src/ephy-window.c                            |  128 ++---
 28 files changed, 67 insertions(+), 3396 deletions(-)
---
diff --git a/embed/Makefile.am b/embed/Makefile.am
index 4e79e2e..d1a2220 100644
--- a/embed/Makefile.am
+++ b/embed/Makefile.am
@@ -21,7 +21,6 @@ INST_H_FILES = \
        ephy-embed-shell.h              \
        ephy-embed-utils.h              \
        ephy-find-toolbar.h             \
-       ephy-overview.h                 \
        ephy-web-view.h                 \
        ephy-web-extension-proxy.h
 
@@ -43,7 +42,6 @@ libephyembed_la_SOURCES = \
        ephy-encodings.c                \
        ephy-file-monitor.c             \
        ephy-find-toolbar.c             \
-       ephy-overview.c                 \
        ephy-embed-prefs.c              \
        ephy-web-view.c                 \
        ephy-web-extension-proxy.c      \
diff --git a/embed/ephy-about-handler.c b/embed/ephy-about-handler.c
index 13aeb92..9a2c4d6 100644
--- a/embed/ephy-about-handler.c
+++ b/embed/ephy-about-handler.c
@@ -596,7 +596,7 @@ ephy_about_handler_handle_request (EphyAboutHandler *handler,
     handled =  ephy_about_handler_handle_epiphany (handler, request);
   else if (!g_strcmp0 (path, "applications"))
     handled = ephy_about_handler_handle_applications (handler, request);
-  else if (!g_strcmp0 (path, "html-overview"))
+  else if (!g_strcmp0 (path, "overview"))
     handled = ephy_about_handler_handle_html_overview (handler, request);
   else if (!g_strcmp0 (path, "incognito"))
     handled = ephy_about_handler_handle_incognito (handler, request);
diff --git a/embed/ephy-embed.c b/embed/ephy-embed.c
index 4360021..374884f 100644
--- a/embed/ephy-embed.c
+++ b/embed/ephy-embed.c
@@ -66,8 +66,6 @@ struct _EphyEmbedPrivate
 
   WebKitURIRequest *delayed_request;
 
-  GtkWidget *overview;
-  guint overview_mode : 1;
   GSList *messages;
   GSList *keys;
 
@@ -89,7 +87,6 @@ enum
 {
   PROP_0,
   PROP_WEB_VIEW,
-  PROP_OVERVIEW_MODE,
 };
 
 G_DEFINE_TYPE (EphyEmbed, ephy_embed, GTK_TYPE_BOX)
@@ -248,20 +245,8 @@ load_changed_cb (WebKitWebView *web_view,
                  WebKitLoadEvent load_event,
                  EphyEmbed *embed)
 {
-  switch (load_event) {
-  case WEBKIT_LOAD_STARTED: {
-    const char *uri;
-
-    uri = webkit_web_view_get_uri (web_view);
-    ephy_embed_set_overview_mode (embed, g_strcmp0 (uri, "ephy-about:overview") == 0);
-    break;
-  }
-  case WEBKIT_LOAD_COMMITTED:
+  if (load_event == WEBKIT_LOAD_COMMITTED)
     ephy_embed_destroy_top_widgets (embed);
-    break;
-  default:
-    break;
-  }
 }
 
 static void
@@ -400,9 +385,6 @@ ephy_embed_set_property (GObject *object,
   case PROP_WEB_VIEW:
     embed->priv->web_view = g_value_get_object (value);
     break;
-  case PROP_OVERVIEW_MODE:
-    ephy_embed_set_overview_mode (embed, g_value_get_boolean (value));
-    break;
   default:
     G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
     break;
@@ -422,9 +404,6 @@ ephy_embed_get_property (GObject *object,
   case PROP_WEB_VIEW:
     g_value_set_object (value, ephy_embed_get_web_view (embed));
     break;
-  case PROP_OVERVIEW_MODE:
-    g_value_set_boolean (value, ephy_embed_get_overview_mode (embed));
-    break;
   default:
     G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
     break;
@@ -462,18 +441,6 @@ ephy_embed_class_init (EphyEmbedClass *klass)
                                                         "The WebView contained in the embed",
                                                         EPHY_TYPE_WEB_VIEW,
                                                         G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
-/**
- * EphyEmbed:overview-mode:
- *
- * If %TRUE activates the overview mode in this #EphyEmbed.
- **/
-  g_object_class_install_property (object_class,
-                                   PROP_OVERVIEW_MODE,
-                                   g_param_spec_boolean ("overview-mode",
-                                                         "Overview mode",
-                                                         "Whether the embed is showing the overview",
-                                                         FALSE,
-                                                         G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
 
   g_type_class_add_private (G_OBJECT_CLASS (klass), sizeof(EphyEmbedPrivate));
 }
@@ -669,19 +636,6 @@ ephy_embed_constructed (GObject *object)
                          GDK_LEAVE_NOTIFY_MASK);
   gtk_container_add (GTK_CONTAINER (overlay), GTK_WIDGET (priv->web_view));
 
-  /* The overview. In incognito mode we don't use it. */
-  if (ephy_embed_shell_get_mode (ephy_embed_shell_get_default ()) !=
-      EPHY_EMBED_SHELL_MODE_INCOGNITO) {
-    priv->overview = ephy_overview_new ();
-    gtk_widget_set_halign (priv->overview, GTK_ALIGN_FILL);
-    gtk_widget_set_valign (priv->overview, GTK_ALIGN_FILL);
-    gtk_overlay_add_overlay (GTK_OVERLAY (overlay), priv->overview);
-
-    g_object_bind_property (embed, "overview-mode",
-                            priv->overview, "visible",
-                            G_BINDING_SYNC_CREATE);
-  }
-
   /* Floating message popup for fullscreen mode. */
   priv->fullscreen_message_label = gtk_label_new (NULL);
   gtk_widget_set_name (priv->fullscreen_message_label, "fullscreen-popup");
@@ -851,31 +805,6 @@ ephy_embed_remove_top_widget (EphyEmbed *embed, GtkWidget *widget)
                         GTK_WIDGET (widget));
 }
 
-void
-ephy_embed_set_overview_mode (EphyEmbed *embed, gboolean overview_mode)
-{
-  EphyEmbedPrivate *priv;
-
-  g_return_if_fail (EPHY_IS_EMBED (embed));
-
-  priv = embed->priv;
-
-  if (priv->overview_mode == overview_mode)
-    return;
-
-  priv->overview_mode = overview_mode;
-
-  g_object_notify (G_OBJECT (embed), "overview-mode");
-}
-
-gboolean
-ephy_embed_get_overview_mode (EphyEmbed *embed)
-{
-  g_return_val_if_fail (EPHY_IS_EMBED (embed), FALSE);
-
-  return embed->priv->overview_mode;
-}
-
 /**
  * ephy_embed_set_delayed_load_request:
  * @embed: a #EphyEmbed
@@ -912,18 +841,3 @@ ephy_embed_has_load_pending (EphyEmbed *embed)
   return !!embed->priv->delayed_request;
 }
 
-/**
- * ephy_embed_get_overview:
- * @embed: a #EphyEmbed
- *
- * Gets the #EphyOverview in this @embed
- *
- * Returns: (transfer none): the overview widget
- **/
-EphyOverview *
-ephy_embed_get_overview (EphyEmbed *embed)
-{
-  g_return_val_if_fail (EPHY_IS_EMBED (embed), NULL);
-
-  return EPHY_OVERVIEW (embed->priv->overview);
-}
diff --git a/embed/ephy-embed.h b/embed/ephy-embed.h
index 8aaa9a3..ea81c3b 100644
--- a/embed/ephy-embed.h
+++ b/embed/ephy-embed.h
@@ -23,7 +23,6 @@
 #define EPHY_EMBED_H
 
 #include "ephy-find-toolbar.h"
-#include "ephy-overview.h"
 #include "ephy-web-view.h"
 
 #include <gtk/gtk.h>
@@ -65,10 +64,6 @@ void             ephy_embed_leaving_fullscreen       (EphyEmbed *embed);
 void             ephy_embed_set_delayed_load_request (EphyEmbed *embed,
                                                       WebKitURIRequest     *request);
 gboolean         ephy_embed_has_load_pending         (EphyEmbed *embed);
-void             ephy_embed_set_overview_mode        (EphyEmbed *embed,
-                                                      gboolean   overview_mode);
-gboolean         ephy_embed_get_overview_mode        (EphyEmbed *embed);
-EphyOverview*    ephy_embed_get_overview             (EphyEmbed *embed);
 
 G_END_DECLS
 
diff --git a/embed/ephy-web-view.c b/embed/ephy-web-view.c
index f4e47a9..8c121f5 100644
--- a/embed/ephy-web-view.c
+++ b/embed/ephy-web-view.c
@@ -37,7 +37,6 @@
 #include "ephy-file-monitor.h"
 #include "ephy-form-auth-data.h"
 #include "ephy-history-service.h"
-#include "ephy-overview.h"
 #include "ephy-prefs.h"
 #include "ephy-settings.h"
 #include "ephy-string.h"
@@ -739,7 +738,7 @@ get_title_from_address (const char *address)
     return g_strdup (address + 7);
   else if (!strcmp (address, EPHY_ABOUT_SCHEME":overview") ||
            !strcmp (address, "about:overview"))
-    return g_strdup (EPHY_OVERVIEW_TITLE);
+    return g_strdup (_("Most Visited"));
   else
     return ephy_string_get_host_name (address);
 }
@@ -2302,6 +2301,18 @@ ephy_web_view_get_is_blank (EphyWebView *view)
   return view->priv->is_blank;
 }
 
+gboolean
+ephy_web_view_is_overview (EphyWebView *view)
+{
+  EphyWebViewPrivate *priv = view->priv;
+
+  if (!priv->address)
+    return FALSE;
+
+  return (!strcmp (priv->address, EPHY_ABOUT_SCHEME":overview") ||
+          !strcmp (priv->address, "about:overview"));
+}
+
 /**
  * ephy_web_view_get_address:
  * @view: an #EphyWebView
diff --git a/embed/ephy-web-view.h b/embed/ephy-web-view.h
index 38cc4a5..7829627 100644
--- a/embed/ephy-web-view.h
+++ b/embed/ephy-web-view.h
@@ -137,6 +137,7 @@ const char *               ephy_web_view_get_typed_address        (EphyWebView
 void                       ephy_web_view_set_typed_address        (EphyWebView               *view,
                                                                    const char                *address);
 gboolean                   ephy_web_view_get_is_blank             (EphyWebView               *view);
+gboolean                   ephy_web_view_is_overview              (EphyWebView               *view);
 void                       ephy_web_view_has_modified_forms       (EphyWebView               *view,
                                                                    GCancellable              *cancellable,
                                                                    GAsyncReadyCallback        callback,
diff --git a/lib/widgets/Makefile.am b/lib/widgets/Makefile.am
index 325561a..b5a2109 100644
--- a/lib/widgets/Makefile.am
+++ b/lib/widgets/Makefile.am
@@ -5,7 +5,6 @@ BUILT_SOURCES = \
        ephy-widgets-type-builtins.h
 
 TYPES_H_FILES = \
-       ephy-removable-pixbuf-renderer.h \
        ephy-location-entry.h
 
 CLEANFILES = $(stamp_files) $(BUILT_SOURCES)
@@ -78,26 +77,12 @@ libephywidgets_la_SOURCES = \
        ephy-node-view.h                        \
        ephy-overview-store.c                   \
        ephy-overview-store.h                   \
-       ephy-removable-pixbuf-renderer.c        \
-       ephy-removable-pixbuf-renderer.h        \
        ephy-tree-model-node.c                  \
        ephy-tree-model-node.h                  \
        ephy-tree-model-sort.c                  \
        ephy-tree-model-sort.h                  \
        ephy-zoom-action.h                      \
        ephy-zoom-action.c                      \
-       gd-main-icon-view.c                     \
-       gd-main-icon-view.h                     \
-       gd-main-list-view.c                     \
-       gd-main-list-view.h                     \
-       gd-main-view-generic.c                  \
-       gd-main-view-generic.h                  \
-       gd-main-view.c                          \
-       gd-main-view.h                          \
-       gd-toggle-pixbuf-renderer.c             \
-       gd-toggle-pixbuf-renderer.h             \
-       gd-two-lines-renderer.c                 \
-       gd-two-lines-renderer.h                 \
        nautilus-floating-bar.c                 \
        nautilus-floating-bar.h                 \
        totem-glow-button.c                     \
diff --git a/lib/widgets/ephy-overview-store.c b/lib/widgets/ephy-overview-store.c
index dd81915..d570a47 100644
--- a/lib/widgets/ephy-overview-store.c
+++ b/lib/widgets/ephy-overview-store.c
@@ -21,7 +21,6 @@
 #include "config.h"
 #include "ephy-history-service.h"
 #include "ephy-overview-store.h"
-#include "ephy-removable-pixbuf-renderer.h"
 #include "ephy-snapshot-service.h"
 #include "ephy-widgets-type-builtins.h"
 
@@ -165,7 +164,6 @@ ephy_overview_store_init (EphyOverviewStore *self)
   types[EPHY_OVERVIEW_STORE_SELECTED] = G_TYPE_BOOLEAN;
   types[EPHY_OVERVIEW_STORE_SNAPSHOT_CANCELLABLE] = G_TYPE_CANCELLABLE;
   types[EPHY_OVERVIEW_STORE_SNAPSHOT_MTIME] = G_TYPE_INT;
-  types[EPHY_OVERVIEW_STORE_CLOSE_BUTTON_RENDER_POLICY] = EPHY_TYPE_REMOVABLE_PIXBUF_RENDER_POLICY;
 
   gtk_list_store_set_column_types (GTK_LIST_STORE (self),
                                    EPHY_OVERVIEW_STORE_NCOLS, types);
@@ -616,10 +614,6 @@ ephy_overview_store_animated_remove (EphyOverviewStore *store,
   gtk_tree_model_get_iter (GTK_TREE_MODEL (store), &iter, path);
   gtk_tree_path_free (path);
 
-  gtk_list_store_set (GTK_LIST_STORE (store), &iter,
-                      EPHY_OVERVIEW_STORE_CLOSE_BUTTON_RENDER_POLICY,
-                      EPHY_REMOVABLE_PIXBUF_RENDER_NEVER, -1);
-
   id = g_timeout_add (40, (GSourceFunc) animated_remove_func, ctx);
   g_source_set_name_by_id (id, "[epiphany] animated_remove_func");
 }
diff --git a/lib/widgets/ephy-overview-store.h b/lib/widgets/ephy-overview-store.h
index b065fe5..231228b 100644
--- a/lib/widgets/ephy-overview-store.h
+++ b/lib/widgets/ephy-overview-store.h
@@ -23,7 +23,6 @@
 
 #include <gtk/gtk.h>
 #include <webkit2/webkit2.h>
-#include "gd-main-view.h"
 
 G_BEGIN_DECLS
 
@@ -51,16 +50,15 @@ struct _EphyOverviewStoreClass
 };
 
 enum {
-  EPHY_OVERVIEW_STORE_ID = GD_MAIN_COLUMN_ID,
-  EPHY_OVERVIEW_STORE_URI = GD_MAIN_COLUMN_URI,
-  EPHY_OVERVIEW_STORE_TITLE = GD_MAIN_COLUMN_TITLE,
-  EPHY_OVERVIEW_STORE_AUTHOR = GD_MAIN_COLUMN_AUTHOR,
-  EPHY_OVERVIEW_STORE_SNAPSHOT = GD_MAIN_COLUMN_ICON,
-  EPHY_OVERVIEW_STORE_LAST_VISIT = GD_MAIN_COLUMN_MTIME,
-  EPHY_OVERVIEW_STORE_SELECTED = GD_MAIN_COLUMN_SELECTED,
+  EPHY_OVERVIEW_STORE_ID,
+  EPHY_OVERVIEW_STORE_URI,
+  EPHY_OVERVIEW_STORE_TITLE,
+  EPHY_OVERVIEW_STORE_AUTHOR,
+  EPHY_OVERVIEW_STORE_SNAPSHOT,
+  EPHY_OVERVIEW_STORE_LAST_VISIT,
+  EPHY_OVERVIEW_STORE_SELECTED,
   EPHY_OVERVIEW_STORE_SNAPSHOT_CANCELLABLE,
   EPHY_OVERVIEW_STORE_SNAPSHOT_MTIME,
-  EPHY_OVERVIEW_STORE_CLOSE_BUTTON_RENDER_POLICY,
   EPHY_OVERVIEW_STORE_NCOLS
 };
 
diff --git a/src/ephy-navigation-history-action.c b/src/ephy-navigation-history-action.c
index 2d07155..246fa3a 100644
--- a/src/ephy-navigation-history-action.c
+++ b/src/ephy-navigation-history-action.c
@@ -34,7 +34,6 @@
 #include "ephy-gui.h"
 #include "ephy-history-service.h"
 #include "ephy-link.h"
-#include "ephy-overview.h"
 #include "ephy-shell.h"
 #include "ephy-type-builtins.h"
 #include "ephy-window.h"
@@ -415,11 +414,6 @@ build_dropdown_menu (EphyNavigationHistoryAction *action)
     uri = webkit_back_forward_list_item_get_uri (hitem);
     title = g_strdup (webkit_back_forward_list_item_get_title (hitem));
 
-    /* The overview is not actually a webpage, so we need to hardcode
-     * this here. */
-    if (g_strcmp0 (uri, "ephy-about:overview") == 0)
-      title = g_strdup (EPHY_OVERVIEW_TITLE);
-
     if (title == NULL || g_strstrip (title)[0] == '\0')
       item = new_history_menu_item (EPHY_WEB_VIEW (web_view), uri, uri);
     else
diff --git a/src/ephy-shell.c b/src/ephy-shell.c
index ccb2640..e8aec4f 100644
--- a/src/ephy-shell.c
+++ b/src/ephy-shell.c
@@ -723,7 +723,7 @@ ephy_shell_new_tab_full (EphyShell *shell,
     embed = ephy_embed_container_get_active_child (EPHY_EMBED_CONTAINER (window));
     if (embed != NULL) {
       EphyWebView *view = ephy_embed_get_web_view (embed);
-      if ((ephy_web_view_get_is_blank (view) || ephy_embed_get_overview_mode (embed)) &&
+      if ((ephy_web_view_get_is_blank (view) || ephy_web_view_is_overview (view)) &&
           ephy_web_view_is_loading (view) == FALSE) {
         active_is_blank = TRUE;
       }
diff --git a/src/ephy-window.c b/src/ephy-window.c
index 23c81f6..52d8ed4 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -1273,6 +1273,45 @@ calculate_location (const char *typed_address, const char *address)
 }
 
 static void
+_ephy_window_set_default_actions_sensitive (EphyWindow *window,
+                                           guint flags,
+                                           gboolean set)
+{
+       EphyWindowPrivate *priv = window->priv;
+       GtkActionGroup *action_group;
+       GtkAction *action;
+       int i;
+       const char *action_group_actions[] = { "FileSaveAs", "FileSaveAsApplication", "FilePrint",
+                                              "FileSendTo", "FileBookmarkPage", "EditFind",
+                                              "EditFindPrev", "EditFindNext", "ViewEncoding",
+                                              "ViewZoomIn", "ViewZoomOut", "ViewPageSource",
+                                              NULL };
+
+       action_group = priv->action_group;
+
+       /* Page menu */
+       for (i = 0; action_group_actions[i] != NULL; i++)
+       {
+               action = gtk_action_group_get_action (action_group,
+                                                     action_group_actions[i]);
+               ephy_action_change_sensitivity_flags (action,
+                                                     flags, set);
+       }
+
+       /* Page context popup */
+       action = gtk_action_group_get_action (priv->popups_action_group,
+                                             "ContextBookmarkPage");
+       ephy_action_change_sensitivity_flags (action,
+                                             flags, set);
+
+       /* Toolbar */
+       action = gtk_action_group_get_action (priv->toolbar_action_group,
+                                             "ViewCombinedStopReload");
+       ephy_action_change_sensitivity_flags (action,
+                                             flags, set);
+}
+
+static void
 sync_tab_address (EphyWebView *view,
                  GParamSpec *pspec,
                  EphyWindow *window)
@@ -1287,6 +1326,10 @@ sync_tab_address (EphyWebView *view,
        address = ephy_web_view_get_address (view);
        typed_address = ephy_web_view_get_typed_address (view);
 
+       _ephy_window_set_default_actions_sensitive (window,
+                                                   SENS_FLAG_IS_BLANK,
+                                                   ephy_web_view_is_overview (view));
+
        location = calculate_location (typed_address, address);
        ephy_window_set_location (window, location);
        g_free (location);
@@ -1414,45 +1457,6 @@ sync_tab_navigation (EphyWebView *view,
 }
 
 static void
-_ephy_window_set_default_actions_sensitive (EphyWindow *window,
-                                           guint flags,
-                                           gboolean set)
-{
-       EphyWindowPrivate *priv = window->priv;
-       GtkActionGroup *action_group;
-       GtkAction *action;
-       int i;
-       const char *action_group_actions[] = { "FileSaveAs", "FileSaveAsApplication", "FilePrint",
-                                              "FileSendTo", "FileBookmarkPage", "EditFind",
-                                              "EditFindPrev", "EditFindNext", "ViewEncoding",
-                                              "ViewZoomIn", "ViewZoomOut", "ViewPageSource",
-                                              NULL };
-
-       action_group = priv->action_group;
-
-       /* Page menu */
-       for (i = 0; action_group_actions[i] != NULL; i++)
-       {
-               action = gtk_action_group_get_action (action_group,
-                                                     action_group_actions[i]);
-               ephy_action_change_sensitivity_flags (action,
-                                                     flags, set);
-       }
-
-       /* Page context popup */
-       action = gtk_action_group_get_action (priv->popups_action_group,
-                                             "ContextBookmarkPage");
-       ephy_action_change_sensitivity_flags (action,
-                                             flags, set);
-
-       /* Toolbar */
-       action = gtk_action_group_get_action (priv->toolbar_action_group,
-                                             "ViewCombinedStopReload");
-       ephy_action_change_sensitivity_flags (action,
-                                             flags, set);
-}
-
-static void
 sync_tab_is_blank (EphyWebView *view,
                   GParamSpec *pspec,
                   EphyWindow *window)
@@ -1924,24 +1928,6 @@ ephy_window_mouse_target_changed_cb (WebKitWebView *web_view,
 }
 
 static void
-sync_embed_is_overview (EphyEmbed *embed, GParamSpec *pspec, EphyWindow *window)
-{
-       if (window->priv->closing) return;
-
-       _ephy_window_set_default_actions_sensitive (window,
-                                                   SENS_FLAG_IS_BLANK,
-                                                   ephy_embed_get_overview_mode (embed));;
-}
-
-static void
-overview_open_link_cb (EphyOverview *overview,
-                      const char *url,
-                      EphyWindow *window)
-{
-       ephy_link_open (EPHY_LINK (window), url, NULL, ephy_link_flags_from_current_event ());
-}
-
-static void
 ephy_window_set_is_popup (EphyWindow *window,
                          gboolean is_popup)
 {
@@ -2248,8 +2234,6 @@ ephy_window_connect_active_embed (EphyWindow *window)
        EphyEmbed *embed;
        WebKitWebView *web_view;
        EphyWebView *view;
-       EphyOverview *overview;
-       EphyEmbedShellMode shell_mode;
 
        g_return_if_fail (window->priv->active_embed != NULL);
 
@@ -2267,7 +2251,6 @@ ephy_window_connect_active_embed (EphyWindow *window)
        sync_tab_icon           (view, NULL, window);
        sync_tab_popup_windows  (view, NULL, window);
        sync_tab_popups_allowed (view, NULL, window);
-       sync_embed_is_overview  (embed, NULL, window);
 
        sync_tab_zoom           (web_view, NULL, window);
 
@@ -2320,17 +2303,6 @@ ephy_window_connect_active_embed (EphyWindow *window)
        g_signal_connect_object (view, "mouse-target-changed",
                                 G_CALLBACK (ephy_window_mouse_target_changed_cb),
                                 window, 0);
-       g_signal_connect_object (embed, "notify::overview-mode",
-                                G_CALLBACK (sync_embed_is_overview),
-                                window, 0);
-
-       shell_mode = ephy_embed_shell_get_mode (EPHY_EMBED_SHELL (ephy_embed_shell_get_default ()));
-       if (shell_mode != EPHY_EMBED_SHELL_MODE_INCOGNITO) {
-               overview = ephy_embed_get_overview (embed);
-               g_signal_connect_object (overview, "open-link",
-                                        G_CALLBACK (overview_open_link_cb),
-                                        window, 0);
-       }
 
        g_object_notify (G_OBJECT (window), "active-child");
 }
@@ -2341,8 +2313,6 @@ ephy_window_disconnect_active_embed (EphyWindow *window)
        EphyEmbed *embed;
        WebKitWebView *web_view;
        EphyWebView *view;
-       EphyOverview *overview;
-       EphyEmbedShellMode shell_mode;
 
        g_return_if_fail (window->priv->active_embed != NULL);
 
@@ -2390,18 +2360,6 @@ ephy_window_disconnect_active_embed (EphyWindow *window)
                                              G_CALLBACK (sync_tab_icon),
                                              window);
 
-       g_signal_handlers_disconnect_by_func (embed,
-                                             G_CALLBACK (sync_embed_is_overview),
-                                             window);
-
-       shell_mode = ephy_embed_shell_get_mode (EPHY_EMBED_SHELL (ephy_embed_shell_get_default ()));
-       if (shell_mode != EPHY_EMBED_SHELL_MODE_INCOGNITO) {
-               overview = ephy_embed_get_overview (embed);
-               g_signal_handlers_disconnect_by_func (overview,
-                                                     G_CALLBACK (overview_open_link_cb),
-                                                     window);
-       }
-
        g_signal_handlers_disconnect_by_func
                (view, G_CALLBACK (ephy_window_dom_mouse_click_cb), window);
        g_signal_handlers_disconnect_by_func (view,


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