[vlc-commits] macOS: Move VLCOpenTextField out of misc

Marvin Scholz git at videolan.org
Thu Jun 1 08:46:06 CEST 2017


vlc | branch: master | Marvin Scholz <epirat07 at gmail.com> | Thu Jun  1 08:40:35 2017 +0200| [79d9c57563600637816d0b90e358a3e057caf410] | committer: Marvin Scholz

macOS: Move VLCOpenTextField out of misc

The VLCOpenTextField is only ever used in the VLCOpenWindowController.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=79d9c57563600637816d0b90e358a3e057caf410
---

 modules/gui/macosx/VLCOpenWindowController.m | 17 +++++++++++++++++
 modules/gui/macosx/misc.h                    |  6 ------
 modules/gui/macosx/misc.m                    | 13 -------------
 3 files changed, 17 insertions(+), 19 deletions(-)

diff --git a/modules/gui/macosx/VLCOpenWindowController.m b/modules/gui/macosx/VLCOpenWindowController.m
index 139b191029..5ca3d5f3f8 100644
--- a/modules/gui/macosx/VLCOpenWindowController.m
+++ b/modules/gui/macosx/VLCOpenWindowController.m
@@ -44,6 +44,23 @@
 
 #import <vlc_url.h>
 
+NSString *const VLCOpenTextFieldWasClicked = @"VLCOpenTextFieldWasClicked";
+
+ at interface VLCOpenTextField : NSTextField
+- (void)mouseDown:(NSEvent *)theEvent;
+ at end
+
+ at implementation VLCOpenTextField
+
+- (void)mouseDown:(NSEvent *)theEvent
+{
+    [[NSNotificationCenter defaultCenter] postNotificationName: VLCOpenTextFieldWasClicked
+                                                        object: self];
+    [super mouseDown: theEvent];
+}
+
+ at end
+
 struct display_info_t
 {
     CGRect rect;
diff --git a/modules/gui/macosx/misc.h b/modules/gui/macosx/misc.h
index 658227215a..80b6fcfe0d 100644
--- a/modules/gui/macosx/misc.h
+++ b/modules/gui/macosx/misc.h
@@ -188,9 +188,3 @@ typedef NSInteger NSByteCountFormatterCountStyle;
 
 + (NSString *)stringFromByteCount:(long long)byteCount countStyle:(NSByteCountFormatterCountStyle)countStyle;
 @end
-
-extern NSString *const VLCOpenTextFieldWasClicked;
-
- at interface VLCOpenTextField : NSTextField
-- (void)mouseDown:(NSEvent *)theEvent;
- at end
diff --git a/modules/gui/macosx/misc.m b/modules/gui/macosx/misc.m
index d27e111f6a..32a2ac90e0 100644
--- a/modules/gui/macosx/misc.m
+++ b/modules/gui/macosx/misc.m
@@ -31,8 +31,6 @@
 #import "VLCCoreInteraction.h"
 #import <vlc_keys.h>
 
-NSString *const VLCOpenTextFieldWasClicked = @"VLCOpenTextFieldWasClicked";
-
 /*****************************************************************************
  * VLCDragDropView
  *****************************************************************************/
@@ -737,14 +735,3 @@ end:
 }
 
 @end
-
- at implementation VLCOpenTextField
-
-- (void)mouseDown:(NSEvent *)theEvent
-{
-    [[NSNotificationCenter defaultCenter] postNotificationName: VLCOpenTextFieldWasClicked
-                                                        object: self];
-    [super mouseDown: theEvent];
-}
-
- at end



More information about the vlc-commits mailing list