From 78fc25b90a9659048ba3a9a178a45a3e536765f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Tue, 11 Dec 2007 13:26:26 +0100 Subject: Update all misc plugins to the new identifier/description interface. Add _() where missing, for i18n. --- src/vdr/input_vdr.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'src/vdr/input_vdr.c') diff --git a/src/vdr/input_vdr.c b/src/vdr/input_vdr.c index 069eb734a..9a1ec0f8e 100644 --- a/src/vdr/input_vdr.c +++ b/src/vdr/input_vdr.c @@ -2628,16 +2628,6 @@ static input_plugin_t *vdr_class_get_instance(input_class_t *cls_gen, xine_strea * vdr input plugin class stuff */ -static const char *vdr_class_get_description(input_class_t *this_gen) -{ - return _("VDR display device plugin"); -} - -static const char *vdr_class_get_identifier (input_class_t *this_gen) -{ - return "VDR"; -} - static void vdr_class_dispose (input_class_t *this_gen) { vdr_input_class_t *this = (vdr_input_class_t *)this_gen; @@ -2668,8 +2658,8 @@ static void *init_class(xine_t *xine, void *data) this->mrls[ 1 ] = 0; this->input_class.get_instance = vdr_class_get_instance; - this->input_class.get_identifier = vdr_class_get_identifier; - this->input_class.get_description = vdr_class_get_description; + this->input_class.identifier = "VDR"; + this->input_class.description = _("VDR display device plugin"); this->input_class.get_dir = NULL; this->input_class.get_autoplay_list = vdr_class_get_autoplay_list; this->input_class.dispose = vdr_class_dispose; -- 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/vdr/input_vdr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/vdr/input_vdr.c') diff --git a/src/vdr/input_vdr.c b/src/vdr/input_vdr.c index 9a1ec0f8e..6a49eafce 100644 --- a/src/vdr/input_vdr.c +++ b/src/vdr/input_vdr.c @@ -2659,7 +2659,7 @@ static void *init_class(xine_t *xine, void *data) this->input_class.get_instance = vdr_class_get_instance; this->input_class.identifier = "VDR"; - this->input_class.description = _("VDR display device plugin"); + this->input_class.description = N_("VDR display device plugin"); this->input_class.get_dir = NULL; this->input_class.get_autoplay_list = vdr_class_get_autoplay_list; this->input_class.dispose = vdr_class_dispose; -- 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/vdr/input_vdr.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'src/vdr/input_vdr.c') diff --git a/src/vdr/input_vdr.c b/src/vdr/input_vdr.c index 6a49eafce..c07ae2d18 100644 --- a/src/vdr/input_vdr.c +++ b/src/vdr/input_vdr.c @@ -2627,14 +2627,6 @@ static input_plugin_t *vdr_class_get_instance(input_class_t *cls_gen, xine_strea /* * vdr input plugin class stuff */ - -static void vdr_class_dispose (input_class_t *this_gen) -{ - vdr_input_class_t *this = (vdr_input_class_t *)this_gen; - - free(this); -} - static char **vdr_class_get_autoplay_list(input_class_t *this_gen, int *num_files) { @@ -2662,7 +2654,7 @@ static void *init_class(xine_t *xine, void *data) this->input_class.description = N_("VDR display device plugin"); this->input_class.get_dir = NULL; this->input_class.get_autoplay_list = vdr_class_get_autoplay_list; - this->input_class.dispose = vdr_class_dispose; + this->input_class.dispose = default_input_class_dispose; this->input_class.eject_media = NULL; return this; -- cgit v1.2.3 From b803c2268c144475f4037677b2eea20f364e35b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Tue, 11 Dec 2007 18:07:02 +0100 Subject: Bump the input plugins interface version to 18 as they got updated. --- src/vdr/input_vdr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/vdr/input_vdr.c') diff --git a/src/vdr/input_vdr.c b/src/vdr/input_vdr.c index c07ae2d18..946e963a3 100644 --- a/src/vdr/input_vdr.c +++ b/src/vdr/input_vdr.c @@ -2667,7 +2667,7 @@ static void *init_class(xine_t *xine, void *data) const plugin_info_t xine_plugin_info[] EXPORTED = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_INPUT, 17, "VDR", XINE_VERSION_CODE, NULL, init_class }, + { PLUGIN_INPUT, 18, "VDR", XINE_VERSION_CODE, NULL, init_class }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; -- cgit v1.2.3