Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
cd8a707f
Commit
cd8a707f
authored
Jul 24, 2011
by
Felix Paul Kühne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macosx: don't use Carbon to retrieve icons from the OS
parent
fca62c49
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
3 additions
and
73 deletions
+3
-73
modules/gui/macosx/coredialogs.m
modules/gui/macosx/coredialogs.m
+1
-10
modules/gui/macosx/misc.h
modules/gui/macosx/misc.h
+0
-9
modules/gui/macosx/misc.m
modules/gui/macosx/misc.m
+0
-53
modules/gui/macosx/playlist.m
modules/gui/macosx/playlist.m
+2
-1
No files found.
modules/gui/macosx/coredialogs.m
View file @
cd8a707f
...
...
@@ -48,10 +48,6 @@ static VLCCoreDialogProvider *_o_sharedInstance = nil;
else
{
_o_sharedInstance
=
[
super
init
];
[[
NSNotificationCenter
defaultCenter
]
addObserver
:
self
selector:
@selector
(
performDialogEvent
:)
name:
@"VLCNewCoreDialogEventNotification"
object:
self
];
o_error_panel
=
[[
VLCErrorPanel
alloc
]
init
];
b_progress_cancelled
=
NO
;
}
...
...
@@ -220,11 +216,6 @@ static VLCCoreDialogProvider *_o_sharedInstance = nil;
return
o_error_panel
;
}
-
(
void
)
dealloc
{
[[
NSNotificationCenter
defaultCenter
]
removeObserver
:
self
];
[
super
dealloc
];
}
@end
/*****************************************************************************
...
...
@@ -279,7 +270,7 @@ static VLCCoreDialogProvider *_o_sharedInstance = nil;
[
o_errors
addObject
:
ourError
];
[
ourError
release
];
[
o_icons
addObject
:
[
NSImage
imageWithErrorIcon
]];
[
o_icons
addObject
:
[
[
NSWorkspace
sharedWorkspace
]
iconForFileType
:
NSFileTypeForHFSTypeCode
(
kAlertStopIcon
)
]];
[
o_error_table
reloadData
];
}
...
...
modules/gui/macosx/misc.h
View file @
cd8a707f
...
...
@@ -25,15 +25,6 @@
#import <Cocoa/Cocoa.h>
#import <ApplicationServices/ApplicationServices.h>
/*****************************************************************************
* NSImage (VLCAddition)
*****************************************************************************/
@interface
NSImage
(
VLCAdditions
)
+
(
id
)
imageWithWarningIcon
;
+
(
id
)
imageWithErrorIcon
;
@end
/*****************************************************************************
* NSAnimation (VLCAddition)
*****************************************************************************/
...
...
modules/gui/macosx/misc.m
View file @
cd8a707f
...
...
@@ -32,59 +32,6 @@
#import "controls.h"
#import <vlc_url.h>
/*****************************************************************************
* NSImage (VLCAdditions)
*
* Addition to NSImage
*****************************************************************************/
@implementation
NSImage
(
VLCAdditions
)
+
(
id
)
imageWithSystemName
:(
int
)
name
{
/* ugly Carbon stuff following...
* regrettably, you can't get the icons through clean Cocoa */
/* retrieve our error icon */
NSImage
*
icon
;
IconRef
ourIconRef
;
int
returnValue
;
returnValue
=
GetIconRef
(
kOnSystemDisk
,
'
macs
'
,
name
,
&
ourIconRef
);
icon
=
[[[
NSImage
alloc
]
initWithSize
:
NSMakeSize
(
32
,
32
)]
autorelease
];
[
icon
lockFocus
];
CGRect
rect
=
CGRectMake
(
0
,
0
,
32
,
32
);
PlotIconRefInContext
((
CGContextRef
)[[
NSGraphicsContext
currentContext
]
graphicsPort
],
&
rect
,
kAlignNone
,
kTransformNone
,
NULL
/*inLabelColor*/
,
kPlotIconRefNormalFlags
,
(
IconRef
)
ourIconRef
);
[
icon
unlockFocus
];
returnValue
=
ReleaseIconRef
(
ourIconRef
);
return
icon
;
}
+
(
id
)
imageWithWarningIcon
{
static
NSImage
*
imageWithWarningIcon
=
nil
;
if
(
!
imageWithWarningIcon
)
{
imageWithWarningIcon
=
[[[
self
class
]
imageWithSystemName
:
'
caut
'
]
retain
];
}
return
imageWithWarningIcon
;
}
+
(
id
)
imageWithErrorIcon
{
static
NSImage
*
imageWithErrorIcon
=
nil
;
if
(
!
imageWithErrorIcon
)
{
imageWithErrorIcon
=
[[[
self
class
]
imageWithSystemName
:
'
stop
'
]
retain
];
}
return
imageWithErrorIcon
;
}
@end
/*****************************************************************************
* NSAnimation (VLCAdditions)
*
...
...
modules/gui/macosx/playlist.m
View file @
cd8a707f
...
...
@@ -324,7 +324,8 @@
{
if
(
input_item_HasErrorWhenReading
(
p_item
->
p_input
)
)
{
o_value
=
[
NSImage
imageWithWarningIcon
];
o_value
=
[[
NSWorkspace
sharedWorkspace
]
iconForFileType
:
NSFileTypeForHFSTypeCode
(
kAlertCautionIcon
)];
[
o_value
setSize
:
NSMakeSize
(
16
,
16
)];
}
}
return
o_value
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment