Changeset d2adc9f3c197dfb3b148db04d24f838d7f0befcd
- Timestamp:
- 12/14/04 19:44:04 (4 years ago)
- git-parent:
- Files:
-
- include/configuration.h (modified) (2 diffs)
- modules/control/http.c (modified) (1 diff)
- modules/control/rc.c (modified) (3 diffs)
- modules/control/rtci.c (modified) (3 diffs)
- modules/control/telnet.c (modified) (1 diff)
- modules/gui/wxwindows/preferences_widgets.cpp (modified) (3 diffs)
- modules/gui/wxwindows/preferences_widgets.h (modified) (2 diffs)
- modules/visualization/xosd.c (modified) (1 diff)
- src/libvlc.h (modified) (1 diff)
- src/misc/configuration.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
include/configuration.h
ra90a19a rd2adc9f 52 52 #define CONFIG_ITEM_DIRECTORY 0x0070 /* Directory option */ 53 53 #define CONFIG_ITEM_KEY 0x0080 /* Hot key option */ 54 #define CONFIG_ITEM_MODULE_LIST 0x0090 /* Module option */ 55 #define CONFIG_ITEM_MODULE_LIST_CAT 0x00A0 /* Module option */ 54 #define CONFIG_ITEM_MODULE_CAT 0x0090 /* Module option */ 55 #define CONFIG_ITEM_MODULE_LIST 0x00A0 /* Module option */ 56 #define CONFIG_ITEM_MODULE_LIST_CAT 0x00B0 /* Module option */ 56 57 57 58 #define CONFIG_ITEM 0x00F0 … … 277 278 { static module_config_t tmp = { CONFIG_ITEM_MODULE, psz_caps, name, '\0', text, longtext, psz_value }; p_config[ i_config ] = tmp; p_config[ i_config ].pf_callback = p_callback; p_config[i_config].b_advanced = advc; } 278 279 280 #define add_module_cat( name, i_subcategory, psz_value, p_callback, text, longtext, advc ) \ 281 i_config++; \ 282 if(!(i_config%10)) p_config = (module_config_t* )realloc(p_config, \ 283 (i_config+11) * sizeof(module_config_t)); \ 284 { static module_config_t tmp = { CONFIG_ITEM_MODULE_CAT, NULL, name, '\0', text, longtext, psz_value, 0, 0.0, i_subcategory }; p_config[ i_config ] = tmp; p_config[ i_config ].pf_callback = p_callback; p_config[i_config].b_advanced = advc; } 279 285 280 286 #define add_module_list( name, psz_caps, psz_value, p_callback, text, longtext, advc ) \ modules/control/http.c
r91d9398 rd2adc9f 93 93 set_description( _("HTTP remote control interface") ); 94 94 set_category( CAT_INTERFACE ); 95 set_subcategory( SUBCAT_INTERFACE_ CONTROL );95 set_subcategory( SUBCAT_INTERFACE_GENERAL ); 96 96 add_string ( "http-host", NULL, NULL, HOST_TEXT, HOST_LONGTEXT, VLC_TRUE ); 97 97 add_string ( "http-src", NULL, NULL, SRC_TEXT, SRC_LONGTEXT, VLC_TRUE ); modules/control/rc.c
ra90a19a rd2adc9f 97 97 char *psz_unix_path; 98 98 vlc_bool_t b_extend; 99 99 100 100 #ifdef WIN32 101 101 HANDLE hConsoleIn; … … 139 139 #define EXTEND_TEXT N_("Extended help") 140 140 #define EXTEND_LONGTEXT N_("List additional commands.") 141 142 141 143 142 #ifdef WIN32 … … 152 151 vlc_module_begin(); 153 152 set_category( CAT_INTERFACE ); 154 set_subcategory( SUBCAT_INTERFACE_ CONTROL );153 set_subcategory( SUBCAT_INTERFACE_GENERAL ); 155 154 set_description( _("Remote control interface") ); 156 155 add_bool( "rc-show-pos", 0, NULL, POS_TEXT, POS_LONGTEXT, VLC_TRUE ); modules/control/rtci.c
ra90a19a rd2adc9f 103 103 char *psz_unix_path; 104 104 vlc_bool_t b_extend; 105 105 106 106 #ifdef WIN32 107 107 HANDLE hConsoleIn; … … 142 142 #define EXTEND_TEXT N_("Extended help") 143 143 #define EXTEND_LONGTEXT N_("List additional commands.") 144 145 144 146 145 #ifdef WIN32 … … 154 153 set_description( _("Real time control interface") ); 155 154 set_category( CAT_INTERFACE ); 156 set_subcategory( SUBCAT_INTERFACE_ CONTROL );155 set_subcategory( SUBCAT_INTERFACE_GENERAL ); 157 156 add_bool( "rtci-show-pos", 0, NULL, POS_TEXT, POS_LONGTEXT, VLC_TRUE ); 158 157 #ifdef HAVE_ISATTY modules/control/telnet.c
r635d823 rd2adc9f 83 83 84 84 vlc_module_begin(); 85 set_category( CAT_INTERFACE ); 86 set_subcategory( SUBCAT_INTERFACE_GENERAL ); 85 87 add_integer( "telnet-port", 4212, NULL, TELNETPORT_TEXT, 86 88 TELNETPORT_LONGTEXT, VLC_TRUE ); modules/gui/wxwindows/preferences_widgets.cpp
r9de73f4 rd2adc9f 54 54 p_control = new ModuleConfigControl( p_this, p_item, parent ); 55 55 break; 56 case CONFIG_ITEM_MODULE_CAT: 57 p_control = new ModuleCatConfigControl( p_this, p_item, parent ); 58 break; 56 59 case CONFIG_ITEM_MODULE_LIST_CAT: 57 60 p_control = new ModuleListCatConfigControl( p_this, p_item, parent ); … … 291 294 } 292 295 296 ModuleCatConfigControl::~ModuleCatConfigControl() 297 { 298 ; 299 } 300 301 wxString ModuleCatConfigControl::GetPszValue() 302 { 303 return wxU( (char *)combo->GetClientData( combo->GetSelection() )); 304 } 305 306 /***************************************************************************** 307 * ModuleCatConfigControl implementation 308 *****************************************************************************/ 309 ModuleCatConfigControl::ModuleCatConfigControl( vlc_object_t *p_this, 310 module_config_t *p_item, 311 wxWindow *parent ) 312 : ConfigControl( p_this, p_item, parent ) 313 { 314 vlc_list_t *p_list; 315 module_t *p_parser; 316 317 label = new wxStaticText(this, -1, wxU(p_item->psz_text)); 318 combo = new wxComboBox( this, -1, wxL2U(p_item->psz_value), 319 wxDefaultPosition, wxDefaultSize, 320 0, NULL, wxCB_READONLY | wxCB_SORT ); 321 322 combo->Append( wxU(_("Default")), (void *)NULL ); 323 combo->SetSelection( 0 ); 324 325 /* build a list of available modules */ 326 p_list = vlc_list_find( p_this, VLC_OBJECT_MODULE, FIND_ANYWHERE ); 327 for( int i_index = 0; i_index < p_list->i_count; i_index++ ) 328 { 329 p_parser = (module_t *)p_list->p_values[i_index].p_object ; 330 331 if( !strcmp( p_parser->psz_object_name, "main" ) ) 332 continue; 333 334 module_config_t *p_config = p_parser->p_config; 335 if( p_config ) do 336 { 337 /* Hack: required subcategory is stored in i_min */ 338 if( p_config->i_type == CONFIG_SUBCATEGORY && 339 p_config->i_value == p_item->i_min ) 340 { 341 combo->Append( wxU(p_parser->psz_longname), 342 p_parser->psz_object_name ); 343 if( p_item->psz_value && !strcmp(p_item->psz_value, 344 p_parser->psz_object_name) ) 345 combo->SetValue( wxU(p_parser->psz_longname) ); 346 } 347 } while( p_config->i_type != CONFIG_HINT_END && p_config++ ); 348 } 349 vlc_list_release( p_list ); 350 351 combo->SetToolTip( wxU(p_item->psz_longtext) ); 352 sizer->Add( label, 1, wxALIGN_CENTER_VERTICAL | wxALL, 5 ); 353 sizer->Add( combo, 1, wxALIGN_CENTER_VERTICAL | wxALL, 5 ); 354 sizer->Layout(); 355 this->SetSizerAndFit( sizer ); 356 } 357 293 358 ModuleConfigControl::~ModuleConfigControl() 294 359 { … … 300 365 return wxU( (char *)combo->GetClientData( combo->GetSelection() )); 301 366 } 367 302 368 303 369 /***************************************************************************** modules/gui/wxwindows/preferences_widgets.h
ra90a19a rd2adc9f 90 90 }; 91 91 92 class ModuleCatConfigControl: public ConfigControl 93 { 94 public: 95 ModuleCatConfigControl( vlc_object_t *, module_config_t *, wxWindow * ); 96 ~ModuleCatConfigControl(); 97 virtual wxString GetPszValue(); 98 private: 99 wxComboBox *combo; 100 }; 101 102 92 103 class ModuleListCatConfigControl: public ConfigControl 93 104 { … … 100 111 101 112 void OnUpdate( wxCommandEvent& ); 102 113 103 114 wxTextCtrl *text; 104 115 DECLARE_EVENT_TABLE() modules/visualization/xosd.c
r91d9398 rd2adc9f 78 78 79 79 vlc_module_begin(); 80 set_category( CAT_INTERFACE ); 81 set_subcategory( SUBCAT_INTERFACE_CONTROL ); 80 82 set_description( _("XOSD interface") ); 81 83 add_bool( "xosd-position", 1, NULL, POSITION_TEXT, POSITION_LONGTEXT, VLC_TRUE ); src/libvlc.h
r17d55b1 rd2adc9f 1127 1127 1128 1128 set_section ( N_("Interface module" ), NULL ); 1129 add_module ( "intf", "interface", NULL, NULL, INTF_TEXT,1129 add_module_cat( "intf", SUBCAT_INTERFACE_GENERAL, NULL, NULL, INTF_TEXT, 1130 1130 INTF_LONGTEXT, VLC_FALSE ); 1131 1131 change_short('I'); src/misc/configuration.c
ra90a19a rd2adc9f 206 206 (p_config->i_type!=CONFIG_ITEM_MODULE_LIST) && 207 207 (p_config->i_type!=CONFIG_ITEM_MODULE_LIST_CAT) && 208 (p_config->i_type!=CONFIG_ITEM_MODULE_CAT) && 208 209 (p_config->i_type!=CONFIG_ITEM_MODULE) ) 209 210 {
