aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2003-11-11 05:36:34 +0800
committerChristian Persch <chpe@src.gnome.org>2003-11-11 05:36:34 +0800
commit6e5d0d68dce662ca6db4a753154b010e3e82bfdc (patch)
treef58000182e2ad17e3c0dc271dd70f02cbb94927c /plugins
parent5dd52c6c36d647d844372b3baad27df7f014bdf6 (diff)
downloadgsoc2013-epiphany-6e5d0d68dce662ca6db4a753154b010e3e82bfdc.tar
gsoc2013-epiphany-6e5d0d68dce662ca6db4a753154b010e3e82bfdc.tar.gz
gsoc2013-epiphany-6e5d0d68dce662ca6db4a753154b010e3e82bfdc.tar.bz2
gsoc2013-epiphany-6e5d0d68dce662ca6db4a753154b010e3e82bfdc.tar.lz
gsoc2013-epiphany-6e5d0d68dce662ca6db4a753154b010e3e82bfdc.tar.xz
gsoc2013-epiphany-6e5d0d68dce662ca6db4a753154b010e3e82bfdc.tar.zst
gsoc2013-epiphany-6e5d0d68dce662ca6db4a753154b010e3e82bfdc.zip
New extensions API.
2003-11-10 Christian Persch <chpe@cvs.gnome.org> New extensions API. * Makefile.am: * configure.in: * lib/Makefile.am: * lib/ephy-module-loader.c: (ephy_module_loader_get_type), (ephy_module_loader_new), (ephy_module_loader_load), (ephy_module_loader_unload), (ephy_module_loader_class_init), (ephy_module_loader_init), (ephy_module_loader_finalize), (ephy_module_loader_factory): * lib/ephy-module-loader.h: * plugins/.cvsignore: * plugins/Makefile.am: * plugins/sample/.cvsignore: * plugins/sample/Makefile.am: * plugins/sample/sample.c: * src/Makefile.am: * src/bookmarks/ephy-bookmarks-editor.c: (get_target_window): * src/bookmarks/ephy-bookmarks.c: * src/ephy-automation.c: (ephy_automation_factory), (ephy_automation_factory_new), (impl_ephy_automation_loadurl), (impl_ephy_automation_load_session), (ephy_automation_class_init): * src/ephy-extension.c: (ephy_extension_get_type), (ephy_extension_attach_window), (ephy_extension_detach_window): * src/ephy-extension.h: * src/ephy-extensions-manager.c: (ephy_extensions_manager_get_type), (ephy_extensions_manager_instantiate_extension), (ephy_extensions_manager_load), (ephy_extensions_manager_load_dir), (ephy_extensions_manager_add), (ephy_extensions_manager_init), (ephy_extensions_manager_finalize), (impl_attach_window), (impl_detach_window), (ephy_extensions_manager_iface_init), (ephy_extensions_manager_class_init), (ephy_extensions_manager_new): * src/ephy-extensions-manager.h: * src/ephy-history-window.c: (get_target_window): * src/ephy-plugin.c: * src/ephy-plugin.h: * src/ephy-session.c: (ephy_session_get_type), (get_session_filename), (session_delete), (net_stop_cb), (tab_added_cb), (tab_removed_cb), (tabs_reordered_cb), (impl_attach_window), (impl_detach_window), (save_yourself_cb), (die_cb), (gnome_session_attach), (gnome_session_detach), (ensure_session_directory), (ephy_session_init), (ephy_session_dispose), (ephy_session_finalize), (ephy_session_iface_init), (ephy_session_class_init), (offer_to_resume), (ephy_session_autoresume), (ephy_session_close), (write_tab), (write_window_geometry), (write_tool_window), (write_ephy_window), (ephy_session_save), (parse_embed), (ephy_session_load), (ephy_session_get_windows), (ephy_session_add_window), (ephy_session_remove_window), (ephy_session_get_active_window): * src/ephy-session.h: * src/ephy-shell.c: (ephy_shell_init), (ephy_shell_finalize), (ephy_shell_get_session), (ephy_shell_get_extensions_manager), (toolwindow_show_cb), (toolwindow_hide_cb): * src/ephy-shell.h: * src/ephy-window.c: (ephy_window_destroy), (ephy_window_init): * src/prefs-dialog.c: (prefs_homepage_current_button_clicked_cb): * src/session.c: * src/session.h: Create a new extensions API. Make session an internal extension :) Port callers to session API changes.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/.cvsignore2
-rw-r--r--plugins/Makefile.am5
-rw-r--r--plugins/sample/.cvsignore2
-rw-r--r--plugins/sample/Makefile.am19
-rw-r--r--plugins/sample/sample.c122
5 files changed, 0 insertions, 150 deletions
diff --git a/plugins/.cvsignore b/plugins/.cvsignore
deleted file mode 100644
index 282522db0..000000000
--- a/plugins/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-Makefile
-Makefile.in
diff --git a/plugins/Makefile.am b/plugins/Makefile.am
deleted file mode 100644
index 8496a69ed..000000000
--- a/plugins/Makefile.am
+++ /dev/null
@@ -1,5 +0,0 @@
-SUBDIRS =
-
-if ENABLE_SAMPLE_PLUGIN
-SUBDIRS += sample
-endif
diff --git a/plugins/sample/.cvsignore b/plugins/sample/.cvsignore
deleted file mode 100644
index 282522db0..000000000
--- a/plugins/sample/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-Makefile
-Makefile.in
diff --git a/plugins/sample/Makefile.am b/plugins/sample/Makefile.am
deleted file mode 100644
index 2c735e923..000000000
--- a/plugins/sample/Makefile.am
+++ /dev/null
@@ -1,19 +0,0 @@
-plugindir = $(libdir)/epiphany/plugins
-
-INCLUDES = \
- -I$(top_srcdir)/src \
- -I$(top_srcdir)/embed \
- -I$(top_srcdir)/lib \
- -I$(top_srcdir)/src/bookmarks \
- $(EPIPHANY_DEPENDENCY_CFLAGS) \
- -DSHARE_DIR=\"$(pkgdatadir)\" \
- -DG_DISABLE_DEPRECATED \
- -DGDK_DISABLE_DEPRECATED \
- -DGTK_DISABLE_DEPRECATED \
- -DGDK_PIXBUF_DISABLE_DEPRECATED \
- -DGNOME_DISABLE_DEPRECATED
-
-plugin_LTLIBRARIES = libsample.la
-
-libsample_la_SOURCES = \
- sample.c
diff --git a/plugins/sample/sample.c b/plugins/sample/sample.c
deleted file mode 100644
index fb5e9ed64..000000000
--- a/plugins/sample/sample.c
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- * Copyright (C) 2003 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-
-#include <gmodule.h>
-#include <glib-object.h>
-
-#include "ephy-shell.h"
-#include "session.h"
-
-static void
-bmk_added (EphyNode *node, EphyNode *child)
-{
- g_print ("Bookmark added\n");
-}
-
-static void
-bmk_removed (EphyNode *node, EphyNode *child)
-{
- g_print ("Bookmark removed\n");
-}
-
-static void
-bmk_changed (EphyNode *node, EphyNode *child)
-{
- g_print ("Bookmark changed\n");
-}
-
-static void
-switch_page_cb (GtkWidget *widget)
-{
- GtkWidget *toplevel;
- EphyTab *tab;
-
- toplevel = gtk_widget_get_toplevel (widget);
-
- tab = ephy_window_get_active_tab (EPHY_WINDOW (toplevel));
- g_print ("New active tab is %p\n", tab);
-}
-
-static gboolean
-window_focus_in_cb (GtkWidget *widget, GdkEventFocus *event)
-{
- EphyTab *tab;
-
- tab = ephy_window_get_active_tab (EPHY_WINDOW (widget));
- g_print ("New active tab is %p\n", tab);
-
- return FALSE;
-}
-
-static void
-location_changed_cb (EphyEmbed *embed, char *location)
-{
- g_print ("New location %s\n", location);
-}
-
-static void
-tab_added_cb (GtkWidget *nb, GtkWidget *child)
-{
- g_signal_connect (child, "ge_location",
- G_CALLBACK (location_changed_cb), NULL);
-}
-
-static void
-new_window_cb (Session *session, EphyWindow *window)
-{
- GtkWidget *nb;
-
- nb = ephy_window_get_notebook (window);
-
- g_signal_connect (window, "focus_in_event",
- G_CALLBACK (window_focus_in_cb), NULL);
- g_signal_connect (nb, "switch_page",
- G_CALLBACK (switch_page_cb), NULL);
- g_signal_connect (nb, "tab_added",
- G_CALLBACK (tab_added_cb), NULL);
-}
-
-G_MODULE_EXPORT void
-plugin_init (GTypeModule *module)
-{
- EphyBookmarks *bookmarks;
- Session *session;
- EphyNode *bmks;
-
- g_print ("plugin init\n");
-
- bookmarks = ephy_shell_get_bookmarks (ephy_shell);
- bmks = ephy_bookmarks_get_bookmarks (bookmarks);
- ephy_node_signal_connect_object (bmks, EPHY_NODE_CHILD_ADDED,
- (EphyNodeCallback) bmk_added, NULL);
- ephy_node_signal_connect_object (bmks, EPHY_NODE_CHILD_CHANGED,
- (EphyNodeCallback) bmk_changed, NULL);
- ephy_node_signal_connect_object (bmks, EPHY_NODE_CHILD_REMOVED,
- (EphyNodeCallback) bmk_removed, NULL);
-
- session = SESSION (ephy_shell_get_session (ephy_shell));
- g_signal_connect (session, "new_window",
- G_CALLBACK (new_window_cb), NULL);
-}
-
-G_MODULE_EXPORT void
-plugin_exit (void)
-{
- g_print ("plugin exit\n");
-}