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
4ae5becb
Commit
4ae5becb
authored
Nov 08, 2004
by
Clément Stenac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use play to end as default, and add "play this branch" to popup
parent
bcec187b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
20 deletions
+44
-20
modules/gui/wxwindows/playlist.cpp
modules/gui/wxwindows/playlist.cpp
+40
-19
src/playlist/item-ext.c
src/playlist/item-ext.c
+4
-1
No files found.
modules/gui/wxwindows/playlist.cpp
View file @
4ae5becb
...
@@ -91,6 +91,7 @@ enum
...
@@ -91,6 +91,7 @@ enum
Infos_Event
,
Infos_Event
,
PopupPlay_Event
,
PopupPlay_Event
,
PopupPlayThis_Event
,
PopupDel_Event
,
PopupDel_Event
,
PopupEna_Event
,
PopupEna_Event
,
PopupInfo_Event
,
PopupInfo_Event
,
...
@@ -144,6 +145,7 @@ BEGIN_EVENT_TABLE(Playlist, wxFrame)
...
@@ -144,6 +145,7 @@ BEGIN_EVENT_TABLE(Playlist, wxFrame)
/* Popup events */
/* Popup events */
EVT_MENU
(
PopupPlay_Event
,
Playlist
::
OnPopupPlay
)
EVT_MENU
(
PopupPlay_Event
,
Playlist
::
OnPopupPlay
)
EVT_MENU
(
PopupPlayThis_Event
,
Playlist
::
OnPopupPlay
)
EVT_MENU
(
PopupDel_Event
,
Playlist
::
OnPopupDel
)
EVT_MENU
(
PopupDel_Event
,
Playlist
::
OnPopupDel
)
EVT_MENU
(
PopupEna_Event
,
Playlist
::
OnPopupEna
)
EVT_MENU
(
PopupEna_Event
,
Playlist
::
OnPopupEna
)
EVT_MENU
(
PopupInfo_Event
,
Playlist
::
OnPopupInfo
)
EVT_MENU
(
PopupInfo_Event
,
Playlist
::
OnPopupInfo
)
...
@@ -260,6 +262,7 @@ Playlist::Playlist( intf_thread_t *_p_intf, wxWindow *p_parent ):
...
@@ -260,6 +262,7 @@ Playlist::Playlist( intf_thread_t *_p_intf, wxWindow *p_parent ):
/* Create the popup menu */
/* Create the popup menu */
popup_menu
=
new
wxMenu
;
popup_menu
=
new
wxMenu
;
popup_menu
->
Append
(
PopupPlay_Event
,
wxU
(
_
(
"Play"
))
);
popup_menu
->
Append
(
PopupPlay_Event
,
wxU
(
_
(
"Play"
))
);
popup_menu
->
Append
(
PopupPlayThis_Event
,
wxU
(
_
(
"Play this branch"
))
);
popup_menu
->
Append
(
PopupDel_Event
,
wxU
(
_
(
"Delete"
))
);
popup_menu
->
Append
(
PopupDel_Event
,
wxU
(
_
(
"Delete"
))
);
popup_menu
->
Append
(
PopupEna_Event
,
wxU
(
_
(
"Enable/Disable"
))
);
popup_menu
->
Append
(
PopupEna_Event
,
wxU
(
_
(
"Enable/Disable"
))
);
popup_menu
->
Append
(
PopupInfo_Event
,
wxU
(
_
(
"Info"
))
);
popup_menu
->
Append
(
PopupInfo_Event
,
wxU
(
_
(
"Info"
))
);
...
@@ -330,9 +333,8 @@ Playlist::Playlist( intf_thread_t *_p_intf, wxWindow *p_parent ):
...
@@ -330,9 +333,8 @@ Playlist::Playlist( intf_thread_t *_p_intf, wxWindow *p_parent ):
icons
[
ITEM_TYPE_NET
]
=
wxIcon
(
type_net_xpm
);
icons
[
ITEM_TYPE_NET
]
=
wxIcon
(
type_net_xpm
);
icons
[
ITEM_TYPE_CARD
]
=
wxIcon
(
type_card_xpm
);
icons
[
ITEM_TYPE_CARD
]
=
wxIcon
(
type_card_xpm
);
for
(
int
i
=
0
;
i
<
WXSIZEOF
(
icons
)
;
i
++
)
for
(
unsigned
int
i
=
0
;
i
<
WXSIZEOF
(
icons
)
;
i
++
)
{
{
// p_images->Add( wxBitmap( wxBitmap(icons[i]).ConvertToImage().Rescale(16,16) ) );
p_images
->
Add
(
wxIcon
(
icons
[
i
]
));
p_images
->
Add
(
wxIcon
(
icons
[
i
]
));
}
}
...
@@ -1144,8 +1146,6 @@ void Playlist::OnRepeat( wxCommandEvent& event )
...
@@ -1144,8 +1146,6 @@ void Playlist::OnRepeat( wxCommandEvent& event )
vlc_object_release
(
p_playlist
);
vlc_object_release
(
p_playlist
);
}
}
void
Playlist
::
OnActivateItem
(
wxTreeEvent
&
event
)
void
Playlist
::
OnActivateItem
(
wxTreeEvent
&
event
)
{
{
playlist_item_t
*
p_item
,
*
p_node
;
playlist_item_t
*
p_item
,
*
p_node
;
...
@@ -1154,14 +1154,7 @@ void Playlist::OnActivateItem( wxTreeEvent& event )
...
@@ -1154,14 +1154,7 @@ void Playlist::OnActivateItem( wxTreeEvent& event )
PlaylistItem
*
p_wxitem
=
(
PlaylistItem
*
)
treectrl
->
GetItemData
(
PlaylistItem
*
p_wxitem
=
(
PlaylistItem
*
)
treectrl
->
GetItemData
(
event
.
GetItem
()
);
event
.
GetItem
()
);
wxTreeItemId
parent
=
treectrl
->
GetItemParent
(
event
.
GetItem
()
);
wxTreeItemId
parent
=
treectrl
->
GetItemParent
(
event
.
GetItem
()
);
if
(
parent
.
IsOk
()
)
{
fprintf
(
stderr
,
"Ca gre
\n
"
);
}
else
{
fprintf
(
stderr
,
"Ca craint
\n
"
);
}
PlaylistItem
*
p_wxparent
=
(
PlaylistItem
*
)
treectrl
->
GetItemData
(
parent
);
PlaylistItem
*
p_wxparent
=
(
PlaylistItem
*
)
treectrl
->
GetItemData
(
parent
);
if
(
p_playlist
==
NULL
)
if
(
p_playlist
==
NULL
)
...
@@ -1177,8 +1170,15 @@ void Playlist::OnActivateItem( wxTreeEvent& event )
...
@@ -1177,8 +1170,15 @@ void Playlist::OnActivateItem( wxTreeEvent& event )
else
else
{
{
p_node
=
p_wxitem
->
p_item
;
p_node
=
p_wxitem
->
p_item
;
if
(
p_wxitem
->
p_item
->
i_children
>
0
)
{
p_item
=
p_wxitem
->
p_item
->
pp_children
[
0
];
}
else
{
p_item
=
NULL
;
p_item
=
NULL
;
}
}
}
playlist_Control
(
p_playlist
,
PLAYLIST_VIEWPLAY
,
i_current_view
,
playlist_Control
(
p_playlist
,
PLAYLIST_VIEWPLAY
,
i_current_view
,
p_node
,
p_item
);
p_node
,
p_item
);
...
@@ -1375,10 +1375,31 @@ void Playlist::OnPopupPlay( wxMenuEvent& event )
...
@@ -1375,10 +1375,31 @@ void Playlist::OnPopupPlay( wxMenuEvent& event )
return
;
return
;
}
}
if
(
p_popup_item
!=
NULL
)
if
(
p_popup_item
!=
NULL
)
{
if
(
p_popup_item
->
i_children
>
-
1
)
{
if
(
event
.
GetId
()
==
PopupPlay_Event
&&
p_popup_item
->
i_children
>
0
)
{
{
playlist_Control
(
p_playlist
,
PLAYLIST_VIEWPLAY
,
playlist_Control
(
p_playlist
,
PLAYLIST_VIEWPLAY
,
VIEW_SIMPLE
,
p_popup_parent
,
p_popup_item
);
i_current_view
,
p_popup_item
,
/*FIXME*/
p_popup_item
->
pp_children
[
0
]
);
}
else
{
playlist_Control
(
p_playlist
,
PLAYLIST_VIEWPLAY
,
i_current_view
,
p_popup_item
,
NULL
);
}
}
else
{
if
(
event
.
GetId
()
==
PopupPlay_Event
)
{
playlist_Control
(
p_playlist
,
PLAYLIST_VIEWPLAY
,
i_current_view
,
p_popup_parent
,
p_popup_item
);
}
}
}
}
vlc_object_release
(
p_playlist
);
vlc_object_release
(
p_playlist
);
}
}
...
...
src/playlist/item-ext.c
View file @
4ae5becb
...
@@ -477,7 +477,10 @@ int playlist_Delete( playlist_t * p_playlist, int i_id )
...
@@ -477,7 +477,10 @@ int playlist_Delete( playlist_t * p_playlist, int i_id )
playlist_item_t
*
p_item
=
playlist_ItemGetById
(
p_playlist
,
i_id
);
playlist_item_t
*
p_item
=
playlist_ItemGetById
(
p_playlist
,
i_id
);
if
(
p_item
==
NULL
)
return
VLC_EGENERIC
;
if
(
p_item
==
NULL
)
{
return
VLC_EGENERIC
;
}
/* Check if it is the current item */
/* Check if it is the current item */
if
(
p_playlist
->
status
.
p_item
==
p_item
)
if
(
p_playlist
->
status
.
p_item
==
p_item
)
...
...
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