aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXan Lopez <xan@gnome.org>2009-06-06 05:04:24 +0800
committerXan Lopez <xan@gnome.org>2009-06-06 05:04:24 +0800
commit23fa2e15713edb80aadf60df21dda1795dfab74d (patch)
treeef9c99f535d2010379f6a13c4e0d318ac7277bd2
parent914b6f95e19447d1b25209b9bb3cda2942513775 (diff)
downloadgsoc2013-epiphany-23fa2e15713edb80aadf60df21dda1795dfab74d.tar
gsoc2013-epiphany-23fa2e15713edb80aadf60df21dda1795dfab74d.tar.gz
gsoc2013-epiphany-23fa2e15713edb80aadf60df21dda1795dfab74d.tar.bz2
gsoc2013-epiphany-23fa2e15713edb80aadf60df21dda1795dfab74d.tar.lz
gsoc2013-epiphany-23fa2e15713edb80aadf60df21dda1795dfab74d.tar.xz
gsoc2013-epiphany-23fa2e15713edb80aadf60df21dda1795dfab74d.tar.zst
gsoc2013-epiphany-23fa2e15713edb80aadf60df21dda1795dfab74d.zip
Get rid of EphyEmbedFactory.
It's useless now, since there's only one backend.
-rw-r--r--embed/Makefile.am15
-rw-r--r--embed/ephy-embed-factory.c58
-rw-r--r--embed/ephy-embed-factory.h37
-rw-r--r--embed/ephy-embed-shell.c3
-rw-r--r--embed/ephy-embed.c1
-rw-r--r--embed/ephy-favicon-cache.c3
-rw-r--r--src/ephy-shell.c3
-rw-r--r--src/ephy-window.c3
-rw-r--r--src/popup-commands.c7
-rw-r--r--src/window-commands.c5
10 files changed, 10 insertions, 125 deletions
diff --git a/embed/Makefile.am b/embed/Makefile.am
index 941c3a817..b1f23303b 100644
--- a/embed/Makefile.am
+++ b/embed/Makefile.am
@@ -1,6 +1,6 @@
NULL =
-noinst_LTLIBRARIES = libephyembed.la libephyembedfactory.la
+noinst_LTLIBRARIES = libephyembed.la
headerdir = $(prefix)/include/epiphany/$(EPIPHANY_MAJOR)/epiphany
header_DATA = \
@@ -20,7 +20,6 @@ INST_H_FILES = \
ephy-embed.h \
ephy-embed-container.h \
ephy-embed-event.h \
- ephy-embed-factory.h \
ephy-embed-persist.h \
ephy-embed-prefs.h \
ephy-embed-single.h \
@@ -74,18 +73,6 @@ libephyembed_la_CFLAGS = \
$(DEPENDENCIES_CFLAGS) \
$(AM_CFLAGS)
-libephyembedfactory_la_SOURCES = \
- ephy-embed-factory.c \
- ephy-embed-factory.h
-
-libephyembedfactory_la_CPPFLAGS = \
- $(AM_CPPFLAGS)
-
-libephyembedfactory_la_CFLAGS = \
- $(GECKO_CFLAGS) \
- $(DEPENDENCIES_CFLAGS) \
- $(AM_CFLAGS)
-
CLEANFILES = $(stamp_files) $(BUILT_SOURCES)
DISTCLEANFILES = $(stamp_files) $(BUILT_SOURCES)
MAINTAINERCLEANFILES = $(stamp_files) $(BUILT_SOURCES)
diff --git a/embed/ephy-embed-factory.c b/embed/ephy-embed-factory.c
deleted file mode 100644
index 538ce279e..000000000
--- a/embed/ephy-embed-factory.c
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright © 2000-2004 Marco Pesenti Gritti
- *
- * 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-embed-factory.h"
-#include "ephy-embed.h"
-#include "ephy-embed-persist.h"
-#include "ephy-embed-single.h"
-
-/**
- * ephy_embed_factory_new_object:
- * @type: a #GType specifying which object to create
- *
- * Create an instance of an object implementing the @type interface.
- *
- * Return value: the object instance
- **/
-GObject *
-ephy_embed_factory_new_object (GType type)
-{
- GObject *object = NULL;
-
- if (type == EPHY_TYPE_EMBED)
- {
- object = g_object_new (EPHY_TYPE_EMBED, NULL);
- }
- else if (type == EPHY_TYPE_EMBED_PERSIST)
- {
- object = g_object_new (EPHY_TYPE_EMBED_PERSIST, NULL);
- }
- else if (type == EPHY_TYPE_EMBED_SINGLE)
- {
- object = g_object_new (EPHY_TYPE_EMBED_SINGLE, NULL);
- }
- else
- {
- g_assert_not_reached ();
- }
-
- return object;
-}
diff --git a/embed/ephy-embed-factory.h b/embed/ephy-embed-factory.h
deleted file mode 100644
index 386019282..000000000
--- a/embed/ephy-embed-factory.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright © 2000-2004 Marco Pesenti Gritti
- *
- * 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.
- *
- *
- */
-
-#if !defined (__EPHY_EPIPHANY_H_INSIDE__) && !defined (EPIPHANY_COMPILATION)
-#error "Only <epiphany/epiphany.h> can be included directly."
-#endif
-
-#ifndef EPHY_EMBED_FACTORY_H
-#define EPHY_EMBED_FACTORY_H
-
-#include <glib-object.h>
-#include <glib.h>
-
-G_BEGIN_DECLS
-
-GObject *ephy_embed_factory_new_object (GType type);
-
-G_END_DECLS
-
-#endif
diff --git a/embed/ephy-embed-shell.c b/embed/ephy-embed-shell.c
index b84e2eef3..7ead872f8 100644
--- a/embed/ephy-embed-shell.c
+++ b/embed/ephy-embed-shell.c
@@ -28,7 +28,6 @@
#include "downloader-view.h"
#include "ephy-adblock-manager.h"
#include "ephy-debug.h"
-#include "ephy-embed-factory.h"
#include "ephy-embed-shell.h"
#include "ephy-embed-single.h"
#include "ephy-encodings.h"
@@ -228,7 +227,7 @@ impl_get_embed_single (EphyEmbedShell *shell)
if (priv->embed_single == NULL)
{
priv->embed_single = EPHY_EMBED_SINGLE
- (ephy_embed_factory_new_object (EPHY_TYPE_EMBED_SINGLE));
+ (g_object_new (EPHY_TYPE_EMBED_SINGLE, NULL));
g_assert (priv->embed_single != NULL);
if (!ephy_embed_single_initialize (priv->embed_single))
diff --git a/embed/ephy-embed.c b/embed/ephy-embed.c
index b32fd49fe..9be89dd62 100644
--- a/embed/ephy-embed.c
+++ b/embed/ephy-embed.c
@@ -32,7 +32,6 @@
#include "ephy-file-chooser.h"
#include "ephy-file-helpers.h"
#include "ephy-history.h"
-#include "ephy-embed-factory.h"
#include "ephy-embed-shell.h"
#include "ephy-embed-single.h"
#include "ephy-embed-persist.h"
diff --git a/embed/ephy-favicon-cache.c b/embed/ephy-favicon-cache.c
index f1d9c51ae..bed95ed09 100644
--- a/embed/ephy-favicon-cache.c
+++ b/embed/ephy-favicon-cache.c
@@ -30,7 +30,6 @@
#include "ephy-embed-shell.h"
#include "ephy-embed-persist.h"
-#include "ephy-embed-factory.h"
#include "ephy-file-helpers.h"
#include "ephy-node-common.h"
#include "ephy-node.h"
@@ -510,7 +509,7 @@ ephy_favicon_cache_download (EphyFaviconCache *cache,
dest = g_build_filename (cache->priv->directory, filename, NULL);
persist = EPHY_EMBED_PERSIST
- (ephy_embed_factory_new_object (EPHY_TYPE_EMBED_PERSIST));
+ (g_object_new (EPHY_TYPE_EMBED_PERSIST, NULL));
ephy_embed_persist_set_dest (persist, dest);
ephy_embed_persist_set_flags (persist, EPHY_EMBED_PERSIST_NO_VIEW |
diff --git a/src/ephy-shell.c b/src/ephy-shell.c
index 614d88d7f..fe603f44b 100644
--- a/src/ephy-shell.c
+++ b/src/ephy-shell.c
@@ -56,7 +56,6 @@
#include "ephy-prefs.h"
#include "ephy-gui.h"
#include "ephy-stock-icons.h"
-#include "ephy-embed-factory.h"
#include "ephy-web-view.h"
#ifdef ENABLE_NETWORK_MANAGER
@@ -483,7 +482,7 @@ ephy_shell_new_tab_full (EphyShell *shell,
}
if (active_is_blank == FALSE)
{
- embed = EPHY_EMBED (ephy_embed_factory_new_object (EPHY_TYPE_EMBED));
+ embed = EPHY_EMBED (g_object_new (EPHY_TYPE_EMBED, NULL));
g_assert (embed != NULL);
gtk_widget_show (GTK_WIDGET (embed));
diff --git a/src/ephy-window.c b/src/ephy-window.c
index 562c3f3a8..2916b9efd 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -55,7 +55,6 @@
#include "ephy-action-helper.h"
#include "ephy-find-toolbar.h"
#include "ephy-embed-persist.h"
-#include "ephy-embed-factory.h"
#include "ephy-location-entry.h"
#include "ephy-web-view.h"
@@ -2292,7 +2291,7 @@ save_property_url (EphyEmbed *embed,
if (!ephy_embed_utils_address_has_web_scheme (location)) return FALSE;
persist = EPHY_EMBED_PERSIST
- (ephy_embed_factory_new_object (EPHY_TYPE_EMBED_PERSIST));
+ (g_object_new (EPHY_TYPE_EMBED_PERSIST, NULL));
ephy_embed_persist_set_embed (persist, embed);
ephy_embed_persist_set_flags (persist, 0);
diff --git a/src/popup-commands.c b/src/popup-commands.c
index 00db15425..282020818 100644
--- a/src/popup-commands.c
+++ b/src/popup-commands.c
@@ -23,7 +23,6 @@
#include "popup-commands.h"
#include "ephy-shell.h"
#include "ephy-embed-container.h"
-#include "ephy-embed-factory.h"
#include "ephy-embed-persist.h"
#include "ephy-embed-utils.h"
#include "ephy-prefs.h"
@@ -215,7 +214,7 @@ save_property_url (GtkAction *action,
location = g_value_get_string (value);
persist = EPHY_EMBED_PERSIST
- (ephy_embed_factory_new_object (EPHY_TYPE_EMBED_PERSIST));
+ (g_object_new (EPHY_TYPE_EMBED_PERSIST, NULL));
ephy_embed_persist_set_fc_title (persist, title);
ephy_embed_persist_set_fc_parent (persist, GTK_WINDOW (window));
@@ -326,7 +325,7 @@ popup_cmd_set_image_as_background (GtkAction *action,
location = g_value_get_string (value);
persist = EPHY_EMBED_PERSIST
- (ephy_embed_factory_new_object (EPHY_TYPE_EMBED_PERSIST));
+ (g_object_new (EPHY_TYPE_EMBED_PERSIST, NULL));
base = g_path_get_basename (location);
base_converted = g_filename_from_utf8 (base, -1, NULL, NULL, NULL);
@@ -448,7 +447,7 @@ save_temp_source (const char *address)
}
persist = EPHY_EMBED_PERSIST
- (ephy_embed_factory_new_object (EPHY_TYPE_EMBED_PERSIST));
+ (g_object_new (EPHY_TYPE_EMBED_PERSIST, NULL));
ephy_embed_persist_set_source (persist, address);
ephy_embed_persist_set_flags (persist, EPHY_EMBED_PERSIST_FROM_CACHE |
diff --git a/src/window-commands.c b/src/window-commands.c
index 66bf63b55..eb39dc618 100644
--- a/src/window-commands.c
+++ b/src/window-commands.c
@@ -25,7 +25,6 @@
#include "ephy-embed-single.h"
#include "ephy-embed-utils.h"
#include "ephy-shell.h"
-#include "ephy-embed-factory.h"
#include "ephy-embed-persist.h"
#include "ephy-debug.h"
#include "ephy-command-manager.h"
@@ -305,7 +304,7 @@ window_cmd_file_save_as (GtkAction *action,
g_return_if_fail (embed != NULL);
persist = EPHY_EMBED_PERSIST
- (ephy_embed_factory_new_object (EPHY_TYPE_EMBED_PERSIST));
+ (g_object_new (EPHY_TYPE_EMBED_PERSIST, NULL));
ephy_embed_persist_set_embed (persist, embed);
ephy_embed_persist_set_fc_title (persist, _("Save As"));
@@ -636,7 +635,7 @@ save_temp_source (EphyEmbed *embed,
}
persist = EPHY_EMBED_PERSIST
- (ephy_embed_factory_new_object (EPHY_TYPE_EMBED_PERSIST));
+ (g_object_new (EPHY_TYPE_EMBED_PERSIST, NULL));
ephy_embed_persist_set_embed (persist, embed);
ephy_embed_persist_set_flags (persist, EPHY_EMBED_PERSIST_COPY_PAGE |