[epiphany-extensions/peas: 13/15] auto-reload: port to libpeas



commit 8d9a71bd8a8d982261b667eb09f3b4e81a0115e0
Author: Diego Escalante Urrelo <descalante igalia com>
Date:   Thu Apr 7 12:01:43 2011 -0500

    auto-reload: port to libpeas

 extensions/auto-reload/Makefile.am                 |   11 ++---
 .../auto-reload/auto-reload.ephy-extension.in.in   |   10 ----
 extensions/auto-reload/auto-reload.plugin.in.in    |    7 +++
 .../auto-reload/ephy-auto-reload-extension.c       |   12 ++++-
 .../auto-reload/ephy-auto-reload-extension.h       |    4 +-
 extensions/auto-reload/extension.c                 |   44 --------------------
 6 files changed, 25 insertions(+), 63 deletions(-)
---
diff --git a/extensions/auto-reload/Makefile.am b/extensions/auto-reload/Makefile.am
index 32da240..58754f0 100644
--- a/extensions/auto-reload/Makefile.am
+++ b/extensions/auto-reload/Makefile.am
@@ -3,12 +3,11 @@ extension_LTLIBRARIES = libautoreloadextension.la
 
 libautoreloadextension_la_SOURCES = \
 	ephy-auto-reload-extension.c	\
-	ephy-auto-reload-extension.h	\
-	extension.c
+	ephy-auto-reload-extension.h
 	
 libautoreloadextension_la_LDFLAGS = \
 	-module -avoid-version \
-	-export-symbols $(top_srcdir)/ephy-extension.symbols \
+	-no-undefined \
 	$(AM_LDFLAGS)
 
 libautoreloadextension_la_CPPFLAGS = \
@@ -22,10 +21,10 @@ libautoreloadextension_la_CFLAGS = \
 	$(AM_CFLAGS)
 
 extensioninidir = $(extensiondir)
-extensionini_in_files = auto-reload.ephy-extension.in.in
-extensionini_DATA = $(extensionini_in_files:.ephy-extension.in.in=.ephy-extension)
+extensionini_in_files = auto-reload.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/auto-reload/auto-reload.plugin.in.in b/extensions/auto-reload/auto-reload.plugin.in.in
new file mode 100644
index 0000000..522114a
--- /dev/null
+++ b/extensions/auto-reload/auto-reload.plugin.in.in
@@ -0,0 +1,7 @@
+[Plugin]
+Module=%LIBRARY%
+_Name=Auto Reload Tab
+_Description=Reload a tab periodically
+Authors=Raphaël Slinckx <raphael slinckx net>;
+IAge=1
+Website=http://www.gnome.org/projects/epiphany/extensions.html
diff --git a/extensions/auto-reload/ephy-auto-reload-extension.c b/extensions/auto-reload/ephy-auto-reload-extension.c
index 3fef46a..7a8c74f 100644
--- a/extensions/auto-reload/ephy-auto-reload-extension.c
+++ b/extensions/auto-reload/ephy-auto-reload-extension.c
@@ -29,8 +29,6 @@
 
 #include <glib/gi18n-lib.h>
 
-#include <gmodule.h>
-
 #define EPHY_AUTO_RELOAD_EXTENSION_GET_PRIVATE(object)	(G_TYPE_INSTANCE_GET_PRIVATE ((object), EPHY_TYPE_AUTO_RELOAD_EXTENSION, EphyAutoReloadExtensionPrivate))
 
 /* This is the time to wait before the first reload, the maximal reload rate and the time increment after each unchanged reload */
@@ -316,3 +314,13 @@ ephy_auto_reload_extension_register_type (GTypeModule *module)
 
 	return type;
 }
+
+G_MODULE_EXPORT void
+peas_register_types (PeasObjectModule *module)
+{
+	ephy_auto_reload_extension_register_type (G_TYPE_MODULE (module));
+
+	peas_object_module_register_extension_type (module,
+						    EPHY_TYPE_EXTENSION,
+						    EPHY_TYPE_AUTO_RELOAD_EXTENSION);
+}
diff --git a/extensions/auto-reload/ephy-auto-reload-extension.h b/extensions/auto-reload/ephy-auto-reload-extension.h
index 7380095..968dc59 100644
--- a/extensions/auto-reload/ephy-auto-reload-extension.h
+++ b/extensions/auto-reload/ephy-auto-reload-extension.h
@@ -22,7 +22,7 @@
 #define EPHY_AUTO_RELOAD_EXTENSION_H
 
 #include <glib.h>
-#include <glib-object.h>
+#include <libpeas/peas.h>
 
 G_BEGIN_DECLS
 
@@ -50,6 +50,8 @@ GType	ephy_auto_reload_extension_get_type			(void);
 
 GType	ephy_auto_reload_extension_register_type	(GTypeModule *module);
 
+G_MODULE_EXPORT void peas_register_types		(PeasObjectModule *module);
+
 G_END_DECLS
 
 #endif



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