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
07fcd250
Commit
07fcd250
authored
Jun 22, 2013
by
Rafaël Carré
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
OSX: don't open items twice
Closes: #8611
parent
9925a34e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
5 deletions
+24
-5
modules/gui/macosx/intf.h
modules/gui/macosx/intf.h
+2
-0
modules/gui/macosx/intf.m
modules/gui/macosx/intf.m
+22
-5
No files found.
modules/gui/macosx/intf.h
View file @
07fcd250
...
@@ -82,6 +82,8 @@ struct intf_sys_t
...
@@ -82,6 +82,8 @@ struct intf_sys_t
{
{
intf_thread_t
*
p_intf
;
/* The main intf object */
intf_thread_t
*
p_intf
;
/* The main intf object */
input_thread_t
*
p_current_input
,
*
p_input_changed
;
input_thread_t
*
p_current_input
,
*
p_input_changed
;
BOOL
launched
;
/* finishedLaunching */
int
items_at_launch
;
/* items in playlist after launch */
id
o_mainmenu
;
/* VLCMainMenu */
id
o_mainmenu
;
/* VLCMainMenu */
id
o_prefs
;
/* VLCPrefs */
id
o_prefs
;
/* VLCPrefs */
id
o_sprefs
;
/* VLCSimplePrefs */
id
o_sprefs
;
/* VLCSimplePrefs */
...
...
modules/gui/macosx/intf.m
View file @
07fcd250
...
@@ -782,8 +782,18 @@ static VLCMain *_o_sharedMainInstance = nil;
...
@@ -782,8 +782,18 @@ static VLCMain *_o_sharedMainInstance = nil;
nib_main_loaded
=
TRUE
;
nib_main_loaded
=
TRUE
;
}
}
-
(
void
)
applicationWillFinishLaunching
:(
NSNotification
*
)
aNotification
{
playlist_t
*
p_playlist
=
pl_Get
(
VLCIntf
);
PL_LOCK
;
items_at_launch
=
p_playlist
->
p_local_category
->
i_children
;
PL_UNLOCK
;
}
-
(
void
)
applicationDidFinishLaunching
:(
NSNotification
*
)
aNotification
-
(
void
)
applicationDidFinishLaunching
:(
NSNotification
*
)
aNotification
{
{
launched
=
YES
;
if
(
!
p_intf
)
if
(
!
p_intf
)
return
;
return
;
...
@@ -1047,9 +1057,19 @@ static VLCMain *_o_sharedMainInstance = nil;
...
@@ -1047,9 +1057,19 @@ static VLCMain *_o_sharedMainInstance = nil;
-
(
void
)
application
:(
NSApplication
*
)
o_app
openFiles
:(
NSArray
*
)
o_names
-
(
void
)
application
:(
NSApplication
*
)
o_app
openFiles
:(
NSArray
*
)
o_names
{
{
BOOL
b_autoplay
=
config_GetInt
(
VLCIntf
,
"macosx-autoplay"
);
char
*
psz_uri
=
vlc_path2uri
([[
o_names
objectAtIndex
:
0
]
UTF8String
],
"file"
);
char
*
psz_uri
=
vlc_path2uri
([[
o_names
objectAtIndex
:
0
]
UTF8String
],
"file"
);
if
(
launched
==
NO
)
{
if
(
items_at_launch
)
{
int
items
=
[
o_names
count
];
if
(
items
>
items_at_launch
)
items_at_launch
=
0
;
else
items_at_launch
-=
items
;
return
;
}
}
// try to add file as subtitle
// try to add file as subtitle
if
([
o_names
count
]
==
1
&&
psz_uri
)
{
if
([
o_names
count
]
==
1
&&
psz_uri
)
{
input_thread_t
*
p_input
=
pl_CurrentInput
(
VLCIntf
);
input_thread_t
*
p_input
=
pl_CurrentInput
(
VLCIntf
);
...
@@ -1077,10 +1097,7 @@ static VLCMain *_o_sharedMainInstance = nil;
...
@@ -1077,10 +1097,7 @@ static VLCMain *_o_sharedMainInstance = nil;
[
o_result
addObject
:
o_dic
];
[
o_result
addObject
:
o_dic
];
}
}
if
(
b_autoplay
)
[
o_playlist
appendArray
:
o_result
atPos
:
-
1
enqueue
:
!
config_GetInt
(
VLCIntf
,
"macosx-autoplay"
)];
[
o_playlist
appendArray
:
o_result
atPos
:
-
1
enqueue
:
NO
];
else
[
o_playlist
appendArray
:
o_result
atPos
:
-
1
enqueue
:
YES
];
return
;
return
;
}
}
...
...
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