Commit 0d6b80ff authored by Felix Paul Kühne's avatar Felix Paul Kühne Committed by Jean-Baptiste Kempf

macosx: removed tabs and fixed whitespacing errors

(cherry picked from commit cff6fc15)
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent ff372103
...@@ -251,7 +251,8 @@ static void Close( vlc_object_t *p_this ) ...@@ -251,7 +251,8 @@ static void Close( vlc_object_t *p_this )
msg_Dbg( p_access, "plugin notified" ); msg_Dbg( p_access, "plugin notified" );
close(p_sys->eyetvSock);
close(p_sys->eyetvSock);
msg_Dbg( p_access, "msg port closed and freed" ); msg_Dbg( p_access, "msg port closed and freed" );
......
...@@ -141,7 +141,8 @@ vlc_module_end () ...@@ -141,7 +141,8 @@ vlc_module_end ()
{ {
CVImageBufferRef imageBuffer; CVImageBufferRef imageBuffer;
mtime_t pts; mtime_t pts;
void * pixels;
void * pixels;
if(!currentImageBuffer || currentPts == previousPts ) if(!currentImageBuffer || currentPts == previousPts )
return 0; return 0;
......
...@@ -74,8 +74,11 @@ enum AppleRemoteEventIdentifier ...@@ -74,8 +74,11 @@ enum AppleRemoteEventIdentifier
kRemoteControl_Switched =1<<11, kRemoteControl_Switched =1<<11,
kRemoteButtonVolume_Plus_Hold =1<<12, kRemoteButtonVolume_Plus_Hold =1<<12,
kRemoteButtonVolume_Minus_Hold =1<<13, kRemoteButtonVolume_Minus_Hold =1<<13,
k2009RemoteButtonPlay =1<<14, k2009RemoteButtonPlay
k2009RemoteButtonFullscreen =1<<15
=1<<14,
k2009RemoteButtonFullscreen
=1<<15
}; };
typedef enum AppleRemoteEventIdentifier AppleRemoteEventIdentifier; typedef enum AppleRemoteEventIdentifier AppleRemoteEventIdentifier;
......
...@@ -878,6 +878,7 @@ static VLCMainMenu *_o_sharedInstance = nil; ...@@ -878,6 +878,7 @@ static VLCMainMenu *_o_sharedInstance = nil;
bool b_value; bool b_value;
playlist_t *p_playlist = pl_Get( VLCIntf ); playlist_t *p_playlist = pl_Get( VLCIntf );
b_value = var_GetBool( p_playlist, "random" ); b_value = var_GetBool( p_playlist, "random" );
[o_mi_random setState: b_value]; [o_mi_random setState: b_value];
} }
...@@ -1242,7 +1243,9 @@ static VLCMainMenu *_o_sharedInstance = nil; ...@@ -1242,7 +1243,9 @@ static VLCMainMenu *_o_sharedInstance = nil;
if( [o_title isEqualToString: _NS("Normal Size")] ) if( [o_title isEqualToString: _NS("Normal Size")] )
{ {
NSMenuItem *item = [[o_mi menu] itemWithTitle:_NS("Teletext")]; NSMenuItem *item = [[o_mi menu] itemWithTitle:_NS("Teletext")];
bool b_telx = p_input && var_GetInteger( p_input, "teletext-es" ) >= 0;
bool b_telx = p_input && var_GetInteger( p_input, "teletext-es" ) >= 0;
[[item submenu] setAutoenablesItems:NO]; [[item submenu] setAutoenablesItems:NO];
for( int k=0; k < [[item submenu] numberOfItems]; k++ ) for( int k=0; k < [[item submenu] numberOfItems]; k++ )
......
...@@ -682,6 +682,7 @@ static VLCMainWindow *_o_sharedInstance = nil; ...@@ -682,6 +682,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
bool b_value; bool b_value;
playlist_t *p_playlist = pl_Get( VLCIntf ); playlist_t *p_playlist = pl_Get( VLCIntf );
b_value = var_GetBool( p_playlist, "random" ); b_value = var_GetBool( p_playlist, "random" );
if(b_value) { if(b_value) {
[o_shuffle_btn setImage: o_shuffle_on_img]; [o_shuffle_btn setImage: o_shuffle_on_img];
[o_shuffle_btn setAlternateImage: o_shuffle_on_pressed_img]; [o_shuffle_btn setAlternateImage: o_shuffle_on_pressed_img];
...@@ -780,6 +781,7 @@ static VLCMainWindow *_o_sharedInstance = nil; ...@@ -780,6 +781,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
- (BOOL)validateMenuItem:(NSMenuItem *)menuItem - (BOOL)validateMenuItem:(NSMenuItem *)menuItem
{ {
SEL s_menuAction = [menuItem action]; SEL s_menuAction = [menuItem action];
if ((s_menuAction == @selector(performClose:)) || (s_menuAction == @selector(performMiniaturize:)) || (s_menuAction == @selector(performZoom:))) if ((s_menuAction == @selector(performClose:)) || (s_menuAction == @selector(performMiniaturize:)) || (s_menuAction == @selector(performZoom:)))
return YES; return YES;
...@@ -788,7 +790,8 @@ static VLCMainWindow *_o_sharedInstance = nil; ...@@ -788,7 +790,8 @@ static VLCMainWindow *_o_sharedInstance = nil;
- (BOOL)isMainWindow - (BOOL)isMainWindow
{ {
return YES;
return YES;
} }
- (void)setTitle:(NSString *)title - (void)setTitle:(NSString *)title
...@@ -1975,24 +1978,20 @@ static VLCMainWindow *_o_sharedInstance = nil; ...@@ -1975,24 +1978,20 @@ static VLCMainWindow *_o_sharedInstance = nil;
- (NSUInteger)sourceList:(PXSourceList*)sourceList numberOfChildrenOfItem:(id)item - (NSUInteger)sourceList:(PXSourceList*)sourceList numberOfChildrenOfItem:(id)item
{ {
//Works the same way as the NSOutlineView data source: `nil` means a parent item //Works the same way as the NSOutlineView data source: `nil` means a parent item
if(item==nil) { if(item==nil)
return [o_sidebaritems count]; return [o_sidebaritems count];
} else
else {
return [[item children] count]; return [[item children] count];
}
} }
- (id)sourceList:(PXSourceList*)aSourceList child:(NSUInteger)index ofItem:(id)item - (id)sourceList:(PXSourceList*)aSourceList child:(NSUInteger)index ofItem:(id)item
{ {
//Works the same way as the NSOutlineView data source: `nil` means a parent item //Works the same way as the NSOutlineView data source: `nil` means a parent item
if(item==nil) { if(item==nil)
return [o_sidebaritems objectAtIndex:index]; return [o_sidebaritems objectAtIndex:index];
} else
else {
return [[item children] objectAtIndex:index]; return [[item children] objectAtIndex:index];
}
} }
...@@ -2042,6 +2041,7 @@ static VLCMainWindow *_o_sharedInstance = nil; ...@@ -2042,6 +2041,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
return i_playlist_size; return i_playlist_size;
} }
return [item badgeValue]; return [item badgeValue];
} }
...@@ -2059,7 +2059,8 @@ static VLCMainWindow *_o_sharedInstance = nil; ...@@ -2059,7 +2059,8 @@ static VLCMainWindow *_o_sharedInstance = nil;
- (NSMenu*)sourceList:(PXSourceList*)aSourceList menuForEvent:(NSEvent*)theEvent item:(id)item - (NSMenu*)sourceList:(PXSourceList*)aSourceList menuForEvent:(NSEvent*)theEvent item:(id)item
{ {
if ([theEvent type] == NSRightMouseDown || ([theEvent type] == NSLeftMouseDown && ([theEvent modifierFlags] & NSControlKeyMask) == NSControlKeyMask)) { if ([theEvent type] == NSRightMouseDown || ([theEvent type] == NSLeftMouseDown && ([theEvent modifierFlags] & NSControlKeyMask) == NSControlKeyMask))
{
if (item != nil) if (item != nil)
{ {
NSMenu * m; NSMenu * m;
...@@ -2077,6 +2078,7 @@ static VLCMainWindow *_o_sharedInstance = nil; ...@@ -2077,6 +2078,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
return [m autorelease]; return [m autorelease];
} }
} }
return nil; return nil;
} }
...@@ -2109,9 +2111,11 @@ static VLCMainWindow *_o_sharedInstance = nil; ...@@ -2109,9 +2111,11 @@ static VLCMainWindow *_o_sharedInstance = nil;
- (void)sourceListSelectionDidChange:(NSNotification *)notification - (void)sourceListSelectionDidChange:(NSNotification *)notification
{ {
playlist_t * p_playlist = pl_Get( VLCIntf ); playlist_t * p_playlist = pl_Get( VLCIntf );
NSIndexSet *selectedIndexes = [o_sidebar_view selectedRowIndexes]; NSIndexSet *selectedIndexes = [o_sidebar_view selectedRowIndexes];
id item = [o_sidebar_view itemAtRow:[selectedIndexes firstIndex]]; id item = [o_sidebar_view itemAtRow:[selectedIndexes firstIndex]];
//Set the label text to represent the new selection //Set the label text to represent the new selection
if ([item sdtype] > -1 && [[item identifier] length] > 0) if ([item sdtype] > -1 && [[item identifier] length] > 0)
{ {
......
...@@ -60,7 +60,6 @@ NSString * const PXSLDeleteKeyPressedOnRowsNotification = @"PXSourceListDeleteKe ...@@ -60,7 +60,6 @@ NSString * const PXSLDeleteKeyPressedOnRowsNotification = @"PXSourceListDeleteKe
{ {
[self setDelegate:(id<PXSourceListDelegate>)[super delegate]]; [self setDelegate:(id<PXSourceListDelegate>)[super delegate]];
[super setDelegate:self]; [super setDelegate:self];
[self setDataSource:(id<PXSourceListDataSource>)[super dataSource]]; [self setDataSource:(id<PXSourceListDataSource>)[super dataSource]];
[super setDataSource:self]; [super setDataSource:self];
...@@ -103,22 +102,14 @@ NSString * const PXSLDeleteKeyPressedOnRowsNotification = @"PXSourceListDeleteKe ...@@ -103,22 +102,14 @@ NSString * const PXSLDeleteKeyPressedOnRowsNotification = @"PXSourceListDeleteKe
[[NSNotificationCenter defaultCenter] removeObserver:_secondaryDelegate name:nil object:self]; [[NSNotificationCenter defaultCenter] removeObserver:_secondaryDelegate name:nil object:self];
_secondaryDelegate = aDelegate; _secondaryDelegate = aDelegate;
//Register the new delegate to receive notifications //Register the new delegate to receive notifications
[self registerDelegateToReceiveNotification:PXSLSelectionIsChangingNotification [self registerDelegateToReceiveNotification:PXSLSelectionIsChangingNotification withSelector:@selector(sourceListSelectionIsChanging:)];
withSelector:@selector(sourceListSelectionIsChanging:)]; [self registerDelegateToReceiveNotification:PXSLSelectionDidChangeNotification withSelector:@selector(sourceListSelectionDidChange:)];
[self registerDelegateToReceiveNotification:PXSLSelectionDidChangeNotification [self registerDelegateToReceiveNotification:PXSLItemWillExpandNotification withSelector:@selector(sourceListItemWillExpand:)];
withSelector:@selector(sourceListSelectionDidChange:)]; [self registerDelegateToReceiveNotification:PXSLItemDidExpandNotification withSelector:@selector(sourceListItemDidExpand:)];
[self registerDelegateToReceiveNotification:PXSLItemWillExpandNotification [self registerDelegateToReceiveNotification:PXSLItemWillCollapseNotification withSelector:@selector(sourceListItemWillCollapse:)];
withSelector:@selector(sourceListItemWillExpand:)]; [self registerDelegateToReceiveNotification:PXSLItemDidCollapseNotification withSelector:@selector(sourceListItemDidCollapse:)];
[self registerDelegateToReceiveNotification:PXSLItemDidExpandNotification [self registerDelegateToReceiveNotification:PXSLDeleteKeyPressedOnRowsNotification withSelector:@selector(sourceListDeleteKeyPressedOnRows:)];
withSelector:@selector(sourceListItemDidExpand:)];
[self registerDelegateToReceiveNotification:PXSLItemWillCollapseNotification
withSelector:@selector(sourceListItemWillCollapse:)];
[self registerDelegateToReceiveNotification:PXSLItemDidCollapseNotification
withSelector:@selector(sourceListItemDidCollapse:)];
[self registerDelegateToReceiveNotification:PXSLDeleteKeyPressedOnRowsNotification
withSelector:@selector(sourceListDeleteKeyPressedOnRows:)];
} }
...@@ -132,7 +123,6 @@ NSString * const PXSLDeleteKeyPressedOnRowsNotification = @"PXSourceListDeleteKe ...@@ -132,7 +123,6 @@ NSString * const PXSLDeleteKeyPressedOnRowsNotification = @"PXSourceListDeleteKe
- (void)setIconSize:(NSSize)newIconSize - (void)setIconSize:(NSSize)newIconSize
{ {
_iconSize = newIconSize; _iconSize = newIconSize;
CGFloat rowHeight = [self rowHeight]; CGFloat rowHeight = [self rowHeight];
//Make sure icon height does not exceed row height; if so constrain, keeping width and height in proportion //Make sure icon height does not exceed row height; if so constrain, keeping width and height in proportion
...@@ -162,7 +152,6 @@ NSString * const PXSLDeleteKeyPressedOnRowsNotification = @"PXSourceListDeleteKe ...@@ -162,7 +152,6 @@ NSString * const PXSLDeleteKeyPressedOnRowsNotification = @"PXSourceListDeleteKe
[self expandItem:item expandChildren:NO]; [self expandItem:item expandChildren:NO];
} }
} }
} }
//If there are selected rows and the item hierarchy has changed, make sure a Group row isn't //If there are selected rows and the item hierarchy has changed, make sure a Group row isn't
...@@ -209,7 +198,6 @@ NSString * const PXSLDeleteKeyPressedOnRowsNotification = @"PXSourceListDeleteKe ...@@ -209,7 +198,6 @@ NSString * const PXSLDeleteKeyPressedOnRowsNotification = @"PXSourceListDeleteKe
if([_secondaryDataSource respondsToSelector:@selector(sourceList:numberOfChildrenOfItem:)]) { if([_secondaryDataSource respondsToSelector:@selector(sourceList:numberOfChildrenOfItem:)]) {
return [_secondaryDataSource sourceList:self numberOfChildrenOfItem:nil]; return [_secondaryDataSource sourceList:self numberOfChildrenOfItem:nil];
} }
return 0; return 0;
} }
...@@ -316,8 +304,8 @@ NSString * const PXSLDeleteKeyPressedOnRowsNotification = @"PXSourceListDeleteKe ...@@ -316,8 +304,8 @@ NSString * const PXSLDeleteKeyPressedOnRowsNotification = @"PXSourceListDeleteKe
NSSize cellSize = [cell cellSize]; NSSize cellSize = [cell cellSize];
if (!([cell type] == NSImageCellType) && !([cell type] == NSTextCellType)) if (!([cell type] == NSImageCellType) && !([cell type] == NSTextCellType))
cellSize = [cell cellSizeForBounds:[super frameOfCellAtColumn:column row:row]]; cellSize = [cell cellSizeForBounds:[super frameOfCellAtColumn:column row:row]];
NSRect cellFrame = [super frameOfCellAtColumn:column row:row];
NSRect cellFrame = [super frameOfCellAtColumn:column row:row];
NSRect rowRect = [self rectOfRow:row]; NSRect rowRect = [self rectOfRow:row];
if([self isGroupItem:item]) if([self isGroupItem:item])
...@@ -330,10 +318,7 @@ NSString * const PXSLDeleteKeyPressedOnRowsNotification = @"PXSourceListDeleteKe ...@@ -330,10 +318,7 @@ NSString * const PXSLDeleteKeyPressedOnRowsNotification = @"PXSourceListDeleteKe
minX = 7; minX = 7;
} }
return NSMakeRect(minX, return NSMakeRect(minX, NSMidY(cellFrame)-(cellSize.height/2.0), NSWidth(rowRect)-minX, cellSize.height);
NSMidY(cellFrame)-(cellSize.height/2.0),
NSWidth(rowRect)-minX,
cellSize.height);
} }
else else
{ {
...@@ -349,11 +334,7 @@ NSString * const PXSLDeleteKeyPressedOnRowsNotification = @"PXSourceListDeleteKe ...@@ -349,11 +334,7 @@ NSString * const PXSLDeleteKeyPressedOnRowsNotification = @"PXSourceListDeleteKe
leftIndent += [self iconSize].width+(ICON_SPACING*2); leftIndent += [self iconSize].width+(ICON_SPACING*2);
} }
} }
return NSMakeRect(leftIndent, NSMidY(rowRect)-(cellSize.height/2.0), NSWidth(rowRect)-rightIndent-leftIndent, cellSize.height);
return NSMakeRect(leftIndent,
NSMidY(rowRect)-(cellSize.height/2.0),
NSWidth(rowRect)-rightIndent-leftIndent,
cellSize.height);
} }
} }
...@@ -369,9 +350,7 @@ NSString * const PXSLDeleteKeyPressedOnRowsNotification = @"PXSourceListDeleteKe ...@@ -369,9 +350,7 @@ NSString * const PXSLDeleteKeyPressedOnRowsNotification = @"PXSourceListDeleteKe
return NSZeroSize; return NSZeroSize;
} }
NSAttributedString *badgeAttrString = [[NSAttributedString alloc] initWithString:[NSString stringWithFormat:@"%d", [self badgeValueForItem:rowItem]] NSAttributedString *badgeAttrString = [[NSAttributedString alloc] initWithString:[NSString stringWithFormat:@"%d", [self badgeValueForItem:rowItem]] attributes:[NSDictionary dictionaryWithObjectsAndKeys:BADGE_FONT, NSFontAttributeName, nil]];
attributes:[NSDictionary dictionaryWithObjectsAndKeys:BADGE_FONT, NSFontAttributeName, nil]];
NSSize stringSize = [badgeAttrString size]; NSSize stringSize = [badgeAttrString size];
//Calculate the width needed to display the text or the minimum width if it's smaller //Calculate the width needed to display the text or the minimum width if it's smaller
...@@ -393,7 +372,6 @@ NSString * const PXSLDeleteKeyPressedOnRowsNotification = @"PXSourceListDeleteKe ...@@ -393,7 +372,6 @@ NSString * const PXSLDeleteKeyPressedOnRowsNotification = @"PXSourceListDeleteKe
- (void)drawRow:(NSInteger)rowIndex clipRect:(NSRect)clipRect - (void)drawRow:(NSInteger)rowIndex clipRect:(NSRect)clipRect
{ {
[super drawRow:rowIndex clipRect:clipRect]; [super drawRow:rowIndex clipRect:clipRect];
id item = [self itemAtRow:rowIndex]; id item = [self itemAtRow:rowIndex];
//Draw an icon if the item has one //Draw an icon if the item has one
...@@ -403,27 +381,19 @@ NSString * const PXSLDeleteKeyPressedOnRowsNotification = @"PXSourceListDeleteKe ...@@ -403,27 +381,19 @@ NSString * const PXSLDeleteKeyPressedOnRowsNotification = @"PXSourceListDeleteKe
{ {
NSRect cellFrame = [self frameOfCellAtColumn:0 row:rowIndex]; NSRect cellFrame = [self frameOfCellAtColumn:0 row:rowIndex];
NSSize iconSize = [self iconSize]; NSSize iconSize = [self iconSize];
NSRect iconRect = NSMakeRect(NSMinX(cellFrame)-iconSize.width-ICON_SPACING, NSRect iconRect = NSMakeRect(NSMinX(cellFrame)-iconSize.width-ICON_SPACING, NSMidY(cellFrame)-(iconSize.width/2.0f), iconSize.width, iconSize.height);
NSMidY(cellFrame)-(iconSize.width/2.0f),
iconSize.width,
iconSize.height);
if([_secondaryDataSource respondsToSelector:@selector(sourceList:iconForItem:)]) if([_secondaryDataSource respondsToSelector:@selector(sourceList:iconForItem:)])
{ {
NSImage *icon = [_secondaryDataSource sourceList:self iconForItem:item]; NSImage *icon = [_secondaryDataSource sourceList:self iconForItem:item];
if(icon!=nil) if(icon!=nil)
{ {
NSSize actualIconSize = [icon size]; NSSize actualIconSize = [icon size];
//If the icon is *smaller* than the size retrieved from the -iconSize property, make sure we //If the icon is *smaller* than the size retrieved from the -iconSize property, make sure we
//reduce the size of the rectangle to draw the icon in, so that it is not stretched. //reduce the size of the rectangle to draw the icon in, so that it is not stretched.
if((actualIconSize.width<iconSize.width)||(actualIconSize.height<iconSize.height)) if((actualIconSize.width<iconSize.width)||(actualIconSize.height<iconSize.height))
{ {
iconRect = NSMakeRect(NSMidX(iconRect)-(actualIconSize.width/2.0f), iconRect = NSMakeRect(NSMidX(iconRect)-(actualIconSize.width/2.0f), NSMidY(iconRect)-(actualIconSize.height/2.0f), actualIconSize.width, actualIconSize.height);
NSMidY(iconRect)-(actualIconSize.height/2.0f),
actualIconSize.width,
actualIconSize.height);
} }
//Use 10.6 NSImage drawing if we can //Use 10.6 NSImage drawing if we can
...@@ -456,7 +426,6 @@ NSString * const PXSLDeleteKeyPressedOnRowsNotification = @"PXSourceListDeleteKe ...@@ -456,7 +426,6 @@ NSString * const PXSLDeleteKeyPressedOnRowsNotification = @"PXSourceListDeleteKe
NSMidY(rowRect)-(badgeSize.height/2.0), NSMidY(rowRect)-(badgeSize.height/2.0),
badgeSize.width, badgeSize.width,
badgeSize.height); badgeSize.height);
[self drawBadgeForRow:rowIndex inRect:badgeFrame]; [self drawBadgeForRow:rowIndex inRect:badgeFrame];
} }
} }
...@@ -464,7 +433,6 @@ NSString * const PXSLDeleteKeyPressedOnRowsNotification = @"PXSourceListDeleteKe ...@@ -464,7 +433,6 @@ NSString * const PXSLDeleteKeyPressedOnRowsNotification = @"PXSourceListDeleteKe
- (void)drawBadgeForRow:(NSInteger)rowIndex inRect:(NSRect)badgeFrame - (void)drawBadgeForRow:(NSInteger)rowIndex inRect:(NSRect)badgeFrame
{ {
id rowItem = [self itemAtRow:rowIndex]; id rowItem = [self itemAtRow:rowIndex];
NSBezierPath *badgePath = [NSBezierPath bezierPathWithRoundedRect:badgeFrame NSBezierPath *badgePath = [NSBezierPath bezierPathWithRoundedRect:badgeFrame
xRadius:(BADGE_HEIGHT/2.0) xRadius:(BADGE_HEIGHT/2.0)
yRadius:(BADGE_HEIGHT/2.0)]; yRadius:(BADGE_HEIGHT/2.0)];
...@@ -481,10 +449,8 @@ NSString * const PXSLDeleteKeyPressedOnRowsNotification = @"PXSourceListDeleteKe ...@@ -481,10 +449,8 @@ NSString * const PXSLDeleteKeyPressedOnRowsNotification = @"PXSourceListDeleteKe
if([[self selectedRowIndexes] containsIndex:rowIndex]) if([[self selectedRowIndexes] containsIndex:rowIndex])
{ {
backgroundColor = [NSColor whiteColor]; backgroundColor = [NSColor whiteColor];
//Set the text color based on window and control state //Set the text color based on window and control state
NSColor *textColor; NSColor *textColor;
if(isVisible && (isFocused || rowBeingEdited==rowIndex)) { if(isVisible && (isFocused || rowBeingEdited==rowIndex)) {
textColor = BADGE_SELECTED_TEXT_COLOR; textColor = BADGE_SELECTED_TEXT_COLOR;
} }
...@@ -495,8 +461,7 @@ NSString * const PXSLDeleteKeyPressedOnRowsNotification = @"PXSourceListDeleteKe ...@@ -495,8 +461,7 @@ NSString * const PXSLDeleteKeyPressedOnRowsNotification = @"PXSourceListDeleteKe
textColor = BADGE_SELECTED_HIDDEN_TEXT_COLOR; textColor = BADGE_SELECTED_HIDDEN_TEXT_COLOR;
} }
attributes = [[NSDictionary alloc] initWithObjectsAndKeys:BADGE_FONT, NSFontAttributeName, attributes = [[NSDictionary alloc] initWithObjectsAndKeys:BADGE_FONT, NSFontAttributeName, textColor, NSForegroundColorAttributeName, nil];
textColor, NSForegroundColorAttributeName, nil];
} }
else else
{ {
...@@ -526,22 +491,19 @@ NSString * const PXSLDeleteKeyPressedOnRowsNotification = @"PXSourceListDeleteKe ...@@ -526,22 +491,19 @@ NSString * const PXSLDeleteKeyPressedOnRowsNotification = @"PXSourceListDeleteKe
else { //Gray colour else { //Gray colour
backgroundColor = BADGE_HIDDEN_BACKGROUND_COLOR; backgroundColor = BADGE_HIDDEN_BACKGROUND_COLOR;
} }
attributes = [[NSDictionary alloc] initWithObjectsAndKeys:BADGE_FONT, NSFontAttributeName, badgeColor, NSForegroundColorAttributeName, nil];
attributes = [[NSDictionary alloc] initWithObjectsAndKeys:BADGE_FONT, NSFontAttributeName,
badgeColor, NSForegroundColorAttributeName, nil];
} }
[backgroundColor set]; [backgroundColor set];
[badgePath fill]; [badgePath fill];
//Draw the badge text //Draw the badge text
NSAttributedString *badgeAttrString = [[NSAttributedString alloc] initWithString:[NSString stringWithFormat:@"%d", [self badgeValueForItem:rowItem]] NSAttributedString *badgeAttrString = [[NSAttributedString alloc] initWithString:[NSString stringWithFormat:@"%d", [self badgeValueForItem:rowItem]] attributes:attributes];
attributes:attributes];
NSSize stringSize = [badgeAttrString size]; NSSize stringSize = [badgeAttrString size];
NSPoint badgeTextPoint = NSMakePoint(NSMidX(badgeFrame)-(stringSize.width/2.0), //Center in the badge frame NSPoint badgeTextPoint = NSMakePoint(NSMidX(badgeFrame)-(stringSize.width/2.0), //Center in the badge frame
NSMidY(badgeFrame)-(stringSize.height/2.0)); //Center in the badge frame NSMidY(badgeFrame)-(stringSize.height/2.0)); //Center in the badge frame
[badgeAttrString drawAtPoint:badgeTextPoint]; [badgeAttrString drawAtPoint:badgeTextPoint];
[attributes release]; [attributes release];
[badgeAttrString release]; [badgeAttrString release];
} }
...@@ -552,7 +514,6 @@ NSString * const PXSLDeleteKeyPressedOnRowsNotification = @"PXSourceListDeleteKe ...@@ -552,7 +514,6 @@ NSString * const PXSLDeleteKeyPressedOnRowsNotification = @"PXSourceListDeleteKe
- (void)keyDown:(NSEvent *)theEvent - (void)keyDown:(NSEvent *)theEvent
{ {
NSIndexSet *selectedIndexes = [self selectedRowIndexes]; NSIndexSet *selectedIndexes = [self selectedRowIndexes];
NSString *keyCharacters = [theEvent characters]; NSString *keyCharacters = [theEvent characters];
//Make sure we have a selection //Make sure we have a selection
...@@ -561,15 +522,15 @@ NSString * const PXSLDeleteKeyPressedOnRowsNotification = @"PXSourceListDeleteKe ...@@ -561,15 +522,15 @@ NSString * const PXSLDeleteKeyPressedOnRowsNotification = @"PXSourceListDeleteKe
if([keyCharacters length]>0) if([keyCharacters length]>0)
{ {
unichar firstKey = [keyCharacters characterAtIndex:0]; unichar firstKey = [keyCharacters characterAtIndex:0];
if(firstKey==NSUpArrowFunctionKey||firstKey==NSDownArrowFunctionKey) if(firstKey==NSUpArrowFunctionKey||firstKey==NSDownArrowFunctionKey)
{ {
//Handle keyboard navigation across groups //Handle keyboard navigation across groups
if([selectedIndexes count]==1&&!([theEvent modifierFlags] & NSShiftKeyMask)) if([selectedIndexes count]==1&&!([theEvent modifierFlags] & NSShiftKeyMask))
{ {
int delta = firstKey==NSDownArrowFunctionKey?1:-1; //Search "backwards" if up arrow, "forwards" if down int delta = firstKey==NSDownArrowFunctionKey?1:-1;
NSInteger newRow = [selectedIndexes firstIndex]; //Search "backwards" if up arrow, "forwards" if down
NSInteger newRow = [selectedIndexes firstIndex];
//Keep incrementing/decrementing the row until a non-header row is reached //Keep incrementing/decrementing the row until a non-header row is reached
do { do {
newRow+=delta; newRow+=delta;
...@@ -579,21 +540,22 @@ NSString * const PXSLDeleteKeyPressedOnRowsNotification = @"PXSourceListDeleteKe ...@@ -579,21 +540,22 @@ NSString * const PXSLDeleteKeyPressedOnRowsNotification = @"PXSourceListDeleteKe
break; break;
} while([self isGroupItem:[self itemAtRow:newRow]]); } while([self isGroupItem:[self itemAtRow:newRow]]);
[self selectRowIndexes:[NSIndexSet indexSetWithIndex:newRow] byExtendingSelection:NO]; [self selectRowIndexes:[NSIndexSet indexSetWithIndex:newRow] byExtendingSelection:NO];
return; return;
} }
} }
else if(firstKey==NSDeleteCharacter||firstKey==NSBackspaceCharacter) else if(firstKey==NSDeleteCharacter||firstKey==NSBackspaceCharacter)
{ {
//Post the notification //Post the notification
[[NSNotificationCenter defaultCenter] postNotificationName:PXSLDeleteKeyPressedOnRowsNotification [[NSNotificationCenter defaultCenter] postNotificationName:PXSLDeleteKeyPressedOnRowsNotification object:self userInfo:[NSDictionary dictionaryWithObject:selectedIndexes forKey:@"rows"]];
object:self
userInfo:[NSDictionary dictionaryWithObject:selectedIndexes forKey:@"rows"]];
return; return;
} }
} }
} }
//We don't care about it //We don't care about it
...@@ -607,18 +569,22 @@ NSString * const PXSLDeleteKeyPressedOnRowsNotification = @"PXSourceListDeleteKe ...@@ -607,18 +569,22 @@ NSString * const PXSLDeleteKeyPressedOnRowsNotification = @"PXSourceListDeleteKe
- (NSMenu *)menuForEvent:(NSEvent *)theEvent - (NSMenu *)menuForEvent:(NSEvent *)theEvent
{ {
NSMenu * m = nil; NSMenu * m = nil;
if([_secondaryDelegate respondsToSelector:@selector(sourceList:menuForEvent:item:)]) { if([_secondaryDelegate respondsToSelector:@selector(sourceList:menuForEvent:item:)]) {
NSPoint clickPoint = [self convertPoint:[theEvent locationInWindow] fromView:nil]; NSPoint clickPoint = [self convertPoint:[theEvent locationInWindow] fromView:nil];
NSInteger row = [self rowAtPoint:clickPoint]; NSInteger row = [self rowAtPoint:clickPoint];
id clickedItem = [self itemAtRow:row]; id clickedItem = [self itemAtRow:row];
if ([clickedItem sdtype] > 0) if ([clickedItem sdtype] > 0)
m = [_secondaryDelegate sourceList:self menuForEvent:theEvent item:clickedItem]; m = [_secondaryDelegate sourceList:self menuForEvent:theEvent item:clickedItem];
else else
m = [super menuForEvent:theEvent]; m = [super menuForEvent:theEvent];
} }
if (m == nil) { if (m == nil) {
m = [super menuForEvent:theEvent]; m = [super menuForEvent:theEvent];
} }
return m; return m;
} }
...@@ -864,30 +830,22 @@ NSString * const PXSLDeleteKeyPressedOnRowsNotification = @"PXSourceListDeleteKe ...@@ -864,30 +830,22 @@ NSString * const PXSLDeleteKeyPressedOnRowsNotification = @"PXSourceListDeleteKe
- (void)outlineViewItemWillExpand:(NSNotification *)notification - (void)outlineViewItemWillExpand:(NSNotification *)notification
{ {
[[NSNotificationCenter defaultCenter] postNotificationName:PXSLItemWillExpandNotification [[NSNotificationCenter defaultCenter] postNotificationName:PXSLItemWillExpandNotification object:self userInfo:[notification userInfo]];
object:self
userInfo:[notification userInfo]];
} }
- (void)outlineViewItemDidExpand:(NSNotification *)notification - (void)outlineViewItemDidExpand:(NSNotification *)notification
{ {
[[NSNotificationCenter defaultCenter] postNotificationName:PXSLItemDidExpandNotification [[NSNotificationCenter defaultCenter] postNotificationName:PXSLItemDidExpandNotification object:self userInfo:[notification userInfo]];
object:self
userInfo:[notification userInfo]];
} }
- (void)outlineViewItemWillCollapse:(NSNotification *)notification - (void)outlineViewItemWillCollapse:(NSNotification *)notification
{ {
[[NSNotificationCenter defaultCenter] postNotificationName:PXSLItemWillCollapseNotification [[NSNotificationCenter defaultCenter] postNotificationName:PXSLItemWillCollapseNotification object:self userInfo:[notification userInfo]];
object:self
userInfo:[notification userInfo]];
} }
- (void)outlineViewItemDidCollapse:(NSNotification *)notification - (void)outlineViewItemDidCollapse:(NSNotification *)notification
{ {
[[NSNotificationCenter defaultCenter] postNotificationName:PXSLItemDidCollapseNotification [[NSNotificationCenter defaultCenter] postNotificationName:PXSLItemDidCollapseNotification object:self userInfo:[notification userInfo]];
object:self
userInfo:[notification userInfo]];
} }
- (void)registerDelegateToReceiveNotification:(NSString*)notification withSelector:(SEL)selector - (void)registerDelegateToReceiveNotification:(NSString*)notification withSelector:(SEL)selector
...@@ -896,10 +854,7 @@ NSString * const PXSLDeleteKeyPressedOnRowsNotification = @"PXSourceListDeleteKe ...@@ -896,10 +854,7 @@ NSString * const PXSLDeleteKeyPressedOnRowsNotification = @"PXSourceListDeleteKe
//Set the delegate as a receiver of the notification if it implements the notification method //Set the delegate as a receiver of the notification if it implements the notification method
if([_secondaryDelegate respondsToSelector:selector]) { if([_secondaryDelegate respondsToSelector:selector]) {
[defaultCenter addObserver:_secondaryDelegate [defaultCenter addObserver:_secondaryDelegate selector:selector name:notification object:self];
selector:selector
name:notification
object:self];
} }
} }
......
...@@ -28,17 +28,18 @@ ...@@ -28,17 +28,18 @@
-(id)initWithObject:(id)obj stacktraceSaving:(BOOL)saveStack; -(id)initWithObject:(id)obj stacktraceSaving:(BOOL)saveStack;
{ {
self.object = obj; self.object = obj;
if(saveStack) if(saveStack)
[self saveBacktrace]; [self saveBacktrace];
return self; return self;
} }
-(void)dealloc; -(void)dealloc;
{ {
free(frameStrings); free(frameStrings);
self.object = nil; self.object = nil;
self.invocation = nil; self.invocation = nil;
[super dealloc]; [super dealloc];
} }
@synthesize invocation = _invocation, object = _object; @synthesize invocation = _invocation, object = _object;
...@@ -66,6 +67,7 @@ ...@@ -66,6 +67,7 @@
else if(onMainAfterForward) else if(onMainAfterForward)
[self performSelectorOnMainThread:@selector(invoke) withObject:nil waitUntilDone:waitUntilDone]; [self performSelectorOnMainThread:@selector(invoke) withObject:nil waitUntilDone:waitUntilDone];
} }
- (NSMethodSignature *)methodSignatureForSelector:(SEL)inSelector { - (NSMethodSignature *)methodSignatureForSelector:(SEL)inSelector {
NSMethodSignature *signature = [super methodSignatureForSelector:inSelector]; NSMethodSignature *signature = [super methodSignatureForSelector:inSelector];
if (signature == NULL) if (signature == NULL)
...@@ -76,10 +78,10 @@ ...@@ -76,10 +78,10 @@
- (void)invoke; - (void)invoke;
{ {
@try { @try {
[_invocation invoke]; [_invocation invoke];
} }
@catch (NSException * e) { @catch (NSException * e) {
NSLog(@"SPInvocationGrabber's target raised %@:\n\t%@\nInvocation was originally scheduled at:", e.name, e); NSLog(@"SPInvocationGrabber's target raised %@:\n\t%@\nInvocation was originally scheduled at:", e.name, e);
[self printBacktrace]; [self printBacktrace];
...@@ -97,6 +99,7 @@ ...@@ -97,6 +99,7 @@
frameCount = backtrace(&backtraceFrames[0], 128); frameCount = backtrace(&backtraceFrames[0], 128);
frameStrings = backtrace_symbols(&backtraceFrames[0], frameCount); frameStrings = backtrace_symbols(&backtraceFrames[0], frameCount);
} }
-(void)printBacktrace; -(void)printBacktrace;
{ {
for(int x = 3; x < frameCount; x++) { for(int x = 3; x < frameCount; x++) {
...@@ -111,22 +114,26 @@ ...@@ -111,22 +114,26 @@
{ {
return [[[SPInvocationGrabber alloc] initWithObject:self] autorelease]; return [[[SPInvocationGrabber alloc] initWithObject:self] autorelease];
} }
-(id)invokeAfter:(NSTimeInterval)delta; -(id)invokeAfter:(NSTimeInterval)delta;
{ {
id grabber = [self grab]; id grabber = [self grab];
[NSTimer scheduledTimerWithTimeInterval:delta target:grabber selector:@selector(invoke) userInfo:nil repeats:NO]; [NSTimer scheduledTimerWithTimeInterval:delta target:grabber selector:@selector(invoke) userInfo:nil repeats:NO];
return grabber; return grabber;
} }
- (id)nextRunloop; - (id)nextRunloop;
{ {
return [self invokeAfter:0]; return [self invokeAfter:0];
} }
-(id)inBackground; -(id)inBackground;
{ {
SPInvocationGrabber *grabber = [self grab]; SPInvocationGrabber *grabber = [self grab];
grabber.backgroundAfterForward = YES; grabber.backgroundAfterForward = YES;
return grabber; return grabber;
} }
-(id)onMainAsync:(BOOL)async; -(id)onMainAsync:(BOOL)async;
{ {
SPInvocationGrabber *grabber = [self grab]; SPInvocationGrabber *grabber = [self grab];
......
...@@ -18,15 +18,24 @@ ...@@ -18,15 +18,24 @@
#define SPSystemDefinedEventMediaKeys 8 #define SPSystemDefinedEventMediaKeys 8
@interface SPMediaKeyTap : NSObject { @interface SPMediaKeyTap : NSObject {
EventHandlerRef _app_switching_ref;
EventHandlerRef _app_terminating_ref; EventHandlerRef _app_switching_ref;
CFMachPortRef _eventPort;
CFRunLoopSourceRef _eventPortSource; EventHandlerRef _app_terminating_ref;
CFRunLoopRef _tapThreadRL;
BOOL _shouldInterceptMediaKeyEvents; CFMachPortRef _eventPort;
id _delegate;
// The app that is frontmost in this list owns media keys CFRunLoopSourceRef _eventPortSource;
NSMutableArray *_mediaKeyAppList;
CFRunLoopRef _tapThreadRL;
BOOL _shouldInterceptMediaKeyEvents;
id _delegate;
// The app that is frontmost in this list owns media keys
NSMutableArray *_mediaKeyAppList;
} }
+ (NSArray*)defaultMediaKeyUserBundleIdentifiers; + (NSArray*)defaultMediaKeyUserBundleIdentifiers;
......
...@@ -22,20 +22,26 @@ ...@@ -22,20 +22,26 @@
- SourceListItem *child1; - SourceListItem *child1;
- SourceListItem *child2; - SourceListItem *child2;
- SourceListItem *childOfChild2; - SourceListItem *childOfChild2;
- SourceListItem *anotherChildOfChild2; - SourceListItem *anotherChildOfChild2;
- SourceListItem *child3; - SourceListItem *child3;
*/ */
@interface SideBarItem : NSObject { @interface SideBarItem : NSObject {
NSString *title;
NSString *identifier; NSString *title;
NSString *identifier;
NSString *untranslatedTitle; NSString *untranslatedTitle;
NSImage *icon;
NSInteger badgeValue; NSImage *icon;
NSInteger badgeValue;
NSInteger sdtype; NSInteger sdtype;
NSArray *children;
NSArray *children;
} }
@property (nonatomic, copy) NSString *title; @property (nonatomic, copy) NSString *title;
......
...@@ -48,6 +48,7 @@ ...@@ -48,6 +48,7 @@
+ (id)itemWithTitle:(NSString*)aTitle identifier:(NSString*)anIdentifier icon:(NSImage*)anIcon + (id)itemWithTitle:(NSString*)aTitle identifier:(NSString*)anIdentifier icon:(NSImage*)anIcon
{ {
SideBarItem *item = [[[SideBarItem alloc] init] autorelease]; SideBarItem *item = [[[SideBarItem alloc] init] autorelease];
[item setTitle:aTitle]; [item setTitle:aTitle];
......
...@@ -186,9 +186,11 @@ static VLCOpen *_o_sharedMainInstance = nil; ...@@ -186,9 +186,11 @@ static VLCOpen *_o_sharedMainInstance = nil;
[o_capture_mode_pop removeAllItems]; [o_capture_mode_pop removeAllItems];
[o_capture_mode_pop addItemWithTitle: _NS("Capture Device")]; [o_capture_mode_pop addItemWithTitle: _NS("Capture Device")];
// our screen capture module isn't Lion-compatible, so let's hide it from the user if needed (trac #4799) // our screen capture module isn't Lion-compatible, so let's hide it from the user if needed (trac #4799)
if( NSAppKitVersionNumber < 1115.2 ) if( NSAppKitVersionNumber < 1115.2 )
[o_capture_mode_pop addItemWithTitle: _NS("Screen")]; [o_capture_mode_pop addItemWithTitle: _NS("Screen")];
[o_capture_mode_pop addItemWithTitle: @"EyeTV"]; [o_capture_mode_pop addItemWithTitle: @"EyeTV"];
[o_screen_long_lbl setStringValue: _NS("This input allows you to save, stream or display your current screen contents.")]; [o_screen_long_lbl setStringValue: _NS("This input allows you to save, stream or display your current screen contents.")];
[o_screen_fps_lbl setStringValue: _NS("Frames per Second:")]; [o_screen_fps_lbl setStringValue: _NS("Frames per Second:")];
...@@ -212,6 +214,7 @@ static VLCOpen *_o_sharedMainInstance = nil; ...@@ -212,6 +214,7 @@ static VLCOpen *_o_sharedMainInstance = nil;
[self qtkvideoDevices]; [self qtkvideoDevices];
[o_qtk_device_pop removeAllItems]; [o_qtk_device_pop removeAllItems];
msg_Dbg( VLCIntf, "Found %lu capture devices", [qtkvideoDevices count] ); msg_Dbg( VLCIntf, "Found %lu capture devices", [qtkvideoDevices count] );
if([qtkvideoDevices count] >= 1) if([qtkvideoDevices count] >= 1)
{ {
if (!qtk_currdevice_uid) { if (!qtk_currdevice_uid) {
...@@ -234,7 +237,6 @@ static VLCOpen *_o_sharedMainInstance = nil; ...@@ -234,7 +237,6 @@ static VLCOpen *_o_sharedMainInstance = nil;
[qtk_currdevice_uid release]; [qtk_currdevice_uid release];
} }
[self setSubPanel]; [self setSubPanel];
[[NSNotificationCenter defaultCenter] addObserver: self [[NSNotificationCenter defaultCenter] addObserver: self
...@@ -275,6 +277,7 @@ static VLCOpen *_o_sharedMainInstance = nil; ...@@ -275,6 +277,7 @@ static VLCOpen *_o_sharedMainInstance = nil;
o_specialMediaFolders = [[NSMutableArray alloc] init]; o_specialMediaFolders = [[NSMutableArray alloc] init];
o_opticalDevices = [[NSMutableArray alloc] init]; o_opticalDevices = [[NSMutableArray alloc] init];
NSWorkspace *sharedWorkspace = [NSWorkspace sharedWorkspace]; NSWorkspace *sharedWorkspace = [NSWorkspace sharedWorkspace];
[[sharedWorkspace notificationCenter] addObserver:self selector:@selector(scanOpticalMedia:) name:NSWorkspaceDidMountNotification object:nil]; [[sharedWorkspace notificationCenter] addObserver:self selector:@selector(scanOpticalMedia:) name:NSWorkspaceDidMountNotification object:nil];
[[sharedWorkspace notificationCenter] addObserver:self selector:@selector(scanOpticalMedia:) name:NSWorkspaceDidUnmountNotification object:nil]; [[sharedWorkspace notificationCenter] addObserver:self selector:@selector(scanOpticalMedia:) name:NSWorkspaceDidUnmountNotification object:nil];
[self performSelector:@selector(scanOpticalMedia:) withObject:nil afterDelay:2.0]; [self performSelector:@selector(scanOpticalMedia:) withObject:nil afterDelay:2.0];
...@@ -455,16 +458,16 @@ static VLCOpen *_o_sharedMainInstance = nil; ...@@ -455,16 +458,16 @@ static VLCOpen *_o_sharedMainInstance = nil;
- (IBAction)qtkChanged:(id)sender - (IBAction)qtkChanged:(id)sender
{ {
NSInteger i_selectedDevice = [o_qtk_device_pop indexOfSelectedItem]; NSInteger i_selectedDevice = [o_qtk_device_pop indexOfSelectedItem];
if (i_selectedDevice >= ([qtkvideoDevices count] - 1)) if (i_selectedDevice >= ([qtkvideoDevices count] - 1))
{ {
NSValue *sizes = [[[[qtkvideoDevices objectAtIndex:i_selectedDevice] formatDescriptions] objectAtIndex: 0] attributeForKey: QTFormatDescriptionVideoEncodedPixelsSizeAttribute]; NSValue *sizes = [[[[qtkvideoDevices objectAtIndex:i_selectedDevice] formatDescriptions] objectAtIndex: 0] attributeForKey: QTFormatDescriptionVideoEncodedPixelsSizeAttribute];
[o_capture_width_fld setIntValue: [sizes sizeValue].width]; [o_capture_width_fld setIntValue: [sizes sizeValue].width];
[o_capture_height_fld setIntValue: [sizes sizeValue].height]; [o_capture_height_fld setIntValue: [sizes sizeValue].height];
[o_capture_width_stp setIntValue: [o_capture_width_fld intValue]]; [o_capture_width_stp setIntValue: [o_capture_width_fld intValue]];
[o_capture_height_stp setIntValue: [o_capture_height_fld intValue]]; [o_capture_height_stp setIntValue: [o_capture_height_fld intValue]];
qtk_currdevice_uid = [[(QTCaptureDevice *)[qtkvideoDevices objectAtIndex:i_selectedDevice] uniqueID] qtk_currdevice_uid = [[(QTCaptureDevice *)[qtkvideoDevices objectAtIndex:i_selectedDevice] uniqueID] stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]];
stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]];
[self setMRL:[NSString stringWithFormat:@"qtcapture://%@", qtk_currdevice_uid]]; [self setMRL:[NSString stringWithFormat:@"qtcapture://%@", qtk_currdevice_uid]];
} }
} }
...@@ -806,7 +809,8 @@ static VLCOpen *_o_sharedMainInstance = nil; ...@@ -806,7 +809,8 @@ static VLCOpen *_o_sharedMainInstance = nil;
return; return;
unsigned int index = [n_index intValue]; unsigned int index = [n_index intValue];
id o_currentOpticalDevice = [o_opticalDevices objectAtIndex: index];
id o_currentOpticalDevice = [o_opticalDevices objectAtIndex: index];
char *diskType = [self getVolumeTypeFromMountPath:o_currentOpticalDevice]; char *diskType = [self getVolumeTypeFromMountPath:o_currentOpticalDevice];
if (diskType == kVLCMediaDVD || diskType == kVLCMediaVideoTSFolder) if (diskType == kVLCMediaDVD || diskType == kVLCMediaVideoTSFolder)
......
...@@ -92,8 +92,10 @@ ...@@ -92,8 +92,10 @@
IBOutlet id o_intf_art_txt; IBOutlet id o_intf_art_txt;
IBOutlet id o_intf_embedded_ckb; IBOutlet id o_intf_embedded_ckb;
IBOutlet id o_intf_fspanel_ckb; IBOutlet id o_intf_fspanel_ckb;
IBOutlet id o_intf_appleremote_ckb;
IBOutlet id o_intf_mediakeys_ckb; IBOutlet id o_intf_appleremote_ckb;
IBOutlet id o_intf_mediakeys_ckb;
IBOutlet id o_intf_lang_pop; IBOutlet id o_intf_lang_pop;
IBOutlet id o_intf_lang_txt; IBOutlet id o_intf_lang_txt;
IBOutlet id o_intf_network_box; IBOutlet id o_intf_network_box;
......
...@@ -271,7 +271,9 @@ create_toolbar_item( NSString * o_itemIdent, NSString * o_name, NSString * o_des ...@@ -271,7 +271,9 @@ create_toolbar_item( NSString * o_itemIdent, NSString * o_name, NSString * o_des
[o_intf_fspanel_ckb setTitle: _NS("Show Fullscreen Controller")]; [o_intf_fspanel_ckb setTitle: _NS("Show Fullscreen Controller")];
[o_intf_lang_txt setStringValue: _NS("Language")]; [o_intf_lang_txt setStringValue: _NS("Language")];
[o_intf_network_box setTitle: _NS("Privacy / Network Interaction")]; [o_intf_network_box setTitle: _NS("Privacy / Network Interaction")];
[o_intf_appleremote_ckb setTitle: _NS("Control playback with the Apple Remote")]; [o_intf_appleremote_ckb setTitle: _NS("Control playback with the Apple Remote")];
[o_intf_mediakeys_ckb setTitle: _NS("Control playback with media keys")]; [o_intf_mediakeys_ckb setTitle: _NS("Control playback with media keys")];
[o_intf_update_ckb setTitle: _NS("Automatically check for updates")]; [o_intf_update_ckb setTitle: _NS("Automatically check for updates")];
[o_intf_last_update_lbl setStringValue: @""]; [o_intf_last_update_lbl setStringValue: @""];
...@@ -463,8 +465,10 @@ static inline char * __config_GetLabel( vlc_object_t *p_this, const char *psz_na ...@@ -463,8 +465,10 @@ static inline char * __config_GetLabel( vlc_object_t *p_this, const char *psz_na
[self setupButton: o_intf_fspanel_ckb forBoolValue: "macosx-fspanel"]; [self setupButton: o_intf_fspanel_ckb forBoolValue: "macosx-fspanel"];
[self setupButton: o_intf_nativefullscreen_ckb forBoolValue: "macosx-nativefullscreenmode"]; [self setupButton: o_intf_nativefullscreen_ckb forBoolValue: "macosx-nativefullscreenmode"];
[self setupButton: o_intf_embedded_ckb forBoolValue: "embedded-video"]; [self setupButton: o_intf_embedded_ckb forBoolValue: "embedded-video"];
[self setupButton: o_intf_appleremote_ckb forBoolValue: "macosx-appleremote"];
[self setupButton: o_intf_mediakeys_ckb forBoolValue: "macosx-mediakeys"]; [self setupButton: o_intf_appleremote_ckb forBoolValue: "macosx-appleremote"];
[self setupButton: o_intf_mediakeys_ckb forBoolValue: "macosx-mediakeys"];
if( [[SUUpdater sharedUpdater] lastUpdateCheckDate] != NULL ) if( [[SUUpdater sharedUpdater] lastUpdateCheckDate] != NULL )
[o_intf_last_update_lbl setStringValue: [NSString stringWithFormat: _NS("Last check on: %@"), [[[SUUpdater sharedUpdater] lastUpdateCheckDate] descriptionWithLocale: [[NSUserDefaults standardUserDefaults] dictionaryRepresentation]]]]; [o_intf_last_update_lbl setStringValue: [NSString stringWithFormat: _NS("Last check on: %@"), [[[SUUpdater sharedUpdater] lastUpdateCheckDate] descriptionWithLocale: [[NSUserDefaults standardUserDefaults] dictionaryRepresentation]]]];
else else
...@@ -814,6 +818,7 @@ static inline void save_module_list( intf_thread_t * p_intf, id object, const ch ...@@ -814,6 +818,7 @@ static inline void save_module_list( intf_thread_t * p_intf, id object, const ch
config_PutInt( p_intf, "macosx-fspanel", [o_intf_fspanel_ckb state] ); config_PutInt( p_intf, "macosx-fspanel", [o_intf_fspanel_ckb state] );
config_PutInt( p_intf, "embedded-video", [o_intf_embedded_ckb state] ); config_PutInt( p_intf, "embedded-video", [o_intf_embedded_ckb state] );
config_PutInt( p_intf, "macosx-appleremote", [o_intf_appleremote_ckb state] ); config_PutInt( p_intf, "macosx-appleremote", [o_intf_appleremote_ckb state] );
config_PutInt( p_intf, "macosx-mediakeys", [o_intf_mediakeys_ckb state] ); config_PutInt( p_intf, "macosx-mediakeys", [o_intf_mediakeys_ckb state] );
config_PutInt( p_intf, "macosx-interfacestyle", [o_intf_style_dark_bcell state] ); config_PutInt( p_intf, "macosx-interfacestyle", [o_intf_style_dark_bcell state] );
...@@ -1319,7 +1324,6 @@ static inline void save_module_list( intf_thread_t * p_intf, id object, const ch ...@@ -1319,7 +1324,6 @@ static inline void save_module_list( intf_thread_t * p_intf, id object, const ch
[o_hotkeys_change_taken_lbl setStringValue: [NSString stringWithFormat: [o_hotkeys_change_taken_lbl setStringValue: [NSString stringWithFormat:
_NS("This combination is already taken by \"%@\"."), _NS("This combination is already taken by \"%@\"."),
[o_hotkeyDescriptions objectAtIndex: i_returnValue2]]]; [o_hotkeyDescriptions objectAtIndex: i_returnValue2]]];
else else
[o_hotkeys_change_taken_lbl setStringValue: @""]; [o_hotkeys_change_taken_lbl setStringValue: @""];
...@@ -1359,6 +1363,7 @@ static inline void save_module_list( intf_thread_t * p_intf, id object, const ch ...@@ -1359,6 +1363,7 @@ static inline void save_module_list( intf_thread_t * p_intf, id object, const ch
{ {
NSMutableString *tempString = [[[NSMutableString alloc] init] autorelease]; NSMutableString *tempString = [[[NSMutableString alloc] init] autorelease];
NSString *keyString = [o_theEvent characters]; NSString *keyString = [o_theEvent characters];
unichar key = [keyString characterAtIndex:0]; unichar key = [keyString characterAtIndex:0];
/* modifiers */ /* modifiers */
......
...@@ -301,6 +301,7 @@ static void PictureDisplay(vout_display_t *vd, picture_t *pic, subpicture_t *sub ...@@ -301,6 +301,7 @@ static void PictureDisplay(vout_display_t *vd, picture_t *pic, subpicture_t *sub
[sys->glView setVoutFlushing:NO]; [sys->glView setVoutFlushing:NO];
picture_Release (pic); picture_Release (pic);
sys->has_first_frame = true; sys->has_first_frame = true;
(void)subpicture; (void)subpicture;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment