[vlc-commits] macosx: move VLCPositionFormatter to a file of its own
Felix Paul Kühne
git at videolan.org
Mon Jun 3 11:34:58 CEST 2019
vlc | branch: master | Felix Paul Kühne <felix at feepk.net> | Mon Jun 3 11:33:44 2019 +0200| [3baac77bd959beed105e6326b7726a7fc9be7e81] | committer: Felix Paul Kühne
macosx: move VLCPositionFormatter to a file of its own
This way, the umbrella file misc.* can be finally removed.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=3baac77bd959beed105e6326b7726a7fc9be7e81
---
.../package/macosx/VLC.xcodeproj/project.pbxproj | 12 +++++------
modules/gui/macosx/Makefile.am | 4 ++--
.../extensions/{misc.h => VLCPositionFormatter.h} | 16 +++++----------
.../extensions/{misc.m => VLCPositionFormatter.m} | 23 +++++++++++-----------
.../panels/VLCTimeSelectionPanelController.m | 1 -
.../macosx/panels/dialogs/VLCCoreDialogProvider.m | 1 -
.../macosx/preferences/VLCSimplePrefsController.m | 1 -
.../gui/macosx/windows/VLCOpenWindowController.m | 6 +++---
.../extensions/VLCExtensionsDialogProvider.m | 1 -
.../windows/mainwindow/VLCMainWindowControlsBar.h | 1 -
po/POTFILES.in | 4 ++--
11 files changed, 29 insertions(+), 41 deletions(-)
diff --git a/extras/package/macosx/VLC.xcodeproj/project.pbxproj b/extras/package/macosx/VLC.xcodeproj/project.pbxproj
index 7afc0f126c..88cfed3435 100644
--- a/extras/package/macosx/VLC.xcodeproj/project.pbxproj
+++ b/extras/package/macosx/VLC.xcodeproj/project.pbxproj
@@ -31,7 +31,6 @@
1C3113BA1E508C6900D4DD76 /* VLCApplication.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D5678EC1D5BA1DC002698F3 /* VLCApplication.m */; };
1C3113BC1E508C6900D4DD76 /* VLCKeyboardBacklightControl.m in Sources */ = {isa = PBXBuildFile; fileRef = 7DF812F01B555C8E0052293C /* VLCKeyboardBacklightControl.m */; };
1C3113BD1E508C6900D4DD76 /* macosx.m in Sources */ = {isa = PBXBuildFile; fileRef = 8ED6C27E03E2EB1C0059A3A7 /* macosx.m */; };
- 1C3113C51E508C6900D4DD76 /* misc.m in Sources */ = {isa = PBXBuildFile; fileRef = 8ED6C28003E2EB1C0059A3A7 /* misc.m */; };
1C3113C71E508C6900D4DD76 /* VLCOpenWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8ED6C28203E2EB1C0059A3A7 /* VLCOpenWindowController.m */; };
1C3113C91E508C6900D4DD76 /* VLCOutput.m in Sources */ = {isa = PBXBuildFile; fileRef = 8E55FB800459B0FD00FB3317 /* VLCOutput.m */; };
1C3113CF1E508C6900D4DD76 /* prefs_widgets.m in Sources */ = {isa = PBXBuildFile; fileRef = 8E9CA1A406D7DEE800B7186C /* prefs_widgets.m */; };
@@ -158,6 +157,7 @@
7DD2F5C52081B73B007EE187 /* VLCRemoteControlService.m in Sources */ = {isa = PBXBuildFile; fileRef = 7DD2F5C42081B73B007EE187 /* VLCRemoteControlService.m */; };
7DE2F0442282C84A0040DD0A /* VLCLibraryAudioDataSource.m in Sources */ = {isa = PBXBuildFile; fileRef = 7DE2F0432282C84A0040DD0A /* VLCLibraryAudioDataSource.m */; };
7DE2F0472282D5D10040DD0A /* VLCLibraryTableCellView.m in Sources */ = {isa = PBXBuildFile; fileRef = 7DE2F0462282D5D10040DD0A /* VLCLibraryTableCellView.m */; };
+ 7DE7232E22A51F8D00D72616 /* VLCPositionFormatter.m in Sources */ = {isa = PBXBuildFile; fileRef = 7DE7232D22A51F8D00D72616 /* VLCPositionFormatter.m */; };
7DE7E72F228C795B00D6EA38 /* VLCLibraryAlternativeAudioViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7DE7E72E228C795B00D6EA38 /* VLCLibraryAlternativeAudioViewController.m */; };
7DE82E7922843781002D341A /* VLCLibraryAlbumTableCellView.m in Sources */ = {isa = PBXBuildFile; fileRef = 7DE82E7822843781002D341A /* VLCLibraryAlbumTableCellView.m */; };
7DE9C7DD220728420089108F /* VLCPlayerController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7DE9C7DC220728420089108F /* VLCPlayerController.m */; };
@@ -551,6 +551,8 @@
7DE2F0452282D5D10040DD0A /* VLCLibraryTableCellView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = VLCLibraryTableCellView.h; sourceTree = "<group>"; };
7DE2F0462282D5D10040DD0A /* VLCLibraryTableCellView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = VLCLibraryTableCellView.m; sourceTree = "<group>"; };
7DE2F0482282D7980040DD0A /* VLCLibraryTableCellView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = VLCLibraryTableCellView.xib; sourceTree = "<group>"; };
+ 7DE7232C22A51F8C00D72616 /* VLCPositionFormatter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = VLCPositionFormatter.h; sourceTree = "<group>"; };
+ 7DE7232D22A51F8D00D72616 /* VLCPositionFormatter.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = VLCPositionFormatter.m; sourceTree = "<group>"; };
7DE7E72D228C795B00D6EA38 /* VLCLibraryAlternativeAudioViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = VLCLibraryAlternativeAudioViewController.h; sourceTree = "<group>"; };
7DE7E72E228C795B00D6EA38 /* VLCLibraryAlternativeAudioViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = VLCLibraryAlternativeAudioViewController.m; sourceTree = "<group>"; };
7DE82E7722843781002D341A /* VLCLibraryAlbumTableCellView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = VLCLibraryAlbumTableCellView.h; sourceTree = "<group>"; };
@@ -598,8 +600,6 @@
8ED6C27C03E2EB1C0059A3A7 /* VLCMain.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VLCMain.h; sourceTree = "<group>"; };
8ED6C27D03E2EB1C0059A3A7 /* VLCMain.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VLCMain.m; sourceTree = "<group>"; };
8ED6C27E03E2EB1C0059A3A7 /* macosx.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = macosx.m; sourceTree = "<group>"; };
- 8ED6C27F03E2EB1C0059A3A7 /* misc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = misc.h; sourceTree = "<group>"; };
- 8ED6C28003E2EB1C0059A3A7 /* misc.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = misc.m; sourceTree = "<group>"; };
8ED6C28103E2EB1C0059A3A7 /* VLCOpenWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VLCOpenWindowController.h; sourceTree = "<group>"; };
8ED6C28203E2EB1C0059A3A7 /* VLCOpenWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VLCOpenWindowController.m; sourceTree = "<group>"; };
8ED6C28503E2EB1C0059A3A7 /* prefs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = prefs.h; sourceTree = "<group>"; };
@@ -974,14 +974,14 @@
1C1ED5112204B08E00811EC0 /* extensions */ = {
isa = PBXGroup;
children = (
- 8ED6C27F03E2EB1C0059A3A7 /* misc.h */,
- 8ED6C28003E2EB1C0059A3A7 /* misc.m */,
6B4D50A51E7AB52C004479B5 /* NSScreen+VLCAdditions.h */,
6B4D50A61E7AB52C004479B5 /* NSScreen+VLCAdditions.m */,
6B4D50941E7A7D16004479B5 /* NSSound+VLCAdditions.h */,
6B4D50951E7A7D16004479B5 /* NSSound+VLCAdditions.m */,
6B397C4D216C8EB200403ED0 /* NSString+Helpers.h */,
6B397C4E216C8EB200403ED0 /* NSString+Helpers.m */,
+ 7DE7232C22A51F8C00D72616 /* VLCPositionFormatter.h */,
+ 7DE7232D22A51F8D00D72616 /* VLCPositionFormatter.m */,
6B7F1FDD1F07DA920002BDD8 /* VLCHexNumberFormatter.h */,
6B7F1FDE1F07DA920002BDD8 /* VLCHexNumberFormatter.m */,
7D28E6342275B4820098D30E /* NSColor+VLCAdditions.h */,
@@ -1663,6 +1663,7 @@
1CCC89012078A3D500E5626F /* Preferences.xib in Sources */,
7DC21A7422049A6600F98A02 /* VLCOpenInputMetadata.m in Sources */,
1CCC89022078A3D500E5626F /* ResumeDialog.xib in Sources */,
+ 7DE7232E22A51F8D00D72616 /* VLCPositionFormatter.m in Sources */,
1CCC89032078A3D500E5626F /* SimplePreferences.xib in Sources */,
7DE82E7922843781002D341A /* VLCLibraryAlbumTableCellView.m in Sources */,
1CCC89042078A3D500E5626F /* StreamOutput.xib in Sources */,
@@ -1732,7 +1733,6 @@
1C3113BC1E508C6900D4DD76 /* VLCKeyboardBacklightControl.m in Sources */,
1C3113BD1E508C6900D4DD76 /* macosx.m in Sources */,
6B0292E61F43256300A50082 /* VLCBottomBarView.m in Sources */,
- 1C3113C51E508C6900D4DD76 /* misc.m in Sources */,
1C3113C71E508C6900D4DD76 /* VLCOpenWindowController.m in Sources */,
7D0F64062202047900FDB91F /* VLCLibraryCollectionViewItem.m in Sources */,
7D713D322201AE350042BEB7 /* VLCLibraryWindow.m in Sources */,
diff --git a/modules/gui/macosx/Makefile.am b/modules/gui/macosx/Makefile.am
index f47f77bdc8..325858c2dc 100644
--- a/modules/gui/macosx/Makefile.am
+++ b/modules/gui/macosx/Makefile.am
@@ -44,8 +44,8 @@ libmacosx_plugin_la_SOURCES = \
gui/macosx/extensions/NSView+VLCAdditions.m \
gui/macosx/extensions/VLCHexNumberFormatter.h \
gui/macosx/extensions/VLCHexNumberFormatter.m \
- gui/macosx/extensions/misc.h \
- gui/macosx/extensions/misc.m \
+ gui/macosx/extensions/VLCPositionFormatter.h \
+ gui/macosx/extensions/VLCPositionFormatter.m \
gui/macosx/imported/AppleRemote/AppleRemote.h \
gui/macosx/imported/AppleRemote/AppleRemote.m \
gui/macosx/imported/SPMediaKeyTap/SPMediaKeyTap.h \
diff --git a/modules/gui/macosx/extensions/misc.h b/modules/gui/macosx/extensions/VLCPositionFormatter.h
similarity index 71%
rename from modules/gui/macosx/extensions/misc.h
rename to modules/gui/macosx/extensions/VLCPositionFormatter.h
index 75b3474464..06fd832f8c 100644
--- a/modules/gui/macosx/extensions/misc.h
+++ b/modules/gui/macosx/extensions/VLCPositionFormatter.h
@@ -1,10 +1,9 @@
/*****************************************************************************
- * misc.h: code not specific to vlc
+ * VLCPositionFormatter.h: MacOS X interface module
*****************************************************************************
- * Copyright (C) 2003-2014 VLC authors and VideoLAN
+ * Copyright (C) 2013, 2019 VLC authors and VideoLAN
*
- * Authors: Jon Lech Johansen <jon-vl at nanocrew.net>
- * Felix Paul Kühne <fkuehne at videolan dot org>
+ * Author: David Fuhrmann <dfuhrmann # videolan.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -21,14 +20,9 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
-#import <Cocoa/Cocoa.h>
+#import <Foundation/Foundation.h>
-/*****************************************************************************
- * PositionFormatter interface
- *
- * Formats a text field to only accept decimals and :
- *****************************************************************************/
- at interface PositionFormatter : NSFormatter
+ at interface VLCPositionFormatter : NSFormatter
- (NSString*)stringForObjectValue:(id)obj;
diff --git a/modules/gui/macosx/extensions/misc.m b/modules/gui/macosx/extensions/VLCPositionFormatter.m
similarity index 77%
rename from modules/gui/macosx/extensions/misc.m
rename to modules/gui/macosx/extensions/VLCPositionFormatter.m
index 2f46b73e14..2db4a6d98a 100644
--- a/modules/gui/macosx/extensions/misc.m
+++ b/modules/gui/macosx/extensions/VLCPositionFormatter.m
@@ -1,10 +1,9 @@
/*****************************************************************************
- * misc.m: code not specific to vlc
+ * VLCPositionFormatter.m: MacOS X interface module
*****************************************************************************
- * Copyright (C) 2003-2015 VLC authors and VideoLAN
+ * Copyright (C) 2013, 2019 VLC authors and VideoLAN
*
- * Authors: Jon Lech Johansen <jon-vl at nanocrew.net>
- * Felix Paul Kühne <fkuehne at videolan dot org>
+ * Author: David Fuhrmann <dfuhrmann # videolan.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -21,24 +20,24 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
-#import "misc.h"
-#import "NSString+Helpers.h"
+#import "VLCPositionFormatter.h"
- at interface PositionFormatter()
+ at interface VLCPositionFormatter()
{
NSCharacterSet *o_forbidden_characters;
}
@end
- at implementation PositionFormatter
+ at implementation VLCPositionFormatter
- (id)init
{
self = [super init];
- NSMutableCharacterSet *nonNumbers = [[[NSCharacterSet decimalDigitCharacterSet] invertedSet] mutableCopy];
- [nonNumbers removeCharactersInString:@"-:"];
- o_forbidden_characters = [nonNumbers copy];
-
+ if (self) {
+ NSMutableCharacterSet *nonNumbers = [[[NSCharacterSet decimalDigitCharacterSet] invertedSet] mutableCopy];
+ [nonNumbers removeCharactersInString:@"-:"];
+ o_forbidden_characters = [nonNumbers copy];
+ }
return self;
}
diff --git a/modules/gui/macosx/panels/VLCTimeSelectionPanelController.m b/modules/gui/macosx/panels/VLCTimeSelectionPanelController.m
index af361a0eba..bf4dd7fb58 100644
--- a/modules/gui/macosx/panels/VLCTimeSelectionPanelController.m
+++ b/modules/gui/macosx/panels/VLCTimeSelectionPanelController.m
@@ -22,7 +22,6 @@
#import "VLCTimeSelectionPanelController.h"
#import "extensions/NSString+Helpers.h"
-#import "extensions/misc.h"
@interface VLCTimeSelectionPanelController()
{
diff --git a/modules/gui/macosx/panels/dialogs/VLCCoreDialogProvider.m b/modules/gui/macosx/panels/dialogs/VLCCoreDialogProvider.m
index e9d9fa3cae..c5c65b9f39 100644
--- a/modules/gui/macosx/panels/dialogs/VLCCoreDialogProvider.m
+++ b/modules/gui/macosx/panels/dialogs/VLCCoreDialogProvider.m
@@ -23,7 +23,6 @@
#import "VLCCoreDialogProvider.h"
-#import "extensions/misc.h"
#import "extensions/NSString+Helpers.h"
#import "main/VLCMain.h"
#import "windows/VLCErrorWindowController.h"
diff --git a/modules/gui/macosx/preferences/VLCSimplePrefsController.m b/modules/gui/macosx/preferences/VLCSimplePrefsController.m
index 888d039117..66c29ec665 100644
--- a/modules/gui/macosx/preferences/VLCSimplePrefsController.m
+++ b/modules/gui/macosx/preferences/VLCSimplePrefsController.m
@@ -39,7 +39,6 @@
#import <vlc_config_cat.h>
#import <vlc_aout.h>
-#import "extensions/misc.h"
#import "extensions/NSScreen+VLCAdditions.h"
#import "extensions/NSString+Helpers.h"
#import "extensions/NSFont+VLCAdditions.h"
diff --git a/modules/gui/macosx/windows/VLCOpenWindowController.m b/modules/gui/macosx/windows/VLCOpenWindowController.m
index bc887291b5..1c3884655f 100644
--- a/modules/gui/macosx/windows/VLCOpenWindowController.m
+++ b/modules/gui/macosx/windows/VLCOpenWindowController.m
@@ -32,8 +32,8 @@
#import <vlc_common.h>
#import <vlc_url.h>
-#import "extensions/misc.h"
#import "extensions/NSString+Helpers.h"
+#import "extensions/VLCPositionFormatter.h"
#import "main/VLCMain.h"
#import "playlist/VLCPlaylistController.h"
#import "windows/convertandsave/VLCOutput.h"
@@ -208,8 +208,8 @@ static NSString *kCaptureTabViewId = @"capture";
[_screenqtkAudioCheckbox setTitle: _NS("Capture Audio")];
// setup start / stop time fields
- [_fileStartTimeTextField setFormatter:[[PositionFormatter alloc] init]];
- [_fileStopTimeTextField setFormatter:[[PositionFormatter alloc] init]];
+ [_fileStartTimeTextField setFormatter:[[VLCPositionFormatter alloc] init]];
+ [_fileStopTimeTextField setFormatter:[[VLCPositionFormatter alloc] init]];
// Auto collapse MRL field
self.mrlViewHeightConstraint.constant = 0;
diff --git a/modules/gui/macosx/windows/extensions/VLCExtensionsDialogProvider.m b/modules/gui/macosx/windows/extensions/VLCExtensionsDialogProvider.m
index 015c7f274a..97160b336c 100644
--- a/modules/gui/macosx/windows/extensions/VLCExtensionsDialogProvider.m
+++ b/modules/gui/macosx/windows/extensions/VLCExtensionsDialogProvider.m
@@ -28,7 +28,6 @@
#import "main/VLCMain.h"
#import "VLCExtensionsManager.h"
#import "extensions/NSString+Helpers.h"
-#import "extensions/misc.h"
#import "VLCUIWidgets.h"
#import <WebKit/WebKit.h>
diff --git a/modules/gui/macosx/windows/mainwindow/VLCMainWindowControlsBar.h b/modules/gui/macosx/windows/mainwindow/VLCMainWindowControlsBar.h
index 14c9909a2d..8dfb54e335 100644
--- a/modules/gui/macosx/windows/mainwindow/VLCMainWindowControlsBar.h
+++ b/modules/gui/macosx/windows/mainwindow/VLCMainWindowControlsBar.h
@@ -23,7 +23,6 @@
#import <Cocoa/Cocoa.h>
-#import "extensions/misc.h"
#import "views/VLCVolumeSlider.h"
#import "windows/mainwindow/VLCControlsBarCommon.h"
diff --git a/po/POTFILES.in b/po/POTFILES.in
index f30a4eeeb2..4b924695a4 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -454,8 +454,8 @@ modules/gui/macosx/extensions/NSView+VLCAdditions.h
modules/gui/macosx/extensions/NSView+VLCAdditions.m
modules/gui/macosx/extensions/VLCHexNumberFormatter.h
modules/gui/macosx/extensions/VLCHexNumberFormatter.m
-modules/gui/macosx/extensions/misc.h
-modules/gui/macosx/extensions/misc.m
+modules/gui/macosx/extensions/VLCPositionFormatter.h
+modules/gui/macosx/extensions/VLCPositionFormatter.m
modules/gui/macosx/library/VLCInputItem.h
modules/gui/macosx/library/VLCInputItem.m
modules/gui/macosx/library/VLCLibraryAlbumTableCellView.h
More information about the vlc-commits
mailing list