[totem] Cleanup thumbnail plugin definition



commit 7b87251597b49210ed4778aca6d4ebdf47aa8bed
Author: Bastien Nocera <hadess hadess net>
Date:   Wed Jun 16 18:50:56 2010 +0100

    Cleanup thumbnail plugin definition

 src/plugins/thumbnail/totem-thumbnail.c |   34 +-----------------------------
 1 files changed, 2 insertions(+), 32 deletions(-)
---
diff --git a/src/plugins/thumbnail/totem-thumbnail.c b/src/plugins/thumbnail/totem-thumbnail.c
index f592527..7d244c4 100644
--- a/src/plugins/thumbnail/totem-thumbnail.c
+++ b/src/plugins/thumbnail/totem-thumbnail.c
@@ -36,6 +36,7 @@
 #include <gmodule.h>
 #include <string.h>
 
+#include "totem-plugin.h"
 #include "totem.h"
 
 #define TOTEM_TYPE_THUMBNAIL_PLUGIN		(totem_thumbnail_plugin_get_type ())
@@ -64,19 +65,9 @@ typedef struct
 	PeasExtensionBaseClass parent_class;
 } TotemThumbnailPluginClass;
 
-G_MODULE_EXPORT void peas_register_types	(PeasObjectModule *module);
 GType totem_thumbnail_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 (TotemThumbnailPlugin,
-				totem_thumbnail_plugin,
-				PEAS_TYPE_EXTENSION_BASE,
-				0,
-				G_IMPLEMENT_INTERFACE_DYNAMIC (PEAS_TYPE_ACTIVATABLE,
-							       peas_activatable_iface_init))
+TOTEM_PLUGIN_REGISTER(TOTEM_TYPE_THUMBNAIL_PLUGIN, TotemThumbnailPlugin, totem_thumbnail_plugin)
 
 static void
 totem_thumbnail_plugin_class_init (TotemThumbnailPluginClass *klass)
@@ -93,18 +84,6 @@ totem_thumbnail_plugin_init (TotemThumbnailPlugin *plugin)
 }
 
 static void
-peas_activatable_iface_init (PeasActivatableInterface *iface)
-{
-	iface->activate = impl_activate;
-	iface->deactivate = impl_deactivate;
-}
-
-static void
-totem_thumbnail_plugin_class_finalize (TotemThumbnailPluginClass *klass)
-{
-}
-
-static void
 set_icon_to_default (TotemObject *totem)
 {
 	GtkWindow *window = NULL;
@@ -229,12 +208,3 @@ impl_deactivate (PeasActivatable *plugin,
 	set_icon_to_default (totem);
 }
 
-G_MODULE_EXPORT void
-peas_register_types (PeasObjectModule *module)
-{
-	totem_thumbnail_plugin_register_type (G_TYPE_MODULE (module));
-
-	peas_object_module_register_extension_type (module,
-						    PEAS_TYPE_ACTIVATABLE,
-						    TOTEM_TYPE_THUMBNAIL_PLUGIN);
-}



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