Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
b7fbd8c6
Commit
b7fbd8c6
authored
Aug 14, 2011
by
Felix Paul Kühne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macosx: simplified the way we set the window's title
parent
2d83c3c2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
27 deletions
+11
-27
modules/gui/macosx/MainWindow.m
modules/gui/macosx/MainWindow.m
+11
-27
No files found.
modules/gui/macosx/MainWindow.m
View file @
b7fbd8c6
...
@@ -657,35 +657,19 @@ static VLCMainWindow *_o_sharedInstance = nil;
...
@@ -657,35 +657,19 @@ static VLCMainWindow *_o_sharedInstance = nil;
char
*
uri
=
input_item_GetURI
(
input_GetItem
(
p_input
)
);
char
*
uri
=
input_item_GetURI
(
input_GetItem
(
p_input
)
);
if
([
aString
isEqualToString
:
@""
])
NSURL
*
o_url
=
[
NSURL
URLWithString
:
[
NSString
stringWithUTF8String
:
uri
]];
{
if
([
o_url
isFileURL
])
[
self
setRepresentedURL
:
o_url
];
char
*
file
=
uri
?
strrchr
(
uri
,
'/'
)
:
NULL
;
if
(
file
!=
NULL
)
{
decode_URI
(
++
file
);
aString
=
[
NSString
stringWithUTF8String
:
file
];
}
else
else
aString
=
[
NSString
stringWithUTF8String
:
uri
];
[
self
setRepresentedURL
:
[
NSURL
URLWithString
:
@""
]];
}
NSMutableString
*
o_mrl
=
[
NSMutableString
stringWithUTF8String
:
decode_URI
(
uri
)];
free
(
uri
);
free
(
uri
);
NSRange
prefix_range
=
[
o_mrl
rangeOfString
:
@"file:"
];
if
(
prefix_range
.
location
!=
NSNotFound
)
[
o_mrl
deleteCharactersInRange
:
prefix_range
];
if
(
[
o_mrl
characterAtIndex
:
0
]
==
'/'
)
if
([
aString
isEqualToString
:
@""
]
)
{
{
/* it's a local file */
if
([
o_url
isFileURL
])
[
self
setRepresentedFilename
:
o_mrl
];
aString
=
[[
NSFileManager
defaultManager
]
displayNameAtPath
:
[
o_url
path
]];
}
else
else
{
aString
=
[
o_url
absoluteString
];
/* it's from the network or somewhere else,
* we clear the previous path */
[
self
setRepresentedFilename
:
@""
];
}
}
[
self
setTitle
:
aString
];
[
self
setTitle
:
aString
];
...
@@ -694,7 +678,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
...
@@ -694,7 +678,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
else
else
{
{
[
self
setTitle
:
_NS
(
"VLC media player"
)];
[
self
setTitle
:
_NS
(
"VLC media player"
)];
[
self
setRepresented
Filename
:
@""
];
[
self
setRepresented
URL
:
[
NSURL
URLWithString
:
@""
]
];
}
}
[
o_pool
release
];
[
o_pool
release
];
}
}
...
...
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