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
c19c673b
Commit
c19c673b
authored
Nov 27, 2002
by
Olivier Teulière
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* ./modules/gui/win32/*: some cleaning
parent
7244736d
Changes
14
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
134 additions
and
140 deletions
+134
-140
modules/gui/win32/about.cpp
modules/gui/win32/about.cpp
+3
-4
modules/gui/win32/about.h
modules/gui/win32/about.h
+2
-1
modules/gui/win32/disc.cpp
modules/gui/win32/disc.cpp
+8
-9
modules/gui/win32/disc.h
modules/gui/win32/disc.h
+7
-6
modules/gui/win32/mainframe.cpp
modules/gui/win32/mainframe.cpp
+31
-40
modules/gui/win32/mainframe.h
modules/gui/win32/mainframe.h
+2
-1
modules/gui/win32/messages.cpp
modules/gui/win32/messages.cpp
+8
-9
modules/gui/win32/messages.h
modules/gui/win32/messages.h
+2
-1
modules/gui/win32/network.cpp
modules/gui/win32/network.cpp
+36
-37
modules/gui/win32/network.h
modules/gui/win32/network.h
+2
-1
modules/gui/win32/playlist.cpp
modules/gui/win32/playlist.cpp
+26
-24
modules/gui/win32/playlist.h
modules/gui/win32/playlist.h
+3
-2
modules/gui/win32/win32.cpp
modules/gui/win32/win32.cpp
+4
-4
modules/gui/win32/win32_common.h
modules/gui/win32/win32_common.h
+0
-1
No files found.
modules/gui/win32/about.cpp
View file @
c19c673b
...
...
@@ -34,13 +34,12 @@
//#pragma package(smart_init)
#pragma resource "*.dfm"
extern
intf_thread_t
*
p_intfGlobal
;
//---------------------------------------------------------------------------
__fastcall
TAboutDlg
::
TAboutDlg
(
TComponent
*
Owner
)
__fastcall
TAboutDlg
::
TAboutDlg
(
TComponent
*
Owner
,
intf_thread_t
*
_p_intf
)
:
TForm
(
Owner
)
{
Image1
->
Picture
->
Icon
=
p_intfGlobal
->
p_sys
->
p_window
->
Icon
;
p_intf
=
_p_intf
;
Image1
->
Picture
->
Icon
=
p_intf
->
p_sys
->
p_window
->
Icon
;
LabelVersion
->
Caption
=
"Version "
VERSION
;
Translate
(
this
);
}
...
...
modules/gui/win32/about.h
View file @
c19c673b
...
...
@@ -43,8 +43,9 @@ __published: // IDE-managed Components
TLabel
*
Label5
;
TLabel
*
LabelVersion
;
private:
// User declarations
intf_thread_t
*
p_intf
;
public:
// User declarations
__fastcall
TAboutDlg
(
TComponent
*
Owner
);
__fastcall
TAboutDlg
(
TComponent
*
Owner
,
intf_thread_t
*
_p_intf
);
};
//---------------------------------------------------------------------------
#endif
modules/gui/win32/disc.cpp
View file @
c19c673b
...
...
@@ -35,12 +35,11 @@
#pragma link "CSPIN"
#pragma resource "*.dfm"
extern
intf_thread_t
*
p_intfGlobal
;
//---------------------------------------------------------------------------
__fastcall
TDiscDlg
::
TDiscDlg
(
TComponent
*
Owner
)
__fastcall
TDiscDlg
::
TDiscDlg
(
TComponent
*
Owner
,
intf_thread_t
*
_p_intf
)
:
TForm
(
Owner
)
{
p_intf
=
_p_intf
;
/* Simulate a click to get the correct device name */
RadioGroupTypeClick
(
RadioGroupType
);
Translate
(
this
);
...
...
@@ -48,12 +47,12 @@ __fastcall TDiscDlg::TDiscDlg( TComponent* Owner )
//---------------------------------------------------------------------------
void
__fastcall
TDiscDlg
::
FormShow
(
TObject
*
Sender
)
{
p_intf
Global
->
p_sys
->
p_window
->
OpenDiscAction
->
Checked
=
true
;
p_intf
->
p_sys
->
p_window
->
OpenDiscAction
->
Checked
=
true
;
}
//---------------------------------------------------------------------------
void
__fastcall
TDiscDlg
::
FormHide
(
TObject
*
Sender
)
{
p_intf
Global
->
p_sys
->
p_window
->
OpenDiscAction
->
Checked
=
false
;
p_intf
->
p_sys
->
p_window
->
OpenDiscAction
->
Checked
=
false
;
}
//---------------------------------------------------------------------------
void
__fastcall
TDiscDlg
::
BitBtnCancelClick
(
TObject
*
Sender
)
...
...
@@ -67,7 +66,7 @@ void __fastcall TDiscDlg::BitBtnOkClick( TObject *Sender )
playlist_t
*
p_playlist
;
p_playlist
=
(
playlist_t
*
)
vlc_object_find
(
p_intf
Global
,
VLC_OBJECT_PLAYLIST
,
FIND_ANYWHERE
);
vlc_object_find
(
p_intf
,
VLC_OBJECT_PLAYLIST
,
FIND_ANYWHERE
);
if
(
p_playlist
==
NULL
)
{
return
;
...
...
@@ -97,7 +96,7 @@ void __fastcall TDiscDlg::BitBtnOkClick( TObject *Sender )
PLAYLIST_APPEND
|
PLAYLIST_GO
,
PLAYLIST_END
);
/* update the display */
p_intf
Global
->
p_sys
->
p_playwin
->
UpdateGrid
(
p_playlist
);
p_intf
->
p_sys
->
p_playwin
->
UpdateGrid
(
p_playlist
);
vlc_object_release
(
p_playlist
);
}
...
...
@@ -109,11 +108,11 @@ void __fastcall TDiscDlg::RadioGroupTypeClick( TObject *Sender )
if
(
RadioGroupType
->
ItemIndex
==
0
)
{
psz_device
=
config_GetPsz
(
p_intf
Global
,
"dvd"
);
psz_device
=
config_GetPsz
(
p_intf
,
"dvd"
);
}
else
{
psz_device
=
config_GetPsz
(
p_intf
Global
,
"vcd"
);
psz_device
=
config_GetPsz
(
p_intf
,
"vcd"
);
}
if
(
psz_device
)
...
...
modules/gui/win32/disc.h
View file @
c19c673b
...
...
@@ -45,14 +45,15 @@ __published: // IDE-managed Components
TEdit
*
EditDevice
;
TCSpinEdit
*
SpinEditTitle
;
TCSpinEdit
*
SpinEditChapter
;
void
__fastcall
FormShow
(
TObject
*
Sender
);
void
__fastcall
FormHide
(
TObject
*
Sender
);
void
__fastcall
BitBtnCancelClick
(
TObject
*
Sender
);
void
__fastcall
BitBtnOkClick
(
TObject
*
Sender
);
void
__fastcall
RadioGroupTypeClick
(
TObject
*
Sender
);
void
__fastcall
FormShow
(
TObject
*
Sender
);
void
__fastcall
FormHide
(
TObject
*
Sender
);
void
__fastcall
BitBtnCancelClick
(
TObject
*
Sender
);
void
__fastcall
BitBtnOkClick
(
TObject
*
Sender
);
void
__fastcall
RadioGroupTypeClick
(
TObject
*
Sender
);
private:
// User declarations
intf_thread_t
*
p_intf
;
public:
// User declarations
__fastcall
TDiscDlg
(
TComponent
*
Owner
);
__fastcall
TDiscDlg
(
TComponent
*
Owner
,
intf_thread_t
*
_p_intf
);
};
//---------------------------------------------------------------------------
#endif
modules/gui/win32/mainframe.cpp
View file @
c19c673b
This diff is collapsed.
Click to expand it.
modules/gui/win32/mainframe.h
View file @
c19c673b
...
...
@@ -192,9 +192,10 @@ __published: // IDE-managed Components
void
__fastcall
PrevChapterActionExecute
(
TObject
*
Sender
);
void
__fastcall
NextChapterActionExecute
(
TObject
*
Sender
);
private:
// User declarations
intf_thread_t
*
p_intf
;
public:
// User declarations
TStringList
*
StringListPref
;
/* stores config dialogs */
__fastcall
TMainFrameDlg
(
TComponent
*
Owner
);
__fastcall
TMainFrameDlg
(
TComponent
*
Owner
,
intf_thread_t
*
_p_intf
);
virtual
__fastcall
~
TMainFrameDlg
();
void
__fastcall
DisplayHint
(
TObject
*
Sender
);
void
__fastcall
ModeManage
();
...
...
modules/gui/win32/messages.cpp
View file @
c19c673b
...
...
@@ -34,13 +34,12 @@
#pragma package(smart_init)
#pragma resource "*.dfm"
extern
intf_thread_t
*
p_intfGlobal
;
//---------------------------------------------------------------------------
__fastcall
TMessagesDlg
::
TMessagesDlg
(
TComponent
*
Owner
)
:
TForm
(
Owner
)
__fastcall
TMessagesDlg
::
TMessagesDlg
(
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
;
Translate
(
this
);
}
//---------------------------------------------------------------------------
...
...
@@ -51,17 +50,17 @@ void __fastcall TMessagesDlg::ButtonOKClick( TObject *Sender )
//---------------------------------------------------------------------------
void
__fastcall
TMessagesDlg
::
FormHide
(
TObject
*
Sender
)
{
p_intf
Global
->
p_sys
->
p_window
->
MessagesAction
->
Checked
=
false
;
p_intf
->
p_sys
->
p_window
->
MessagesAction
->
Checked
=
false
;
}
//---------------------------------------------------------------------------
void
__fastcall
TMessagesDlg
::
FormShow
(
TObject
*
Sender
)
{
p_intf
Global
->
p_sys
->
p_window
->
MessagesAction
->
Checked
=
true
;
p_intf
->
p_sys
->
p_window
->
MessagesAction
->
Checked
=
true
;
}
//---------------------------------------------------------------------------
void
__fastcall
TMessagesDlg
::
UpdateLog
()
{
msg_subscription_t
*
p_sub
=
p_intf
Global
->
p_sys
->
p_sub
;
msg_subscription_t
*
p_sub
=
p_intf
->
p_sys
->
p_sub
;
int
i_start
,
i_stop
,
i_del
,
i_count
;
int
i_max_lines
;
...
...
@@ -91,7 +90,7 @@ void __fastcall TMessagesDlg::UpdateLog()
/* Limit log size */
i_count
=
RichEditMessages
->
Lines
->
Count
;
i_max_lines
=
config_GetInt
(
p_intf
Global
,
"intfwin-max-lines"
);
i_max_lines
=
config_GetInt
(
p_intf
,
"intfwin-max-lines"
);
if
(
i_max_lines
>
0
)
{
for
(
i_del
=
0
;
i_del
<=
i_count
-
i_max_lines
;
i_del
++
)
...
...
modules/gui/win32/messages.h
View file @
c19c673b
...
...
@@ -39,8 +39,9 @@ __published: // IDE-managed Components
void
__fastcall
FormHide
(
TObject
*
Sender
);
void
__fastcall
FormShow
(
TObject
*
Sender
);
private:
// User declarations
intf_thread_t
*
p_intf
;
public:
// User declarations
__fastcall
TMessagesDlg
(
TComponent
*
Owner
);
__fastcall
TMessagesDlg
(
TComponent
*
Owner
,
intf_thread_t
*
_p_intf
);
void
__fastcall
UpdateLog
();
};
//---------------------------------------------------------------------------
...
...
modules/gui/win32/network.cpp
View file @
c19c673b
...
...
@@ -37,47 +37,46 @@
#pragma link "CSPIN"
#pragma resource "*.dfm"
extern
intf_thread_t
*
p_intfGlobal
;
//---------------------------------------------------------------------------
__fastcall
TNetworkDlg
::
TNetworkDlg
(
TComponent
*
Owner
)
__fastcall
TNetworkDlg
::
TNetworkDlg
(
TComponent
*
Owner
,
intf_thread_t
*
_p_intf
)
:
TForm
(
Owner
)
{
p_intf
=
_p_intf
;
char
*
psz_channel_server
;
OldRadioValue
=
0
;
/* server port */
SpinEditUDPPort
->
Value
=
config_GetInt
(
p_intfGlobal
,
"server-port"
);
SpinEditMulticastPort
->
Value
=
config_GetInt
(
p_intfGlobal
,
"server-port"
);
SpinEditUDPPort
->
Value
=
config_GetInt
(
p_intf
,
"server-port"
);
SpinEditMulticastPort
->
Value
=
config_GetInt
(
p_intf
,
"server-port"
);
/* channel server */
if
(
config_GetInt
(
p_intfGlobal
,
"network-channel"
)
)
if
(
config_GetInt
(
p_intf
,
"network-channel"
)
)
{
RadioButtonCS
->
Checked
=
true
;
RadioButtonCSEnter
(
RadioButtonCS
);
}
psz_channel_server
=
config_GetPsz
(
p_intfGlobal
,
"channel-server"
);
psz_channel_server
=
config_GetPsz
(
p_intf
,
"channel-server"
);
if
(
psz_channel_server
)
{
ComboBoxCSAddress
->
Text
=
psz_channel_server
;
free
(
psz_channel_server
);
}
SpinEditCSPort
->
Value
=
config_GetInt
(
p_intfGlobal
,
"channel-port"
);
SpinEditCSPort
->
Value
=
config_GetInt
(
p_intf
,
"channel-port"
);
Translate
(
this
);
}
//---------------------------------------------------------------------------
void
__fastcall
TNetworkDlg
::
FormShow
(
TObject
*
Sender
)
{
p_intf
Global
->
p_sys
->
p_window
->
NetworkStreamAction
->
Checked
=
true
;
p_intf
->
p_sys
->
p_window
->
NetworkStreamAction
->
Checked
=
true
;
}
//---------------------------------------------------------------------------
void
__fastcall
TNetworkDlg
::
FormHide
(
TObject
*
Sender
)
{
p_intf
Global
->
p_sys
->
p_window
->
NetworkStreamAction
->
Checked
=
false
;
p_intf
->
p_sys
->
p_window
->
NetworkStreamAction
->
Checked
=
false
;
}
//---------------------------------------------------------------------------
void
__fastcall
TNetworkDlg
::
BitBtnCancelClick
(
TObject
*
Sender
)
...
...
@@ -94,7 +93,7 @@ void __fastcall TNetworkDlg::BitBtnOkClick( TObject *Sender )
playlist_t
*
p_playlist
;
p_playlist
=
(
playlist_t
*
)
vlc_object_find
(
p_intf
Global
,
VLC_OBJECT_PLAYLIST
,
FIND_ANYWHERE
);
vlc_object_find
(
p_intf
,
VLC_OBJECT_PLAYLIST
,
FIND_ANYWHERE
);
if
(
p_playlist
==
NULL
)
{
return
;
...
...
@@ -107,7 +106,7 @@ void __fastcall TNetworkDlg::BitBtnOkClick( TObject *Sender )
{
/* UDP */
case
0
:
config_PutInt
(
p_intf
Global
,
"network-channel"
,
FALSE
);
config_PutInt
(
p_intf
,
"network-channel"
,
FALSE
);
i_port
=
SpinEditUDPPort
->
Value
;
/* Build source name */
...
...
@@ -117,12 +116,12 @@ void __fastcall TNetworkDlg::BitBtnOkClick( TObject *Sender )
PLAYLIST_APPEND
|
PLAYLIST_GO
,
PLAYLIST_END
);
/* update the display */
p_intf
Global
->
p_sys
->
p_playwin
->
UpdateGrid
(
p_playlist
);
p_intf
->
p_sys
->
p_playwin
->
UpdateGrid
(
p_playlist
);
break
;
/* UDP Multicast */
case
1
:
config_PutInt
(
p_intf
Global
,
"network-channel"
,
FALSE
);
config_PutInt
(
p_intf
,
"network-channel"
,
FALSE
);
Address
=
ComboBoxMulticastAddress
->
Text
;
i_port
=
SpinEditMulticastPort
->
Value
;
...
...
@@ -133,26 +132,26 @@ void __fastcall TNetworkDlg::BitBtnOkClick( TObject *Sender )
PLAYLIST_APPEND
|
PLAYLIST_GO
,
PLAYLIST_END
);
/* update the display */
p_intf
Global
->
p_sys
->
p_playwin
->
UpdateGrid
(
p_playlist
);
p_intf
->
p_sys
->
p_playwin
->
UpdateGrid
(
p_playlist
);
break
;
/* Channel server */
case
2
:
config_PutInt
(
p_intf
Global
,
"network-channel"
,
TRUE
);
config_PutPsz
(
p_intf
Global
,
"channel-server"
,
Channel
.
c_str
()
);
config_PutInt
(
p_intf
Global
,
"channel-port"
,
i_channel_port
);
config_PutInt
(
p_intf
,
"network-channel"
,
TRUE
);
config_PutPsz
(
p_intf
,
"channel-server"
,
Channel
.
c_str
()
);
config_PutInt
(
p_intf
,
"channel-port"
,
i_channel_port
);
if
(
p_intf
Global
->
p_vlc
->
p_channel
==
NULL
)
if
(
p_intf
->
p_vlc
->
p_channel
==
NULL
)
{
network_ChannelCreate
(
p_intf
Global
);
network_ChannelCreate
(
p_intf
);
}
p_intf
Global
->
p_sys
->
b_playing
=
1
;
p_intf
->
p_sys
->
b_playing
=
1
;
break
;
/* HTTP */
case
3
:
config_PutInt
(
p_intf
Global
,
"network-channel"
,
FALSE
);
config_PutInt
(
p_intf
,
"network-channel"
,
FALSE
);
Address
=
EditHTTPURL
->
Text
;
/* Build source name with a basic test */
...
...
@@ -169,7 +168,7 @@ void __fastcall TNetworkDlg::BitBtnOkClick( TObject *Sender )
PLAYLIST_APPEND
|
PLAYLIST_GO
,
PLAYLIST_END
);
/* update the display */
p_intf
Global
->
p_sys
->
p_playwin
->
UpdateGrid
(
p_playlist
);
p_intf
->
p_sys
->
p_playwin
->
UpdateGrid
(
p_playlist
);
break
;
}
...
...
modules/gui/win32/network.h
View file @
c19c673b
...
...
@@ -68,8 +68,9 @@ __published: // IDE-managed Components
private:
// User declarations
int
OldRadioValue
;
void
__fastcall
ChangeEnabled
(
int
i_selected
);
intf_thread_t
*
p_intf
;
public:
// User declarations
__fastcall
TNetworkDlg
(
TComponent
*
Owner
);
__fastcall
TNetworkDlg
(
TComponent
*
Owner
,
intf_thread_t
*
_p_intf
);
};
//---------------------------------------------------------------------------
#endif
modules/gui/win32/playlist.cpp
View file @
c19c673b
...
...
@@ -34,13 +34,12 @@
//#pragma package(smart_init)
#pragma resource "*.dfm"
extern
intf_thread_t
*
p_intfGlobal
;
//---------------------------------------------------------------------------
__fastcall
TPlaylistDlg
::
TPlaylistDlg
(
TComponent
*
Owner
)
:
TForm
(
Owner
)
__fastcall
TPlaylistDlg
::
TPlaylistDlg
(
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
;
Translate
(
this
);
}
//---------------------------------------------------------------------------
...
...
@@ -70,12 +69,12 @@ char * __fastcall TPlaylistDlg::rindex( char *s, char c )
****************************************************************************/
void
__fastcall
TPlaylistDlg
::
FormShow
(
TObject
*
Sender
)
{
p_intf
Global
->
p_sys
->
p_window
->
PlaylistAction
->
Checked
=
true
;
p_intf
->
p_sys
->
p_window
->
PlaylistAction
->
Checked
=
true
;
}
//---------------------------------------------------------------------------
void
__fastcall
TPlaylistDlg
::
FormHide
(
TObject
*
Sender
)
{
p_intf
Global
->
p_sys
->
p_window
->
PlaylistAction
->
Checked
=
false
;
p_intf
->
p_sys
->
p_window
->
PlaylistAction
->
Checked
=
false
;
}
//---------------------------------------------------------------------------
void
__fastcall
TPlaylistDlg
::
BitBtnOkClick
(
TObject
*
Sender
)
...
...
@@ -90,7 +89,7 @@ void __fastcall TPlaylistDlg::PlayStreamActionExecute( TObject *Sender )
TItemStates
Focused
;
playlist_t
*
p_playlist
=
(
playlist_t
*
)
vlc_object_find
(
p_intf
Global
,
VLC_OBJECT_PLAYLIST
,
FIND_ANYWHERE
);
vlc_object_find
(
p_intf
,
VLC_OBJECT_PLAYLIST
,
FIND_ANYWHERE
);
if
(
p_playlist
==
NULL
)
{
return
;
...
...
@@ -140,7 +139,7 @@ void __fastcall TPlaylistDlg::ListViewPlaylistCustomDrawItem(
TRect
Rect
=
Item
->
DisplayRect
(
drBounds
);
/* set the background color */
if
(
Item
->
Index
==
p_intf
Global
->
p_sys
->
i_playing
)
if
(
Item
->
Index
==
p_intf
->
p_sys
->
i_playing
)
{
Sender
->
Canvas
->
Brush
->
Color
=
clRed
;
}
...
...
@@ -159,17 +158,17 @@ void __fastcall TPlaylistDlg::ListViewPlaylistCustomDrawItem(
****************************************************************************/
void
__fastcall
TPlaylistDlg
::
MenuAddFileClick
(
TObject
*
Sender
)
{
p_intf
Global
->
p_sys
->
p_window
->
OpenFileActionExecute
(
Sender
);
p_intf
->
p_sys
->
p_window
->
OpenFileActionExecute
(
Sender
);
}
//---------------------------------------------------------------------------
void
__fastcall
TPlaylistDlg
::
MenuAddDiscClick
(
TObject
*
Sender
)
{
p_intf
Global
->
p_sys
->
p_window
->
OpenDiscActionExecute
(
Sender
);
p_intf
->
p_sys
->
p_window
->
OpenDiscActionExecute
(
Sender
);
}
//---------------------------------------------------------------------------
void
__fastcall
TPlaylistDlg
::
MenuAddNetClick
(
TObject
*
Sender
)
{
p_intf
Global
->
p_sys
->
p_window
->
NetworkStreamActionExecute
(
Sender
);
p_intf
->
p_sys
->
p_window
->
NetworkStreamActionExecute
(
Sender
);
}
//---------------------------------------------------------------------------
void
__fastcall
TPlaylistDlg
::
MenuAddUrlClick
(
TObject
*
Sender
)
...
...
@@ -182,10 +181,10 @@ void __fastcall TPlaylistDlg::DeleteSelectionActionExecute( TObject *Sender )
#if 0 /* PLAYLIST TARASS */
/* user wants to delete a file in the queue */
int i_pos;
playlist_t *p_playlist = p_intf
Global
->p_vlc->p_playlist;
playlist_t *p_playlist = p_intf->p_vlc->p_playlist;
/* lock the struct */
vlc_mutex_lock( &p_intf
Global
->change_lock );
vlc_mutex_lock( &p_intf->change_lock );
/* delete the items from the last to the first */
for( i_pos = p_playlist->i_size - 1; i_pos >= 0; i_pos-- )
...
...
@@ -199,7 +198,7 @@ void __fastcall TPlaylistDlg::DeleteSelectionActionExecute( TObject *Sender )
/* Rebuild the ListView */
UpdateGrid( p_playlist );
vlc_mutex_unlock( &p_intf
Global
->change_lock );
vlc_mutex_unlock( &p_intf->change_lock );
#endif
}
//---------------------------------------------------------------------------
...
...
@@ -207,10 +206,10 @@ void __fastcall TPlaylistDlg::DeleteAllActionExecute( TObject *Sender )
{
#if 0 /* PLAYLIST TARASS */
int i_pos;
playlist_t *p_playlist = p_intf
Global
->p_vlc->p_playlist;
playlist_t *p_playlist = p_intf->p_vlc->p_playlist;
/* lock the struct */
vlc_mutex_lock( &p_intf
Global
->change_lock );
vlc_mutex_lock( &p_intf->change_lock );
/* delete the items from the last to the first */
for( i_pos = p_playlist->i_size - 1; i_pos >= 0; i_pos-- )
...
...
@@ -221,7 +220,7 @@ void __fastcall TPlaylistDlg::DeleteAllActionExecute( TObject *Sender )
/* Rebuild the ListView */
UpdateGrid( p_playlist );
vlc_mutex_unlock( &p_intf
Global
->change_lock );
vlc_mutex_unlock( &p_intf->change_lock );
#endif
}
//---------------------------------------------------------------------------
...
...
@@ -230,7 +229,7 @@ void __fastcall TPlaylistDlg::InvertSelectionActionExecute( TObject *Sender )
#if 0 /* PLAYLIST TARASS */
#define NOT( var ) ( (var) ? false : true )
int i_pos;
playlist_t *p_playlist = p_intf
Global
->p_vlc->p_playlist;
playlist_t *p_playlist = p_intf->p_vlc->p_playlist;
TListItems *Items = ListViewPlaylist->Items;
/* delete the items from the last to the first */
...
...
@@ -293,10 +292,10 @@ void __fastcall TPlaylistDlg::UpdateGrid( playlist_t * p_playlist )
ListViewPlaylist
->
Items
->
EndUpdate
();
}
//---------------------------------------------------------------------------
void
__fastcall
TPlaylistDlg
::
Manage
(
intf_thread_t
*
p_intf
)
void
__fastcall
TPlaylistDlg
::
Manage
()
{
playlist_t
*
p_playlist
=
(
playlist_t
*
)
vlc_object_find
(
p_intf
Global
,
VLC_OBJECT_PLAYLIST
,
FIND_ANYWHERE
);
vlc_object_find
(
p_intf
,
VLC_OBJECT_PLAYLIST
,
FIND_ANYWHERE
);
if
(
p_playlist
==
NULL
)
{
return
;
...
...
@@ -319,37 +318,40 @@ void __fastcall TPlaylistDlg::Manage( intf_thread_t * p_intf )
void
__fastcall
TPlaylistDlg
::
DeleteItem
(
int
i_pos
)
{
playlist_t
*
p_playlist
=
(
playlist_t
*
)
vlc_object_find
(
p_intf
Global
,
VLC_OBJECT_PLAYLIST
,
FIND_ANYWHERE
);
vlc_object_find
(
p_intf
,
VLC_OBJECT_PLAYLIST
,
FIND_ANYWHERE
);
if
(
p_playlist
==
NULL
)
{
return
;
}
playlist_Delete
(
p_playlist
,
i_pos
);
vlc_object_release
(
p_playlist
);
}
//---------------------------------------------------------------------------
void
__fastcall
TPlaylistDlg
::
Previous
()
{
playlist_t
*
p_playlist
=
(
playlist_t
*
)
vlc_object_find
(
p_intf
Global
,
VLC_OBJECT_PLAYLIST
,
FIND_ANYWHERE
);
vlc_object_find
(
p_intf
,
VLC_OBJECT_PLAYLIST
,
FIND_ANYWHERE
);
if
(
p_playlist
==
NULL
)
{
return
;
}
playlist_Prev
(
p_playlist
);
vlc_object_release
(
p_playlist
);
}
//---------------------------------------------------------------------------
void
__fastcall
TPlaylistDlg
::
Next
()
{
playlist_t
*
p_playlist
=
(
playlist_t
*
)
vlc_object_find
(
p_intf
Global
,
VLC_OBJECT_PLAYLIST
,
FIND_ANYWHERE
);
vlc_object_find
(
p_intf
,
VLC_OBJECT_PLAYLIST
,
FIND_ANYWHERE
);
if
(
p_playlist
==
NULL
)
{
return
;
}
playlist_Next
(
p_playlist
);
vlc_object_release
(
p_playlist
);
}
//---------------------------------------------------------------------------
modules/gui/win32/playlist.h
View file @
c19c673b
...
...
@@ -83,10 +83,11 @@ __published: // IDE-managed Components
void
__fastcall
PlayStreamActionExecute
(
TObject
*
Sender
);
private:
// User declarations
char
*
__fastcall
rindex
(
char
*
s
,
char
c
);
intf_thread_t
*
p_intf
;
public:
// User declarations
__fastcall
TPlaylistDlg
(
TComponent
*
Owner
);
__fastcall
TPlaylistDlg
(
TComponent
*
Owner
,
intf_thread_t
*
_p_intf
);
void
__fastcall
UpdateGrid
(
playlist_t
*
p_playlist
);
void
__fastcall
Manage
(
intf_thread_t
*
p_intf
);
void
__fastcall
Manage
();
void
__fastcall
DeleteItem
(
int
i_pos
);
void
__fastcall
Previous
();
void
__fastcall
Next
();
...
...
modules/gui/win32/win32.cpp
View file @
c19c673b
...
...
@@ -106,9 +106,9 @@ static void Close ( vlc_object_t *p_this )
*****************************************************************************/
static
void
Run
(
intf_thread_t
*
p_intf
)
{
p_intf
->
p_sys
->
p_window
=
new
TMainFrameDlg
(
NULL
);
p_intf
->
p_sys
->
p_playwin
=
new
TPlaylistDlg
(
NULL
);
p_intf
->
p_sys
->
p_messages
=
new
TMessagesDlg
(
NULL
);
p_intf
->
p_sys
->
p_window
=
new
TMainFrameDlg
(
NULL
,
p_intf
);
p_intf
->
p_sys
->
p_playwin
=
new
TPlaylistDlg
(
NULL
,
p_intf
);
p_intf
->
p_sys
->
p_messages
=
new
TMessagesDlg
(
NULL
,
p_intf
);
/* show main window and wait until it is closed */
p_intf
->
p_sys
->
p_window
->
ShowModal
();
...
...
@@ -145,7 +145,7 @@ int Win32Manage( intf_thread_t *p_intf )
p_intf
->
p_sys
->
p_messages
->
UpdateLog
();
/* Update the playlist */
p_intf
->
p_sys
->
p_playwin
->
Manage
(
p_intf
);
p_intf
->
p_sys
->
p_playwin
->
Manage
();
/* Update the input */
if
(
p_intf
->
p_sys
->
p_input
==
NULL
)
...
...
modules/gui/win32/win32_common.h
View file @
c19c673b
...
...
@@ -59,7 +59,6 @@ struct intf_sys_t
TMainFrameDlg
*
p_window
;
/* main window */
TPlaylistDlg
*
p_playwin
;
/* playlist */
TPopupMenu
*
p_popup
;
/* popup menu */
TAboutDlg
*
p_about
;
/* about window */
TDiscDlg
*
p_disc
;
/* disc selection window */
TNetworkDlg
*
p_network
;
/* network stream window */
TPreferencesDlg
*
p_preferences
;
/* preferences window */
...
...
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