[totem] Cleanup ontop plugin definition
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem] Cleanup ontop plugin definition
- Date: Wed, 16 Jun 2010 17:51:32 +0000 (UTC)
commit b499ea75220788d6b1a155466af6c104a1c81108
Author: Bastien Nocera <hadess hadess net>
Date: Wed Jun 16 18:40:50 2010 +0100
Cleanup ontop plugin definition
src/plugins/ontop/totem-ontop.c | 35 ++---------------------------------
1 files changed, 2 insertions(+), 33 deletions(-)
---
diff --git a/src/plugins/ontop/totem-ontop.c b/src/plugins/ontop/totem-ontop.c
index eb7a79d..c62e169 100644
--- a/src/plugins/ontop/totem-ontop.c
+++ b/src/plugins/ontop/totem-ontop.c
@@ -34,6 +34,7 @@
#include <libpeas/peas-object-module.h>
#include <libpeas/peas-activatable.h>
+#include "totem-plugin.h"
#include "totem.h"
#include "backend/bacon-video-widget.h"
@@ -64,26 +65,9 @@ typedef struct
PeasExtensionBaseClass parent_class;
} TotemOntopPluginClass;
-G_MODULE_EXPORT void peas_register_types (PeasObjectModule *module);
GType totem_ontop_plugin_get_type (void) G_GNUC_CONST;
-static void peas_activatable_iface_init (PeasActivatableInterface *iface);
-static void impl_activate (PeasActivatable *plugin, GObject *object);
-static void impl_deactivate (PeasActivatable *plugin, GObject *object);
-
-G_DEFINE_DYNAMIC_TYPE_EXTENDED (TotemOntopPlugin,
- totem_ontop_plugin,
- PEAS_TYPE_EXTENSION_BASE,
- 0,
- G_IMPLEMENT_INTERFACE_DYNAMIC (PEAS_TYPE_ACTIVATABLE,
- peas_activatable_iface_init))
-
-static void
-peas_activatable_iface_init (PeasActivatableInterface *iface)
-{
- iface->activate = impl_activate;
- iface->deactivate = impl_deactivate;
-}
+TOTEM_PLUGIN_REGISTER(TOTEM_TYPE_ONTOP_PLUGIN, TotemOntopPlugin, totem_ontop_plugin)
static void
totem_ontop_plugin_class_init (TotemOntopPluginClass *klass)
@@ -92,11 +76,6 @@ totem_ontop_plugin_class_init (TotemOntopPluginClass *klass)
}
static void
-totem_ontop_plugin_class_finalize (TotemOntopPluginClass *klass)
-{
-}
-
-static void
totem_ontop_plugin_init (TotemOntopPlugin *plugin)
{
plugin->priv = G_TYPE_INSTANCE_GET_PRIVATE (plugin, TOTEM_TYPE_ONTOP_PLUGIN, TotemOntopPluginPrivate);
@@ -170,13 +149,3 @@ impl_deactivate (PeasActivatable *plugin,
g_object_unref (pi->priv->window);
}
-G_MODULE_EXPORT void
-peas_register_types (PeasObjectModule *module)
-{
- totem_ontop_plugin_register_type (G_TYPE_MODULE (module));
-
- peas_object_module_register_extension_type (module,
- PEAS_TYPE_ACTIVATABLE,
- TOTEM_TYPE_ONTOP_PLUGIN);
-}
-
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]