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 )
p_intf->p_sys->p_window->OpenDiscAction->Checked = false;
}
//---------------------------------------------------------------------------
void __fastcall TDiscDlg::BitBtnCancelClick( TObject *Sender )
void __fastcall TDiscDlg::ButtonCancelClick( TObject *Sender )
{
Hide();
}
//---------------------------------------------------------------------------
void __fastcall TDiscDlg::BitBtnOkClick( TObject *Sender )
void __fastcall TDiscDlg::ButtonOkClick( TObject *Sender )
{
AnsiString Device, Source, Method, Title, Chapter;
......@@ -79,7 +79,14 @@ void __fastcall TDiscDlg::BitBtnOkClick( TObject *Sender )
Chapter.sprintf( "%d", SpinEditChapter->Value );
/* Build source name and add it to playlist */
Source = Method + ":" + Device + "@" + Title + "," + Chapter;
if ( CheckBoxMenus->Checked )
{
Source = Method + ":" + Device;
}
else
{
Source = Method + ":" + Device + "@" + Title + "," + Chapter;
}
p_intf->p_sys->p_playwin->Add( Source, PLAYLIST_APPEND
| ( p_intf->p_sys->b_play_when_adding ? PLAYLIST_GO : 0 ),
......@@ -94,10 +101,14 @@ void __fastcall TDiscDlg::RadioGroupTypeClick( TObject *Sender )
if( RadioGroupType->ItemIndex == 0 )
{
psz_device = config_GetPsz( p_intf, "dvd" );
CheckBoxMenus->Enabled = true;
CheckBoxMenus->Checked = true;
}
else
{
psz_device = config_GetPsz( p_intf, "vcd" );
CheckBoxMenus->Checked = false;
CheckBoxMenus->Enabled = false;
}
if( psz_device )
......@@ -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
TLabel *LabelTitle;
TLabel *LabelChapter;
TRadioGroup *RadioGroupType;
TBitBtn *BitBtnOk;
TBitBtn *BitBtnCancel;
TButton *ButtonOk;
TButton *ButtonCancel;
TEdit *EditDevice;
TCSpinEdit *SpinEditTitle;
TCSpinEdit *SpinEditChapter;
TCheckBox *CheckBoxMenus;
TBevel *Bevel1;
void __fastcall FormShow( TObject *Sender );
void __fastcall FormHide( TObject *Sender );
void __fastcall BitBtnCancelClick( TObject *Sender );
void __fastcall BitBtnOkClick( TObject *Sender);
void __fastcall ButtonCancelClick( TObject *Sender );
void __fastcall ButtonOkClick( TObject *Sender);
void __fastcall RadioGroupTypeClick( TObject *Sender );
void __fastcall CheckBoxMenusClick(TObject *Sender);
private: // User declarations
intf_thread_t *p_intf;
public: // User declarations
......
......@@ -253,6 +253,7 @@ object PreferencesDlg: TPreferencesDlg
Width = 433
Height = 511
Anchors = [akLeft, akTop, akRight, akBottom]
MultiLine = True
TabOrder = 0
end
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