[totem] Cleanup properties plugin definition



commit 456f0245dc61c1ff135a32a41d125c1fb10fd799
Author: Bastien Nocera <hadess hadess net>
Date:   Wed Jun 16 18:42:12 2010 +0100

    Cleanup properties plugin definition

 src/plugins/properties/totem-movie-properties.c |   39 ++--------------------
 1 files changed, 4 insertions(+), 35 deletions(-)
---
diff --git a/src/plugins/properties/totem-movie-properties.c b/src/plugins/properties/totem-movie-properties.c
index f0fe2db..ed678a4 100644
--- a/src/plugins/properties/totem-movie-properties.c
+++ b/src/plugins/properties/totem-movie-properties.c
@@ -37,6 +37,7 @@
 #include <libpeas/peas-activatable.h>
 #include <bacon-video-widget-properties.h>
 
+#include "totem-plugin.h"
 #include "totem.h"
 
 #define TOTEM_TYPE_MOVIE_PROPERTIES_PLUGIN		(totem_movie_properties_plugin_get_type ())
@@ -59,21 +60,11 @@ typedef struct
 	PeasExtensionBaseClass parent_class;
 } TotemMoviePropertiesPluginClass;
 
-
-G_MODULE_EXPORT void peas_register_types		(PeasObjectModule *module);
 GType	totem_movie_properties_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 (TotemMoviePropertiesPlugin,
-				totem_movie_properties_plugin,
-				PEAS_TYPE_EXTENSION_BASE,
-				0,
-				G_IMPLEMENT_INTERFACE_DYNAMIC (PEAS_TYPE_ACTIVATABLE,
-							       peas_activatable_iface_init))
-
+TOTEM_PLUGIN_REGISTER(TOTEM_TYPE_MOVIE_PROPERTIES_PLUGIN,
+		      TotemMoviePropertiesPlugin,
+		      totem_movie_properties_plugin)
 
 static void
 totem_movie_properties_plugin_class_init (TotemMoviePropertiesPluginClass *klass)
@@ -81,18 +72,6 @@ totem_movie_properties_plugin_class_init (TotemMoviePropertiesPluginClass *klass
 }
 
 static void
-totem_movie_properties_plugin_class_finalize (TotemMoviePropertiesPluginClass *klass)
-{
-}
-
-static void
-peas_activatable_iface_init (PeasActivatableInterface *iface)
-{
-	iface->activate = impl_activate;
-	iface->deactivate = impl_deactivate;
-}
-
-static void
 totem_movie_properties_plugin_init (TotemMoviePropertiesPlugin *plugin)
 {
 }
@@ -212,13 +191,3 @@ impl_deactivate	(PeasActivatable *plugin,
 	totem_remove_sidebar_page (totem, "properties");
 }
 
-G_MODULE_EXPORT void
-peas_register_types (PeasObjectModule *module)
-{
-	totem_movie_properties_plugin_register_type (G_TYPE_MODULE (module));
-
-	peas_object_module_register_extension_type (module,
-						    PEAS_TYPE_ACTIVATABLE,
-						    TOTEM_TYPE_MOVIE_PROPERTIES_PLUGIN);
-}
-



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