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
9ee8da32
Commit
9ee8da32
authored
Mar 25, 2004
by
Clément Stenac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't save an empty playlist
Fix refcount problem
parent
491b9e70
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
14 deletions
+23
-14
modules/gui/wxwindows/playlist.cpp
modules/gui/wxwindows/playlist.cpp
+23
-14
No files found.
modules/gui/wxwindows/playlist.cpp
View file @
9ee8da32
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* playlist.cpp : wxWindows plugin for vlc
* playlist.cpp : wxWindows plugin for vlc
*****************************************************************************
*****************************************************************************
* Copyright (C) 2000-2004 VideoLAN
* Copyright (C) 2000-2004 VideoLAN
* $Id
: playlist.cpp,v 1.49 2004/02/29 14:05:45 zorglub Exp
$
* $Id$
*
*
* Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Authors: Olivier Teulire <ipkiss@via.ecp.fr>
*
*
...
@@ -594,6 +594,23 @@ void Playlist::OnSave( wxCommandEvent& WXUNUSED(event) )
...
@@ -594,6 +594,23 @@ void Playlist::OnSave( wxCommandEvent& WXUNUSED(event) )
}
formats
[]
=
{{
_
(
"M3U file"
),
"*.m3u"
,
"export-m3u"
},
}
formats
[]
=
{{
_
(
"M3U file"
),
"*.m3u"
,
"export-m3u"
},
{
_
(
"PLS file"
),
"*.pls"
,
"export-pls"
}};
{
_
(
"PLS file"
),
"*.pls"
,
"export-pls"
}};
wxString
filter
=
wxT
(
""
);
wxString
filter
=
wxT
(
""
);
playlist_t
*
p_playlist
=
(
playlist_t
*
)
vlc_object_find
(
p_intf
,
VLC_OBJECT_PLAYLIST
,
FIND_ANYWHERE
);
if
(
!
p_playlist
)
{
return
;
}
if
(
p_playlist
->
i_size
==
0
)
{
wxMessageBox
(
wxU
(
_
(
"Playlist is empty"
)
),
wxU
(
_
(
"Can't save"
)),
wxICON_WARNING
|
wxOK
,
this
);
vlc_object_release
(
p_playlist
);
return
;
}
for
(
unsigned
int
i
=
0
;
i
<
sizeof
(
formats
)
/
sizeof
(
formats
[
0
]);
i
++
)
for
(
unsigned
int
i
=
0
;
i
<
sizeof
(
formats
)
/
sizeof
(
formats
[
0
]);
i
++
)
{
{
filter
.
Append
(
wxU
(
formats
[
i
].
psz_desc
)
);
filter
.
Append
(
wxU
(
formats
[
i
].
psz_desc
)
);
...
@@ -605,13 +622,6 @@ void Playlist::OnSave( wxCommandEvent& WXUNUSED(event) )
...
@@ -605,13 +622,6 @@ void Playlist::OnSave( wxCommandEvent& WXUNUSED(event) )
wxT
(
""
),
wxT
(
""
),
filter
,
wxSAVE
);
wxT
(
""
),
wxT
(
""
),
filter
,
wxSAVE
);
if
(
dialog
.
ShowModal
()
==
wxID_OK
)
if
(
dialog
.
ShowModal
()
==
wxID_OK
)
{
playlist_t
*
p_playlist
=
(
playlist_t
*
)
vlc_object_find
(
p_intf
,
VLC_OBJECT_PLAYLIST
,
FIND_ANYWHERE
);
if
(
p_playlist
)
{
{
if
(
dialog
.
GetFilename
().
mb_str
()
)
if
(
dialog
.
GetFilename
().
mb_str
()
)
{
{
...
@@ -622,7 +632,6 @@ void Playlist::OnSave( wxCommandEvent& WXUNUSED(event) )
...
@@ -622,7 +632,6 @@ void Playlist::OnSave( wxCommandEvent& WXUNUSED(event) )
vlc_object_release
(
p_playlist
);
vlc_object_release
(
p_playlist
);
}
}
}
void
Playlist
::
OnOpen
(
wxCommandEvent
&
WXUNUSED
(
event
)
)
void
Playlist
::
OnOpen
(
wxCommandEvent
&
WXUNUSED
(
event
)
)
...
...
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