[totem] Cleanup screenshot plugin definition



commit 79b94e1b7d53ad1dced46e6c60453179ea61c2ae
Author: Bastien Nocera <hadess hadess net>
Date:   Wed Jun 16 18:45:59 2010 +0100

    Cleanup screenshot plugin definition

 src/plugins/screenshot/totem-screenshot-plugin.c |   36 ++-------------------
 src/plugins/screenshot/totem-screenshot-plugin.h |    1 -
 2 files changed, 4 insertions(+), 33 deletions(-)
---
diff --git a/src/plugins/screenshot/totem-screenshot-plugin.c b/src/plugins/screenshot/totem-screenshot-plugin.c
index 38fd4d7..3ee93a8 100644
--- a/src/plugins/screenshot/totem-screenshot-plugin.c
+++ b/src/plugins/screenshot/totem-screenshot-plugin.c
@@ -38,6 +38,7 @@
 #include <X11/XF86keysym.h>
 #endif
 
+#include "totem-plugin.h"
 #include "totem-screenshot-plugin.h"
 #include "totem-screenshot.h"
 #include "totem-gallery.h"
@@ -59,16 +60,9 @@ struct TotemScreenshotPluginPrivate {
 	GtkActionGroup *action_group;
 };
 
-static void peas_activatable_iface_init			(PeasActivatableInterface *iface);
-static void impl_activate				(PeasActivatable *plugin, GObject *totem);
-static void impl_deactivate				(PeasActivatable *plugin, GObject *totem);
-
-G_DEFINE_DYNAMIC_TYPE_EXTENDED (TotemScreenshotPlugin,
-				totem_screenshot_plugin,
-				PEAS_TYPE_EXTENSION_BASE,
-				0,
-				G_IMPLEMENT_INTERFACE_DYNAMIC (PEAS_TYPE_ACTIVATABLE,
-							       peas_activatable_iface_init))
+TOTEM_PLUGIN_REGISTER(TOTEM_TYPE_SCREENSHOT_PLUGIN,
+		      TotemScreenshotPlugin,
+		      totem_screenshot_plugin)
 
 static void
 totem_screenshot_plugin_class_init (TotemScreenshotPluginClass *klass)
@@ -77,13 +71,6 @@ totem_screenshot_plugin_class_init (TotemScreenshotPluginClass *klass)
 }
 
 static void
-peas_activatable_iface_init (PeasActivatableInterface *iface)
-{
-	iface->activate = impl_activate;
-	iface->deactivate = impl_deactivate;
-}
-
-static void
 totem_screenshot_plugin_init (TotemScreenshotPlugin *plugin)
 {
 	plugin->priv = G_TYPE_INSTANCE_GET_PRIVATE (plugin,
@@ -92,11 +79,6 @@ totem_screenshot_plugin_init (TotemScreenshotPlugin *plugin)
 }
 
 static void
-totem_screenshot_plugin_class_finalize (TotemScreenshotPluginClass *klass)
-{
-}
-
-static void
 take_screenshot_action_cb (GtkAction *action, TotemScreenshotPlugin *self)
 {
 	TotemScreenshotPluginPrivate *priv = self->priv;
@@ -389,13 +371,3 @@ totem_screenshot_plugin_update_file_chooser (const char *uri)
 	g_free (dir);
 }
 
-G_MODULE_EXPORT void
-peas_register_types (PeasObjectModule *module)
-{
-	totem_screenshot_plugin_register_type (G_TYPE_MODULE (module));
-
-	peas_object_module_register_extension_type (module,
-						    PEAS_TYPE_ACTIVATABLE,
-						    TOTEM_TYPE_SCREENSHOT_PLUGIN);
-}
-
diff --git a/src/plugins/screenshot/totem-screenshot-plugin.h b/src/plugins/screenshot/totem-screenshot-plugin.h
index 8d0d946..4f0c48e 100644
--- a/src/plugins/screenshot/totem-screenshot-plugin.h
+++ b/src/plugins/screenshot/totem-screenshot-plugin.h
@@ -55,7 +55,6 @@ typedef struct {
 } TotemScreenshotPluginClass;
 
 GType totem_screenshot_plugin_get_type (void) G_GNUC_CONST;
-G_MODULE_EXPORT void peas_register_types (PeasObjectModule *module);
 
 gchar *totem_screenshot_plugin_setup_file_chooser (const char *filename_format, const char *movie_name) G_GNUC_WARN_UNUSED_RESULT;
 void totem_screenshot_plugin_update_file_chooser (const char *filename);



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