Commit d7b6f7eb authored by Clément Stenac's avatar Clément Stenac

Improve the open box layout

 * Present the simple options first
 * Put the subtitles file option in the main panel
parent 02b1c7e2
This diff is collapsed.
......@@ -2,7 +2,7 @@
* open.hpp: Headers for the Open dialog
*****************************************************************************
* Copyright (C) 1999-2005 the VideoLAN team
* $Id: wxwidgets.h 12670 2005-09-25 11:16:31Z zorglub $
* $Id$
*
* Authors: Gildas Bazin <gbazin@videolan.org>
*
......@@ -75,6 +75,8 @@ private:
/* Event handlers for the file page */
void OnFilePanelChange( wxCommandEvent& event );
void OnFileBrowse( wxCommandEvent& event );
void OnSubFileBrowse( wxCommandEvent& event );
void OnSubFileChange( wxCommandEvent& event );
/* Event handlers for the disc page */
void OnDiscPanelChangeSpin( wxSpinEvent& event );
......@@ -118,6 +120,7 @@ private:
/* Controls for the file panel */
wxComboBox *file_combo;
wxComboBox *subfile_combo;
wxFileDialog *file_dialog;
/* Controls for the disc panel */
......@@ -152,6 +155,7 @@ private:
/* Controls for the subtitles file */
wxButton *subsfile_button;
wxButton *subbrowse_button;
wxCheckBox *subsfile_checkbox;
SubsFileDialog *subsfile_dialog;
wxArrayString subsfile_mrl;
......
......@@ -66,6 +66,7 @@ SubsFileDialog::SubsFileDialog( intf_thread_t *_p_intf, wxWindow* _p_parent ):
wxBoxSizer *main_sizer = new wxBoxSizer( wxVERTICAL );
wxBoxSizer *panel_sizer = new wxBoxSizer( wxVERTICAL );
#if 0
/* Create the subtitles file textctrl */
wxBoxSizer *file_sizer_sizer = new wxBoxSizer( wxHORIZONTAL );
wxStaticBox *file_box = new wxStaticBox( panel, -1,
......@@ -83,6 +84,7 @@ SubsFileDialog::SubsFileDialog( intf_thread_t *_p_intf, wxWindow* _p_parent ):
file_sizer->Add( browse_button, 0, wxALL, 5 );
file_sizer_sizer->Add( file_sizer, 1, wxEXPAND | wxALL, 5 );
panel_sizer->Add( file_sizer, 0, wxEXPAND | wxALL, 5 );
#endif
/* Subtitles encoding */
encoding_combo = NULL;
......@@ -281,11 +283,13 @@ void SubsFileDialog::OnCancel( wxCommandEvent& WXUNUSED(event) )
void SubsFileDialog::OnFileBrowse( wxCommandEvent& WXUNUSED(event) )
{
wxFileDialog dialog( this, wxU(_("Open file")),
#if 0
wxFileDialog dialog( this, wxU(_("Open file")),
wxT(""), wxT(""), wxT("*"), wxOPEN );
if( dialog.ShowModal() == wxID_OK )
{
file_combo->SetValue( dialog.GetPath() );
}
#endif
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment