[epiphany-extensions/peas: 11/15] actions: port to libpeas
- From: Diego Escalante Urrelo <diegoe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany-extensions/peas: 11/15] actions: port to libpeas
- Date: Thu, 21 Apr 2011 07:44:52 +0000 (UTC)
commit 18c0582d1c668069eb7a1bb1d1c330a25679e6f9
Author: Diego Escalante Urrelo <descalante igalia com>
Date: Thu Apr 7 11:47:06 2011 -0500
actions: port to libpeas
extensions/actions/Makefile.am | 11 +++---
extensions/actions/actions.ephy-extension.in.in | 11 ------
extensions/actions/actions.plugin.in.in | 7 ++++
extensions/actions/ephy-actions-extension.c | 12 +++++++
extensions/actions/ephy-actions-extension.h | 6 +++-
extensions/actions/extension.c | 40 -----------------------
6 files changed, 29 insertions(+), 58 deletions(-)
---
diff --git a/extensions/actions/Makefile.am b/extensions/actions/Makefile.am
index 2083d47..9a091a5 100644
--- a/extensions/actions/Makefile.am
+++ b/extensions/actions/Makefile.am
@@ -9,8 +9,7 @@ libactionsextension_la_SOURCES = \
ephy-actions-extension-util.c \
ephy-actions-extension-util.h \
ephy-actions-extension.c \
- ephy-actions-extension.h \
- extension.c
+ ephy-actions-extension.h
libactionsextension_la_CPPFLAGS = \
-I$(top_srcdir)/include \
@@ -24,7 +23,7 @@ libactionsextension_la_CFLAGS = \
libactionsextension_la_LDFLAGS = \
-module -avoid-version \
- -export-symbols $(top_srcdir)/ephy-extension.symbols \
+ -no-undefined \
$(AM_LDFLAGS)
ui_DATA = \
@@ -33,10 +32,10 @@ ui_DATA = \
uidir = $(pkgdatadir)/ui
extensioninidir = $(extensiondir)
-extensionini_in_files = actions.ephy-extension.in.in
-extensionini_DATA = $(extensionini_in_files:.ephy-extension.in.in=.ephy-extension)
+extensionini_in_files = actions.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/actions/actions.plugin.in.in b/extensions/actions/actions.plugin.in.in
new file mode 100644
index 0000000..77c3932
--- /dev/null
+++ b/extensions/actions/actions.plugin.in.in
@@ -0,0 +1,7 @@
+[Plugin]
+Module=%LIBRARY%
+_Name=Actions
+_Description=Execute arbitrary commands from the context menu
+Authors=Jean-Yves Lefort <jylefort brutele be>
+IAge=1
+Website=http://www.gnome.org/projects/epiphany/extensions.html
diff --git a/extensions/actions/ephy-actions-extension.c b/extensions/actions/ephy-actions-extension.c
index b3bf925..a14bf39 100644
--- a/extensions/actions/ephy-actions-extension.c
+++ b/extensions/actions/ephy-actions-extension.c
@@ -22,6 +22,7 @@
#include <glib/gi18n-lib.h>
#include <gtk/gtk.h>
#include <epiphany/epiphany.h>
+#include <libpeas/peas.h>
#include "ephy-file-helpers.h"
#include "ephy-actions-extension.h"
#include "ephy-actions-extension-editor-dialog.h"
@@ -823,3 +824,14 @@ ephy_actions_extension_detach_tab (EphyExtension *extension,
G_CALLBACK (ephy_actions_extension_context_menu_cb), window);
}
+G_MODULE_EXPORT void
+peas_register_types (PeasObjectModule *module)
+{
+ ephy_actions_extension_editor_dialog_register_type (G_TYPE_MODULE (module));
+ ephy_actions_extension_properties_dialog_register_type (G_TYPE_MODULE (module));
+ ephy_actions_extension_register_type (G_TYPE_MODULE (module));
+
+ peas_object_module_register_extension_type (module,
+ EPHY_TYPE_EXTENSION,
+ EPHY_TYPE_ACTIONS_EXTENSION);
+}
diff --git a/extensions/actions/ephy-actions-extension.h b/extensions/actions/ephy-actions-extension.h
index 6d5595d..ff1ca5d 100644
--- a/extensions/actions/ephy-actions-extension.h
+++ b/extensions/actions/ephy-actions-extension.h
@@ -20,7 +20,7 @@
#define _EPHY_ACTIONS_EXTENSION_H
#include <glib-object.h>
-#include <epiphany/epiphany.h>
+#include <libpeas/peas.h>
#include "ephy-actions-extension-properties-dialog.h"
G_BEGIN_DECLS
@@ -79,6 +79,10 @@ EphyNodeDb * ephy_actions_extension_get_db
EphyNode * ephy_actions_extension_get_actions
(EphyActionsExtension *extension);
+G_MODULE_EXPORT void
+ peas_register_types
+ (PeasObjectModule *module);
+
G_END_DECLS
#endif /* _EPHY_ACTIONS_EXTENSION_H */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]