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
2588397b
Commit
2588397b
authored
Jan 02, 2016
by
David Fuhrmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macosx: info panel: remove dead code, clean up duplicate code
parent
a0d04a2f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
33 deletions
+6
-33
modules/gui/macosx/VLCPlaylistInfo.h
modules/gui/macosx/VLCPlaylistInfo.h
+3
-3
modules/gui/macosx/VLCPlaylistInfo.m
modules/gui/macosx/VLCPlaylistInfo.m
+3
-30
No files found.
modules/gui/macosx/VLCPlaylistInfo.h
View file @
2588397b
...
...
@@ -27,7 +27,7 @@
*****************************************************************************/
@interface
VLCInfo
:
NSWindowController
<
NSOutlineViewDataSource
>
@interface
VLCInfo
:
NSWindowController
@property
(
readonly
)
input_item_t
*
item
;
...
...
@@ -100,9 +100,9 @@
-
(
IBAction
)
metaFieldChanged
:(
id
)
sender
;
-
(
IBAction
)
saveMetaData
:(
id
)
sender
;
-
(
IBAction
)
downloadCoverArt
:(
id
)
sender
;
-
(
void
)
initMediaPanelStats
;
-
(
void
)
updatePanelWithItem
:(
input_item_t
*
)
_p_item
;
-
(
void
)
setMeta
:(
char
*
)
meta
forLabel
:(
id
)
theItem
;
-
(
void
)
updateMetadata
;
-
(
void
)
updateStatistics
;
...
...
modules/gui/macosx/VLCPlaylistInfo.m
View file @
2588397b
...
...
@@ -28,7 +28,7 @@
#import "VLCPlaylist.h"
#import <vlc_url.h>
@interface
VLCInfo
()
<
NSOutlineViewDataSource
,
NSOutlineViewDelegate
>
@interface
VLCInfo
()
<
NSOutlineViewDataSource
>
{
VLCInfoTreeItem
*
rootItem
;
...
...
@@ -59,7 +59,6 @@
[
self
.
window
setTitle
:
_NS
(
"Media Information"
)];
_outlineView
.
dataSource
=
self
;
_outlineView
.
delegate
=
self
;
[
_uriLabel
setStringValue
:
_NS
(
"Location"
)];
[
_titleLabel
setStringValue
:
_NS
(
"Title"
)];
...
...
@@ -191,7 +190,7 @@
if
(
!
p_item
)
{
/* Erase */
#define SET( foo ) \
[
self setMeta: "" forLabel: _##foo##TextField
];
[
_##foo##TextField setStringValue:@""
];
SET
(
uri
);
SET
(
title
);
SET
(
author
);
...
...
@@ -225,7 +224,7 @@
#define SET( foo, bar ) \
char *psz_##foo = input_item_Get##bar ( p_item ); \
[
self setMeta: psz_##foo forLabel: _##foo##TextField
]; \
[
_##foo##TextField setStringValue:toNSStr(psz_##foo)
]; \
FREENULL( psz_##foo );
/* fill the other fields */
...
...
@@ -264,14 +263,6 @@
}
}
-
(
void
)
setMeta
:
(
char
*
)
psz_meta
forLabel
:
(
id
)
theItem
{
if
(
psz_meta
!=
NULL
&&
*
psz_meta
)
[
theItem
setStringValue
:
toNSStr
(
psz_meta
)];
else
[
theItem
setStringValue
:
@""
];
}
-
(
void
)
updateStatistics
{
if
(
!
b_awakeFromNib
||
!
b_stats
)
...
...
@@ -399,26 +390,8 @@ error:
if
(
p_item
)
libvlc_ArtRequest
(
VLCIntf
->
p_libvlc
,
p_item
,
META_REQUEST_OPTION_NONE
);
}
-
(
input_item_t
*
)
item
{
if
(
p_item
)
vlc_gc_incref
(
p_item
);
return
p_item
;
}
@end
@implementation
VLCInfo
(
NSMenuValidation
)
-
(
BOOL
)
validateMenuItem
:(
NSMenuItem
*
)
mi
{
if
([[
mi
title
]
isEqualToString
:
_NS
(
"Information"
)])
{
return
!
[[[
VLCMain
sharedInstance
]
playlist
]
isSelectionEmpty
];
}
return
TRUE
;
}
@end
@implementation
VLCInfo
(
NSTableDataSource
)
...
...
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