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
13e2c3bd
Commit
13e2c3bd
authored
Jun 11, 2012
by
David Fuhrmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macosx: add multiple files dragged to dock icon together
refs #4358
parent
bc8f5562
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
21 deletions
+29
-21
modules/gui/macosx/intf.h
modules/gui/macosx/intf.h
+1
-1
modules/gui/macosx/intf.m
modules/gui/macosx/intf.m
+28
-20
No files found.
modules/gui/macosx/intf.h
View file @
13e2c3bd
...
...
@@ -196,7 +196,7 @@ struct intf_sys_t
-
(
void
)
showFullscreenController
;
-
(
void
)
updateDelays
;
-
(
void
)
initStrings
;
-
(
BOOL
)
application
:(
NSApplication
*
)
o_app
openFile
:(
NSString
*
)
o_filename
;
-
(
BOOL
)
application
:(
NSApplication
*
)
o_app
openFile
s
:(
NSString
*
)
o_filename
;
-
(
IBAction
)
crashReporterAction
:(
id
)
sender
;
-
(
IBAction
)
openCrashLog
:(
id
)
sender
;
...
...
modules/gui/macosx/intf.m
View file @
13e2c3bd
...
...
@@ -904,39 +904,47 @@ static VLCMain *_o_sharedMainInstance = nil;
}
#pragma mark -
#pragma mark File opening
#pragma mark File opening
over dock icon
-
(
BOOL
)
application
:(
NSApplication
*
)
o_app
openFile
:(
NSString
*
)
o_filename
-
(
BOOL
)
application
:(
NSApplication
*
)
o_app
openFile
s
:(
NSArray
*
)
o_names
{
BOOL
b_autoplay
=
config_GetInt
(
VLCIntf
,
"macosx-autoplay"
);
char
*
psz_uri
=
make_URI
([
o_filename
UTF8String
],
"file"
);
if
(
!
psz_uri
)
return
(
FALSE
);
char
*
psz_uri
=
make_URI
([[
o_names
objectAtIndex
:
0
]
UTF8String
],
"file"
);
input_thread_t
*
p_input
=
pl_CurrentInput
(
VLCIntf
);
BOOL
b_returned
=
NO
;
if
(
p_input
)
// try to add file as subtitle
if
(
[
o_names
count
]
==
1
&&
psz_uri
)
{
b_returned
=
input_AddSubtitle
(
p_input
,
psz_uri
,
true
);
vlc_object_release
(
p_input
);
if
(
!
b_returned
)
input_thread_t
*
p_input
=
pl_CurrentInput
(
VLCIntf
);
if
(
p_input
)
{
free
(
psz_uri
);
return
YES
;
BOOL
b_returned
=
NO
;
b_returned
=
input_AddSubtitle
(
p_input
,
psz_uri
,
true
);
vlc_object_release
(
p_input
);
if
(
!
b_returned
)
{
free
(
psz_uri
);
return
YES
;
}
}
}
else
if
(
p_input
)
vlc_object_release
(
p_input
);
free
(
psz_uri
);
NSDictionary
*
o_dic
=
[
NSDictionary
dictionaryWithObject
:[
NSString
stringWithCString
:
psz_uri
encoding
:
NSUTF8StringEncoding
]
forKey
:
@"ITEM_URL"
];
NSMutableArray
*
o_result
=
[
NSMutableArray
arrayWithCapacity
:
[
o_names
count
]];
for
(
int
i
=
0
;
i
<
[
o_names
count
];
i
++
)
{
psz_uri
=
make_URI
([[
o_names
objectAtIndex
:
i
]
UTF8String
],
"file"
);
if
(
!
psz_uri
)
return
NO
;
free
(
psz_uri
);
NSDictionary
*
o_dic
=
[
NSDictionary
dictionaryWithObject
:[
NSString
stringWithCString
:
psz_uri
encoding
:
NSUTF8StringEncoding
]
forKey
:
@"ITEM_URL"
];
free
(
psz_uri
);
[
o_result
insertObject
:
o_dic
atIndex
:
i
];
}
if
(
b_autoplay
)
[
o_playlist
appendArray
:
[
NSArray
arrayWithObject
:
o_dic
]
atPos
:
-
1
enqueue
:
NO
];
[
o_playlist
appendArray
:
o_result
atPos
:
-
1
enqueue
:
NO
];
else
[
o_playlist
appendArray
:
[
NSArray
arrayWithObject
:
o_dic
]
atPos
:
-
1
enqueue
:
YES
];
[
o_playlist
appendArray
:
o_result
atPos
:
-
1
enqueue
:
YES
];
return
(
TRUE
);
}
...
...
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