Add checks for NSUserNotification and NSUserNotificationCenter so we do not
use them on OS X 10.7 and below, to prevent VLC from crashing if it
is compiled on 10.8 or higher but ran on 10.7 or below.
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
This restores the code that used notifications to determine the app state.
Additionally the inital state is not active, as we get a notification if the
app switches to active after opening.
Signed-off-by: Felix Paul Kühne <fkuehne@videolan.org>
Set an identifier for the VLC Notifications to make
them coalesce when changing tracks rapidly one
after another. (closes#10386)
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
This cleans up unnecessary code which could be replaced by a much simple
check to determine if VLC is in foreground or not.
Add a missing release.
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
This renames the Growl plugin to OS X Notifications to highlight
the new capabilities and to not advertise Growl so much, as
requested.
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
This adds native OS X user notifications as fallback, if Growl is
currently not running. Those native notifications are only available
on 10.8+, therefore some preprocessor conditionals prevent that this
breaks 10.7 compilation.
There is no explicit check if the class is available as it should be
on all 10.8 systems.
Signed-off-by: Felix Paul Kühne <fkuehne@videolan.org>
The input thread sends events. There is no point in checking manually
since the input thread functions aresafe to "use" so long as the caller
has a reference to the input thread (regardless of the input thread
being dead or at EOF). Also the value of those flags can change
asynchronously (outside the input thread) so the checks were racy.
Prevent the es_out from overriding the NowPlaying state by splitting
the meta into NowPlaying and ESNowPlaying.
The function input_item_GetNowPlayingFb can be used to return the
preferred meta value.
The "item-change" callback is called with the playlist lock held in
at least one case: when the now playing meta is cleared while a new
input is created by the playlist.
playlist_CurrentInput() acquires the playlist lock. So the
"item-change" callback cannot call it. This bug is present in the
Growl, MSN and Telepathy modules since version 1.0.0. It got copied
into Notify in version 2.0.0.
This reverts commit fc56b92af1.
This should fix#6641.
As discussed in May 2012, this plugin has been deadlocking since
VLC 1.0.0. So I gather it is unused and unmaintained. Also, it does not
seem to be using libdbus safely.
...as for plugins directory. Most of the content is anyway per-process,
either because gettext and interfaces are per-process. The only caller
of the function that is not an interface or gettext is the DVB scanner.
This is even probably a bug.