[epiphany-extensions/peas: 6/15] html5tube: port to libpeas



commit d7c71eac73438522380d5f30a90329fedaf300e0
Author: Diego Escalante Urrelo <descalante igalia com>
Date:   Sun Apr 3 19:07:04 2011 -0500

    html5tube: port to libpeas
    
    FIXME: UNTESTED

 extensions/html5tube/Makefile.am                   |   11 ++---
 extensions/html5tube/ephy-html5tube-extension.c    |   12 +++++-
 extensions/html5tube/ephy-html5tube-extension.h    |    8 ++-
 extensions/html5tube/html5tube.c                   |   41 --------------------
 .../html5tube/html5tube.ephy-extension.in.in       |   11 -----
 extensions/html5tube/html5tube.plugin.in.in        |    7 +++
 6 files changed, 28 insertions(+), 62 deletions(-)
---
diff --git a/extensions/html5tube/Makefile.am b/extensions/html5tube/Makefile.am
index 3a26925..4792321 100644
--- a/extensions/html5tube/Makefile.am
+++ b/extensions/html5tube/Makefile.am
@@ -3,8 +3,7 @@ extension_LTLIBRARIES = libhtml5tubeextension.la
 
 libhtml5tubeextension_la_SOURCES = \
 	ephy-html5tube-extension.c	\
-	ephy-html5tube-extension.h	\
-	html5tube.c
+	ephy-html5tube-extension.h
 
 libhtml5tubeextension_la_CPPFLAGS = \
         -I$(top_srcdir)/include				\
@@ -18,14 +17,14 @@ libhtml5tubeextension_la_CFLAGS = \
 
 libhtml5tubeextension_la_LDFLAGS = \
 	-module -avoid-version \
-	-export-symbols $(top_srcdir)/ephy-extension.symbols \
+	-no-undefined \
 	$(AM_LDFLAGS)
 
 extensioninidir = $(extensiondir)
-extensionini_in_files = html5tube.ephy-extension.in.in
-extensionini_DATA = $(extensionini_in_files:.ephy-extension.in.in=.ephy-extension)
+extensionini_in_files = html5tube.plugin.in.in
+extensionini_DATA = $(extensionini_in_files:.plugin.in.in=.plugin)
 
-%.ephy-extension.in: %.ephy-extension.in.in $(extension_LTLIBRARIES)
+%.plugin.in: %.plugin.in.in $(extension_LTLIBRARIES)
 	$(AM_V_GEN) \
 	sed -e "s|%LIBRARY%|`. ./$(extension_LTLIBRARIES) && echo $$dlname`|" \
 	    -e "s|%EXTENSION_DIR%|$(extensiondir)|" \
diff --git a/extensions/html5tube/ephy-html5tube-extension.c b/extensions/html5tube/ephy-html5tube-extension.c
index 7e12f23..27c1c21 100644
--- a/extensions/html5tube/ephy-html5tube-extension.c
+++ b/extensions/html5tube/ephy-html5tube-extension.c
@@ -24,7 +24,7 @@
 #include <epiphany/epiphany.h>
 #include <JavaScriptCore/JavaScript.h>
 
-#include <gmodule.h>
+#include <libpeas/peas.h>
 
 static GObjectClass *parent_class = NULL;
 
@@ -457,3 +457,13 @@ ephy_html5tube_extension_register_type (GTypeModule *module)
 
   return type;
 }
+
+G_MODULE_EXPORT void
+peas_register_types (PeasObjectModule *module)
+{
+	ephy_html5tube_extension_register_type (G_TYPE_MODULE (module));
+
+	peas_object_module_register_extension_type (module,
+						    EPHY_TYPE_EXTENSION,
+						    EPHY_TYPE_HTML5TUBE_EXTENSION);
+}
diff --git a/extensions/html5tube/ephy-html5tube-extension.h b/extensions/html5tube/ephy-html5tube-extension.h
index 464dc15..9d0acd9 100644
--- a/extensions/html5tube/ephy-html5tube-extension.h
+++ b/extensions/html5tube/ephy-html5tube-extension.h
@@ -21,6 +21,7 @@
 
 #include <glib.h>
 #include <glib-object.h>
+#include <libpeas/peas.h>
 
 G_BEGIN_DECLS
 
@@ -37,20 +38,21 @@ typedef struct _EphyHTML5TubeExtensionPrivate	EphyHTML5TubeExtensionPrivate;
 
 struct _EphyHTML5TubeExtensionClass
 {
-    GObjectClass parent_class;
+    PeasExtensionBaseClass parent_class;
 };
 
 struct _EphyHTML5TubeExtension
 {
-    GObject parent_instance;
+    PeasExtensionBase parent_instance;
 
     /*< private >*/
     EphyHTML5TubeExtensionPrivate *priv;
 };
 
 GType	ephy_html5tube_extension_get_type		(void);
+GType	ephy_html5tube_extension_register_type		(GTypeModule *module);
 
-GType	ephy_html5tube_extension_register_type	(GTypeModule *module);
+G_MODULE_EXPORT void	peas_register_types	(PeasObjectModule *module);
 
 G_END_DECLS
 
diff --git a/extensions/html5tube/html5tube.plugin.in.in b/extensions/html5tube/html5tube.plugin.in.in
new file mode 100644
index 0000000..a3a05b7
--- /dev/null
+++ b/extensions/html5tube/html5tube.plugin.in.in
@@ -0,0 +1,7 @@
+[Plugin]
+Module=%LIBRARY%
+IAge=1
+_Name=HTML5Tube
+_Description=View Youtube videos using WebKit's HTML5 media player
+Authors=Gustavo Noronha Silva <gns gnome org>
+Website=http://www.gnome.org/projects/epiphany/extensions.html



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]