Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
e8aaffa2
Commit
e8aaffa2
authored
Sep 03, 2015
by
Felix Paul Kühne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
growl: drop legacy NSAutoreleasePool pattern
parent
91721c03
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
28 deletions
+27
-28
modules/notify/growl.m
modules/notify/growl.m
+27
-28
No files found.
modules/notify/growl.m
View file @
e8aaffa2
...
...
@@ -279,38 +279,37 @@ static int ItemChange( vlc_object_t *p_this, const char *psz_var,
-
(
void
)
registerToGrowl
{
o_applicationName
=
[[
NSString
alloc
]
initWithUTF8String
:
_
(
"VLC media player"
)];
o_notificationType
=
[[
NSString
alloc
]
initWithUTF8String
:
_
(
"New input playing"
)];
NSAutoreleasePool
*
o_pool
=
[[
NSAutoreleasePool
alloc
]
init
];
NSArray
*
o_defaultAndAllNotifications
=
[
NSArray
arrayWithObject
:
o_notificationType
];
o_registrationDictionary
=
[[
NSMutableDictionary
alloc
]
init
];
[
o_registrationDictionary
setObject
:
o_defaultAndAllNotifications
forKey:
GROWL_NOTIFICATIONS_ALL
];
[
o_registrationDictionary
setObject
:
o_defaultAndAllNotifications
forKey:
GROWL_NOTIFICATIONS_DEFAULT
];
[
GrowlApplicationBridge
setGrowlDelegate
:
self
];
[
o_pool
drain
];
@autoreleasepool
{
o_applicationName
=
[[
NSString
alloc
]
initWithUTF8String
:
_
(
"VLC media player"
)];
o_notificationType
=
[[
NSString
alloc
]
initWithUTF8String
:
_
(
"New input playing"
)];
NSArray
*
o_defaultAndAllNotifications
=
[
NSArray
arrayWithObject
:
o_notificationType
];
o_registrationDictionary
=
[[
NSMutableDictionary
alloc
]
init
];
[
o_registrationDictionary
setObject
:
o_defaultAndAllNotifications
forKey:
GROWL_NOTIFICATIONS_ALL
];
[
o_registrationDictionary
setObject
:
o_defaultAndAllNotifications
forKey:
GROWL_NOTIFICATIONS_DEFAULT
];
[
GrowlApplicationBridge
setGrowlDelegate
:
self
];
}
}
-
(
void
)
notifyWithDescription
:
(
const
char
*
)
psz_desc
artUrl
:
(
const
char
*
)
psz_arturl
{
NSAutoreleasePool
*
o_pool
=
[[
NSAutoreleasePool
alloc
]
init
];
NSData
*
o_art
=
nil
;
if
(
psz_arturl
)
o_art
=
[
NSData
dataWithContentsOfFile
:
[
NSString
stringWithUTF8String
:
psz_arturl
]];
[
GrowlApplicationBridge
notifyWithTitle
:
[
NSString
stringWithUTF8String
:
_
(
"Now playing"
)]
description:
[
NSString
stringWithUTF8String
:
psz_desc
]
notificationName:
o_notificationType
iconData:
o_art
priority:
0
isSticky:
NO
clickContext:
nil
];
[
o_pool
drain
];
@autoreleasepool
{
NSData
*
o_art
=
nil
;
if
(
psz_arturl
)
o_art
=
[
NSData
dataWithContentsOfFile
:
[
NSString
stringWithUTF8String
:
psz_arturl
]];
[
GrowlApplicationBridge
notifyWithTitle
:
[
NSString
stringWithUTF8String
:
_
(
"Now playing"
)]
description:
[
NSString
stringWithUTF8String
:
psz_desc
]
notificationName:
o_notificationType
iconData:
o_art
priority:
0
isSticky:
NO
clickContext:
nil
];
}
}
/*****************************************************************************
...
...
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