[vlc-commits] macosx/VLCTimeField: correctly define magic key
Felix Paul Kühne
git at videolan.org
Mon Jun 3 11:34:56 CEST 2019
vlc | branch: master | Felix Paul Kühne <felix at feepk.net> | Mon Jun 3 11:21:12 2019 +0200| [a528817492447b03e3a078ac939cd829e3bb0b4b] | committer: Felix Paul Kühne
macosx/VLCTimeField: correctly define magic key
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a528817492447b03e3a078ac939cd829e3bb0b4b
---
modules/gui/macosx/views/VLCTimeField.h | 2 ++
modules/gui/macosx/views/VLCTimeField.m | 5 +++--
modules/gui/macosx/windows/mainwindow/VLCControlsBarCommon.m | 2 +-
modules/gui/macosx/windows/video/VLCFSPanelController.m | 2 +-
4 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/modules/gui/macosx/views/VLCTimeField.h b/modules/gui/macosx/views/VLCTimeField.h
index e688596c06..7b4b37464b 100644
--- a/modules/gui/macosx/views/VLCTimeField.h
+++ b/modules/gui/macosx/views/VLCTimeField.h
@@ -30,6 +30,8 @@
* we need the implementation to catch our click-event in the controller window
*****************************************************************************/
+extern NSString *VLCTimeFieldDisplayTimeAsRemaining;
+
@interface VLCTimeField : NSTextField
@property (readonly) BOOL timeRemaining;
diff --git a/modules/gui/macosx/views/VLCTimeField.m b/modules/gui/macosx/views/VLCTimeField.m
index e349a04401..578cb9b6f7 100644
--- a/modules/gui/macosx/views/VLCTimeField.m
+++ b/modules/gui/macosx/views/VLCTimeField.m
@@ -27,6 +27,8 @@
#import "main/VLCMain.h"
#import "menus/VLCMainMenu.h"
+NSString *VLCTimeFieldDisplayTimeAsRemaining = @"DisplayTimeAsTimeRemaining";
+
@interface VLCTimeField ()
{
NSString *o_remaining_identifier;
@@ -39,8 +41,7 @@
{
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
NSDictionary *appDefaults = [NSDictionary dictionaryWithObjectsAndKeys:
- @"NO", @"DisplayTimeAsTimeRemaining",
- @"YES", @"DisplayFullscreenTimeAsTimeRemaining",
+ @"NO", VLCTimeFieldDisplayTimeAsRemaining,
nil];
[defaults registerDefaults:appDefaults];
diff --git a/modules/gui/macosx/windows/mainwindow/VLCControlsBarCommon.m b/modules/gui/macosx/windows/mainwindow/VLCControlsBarCommon.m
index 1471454c59..916f506b56 100644
--- a/modules/gui/macosx/windows/mainwindow/VLCControlsBarCommon.m
+++ b/modules/gui/macosx/windows/mainwindow/VLCControlsBarCommon.m
@@ -117,7 +117,7 @@
[self.timeField setFont:[NSFont titleBarFontOfSize:10.0]];
[self.timeField setAlignment: NSCenterTextAlignment];
[self.timeField setNeedsDisplay:YES];
- [self.timeField setRemainingIdentifier:@"DisplayTimeAsTimeRemaining"];
+ [self.timeField setRemainingIdentifier:VLCTimeFieldDisplayTimeAsRemaining];
self.timeField.accessibilityLabel = _NS("Playback time");
// remove fullscreen button for lion fullscreen
diff --git a/modules/gui/macosx/windows/video/VLCFSPanelController.m b/modules/gui/macosx/windows/video/VLCFSPanelController.m
index 9e4e7e038f..7db573123f 100644
--- a/modules/gui/macosx/windows/video/VLCFSPanelController.m
+++ b/modules/gui/macosx/windows/video/VLCFSPanelController.m
@@ -156,7 +156,7 @@ static NSString *kAssociatedFullscreenRect = @"VLCFullscreenAssociatedWindowRect
* this is the same identifier as used for the window playback cotrols
* so the state is shared between those.
*/
- [_remainingOrTotalTime setRemainingIdentifier:@"DisplayTimeAsTimeRemaining"];
+ [_remainingOrTotalTime setRemainingIdentifier:VLCTimeFieldDisplayTimeAsRemaining];
}
#undef setupButton
More information about the vlc-commits
mailing list