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
58a23fb8
Commit
58a23fb8
authored
Jul 27, 2011
by
Felix Paul Kühne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macosx: store counting mode of the time field (default is to count up)
Fixes #3078
parent
df7cc617
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
11 deletions
+23
-11
modules/gui/macosx/MainWindow.h
modules/gui/macosx/MainWindow.h
+0
-2
modules/gui/macosx/MainWindow.m
modules/gui/macosx/MainWindow.m
+4
-8
modules/gui/macosx/misc.h
modules/gui/macosx/misc.h
+1
-0
modules/gui/macosx/misc.m
modules/gui/macosx/misc.m
+18
-1
No files found.
modules/gui/macosx/MainWindow.h
View file @
58a23fb8
...
@@ -59,7 +59,6 @@
...
@@ -59,7 +59,6 @@
BOOL
b_dark_interface
;
BOOL
b_dark_interface
;
BOOL
b_video_playback_enabled
;
BOOL
b_video_playback_enabled
;
BOOL
b_time_remaining
;
int
i_lastShownVolume
;
int
i_lastShownVolume
;
BOOL
b_mute
;
BOOL
b_mute
;
input_state_e
cachedInputState
;
input_state_e
cachedInputState
;
...
@@ -94,7 +93,6 @@
...
@@ -94,7 +93,6 @@
-
(
IBAction
)
repeat
:(
id
)
sender
;
-
(
IBAction
)
repeat
:(
id
)
sender
;
-
(
IBAction
)
shuffle
:(
id
)
sender
;
-
(
IBAction
)
shuffle
:(
id
)
sender
;
-
(
IBAction
)
timeSliderAction
:(
id
)
sender
;
-
(
IBAction
)
timeSliderAction
:(
id
)
sender
;
-
(
IBAction
)
timeFieldWasClicked
:(
id
)
sender
;
-
(
IBAction
)
volumeAction
:(
id
)
sender
;
-
(
IBAction
)
volumeAction
:(
id
)
sender
;
-
(
IBAction
)
effects
:(
id
)
sender
;
-
(
IBAction
)
effects
:(
id
)
sender
;
-
(
IBAction
)
fullscreen
:(
id
)
sender
;
-
(
IBAction
)
fullscreen
:(
id
)
sender
;
...
...
modules/gui/macosx/MainWindow.m
View file @
58a23fb8
...
@@ -29,6 +29,7 @@
...
@@ -29,6 +29,7 @@
#import "CoreInteraction.h"
#import "CoreInteraction.h"
#import "AudioEffects.h"
#import "AudioEffects.h"
#import "MainMenu.h"
#import "MainMenu.h"
#import "misc.h"
#import "controls.h" // TODO: remove me
#import "controls.h" // TODO: remove me
#import <vlc_playlist.h>
#import <vlc_playlist.h>
#import <vlc_aout_intf.h>
#import <vlc_aout_intf.h>
...
@@ -415,7 +416,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
...
@@ -415,7 +416,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
var_Get
(
p_input
,
"time"
,
&
time
);
var_Get
(
p_input
,
"time"
,
&
time
);
mtime_t
dur
=
input_item_GetDuration
(
input_GetItem
(
p_input
)
);
mtime_t
dur
=
input_item_GetDuration
(
input_GetItem
(
p_input
)
);
if
(
b_time_remaining
&&
dur
!=
-
1
)
if
(
[
o_time_fld
timeRemaining
]
&&
dur
!=
-
1
)
{
{
o_time
=
[
NSString
stringWithFormat
:
@"-%s"
,
secstotimestr
(
psz_time
,
((
dur
-
time
.
i_time
)
/
1000000
)
)];
o_time
=
[
NSString
stringWithFormat
:
@"-%s"
,
secstotimestr
(
psz_time
,
((
dur
-
time
.
i_time
)
/
1000000
)
)];
}
}
...
@@ -429,12 +430,6 @@ static VLCMainWindow *_o_sharedInstance = nil;
...
@@ -429,12 +430,6 @@ static VLCMainWindow *_o_sharedInstance = nil;
[
self
drawFancyGradientEffectForTimeSlider
];
[
self
drawFancyGradientEffectForTimeSlider
];
}
}
-
(
IBAction
)
timeFieldWasClicked
:(
id
)
sender
{
b_time_remaining
=
!
b_time_remaining
;
NSLog
(
@"b_time_remaining %i"
,
b_time_remaining
);
}
-
(
IBAction
)
volumeAction
:(
id
)
sender
-
(
IBAction
)
volumeAction
:(
id
)
sender
{
{
if
(
sender
==
o_volume_sld
)
if
(
sender
==
o_volume_sld
)
...
@@ -477,7 +472,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
...
@@ -477,7 +472,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
var_Get
(
p_input
,
"time"
,
&
time
);
var_Get
(
p_input
,
"time"
,
&
time
);
mtime_t
dur
=
input_item_GetDuration
(
input_GetItem
(
p_input
)
);
mtime_t
dur
=
input_item_GetDuration
(
input_GetItem
(
p_input
)
);
if
(
b_time_remaining
&&
dur
!=
-
1
)
if
(
[
o_time_fld
timeRemaining
]
&&
dur
!=
-
1
)
{
{
o_time
=
[
NSString
stringWithFormat
:
@"-%s"
,
secstotimestr
(
psz_time
,
((
dur
-
time
.
i_time
)
/
1000000
))];
o_time
=
[
NSString
stringWithFormat
:
@"-%s"
,
secstotimestr
(
psz_time
,
((
dur
-
time
.
i_time
)
/
1000000
))];
}
}
...
@@ -485,6 +480,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
...
@@ -485,6 +480,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
o_time
=
[
NSString
stringWithUTF8String
:
secstotimestr
(
psz_time
,
(
time
.
i_time
/
1000000
)
)];
o_time
=
[
NSString
stringWithUTF8String
:
secstotimestr
(
psz_time
,
(
time
.
i_time
/
1000000
)
)];
[
o_time_fld
setStringValue
:
o_time
];
[
o_time_fld
setStringValue
:
o_time
];
[
o_time_fld
setNeedsDisplay
:
YES
];
// [[[[VLCMain sharedInstance] controls] fspanel] setStreamPos: f_updated andTime: o_time];
// [[[[VLCMain sharedInstance] controls] fspanel] setStreamPos: f_updated andTime: o_time];
}
}
else
else
...
...
modules/gui/macosx/misc.h
View file @
58a23fb8
...
@@ -146,4 +146,5 @@
...
@@ -146,4 +146,5 @@
@interface
VLCTimeField
:
NSTextField
@interface
VLCTimeField
:
NSTextField
{
{
}
}
-
(
BOOL
)
timeRemaining
;
@end
@end
modules/gui/macosx/misc.m
View file @
58a23fb8
...
@@ -658,11 +658,28 @@ void _drawFrameInRect(NSRect frameRect)
...
@@ -658,11 +658,28 @@ void _drawFrameInRect(NSRect frameRect)
*****************************************************************************/
*****************************************************************************/
@implementation
VLCTimeField
@implementation
VLCTimeField
+
(
void
)
initialize
{
NSUserDefaults
*
defaults
=
[
NSUserDefaults
standardUserDefaults
];
NSDictionary
*
appDefaults
=
[
NSDictionary
dictionaryWithObject
:
@"NO"
forKey
:
@"DisplayTimeAsTimeRemaining"
];
[
defaults
registerDefaults
:
appDefaults
];
}
-
(
void
)
mouseDown
:
(
NSEvent
*
)
ourEvent
-
(
void
)
mouseDown
:
(
NSEvent
*
)
ourEvent
{
{
if
(
[
ourEvent
clickCount
]
>
1
)
if
(
[
ourEvent
clickCount
]
>
1
)
[[[
VLCMain
sharedInstance
]
controls
]
goToSpecificTime
:
nil
];
[[[
VLCMain
sharedInstance
]
controls
]
goToSpecificTime
:
nil
];
else
else
[[
VLCMainWindow
sharedInstance
]
timeFieldWasClicked
:
self
];
{
if
([[
NSUserDefaults
standardUserDefaults
]
boolForKey
:
@"DisplayTimeAsTimeRemaining"
])
[[
NSUserDefaults
standardUserDefaults
]
setObject
:
@"NO"
forKey
:
@"DisplayTimeAsTimeRemaining"
];
else
[[
NSUserDefaults
standardUserDefaults
]
setObject
:
@"YES"
forKey
:
@"DisplayTimeAsTimeRemaining"
];
}
}
-
(
BOOL
)
timeRemaining
{
return
[[
NSUserDefaults
standardUserDefaults
]
boolForKey
:
@"DisplayTimeAsTimeRemaining"
];
}
}
@end
@end
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