[totem] Cleanup lirc plugin definition



commit 6f7212548f6a5c58c3da581d649f6938a64427b5
Author: Bastien Nocera <hadess hadess net>
Date:   Wed Jun 16 18:39:40 2010 +0100

    Cleanup lirc plugin definition

 src/plugins/lirc/totem-lirc.c |   44 +---------------------------------------
 1 files changed, 2 insertions(+), 42 deletions(-)
---
diff --git a/src/plugins/lirc/totem-lirc.c b/src/plugins/lirc/totem-lirc.c
index 5782f48..fe7203c 100644
--- a/src/plugins/lirc/totem-lirc.c
+++ b/src/plugins/lirc/totem-lirc.c
@@ -40,6 +40,7 @@
 #include <unistd.h>
 #include <lirc/lirc_client.h>
 
+#include "totem-plugin.h"
 #include "totem.h"
 #include "totem-dirs.h"
 
@@ -95,40 +96,15 @@ typedef struct
 #define TOTEM_IR_SETTING_TOGGLE_REPEAT "setting_repeat"
 #define TOTEM_IR_SETTING_TOGGLE_SHUFFLE "setting_shuffle"
 
-static void peas_activatable_iface_init		(PeasActivatableInterface *iface);
-G_MODULE_EXPORT void peas_register_types	(PeasObjectModule *module);
 GType	totem_lirc_plugin_get_type		(void) G_GNUC_CONST;
 
 static void totem_lirc_plugin_init		(TotemLircPlugin *plugin);
-static void totem_lirc_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 (TotemLircPlugin,
-				totem_lirc_plugin,
-				PEAS_TYPE_EXTENSION_BASE,
-				0,
-				G_IMPLEMENT_INTERFACE_DYNAMIC (PEAS_TYPE_ACTIVATABLE,
-							       peas_activatable_iface_init))
+TOTEM_PLUGIN_REGISTER(TOTEM_TYPE_LIRC_PLUGIN, TotemLircPlugin, totem_lirc_plugin)
 
 static void
 totem_lirc_plugin_class_init (TotemLircPluginClass *klass)
 {
-	GObjectClass *object_class = G_OBJECT_CLASS (klass);
-
-	object_class->finalize = totem_lirc_plugin_finalize;
-}
-
-static void
-totem_lirc_plugin_class_finalize (TotemLircPluginClass *klass)
-{
-}
-
-static void
-peas_activatable_iface_init (PeasActivatableInterface *iface)
-{
-	iface->activate = impl_activate;
-	iface->deactivate = impl_deactivate;
 }
 
 static void
@@ -136,12 +112,6 @@ totem_lirc_plugin_init (TotemLircPlugin *plugin)
 {
 }
 
-static void
-totem_lirc_plugin_finalize (GObject *object)
-{
-	G_OBJECT_CLASS (totem_lirc_plugin_parent_class)->finalize (object);
-}
-
 static char *
 totem_lirc_get_url (const char *str)
 {
@@ -354,13 +324,3 @@ impl_deactivate (PeasActivatable *plugin,
 	}
 }
 
-G_MODULE_EXPORT void
-peas_register_types (PeasObjectModule *module)
-{
-	totem_lirc_plugin_register_type (G_TYPE_MODULE (module));
-
-	peas_object_module_register_extension_type (module,
-						    PEAS_TYPE_ACTIVATABLE,
-						    TOTEM_TYPE_LIRC_PLUGIN);
-}
-



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