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 93d084a..cc70990 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 3d28479..8a40851 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 7883806..4450373 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 8159a0a..b451e0f 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 ca6b404..d19365f 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 62a1e6d..9131a45 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 2446e65..0de31cf 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 a6d4718..ca9ea83 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 ee610ff..2433b70 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 57bd97a..ec4d79a 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 e910c92..cd8a486 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 4404155..7a1e6c2 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 7136f28..a3382b1 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 5d0b300..f274512 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 9c6b475..5e34196 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 72bf5b2..bf560e8 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 6ae0c0e..8fcbe6c 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 4d91499..1958344 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 dbb28d1..fe2eef2 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 aba527b..be4ede3 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 9f54a70..0e8a8b9 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 465c3be..ab723ca 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 cf459e5..c88c7bb 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 107c7ff..710a57a 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 da6fbbc..51dd67d 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 )