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
4f27da13
Commit
4f27da13
authored
Jan 24, 2005
by
Jérome Decoodt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added a Service Discovery sub menu in playlist contextual menu.
parent
e9694509
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
53 additions
and
1 deletion
+53
-1
extras/MacOSX/Resources/English.lproj/MainMenu.nib/classes.nib
...s/MacOSX/Resources/English.lproj/MainMenu.nib/classes.nib
+2
-0
extras/MacOSX/Resources/English.lproj/MainMenu.nib/objects.nib
...s/MacOSX/Resources/English.lproj/MainMenu.nib/objects.nib
+0
-0
modules/gui/macosx/playlist.h
modules/gui/macosx/playlist.h
+4
-0
modules/gui/macosx/playlist.m
modules/gui/macosx/playlist.m
+47
-1
No files found.
extras/MacOSX/Resources/English.lproj/MainMenu.nib/classes.nib
View file @
4f27da13
...
...
@@ -262,8 +262,10 @@
"o_mi_play" = id;
"o_mi_save_playlist" = id;
"o_mi_selectall" = id;
"o_mi_services" = id;
"o_mi_sort_author" = id;
"o_mi_sort_name" = id;
"o_mu_services" = id;
"o_outline_view" = id;
"o_random_ckb" = id;
"o_search_field" = id;
...
...
extras/MacOSX/Resources/English.lproj/MainMenu.nib/objects.nib
View file @
4f27da13
No preview for this file type
modules/gui/macosx/playlist.h
View file @
4f27da13
...
...
@@ -56,6 +56,9 @@
IBOutlet
id
o_mi_selectall
;
IBOutlet
id
o_mi_sort_name
;
IBOutlet
id
o_mi_sort_author
;
IBOutlet
id
o_mi_services
;
IBOutlet
id
o_mu_services
;
NSImage
*
o_descendingSortingImage
;
NSImage
*
o_ascendingSortingImage
;
...
...
@@ -80,6 +83,7 @@
-
(
void
)
sortNode
:(
int
)
i_mode
;
-
(
void
)
updateRowSelection
;
-
(
IBAction
)
servicesChange
:(
id
)
sender
;
-
(
IBAction
)
playItem
:(
id
)
sender
;
-
(
IBAction
)
deleteItem
:(
id
)
sender
;
-
(
IBAction
)
selectAll
:(
id
)
sender
;
...
...
modules/gui/macosx/playlist.m
View file @
4f27da13
...
...
@@ -110,9 +110,12 @@
{
playlist_t
*
p_playlist
=
vlc_object_find
(
VLCIntf
,
VLC_OBJECT_PLAYLIST
,
FIND_ANYWHERE
);
vlc_list_t
*
p_list
=
vlc_list_find
(
p_playlist
,
VLC_OBJECT_MODULE
,
FIND_ANYWHERE
);
int
i_index
;
i_current_view
=
VIEW_CATEGORY
;
playlist_ViewUpdate
(
p_playlist
,
i_current_view
);
vlc_object_release
(
p_playlist
);
[
o_outline_view
setTarget
:
self
];
[
o_outline_view
setDelegate
:
self
];
...
...
@@ -147,6 +150,31 @@ belongs to an Apple hidden private API, and then can "disapear" at any time*/
o_tc_sortColumn
=
nil
;
for
(
i_index
=
0
;
i_index
<
p_list
->
i_count
;
i_index
++
)
{
NSMenuItem
*
o_lmi
;
module_t
*
p_parser
=
(
module_t
*
)
p_list
->
p_values
[
i_index
].
p_object
;
if
(
!
strcmp
(
p_parser
->
psz_capability
,
"services_discovery"
)
)
{
o_lmi
=
[[
o_mi_services
submenu
]
addItemWithTitle
:
[
NSString
stringWithCString
:
p_parser
->
psz_longname
?
p_parser
->
psz_longname
:
(
p_parser
->
psz_shortname
?
p_parser
->
psz_shortname
:
p_parser
->
psz_object_name
)]
action:
@selector
(
servicesChange
:)
keyEquivalent:
@""
];
[
o_lmi
setTarget
:
self
];
[
o_lmi
setRepresentedObject
:
[
NSString
stringWithCString
:
p_parser
->
psz_object_name
]];
if
(
playlist_IsServicesDiscoveryLoaded
(
p_playlist
,
p_parser
->
psz_object_name
)
)
[
o_lmi
setState
:
NSOnState
];
}
}
vlc_list_release
(
p_list
);
vlc_object_release
(
p_playlist
);
[
self
initStrings
];
//[self playlistUpdated];
}
...
...
@@ -160,6 +188,7 @@ belongs to an Apple hidden private API, and then can "disapear" at any time*/
[
o_mi_info
setTitle
:
_NS
(
"Properties"
)];
[
o_mi_sort_name
setTitle
:
_NS
(
"Sort Node by Name"
)];
[
o_mi_sort_author
setTitle
:
_NS
(
"Sort Node by Author"
)];
[
o_mi_services
setTitle
:
_NS
(
"Services discovery"
)];
[[
o_tc_name
headerCell
]
setStringValue
:
_NS
(
"Name"
)];
[[
o_tc_author
headerCell
]
setStringValue
:
_NS
(
"Author"
)];
[[
o_tc_duration
headerCell
]
setStringValue
:
_NS
(
"Duration"
)];
...
...
@@ -401,6 +430,23 @@ belongs to an Apple hidden private API, and then can "disapear" at any time*/
}
}
-
(
IBAction
)
servicesChange
:(
id
)
sender
{
NSMenuItem
*
o_mi
=
(
NSMenuItem
*
)
sender
;
NSString
*
o_string
=
[
o_mi
representedObject
];
playlist_t
*
p_playlist
=
vlc_object_find
(
VLCIntf
,
VLC_OBJECT_PLAYLIST
,
FIND_ANYWHERE
);
if
(
!
playlist_IsServicesDiscoveryLoaded
(
p_playlist
,
[
o_string
cString
]
)
)
playlist_ServicesDiscoveryAdd
(
p_playlist
,
[
o_string
cString
]
);
else
playlist_ServicesDiscoveryRemove
(
p_playlist
,
[
o_string
cString
]
);
[
o_mi
setState
:
playlist_IsServicesDiscoveryLoaded
(
p_playlist
,
[
o_string
cString
]
)
?
YES
:
NO
];
[
self
playlistUpdated
];
return
;
}
-
(
IBAction
)
selectAll
:(
id
)
sender
{
[
o_outline_view
selectAll
:
nil
];
...
...
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