From 930d8c836af03046b56e016182ab0bb7f28b9e72 Mon Sep 17 00:00:00 2001 From: Xan Lopez Date: Mon, 30 Jun 2008 07:24:01 +0000 Subject: embed: remove history item abstraction from embed. Not needed anymore. svn path=/trunk/; revision=8314 --- embed/webkit/Makefile.am | 4 +- embed/webkit/webkit-embed.c | 2 - embed/webkit/webkit-history-item.c | 97 -------------------------------------- embed/webkit/webkit-history-item.h | 58 ----------------------- 4 files changed, 1 insertion(+), 160 deletions(-) delete mode 100644 embed/webkit/webkit-history-item.c delete mode 100644 embed/webkit/webkit-history-item.h (limited to 'embed/webkit') diff --git a/embed/webkit/Makefile.am b/embed/webkit/Makefile.am index 74d157bc2..a91155e2c 100644 --- a/embed/webkit/Makefile.am +++ b/embed/webkit/Makefile.am @@ -8,9 +8,7 @@ libephywebkitembed_la_SOURCES = \ webkit-embed-prefs.c \ webkit-embed-prefs.h \ webkit-embed-single.c \ - webkit-embed-single.h \ - webkit-history-item.c \ - webkit-history-item.h + webkit-embed-single.h libephywebkitembed_la_CPPFLAGS = \ -I$(top_srcdir)/lib \ diff --git a/embed/webkit/webkit-embed.c b/embed/webkit/webkit-embed.c index f2e35b6fa..c59d0b493 100644 --- a/embed/webkit/webkit-embed.c +++ b/embed/webkit/webkit-embed.c @@ -34,10 +34,8 @@ #include "webkit-embed.h" #include "webkit-embed-prefs.h" -#include "webkit-history-item.h" #include "ephy-embed.h" #include "ephy-base-embed.h" -#include "ephy-history-item.h" static void webkit_embed_class_init (WebKitEmbedClass *klass); static void webkit_embed_init (WebKitEmbed *gs); diff --git a/embed/webkit/webkit-history-item.c b/embed/webkit/webkit-history-item.c deleted file mode 100644 index 5f47407e7..000000000 --- a/embed/webkit/webkit-history-item.c +++ /dev/null @@ -1,97 +0,0 @@ -/* -*- Mode: C; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*- */ -/* - * Copyright © Jan Alonzo - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - */ - -#include "config.h" - -#include "webkit-history-item.h" - -static void webkit_history_item_finalize (GObject *object); - -EphyHistoryItem* -webkit_history_item_new (WebKitWebHistoryItem *history_item) -{ - WebKitHistoryItem *item; - - if (!history_item) return NULL; - - item = g_object_new (WEBKIT_TYPE_HISTORY_ITEM, NULL); - item->data = g_object_ref (history_item); - - return EPHY_HISTORY_ITEM (item); -} - -static char* -impl_get_url (EphyHistoryItem *item) -{ - const gchar *uri; - - if (!item) return NULL; - - uri = webkit_web_history_item_get_uri (WEBKIT_HISTORY_ITEM (item)->data); - - return g_strdup (uri); -} - -static char* -impl_get_title (EphyHistoryItem *item) -{ - const gchar *title; - - if (!item) return NULL; - - title = webkit_web_history_item_get_title (WEBKIT_HISTORY_ITEM (item)->data); - - return g_strdup (title); -} - -static void -webkit_history_item_iface_init (EphyHistoryItemIface *iface) -{ - iface->get_url = impl_get_url; - iface->get_title = impl_get_title; -} - -G_DEFINE_TYPE_WITH_CODE (WebKitHistoryItem, webkit_history_item, G_TYPE_OBJECT, - G_IMPLEMENT_INTERFACE (EPHY_TYPE_HISTORY_ITEM, - webkit_history_item_iface_init)) - - -static void -webkit_history_item_finalize (GObject *object) -{ - WebKitHistoryItem *item = WEBKIT_HISTORY_ITEM (object); - - g_object_unref (item->data); - - G_OBJECT_CLASS (webkit_history_item_parent_class)->finalize (object); -} - -static void -webkit_history_item_class_init (WebKitHistoryItemClass *klass) -{ - GObjectClass *gobject_class = (GObjectClass*)klass; - - gobject_class->finalize = webkit_history_item_finalize; -} - -static void -webkit_history_item_init (WebKitHistoryItem *self) -{ -} diff --git a/embed/webkit/webkit-history-item.h b/embed/webkit/webkit-history-item.h deleted file mode 100644 index f154ddf6b..000000000 --- a/embed/webkit/webkit-history-item.h +++ /dev/null @@ -1,58 +0,0 @@ -/* -*- Mode: C; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*- */ -/* - * Copyright © 2008 Jan Alonzo - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - */ - -#ifndef __WEBKIT_HISTORY_ITEM_H__ -#define __WEBKIT_HISTORY_ITEM_H__ - -#include -#include -#include - -#include "ephy-history-item.h" - -G_BEGIN_DECLS - -#define WEBKIT_TYPE_HISTORY_ITEM (webkit_history_item_get_type ()) -#define WEBKIT_HISTORY_ITEM(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), WEBKIT_TYPE_HISTORY_ITEM, WebKitHistoryItem)) -#define WEBKIT_HISTORY_ITEM_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), WEBKIT_TYPE_HISTORY_ITEM, WebKitHistoryItemClass)) -#define WEBKIT_IS_HISTORY_ITEM(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), WEBKIT_TYPE_HISTORY_ITEM)) -#define WEBKIT_IS_HISTORY_ITEM_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), WEBKIT_TYPE_HISTORY_ITEM)) -#define WEBKIT_HISTORY_ITEM_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_INTERFACE ((inst), WEBKIT_TYPE_HISTORY_ITEM, WebKitHistoryItemClass)) - -typedef struct _WebKitHistoryItem WebKitHistoryItem; -typedef struct _WebKitHistoryItemClass WebKitHistoryItemClass; - -struct _WebKitHistoryItemClass -{ - GObjectClass parent_class; -}; - -struct _WebKitHistoryItem -{ - GObject parent_instance; - WebKitWebHistoryItem *data; -}; - -GType webkit_history_item_get_type (void) G_GNUC_CONST; -EphyHistoryItem *webkit_history_item_new (WebKitWebHistoryItem *item) G_GNUC_MALLOC; - -G_END_DECLS - -#endif /* __WEBKIT_HISTORY_ITEM_H__ */ -- cgit v1.2.3