1 /*****************************************************************************
2 * preferences.cpp : WinCE gui plugin for VLC
3 *****************************************************************************
4 * Copyright (C) 2000-2004 VideoLAN
7 * Authors: Marodon Cedric <cedric_marodon@yahoo.fr>
8 * Gildas Bazin <gbazin@videolan.org>
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
23 *****************************************************************************/
25 /*****************************************************************************
27 *****************************************************************************/
28 #include <stdlib.h> /* malloc(), free() */
29 #include <string.h> /* strerror() */
42 #include <vlc_config_cat.h>
44 #include "preferences_widgets.h"
46 #define GENERAL_ID 1242
47 #define PLUGIN_ID 1243
48 #define CAPABILITY_ID 1244
50 /*****************************************************************************
52 *****************************************************************************/
54 /* IDs for the controls and the menu commands */
63 /*****************************************************************************
64 * Classes declarations.
65 *****************************************************************************/
72 PrefsTreeCtrl( intf_thread_t *_p_intf, PrefsDialog *p_prefs_dialog,
73 HWND hwnd, HINSTANCE _hInst );
74 virtual ~PrefsTreeCtrl();
77 /*void CleanChanges();*/
79 void OnSelectTreeItem( LPNM_TREEVIEW pnmtv, HWND parent, HINSTANCE hInst );
81 ConfigTreeData *FindModuleConfig( ConfigTreeData *config_data );
86 intf_thread_t *p_intf;
87 PrefsDialog *p_prefs_dialog;
88 vlc_bool_t b_advanced;
91 HTREEITEM general_item;
92 HTREEITEM plugins_item;
100 PrefsPanel( HWND parent, HINSTANCE hInst, intf_thread_t *_p_intf,
101 PrefsDialog *, int i_object_id, char *, char * );
102 virtual ~PrefsPanel() {}
115 intf_thread_t *p_intf;
116 PrefsDialog *p_prefs_dialog;
118 vlc_bool_t b_advanced;
122 vector<ConfigControl *> config_array;
129 ConfigTreeData() { b_submodule = 0; panel = NULL; psz_section = NULL;
131 virtual ~ConfigTreeData() { if( panel ) delete panel;
132 if( psz_section) free(psz_section);
133 if( psz_help) free(psz_help); }
135 vlc_bool_t b_submodule;
143 /*****************************************************************************
145 *****************************************************************************/
146 PrefsDialog::PrefsDialog( intf_thread_t *_p_intf, HINSTANCE _hInst )
148 /* Initializations */
154 /***********************************************************************
160 Processes messages sent to the main window.
162 ***********************************************************************/
163 LRESULT PrefsDialog::WndProc( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp )
172 shidi.dwMask = SHIDIM_FLAGS;
173 shidi.dwFlags = SHIDIF_DONEBUTTON | SHIDIF_SIPDOWN |
174 SHIDIF_FULLSCREENNOMENUBAR;//SHIDIF_SIZEDLGFULLSCREEN;
176 SHInitDialog( &shidi );
179 memset( &mbi, 0, sizeof (SHMENUBARINFO) );
180 mbi.cbSize = sizeof (SHMENUBARINFO);
181 mbi.hwndParent = hwnd;
182 mbi.dwFlags = SHCMBF_EMPTYBAR;
183 mbi.hInstRes = hInst;
185 if( !SHCreateMenuBar(&mbi) )
187 MessageBox(hwnd, _T("SHCreateMenuBar Failed"), _T("Error"), MB_OK);
193 // Get the client area rect to put the panels in
194 GetClientRect(hwnd, &rcClient);
196 /* Create the buttons */
198 CreateWindow( _T("BUTTON"), _T("Advanced options"),
199 WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX,
200 5, 10, 15, 15, hwnd, NULL, hInst, NULL );
201 SendMessage( advanced_checkbox, BM_SETCHECK, BST_UNCHECKED, 0 );
203 advanced_label = CreateWindow( _T("STATIC"), _T("Advanced options"),
204 WS_CHILD | WS_VISIBLE | SS_LEFT,
205 5 + 15 + 5, 10, 110, 15,
206 hwnd, NULL, hInst, NULL);
208 if( config_GetInt( p_intf, "advanced" ) )
210 SendMessage( advanced_checkbox, BM_SETCHECK, BST_CHECKED, 0 );
211 /*dummy_event.SetInt(TRUE);
212 OnAdvanced( dummy_event );*/
215 reset_button = CreateWindow( _T("BUTTON"), _T("Reset All"),
216 WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON,
217 rcClient.right - 5 - 80, 10 - 3, 80, 15 + 6,
218 hwnd, NULL, hInst, NULL );
220 /* Create the preferences tree control */
221 prefs_tree = new PrefsTreeCtrl( p_intf, this, hwnd, hInst );
223 UpdateWindow( hwnd );
227 EndDialog( hwnd, LOWORD( wp ) );
231 if( LOWORD(wp) == IDOK )
234 EndDialog( hwnd, LOWORD( wp ) );
240 if( lp && prefs_tree &&
241 ((LPNMHDR)lp)->hwndFrom == prefs_tree->hwndTV &&
242 ((LPNMHDR)lp)->code == TVN_SELCHANGED )
244 prefs_tree->OnSelectTreeItem( (NM_TREEVIEW FAR *)(LPNMHDR)lp,
252 tvi.mask = TVIF_PARAM;
253 tvi.hItem = TreeView_GetSelection( prefs_tree->hwndTV );
254 TreeView_GetItem( prefs_tree->hwndTV, &tvi );
255 ConfigTreeData *config_data =
256 prefs_tree->FindModuleConfig( (ConfigTreeData *)tvi.lParam );
257 if ( hwnd == config_data->panel->config_window )
261 GetWindowRect( hwnd, &rc);
262 int newvalue = config_data->panel->oldvalue;
263 switch ( GET_WM_VSCROLL_CODE(wp,lp) )
265 case SB_BOTTOM : newvalue = 0; break;
266 case SB_TOP : newvalue = config_data->panel->maxvalue; break;
267 case SB_LINEDOWN : newvalue += 10; break;
268 case SB_PAGEDOWN : newvalue += rc.bottom - rc.top - 25; break; // faux ! une page c'est la longueur réelle de notebook
269 case SB_LINEUP : newvalue -= 10; break;
270 case SB_PAGEUP : newvalue -= rc.bottom - rc.top - 25; break;
271 case SB_THUMBPOSITION:
272 case SB_THUMBTRACK : newvalue = GET_WM_VSCROLL_POS(wp,lp); break;
274 newvalue = max(0,min(config_data->panel->maxvalue,newvalue));
275 SetScrollPos( hwnd,SB_VERT,newvalue,TRUE);//SB_CTL si hwnd=hwndScrollBar, SB_VERT si window
276 dy = config_data->panel->oldvalue - newvalue;
278 ScrollWindowEx( hwnd, 0, dy, NULL, NULL, NULL, NULL, SW_SCROLLCHILDREN );
279 UpdateWindow ( hwnd);
281 config_data->panel->oldvalue = newvalue;
293 /*****************************************************************************
295 *****************************************************************************/
297 /*****************************************************************************
299 *****************************************************************************/
300 void PrefsDialog::OnOk( void )
302 prefs_tree->ApplyChanges();
303 config_SaveConfigFile( p_intf, NULL );
306 /*****************************************************************************
307 * PrefsTreeCtrl class definition.
308 *****************************************************************************/
309 PrefsTreeCtrl::PrefsTreeCtrl( intf_thread_t *_p_intf,
310 PrefsDialog *_p_prefs_dialog, HWND hwnd,
315 module_config_t *p_item;
318 INITCOMMONCONTROLSEX iccex;
321 TVINSERTSTRUCT tvins = {0};
324 size_t i_capability_count = 0;
325 size_t i_child_index;
327 HTREEITEM capability_item;
329 /* Initializations */
331 p_prefs_dialog = _p_prefs_dialog;
332 b_advanced = VLC_FALSE;
334 /* Create a tree view */
335 // Initialize the INITCOMMONCONTROLSEX structure.
336 iccex.dwSize = sizeof( INITCOMMONCONTROLSEX );
337 iccex.dwICC = ICC_TREEVIEW_CLASSES;
339 // Registers Statusbar control classes from the common control dll
340 InitCommonControlsEx( &iccex );
342 // Get the client area rect to put the tv in
343 GetClientRect(hwnd, &rcClient);
345 // Create the tree-view control.
346 hwndTV = CreateWindowEx( 0, WC_TREEVIEW, NULL,
347 WS_VISIBLE | WS_CHILD | WS_BORDER | TVS_HASLINES |
348 TVS_LINESATROOT | TVS_HASBUTTONS,
349 5, 10 + 2*(15 + 10) + 105 + 5, rcClient.right - 5 - 5, 6*15,
350 hwnd, NULL, hInst, NULL );
352 tvi.mask = TVIF_TEXT | TVIF_IMAGE | TVIF_SELECTEDIMAGE | TVIF_PARAM;
353 tvi.pszText = _T("root");
354 tvi.cchTextMax = lstrlen(_T("root"));
355 tvi.lParam = (LPARAM) 1; // root level
357 tvins.hInsertAfter = TVI_FIRST;
358 tvins.hParent = TVI_ROOT;
360 // Add the item to the tree-view control.
361 hPrev = (HTREEITEM) TreeView_InsertItem( hwndTV, &tvins );
364 /* List the plugins */
365 p_list = vlc_list_find( p_intf, VLC_OBJECT_MODULE, FIND_ANYWHERE );
366 if( !p_list ) return;
369 * Build a tree of the main options
371 ConfigTreeData *config_data = new ConfigTreeData;
372 config_data->i_object_id = GENERAL_ID;
373 config_data->psz_help = strdup("nothing");//strdup( GENERAL_HELP );
374 config_data->psz_section = strdup( GENERAL_TITLE );
375 tvi.pszText = _T("General settings");
376 tvi.cchTextMax = lstrlen(_T("General settings"));
377 tvi.lParam = (long) config_data;
379 tvins.hInsertAfter = hPrev;
380 tvins.hParent = root_item; //level 2
382 // Add the item to the tree-view control.
383 hPrev = (HTREEITEM) TreeView_InsertItem( hwndTV, &tvins);
384 general_item = hPrev;
386 for( i_index = 0; i_index < p_list->i_count; i_index++ )
388 p_module = (module_t *)p_list->p_values[i_index].p_object;
389 if( !strcmp( p_module->psz_object_name, "main" ) )
392 if( i_index < p_list->i_count )
394 /* We found the main module */
396 /* Enumerate config categories and store a reference so we can
397 * generate their config panel them when it is asked by the user. */
398 p_item = p_module->p_config;
402 switch( p_item->i_type )
404 case CONFIG_HINT_CATEGORY:
405 ConfigTreeData *config_data = new ConfigTreeData;
406 config_data->psz_section = strdup( p_item->psz_text );
407 if( p_item->psz_longtext )
409 config_data->psz_help =
410 strdup( p_item->psz_longtext );
414 config_data->psz_help = NULL;
416 config_data->i_object_id = p_module->i_object_id;
418 /* Add the category to the tree */
419 // Set the text of the item.
420 tvi.pszText = _FROMMB(p_item->psz_text);
421 tvi.cchTextMax = _tcslen(tvi.pszText);
422 tvi.lParam = (long)config_data;
424 tvins.hInsertAfter = hPrev;
425 tvins.hParent = general_item; //level 3
427 // Add the item to the tree-view control.
428 hPrev = (HTREEITEM)TreeView_InsertItem( hwndTV, &tvins );
433 while( p_item->i_type != CONFIG_HINT_END && p_item++ );
435 TreeView_SortChildren( hwndTV, general_item, 0 );
439 * Build a tree of all the plugins
441 config_data = new ConfigTreeData;
442 config_data->i_object_id = PLUGIN_ID;
443 config_data->psz_help = strdup("nothing");//strdup( PLUGIN_HELP );
444 config_data->psz_section = strdup("nothing");//strdup( PLUGIN_TITLE );
445 tvi.pszText = _T("Modules");
446 tvi.cchTextMax = lstrlen(_T("Modules"));
447 tvi.lParam = (long) config_data;
449 tvins.hInsertAfter = hPrev;
450 tvins.hParent = root_item;// level 2
452 // Add the item to the tree-view control.
453 hPrev = (HTREEITEM) TreeView_InsertItem( hwndTV, &tvins);
454 plugins_item = hPrev;
456 i_capability_count = 0;
457 for( i_index = 0; i_index < p_list->i_count; i_index++ )
461 p_module = (module_t *)p_list->p_values[i_index].p_object;
463 /* Exclude the main module */
464 if( !strcmp( p_module->psz_object_name, "main" ) )
467 /* Exclude empty plugins (submodules don't have config options, they
468 * are stored in the parent module) */
469 if( p_module->b_submodule )
470 p_item = ((module_t *)p_module->p_parent)->p_config;
472 p_item = p_module->p_config;
474 if( !p_item ) continue;
477 if( p_item->i_type & CONFIG_ITEM )
480 while( p_item->i_type != CONFIG_HINT_END && p_item++ );
481 if( p_item->i_type == CONFIG_HINT_END ) continue;
483 /* Find the capability child item */
484 /*long cookie; size_t i_child_index;*/
485 capability_item = TreeView_GetChild( hwndTV, plugins_item );
486 while( capability_item != 0 )
488 TVITEM capability_tvi = {0};
492 capability_tvi.mask = TVIF_TEXT;
493 capability_tvi.pszText = psz_text;
494 capability_tvi.cchTextMax = 256;
495 capability_tvi.hItem = capability_item;
496 TreeView_GetItem( hwndTV, &capability_tvi );
497 if( !strcmp( _TOMB(capability_tvi.pszText),
498 p_module->psz_capability ) ) break;
501 TreeView_GetNextSibling( hwndTV, capability_item );
504 if( i_child_index == i_capability_count &&
505 p_module->psz_capability && *p_module->psz_capability )
507 /* We didn't find it, add it */
508 ConfigTreeData *config_data = new ConfigTreeData;
509 config_data->psz_section =
510 strdup( GetCapabilityHelp( p_module->psz_capability , 1 ) );
511 config_data->psz_help =
512 strdup( GetCapabilityHelp( p_module->psz_capability , 2 ) );
513 config_data->i_object_id = CAPABILITY_ID;
514 tvi.pszText = _FROMMB(p_module->psz_capability);
515 tvi.cchTextMax = _tcslen(tvi.pszText);
516 tvi.lParam = (long) config_data;
518 tvins.hInsertAfter = plugins_item;
519 tvins.hParent = plugins_item;// level 3
521 // Add the item to the tree-view control.
522 capability_item = (HTREEITEM) TreeView_InsertItem( hwndTV, &tvins);
524 i_capability_count++;
527 /* Add the plugin to the tree */
528 ConfigTreeData *config_data = new ConfigTreeData;
529 config_data->b_submodule = p_module->b_submodule;
530 config_data->i_object_id = p_module->b_submodule ?
531 ((module_t *)p_module->p_parent)->i_object_id :
532 p_module->i_object_id;
533 config_data->psz_help = NULL;
534 tvi.pszText = _FROMMB(p_module->psz_object_name);
535 tvi.cchTextMax = _tcslen(tvi.pszText);
536 tvi.lParam = (long) config_data;
538 tvins.hInsertAfter = capability_item;
539 tvins.hParent = capability_item;// level 4
541 // Add the item to the tree-view control.
542 TreeView_InsertItem( hwndTV, &tvins );
545 /* Sort all this mess */
546 /*long cookie; size_t i_child_index;*/
547 TreeView_SortChildren( hwndTV, plugins_item, 0 );
548 capability_item = TreeView_GetChild( hwndTV, plugins_item );
549 while( capability_item != 0 )
551 TreeView_SortChildren( hwndTV, capability_item, 0 );
552 capability_item = TreeView_GetNextSibling( hwndTV, capability_item );
555 /* Clean-up everything */
556 vlc_list_release( p_list );
558 TreeView_Expand( hwndTV, root_item, TVE_EXPANDPARTIAL |TVE_EXPAND );
559 TreeView_Expand( hwndTV, general_item, TVE_EXPANDPARTIAL |TVE_EXPAND );
562 PrefsTreeCtrl::~PrefsTreeCtrl()
566 void PrefsTreeCtrl::ApplyChanges()
568 /*long cookie, cookie2;*/
569 ConfigTreeData *config_data;
571 /* Apply changes to the main module */
572 HTREEITEM item = TreeView_GetChild( hwndTV, general_item );
576 tvi.mask = TVIF_PARAM;
578 TreeView_GetItem( hwndTV, &tvi );
579 config_data = (ConfigTreeData *)tvi.lParam;
580 if( config_data && config_data->panel )
582 config_data->panel->ApplyChanges();
585 item = TreeView_GetNextSibling( hwndTV, item );
588 /* Apply changes to the plugins */
589 item = TreeView_GetChild( hwndTV, plugins_item );
592 HTREEITEM item2 = TreeView_GetChild( hwndTV, item );
596 tvi.mask = TVIF_PARAM;
598 TreeView_GetItem( hwndTV, &tvi );
599 config_data = (ConfigTreeData *)tvi.lParam;
600 if( config_data && config_data->panel )
602 config_data->panel->ApplyChanges();
604 item2 = TreeView_GetNextSibling( hwndTV, item2 );
606 item = TreeView_GetNextSibling( hwndTV, item );
610 ConfigTreeData *PrefsTreeCtrl::FindModuleConfig( ConfigTreeData *config_data )
612 /* We need this complexity because submodules don't have their own config
613 * options. They use the parent module ones. */
615 if( !config_data || !config_data->b_submodule )
620 /*long cookie, cookie2;*/
621 ConfigTreeData *config_new;
622 HTREEITEM item = TreeView_GetChild( hwndTV, plugins_item );
625 HTREEITEM item2 = TreeView_GetChild( hwndTV, item );
629 tvi.mask = TVIF_PARAM;
631 TreeView_GetItem( hwndTV, &tvi );
632 config_new = (ConfigTreeData *)tvi.lParam;
633 if( config_new && !config_new->b_submodule &&
634 config_new->i_object_id == config_data->i_object_id )
638 item2 = TreeView_GetNextSibling( hwndTV, item2 );
640 item = TreeView_GetNextSibling( hwndTV, item );
647 void PrefsTreeCtrl::OnSelectTreeItem( LPNM_TREEVIEW pnmtv, HWND parent,
650 ConfigTreeData *config_data = NULL;
652 if( pnmtv->itemOld.hItem )
653 config_data = FindModuleConfig( (ConfigTreeData *)pnmtv->itemOld.lParam );
655 if( config_data && config_data->panel )
657 config_data->panel->Hide();
660 /* Don't use event.GetItem() because we also send fake events */
662 tvi.mask = TVIF_PARAM;
663 tvi.hItem = TreeView_GetSelection( hwndTV );
664 TreeView_GetItem( hwndTV, &tvi );
665 config_data = FindModuleConfig( (ConfigTreeData *)tvi.lParam );
668 if( !config_data->panel )
670 /* The panel hasn't been created yet. Let's do it. */
672 new PrefsPanel( parent, hInst, p_intf, p_prefs_dialog,
673 config_data->i_object_id,
674 config_data->psz_section,
675 config_data->psz_help );
679 config_data->panel->Show();
684 /*****************************************************************************
685 * PrefsPanel class definition.
686 *****************************************************************************/
687 PrefsPanel::PrefsPanel( HWND parent, HINSTANCE hInst, intf_thread_t *_p_intf,
688 PrefsDialog *_p_prefs_dialog,
689 int i_object_id, char *psz_section, char *psz_help )
691 module_config_t *p_item;
692 module_t *p_module = NULL;
694 /* Initializations */
696 p_prefs_dialog = _p_prefs_dialog;
698 b_advanced = VLC_TRUE;
700 if( i_object_id == PLUGIN_ID || i_object_id == GENERAL_ID ||
701 i_object_id == CAPABILITY_ID )
703 label = CreateWindow( _T("STATIC"), _FROMMB(psz_section),
704 WS_CHILD | WS_VISIBLE | SS_LEFT,
705 5, 10 + (15 + 10), 200, 15,
706 parent, NULL, hInst, NULL );
707 config_window = NULL;
711 /* Get a pointer to the module */
712 p_module = (module_t *)vlc_object_get( p_intf, i_object_id );
713 if( p_module->i_object_type != VLC_OBJECT_MODULE )
715 /* 0OOoo something went really bad */
719 /* Enumerate config options and add corresponding config boxes
720 * (submodules don't have config options, they are stored in the
722 if( p_module->b_submodule )
723 p_item = ((module_t *)p_module->p_parent)->p_config;
725 p_item = p_module->p_config;
727 /* Find the category if it has been specified */
728 if( psz_section && p_item->i_type == CONFIG_HINT_CATEGORY )
730 while( !p_item->i_type == CONFIG_HINT_CATEGORY ||
731 strcmp( psz_section, p_item->psz_text ) )
733 if( p_item->i_type == CONFIG_HINT_END )
739 /* Add a head title to the panel */
740 label = CreateWindow( _T("STATIC"), _FROMMB(psz_section ?
741 p_item->psz_text : p_module->psz_longname),
742 WS_CHILD | WS_VISIBLE | SS_LEFT,
743 5, 10 + (15 + 10), 250, 15,
744 parent, NULL, hInst, NULL );
747 memset( &wc, 0, sizeof(wc) );
748 wc.style = CS_HREDRAW | CS_VREDRAW;
749 wc.lpfnWndProc = (WNDPROC) _p_prefs_dialog->BaseWndProc;
752 wc.hInstance = hInst;
755 wc.hbrBackground = (HBRUSH) GetStockObject(WHITE_BRUSH);
757 wc.lpszClassName = _T("PrefsPanelClass");
761 GetWindowRect( parent, &rc);
762 config_window = CreateWindow( _T("PrefsPanelClass"),
764 WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_BORDER,
765 5, 10 + 2*(15 + 10), rc.right - 5 - 7, 105,
766 parent, NULL, hInst, (void *) _p_prefs_dialog );
771 /* If a category has been specified, check we finished the job */
772 if( psz_section && p_item->i_type == CONFIG_HINT_CATEGORY &&
773 strcmp( psz_section, p_item->psz_text ) )
776 ConfigControl *control =
777 CreateConfigControl( VLC_OBJECT(p_intf),
778 p_item, config_window,
781 /* Don't add items that were not recognized */
782 if( control == NULL ) continue;
784 /* Add the config data to our array so we can keep a trace of it */
785 config_array.push_back( control );
787 while( p_item->i_type != CONFIG_HINT_END && p_item++ );
789 GetWindowRect( config_window, &rc);
790 maxvalue = y_pos - (rc.bottom - rc.top) + 5;
792 SetScrollRange( config_window, SB_VERT, 0, maxvalue, TRUE );
796 void PrefsPanel::Hide()
798 ShowWindow( label, SW_HIDE );
799 if( config_window ) ShowWindow( config_window, SW_HIDE );
802 void PrefsPanel::Show()
804 ShowWindow( label, SW_SHOW );
805 if( config_window ) ShowWindow( config_window, SW_SHOW );
808 void PrefsPanel::ApplyChanges()
812 for( size_t i = 0; i < config_array.size(); i++ )
814 ConfigControl *control = config_array[i];
816 switch( control->GetType() )
818 case CONFIG_ITEM_STRING:
819 case CONFIG_ITEM_FILE:
820 case CONFIG_ITEM_DIRECTORY:
821 case CONFIG_ITEM_MODULE:
822 config_PutPsz( p_intf, control->GetName(),
823 control->GetPszValue() );
825 case CONFIG_ITEM_KEY:
826 /* So you don't need to restart to have the changes take effect */
827 val.i_int = control->GetIntValue();
828 var_Set( p_intf->p_vlc, control->GetName(), val );
829 case CONFIG_ITEM_INTEGER:
830 case CONFIG_ITEM_BOOL:
831 config_PutInt( p_intf, control->GetName(),
832 control->GetIntValue() );
834 case CONFIG_ITEM_FLOAT:
835 config_PutFloat( p_intf, control->GetName(),
836 control->GetFloatValue() );