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
eecfe431
Commit
eecfe431
authored
Feb 02, 2014
by
Felix Paul Kühne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macosx: add file size column to playlist table (close #9497)
parent
34b896f9
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
1 deletion
+20
-1
modules/gui/macosx/MainMenu.m
modules/gui/macosx/MainMenu.m
+3
-1
modules/gui/macosx/playlist.h
modules/gui/macosx/playlist.h
+1
-0
modules/gui/macosx/playlist.m
modules/gui/macosx/playlist.m
+16
-0
No files found.
modules/gui/macosx/MainMenu.m
View file @
eecfe431
...
...
@@ -76,11 +76,13 @@ static VLCMainMenu *_o_sharedInstance = nil;
_NS
(
"Date"
),
DATE_COLUMN
,
_NS
(
"Language"
),
LANGUAGE_COLUMN
,
_NS
(
"URI"
),
URI_COLUMN
,
_NS
(
"File Size"
),
FILESIZE_COLUMN
,
nil
];
// this array also assigns tags (index) to type of menu item
o_ptc_menuorder
=
[[
NSArray
alloc
]
initWithObjects
:
TRACKNUM_COLUMN
,
TITLE_COLUMN
,
ARTIST_COLUMN
,
DURATION_COLUMN
,
GENRE_COLUMN
,
ALBUM_COLUMN
,
DESCRIPTION_COLUMN
,
DATE_COLUMN
,
LANGUAGE_COLUMN
,
URI_COLUMN
,
nil
];
DESCRIPTION_COLUMN
,
DATE_COLUMN
,
LANGUAGE_COLUMN
,
URI_COLUMN
,
FILESIZE_COLUMN
,
nil
];
}
return
_o_sharedInstance
;
...
...
modules/gui/macosx/playlist.h
View file @
eecfe431
...
...
@@ -36,6 +36,7 @@
#define DATE_COLUMN @"date"
#define LANGUAGE_COLUMN @"language"
#define URI_COLUMN @"uri"
#define FILESIZE_COLUMN @"file-size"
/*****************************************************************************
* VLCPlaylistView interface
...
...
modules/gui/macosx/playlist.m
View file @
eecfe431
...
...
@@ -363,6 +363,22 @@
free
(
psz_value
);
}
}
else
if
([
o_identifier
isEqualToString
:
FILESIZE_COLUMN
])
{
psz_value
=
input_item_GetURI
(
p_item
->
p_input
);
o_value
=
@""
;
if
(
psz_value
)
{
NSURL
*
url
=
[
NSURL
URLWithString
:[
NSString
stringWithUTF8String
:
psz_value
]];
if
([
url
isFileURL
])
{
NSFileManager
*
fileManager
=
[
NSFileManager
defaultManager
];
if
([
fileManager
fileExistsAtPath
:[
url
path
]])
{
NSError
*
error
;
NSDictionary
*
attributes
=
[
fileManager
attributesOfItemAtPath
:[
url
path
]
error
:
&
error
];
o_value
=
[
NSByteCountFormatter
stringFromByteCount
:[
attributes
fileSize
]
countStyle
:
NSByteCountFormatterCountStyleDecimal
];
}
}
free
(
psz_value
);
}
}
else
if
([
o_identifier
isEqualToString
:
@"status"
])
{
if
(
input_item_HasErrorWhenReading
(
p_item
->
p_input
))
{
o_value
=
[[
NSWorkspace
sharedWorkspace
]
iconForFileType
:
NSFileTypeForHFSTypeCode
(
kAlertCautionIcon
)];
...
...
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