[epiphany] ephy-embed-single: remove ::handle-content signal



commit 05b55f9385cd803b7d7a41876722c7a899eee6f0
Author: Xan Lopez <xan igalia com>
Date:   Wed Feb 13 15:09:05 2013 +0100

    ephy-embed-single: remove ::handle-content signal
    
    It was meant for extensions, which we don't have anymore.

 embed/ephy-embed-single.c |   24 ------------------------
 embed/ephy-embed-single.h |    4 ----
 embed/ephy-web-view.c     |   21 ++-------------------
 3 files changed, 2 insertions(+), 47 deletions(-)
---
diff --git a/embed/ephy-embed-single.c b/embed/ephy-embed-single.c
index 5f79434..04ed1c2 100644
--- a/embed/ephy-embed-single.c
+++ b/embed/ephy-embed-single.c
@@ -251,30 +251,6 @@ ephy_embed_single_class_init (EphyEmbedSingleClass *klass)
                 GTK_TYPE_WIDGET,
                 EPHY_TYPE_WEB_VIEW_CHROME);
 
-  /**
-   * EphyEmbedSingle::handle_content:
-   * @single:
-   * @mime_type: the MIME type of the content
-   * @address: the URL to the content
-   *
-   * The ::handle_content signal is emitted when encountering content of a mime
-   * type Epiphany is unable to handle itself.
-   *
-   * If a connected callback returns %TRUE, the signal will stop propagating. For
-   * example, this could be used by a download manager to prevent other
-   * ::handle_content listeners from being called.
-   **/
-  g_signal_new ("handle_content",
-                EPHY_TYPE_EMBED_SINGLE,
-                G_SIGNAL_RUN_LAST,
-                G_STRUCT_OFFSET (EphyEmbedSingleClass, handle_content),
-                g_signal_accumulator_true_handled, NULL,
-                g_cclosure_marshal_generic,
-                G_TYPE_BOOLEAN,
-                2,
-                G_TYPE_STRING,
-                G_TYPE_STRING);
-
   g_type_class_add_private (object_class, sizeof (EphyEmbedSinglePrivate));
 }
 
diff --git a/embed/ephy-embed-single.h b/embed/ephy-embed-single.h
index ab789f2..c8ba770 100644
--- a/embed/ephy-embed-single.h
+++ b/embed/ephy-embed-single.h
@@ -63,10 +63,6 @@ struct _EphyEmbedSingleClass
   EphyEmbed * (* new_window)  (EphyEmbedSingle *single,
                                EphyEmbed *parent_embed,
                                EphyWebViewChrome chromemask);
-
-  gboolean (* handle_content) (EphyEmbedSingle *shell,
-                               char *mime_type,
-                               char *uri);
 };
 
 GType           ephy_embed_single_get_type           (void);
diff --git a/embed/ephy-web-view.c b/embed/ephy-web-view.c
index a7a204f..a765aec 100644
--- a/embed/ephy-web-view.c
+++ b/embed/ephy-web-view.c
@@ -1797,13 +1797,7 @@ decide_policy_cb (WebKitWebView *web_view,
   if (g_strcmp0 (webkit_web_resource_get_uri (main_resource), request_uri) != 0)
     return FALSE;
 
-  single = ephy_embed_shell_get_embed_single (ephy_embed_shell_get_default ());
-  g_signal_emit_by_name (single, "handle-content", mime_type, request_uri, &handled);
-
-  if (handled)
-    webkit_policy_decision_ignore (decision);
-  else
-    webkit_policy_decision_download (decision);
+  webkit_policy_decision_download (decision);
 
   return TRUE;
 }
@@ -1869,18 +1863,7 @@ mime_type_policy_decision_requested_cb (WebKitWebView *web_view,
 
   /* FIXME: need to use ephy_file_check_mime if auto-downloading */
   if (should_download) {
-    GObject *single;
-    const char *uri;
-    gboolean handled = FALSE;
-
-    single = ephy_embed_shell_get_embed_single (ephy_embed_shell_get_default ());
-    uri = webkit_network_request_get_uri (request);
-    g_signal_emit_by_name (single, "handle-content", mime_type, uri, &handled);
-
-    if (handled)
-      webkit_web_policy_decision_ignore (decision);
-    else
-      webkit_web_policy_decision_download (decision);
+    webkit_web_policy_decision_download (decision);
 
     return TRUE;
   }


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