Commit 0da5a70e authored by Boris Dorès's avatar Boris Dorès

- disc.* : a few enhancements in the design of the "open disc" dialog

  box, including the ability to select dvd menus instead of a particular
  title and chapter
- preferences.dfm : multiline tabs
parent 89ee60c1
...@@ -55,12 +55,12 @@ void __fastcall TDiscDlg::FormHide( TObject *Sender ) ...@@ -55,12 +55,12 @@ void __fastcall TDiscDlg::FormHide( TObject *Sender )
p_intf->p_sys->p_window->OpenDiscAction->Checked = false; p_intf->p_sys->p_window->OpenDiscAction->Checked = false;
} }
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
void __fastcall TDiscDlg::BitBtnCancelClick( TObject *Sender ) void __fastcall TDiscDlg::ButtonCancelClick( TObject *Sender )
{ {
Hide(); Hide();
} }
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
void __fastcall TDiscDlg::BitBtnOkClick( TObject *Sender ) void __fastcall TDiscDlg::ButtonOkClick( TObject *Sender )
{ {
AnsiString Device, Source, Method, Title, Chapter; AnsiString Device, Source, Method, Title, Chapter;
...@@ -79,7 +79,14 @@ void __fastcall TDiscDlg::BitBtnOkClick( TObject *Sender ) ...@@ -79,7 +79,14 @@ void __fastcall TDiscDlg::BitBtnOkClick( TObject *Sender )
Chapter.sprintf( "%d", SpinEditChapter->Value ); Chapter.sprintf( "%d", SpinEditChapter->Value );
/* Build source name and add it to playlist */ /* Build source name and add it to playlist */
if ( CheckBoxMenus->Checked )
{
Source = Method + ":" + Device;
}
else
{
Source = Method + ":" + Device + "@" + Title + "," + Chapter; Source = Method + ":" + Device + "@" + Title + "," + Chapter;
}
p_intf->p_sys->p_playwin->Add( Source, PLAYLIST_APPEND p_intf->p_sys->p_playwin->Add( Source, PLAYLIST_APPEND
| ( p_intf->p_sys->b_play_when_adding ? PLAYLIST_GO : 0 ), | ( p_intf->p_sys->b_play_when_adding ? PLAYLIST_GO : 0 ),
...@@ -94,10 +101,14 @@ void __fastcall TDiscDlg::RadioGroupTypeClick( TObject *Sender ) ...@@ -94,10 +101,14 @@ void __fastcall TDiscDlg::RadioGroupTypeClick( TObject *Sender )
if( RadioGroupType->ItemIndex == 0 ) if( RadioGroupType->ItemIndex == 0 )
{ {
psz_device = config_GetPsz( p_intf, "dvd" ); psz_device = config_GetPsz( p_intf, "dvd" );
CheckBoxMenus->Enabled = true;
CheckBoxMenus->Checked = true;
} }
else else
{ {
psz_device = config_GetPsz( p_intf, "vcd" ); psz_device = config_GetPsz( p_intf, "vcd" );
CheckBoxMenus->Checked = false;
CheckBoxMenus->Enabled = false;
} }
if( psz_device ) if( psz_device )
...@@ -108,3 +119,26 @@ void __fastcall TDiscDlg::RadioGroupTypeClick( TObject *Sender ) ...@@ -108,3 +119,26 @@ void __fastcall TDiscDlg::RadioGroupTypeClick( TObject *Sender )
} }
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
void __fastcall TDiscDlg::CheckBoxMenusClick(TObject *Sender)
{
if ( CheckBoxMenus->Checked )
{
LabelTitle->Enabled = false;
LabelChapter->Enabled = false;
SpinEditTitle->Enabled = false;
SpinEditTitle->Color = clBtnFace;
SpinEditChapter->Enabled = false;
SpinEditChapter->Color = clBtnFace;
}
else
{
LabelTitle->Enabled = true;
LabelChapter->Enabled = true;
SpinEditTitle->Enabled = true;
SpinEditTitle->Color = clWindow;
SpinEditChapter->Enabled = true;
SpinEditChapter->Color = clWindow;
}
}
//---------------------------------------------------------------------------
This diff is collapsed.
...@@ -40,16 +40,19 @@ __published: // IDE-managed Components ...@@ -40,16 +40,19 @@ __published: // IDE-managed Components
TLabel *LabelTitle; TLabel *LabelTitle;
TLabel *LabelChapter; TLabel *LabelChapter;
TRadioGroup *RadioGroupType; TRadioGroup *RadioGroupType;
TBitBtn *BitBtnOk; TButton *ButtonOk;
TBitBtn *BitBtnCancel; TButton *ButtonCancel;
TEdit *EditDevice; TEdit *EditDevice;
TCSpinEdit *SpinEditTitle; TCSpinEdit *SpinEditTitle;
TCSpinEdit *SpinEditChapter; TCSpinEdit *SpinEditChapter;
TCheckBox *CheckBoxMenus;
TBevel *Bevel1;
void __fastcall FormShow( TObject *Sender ); void __fastcall FormShow( TObject *Sender );
void __fastcall FormHide( TObject *Sender ); void __fastcall FormHide( TObject *Sender );
void __fastcall BitBtnCancelClick( TObject *Sender ); void __fastcall ButtonCancelClick( TObject *Sender );
void __fastcall BitBtnOkClick( TObject *Sender); void __fastcall ButtonOkClick( TObject *Sender);
void __fastcall RadioGroupTypeClick( TObject *Sender ); void __fastcall RadioGroupTypeClick( TObject *Sender );
void __fastcall CheckBoxMenusClick(TObject *Sender);
private: // User declarations private: // User declarations
intf_thread_t *p_intf; intf_thread_t *p_intf;
public: // User declarations public: // User declarations
......
...@@ -253,6 +253,7 @@ object PreferencesDlg: TPreferencesDlg ...@@ -253,6 +253,7 @@ object PreferencesDlg: TPreferencesDlg
Width = 433 Width = 433
Height = 511 Height = 511
Anchors = [akLeft, akTop, akRight, akBottom] Anchors = [akLeft, akTop, akRight, akBottom]
MultiLine = True
TabOrder = 0 TabOrder = 0
end end
object ButtonApply: TButton object ButtonApply: TButton
......
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