Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
5d3edb82
Commit
5d3edb82
authored
Dec 13, 2004
by
Benjamin Pracht
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implements sorting of the current node from context menu
parent
c5d68965
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
72 additions
and
2 deletions
+72
-2
extras/MacOSX/Resources/English.lproj/MainMenu.nib/classes.nib
...s/MacOSX/Resources/English.lproj/MainMenu.nib/classes.nib
+4
-0
extras/MacOSX/Resources/English.lproj/MainMenu.nib/info.nib
extras/MacOSX/Resources/English.lproj/MainMenu.nib/info.nib
+2
-2
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
+5
-0
modules/gui/macosx/playlist.m
modules/gui/macosx/playlist.m
+61
-0
No files found.
extras/MacOSX/Resources/English.lproj/MainMenu.nib/classes.nib
View file @
5d3edb82
...
...
@@ -395,6 +395,8 @@
playItem = id;
searchItem = id;
selectAll = id;
sortNodeByAuthor = id;
sortNodeByName = id;
};
CLASS = VLCPlaylist;
LANGUAGE = ObjC;
...
...
@@ -407,6 +409,8 @@
"o_mi_play" = id;
"o_mi_save_playlist" = id;
"o_mi_selectall" = id;
"o_mi_sort_author" = id;
"o_mi_sort_name" = id;
"o_outline_view" = id;
"o_random_ckb" = id;
"o_search_field" = id;
...
...
extras/MacOSX/Resources/English.lproj/MainMenu.nib/info.nib
View file @
5d3edb82
...
...
@@ -3,7 +3,7 @@
<plist
version=
"1.0"
>
<dict>
<key>
IBDocumentLocation
</key>
<string>
94 10
4 505 517 0 0 1024 746
</string>
<string>
230 -8
4 505 517 0 0 1024 746
</string>
<key>
IBEditorPositions
</key>
<dict>
<key>
1617
</key>
...
...
@@ -13,7 +13,7 @@
<key>
29
</key>
<string>
84 667 419 44 0 0 1024 746
</string>
<key>
915
</key>
<string>
620 326 100 13
0 0 0 1024 746
</string>
<string>
731 416 165 18
0 0 0 1024 746
</string>
</dict>
<key>
IBFramework Version
</key>
<string>
364.0
</string>
...
...
extras/MacOSX/Resources/English.lproj/MainMenu.nib/objects.nib
View file @
5d3edb82
No preview for this file type
modules/gui/macosx/playlist.h
View file @
5d3edb82
...
...
@@ -52,6 +52,8 @@
IBOutlet
id
o_mi_delete
;
IBOutlet
id
o_mi_info
;
IBOutlet
id
o_mi_selectall
;
IBOutlet
id
o_mi_sort_name
;
IBOutlet
id
o_mi_sort_author
;
NSImage
*
o_descendingSortingImage
;
NSImage
*
o_ascendingSortingImage
;
...
...
@@ -68,10 +70,13 @@
-
(
NSMenu
*
)
menuForEvent
:(
NSEvent
*
)
o_event
;
-
(
void
)
playlistUpdated
;
-
(
void
)
sortNode
:(
int
)
i_mode
;
-
(
IBAction
)
playItem
:(
id
)
sender
;
-
(
IBAction
)
deleteItem
:(
id
)
sender
;
-
(
IBAction
)
selectAll
:(
id
)
sender
;
-
(
IBAction
)
sortNodeByName
:(
id
)
sender
;
-
(
IBAction
)
sortNodeByAuthor
:(
id
)
sender
;
-
(
void
)
appendArray
:(
NSArray
*
)
o_array
atPos
:(
int
)
i_position
enqueue
:(
BOOL
)
b_enqueue
;
...
...
modules/gui/macosx/playlist.m
View file @
5d3edb82
...
...
@@ -152,6 +152,8 @@ belongs to an Apple hidden private API, and then can "disapear" at any time*/
[
o_mi_delete
setTitle
:
_NS
(
"Delete"
)];
[
o_mi_selectall
setTitle
:
_NS
(
"Select All"
)];
[
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_tc_name
headerCell
]
setStringValue
:
_NS
(
"Name"
)];
[[
o_tc_author
headerCell
]
setStringValue
:
_NS
(
"Author"
)];
[[
o_tc_duration
headerCell
]
setStringValue
:
_NS
(
"Duration"
)];
...
...
@@ -318,6 +320,65 @@ belongs to an Apple hidden private API, and then can "disapear" at any time*/
}
}
-
(
IBAction
)
sortNodeByName
:(
id
)
sender
{
[
self
sortNode
:
SORT_TITLE
];
}
-
(
IBAction
)
sortNodeByAuthor
:(
id
)
sender
{
[
self
sortNode
:
SORT_AUTHOR
];
}
-
(
void
)
sortNode
:(
int
)
i_mode
{
playlist_t
*
p_playlist
=
vlc_object_find
(
VLCIntf
,
VLC_OBJECT_PLAYLIST
,
FIND_ANYWHERE
);
playlist_item_t
*
p_item
;
if
(
p_playlist
==
NULL
)
{
return
;
}
if
([
o_outline_view
selectedRow
]
>
-
1
)
{
p_item
=
[[
o_outline_view
itemAtRow
:
[
o_outline_view
selectedRow
]]
pointerValue
];
}
else
/*If no item is selected, sort the whole playlist*/
{
playlist_view_t
*
p_view
=
playlist_ViewFind
(
p_playlist
,
VIEW_SIMPLE
);
p_item
=
p_view
->
p_root
;
}
if
(
p_item
->
i_children
>
-
1
)
{
vlc_mutex_lock
(
&
p_playlist
->
object_lock
);
playlist_RecursiveNodeSort
(
p_playlist
,
p_item
,
i_mode
,
ORDER_NORMAL
);
vlc_mutex_unlock
(
&
p_playlist
->
object_lock
);
}
else
{
int
i
;
for
(
i
=
0
;
i
<
p_item
->
i_parents
;
i
++
)
{
if
(
p_item
->
pp_parents
[
i
]
->
i_view
==
VIEW_SIMPLE
)
{
vlc_mutex_lock
(
&
p_playlist
->
object_lock
);
playlist_RecursiveNodeSort
(
p_playlist
,
p_item
->
pp_parents
[
i
]
->
p_parent
,
i_mode
,
ORDER_NORMAL
);
vlc_mutex_unlock
(
&
p_playlist
->
object_lock
);
break
;
}
}
}
vlc_object_release
(
p_playlist
);
[
self
playlistUpdated
];
}
-
(
void
)
appendArray
:(
NSArray
*
)
o_array
atPos
:(
int
)
i_position
enqueue
:(
BOOL
)
b_enqueue
{
int
i_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