aboutsummaryrefslogtreecommitdiffstats
path: root/embed
diff options
context:
space:
mode:
authorXan Lopez <xan@src.gnome.org>2008-02-10 03:21:57 +0800
committerXan Lopez <xan@src.gnome.org>2008-02-10 03:21:57 +0800
commit5b70a8c93a239a38de86f4426200fbec36fabca3 (patch)
tree4f6359b6920d73605c5f260f3645948125b1619a /embed
parent8915093c3be8fa0b584000e270822f0013e513d2 (diff)
downloadgsoc2013-epiphany-5b70a8c93a239a38de86f4426200fbec36fabca3.tar
gsoc2013-epiphany-5b70a8c93a239a38de86f4426200fbec36fabca3.tar.gz
gsoc2013-epiphany-5b70a8c93a239a38de86f4426200fbec36fabca3.tar.bz2
gsoc2013-epiphany-5b70a8c93a239a38de86f4426200fbec36fabca3.tar.lz
gsoc2013-epiphany-5b70a8c93a239a38de86f4426200fbec36fabca3.tar.xz
gsoc2013-epiphany-5b70a8c93a239a38de86f4426200fbec36fabca3.tar.zst
gsoc2013-epiphany-5b70a8c93a239a38de86f4426200fbec36fabca3.zip
Cleanups in webkit-embed.c
svn path=/trunk/; revision=7925
Diffstat (limited to 'embed')
-rw-r--r--embed/webkit/webkit-embed.c39
1 files changed, 15 insertions, 24 deletions
diff --git a/embed/webkit/webkit-embed.c b/embed/webkit/webkit-embed.c
index 90be42440..429f6bfa1 100644
--- a/embed/webkit/webkit-embed.c
+++ b/embed/webkit/webkit-embed.c
@@ -38,10 +38,8 @@
#include "ephy-history-item.h"
static void webkit_embed_class_init (WebKitEmbedClass *klass);
-static void webkit_embed_init (WebKitEmbed *gs);
-static void webkit_embed_destroy (GtkObject *object);
-static void webkit_embed_finalize (GObject *object);
-static void ephy_embed_iface_init (EphyEmbedIface *iface);
+static void webkit_embed_init (WebKitEmbed *gs);
+static void ephy_embed_iface_init (EphyEmbedIface *iface);
#define WEBKIT_EMBED_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), WEBKIT_TYPE_EMBED, WebKitEmbedPrivate))
@@ -85,9 +83,11 @@ webkit_construct_history_list (WebKitEmbed *embed, WebKitHistoryType hist_type)
else
webkit_items = webkit_web_back_forward_list_get_back_list_with_limit (web_back_forward_list,
WEBKIT_BACK_FORWARD_LIMIT);
+
for (iter = webkit_items; iter != NULL; iter = iter->next) {
EphyHistoryItem *item = webkit_history_item_new (WEBKIT_WEB_HISTORY_ITEM (iter->data));
- ephy_items = g_list_prepend (ephy_items, item);
+ if (item)
+ ephy_items = g_list_prepend (ephy_items, item);
}
g_list_free (webkit_items);
@@ -258,15 +258,22 @@ webkit_embed_hovering_over_link_cb (WebKitWebView *web_view,
}
static void
+webkit_embed_finalize (GObject *object)
+{
+ WebKitEmbed *wembed = WEBKIT_EMBED (object);
+
+ g_free (wembed->priv->loading_uri);
+
+ G_OBJECT_CLASS (webkit_embed_parent_class)->finalize (object);
+}
+
+static void
webkit_embed_class_init (WebKitEmbedClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- GtkObjectClass *gtk_object_class = GTK_OBJECT_CLASS (klass);
object_class->finalize = webkit_embed_finalize;
- gtk_object_class->destroy = webkit_embed_destroy;
-
g_type_class_add_private (object_class, sizeof(WebKitEmbedPrivate));
}
@@ -306,22 +313,6 @@ webkit_embed_init (WebKitEmbed *embed)
}
static void
-webkit_embed_destroy (GtkObject *object)
-{
- GTK_OBJECT_CLASS (webkit_embed_parent_class)->destroy (object);
-}
-
-static void
-webkit_embed_finalize (GObject *object)
-{
- WebKitEmbed *wembed = WEBKIT_EMBED (object);
-
- g_free (wembed->priv->loading_uri);
-
- G_OBJECT_CLASS (webkit_embed_parent_class)->finalize (object);
-}
-
-static void
impl_load_url (EphyEmbed *embed,
const char *url)
{