]> git.sesse.net Git - vlc/blobdiff - modules/gui/wxwidgets/dialogs/preferences.cpp
For consistency, remove references to vlc from libvlc
[vlc] / modules / gui / wxwidgets / dialogs / preferences.cpp
index 653f02a37d4731183053499b04502e61fc3f8596..d3d7d66194606f12f280c0aebc5cdc486bacecfd 100644 (file)
@@ -200,12 +200,15 @@ PrefsDialog::PrefsDialog( intf_thread_t *_p_intf, wxWindow *p_parent)
     /* Separation */
     wxStaticLine *static_line = new wxStaticLine( panel, wxID_OK );
 
+#if 0
     /* Create the buttons */
     wxButton *ok_button = new wxButton( panel, wxID_OK, wxU(_("OK")) );
     ok_button->SetDefault();
+#endif
+    wxButton *save_button = new wxButton( panel, wxID_SAVE, wxU(_("&Save")) );
+    save_button->SetDefault();
     wxButton *cancel_button = new wxButton( panel, wxID_CANCEL,
-                                            wxU(_("Cancel")) );
-    wxButton *save_button = new wxButton( panel, wxID_SAVE, wxU(_("Save")) );
+                                            wxU(_("&Cancel")) );
     wxButton *reset_button = new wxButton( panel, ResetAll_Event,
                                            wxU(_("Reset All")) );
 
@@ -223,9 +226,11 @@ PrefsDialog::PrefsDialog( intf_thread_t *_p_intf, wxWindow *p_parent)
 
     /* Place everything in sizers */
     wxBoxSizer *button_sizer = new wxBoxSizer( wxHORIZONTAL );
+#if 0
     button_sizer->Add( ok_button, 0, wxALL, 5 );
-    button_sizer->Add( cancel_button, 0, wxALL, 5 );
+#endif
     button_sizer->Add( save_button, 0, wxALL, 5 );
+    button_sizer->Add( cancel_button, 0, wxALL, 5 );
     button_sizer->Add( reset_button, 0, wxALL, 5 );
     button_sizer->Add( dummy_panel, 1, wxALL, 5 );
     button_sizer->Add( advanced_checkbox, 0, wxALL | wxALIGN_RIGHT |
@@ -286,7 +291,7 @@ void PrefsDialog::OnSave( wxCommandEvent& WXUNUSED(event) )
 void PrefsDialog::OnResetAll( wxCommandEvent& WXUNUSED(event) )
 {
     wxMessageDialog dlg( this,
-        wxU(_("Beware this will reset your VLC media player preferences.\n"
+        wxU(_("This will reset your VLC media player preferences.\n"
               "Are you sure you want to continue?")),
         wxU(_("Reset Preferences")), wxYES_NO|wxNO_DEFAULT|wxCENTRE );
 
@@ -377,8 +382,7 @@ PrefsTreeCtrl::PrefsTreeCtrl( wxWindow *_p_parent, intf_thread_t *_p_intf,
                 psz_help = config_CategoryHelpGet( p_item->i_value );
                 if( psz_help )
                 {
-                    config_data->psz_help = wraptext( strdup( psz_help ),
-                                                      72 , 1 );
+                    config_data->psz_help = wraptext( strdup( psz_help ), 72 );
                 }
                 else
                 {
@@ -412,7 +416,14 @@ PrefsTreeCtrl::PrefsTreeCtrl( wxWindow *_p_parent, intf_thread_t *_p_intf,
                 break;
             case CONFIG_SUBCATEGORY:
                 if( p_item->i_value == -1 ) break; // Don't display it
+                /* Special case: move the "general" subcategories to their
+                 * parent category */
                 if( p_item->i_value == SUBCAT_VIDEO_GENERAL ||
+                    p_item->i_value == SUBCAT_ADVANCED_MISC ||
+                    p_item->i_value == SUBCAT_INPUT_GENERAL ||
+                    p_item->i_value == SUBCAT_INTERFACE_GENERAL ||
+                    p_item->i_value == SUBCAT_SOUT_GENERAL||
+                    p_item->i_value == SUBCAT_PLAYLIST_GENERAL||
                     p_item->i_value == SUBCAT_AUDIO_GENERAL )
                 {
                     ConfigTreeData *cd = (ConfigTreeData *)
@@ -426,8 +437,7 @@ PrefsTreeCtrl::PrefsTreeCtrl( wxWindow *_p_parent, intf_thread_t *_p_intf,
                     char *psz_help = config_CategoryHelpGet( p_item->i_value );
                     if( psz_help )
                     {
-                        cd->psz_help = wraptext( strdup( psz_help ),72 ,
-                                                 1 );
+                        cd->psz_help = wraptext( strdup( psz_help ), 72 );
                     }
                     else
                     {
@@ -443,8 +453,7 @@ PrefsTreeCtrl::PrefsTreeCtrl( wxWindow *_p_parent, intf_thread_t *_p_intf,
                 psz_help = config_CategoryHelpGet( p_item->i_value );
                 if( psz_help )
                 {
-                    config_data->psz_help = wraptext( strdup( psz_help ) ,
-                                                      72 , 1 );
+                    config_data->psz_help = wraptext( strdup( psz_help ), 72 );
                 }
                 else
                 {
@@ -911,7 +920,8 @@ PrefsPanel::PrefsPanel( wxWindow* parent, intf_thread_t *_p_intf,
             }
             if( !p_module && !b_found )
             {
-                msg_Warn( p_intf, "ohoh, unable to find main module" );
+                msg_Warn( p_intf, "unable to create preferences "
+                                  "(main module not found)" );
                 return;
             }
         }
@@ -989,6 +999,8 @@ PrefsPanel::PrefsPanel( wxWindow* parent, intf_thread_t *_p_intf,
                   p_item->i_type == CONFIG_SUBCATEGORY ) )
                 break;
 
+            if( p_item->b_internal == VLC_TRUE ) continue;
+
             ConfigControl *control =
                 CreateConfigControl( VLC_OBJECT(p_intf),
                                      p_item, config_window );
@@ -1065,7 +1077,7 @@ void PrefsPanel::ApplyChanges()
         case CONFIG_ITEM_KEY:
             /* So you don't need to restart to have the changes take effect */
             val.i_int = control->GetIntValue();
-            var_Set( p_intf->p_vlc, control->GetName().mb_str(), val );
+            var_Set( p_intf->p_libvlc, control->GetName().mb_str(), val );
         case CONFIG_ITEM_INTEGER:
         case CONFIG_ITEM_BOOL:
             config_PutInt( p_intf, control->GetName().mb_str(),