]> git.sesse.net Git - vlc/blobdiff - modules/gui/wxwindows/subtitles.cpp
Disabled aspect ratio and visualization button as they don't work as expected
[vlc] / modules / gui / wxwindows / subtitles.cpp
index 7a51cc42c0474224113ecbbeab68c98d2062f758..c6061ffb46c3664f16a6bd085a0a46ce2167e3c0 100644 (file)
@@ -2,7 +2,7 @@
  * subtitles.cpp : wxWindows plugin for vlc
  *****************************************************************************
  * Copyright (C) 2000-2001 VideoLAN
- * $Id: subtitles.cpp,v 1.3 2003/08/10 09:22:07 gbazin Exp $
+ * $Id: subtitles.cpp,v 1.9 2003/12/22 15:42:44 gbazin Exp $
  *
  * Authors: Gildas Bazin <gbazin@netcourrier.com>
  *
 #include <stdio.h>
 
 #include <vlc/vlc.h>
+#include <vlc/intf.h>
 
-#ifdef WIN32                                                 /* mingw32 hack */
-#undef Yield
-#undef CreateDialog
-#endif
-
-/* Let vlc take care of the i18n stuff */
-#define WXINTL_NO_GETTEXT_MACRO
-
-#include <wx/wxprec.h>
-#include <wx/wx.h>
+#include "wxwindows.h"
 #include <wx/textctrl.h>
 #include <wx/combobox.h>
 #include <wx/spinctrl.h>
 #include <wx/statline.h>
 
-#include <vlc/intf.h>
-
-#if defined MODULE_NAME_IS_skins
-#   include "../skins/src/skin_common.h"
-#endif
-
-#include "wxwindows.h"
-
 #ifndef wxRB_SINGLE
 #   define wxRB_SINGLE 0
 #endif
@@ -80,7 +64,7 @@ END_EVENT_TABLE()
  * Constructor.
  *****************************************************************************/
 SubsFileDialog::SubsFileDialog( intf_thread_t *_p_intf, wxWindow* _p_parent ):
-    wxDialog( _p_parent, -1, wxU(_("Open Subtitles File")),
+    wxDialog( _p_parent, -1, wxU(_("Open subtitles file")),
               wxDefaultPosition, wxDefaultSize, wxDEFAULT_FRAME_STYLE )
 {
     /* Initializations */
@@ -102,7 +86,7 @@ SubsFileDialog::SubsFileDialog( intf_thread_t *_p_intf, wxWindow* _p_parent ):
                                                         wxHORIZONTAL );
     char *psz_subsfile = config_GetPsz( p_intf, "sub-file" );
     file_combo = new wxComboBox( panel, -1,
-                                 psz_subsfile ? wxU(psz_subsfile) : wxT(""),
+                                 psz_subsfile ? wxL2U(psz_subsfile) : wxT(""),
                                  wxPoint(20,25), wxSize(300, -1), 0, NULL );
     if( psz_subsfile ) free( psz_subsfile );
     wxButton *browse_button = new wxButton( panel, FileBrowse_Event,
@@ -124,10 +108,10 @@ SubsFileDialog::SubsFileDialog( intf_thread_t *_p_intf, wxWindow* _p_parent ):
         wxStaticBoxSizer *enc_sizer = new wxStaticBoxSizer( enc_box,
                                                             wxHORIZONTAL );
         wxStaticText *label =
-            new wxStaticText(panel, -1, wxU(_("Text encoding")));
+            new wxStaticText(panel, -1, wxU(p_item->psz_text));
         encoding_combo = new wxComboBox( panel, -1, wxU(p_item->psz_value),
                                          wxDefaultPosition, wxDefaultSize,
-                                         0, NULL, wxCB_READONLY | wxCB_SORT );
+                                         0, NULL, wxCB_READONLY );
 
         /* build a list of available options */
         for( int i_index = 0; p_item->ppsz_list && p_item->ppsz_list[i_index];
@@ -158,8 +142,9 @@ SubsFileDialog::SubsFileDialog( intf_thread_t *_p_intf, wxWindow* _p_parent ):
     wxStaticText *label =
         new wxStaticText(panel, -1, wxU(_("Delay subtitles (in 1/10s)")));
     int i_delay = config_GetInt( p_intf, "sub-delay" );
-    delay_spinctrl = new wxSpinCtrl( panel, -1,
-                                     wxString::Format(wxT("%d"), i_delay),
+    /* Outside the new wxSpinCtrl to avoid an internal error in gcc2.95 ! */
+    wxString format_delay(wxString::Format(wxT("%d"), i_delay));
+    delay_spinctrl = new wxSpinCtrl( panel, -1, format_delay,
                                      wxDefaultPosition, wxDefaultSize,
                                      wxSP_ARROW_KEYS,
                                      -650000, 650000, i_delay );
@@ -170,8 +155,9 @@ SubsFileDialog::SubsFileDialog( intf_thread_t *_p_intf, wxWindow* _p_parent ):
     label = new wxStaticText(panel, -1, wxU(_("Frames per second")));
 
     float f_fps = config_GetFloat( p_intf, "sub-fps" );
-    fps_spinctrl = new wxSpinCtrl( panel, -1,
-                                   wxString::Format(wxT("%d"),(int)f_fps),
+    /* Outside the new wxSpinCtrl to avoid an internal error in gcc2.95 ! */
+    wxString format_fps(wxString::Format(wxT("%d"),(int)f_fps));
+    fps_spinctrl = new wxSpinCtrl( panel, -1, format_fps,
                                    wxDefaultPosition, wxDefaultSize,
                                    wxSP_ARROW_KEYS,
                                    0, 16000, (int)f_fps );