mirror of https://code.videolan.org/videolan/vlc
macosx/core dialog provider: cosmetics
This commit is contained in:
parent
739e12441e
commit
63b9ae0971
|
@ -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;
|
||||
|
||||
@property (atomic,readwrite) BOOL progressCancelled;
|
||||
|
||||
- (IBAction)authenticationDialogAction:(id)sender;
|
||||
|
||||
- (IBAction)progressDialogAction:(id)sender;
|
||||
|
|
|
@ -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")];
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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];
|
||||
|
|
Loading…
Reference in New Issue