[epiphany-extensions/peas: 4/10] tab-key-tab-navigate: port to libpeas



commit a4efd14fcb6555cb53ce0aa34a1d3a382ca46088
Author: Diego Escalante Urrelo <descalante igalia com>
Date:   Sun Apr 3 17:53:41 2011 -0500

    tab-key-tab-navigate: port to libpeas

 extensions/tab-key-tab-navigate/Makefile.am        |   11 ++---
 .../ephy-tab-key-tab-navigate-extension.c          |   13 +++++-
 .../ephy-tab-key-tab-navigate-extension.h          |    8 ++-
 extensions/tab-key-tab-navigate/extension.c        |   44 --------------------
 ...ion.in.in => tab-key-tab-navigate.plugin.in.in} |   12 ++----
 5 files changed, 26 insertions(+), 62 deletions(-)
---
diff --git a/extensions/tab-key-tab-navigate/Makefile.am b/extensions/tab-key-tab-navigate/Makefile.am
index 84b8d12..008501d 100644
--- a/extensions/tab-key-tab-navigate/Makefile.am
+++ b/extensions/tab-key-tab-navigate/Makefile.am
@@ -3,8 +3,7 @@ extension_LTLIBRARIES = libtabkeytabnavigateextension.la
 
 libtabkeytabnavigateextension_la_SOURCES = \
 	ephy-tab-key-tab-navigate-extension.c	\
-	ephy-tab-key-tab-navigate-extension.h	\
-	extension.c
+	ephy-tab-key-tab-navigate-extension.h
 
 libtabkeytabnavigateextension_la_CPPFLAGS = \
         -I$(top_srcdir)/include				\
@@ -18,14 +17,14 @@ libtabkeytabnavigateextension_la_CFLAGS = \
 
 libtabkeytabnavigateextension_la_LDFLAGS = \
 	-module -avoid-version \
-	-export-symbols $(top_srcdir)/ephy-extension.symbols \
+	-no-undefined \
 	$(AM_LDFLAGS)
 
 extensioninidir = $(extensiondir)
-extensionini_in_files = tab-key-tab-navigate.ephy-extension.in.in
-extensionini_DATA = $(extensionini_in_files:.ephy-extension.in.in=.ephy-extension)
+extensionini_in_files = tab-key-tab-navigate.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/tab-key-tab-navigate/ephy-tab-key-tab-navigate-extension.c b/extensions/tab-key-tab-navigate/ephy-tab-key-tab-navigate-extension.c
index ae6fdfb..06194e6 100644
--- a/extensions/tab-key-tab-navigate/ephy-tab-key-tab-navigate-extension.c
+++ b/extensions/tab-key-tab-navigate/ephy-tab-key-tab-navigate-extension.c
@@ -27,12 +27,14 @@
 #include <epiphany/epiphany.h>
 #include <gdk/gdkkeysyms.h>
 
-#include <gmodule.h>
+#include <libpeas/peas.h>
 
 static GObjectClass *parent_class = NULL;
 
 static GType type = 0;
 
+GType	ephy_tab_key_tab_navigate_extension_register_type	(GTypeModule *module);
+
 static void set_tab_offset (EphyWindow *window, gint offset)
 {
 	GtkWidget *notebook;
@@ -149,3 +151,12 @@ ephy_tab_key_tab_navigate_extension_register_type (GTypeModule *module)
 
 	return type;
 }
+
+G_MODULE_EXPORT void
+peas_register_types (PeasObjectModule *module)
+{
+	ephy_tab_key_tab_navigate_extension_register_type (G_TYPE_MODULE (module));
+	peas_object_module_register_extension_type (module,
+						    EPHY_TYPE_EXTENSION,
+						    EPHY_TYPE_TAB_KEY_TAB_NAVIGATE_EXTENSION);
+}
diff --git a/extensions/tab-key-tab-navigate/ephy-tab-key-tab-navigate-extension.h b/extensions/tab-key-tab-navigate/ephy-tab-key-tab-navigate-extension.h
index e905198..127afa6 100644
--- a/extensions/tab-key-tab-navigate/ephy-tab-key-tab-navigate-extension.h
+++ b/extensions/tab-key-tab-navigate/ephy-tab-key-tab-navigate-extension.h
@@ -24,6 +24,7 @@
 
 #include <glib.h>
 #include <glib-object.h>
+#include <libpeas/peas.h>
 
 G_BEGIN_DECLS
 
@@ -39,18 +40,19 @@ typedef struct _EphyTabKeyTabNavigateExtensionClass	EphyTabKeyTabNavigateExtensi
 
 struct _EphyTabKeyTabNavigateExtensionClass
 {
-	GObjectClass parent_class;
+	PeasExtensionBaseClass parent_class;
 };
 
 struct _EphyTabKeyTabNavigateExtension
 {
-	GObject parent_instance;
+	PeasExtensionBase parent_instance;
 };
 
 GType	ephy_tab_key_tab_navigate_extension_get_type		(void);
-
 GType	ephy_tab_key_tab_navigate_extension_register_type	(GTypeModule *module);
 
+G_MODULE_EXPORT void   peas_register_types			(PeasObjectModule *module);
+
 G_END_DECLS
 
 #endif
diff --git a/extensions/tab-key-tab-navigate/tab-key-tab-navigate.ephy-extension.in.in b/extensions/tab-key-tab-navigate/tab-key-tab-navigate.plugin.in.in
similarity index 50%
rename from extensions/tab-key-tab-navigate/tab-key-tab-navigate.ephy-extension.in.in
rename to extensions/tab-key-tab-navigate/tab-key-tab-navigate.plugin.in.in
index c0e414d..2d04036 100644
--- a/extensions/tab-key-tab-navigate/tab-key-tab-navigate.ephy-extension.in.in
+++ b/extensions/tab-key-tab-navigate/tab-key-tab-navigate.plugin.in.in
@@ -1,11 +1,7 @@
-[Epiphany Extension]
+[Plugin]
+Module=%LIBRARY%
+IAge=1
 _Name=Tab Key Tab Navigate
 _Description=Use the Tab key to navigate between tabs
 Authors=Lubomír SedláÅ? <lubomir sedlar gmail com>, Stefan Stuhr
-Version=1
-URL=http://www.gnome.org/projects/epiphany/extensions.html
-
-
-[Loader]
-Type=shlib
-Library=%EXTENSION_DIR%/%LIBRARY%
+Website=http://www.gnome.org/projects/epiphany/extensions.html



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