diff options
author | Xan Lopez <xan@src.gnome.org> | 2008-06-30 15:24:01 +0800 |
---|---|---|
committer | Xan Lopez <xan@src.gnome.org> | 2008-06-30 15:24:01 +0800 |
commit | 930d8c836af03046b56e016182ab0bb7f28b9e72 (patch) | |
tree | 11ee09b02d94c68803b6e7fb1b279eac62ff1d78 | |
parent | d0ccaa5cfa129113f6359b1be98ef9cb0db3e8e4 (diff) | |
download | gsoc2013-epiphany-930d8c836af03046b56e016182ab0bb7f28b9e72.tar gsoc2013-epiphany-930d8c836af03046b56e016182ab0bb7f28b9e72.tar.gz gsoc2013-epiphany-930d8c836af03046b56e016182ab0bb7f28b9e72.tar.bz2 gsoc2013-epiphany-930d8c836af03046b56e016182ab0bb7f28b9e72.tar.lz gsoc2013-epiphany-930d8c836af03046b56e016182ab0bb7f28b9e72.tar.xz gsoc2013-epiphany-930d8c836af03046b56e016182ab0bb7f28b9e72.tar.zst gsoc2013-epiphany-930d8c836af03046b56e016182ab0bb7f28b9e72.zip |
embed: remove history item abstraction from embed.
Not needed anymore.
svn path=/trunk/; revision=8314
-rw-r--r-- | embed/Makefile.am | 2 | ||||
-rw-r--r-- | embed/ephy-embed.h | 1 | ||||
-rw-r--r-- | embed/ephy-history-item.c | 58 | ||||
-rw-r--r-- | embed/ephy-history-item.h | 57 | ||||
-rw-r--r-- | embed/webkit/Makefile.am | 4 | ||||
-rw-r--r-- | embed/webkit/webkit-embed.c | 2 | ||||
-rw-r--r-- | embed/webkit/webkit-history-item.c | 97 | ||||
-rw-r--r-- | embed/webkit/webkit-history-item.h | 58 | ||||
-rw-r--r-- | src/ephy-navigation-action.c | 1 |
9 files changed, 1 insertions, 279 deletions
diff --git a/embed/Makefile.am b/embed/Makefile.am index 42fc33ceb..114d0881e 100644 --- a/embed/Makefile.am +++ b/embed/Makefile.am @@ -32,7 +32,6 @@ INST_H_FILES = \ ephy-embed-shell.h \ ephy-embed-utils.h \ ephy-history.h \ - ephy-history-item.h \ ephy-password-manager.h \ ephy-permission-manager.h @@ -59,7 +58,6 @@ libephyembed_la_SOURCES = \ ephy-encodings.c \ ephy-favicon-cache.c \ ephy-history.c \ - ephy-history-item.c \ ephy-password-manager.c \ ephy-permission-manager.c \ $(INST_H_FILES) \ diff --git a/embed/ephy-embed.h b/embed/ephy-embed.h index 1c8b14fc9..6df34e8d1 100644 --- a/embed/ephy-embed.h +++ b/embed/ephy-embed.h @@ -26,7 +26,6 @@ #define EPHY_EMBED_H #include "ephy-embed-event.h" -#include "ephy-history-item.h" #include <glib-object.h> #include <glib.h> diff --git a/embed/ephy-history-item.c b/embed/ephy-history-item.c deleted file mode 100644 index f5089b294..000000000 --- a/embed/ephy-history-item.c +++ /dev/null @@ -1,58 +0,0 @@ -/* -*- Mode: C; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*- */ -/* - * Copyright © 2007 Xan Lopez - * - * 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 "ephy-history-item.h" - -GType -ephy_history_item_get_type (void) -{ - static GType type = 0; - - if (G_UNLIKELY (type == 0)) { - const GTypeInfo our_info = - { - sizeof (EphyHistoryItemIface), - NULL, - NULL, - }; - - type = g_type_register_static (G_TYPE_INTERFACE, - "EphyHistoryItem", - &our_info, (GTypeFlags)0); - } - - return type; -} - -char* -ephy_history_item_get_url (EphyHistoryItem *item) -{ - EphyHistoryItemIface *iface = EPHY_HISTORY_ITEM_GET_IFACE (item); - return iface->get_url (item); -} - -char* -ephy_history_item_get_title (EphyHistoryItem *item) -{ - EphyHistoryItemIface *iface = EPHY_HISTORY_ITEM_GET_IFACE (item); - return iface->get_title (item); -} diff --git a/embed/ephy-history-item.h b/embed/ephy-history-item.h deleted file mode 100644 index ec53a4b99..000000000 --- a/embed/ephy-history-item.h +++ /dev/null @@ -1,57 +0,0 @@ -/* -*- Mode: C; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*- */ -/* - * Copyright © 2007 Xan Lopez - * - * 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 __EPHY_HISTORY_ITEM_H__ -#define __EPHY_HISTORY_ITEM_H__ - -#include <glib.h> -#include <glib-object.h> - -G_BEGIN_DECLS - -#define EPHY_TYPE_HISTORY_ITEM (ephy_history_item_get_type ()) -#define EPHY_HISTORY_ITEM(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), EPHY_TYPE_HISTORY_ITEM, EphyHistoryItem)) -#define EPHY_HISTORY_ITEM_IFACE(k) (G_TYPE_CHECK_CLASS_CAST((k), EPHY_TYPE_HISTORY_ITEM, EphyHistoryItemIface)) -#define EPHY_IS_HISTORY_ITEM(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), EPHY_TYPE_HISTORY_ITEM)) -#define EPHY_IS_HISTORY_ITEM_IFACE(k) (G_TYPE_CHECK_CLASS_TYPE ((k), EPHY_TYPE_HISTORY_ITEM)) -#define EPHY_HISTORY_ITEM_GET_IFACE(inst) (G_TYPE_INSTANCE_GET_INTERFACE ((inst), EPHY_TYPE_HISTORY_ITEM, EphyHistoryItemIface)) - -typedef struct _EphyHistoryItem EphyHistoryItem; -typedef struct _EphyHistoryItemIface EphyHistoryItemIface; - -struct _EphyHistoryItemIface -{ - GTypeInterface base_iface; - - char * (* get_url) (EphyHistoryItem *item); - char * (* get_title) (EphyHistoryItem *item); -}; - -GType ephy_history_item_get_type (void); -char* ephy_history_item_get_url (EphyHistoryItem *item); -char* ephy_history_item_get_title (EphyHistoryItem *item); - -G_END_DECLS - -#if !defined (__EPHY_EPIPHANY_H_INSIDE__) && !defined (EPIPHANY_COMPILATION) -#error "Only <epiphany/epiphany.h> can be included directly." -#endif - -#endif /* __EPHY_HISTORY_ITEM_H__ */ 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 <glib.h> -#include <glib-object.h> -#include <webkit/webkit.h> - -#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__ */ diff --git a/src/ephy-navigation-action.c b/src/ephy-navigation-action.c index b1f72aa6d..94ac449a2 100644 --- a/src/ephy-navigation-action.c +++ b/src/ephy-navigation-action.c @@ -31,7 +31,6 @@ #include "ephy-embed-container.h" #include "ephy-embed-shell.h" #include "ephy-embed-utils.h" -#include "ephy-history-item.h" #include "ephy-link.h" #include "ephy-gui.h" #include "ephy-debug.h" |