Updating branch refs/heads/master
         to f03818a64d93f99252071366033b1bc1cb93c296 (commit)
       from 5879ae1d2b2030faa1012e64ce07dd009d67adac (commit)

commit f03818a64d93f99252071366033b1bc1cb93c296
Author: Ali Abdallah <[email protected]>
Date:   Sun Aug 16 15:26:36 2009 +0200

    Check and enable support for XF86Keysym if available

 configure.ac.in        |   10 ++++++++++
 parole/parole-player.c |   30 ++++++++++++++++++++++++++++++
 2 files changed, 40 insertions(+), 0 deletions(-)

diff --git a/configure.ac.in b/configure.ac.in
index 40298c1..4070856 100644
--- a/configure.ac.in
+++ b/configure.ac.in
@@ -117,6 +117,16 @@ fi
 AC_SUBST(pixmapsdir)
 
 #=======================================================#
+#                     Check XF86keysysm                        #
+#=======================================================#
+# Check for the AudioPlay sym other should exist
+# if this one exists.
+AC_CHECK_DECL(XF86XK_AudioPlay,have_XF86XK_AudioPlay=1,have_XF86XK_AudioPlay=0,[#include
 <X11/XF86keysym.h>])
+if test "x${ac_cv_have_decl_XF86XK_AudioPlay}" != "xno"; then
+  AC_DEFINE(HAVE_XF86_KEYSYM, 1, [Define if XF86keysysm.h is available])
+fi
+
+#=======================================================#
 #              Check plugins to build                   #
 #=======================================================#
 
diff --git a/parole/parole-player.c b/parole/parole-player.c
index b829681..1cf1c12 100644
--- a/parole/parole-player.c
+++ b/parole/parole-player.c
@@ -26,6 +26,10 @@
 #include <stdlib.h>
 #include <string.h>
 
+#ifdef HAVE_XF86_KEYSYM
+#include <X11/XF86keysym.h>
+#endif
+
 #include <gdk/gdkkeysyms.h>
 #include <gtk/gtk.h>
 
@@ -1324,11 +1328,37 @@ parole_player_key_press (GtkWidget *widget, GdkEventKey 
*ev, ParolePlayer *playe
     key = gdk_keyval_name (ev->keyval);
     g_print ("Key Press 0x%X:%s on widget=%s\n", ev->keyval, key, 
gtk_widget_get_name (widget));
 */
+
     switch (ev->keyval)
     {
        case GDK_F11:
            parole_player_full_screen_menu_item_activate (player);
            return TRUE;
+#ifdef HAVE_XF86_KEYSYM
+       case XF86XK_AudioPlay:
+           parole_player_play_pause_clicked (NULL, player);
+           return TRUE;
+       case XF86XK_AudioStop:
+           parole_player_stop_clicked (NULL, player);
+           return TRUE;
+       case XF86XK_AudioRaiseVolume:
+           parole_player_volume_up (NULL, player);
+           return TRUE;
+       case XF86XK_AudioLowerVolume:
+           parole_player_volume_down (NULL, player);
+           return TRUE;
+       case XF86XK_AudioMute:
+           parole_player_volume_muted (NULL, player);
+           return TRUE;
+       case XF86XK_AudioPrev:
+           parole_disc_menu_seek_prev (player->priv->disc_menu);
+           return TRUE;
+       case XF86XK_AudioNext:
+           parole_disc_menu_seek_next (player->priv->disc_menu);
+           return TRUE;
+#endif /* HAVE_XF86_KEYSYM */
+       default:
+           break;
     }
     
     return parole_player_handle_key_press (ev, player);
_______________________________________________
Xfce4-commits mailing list
[email protected]
http://foo-projects.org/mailman/listinfo/xfce4-commits

Reply via email to