[totem] Cleanup skipto plugin definition



commit d3b431fc06d9b8c418a43e580d1dce87f7bbd0a0
Author: Bastien Nocera <hadess hadess net>
Date:   Wed Jun 16 18:49:27 2010 +0100

    Cleanup skipto plugin definition

 src/plugins/skipto/totem-skipto-plugin.c |   39 ++---------------------------
 src/plugins/skipto/totem-skipto-plugin.h |    2 -
 2 files changed, 3 insertions(+), 38 deletions(-)
---
diff --git a/src/plugins/skipto/totem-skipto-plugin.c b/src/plugins/skipto/totem-skipto-plugin.c
index f9df72c..d167161 100644
--- a/src/plugins/skipto/totem-skipto-plugin.c
+++ b/src/plugins/skipto/totem-skipto-plugin.c
@@ -35,7 +35,7 @@
 #include <gdk/gdkkeysyms.h>
 #include <libpeas/peas-activatable.h>
 
-
+#include "totem-plugin.h"
 #include "totem-skipto-plugin.h"
 #include "totem-skipto.h"
 
@@ -49,20 +49,9 @@ struct TotemSkiptoPluginPrivate
 	GtkActionGroup	*action_group;
 };
 
-G_MODULE_EXPORT void peas_register_types		(PeasObjectModule *module);
-static void peas_activatable_iface_init			(PeasActivatableInterface *iface);
-
-static void totem_skipto_plugin_finalize		(GObject *object);
-static void impl_activate				(PeasActivatable *plugin, GObject *object);
-static void impl_deactivate				(PeasActivatable *plugin, GObject *object);
-
-G_DEFINE_DYNAMIC_TYPE_EXTENDED (TotemSkiptoPlugin,
-				totem_skipto_plugin,
-				PEAS_TYPE_EXTENSION_BASE,
-				0,
-				G_IMPLEMENT_INTERFACE_DYNAMIC (PEAS_TYPE_ACTIVATABLE,
-							       peas_activatable_iface_init))
+static void totem_skipto_plugin_finalize (GObject *object);
 
+TOTEM_PLUGIN_REGISTER(TOTEM_TYPE_SKIPTO_PLUGIN, TotemSkiptoPlugin, totem_skipto_plugin)
 
 static void
 totem_skipto_plugin_class_init (TotemSkiptoPluginClass *klass)
@@ -74,13 +63,6 @@ totem_skipto_plugin_class_init (TotemSkiptoPluginClass *klass)
 	object_class->finalize = totem_skipto_plugin_finalize;
 }
 static void
-peas_activatable_iface_init (PeasActivatableInterface *iface)
-{
-	iface->activate = impl_activate;
-	iface->deactivate = impl_deactivate;
-}
-
-static void
 totem_skipto_plugin_init (TotemSkiptoPlugin *plugin)
 {
 	plugin->priv = G_TYPE_INSTANCE_GET_PRIVATE (plugin,
@@ -90,11 +72,6 @@ totem_skipto_plugin_init (TotemSkiptoPlugin *plugin)
 }
 
 static void
-totem_skipto_plugin_class_finalize (TotemSkiptoPluginClass *klass)
-{
-}
-
-static void
 destroy_dialog (TotemSkiptoPlugin *plugin)
 {
 	TotemSkiptoPluginPrivate *priv = plugin->priv;
@@ -296,13 +273,3 @@ impl_deactivate	(PeasActivatable *plugin,
 	gtk_ui_manager_remove_action_group (manager, priv->action_group);
 }
 
-G_MODULE_EXPORT void
-peas_register_types (PeasObjectModule *module)
-{
-	totem_skipto_plugin_register_type (G_TYPE_MODULE (module));
-
-	peas_object_module_register_extension_type (module,
-						    PEAS_TYPE_ACTIVATABLE,
-						    TOTEM_TYPE_SKIPTO_PLUGIN);
-}
-
diff --git a/src/plugins/skipto/totem-skipto-plugin.h b/src/plugins/skipto/totem-skipto-plugin.h
index f29d788..d84c916 100644
--- a/src/plugins/skipto/totem-skipto-plugin.h
+++ b/src/plugins/skipto/totem-skipto-plugin.h
@@ -35,7 +35,6 @@
 #include <libpeas/peas-object-module.h>
 
 #include "totem.h"
-#include "totem-plugin.h"
 
 G_BEGIN_DECLS
 
@@ -62,7 +61,6 @@ typedef struct
 } TotemSkiptoPluginClass;
 
 GType totem_skipto_plugin_get_type			(void) G_GNUC_CONST;
-G_MODULE_EXPORT void peas_register_types		(PeasObjectModule *module);
 
 G_END_DECLS
 



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