[vlc-devel] commit: Extensions: they can also have a short description ( Jean-Philippe André )

git version control git at videolan.org
Wed Feb 3 17:21:56 CET 2010


vlc | branch: master | Jean-Philippe André <jpeg at videolan.org> | Wed Feb  3 16:08:03 2010 +0100| [5918f43bef4374688a4b5cfe55e802116ea5f7f8] | committer: Jean-Philippe André 

Extensions: they can also have a short description

This is "shortdesc" in the Lua descriptor

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5918f43bef4374688a4b5cfe55e802116ea5f7f8
---

 include/vlc_extensions.h     |    1 +
 modules/misc/lua/extension.c |   12 ++++++++++++
 2 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/include/vlc_extensions.h b/include/vlc_extensions.h
index d43214d..7d94524 100644
--- a/include/vlc_extensions.h
+++ b/include/vlc_extensions.h
@@ -42,6 +42,7 @@ typedef struct extension_t {
     char *psz_version;        /**< Version (ro) */
     char *psz_url;            /**< A URL to the official page (ro) */
     char *psz_description;    /**< Full description (ro) */
+    char *psz_shortdescription; /**< Short description (eg. 1 line)  (ro) */
 
     extension_sys_t *p_sys;   /**< Reserved for the manager module */
 } extension_t;
diff --git a/modules/misc/lua/extension.c b/modules/misc/lua/extension.c
index 5d377a3..87da00c 100644
--- a/modules/misc/lua/extension.c
+++ b/modules/misc/lua/extension.c
@@ -355,6 +355,18 @@ int ScanLuaCallback( vlc_object_t *p_this, const char *psz_script,
             }
             lua_pop( L, 1 );
 
+            /* Get short description */
+            lua_getfield( L, -1, "shortdesc" );
+            if( lua_isstring( L, -1 ) )
+            {
+                p_ext->psz_shortdescription = strdup( luaL_checkstring( L, -1 ) );
+            }
+            else
+            {
+                p_ext->psz_shortdescription = NULL;
+            }
+            lua_pop( L, 1 );
+
             /* Get URL */
             lua_getfield( L, -1, "url" );
             if( lua_isstring( L, -1 ) )




More information about the vlc-devel mailing list