rhythmbox r6147 - in trunk: . plugins/mmkeys
- From: hadess svn gnome org
- To: svn-commits-list gnome org
- Subject: rhythmbox r6147 - in trunk: . plugins/mmkeys
- Date: Mon, 9 Feb 2009 14:16:38 +0000 (UTC)
Author: hadess
Date: Mon Feb 9 14:16:38 2009
New Revision: 6147
URL: http://svn.gnome.org/viewvc/rhythmbox?rev=6147&view=rev
Log:
2009-02-09 Bastien Nocera <hadess hadess net>
* plugins/mmkeys/rb-mmkeys-plugin.c (filter_mmkeys), (mmkeys_grab):
Add support for XF86Back and XF86Forward (Closes: #568737)
Modified:
trunk/ChangeLog
trunk/plugins/mmkeys/rb-mmkeys-plugin.c
Modified: trunk/plugins/mmkeys/rb-mmkeys-plugin.c
==============================================================================
--- trunk/plugins/mmkeys/rb-mmkeys-plugin.c (original)
+++ trunk/plugins/mmkeys/rb-mmkeys-plugin.c Mon Feb 9 14:16:38 2009
@@ -245,10 +245,12 @@
} else if (XKeysymToKeycode (GDK_DISPLAY (), XF86XK_AudioStop) == key->keycode) {
rb_shell_player_stop (player);
return GDK_FILTER_REMOVE;
- } else if (XKeysymToKeycode (GDK_DISPLAY (), XF86XK_AudioPrev) == key->keycode) {
+ } else if (XKeysymToKeycode (GDK_DISPLAY (), XF86XK_AudioPrev) == key->keycode ||
+ XKeysymToKeycode (GDK_DISPLAY (), XF86XK_Back) == key->keycode) {
rb_shell_player_do_previous (player, NULL);
return GDK_FILTER_REMOVE;
- } else if (XKeysymToKeycode (GDK_DISPLAY (), XF86XK_AudioNext) == key->keycode) {
+ } else if (XKeysymToKeycode (GDK_DISPLAY (), XF86XK_AudioNext) == key->keycode ||
+ XKeysymToKeycode (GDK_DISPLAY (), XF86XK_Forward) == key->keycode) {
rb_shell_player_do_next (player, NULL);
return GDK_FILTER_REMOVE;
} else {
@@ -259,7 +261,7 @@
static void
mmkeys_grab (RBMMKeysPlugin *plugin, gboolean grab)
{
- gint keycodes[] = {0, 0, 0, 0, 0};
+ gint keycodes[] = {0, 0, 0, 0, 0, 0, 0};
GdkDisplay *display;
GdkScreen *screen;
GdkWindow *root;
@@ -270,6 +272,8 @@
keycodes[2] = XKeysymToKeycode (GDK_DISPLAY (), XF86XK_AudioPrev);
keycodes[3] = XKeysymToKeycode (GDK_DISPLAY (), XF86XK_AudioNext);
keycodes[4] = XKeysymToKeycode (GDK_DISPLAY (), XF86XK_AudioPause);
+ keycodes[5] = XKeysymToKeycode (GDK_DISPLAY (), XF86XK_Back);
+ keycodes[6] = XKeysymToKeycode (GDK_DISPLAY (), XF86XK_Forward);
display = gdk_display_get_default ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]