[vlc-commits] macosx/core dialog provider: cosmetics

Felix Paul Kühne git at videolan.org
Wed Sep 25 19:41:53 CEST 2019


vlc | branch: master | Felix Paul Kühne <felix at feepk.net> | Fri Sep 20 12:18:20 2019 +0200| [63b9ae09715852b2201f689b7f8eaba51b355cb5] | committer: Felix Paul Kühne

macosx/core dialog provider: cosmetics

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

 modules/gui/macosx/panels/dialogs/VLCCoreDialogProvider.h |  5 -----
 modules/gui/macosx/panels/dialogs/VLCCoreDialogProvider.m |  9 ++++-----
 modules/gui/macosx/windows/VLCErrorWindowController.h     |  1 -
 modules/gui/macosx/windows/VLCErrorWindowController.m     | 15 ++++++---------
 4 files changed, 10 insertions(+), 20 deletions(-)

diff --git a/modules/gui/macosx/panels/dialogs/VLCCoreDialogProvider.h b/modules/gui/macosx/panels/dialogs/VLCCoreDialogProvider.h
index 943d4910bc..199967f8fc 100644
--- a/modules/gui/macosx/panels/dialogs/VLCCoreDialogProvider.h
+++ b/modules/gui/macosx/panels/dialogs/VLCCoreDialogProvider.h
@@ -21,8 +21,6 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
-#import <vlc_common.h>
-#import <vlc_dialog.h>
 #import <Cocoa/Cocoa.h>
 
 /*****************************************************************************
@@ -54,11 +52,8 @@
 @property (readwrite, weak) IBOutlet NSTextField *progressDescriptionLabel;
 @property (readwrite, weak) IBOutlet NSTextField *progressTitleLabel;
 
-
 @property (readonly) VLCErrorWindowController* errorPanel;
 
- at property (atomic,readwrite) BOOL progressCancelled;
-
 - (IBAction)authenticationDialogAction:(id)sender;
 
 - (IBAction)progressDialogAction:(id)sender;
diff --git a/modules/gui/macosx/panels/dialogs/VLCCoreDialogProvider.m b/modules/gui/macosx/panels/dialogs/VLCCoreDialogProvider.m
index 6170bd6796..e41e9c44ef 100644
--- a/modules/gui/macosx/panels/dialogs/VLCCoreDialogProvider.m
+++ b/modules/gui/macosx/panels/dialogs/VLCCoreDialogProvider.m
@@ -27,12 +27,13 @@
 #import "main/VLCMain.h"
 #import "windows/VLCErrorWindowController.h"
 
-/* for the icon in our custom error panel */
-#import <ApplicationServices/ApplicationServices.h>
+#import <vlc_common.h>
+#import <vlc_dialog.h>
 
 @interface VLCCoreDialogProvider ()
 
-- (void)displayErrorWithTitle:(NSString *)title text:(NSString *)text;
+- (void)displayErrorWithTitle:(NSString *)title
+                         text:(NSString *)text;
 
 - (void)displayLoginDialog:(vlc_dialog_id *)dialogID
                      title:(NSString *)title
@@ -61,7 +62,6 @@
 
 @end
 
-
 static void displayErrorCallback(void *p_data,
                                  const char *psz_title,
                                  const char *psz_text)
@@ -210,7 +210,6 @@ static void updateProgressCallback(void *p_data,
 
 -(void)awakeFromNib
 {
-    _progressCancelled = NO;
     [_authenticationLoginLabel setStringValue: _NS("Username")];
     [_authenticationPasswordLabel setStringValue: _NS("Password")];
     [_authenticationCancelButton setTitle: _NS("Cancel")];
diff --git a/modules/gui/macosx/windows/VLCErrorWindowController.h b/modules/gui/macosx/windows/VLCErrorWindowController.h
index 9a1ff62ff3..7814e7e882 100644
--- a/modules/gui/macosx/windows/VLCErrorWindowController.h
+++ b/modules/gui/macosx/windows/VLCErrorWindowController.h
@@ -28,7 +28,6 @@
 @property (readwrite, weak) IBOutlet NSButton    *cleanupButton;
 @property (readwrite, weak) IBOutlet NSTableView *errorTable;
 
-
 - (IBAction)cleanupTable:(id)sender;
 
 - (void)addError:(NSString *)title withMsg:(NSString *)message;
diff --git a/modules/gui/macosx/windows/VLCErrorWindowController.m b/modules/gui/macosx/windows/VLCErrorWindowController.m
index 58de28cd34..3d9b2a92fe 100644
--- a/modules/gui/macosx/windows/VLCErrorWindowController.m
+++ b/modules/gui/macosx/windows/VLCErrorWindowController.m
@@ -30,7 +30,6 @@
     NSMutableArray *_errors;
     NSMutableArray *_icons;
 }
-
 @end
 
 @implementation VLCErrorWindowController
@@ -64,12 +63,10 @@
     NSMutableAttributedString * ourError;
     ourError = [[NSMutableAttributedString alloc] initWithString:
                 [NSString stringWithFormat:@"%@\n%@", title, message]
-                                                      attributes:
-                [NSDictionary dictionaryWithObject: [NSFont systemFontOfSize:11] forKey: NSFontAttributeName]];
-    [ourError
-     addAttribute: NSFontAttributeName
-     value: [NSFont boldSystemFontOfSize:11]
-     range: NSMakeRange(0, [title length])];
+                                                      attributes:@{NSFontAttributeName : [NSFont systemFontOfSize:11]}];
+    [ourError addAttribute: NSFontAttributeName
+                     value: [NSFont boldSystemFontOfSize:11]
+                     range: NSMakeRange(0, [title length])];
     [_errors addObject: ourError];
 
     [_icons addObject: [[NSWorkspace sharedWorkspace] iconForFileType:NSFileTypeForHFSTypeCode(kAlertStopIcon)]];
@@ -92,8 +89,8 @@
     return [_errors count];
 }
 
-- (id)tableView:(NSTableView *)theDataTable objectValueForTableColumn:
-(NSTableColumn *)theTableColumn row: (NSInteger)row
+- (id)tableView:(NSTableView *)theDataTable objectValueForTableColumn:(NSTableColumn *)theTableColumn
+            row: (NSInteger)row
 {
     if ([[theTableColumn identifier] isEqualToString: @"error_msg"])
         return [_errors objectAtIndex:row];



More information about the vlc-commits mailing list