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
f690d54a
Commit
f690d54a
authored
May 16, 2014
by
Felix Paul Kühne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macosx: move re-useable code from menu to core interaction object
parent
487825a5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
15 deletions
+24
-15
modules/gui/macosx/CoreInteraction.h
modules/gui/macosx/CoreInteraction.h
+1
-0
modules/gui/macosx/CoreInteraction.m
modules/gui/macosx/CoreInteraction.m
+19
-0
modules/gui/macosx/MainMenu.m
modules/gui/macosx/MainMenu.m
+4
-15
No files found.
modules/gui/macosx/CoreInteraction.h
View file @
f690d54a
...
@@ -73,6 +73,7 @@
...
@@ -73,6 +73,7 @@
-
(
void
)
volumeDown
;
-
(
void
)
volumeDown
;
-
(
void
)
toggleMute
;
-
(
void
)
toggleMute
;
-
(
void
)
addSubtitlesToCurrentInput
:(
NSArray
*
)
paths
;
-
(
BOOL
)
performDragOperation
:(
id
<
NSDraggingInfo
>
)
sender
;
-
(
BOOL
)
performDragOperation
:(
id
<
NSDraggingInfo
>
)
sender
;
-
(
void
)
toggleFullscreen
;
-
(
void
)
toggleFullscreen
;
...
...
modules/gui/macosx/CoreInteraction.m
View file @
f690d54a
...
@@ -546,6 +546,25 @@ static VLCCoreInteraction *_o_sharedInstance = nil;
...
@@ -546,6 +546,25 @@ static VLCCoreInteraction *_o_sharedInstance = nil;
return
f_maxVolume
;
return
f_maxVolume
;
}
}
-
(
void
)
addSubtitlesToCurrentInput
:(
NSArray
*
)
paths
{
input_thread_t
*
p_input
=
pl_CurrentInput
(
VLCIntf
);
if
(
!
p_input
)
return
;
NSUInteger
count
=
[
paths
count
];
for
(
int
i
=
0
;
i
<
count
;
i
++
)
{
const
char
*
path
=
[[[
paths
objectAtIndex
:
i
]
path
]
UTF8String
];
msg_Dbg
(
VLCIntf
,
"loading subs from %s"
,
path
);
int
i_result
=
input_AddSubtitleOSD
(
p_input
,
path
,
true
,
true
);
if
(
i_result
!=
VLC_SUCCESS
)
msg_Warn
(
VLCIntf
,
"unable to load subtitles from '%s'"
,
path
);
}
vlc_object_release
(
p_input
);
}
#pragma mark -
#pragma mark -
#pragma mark drag and drop support for VLCVoutView, VLCDragDropView and VLCThreePartDropView
#pragma mark drag and drop support for VLCVoutView, VLCDragDropView and VLCThreePartDropView
-
(
BOOL
)
performDragOperation
:(
id
<
NSDraggingInfo
>
)
sender
-
(
BOOL
)
performDragOperation
:(
id
<
NSDraggingInfo
>
)
sender
...
...
modules/gui/macosx/MainMenu.m
View file @
f690d54a
...
@@ -24,6 +24,7 @@
...
@@ -24,6 +24,7 @@
#import "MainMenu.h"
#import "MainMenu.h"
#import <vlc_common.h>
#import <vlc_common.h>
#import <vlc_playlist.h>
#import <vlc_playlist.h>
#import <vlc_input.h>
#import "intf.h"
#import "intf.h"
#import "open.h"
#import "open.h"
...
@@ -970,24 +971,12 @@ static VLCMainMenu *_o_sharedInstance = nil;
...
@@ -970,24 +971,12 @@ static VLCMainMenu *_o_sharedInstance = nil;
o_url
=
[
o_url
URLByDeletingLastPathComponent
];
o_url
=
[
o_url
URLByDeletingLastPathComponent
];
[
openPanel
setDirectoryURL
:
o_url
];
[
openPanel
setDirectoryURL
:
o_url
];
free
(
path
);
free
(
path
);
vlc_object_release
(
p_input
);
i_returnValue
=
[
openPanel
runModal
];
i_returnValue
=
[
openPanel
runModal
];
if
(
i_returnValue
==
NSOKButton
)
{
if
(
i_returnValue
==
NSOKButton
)
NSUInteger
c
=
0
;
[[
VLCCoreInteraction
sharedInstance
]
addSubtitlesToCurrentInput
:[
openPanel
URLs
]];
if
(
!
p_input
)
return
;
c
=
[[
openPanel
URLs
]
count
];
for
(
int
i
=
0
;
i
<
c
;
i
++
)
{
msg_Dbg
(
VLCIntf
,
"loading subs from %s"
,
[[[[
openPanel
URLs
]
objectAtIndex
:
i
]
path
]
UTF8String
]);
if
(
input_AddSubtitle
(
p_input
,
[[[[
openPanel
URLs
]
objectAtIndex
:
i
]
path
]
UTF8String
],
TRUE
))
msg_Warn
(
VLCIntf
,
"unable to load subtitles from '%s'"
,
[[[[
openPanel
URLs
]
objectAtIndex
:
i
]
path
]
UTF8String
]);
}
}
vlc_object_release
(
p_input
);
}
}
-
(
IBAction
)
switchSubtitleOption
:(
id
)
sender
-
(
IBAction
)
switchSubtitleOption
:(
id
)
sender
...
...
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