Commit Graph

68 Commits

Author SHA1 Message Date
Alexandre Janniaux 6b7a57f984 modules: fix typos
Typos found and reworked from codespell.
2022-01-08 15:19:32 +00:00
Lyndon Brown 6f68f89498 plugins: purge use of set_category()
see e967f81f6a.

note, this does **not** affect cat-based module selection items
(of which there are just three in use by the core), since that
mechanism uses subcats not cats.
2021-12-20 09:45:01 +00:00
Romain Vimont 3716a7da5b config: remove remaining "advanced" flags
The config "advanced" flag was unused and has been removed by
6a7a137f7b.

It has been removed from many add_*() macros, but not all. Remove it
from the remaining macros.
2021-06-06 08:42:50 +00:00
Rémi Denis-Courmont 0ebb8fa047 notify: don't depend on any GTK version
If there's one in the process use it. If there's none fallback to
default VLC icon with the old code.

This not only avoids VLC builds depending on GTK, but this should
prevent crashes if GTK 2 is present in the process (e.g. through Qt plugin).
2020-05-10 11:03:08 +03:00
Rémi Denis-Courmont e4e8b040c8 notify: call free() only when needed 2020-05-05 18:51:14 +03:00
Rémi Denis-Courmont a3226cf890 thread: remove vlc_mutex_destroy() 2020-02-21 19:16:09 +02:00
Emmanuel Nicolet e880076045 notify: fix use after free
Signed-off-by: Tristan Matthews <tmatth@videolan.org>
2019-12-28 10:05:18 -05:00
Alexandre Janniaux 1d0986c369 notify: replace deprecated gdk_pixbuf_unref
From [1]:
> gdk_pixbuf_unref has been deprecated since version 2.0 and should
> not be used in newly-written code.
>
> Use g_object_unref().

[1]: https://developer.gnome.org/gdk-pixbuf/stable/gdk-pixbuf-Reference-Counting-and-Memory-Mangement.html#gdk-pixbuf-unref

Signed-off-by: Thomas Guillem <thomas@gllm.fr>
2019-09-02 09:49:07 +02:00
Alexandre Janniaux 5e99bb6402 notify: fix invalid function pointer cast
`g_list_foreach` takes a void `(*GFunc)(void*, void*)` and `g_free`
is a `void (void *)` function.

Signed-off-by: Thomas Guillem <thomas@gllm.fr>
2019-09-02 09:49:05 +02:00
David Fuhrmann 16b173aef5 osx notifications: Use the players on_current_media_changed hook
The previous implementation consistently used the old input item
to show its data. Now, the data of the new input is actually shown.
2019-04-16 00:32:49 +02:00
David Fuhrmann 0a7be713b7 osx notifications: Do not leak input item object 2019-04-15 23:59:00 +02:00
Felix Paul Kühne 98f8356b89 notify: update macOS plugin to use the new playlist 2019-04-13 18:25:05 +02:00
Thomas Guillem 5daf5c1ed1 notify: use new playlist / player 2019-04-10 14:11:51 +02:00
Steve Lhomme 5363279805 remove the $Id$ in the source code 2019-01-17 12:21:18 +01:00
Thomas Guillem 034a3f75a2 core: move playlist to playlist_legacy
To make room for the new playlist.
This playlist_legacy will be removed once all modules are using the new
playlist.
2018-11-15 14:54:00 +01:00
Hugo Beauzée-Luyssen 2fea8197e1 notify: Fix potential leak
CID #1398419
2018-05-31 10:15:26 +02:00
Marvin Scholz 66cdaaaf1f osx_notifications: remove Growl support, refactor
As per the discussion on the ML, Growl support is removed for VLC 4.0.

With this refactoring the module is ARC compatible too, simplifying
memory management.

https://mailman.videolan.org/pipermail/vlc-devel/2018-February/117924.html
2018-04-10 01:32:57 +02:00
Rémi Denis-Courmont 1f252f5433 notify: fix path to VLC icon
As per ebbb05512f.
2018-03-06 21:08:36 +02:00
Rémi Denis-Courmont 477d18c723 Replace config_Get(Data|Lib)Dir() with config_GetSysDir() 2018-03-06 20:55:50 +02:00
Marvin Scholz 359bf62fa8 osx_notifications: Do not check if NSUserNotification is available
Targeting 10.10, it will always be available, so this check is not
useful anymore.
2018-02-14 22:14:49 +01:00
Marvin Scholz 04edeb6ba8 osx_notifications: Remove availability and SDK checks
Targeting 10.10, NSUserNotificationCenter will always be available so
there is no need to guard these calls.
2018-02-14 22:11:59 +01:00
Alexander Lakhin 0c218a0f45 Remove unnecessary spaces from messages
Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
2017-11-20 18:54:50 +02:00
Marvin Scholz 941fb41401 notify/osx_notifications: Fix build
We need to ignore the unguarded-availability diagnostic, we are already
using partial-availability here anyway.
2017-07-03 23:29:46 +02:00
David Fuhrmann b473119723 osx_notification: Enable default macOS min version, fix compilation
Remove fixed macosx-min-version, as the min version is already
set globally. Fix compilation by ignoring the partial availability
warning. Code is written in a way that it gets disabled on 10.7,
where Growl is still used.
2017-07-02 16:30:58 +02:00
Jean-Baptiste Kempf 594296276f os_notification has an OS target of 10.8
All the NSUser* classes are 10.8; but the rest of the code, using Growl,
should still work in 10.7. The runtime checks seems correct for 10.7.

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
2016-12-21 20:24:10 +01:00
Marvin Scholz b35575cae3 osx_notification: Remove "item-change" callback
Notify as soon as the current input item is changed,
as it is not a good idea to rely on an item-change
eventually happening later.
This will result in some items that are added and played
immediately lacking metadata in their notifications but
this seems like an acceptable edge case.
2016-11-19 18:13:59 +01:00
Jean-Baptiste Kempf 1afd117faf macOS notification: fix crash on first item 2016-11-16 18:31:14 +01:00
Rémi Denis-Courmont b8ab807045 osx_notification: fix input item usage 2016-11-16 17:46:08 +02:00
Avani Sharma 7816da98aa Notify: don't display notification for folders
Fix #15713

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
2016-03-29 07:07:41 +02:00
Rémi Denis-Courmont 04fb7e89cb Namespace/rename make_path to vlc_uri2path 2015-11-29 15:13:54 +02:00
Marvin Scholz bf294ee5cc osx_notifications: Check if user notifications classes exist to prevent crash on 10.7
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>
2015-10-23 13:15:06 +02:00
Marvin Scholz 80cada9e77 osx_notifications: Use active state notifications for compatibility with OS X <10.10
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>
2015-10-23 12:50:30 +02:00
Marvin Scholz a4488eada1 osx_notifications: Coalesce Growl notifications
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>
2015-10-23 11:28:02 +02:00
Marvin Scholz a4baa14604 osx_notifications: Show notification only if VLC in background, cleanup
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>
2015-10-23 11:28:02 +02:00
Marvin Scholz 13747555fd growl: Renamed Growl plugin to OS X Notifications
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>
2015-10-23 11:28:02 +02:00
Marvin Scholz 95a1507855 growl: Add OS X user notifications as fallback to Growl notifications
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>
2015-10-17 21:47:01 +02:00
Felix Paul Kühne e8aaffa24d growl: drop legacy NSAutoreleasePool pattern 2015-09-03 11:15:41 +02:00
Rémi Denis-Courmont eb4eb47850 gui: remove useless checks for input_thread_t.b_dead and b_eof
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.
2015-06-05 00:05:35 +03:00
Rémi Denis-Courmont 56220f8612 vlc_plugin: fix non-LGPL plugins meta infos 2015-03-21 14:18:20 +02:00
Rémi Denis-Courmont 1fa7df90a6 growl: use input-current callback and simplify 2015-02-20 00:14:50 +02:00
Rémi Denis-Courmont 103f9309ee notify: use input-current callback and simplify 2015-02-20 00:14:50 +02:00
Ludovic Fauvet d4ccd7a5b4 Fix broken NowPlaying (close #9960, #11796, #12850)
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.
2014-12-18 11:27:25 +01:00
Jean-Baptiste Kempf 5e426991ea notify: use proper cast to reduce warning 2014-08-16 08:47:48 +02:00
Jean-Baptiste Kempf 5f964e27bc Notify: fix compilation 2014-08-16 08:44:59 +02:00
Jean-Baptiste Kempf 67d1a86303 OSX growl: fix compilation 2014-08-16 01:12:05 +02:00
David Fuhrmann 314047bfe3 growl: fix incompatible pointer warning 2014-02-20 17:43:24 +01:00
Rémi Denis-Courmont edce6f5d66 notify: remove recursion 2013-09-28 17:25:01 +03:00
Rémi Denis-Courmont 98cea7a2a2 modules: remove VLC-specific AM_LIBADD, simplify 2013-09-16 18:54:31 +03:00
Rémi Denis-Courmont e67cf044cc modules: use different directory prefixes for each plugins subdirectory
This is just a step toward less recursion.
2013-09-16 18:54:31 +03:00
Rémi Denis-Courmont 9ccb4a6d17 Remove left-over .gitignore files 2013-09-14 15:43:06 +03:00