From b3419984efb0af7b31c9faebb779ee412e3d02f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Tue, 11 Dec 2007 13:44:10 +0100 Subject: Update all post plugins to the new identifier/description interface. Add _() where missing, for i18n. --- src/post/visualizations/fftscope.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'src/post/visualizations/fftscope.c') diff --git a/src/post/visualizations/fftscope.c b/src/post/visualizations/fftscope.c index ba34437f5..6f152f15c 100644 --- a/src/post/visualizations/fftscope.c +++ b/src/post/visualizations/fftscope.c @@ -473,16 +473,6 @@ static post_plugin_t *fftscope_open_plugin(post_class_t *class_gen, int inputs, return &this->post; } -static char *fftscope_get_identifier(post_class_t *class_gen) -{ - return "FFT Scope"; -} - -static char *fftscope_get_description(post_class_t *class_gen) -{ - return "FFT Scope"; -} - static void fftscope_class_dispose(post_class_t *class_gen) { free(class_gen); @@ -497,8 +487,8 @@ void *fftscope_init_plugin(xine_t *xine, void *data) return NULL; class->post_class.open_plugin = fftscope_open_plugin; - class->post_class.get_identifier = fftscope_get_identifier; - class->post_class.get_description = fftscope_get_description; + class->post_class.identifier = "FFT Scope"; + class->post_class.description = _("FFT Scope"); class->post_class.dispose = fftscope_class_dispose; class->xine = xine; -- cgit v1.2.3 From e2a10c5fdaed1f45040fb3d737ab79f0e5d774d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Tue, 11 Dec 2007 14:12:35 +0100 Subject: Use N_() rather than _(), passing the string just once to gettext(). This way the gettext code for description does not need to be repeated by every plugin. --- src/post/visualizations/fftscope.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/post/visualizations/fftscope.c') diff --git a/src/post/visualizations/fftscope.c b/src/post/visualizations/fftscope.c index 6f152f15c..c2756b5f1 100644 --- a/src/post/visualizations/fftscope.c +++ b/src/post/visualizations/fftscope.c @@ -488,7 +488,7 @@ void *fftscope_init_plugin(xine_t *xine, void *data) class->post_class.open_plugin = fftscope_open_plugin; class->post_class.identifier = "FFT Scope"; - class->post_class.description = _("FFT Scope"); + class->post_class.description = N_("FFT Scope"); class->post_class.dispose = fftscope_class_dispose; class->xine = xine; -- cgit v1.2.3 From 32a70cef7fdce1648d6850dafbe78bee04830429 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Tue, 11 Dec 2007 15:40:37 +0100 Subject: Use default_*_class_dispose macro whenever the class dispose function only called free(). --- src/post/visualizations/fftscope.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'src/post/visualizations/fftscope.c') diff --git a/src/post/visualizations/fftscope.c b/src/post/visualizations/fftscope.c index c2756b5f1..917af508d 100644 --- a/src/post/visualizations/fftscope.c +++ b/src/post/visualizations/fftscope.c @@ -473,11 +473,6 @@ static post_plugin_t *fftscope_open_plugin(post_class_t *class_gen, int inputs, return &this->post; } -static void fftscope_class_dispose(post_class_t *class_gen) -{ - free(class_gen); -} - /* plugin class initialization function */ void *fftscope_init_plugin(xine_t *xine, void *data) { @@ -489,7 +484,7 @@ void *fftscope_init_plugin(xine_t *xine, void *data) class->post_class.open_plugin = fftscope_open_plugin; class->post_class.identifier = "FFT Scope"; class->post_class.description = N_("FFT Scope"); - class->post_class.dispose = fftscope_class_dispose; + class->post_class.dispose = default_post_class_dispose; class->xine = xine; -- cgit v1.2.3