[epiphany-extensions/peas: 14/15] auto-scroller: ported to libpeas



commit c9ff527d59b614f1e03c505186568f9d7f5af9af
Author: Diego Escalante Urrelo <descalante igalia com>
Date:   Thu Apr 7 16:46:42 2011 -0500

    auto-scroller: ported to libpeas
    
    FIXME: still doesn't build (needs to remove GdkPixmap)

 extensions/auto-scroller/Makefile.am               |   11 ++---
 .../auto-scroller.ephy-extension.in.in             |   11 -----
 .../auto-scroller/auto-scroller.plugin.in.in       |    7 +++
 .../auto-scroller/ephy-auto-scroller-extension.c   |   13 +++++-
 .../auto-scroller/ephy-auto-scroller-extension.h   |    4 +-
 extensions/auto-scroller/extension.c               |   47 --------------------
 6 files changed, 27 insertions(+), 66 deletions(-)
---
diff --git a/extensions/auto-scroller/Makefile.am b/extensions/auto-scroller/Makefile.am
index 8f9d31b..46b12da 100644
--- a/extensions/auto-scroller/Makefile.am
+++ b/extensions/auto-scroller/Makefile.am
@@ -6,8 +6,7 @@ libautoscrollerextension_la_SOURCES = \
 	ephy-auto-scroller-extension.h	\
 	ephy-auto-scroller.c		\
 	ephy-auto-scroller.h		\
-	autoscroll.xpm.h		\
-	extension.c
+	autoscroll.xpm.h
 
 libautoscrollerextension_la_CPPFLAGS = \
         -I$(top_srcdir)/include					\
@@ -24,14 +23,14 @@ libautoscrollerextension_la_LIBADD =
 
 libautoscrollerextension_la_LDFLAGS = \
 	-module -avoid-version \
-	-export-symbols $(top_srcdir)/ephy-extension.symbols \
+	-no-undefined \
 	$(AM_LDFLAGS)
 
 extensioninidir = $(extensiondir)
-extensionini_in_files = auto-scroller.ephy-extension.in.in
-extensionini_DATA = $(extensionini_in_files:.ephy-extension.in.in=.ephy-extension)
+extensionini_in_files = auto-scroller.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-scroller/auto-scroller.plugin.in.in b/extensions/auto-scroller/auto-scroller.plugin.in.in
new file mode 100644
index 0000000..606e2e2
--- /dev/null
+++ b/extensions/auto-scroller/auto-scroller.plugin.in.in
@@ -0,0 +1,7 @@
+[Plugin]
+Module=%LIBRARY%
+_Name=Auto Scroll
+_Description=Scroll on middle mouse click
+Authors=Crispin Flowerday <gnome flowerday cx>
+IAge=1
+Website=http://www.gnome.org/projects/epiphany/extensions.html
diff --git a/extensions/auto-scroller/ephy-auto-scroller-extension.c b/extensions/auto-scroller/ephy-auto-scroller-extension.c
index 3fffb70..9692d5d 100644
--- a/extensions/auto-scroller/ephy-auto-scroller-extension.c
+++ b/extensions/auto-scroller/ephy-auto-scroller-extension.c
@@ -27,7 +27,7 @@
 
 #include <epiphany/epiphany.h>
 
-#include <gmodule.h>
+#include <libpeas/peas.h>
 
 #define WINDOW_DATA_KEY	"EphyAutoScrollerExtension::WindowData"
 
@@ -174,3 +174,14 @@ ephy_auto_scroller_extension_register_type (GTypeModule *module)
 
 	return type;
 }
+
+G_MODULE_EXPORT void
+peas_register_types (PeasObjectModule *module)
+{
+	ephy_auto_scroller_register_type (G_TYPE_MODULE (module));
+	ephy_auto_scroller_extension_register_type (G_TYPE_MODULE (module));
+
+	peas_object_module_register_extension_type (module,
+						    EPHY_TYPE_EXTENSION,
+						    EPHY_TYPE_AUTO_SCROLLER_EXTENSION);
+}
diff --git a/extensions/auto-scroller/ephy-auto-scroller-extension.h b/extensions/auto-scroller/ephy-auto-scroller-extension.h
index 65b8479..139c66c 100644
--- a/extensions/auto-scroller/ephy-auto-scroller-extension.h
+++ b/extensions/auto-scroller/ephy-auto-scroller-extension.h
@@ -23,7 +23,7 @@
 #define EPHY_AUTO_SCROLLER_EXTENSION_H
 
 #include <glib.h>
-#include <glib-object.h>
+#include <libpeas/peas.h>
 
 G_BEGIN_DECLS
 
@@ -51,6 +51,8 @@ GType	ephy_auto_scroller_extension_get_type		(void);
 
 GType	ephy_auto_scroller_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]