[epiphany-extensions/peas: 3/10] tab-states: port to peas
- From: Diego Escalante Urrelo <diegoe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany-extensions/peas: 3/10] tab-states: port to peas
- Date: Mon, 4 Apr 2011 17:51:09 +0000 (UTC)
commit 4633da1c189456bca755eddc4326a133b1b51a56
Author: Diego Escalante Urrelo <descalante igalia com>
Date: Sun Apr 3 09:59:09 2011 -0500
tab-states: port to peas
extensions/tab-states/Makefile.am | 11 ++---
extensions/tab-states/ephy-tab-states-extension.c | 19 ++++++--
extensions/tab-states/ephy-tab-states-extension.h | 9 ++--
extensions/tab-states/extension.c | 44 --------------------
.../tab-states/tab-states.ephy-extension.in.in | 11 -----
extensions/tab-states/tab-states.plugin.in.in | 7 +++
6 files changed, 31 insertions(+), 70 deletions(-)
---
diff --git a/extensions/tab-states/Makefile.am b/extensions/tab-states/Makefile.am
index 47b4f97..d0a9117 100644
--- a/extensions/tab-states/Makefile.am
+++ b/extensions/tab-states/Makefile.am
@@ -3,8 +3,7 @@ extension_LTLIBRARIES = libtabstatesextension.la
libtabstatesextension_la_SOURCES = \
ephy-tab-states-extension.c \
- ephy-tab-states-extension.h \
- extension.c
+ ephy-tab-states-extension.h
libtabstatesextension_la_CPPFLAGS = \
-I$(top_srcdir)/include \
@@ -18,14 +17,14 @@ libtabstatesextension_la_CFLAGS = \
libtabstatesextension_la_LDFLAGS = \
-module -avoid-version \
- -export-symbols $(top_srcdir)/ephy-extension.symbols \
+ -no-undefined \
$(AM_LDFLAGS)
extensioninidir = $(extensiondir)
-extensionini_in_files = tab-states.ephy-extension.in.in
-extensionini_DATA = $(extensionini_in_files:.ephy-extension.in.in=.ephy-extension)
+extensionini_in_files = tab-states.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-states/ephy-tab-states-extension.c b/extensions/tab-states/ephy-tab-states-extension.c
index b624e0d..5258078 100644
--- a/extensions/tab-states/ephy-tab-states-extension.c
+++ b/extensions/tab-states/ephy-tab-states-extension.c
@@ -21,15 +21,14 @@
#include "config.h"
-#include "ephy-tab-states-extension.h"
-
-#include <epiphany/epiphany.h>
-
#include "ephy-debug.h"
+#include "ephy-tab-states-extension.h"
-#include <gmodule.h>
#include <gtk/gtk.h>
#include <glib/gi18n-lib.h>
+#include <libpeas/peas.h>
+
+#include <epiphany/epiphany.h>
#define EPHY_TAB_STATES_EXTENSION_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), EPHY_TYPE_TAB_STATES_EXTENSION, EphyTabStatesExtensionPrivate))
@@ -311,3 +310,13 @@ ephy_tab_states_extension_class_init (EphyTabStatesExtensionClass *klass)
g_type_class_add_private (object_class, sizeof (EphyTabStatesExtensionPrivate));
}
+
+G_MODULE_EXPORT void
+peas_register_types (PeasObjectModule *module)
+{
+ ephy_tab_states_extension_register_type (G_TYPE_MODULE (module));
+
+ peas_object_module_register_extension_type (module,
+ EPHY_TYPE_EXTENSION,
+ EPHY_TYPE_TAB_STATES_EXTENSION);
+}
diff --git a/extensions/tab-states/ephy-tab-states-extension.h b/extensions/tab-states/ephy-tab-states-extension.h
index 4ff8f2b..d61015d 100644
--- a/extensions/tab-states/ephy-tab-states-extension.h
+++ b/extensions/tab-states/ephy-tab-states-extension.h
@@ -23,7 +23,7 @@
#define EPHY_TAB_STATES_EXTENSION_H
#include <glib.h>
-#include <glib-object.h>
+#include <libpeas/peas.h>
G_BEGIN_DECLS
@@ -40,20 +40,21 @@ typedef struct _EphyTabStatesExtensionPrivate EphyTabStatesExtensionPrivate;
struct _EphyTabStatesExtensionClass
{
- GObjectClass parent_class;
+ PeasExtensionBaseClass parent_class;
};
struct _EphyTabStatesExtension
{
- GObject parent_instance;
+ PeasExtensionBase parent_instance;
EphyTabStatesExtensionPrivate *priv;
};
GType ephy_tab_states_extension_get_type (void);
-
GType ephy_tab_states_extension_register_type (GTypeModule *module);
+G_MODULE_EXPORT void peas_register_types (PeasObjectModule *module);
+
G_END_DECLS
#endif /* EPHY_TAB_STATES_EXTENSION_H */
diff --git a/extensions/tab-states/tab-states.plugin.in.in b/extensions/tab-states/tab-states.plugin.in.in
new file mode 100644
index 0000000..1de6beb
--- /dev/null
+++ b/extensions/tab-states/tab-states.plugin.in.in
@@ -0,0 +1,7 @@
+[Plugin]
+Module=%LIBRARY%
+IAge=1
+_Name=Tab States
+_Description=Indicates new content in background tabs
+Authors=Christian Persch <chpe gnome org>
+Website=http://www.gnome.org/projects/epiphany/extensions.html
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]