Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
2fd77aa1
Commit
2fd77aa1
authored
Dec 10, 2002
by
Olivier Teulière
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* ./modules/gui/win32: deletd a dependancy with a global variable
parent
ffddb1ea
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
16 deletions
+22
-16
modules/gui/win32/mainframe.cpp
modules/gui/win32/mainframe.cpp
+1
-1
modules/gui/win32/preferences.cpp
modules/gui/win32/preferences.cpp
+15
-13
modules/gui/win32/preferences.h
modules/gui/win32/preferences.h
+6
-2
No files found.
modules/gui/win32/mainframe.cpp
View file @
2fd77aa1
...
...
@@ -633,7 +633,7 @@ void __fastcall TMainFrameDlg::CreatePreferences( AnsiString Name )
else
{
/* create the config dialog */
Preferences
=
new
TPreferencesDlg
(
this
);
Preferences
=
new
TPreferencesDlg
(
this
,
p_intf
);
Preferences
->
CreateConfigDialog
(
Name
.
c_str
()
);
/* save it */
...
...
modules/gui/win32/preferences.cpp
View file @
2fd77aa1
...
...
@@ -38,8 +38,6 @@
#pragma link "CSPIN"
#pragma resource "*.dfm"
extern
intf_thread_t
*
p_intfGlobal
;
/****************************************************************************
* A THintWindow with a limited width
****************************************************************************/
...
...
@@ -200,8 +198,11 @@ void __fastcall TPanelPref::UpdateChanges()
* Panel for module management
****************************************************************************/
__fastcall
TPanelPlugin
::
TPanelPlugin
(
TComponent
*
Owner
,
module_config_t
*
p_config
)
:
TPanelPref
(
Owner
,
p_config
)
module_config_t
*
p_config
,
intf_thread_t
*
_p_intf
)
:
TPanelPref
(
Owner
,
p_config
)
{
p_intf
=
_p_intf
;
/* init configure button */
ButtonConfig
=
CreateButton
(
this
,
LIBWIN32_PREFSIZE_RIGHT
-
LIBWIN32_PREFSIZE_BUTTON_WIDTH
,
...
...
@@ -261,7 +262,7 @@ void __fastcall TPanelPlugin::CheckListBoxClick( TObject *Sender )
return
;
/* look for module 'Name' */
p_list
=
vlc_list_find
(
p_intf
Global
,
VLC_OBJECT_MODULE
,
FIND_ANYWHERE
);
p_list
=
vlc_list_find
(
p_intf
,
VLC_OBJECT_MODULE
,
FIND_ANYWHERE
);
for
(
pp_parser
=
(
module_t
**
)
p_list
->
pp_objects
;
*
pp_parser
;
...
...
@@ -295,7 +296,7 @@ void __fastcall TPanelPlugin::CheckListBoxClickCheck( TObject *Sender )
//---------------------------------------------------------------------------
void
__fastcall
TPanelPlugin
::
ButtonConfigClick
(
TObject
*
Sender
)
{
p_intf
Global
->
p_sys
->
p_window
->
p_intf
->
p_sys
->
p_window
->
CreatePreferences
(
ModuleSelected
->
psz_object_name
);
}
//---------------------------------------------------------------------------
...
...
@@ -436,10 +437,11 @@ void __fastcall TPanelBool::UpdateChanges()
/****************************************************************************
* Callbacks for the dialog
****************************************************************************/
__fastcall
TPreferencesDlg
::
TPreferencesDlg
(
TComponent
*
Owner
)
:
TForm
(
Owner
)
__fastcall
TPreferencesDlg
::
TPreferencesDlg
(
TComponent
*
Owner
,
intf_thread_t
*
_p_intf
)
:
TForm
(
Owner
)
{
Icon
=
p_intfGlobal
->
p_sys
->
p_window
->
Icon
;
p_intf
=
_p_intf
;
Icon
=
p_intf
->
p_sys
->
p_window
->
Icon
;
Application
->
HintHidePause
=
0x1000000
;
HintWindowClass
=
__classid
(
TNarrowHintWindow
);
/* prevent the form from being resized horizontally */
...
...
@@ -484,7 +486,7 @@ void __fastcall TPreferencesDlg::CreateConfigDialog( char *psz_module_name )
TPanelBool
*
PanelBool
;
/* Look for the selected module */
p_list
=
vlc_list_find
(
p_intf
Global
,
VLC_OBJECT_MODULE
,
FIND_ANYWHERE
);
p_list
=
vlc_list_find
(
p_intf
,
VLC_OBJECT_MODULE
,
FIND_ANYWHERE
);
for
(
pp_parser
=
(
module_t
**
)
p_list
->
pp_objects
;
*
pp_parser
;
...
...
@@ -536,7 +538,7 @@ void __fastcall TPreferencesDlg::CreateConfigDialog( char *psz_module_name )
case
CONFIG_ITEM_MODULE
:
/* add new panel for the config option */
PanelPlugin
=
new
TPanelPlugin
(
this
,
p_item
);
PanelPlugin
=
new
TPanelPlugin
(
this
,
p_item
,
p_intf
);
PanelPlugin
->
Parent
=
ScrollBox
;
/* Look for valid modules */
...
...
@@ -659,7 +661,7 @@ void __fastcall TPreferencesDlg::ButtonApplyClick( TObject *Sender )
void
__fastcall
TPreferencesDlg
::
ButtonSaveClick
(
TObject
*
Sender
)
{
ButtonApplyClick
(
Sender
);
config_SaveConfigFile
(
p_intf
Global
,
NULL
);
config_SaveConfigFile
(
p_intf
,
NULL
);
}
//---------------------------------------------------------------------------
void
__fastcall
TPreferencesDlg
::
ButtonCancelClick
(
TObject
*
Sender
)
...
...
@@ -674,12 +676,12 @@ void __fastcall TPreferencesDlg::SaveValue( module_config_t *p_config )
case
CONFIG_ITEM_STRING
:
case
CONFIG_ITEM_FILE
:
case
CONFIG_ITEM_MODULE
:
config_PutPsz
(
p_intf
Global
,
p_config
->
psz_name
,
config_PutPsz
(
p_intf
,
p_config
->
psz_name
,
*
p_config
->
psz_value
?
p_config
->
psz_value
:
NULL
);
break
;
case
CONFIG_ITEM_INTEGER
:
case
CONFIG_ITEM_BOOL
:
config_PutInt
(
p_intf
Global
,
p_config
->
psz_name
,
config_PutInt
(
p_intf
,
p_config
->
psz_name
,
p_config
->
i_value
);
break
;
}
...
...
modules/gui/win32/preferences.h
View file @
2fd77aa1
...
...
@@ -87,7 +87,8 @@ public:
class
TPanelPlugin
:
public
TPanelPref
{
public:
__fastcall
TPanelPlugin
(
TComponent
*
Owner
,
module_config_t
*
p_config
);
__fastcall
TPanelPlugin
(
TComponent
*
Owner
,
module_config_t
*
p_config
,
intf_thread_t
*
_p_intf
);
TCleanCheckListBox
*
CleanCheckListBox
;
TButton
*
ButtonConfig
;
TLabel
*
Label
;
...
...
@@ -96,6 +97,8 @@ public:
void
__fastcall
CheckListBoxClick
(
TObject
*
Sender
);
void
__fastcall
CheckListBoxClickCheck
(
TObject
*
Sender
);
void
__fastcall
ButtonConfigClick
(
TObject
*
Sender
);
private:
intf_thread_t
*
p_intf
;
};
//---------------------------------------------------------------------------
class
TPanelString
:
public
TPanelPref
...
...
@@ -138,8 +141,9 @@ __published: // IDE-managed Components
void
__fastcall
ButtonCancelClick
(
TObject
*
Sender
);
void
__fastcall
FormClose
(
TObject
*
Sender
,
TCloseAction
&
Action
);
private:
// User declarations
intf_thread_t
*
p_intf
;
public:
// User declarations
__fastcall
TPreferencesDlg
(
TComponent
*
Owner
);
__fastcall
TPreferencesDlg
(
TComponent
*
Owner
,
intf_thread_t
*
_p_intf
);
void
__fastcall
CreateConfigDialog
(
char
*
psz_module_name
);
void
__fastcall
SaveValue
(
module_config_t
*
p_config
);
};
...
...
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