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
38faa0be
Commit
38faa0be
authored
Sep 07, 2012
by
Felix Paul Kühne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macosx/wizard: allow partial extract values to be entered in a sane manner (close #4991)
parent
6738085c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
13 deletions
+28
-13
modules/gui/macosx/wizard.m
modules/gui/macosx/wizard.m
+28
-13
No files found.
modules/gui/macosx/wizard.m
View file @
38faa0be
...
@@ -1217,21 +1217,36 @@ static VLCWizard *_o_sharedInstance = nil;
...
@@ -1217,21 +1217,36 @@ static VLCWizard *_o_sharedInstance = nil;
input_item_AddOption
(
p_input
,
[[
o_t8_fld_mrl
stringValue
]
UTF8String
],
VLC_INPUT_OPTION_TRUSTED
);
input_item_AddOption
(
p_input
,
[[
o_t8_fld_mrl
stringValue
]
UTF8String
],
VLC_INPUT_OPTION_TRUSTED
);
if
(
!
[[
o_userSelections
objectForKey
:
@"partExtractFrom"
]
if
(
!
[[
o_userSelections
objectForKey
:
@"partExtractFrom"
]
isEqualToString:
@""
]
)
isEqualToString:
@""
])
{
{
NSArray
*
components
=
[
o_userSelections
objectForKey
:
@"partExtractFrom"
]
componentsSeparatedByString
:
@":"
];
input_item_AddOption
(
p_input
,
[[
NSString
NSUInteger
componentCount
=
[
components
count
];
stringWithFormat:
@"start-time=%@"
,
[
o_userSelections
NSUInteger
time
=
0
;
objectForKey:
@"partExtractFrom"
]]
UTF8String
],
if
(
componentCount
==
1
)
VLC_INPUT_OPTION_TRUSTED
);
time
=
1000000
*
([[
components
objectAtIndex
:
0
]
intValue
]);
else
if
(
componentCount
==
2
)
time
=
1000000
*
([[
components
objectAtIndex
:
0
]
intValue
]
*
60
+
[[
components
objectAtIndex
:
1
]
intValue
]);
else
if
(
componentCount
==
3
)
time
=
1000000
*
([[
components
objectAtIndex
:
0
]
intValue
]
*
3600
+
[[
components
objectAtIndex
:
1
]
intValue
]
*
60
+
[[
components
objectAtIndex
:
2
]
intValue
]);
else
msg_Err
(
VLCIntf
,
"Invalid string format for time"
);
input_item_AddOption
(
p_input
,
[[
NSString
stringWithFormat
:
@"start-time=%lu"
,
time
]
UTF8String
],
VLC_INPUT_OPTION_TRUSTED
);
}
}
if
(
!
[[
o_userSelections
objectForKey
:
@"partExtractTo"
]
if
(
!
[[
o_userSelections
objectForKey
:
@"partExtractTo"
]
isEqualToString:
@""
]
)
isEqualToString:
@""
])
{
{
NSArray
*
components
=
[[
o_userSelections
input_item_AddOption
(
p_input
,
[[
NSString
objectForKey:
@"partExtractTo"
]
componentsSeparatedByString
:
@":"
];
stringWithFormat:
@"stop-time=%@"
,
[
o_userSelections
NSUInteger
componentCount
=
[
components
count
];
objectForKey:
@"partExtractTo"
]]
UTF8String
],
NSUInteger
time
=
0
;
VLC_INPUT_OPTION_TRUSTED
);
if
(
componentCount
==
1
)
time
=
1000000
*
([[
components
objectAtIndex
:
0
]
intValue
]);
else
if
(
componentCount
==
2
)
time
=
1000000
*
([[
components
objectAtIndex
:
0
]
intValue
]
*
60
+
[[
components
objectAtIndex
:
1
]
intValue
]);
else
if
(
componentCount
==
3
)
time
=
1000000
*
([[
components
objectAtIndex
:
0
]
intValue
]
*
3600
+
[[
components
objectAtIndex
:
1
]
intValue
]
*
60
+
[[
components
objectAtIndex
:
2
]
intValue
]);
else
msg_Err
(
VLCIntf
,
"Invalid string format for time"
);
input_item_AddOption
(
p_input
,
[[
NSString
stringWithFormat
:
@"stop-time=%lu"
,
time
]
UTF8String
],
VLC_INPUT_OPTION_TRUSTED
);
}
}
input_item_AddOption
(
p_input
,
[[
NSString
stringWithFormat
:
input_item_AddOption
(
p_input
,
[[
NSString
stringWithFormat
:
...
@@ -1311,7 +1326,7 @@ static VLCWizard *_o_sharedInstance = nil;
...
@@ -1311,7 +1326,7 @@ static VLCWizard *_o_sharedInstance = nil;
if
([[
o_userSelections
objectForKey
:
@"partExtract"
]
isEqualToString
:
@"YES"
])
if
([[
o_userSelections
objectForKey
:
@"partExtract"
]
isEqualToString
:
@"YES"
])
{
{
[
o_t8_fld_partExtract
setStringValue
:
[
NSString
stringWithFormat
:
[
o_t8_fld_partExtract
setStringValue
:
[
NSString
stringWithFormat
:
_NS
(
"yes: from %@ to %@
secs
"
),
_NS
(
"yes: from %@ to %@"
),
[
o_userSelections
objectForKey
:
@"partExtractFrom"
],
[
o_userSelections
objectForKey
:
@"partExtractFrom"
],
[
o_userSelections
objectForKey
:
@"partExtractTo"
]]];
[
o_userSelections
objectForKey
:
@"partExtractTo"
]]];
}
else
{
}
else
{
...
...
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