Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
3fdc9959
Commit
3fdc9959
authored
Apr 03, 2002
by
Olivier Teulière
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* ./plugins/win32/*: Added management for secondary config dialogs
parent
5ba63c66
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
69 additions
and
52 deletions
+69
-52
plugins/win32/mainframe.cpp
plugins/win32/mainframe.cpp
+46
-11
plugins/win32/mainframe.dfm
plugins/win32/mainframe.dfm
+13
-13
plugins/win32/mainframe.h
plugins/win32/mainframe.h
+3
-0
plugins/win32/preferences.cpp
plugins/win32/preferences.cpp
+6
-28
plugins/win32/preferences.dfm
plugins/win32/preferences.dfm
+1
-0
No files found.
plugins/win32/mainframe.cpp
View file @
3fdc9959
...
...
@@ -68,6 +68,13 @@ __fastcall TMainFrameDlg::TMainFrameDlg( TComponent* Owner )
/* default height */
ClientHeight
=
37
+
ToolBar
->
Height
;
StringListPref
=
new
TStringList
();
}
//---------------------------------------------------------------------------
__fastcall
TMainFrameDlg
::~
TMainFrameDlg
()
{
delete
StringListPref
;
}
//---------------------------------------------------------------------------
...
...
@@ -210,17 +217,7 @@ void __fastcall TMainFrameDlg::MenuMessagesClick( TObject *Sender )
//---------------------------------------------------------------------------
void
__fastcall
TMainFrameDlg
::
MenuPreferencesClick
(
TObject
*
Sender
)
{
TPreferencesDlg
*
p_preferences
=
p_intfGlobal
->
p_sys
->
p_preferences
;
if
(
p_preferences
==
NULL
)
{
p_preferences
=
new
TPreferencesDlg
(
this
);
p_preferences
->
CreateConfigDialog
(
"main"
);
p_intfGlobal
->
p_sys
->
p_preferences
=
p_preferences
;
}
else
{
p_preferences
->
Show
();
}
CreatePreferences
(
"main"
);
}
//---------------------------------------------------------------------------
void
__fastcall
TMainFrameDlg
::
MenuAboutClick
(
TObject
*
Sender
)
...
...
@@ -690,3 +687,41 @@ void __fastcall TMainFrameDlg::ModeManage()
}
//---------------------------------------------------------------------------
/*****************************************************************************
* CreateConfig: create a configuration dialog and save it for further use
*****************************************************************************
* Check if the dialog box is already opened, if so this will save us
* quite a bit of work. (the interface will be destroyed when you actually
* close the main window, but remember that it is only hidden if you
* clicked on the action buttons). This trick also allows us not to
* duplicate identical dialog windows.
*****************************************************************************/
void
__fastcall
TMainFrameDlg
::
CreatePreferences
(
AnsiString
Name
)
{
TPreferencesDlg
*
Preferences
;
int
i_index
,
i_pos
;
i_index
=
StringListPref
->
IndexOf
(
Name
);
if
(
i_index
!=
-
1
)
{
/* config dialog already exists */
Preferences
=
(
TPreferencesDlg
*
)
StringListPref
->
Objects
[
i_index
];
}
else
{
/* create the config dialog */
Preferences
=
new
TPreferencesDlg
(
this
);
Preferences
->
CreateConfigDialog
(
Name
.
c_str
()
);
/* save it */
i_pos
=
StringListPref
->
Add
(
Name
);
StringListPref
->
Objects
[
i_pos
]
=
Preferences
;
}
/* display the dialog */
Preferences
->
Show
();
}
//---------------------------------------------------------------------------
plugins/win32/mainframe.dfm
View file @
3fdc9959
object MainFrameDlg: TMainFrameDlg
Left = 3
0
4
Top =
245
Width = 53
4
Height = 30
7
Left = 3
1
4
Top =
198
Width = 53
5
Height = 30
6
BorderIcons = [biSystemMenu, biMinimize]
Caption = 'VideoLAN Client (win32 interface)'
Color = clBtnFace
...
...
@@ -140,7 +140,7 @@ object MainFrameDlg: TMainFrameDlg
object ToolBar: TToolBar
Left = 0
Top = 0
Width = 52
6
Width = 52
7
Height = 60
ButtonHeight = 52
ButtonWidth = 39
...
...
@@ -276,8 +276,8 @@ object MainFrameDlg: TMainFrameDlg
end
object StatusBar: TStatusBar
Left = 0
Top = 24
2
Width = 52
6
Top = 24
1
Width = 52
7
Height = 19
Panels = <>
ParentShowHint = False
...
...
@@ -287,7 +287,7 @@ object MainFrameDlg: TMainFrameDlg
object GroupBoxFile: TGroupBox
Left = 0
Top = 100
Width = 52
6
Width = 52
7
Height = 32
Align = alTop
TabOrder = 2
...
...
@@ -295,7 +295,7 @@ object MainFrameDlg: TMainFrameDlg
object LabelFileName: TLabel
Left = 2
Top = 15
Width = 52
2
Width = 52
3
Height = 15
Align = alClient
Alignment = taCenter
...
...
@@ -305,7 +305,7 @@ object MainFrameDlg: TMainFrameDlg
object GroupBoxNetwork: TGroupBox
Left = 0
Top = 164
Width = 52
6
Width = 52
7
Height = 40
Align = alTop
TabOrder = 3
...
...
@@ -357,7 +357,7 @@ object MainFrameDlg: TMainFrameDlg
object GroupBoxDisc: TGroupBox
Left = 0
Top = 132
Width = 52
6
Width = 52
7
Height = 32
Align = alTop
TabOrder = 4
...
...
@@ -441,7 +441,7 @@ object MainFrameDlg: TMainFrameDlg
object GroupBoxSlider: TGroupBox
Left = 0
Top = 60
Width = 52
6
Width = 52
7
Height = 40
Align = alTop
Caption = '0:00:00'
...
...
@@ -450,7 +450,7 @@ object MainFrameDlg: TMainFrameDlg
object TrackBar: TTrackBar
Left = 2
Top = 15
Width = 52
2
Width = 52
3
Height = 21
Align = alTop
Orientation = trHorizontal
...
...
plugins/win32/mainframe.h
View file @
3fdc9959
...
...
@@ -185,9 +185,12 @@ __published: // IDE-managed Components
void
__fastcall
ButtonGoClick
(
TObject
*
Sender
);
private:
// User declarations
public:
// User declarations
TStringList
*
StringListPref
;
/* stores config dialogs */
__fastcall
TMainFrameDlg
(
TComponent
*
Owner
);
virtual
__fastcall
~
TMainFrameDlg
();
void
__fastcall
DisplayHint
(
TObject
*
Sender
);
void
__fastcall
ModeManage
();
void
__fastcall
CreatePreferences
(
AnsiString
Name
);
void
__fastcall
MenuProgramClick
(
TObject
*
Sender
);
void
__fastcall
MenuAudioClick
(
TObject
*
Sender
);
void
__fastcall
MenuSubtitleClick
(
TObject
*
Sender
);
...
...
plugins/win32/preferences.cpp
View file @
3fdc9959
...
...
@@ -158,6 +158,7 @@ __fastcall TGroupBoxPlugin::TGroupBoxPlugin( TComponent* Owner,
/* init configure button */
ButtonConfig
=
CreateButton
(
this
,
16
,
70
,
192
,
25
,
"Configure"
);
ButtonConfig
->
Enabled
=
false
;
ButtonConfig
->
OnClick
=
ButtonConfigClick
;
/* init select button */
ButtonSelect
=
CreateButton
(
this
,
110
,
70
,
192
,
25
,
"Select"
);
...
...
@@ -210,7 +211,7 @@ void __fastcall TGroupBoxPlugin::ButtonSelectClick( TObject *Sender )
//---------------------------------------------------------------------------
void
__fastcall
TGroupBoxPlugin
::
ButtonConfigClick
(
TObject
*
Sender
)
{
/* FIXME: TODO */
p_intfGlobal
->
p_sys
->
p_window
->
CreatePreferences
(
ModuleSelected
->
psz_name
);
}
//---------------------------------------------------------------------------
void
__fastcall
TGroupBoxPlugin
::
UpdateChanges
()
...
...
@@ -326,14 +327,18 @@ void __fastcall TPreferencesDlg::FormClose( TObject *Sender,
//---------------------------------------------------------------------------
void
__fastcall
TPreferencesDlg
::
FormShow
(
TObject
*
Sender
)
{
/*
p_intfGlobal->p_sys->p_window->MenuPreferences->Checked = true;
p_intfGlobal->p_sys->p_window->PopupPreferences->Checked = true;
*/
}
//---------------------------------------------------------------------------
void
__fastcall
TPreferencesDlg
::
FormHide
(
TObject
*
Sender
)
{
/*
p_intfGlobal->p_sys->p_window->MenuPreferences->Checked = false;
p_intfGlobal->p_sys->p_window->PopupPreferences->Checked = false;
*/
}
...
...
@@ -352,7 +357,6 @@ void __fastcall TPreferencesDlg::FormHide( TObject *Sender )
void
__fastcall
TPreferencesDlg
::
CreateConfigDialog
(
char
*
psz_module_name
)
{
bool
config_dialog
;
module_t
*
p_module
;
module_t
*
p_module_plugins
;
unsigned
int
i
;
...
...
@@ -367,28 +371,10 @@ void __fastcall TPreferencesDlg::CreateConfigDialog( char *psz_module_name )
TGroupBoxBool
*
GroupBoxBool
;
TListItem
*
ListItem
;
/* Check if the dialog box is already opened, if so this will save us
* quite a bit of work. (the interface will be destroyed when you actually
* close the main window, but remember that it is only hidden if you
* clicked on the action buttons). This trick also allows us not to
* duplicate identical dialog windows. */
/* FIXME: we must find a way of really checking whether the dialog
* box is already opened */
config_dialog
=
false
;
if
(
config_dialog
)
{
/* Yeah it was open */
Show
();
return
;
}
/* Look for the selected module */
for
(
p_module
=
p_module_bank
->
first
;
p_module
!=
NULL
;
p_module
=
p_module
->
next
)
{
if
(
psz_module_name
&&
!
strcmp
(
psz_module_name
,
p_module
->
psz_name
)
)
break
;
}
...
...
@@ -498,14 +484,6 @@ void __fastcall TPreferencesDlg::CreateConfigDialog( char *psz_module_name )
* FIXME: i don't know why, but both lines are necessary */
PageControlPref
->
ActivePageIndex
=
1
;
PageControlPref
->
ActivePageIndex
=
0
;
/* Ok, job done successfully. Let's keep a reference to the dialog box*/
/* FIXME: TODO */
/* we want this ref to be destroyed if the object is destroyed */
/* FIXME: TODO */
Show
();
}
#undef ADD_PANEL
//---------------------------------------------------------------------------
...
...
plugins/win32/preferences.dfm
View file @
3fdc9959
...
...
@@ -242,6 +242,7 @@ object PreferencesDlg: TPreferencesDlg
01FFFFFF0000FFFF01FFFFFF0000FFFF81FFFFFF0000FFFFC3FFFFFF0000FFFF
FFFFFFFF0000FFFFFFFFFFFF0000FFFFFFFFFFFF0000FFFFFFFFFFFF0000}
OldCreateOrder = False
Position = poDefaultPosOnly
OnClose = FormClose
OnHide = FormHide
OnShow = FormShow
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment