]> git.sesse.net Git - vlc/blobdiff - src/libvlc-module.c
A lot of missing const in options lists
[vlc] / src / libvlc-module.c
index acc625d4594cfb0c57e3bb1561b086d8f5d7189d..abc6fa9aaeeffa93f6b71e5bff407dabd34faeb3 100644 (file)
@@ -35,6 +35,7 @@
 #endif
 
 #include <vlc/vlc.h>
+#include <vlc_plugin.h>
 #include "libvlc.h"
 
 //#define Nothing here, this is just to prevent update-po from being stupid
@@ -42,7 +43,7 @@
 #include "vlc_meta.h"
 
 #if defined (WIN32) || defined (__APPLE__)
-static const char *ppsz_language[] =
+static const char *const ppsz_language[] =
 {
     "auto",
     "en",
@@ -78,7 +79,7 @@ static const char *ppsz_language[] =
     "tr"
 };
 
-static const char *ppsz_language_text[] =
+static const char *const ppsz_language_text[] =
 {
     N_("Auto"),
     N_("American English"),
@@ -115,7 +116,7 @@ static const char *ppsz_language_text[] =
 };
 #endif
 
-static const char *ppsz_snap_formats[] =
+static const char *const ppsz_snap_formats[] =
 { "png", "jpg" };
 
 /*****************************************************************************
@@ -215,8 +216,10 @@ static const char *ppsz_snap_formats[] =
     "You can completely disable the audio output. The audio " \
     "decoding stage will not take place, thus saving some processing power.")
 
+#if 0
 #define MONO_TEXT N_("Force mono audio")
 #define MONO_LONGTEXT N_("This will force a mono audio output.")
+#endif
 
 #define VOLUME_TEXT N_("Default audio volume")
 #define VOLUME_LONGTEXT N_( \
@@ -269,8 +272,9 @@ static const char *ppsz_snap_formats[] =
     "not actually encoded with Dolby Surround, turning on this option might "\
     "enhance your experience, especially when combined with the Headphone "\
     "Channel Mixer." )
-static int pi_force_dolby_values[] = { 0, 1, 2 };
-static const char *ppsz_force_dolby_descriptions[] = { N_("Auto"), N_("On"), N_("Off") };
+static const int pi_force_dolby_values[] = { 0, 1, 2 };
+static const char *const ppsz_force_dolby_descriptions[] = {
+    N_("Auto"), N_("On"), N_("Off") };
 
 
 #define AUDIO_FILTER_TEXT N_("Audio filters")
@@ -301,8 +305,10 @@ static const char *ppsz_force_dolby_descriptions[] = { N_("Auto"), N_("On"), N_(
 #define AUDIO_REPLAY_GAIN_PEAK_PROTECTION_LONGTEXT N_( \
     "Protect against sound clipping" )
 
-static const char *ppsz_replay_gain_mode[] = { "none", "track", "album" };
-static const char *ppsz_replay_gain_mode_text[] = { N_("None"), N_("Track"), N_("Album") };
+static const char *const ppsz_replay_gain_mode[] = {
+    "none", "track", "album" };
+static const char *const ppsz_replay_gain_mode_text[] = {
+    N_("None"), N_("Track"), N_("Album") };
 
 /*****************************************************************************
  * Video
@@ -356,8 +362,8 @@ static const char *ppsz_replay_gain_mode_text[] = { N_("None"), N_("Track"), N_(
     "Enforce the alignment of the video in its window. By default (0) it " \
     "will be centered (0=center, 1=left, 2=right, 4=top, 8=bottom, you can " \
     "also use combinations of these values, like 6=4+2 meaning top-right).")
-static int pi_align_values[] = { 0, 1, 2, 4, 8, 5, 6, 9, 10 };
-static const char *ppsz_align_descriptions[] =
+static const int pi_align_values[] = { 0, 1, 2, 4, 8, 5, 6, 9, 10 };
+static const char *const ppsz_align_descriptions[] =
 { N_("Center"), N_("Left"), N_("Right"), N_("Top"), N_("Bottom"),
   N_("Top-Left"), N_("Top-Right"), N_("Bottom-Left"), N_("Bottom-Right") };
 
@@ -405,8 +411,8 @@ static const char *ppsz_align_descriptions[] =
     "Hide mouse cursor and fullscreen controller after " \
     "n miliseconds, default is 3000 ms (3 sec.)")
 
-static int pi_pos_values[] = { 0, 1, 2, 4, 8, 5, 6, 9, 10 };
-static const char *ppsz_pos_descriptions[] =
+static const int pi_pos_values[] = { 0, 1, 2, 4, 8, 5, 6, 9, 10 };
+static const char *const ppsz_pos_descriptions[] =
 { N_("Center"), N_("Left"), N_("Right"), N_("Top"), N_("Bottom"),
   N_("Top-Left"), N_("Top-Right"), N_("Bottom-Left"), N_("Bottom-Right") };
 
@@ -545,8 +551,8 @@ static const char *ppsz_pos_descriptions[] =
         "synchronise clocks for server and client. The detailed settings " \
         "are available in Advanced / Network Sync." )
 
-static int pi_clock_values[] = { -1, 0, 1 };
-static const char *ppsz_clock_descriptions[] =
+static const int pi_clock_values[] = { -1, 0, 1 };
+static const char *const ppsz_clock_descriptions[] =
 { N_("Default"), N_("Disable"), N_("Enable") };
 
 #define SERVER_PORT_TEXT N_("UDP port")
@@ -1074,19 +1080,14 @@ static const char *ppsz_clock_descriptions[] =
     "Automatically preparse files added to the playlist " \
     "(to retrieve some metadata)." )
 
-#define FETCH_META_TEXT N_( "Authorise meta information fetching" )
-#define FETCH_META_LONGTEXT N_( \
-    "Specify if you want to attempt to fetch files'"\
-    "meta informations using the network." )
-
 #define ALBUM_ART_TEXT N_( "Album art policy" )
 #define ALBUM_ART_LONGTEXT N_( \
     "Choose how album art will be downloaded." )
 
-static int pi_albumart_values[] = { ALBUM_ART_WHEN_ASKED,
-                                    ALBUM_ART_WHEN_PLAYED,
-                                    ALBUM_ART_ALL };
-static const char *ppsz_albumart_descriptions[] =
+static const int pi_albumart_values[] = { ALBUM_ART_WHEN_ASKED,
+                                          ALBUM_ART_WHEN_PLAYED,
+                                          ALBUM_ART_ALL };
+static const char *const ppsz_albumart_descriptions[] =
     { N_("Manual download only"),
       N_("When track starts playing"),
       N_("As soon as track is added") };
@@ -1121,14 +1122,10 @@ static const char *ppsz_albumart_descriptions[] =
     "The media library is automatically saved and reloaded each time you " \
     "start VLC." )
 
-#define PLTREE_TEXT N_("Use playlist tree")
+#define PLTREE_TEXT N_("Display playlist tree")
 #define PLTREE_LONGTEXT N_( \
     "The playlist can use a tree to categorize some items, like the " \
-    "contents of a directory. \"Default\" means that the tree will only " \
-    "be used when really needed." )
-static int pi_pltree_values[] = { 0, 1, 2 };
-static const char *ppsz_pltree_descriptions[] = { N_("Default"), N_("Always"), N_("Never") };
-
+    "contents of a directory." )
 
 
 /*****************************************************************************
@@ -1701,7 +1698,7 @@ vlc_module_begin();
 
     set_subcategory( SUBCAT_INPUT_ACCESS );
     add_category_hint( N_("Input"), INPUT_CAT_LONGTEXT , false );
-    add_module( "access", "access2", NULL, NULL, ACCESS_TEXT,
+    add_module( "access", "access", NULL, NULL, ACCESS_TEXT,
                 ACCESS_LONGTEXT, true );
 
     set_subcategory( SUBCAT_INPUT_ACCESS_FILTER );
@@ -1868,9 +1865,7 @@ vlc_module_begin();
     add_bool( "play-and-exit", 0, NULL, PAE_TEXT, PAE_LONGTEXT, false );
     add_bool( "play-and-stop", 0, NULL, PAS_TEXT, PAS_LONGTEXT, false );
     add_bool( "media-library", 1, NULL, ML_TEXT, ML_LONGTEXT, false );
-    add_integer( "playlist-tree", 0, NULL, PLTREE_TEXT, PLTREE_LONGTEXT,
-                 true );
-        change_integer_list( pi_pltree_values, ppsz_pltree_descriptions, 0 );
+    add_bool( "playlist-tree", 0, NULL, PLTREE_TEXT, PLTREE_LONGTEXT, false );
 
     add_string( "open", "", NULL, OPEN_TEXT, OPEN_LONGTEXT, false );
         change_need_restart();
@@ -1878,9 +1873,6 @@ vlc_module_begin();
     add_bool( "auto-preparse", true, NULL, PREPARSE_TEXT,
               PREPARSE_LONGTEXT, false );
 
-    add_integer( "fetch-meta", true, NULL, FETCH_META_TEXT,
-                 FETCH_META_LONGTEXT, false );
-
     add_integer( "album-art", ALBUM_ART_WHEN_ASKED, NULL, ALBUM_ART_TEXT,
                  ALBUM_ART_LONGTEXT, false );
         change_integer_list( pi_albumart_values,