After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 394341 - Add support for new GNOME 2.18 D-Bus media player keys interface
Add support for new GNOME 2.18 D-Bus media player keys interface
Status: RESOLVED FIXED
Product: totem
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: General Totem maintainer(s)
General Totem maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2007-01-08 19:03 UTC by Jan Arne Petersen
Modified: 2007-01-19 00:24 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Implementation (7.00 KB, patch)
2007-01-08 19:05 UTC, Jan Arne Petersen
needs-work Details | Review
Added summary output to configure, fixed strcmp, merged into totem-remote (10.55 KB, patch)
2007-01-18 23:09 UTC, Jan Arne Petersen
committed Details | Review

Description Jan Arne Petersen 2007-01-08 19:03:36 UTC
See summary.
Comment 1 Jan Arne Petersen 2007-01-08 19:05:14 UTC
Created attachment 79775 [details] [review]
Implementation
Comment 2 Bastien Nocera 2007-01-10 14:15:56 UTC
Comment on attachment 79775 [details] [review]
Implementation

>Index: configure.in
>===================================================================
>--- configure.in	(revision 3832)
>+++ configure.in	(working copy)
>@@ -571,6 +571,32 @@ if test x$HAVE_NAUTILUS = "xyes"; then
> fi
> AM_CONDITIONAL(HAVE_NAUTILUS, test x$HAVE_NAUTILUS = "xyes")
> 
>+dnl *****************
>+dnl Media player keys
>+dnl *****************
>+
>+AC_ARG_ENABLE([media-player-keys],
<snip>

Missing the summary output at the end of configure.ac
<snip>

>+static void
>+on_media_player_key_pressed (DBusGProxy *proxy, const gchar *application, const gchar *key, Totem *totem)
>+{
>+	if (!strcmp ("Totem", application)) {

Please use "strcmp () == 0".

<snip>

>+#ifdef HAVE_MEDIA_PLAYER_KEYS
>+	bus = dbus_g_bus_get (DBUS_BUS_SESSION, &error);

There's a lot of code there.
Wouldn't it be possible to integrate this into totem-remote instead?

Rest looks good!
Comment 3 Jan Arne Petersen 2007-01-18 23:09:25 UTC
Created attachment 80659 [details] [review]
Added summary output to configure, fixed strcmp, merged into totem-remote
Comment 4 Bastien Nocera 2007-01-19 00:14:53 UTC
Looks great, please commit.
Comment 5 Jan Arne Petersen 2007-01-19 00:24:07 UTC
2007-01-19  Jan Arne Petersen  <jap@gnome.org>

	* configure.in:
	* src/Makefile.am:
	* src/totem-marshal.list:
	* src/totem-remote.c: (on_media_player_key_pressed),
	(totem_remote_finalize), (totem_remote_init),
	(totem_remote_window_activated):
	* src/totem-remote.h:
	* src/totem.c: (totem_action_exit), (on_window_focus_in_event),
	(totem_callback_connect): add support for media player keys (new D-Bus
	interface in GNOME 2.18) (Closes: #394341)