[epiphany-extensions/peas: 4/4] tab-key-tab-navigate: port to libpeas
- From: Diego Escalante Urrelo <diegoe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany-extensions/peas: 4/4] tab-key-tab-navigate: port to libpeas
- Date: Sun, 3 Apr 2011 22:54:54 +0000 (UTC)
commit 17b609afec8fbd1d337270de3d26c01661f1169d
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 | 7 ++-
extensions/tab-key-tab-navigate/extension.c | 44 --------------------
...ion.in.in => tab-key-tab-navigate.plugin.in.in} | 12 ++----
5 files changed, 25 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..0244b09 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,17 +40,17 @@ 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
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]