diff options
author | Xan Lopez <xan@gnome.org> | 2009-06-06 04:57:38 +0800 |
---|---|---|
committer | Xan Lopez <xan@gnome.org> | 2009-06-06 04:57:38 +0800 |
commit | 914b6f95e19447d1b25209b9bb3cda2942513775 (patch) | |
tree | a3e1387756ce201380ce642036d78205839a0203 | |
parent | c3c1771fb6776ee3371ef06e5509d7e347880464 (diff) | |
download | gsoc2013-epiphany-914b6f95e19447d1b25209b9bb3cda2942513775.tar.gz gsoc2013-epiphany-914b6f95e19447d1b25209b9bb3cda2942513775.tar.zst gsoc2013-epiphany-914b6f95e19447d1b25209b9bb3cda2942513775.zip |
Make EphyEmbedPersist a non-interface type.
-rw-r--r-- | embed/Makefile.am | 3 | ||||
-rw-r--r-- | embed/ephy-embed-factory.c | 3 | ||||
-rw-r--r-- | embed/ephy-embed-persist.c | 12 | ||||
-rw-r--r-- | embed/webkit/Makefile.am | 16 | ||||
-rw-r--r-- | embed/webkit/webkit-embed-persist.c | 79 | ||||
-rw-r--r-- | embed/webkit/webkit-embed-persist.h | 59 |
6 files changed, 7 insertions, 165 deletions
diff --git a/embed/Makefile.am b/embed/Makefile.am index 105efb748..941c3a817 100644 --- a/embed/Makefile.am +++ b/embed/Makefile.am @@ -1,5 +1,3 @@ -SUBDIRS = webkit - NULL = noinst_LTLIBRARIES = libephyembed.la libephyembedfactory.la @@ -81,7 +79,6 @@ libephyembedfactory_la_SOURCES = \ ephy-embed-factory.h libephyembedfactory_la_CPPFLAGS = \ - -I$(top_srcdir)/embed/webkit \ $(AM_CPPFLAGS) libephyembedfactory_la_CFLAGS = \ diff --git a/embed/ephy-embed-factory.c b/embed/ephy-embed-factory.c index 6eaa05c56..538ce279e 100644 --- a/embed/ephy-embed-factory.c +++ b/embed/ephy-embed-factory.c @@ -20,7 +20,6 @@ #include "config.h" #include "ephy-embed-factory.h" -#include "webkit-embed-persist.h" #include "ephy-embed.h" #include "ephy-embed-persist.h" #include "ephy-embed-single.h" @@ -44,7 +43,7 @@ ephy_embed_factory_new_object (GType type) } else if (type == EPHY_TYPE_EMBED_PERSIST) { - object = g_object_new (WEBKIT_TYPE_EMBED_PERSIST, NULL); + object = g_object_new (EPHY_TYPE_EMBED_PERSIST, NULL); } else if (type == EPHY_TYPE_EMBED_SINGLE) { diff --git a/embed/ephy-embed-persist.c b/embed/ephy-embed-persist.c index b1ae37bfe..e78314970 100644 --- a/embed/ephy-embed-persist.c +++ b/embed/ephy-embed-persist.c @@ -1,3 +1,4 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ /* * Copyright © 2000-2003 Marco Pesenti Gritti * Copyright © 2003 Christian Persch @@ -626,8 +627,7 @@ ephy_embed_persist_class_init (EphyEmbedPersistClass *klass) void ephy_embed_persist_cancel (EphyEmbedPersist *persist) { - EphyEmbedPersistClass *klass = EPHY_EMBED_PERSIST_GET_CLASS (persist); - klass->cancel (persist); + g_object_unref (persist); } /** @@ -647,8 +647,9 @@ ephy_embed_persist_cancel (EphyEmbedPersist *persist) gboolean ephy_embed_persist_save (EphyEmbedPersist *persist) { - EphyEmbedPersistClass *klass = EPHY_EMBED_PERSIST_GET_CLASS (persist); - return klass->save (persist); + g_object_ref (persist); + + return FALSE; } /** @@ -672,6 +673,5 @@ ephy_embed_persist_save (EphyEmbedPersist *persist) char * ephy_embed_persist_to_string (EphyEmbedPersist *persist) { - EphyEmbedPersistClass *klass = EPHY_EMBED_PERSIST_GET_CLASS (persist); - return klass->to_string (persist); + return NULL; } diff --git a/embed/webkit/Makefile.am b/embed/webkit/Makefile.am deleted file mode 100644 index e5b14ccff..000000000 --- a/embed/webkit/Makefile.am +++ /dev/null @@ -1,16 +0,0 @@ -noinst_LTLIBRARIES = libephywebkitembed.la - -libephywebkitembed_la_SOURCES = \ - webkit-embed-persist.c \ - webkit-embed-persist.h - -libephywebkitembed_la_CPPFLAGS = \ - -I$(top_srcdir)/lib \ - -I$(top_srcdir)/embed \ - -I$(top_srcdir) \ - -DSHARE_DIR=\"$(pkgdatadir)\" \ - -DBUILDING_GDK__=1 \ - -DBUILDING_CAIRO__=1 \ - $(DEPENDENCIES_CFLAGS) \ - $(AM_CPPFLAGS) - diff --git a/embed/webkit/webkit-embed-persist.c b/embed/webkit/webkit-embed-persist.c deleted file mode 100644 index 3298293af..000000000 --- a/embed/webkit/webkit-embed-persist.c +++ /dev/null @@ -1,79 +0,0 @@ -/* -*- Mode: C; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*- */ -/* - * Copyright © 2007 Xan Lopez <xan@gnome.org> - * - * 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-embed-persist.h" - -static void webkit_embed_persist_class_init (WebKitEmbedPersistClass *klass); -static void webkit_embed_persist_init (WebKitEmbedPersist *persist); - -#define WEBKIT_EMBED_PERSIST_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), WEBKIT_TYPE_EMBED_PERSIST, WebKitEmbedPersistPrivate)) - -G_DEFINE_TYPE (WebKitEmbedPersist, webkit_embed_persist, EPHY_TYPE_EMBED_PERSIST) - -static void -impl_cancel (EphyEmbedPersist *persist) -{ - g_object_unref (persist); -} - -static gboolean -impl_save (EphyEmbedPersist *persist) -{ - g_object_ref (persist); - - return FALSE; -} - -static char * -impl_to_string (EphyEmbedPersist *persist) -{ - return NULL; -} - -static void -webkit_embed_persist_class_init (WebKitEmbedPersistClass *klass) -{ - EphyEmbedPersistClass *persist_class = EPHY_EMBED_PERSIST_CLASS (klass); - - persist_class->save = impl_save; - persist_class->cancel = impl_cancel; - persist_class->to_string = impl_to_string; -} - -static void -webkit_embed_persist_init (WebKitEmbedPersist *persist) -{ -} - -void -webkit_embed_persist_completed (WebKitEmbedPersist *persist) -{ - g_signal_emit_by_name (persist, "completed"); - g_object_unref (persist); -} - -void -webkit_embed_persist_cancelled (WebKitEmbedPersist *persist) -{ - g_signal_emit_by_name (persist, "cancelled"); - g_object_unref (persist); -} diff --git a/embed/webkit/webkit-embed-persist.h b/embed/webkit/webkit-embed-persist.h deleted file mode 100644 index 671a74745..000000000 --- a/embed/webkit/webkit-embed-persist.h +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright © 2007 Xan Lopez <xan@gnome.org> - * - * 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_EMBED_PERSIST_H -#define WEBKIT_EMBED_PERSIST_H - -#include <glib.h> -#include <glib-object.h> - -#include "ephy-embed-persist.h" - -G_BEGIN_DECLS - -#define WEBKIT_TYPE_EMBED_PERSIST (webkit_embed_persist_get_type ()) -#define WEBKIT_EMBED_PERSIST(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), WEBKIT_TYPE_EMBED_PERSIST, WebKitEmbedPersist)) -#define WEBKIT_EMBED_PERSIST_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), WEBKIT_TYPE_EMBED_PERSIST, WebKitEmbedPersistClass)) -#define WEBKIT_IS_EMBED_PERSIST(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), WEBKIT_TYPE_EMBED_PERSIST)) -#define WEBKIT_IS_EMBED_PERSIST_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), WEBKIT_TYPE_EMBED_PERSIST)) -#define WEBKIT_EMBED_PERSIST_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), WEBKIT_TYPE_EMBED_PERSIST, WebKitEmbedPersistClass)) - -typedef struct WebKitEmbedPersistClass WebKitEmbedPersistClass; -typedef struct WebKitEmbedPersist WebKitEmbedPersist; -typedef struct WebKitEmbedPersistPrivate WebKitEmbedPersistPrivate; - -struct WebKitEmbedPersist -{ - EphyEmbedPersist parent; -}; - -struct WebKitEmbedPersistClass -{ - EphyEmbedPersistClass parent_class; -}; - -GType webkit_embed_persist_get_type (void); - -void webkit_embed_persist_completed (WebKitEmbedPersist *persist); - -void webkit_embed_persist_cancelled (WebKitEmbedPersist *persist); - -G_END_DECLS - -#endif |