]> git.sesse.net Git - vlc/commitdiff
Fix a bug with preferences
authorClément Stenac <zorglub@videolan.org>
Thu, 16 Dec 2004 16:35:12 +0000 (16:35 +0000)
committerClément Stenac <zorglub@videolan.org>
Thu, 16 Dec 2004 16:35:12 +0000 (16:35 +0000)
Added some more names
Use shortname to store the name

26 files changed:
include/modules.h
include/modules_inner.h
modules/access/cdda/cdda.c
modules/access/screen/screen.c
modules/access_output/dummy.c
modules/access_output/file.c
modules/access_output/http.c
modules/access_output/udp.c
modules/audio_filter/equalizer.c
modules/audio_filter/normvol.c
modules/gui/wxwindows/preferences.cpp
modules/misc/rtsp.c
modules/video_filter/adjust.c
modules/video_filter/clone.c
modules/video_filter/crop.c
modules/video_filter/distort.c
modules/video_filter/invert.c
modules/video_filter/logo.c
modules/video_filter/marq.c [changed mode: 0755->0644]
modules/video_filter/time.c
modules/video_filter/transform.c
modules/video_filter/wall.c
modules/visualization/visual/fft.c
modules/visualization/visual/fft.h
modules/visualization/visual/visual.h
src/misc/modules.c

index 93d084ae92cc08399594a93008aa20ae271e1620..cc709908f8bcc27150b0344c27b621ef6f4186ec 100644 (file)
@@ -84,7 +84,6 @@ struct module_t
      * Variables set by the module to identify itself
      */
     char *psz_shortname;                                      /* Module name */
-    char *psz_name;                              /* Human-readable shortname */
     char *psz_longname;                           /* Module descriptive name */
 
     /*
index 3d2847987ca35038382a839d47807c0daf676930..8a408515b4211af3413b53268e7540a5c466bcfa 100644 (file)
@@ -99,8 +99,7 @@
         p_module->b_unloadable = VLC_TRUE;                                    \
         p_module->b_reentrant = VLC_TRUE;                                     \
         p_module->psz_object_name = MODULE_STRING;                            \
-        p_module->psz_shortname = MODULE_STRING;                              \
-        p_module->psz_name = NULL;                                            \
+        p_module->psz_shortname = NULL;                                       \
         p_module->psz_longname = MODULE_STRING;                               \
         p_module->pp_shortcuts[ 0 ] = MODULE_STRING;                          \
         p_module->i_cpu = 0;                                                  \
 #define set_shortname( desc )                                                 \
     p_submodule->psz_shortname = desc
 
-#define set_name( desc )                                                      \
-    p_submodule->psz_name = desc
-
 #define set_description( desc )                                               \
     p_submodule->psz_longname = desc
 
index 7883806f01e064cdfb3ef0366a431ac10b43936f..4450373eecd27771afe9524c8b97ba46b40011cf 100644 (file)
@@ -98,6 +98,7 @@ vlc_module_begin();
     add_usage_hint( N_("cddax://[device-or-file][@[T]track]") );
     set_description( _("Compact Disc Digital Audio (CD-DA) input") );
     set_capability( "access2", 10 /* compare with priority of cdda */ );
+    set_shortname( N_("Audio CD"));
     set_callbacks( E_(CDDAOpen), E_(CDDAClose) );
     add_shortcut( "cddax" );
     add_shortcut( "cd" );
index 8159a0af8eaa4fb6ed599e98ebdeec57dd29e0b1..b451e0fc47aaa83f10edd36acc30b4c632e904b0 100644 (file)
@@ -60,6 +60,7 @@ static void Close( vlc_object_t * );
 
 vlc_module_begin();
     set_description( _("Screen Input") );
+    set_shortname( N_("Screen" ));
     set_category( CAT_INPUT );
     set_subcategory( SUBCAT_INPUT_ACCESS );
 
index ca6b4045638e3c7276ab3aba3e3734b3cb410fb5..d19365f5edca576b437d5fccb51f4b0227f6bd31 100644 (file)
@@ -38,6 +38,7 @@ static void Close( vlc_object_t * );
 
 vlc_module_begin();
     set_description( _("Dummy stream output") );
+    set_shortname( N_( "Dummy" ));
     set_capability( "sout access", 0 );
     set_category( CAT_SOUT );
     set_subcategory( SUBCAT_SOUT_ACO );
index 62a1e6d15b6a1109ac53f4746dc926725841d3c7..9131a4515a3624f6213a7ec8c940619588674bc4 100644 (file)
@@ -65,6 +65,7 @@ static void Close( vlc_object_t * );
 
 vlc_module_begin();
     set_description( _("File stream output") );
+    set_shortname( N_("File" ));
     set_capability( "sout access", 50 );
     set_category( CAT_SOUT );
     set_subcategory( SUBCAT_SOUT_ACO );
index 2446e650cd34c9b9adb1d9ad27c4d0911cac9403..0de31cf4630201f325271ddda508c11b4bd77d28 100644 (file)
@@ -74,6 +74,7 @@ static void Close( vlc_object_t * );
 vlc_module_begin();
     set_description( _("HTTP stream output") );
     set_capability( "sout access", 0 );
+    set_shortname( N_("HTTP" ) );
     add_shortcut( "http" );
     add_shortcut( "https" );
     add_shortcut( "mmsh" );
index a6d471826bec61b039c3e98473feb9b4da225794..ca9ea83266e744857a48ba3a0589c8af4c0554a2 100644 (file)
@@ -87,6 +87,7 @@ static void Close( vlc_object_t * );
 
 vlc_module_begin();
     set_description( _("UDP stream output") );
+    set_shortname( N_( "UDP" ) );
     set_category( CAT_SOUT );
     set_subcategory( SUBCAT_SOUT_ACO );
     add_integer( SOUT_CFG_PREFIX "caching", DEFAULT_PTS_DELAY / 1000, NULL, CACHING_TEXT, CACHING_LONGTEXT, VLC_TRUE );
index ee610ffb1e263c0284f6748646864581bb484365..2433b708d5adc8791ace4c5e677d6ecc2ce77338 100644 (file)
@@ -63,6 +63,7 @@ static void Close( vlc_object_t * );
 
 vlc_module_begin();
     set_description( _("Equalizer 10 bands") );
+    set_shortname( N_("Equalizer" ) );
     set_capability( "audio filter", 0 );
     set_category( CAT_AUDIO );
     set_subcategory( SUBCAT_AUDIO_AFILTER );
index 57bd97a804a9ce2c49f2c7454a100244f6a10233..ec4d79ac5194a08e4f71a5eef0b055a999f38473 100644 (file)
@@ -80,6 +80,7 @@ typedef struct aout_filter_sys_t
 
 vlc_module_begin();
     set_description( _("Volume normalizer") );
+    set_shortname( N_("Volume normalizer") );
     set_category( CAT_AUDIO );
     set_subcategory( SUBCAT_AUDIO_AFILTER );
     add_shortcut( "volnorm" );
index e910c92436339ff897e9361b98904306d24a21d4..cd8a48689bc7d6f71881a850d67be987891b6d17 100644 (file)
@@ -131,6 +131,7 @@ public:
     wxBoxSizer *sizer;
 
     int i_object_id;
+    int i_subcat_id;
     int i_type;
     char *psz_name;
     char *psz_help;
@@ -302,7 +303,7 @@ void PrefsDialog::OnAdvanced( wxCommandEvent& event )
 PrefsTreeCtrl::PrefsTreeCtrl( wxWindow *_p_parent, intf_thread_t *_p_intf,
                               PrefsDialog *_p_prefs_dialog,
                               wxBoxSizer *_p_sizer )
-  : wxTreeCtrl( _p_parent, PrefsTree_Ctrl, wxDefaultPosition, wxDefaultSize,
+  : wxTreeCtrl( _p_parent, PrefsTree_Ctrl, wxDefaultPosition, wxSize(200,-1),
                 wxTR_NO_LINES | wxTR_FULL_ROW_HIGHLIGHT |
                 wxTR_LINES_AT_ROOT | wxTR_HIDE_ROOT |
                 wxTR_HAS_BUTTONS | wxTR_TWIST_BUTTONS | wxSUNKEN_BORDER )
@@ -376,7 +377,7 @@ PrefsTreeCtrl::PrefsTreeCtrl( wxWindow *_p_parent, intf_thread_t *_p_intf,
                     ConfigTreeData *cd = (ConfigTreeData *)
                                             GetItemData( current_item );
                     cd->i_type = TYPE_CATSUBCAT;
-                    cd->i_object_id = p_item->i_value;
+                    cd->i_subcat_id = p_item->i_value;
                     if( cd->psz_name ) free( cd->psz_name );
                     cd->psz_name = strdup(  config_CategoryNameGet(
                                                       p_item->i_value ) );
@@ -443,6 +444,7 @@ PrefsTreeCtrl::PrefsTreeCtrl( wxWindow *_p_parent, intf_thread_t *_p_intf,
         else
             p_item = p_module->p_config;
 
+
         if( !p_item ) continue;
         do
         {
@@ -512,9 +514,9 @@ PrefsTreeCtrl::PrefsTreeCtrl( wxWindow *_p_parent, intf_thread_t *_p_intf,
             p_module->i_object_id;
         config_data->psz_help = NULL;
 
-        AppendItem( subcategory_item, wxU( p_module->psz_name ?
-                       p_module->psz_name : p_module->psz_object_name)
-                , -1, -1,
+        AppendItem( subcategory_item, wxU( p_module->psz_shortname ?
+                       p_module->psz_shortname : p_module->psz_object_name )
+                                    , -1, -1,
                     config_data );
     }
 
@@ -829,7 +831,10 @@ PrefsPanel::PrefsPanel( wxWindow* parent, intf_thread_t *_p_intf,
             do
             {
                 if( p_item->i_type == CONFIG_SUBCATEGORY &&
-                    p_item->i_value == config_data->i_object_id )
+                    ( config_data->i_type == TYPE_SUBCATEGORY &&
+                      p_item->i_value == config_data->i_object_id ) ||
+                    ( config_data->i_type == TYPE_CATSUBCAT &&
+                      p_item->i_value == config_data->i_subcat_id ) )
                 {
                     break;
                 }
@@ -870,11 +875,12 @@ PrefsPanel::PrefsPanel( wxWindow* parent, intf_thread_t *_p_intf,
         if( p_item ) do
         {
             /* If a category has been specified, check we finished the job */
-            if( (config_data->i_type == TYPE_SUBCATEGORY ||
-                 config_data->i_type == TYPE_CATSUBCAT ) &&
+            if( ( ( config_data->i_type == TYPE_SUBCATEGORY &&
+                    p_item->i_value != config_data->i_object_id ) ||
+                  ( config_data->i_type == TYPE_CATSUBCAT  &&
+                    p_item->i_value != config_data->i_subcat_id ) ) &&
                 (p_item->i_type == CONFIG_CATEGORY ||
-                  p_item->i_type == CONFIG_SUBCATEGORY ) &&
-                p_item->i_value != config_data->i_object_id )
+                  p_item->i_type == CONFIG_SUBCATEGORY ) )
                 break;
 
             ConfigControl *control =
index 4404155a0afcc834ebb1e9b07208b100d9009891..7a1e6c2eeef1f22e82ea53715645d40f8cc0a990 100644 (file)
@@ -45,9 +45,11 @@ static void Close( vlc_object_t * );
 
 #define HOST_TEXT N_( "Host address" )
 #define HOST_LONGTEXT N_( \
-    "You can set the address, port and path the rtsp interface will bind to." )
-
+    "You can set the address, port and path the rtsp interface will bind to." \
+    ".\n Syntax is address:port/path. Default is to bind to localhost address"\
+    "on port 554, with no path. Use 0.0.0.0 to bind to all addresses." )
 vlc_module_begin();
+    set_shortname( _("RTSP VoD" ) );
     set_description( _("RTSP VoD server") );
     set_category( CAT_SOUT );
     set_subcategory( SUBCAT_SOUT_VOD );
index 7136f2805bda9d8900631a7b14c1f4d2960f8494..a3382b118367960960242fabb736dbe5ce3b3820 100644 (file)
@@ -71,6 +71,7 @@ static int  SendEvents( vlc_object_t *, char const *,
 
 vlc_module_begin();
     set_description( _("Image properties filter") );
+    set_shortname( N_("Image adjust" ));
     set_category( CAT_VIDEO );
     set_subcategory( SUBCAT_VIDEO_VFILTER );
     set_capability( "video filter", 0 );
index 5d0b300468a9484f65df0d600cd2c0578a2e6719..f274512c571e64c10721c2ee69f28949f45a5bc6 100644 (file)
@@ -62,12 +62,13 @@ static int  SendEvents( vlc_object_t *, char const *,
 vlc_module_begin();
     set_description( _("Clone video filter") );
     set_capability( "video filter", 0 );
+    set_shortname( N_("Clone" ));
     set_category( CAT_VIDEO );
     set_subcategory( SUBCAT_VIDEO_VFILTER );
 
     add_integer( "clone-count", 2, NULL, COUNT_TEXT, COUNT_LONGTEXT, VLC_FALSE );
     add_string ( "clone-vout-list", NULL, NULL, VOUTLIST_TEXT, VOUTLIST_LONGTEXT, VLC_FALSE );
-    
+
     add_shortcut( "clone" );
     set_callbacks( Create, Destroy );
 vlc_module_end();
index 9c6b475d2962e506413edab79fe0d559edbc44d3..5e341962034f584694a83f055ec30253f0a5b3de 100644 (file)
@@ -59,6 +59,7 @@ static int  SendEvents( vlc_object_t *, char const *,
 
 vlc_module_begin();
     set_description( _("Crop video filter") );
+    set_shortname( N_("Crop" ));
     set_category( CAT_VIDEO );
     set_subcategory( SUBCAT_VIDEO_VFILTER );
     set_capability( "video filter", 0 );
index 72bf5b21330f60c4f6f1b6930bddba3aa09c5e20..bf560e83a96f49c883ed956fa79905d3c909932b 100644 (file)
@@ -64,6 +64,7 @@ static char *mode_list_text[] = { N_("Wave"), N_("Ripple") };
 
 vlc_module_begin();
     set_description( _("Distort video filter") );
+    set_shortname( N_( "Distortion" ));
     set_capability( "video filter", 0 );
     set_category( CAT_VIDEO );
     set_subcategory( SUBCAT_VIDEO_VFILTER );
index 6ae0c0e8805ec358e158a06e3b6b6bd42492ed59..8fcbe6ced655f22f154b720ed9219846b04262cb 100644 (file)
@@ -50,6 +50,7 @@ static int  SendEvents( vlc_object_t *, char const *,
  *****************************************************************************/
 vlc_module_begin();
     set_description( _("Invert video filter") );
+    set_shortname( N_("Color inversion" ));
     set_category( CAT_VIDEO );
     set_subcategory( SUBCAT_VIDEO_VFILTER );
     set_capability( "video filter", 0 );
index 4d9149954c2142c39eb902b8e64b14983f3a783a..1958344eff5a4b7d82926c1ad55b4dc7d9a23000 100644 (file)
@@ -84,6 +84,7 @@ static char *ppsz_pos_descriptions[] =
 vlc_module_begin();
     set_description( _("Logo video filter") );
     set_capability( "video filter", 0 );
+    set_shortname( N_("Logo overlay") );
     set_category( CAT_VIDEO );
     set_subcategory( SUBCAT_VIDEO_VFILTER );
     add_shortcut( "logo" );
old mode 100755 (executable)
new mode 100644 (file)
index 6620e61..612f98d
@@ -77,6 +77,7 @@ struct filter_sys_t
  *****************************************************************************/
 vlc_module_begin();
     set_capability( "sub filter", 0 );
+    set_shortname( N_("Marquee" ));
     set_callbacks( CreateFilter, DestroyFilter );
     set_category( CAT_VIDEO );
     set_subcategory( SUBCAT_VIDEO_SUBPIC );
index dbb28d1e47bbf620f6ebc01ea9782373fd17a74f..fe2eef2a4370859e85e5b695a2b0c0e2cf5c28ab 100644 (file)
@@ -64,6 +64,7 @@ struct filter_sys_t
  *****************************************************************************/
 vlc_module_begin();
     set_capability( "sub filter", 0 );
+    set_shortname( N_("Time overlay"));
     set_category( CAT_VIDEO );
     set_subcategory( SUBCAT_VIDEO_SUBPIC );
     set_callbacks( CreateFilter, DestroyFilter );
index aba527b1e5531010fabd2d70b67e03fc3c4e140c..be4ede3d1e593df79e159f13b25cab9aea8730ce 100644 (file)
@@ -64,6 +64,7 @@ static char *type_list_text[] = { N_("Rotate by 90 degrees"),
 
 vlc_module_begin();
     set_description( _("Video transformation filter") );
+    set_shortname( N_("Transformation"));
     set_capability( "video filter", 0 );
     set_category( CAT_VIDEO );
     set_subcategory( SUBCAT_VIDEO_VFILTER );
index 9f54a70b8d98231edf51f8297b8f704d2cd16ee9..0e8a8b9709ed46bd45cb343425d0b439ab404e58 100644 (file)
@@ -64,6 +64,7 @@ static int  SendEvents( vlc_object_t *, char const *,
 
 vlc_module_begin();
     set_description( _("wall video filter") );
+    set_shortname( N_("Image wall" ));
     set_capability( "video filter", 0 );
     set_category( CAT_VIDEO );
     set_subcategory( SUBCAT_VIDEO_VFILTER );
index 465c3be958ce0d23ec95549e64bb8c0e24ed0bd3..ab723cacb59e86dfa834183f22cc902707e20d58 100644 (file)
@@ -1,7 +1,7 @@
 /*****************************************************************************
  * fft.c: Iterative implementation of a FFT
  *****************************************************************************
- * $Id: fft.c,v 1.3 2003/12/22 14:32:56 sam Exp $
+ * $Id$
  *
  * Mainly taken from XMMS's code
  *
index cf459e5d167fe8e5e941b2be7fd2416b99de8369..c88c7bbac1cc0247a9b4af9956df4e7f6d31e0ed 100644 (file)
@@ -1,7 +1,7 @@
 /*****************************************************************************
  * fft.h: Headers for iterative implementation of a FFT
  *****************************************************************************
- * $Id: fft.h,v 1.2 2003/10/24 17:43:51 sam Exp $
+ * $Id$
  *
  * Mainly taken from XMMS's code
  * 
index 107c7ffedc661b0d21113df97e78e96ca32dfbe0..710a57a574f93057477d17e78f1768539f132b85 100644 (file)
@@ -2,7 +2,7 @@
  * visual.h : Header for the visualisation system
  *****************************************************************************
  * Copyright (C) 2002 VideoLAN
- * $Id: visual.h,v 1.5 2003/09/20 00:37:53 fenrir Exp $
+ * $Id$
  *
  * Authors: Clément Stenac <zorglub@via.ecp.fr>
  *
index da6fbbc3e63c3051e4e8886ead6b1cae3f9fbd5c..51dd67dbca8985c93f505fe3e0d475d5b2cb4801 100644 (file)
@@ -1128,7 +1128,8 @@ static void DupModule( module_t *p_module )
      * module is unloaded. */
     p_module->psz_object_name = strdup( p_module->psz_object_name );
     p_module->psz_capability = strdup( p_module->psz_capability );
-    p_module->psz_shortname = strdup( p_module->psz_shortname );
+    p_module->psz_shortname = p_module->psz_shortname ?
+                                 strdup( p_module->psz_shortname ) : NULL;
     p_module->psz_longname = strdup( p_module->psz_longname );
 
     if( p_module->psz_program != NULL )