[cheese] Clean up Webcam key handling



commit 7b96fe439ed0660442ca879b06edce2da252c7bd
Author: Bastien Nocera <hadess hadess net>
Date:   Tue Dec 1 00:46:31 2009 +0000

    Clean up Webcam key handling
    
    No need to check for XF86 specific keys, they're now in GDK.

 configure.ac        |   27 ---------------------------
 src/cheese-window.c |   10 +---------
 2 files changed, 1 insertions(+), 36 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 8839bf2..66e448a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -97,33 +97,6 @@ CHEESE_LIBS="$CHEESE_LIBS -lgstinterfaces-0.10"
 
 AC_SUBST(CHEESE_LIBS)
 
-dnl Multimedia keys
-have_xfree=no
-AC_COMPILE_IFELSE([
-	#include <X11/XF86keysym.h>
-        int main(int argc,char **argv) {
-          return 0;
-        }
-], have_xfree=yes)
-AC_MSG_CHECKING(for XFree86 headers)
-AC_MSG_RESULT($have_xfree)
-if test x"$have_xfree" = "xyes" ; then
-	AC_DEFINE(HAVE_XFREE, 1, [defined if you have X11/XF86keysym.h])
-fi
-
-AC_ARG_ENABLE(mmkeys, AC_HELP_STRING([--disable-mmkeys],
-					[don't build with Multimedia Keys support]))
-if test x"$have_xfree" = xyes; then
-	if test x"$enable_mmkeys" != xno; then
-		enable_mmkeys=yes
-		AC_DEFINE(HAVE_MMKEYS, 1, [define if Multimedia Keys are enabled])
-	fi
-else
-	if test x"$enable_mmkeys" = xyes; then
-		AC_MSG_ERROR([Multimedia keys explicitly requested but no support found])
-	fi
-fi
-
 AC_PATH_PROG(GCONFTOOL, gconftool-2)
 AM_GCONF_SOURCE_2
 
diff --git a/src/cheese-window.c b/src/cheese-window.c
index fdce896..83ac059 100644
--- a/src/cheese-window.c
+++ b/src/cheese-window.c
@@ -40,10 +40,6 @@
 #include <libebook/e-book.h>
 #include <canberra-gtk.h>
 
-#ifdef HAVE_MMKEYS
-  #include <X11/XF86keysym.h>
-#endif /* HAVE_MMKEYS */
-
 #include "cheese-countdown.h"
 #include "cheese-effect-chooser.h"
 #include "cheese-fileutil.h"
@@ -202,9 +198,6 @@ cheese_window_delete_event_cb (GtkWidget *widget, GdkEvent event, gpointer data)
 static gboolean
 cheese_window_key_press_event_cb (GtkWidget *win, GdkEventKey *event, CheeseWindow *cheese_window)
 {
-#ifndef HAVE_MMKEYS
-  return FALSE;
-#else
   /* If we have modifiers, and either Ctrl, Mod1 (Alt), or any
    * of Mod3 to Mod5 (Mod2 is num-lock...) are pressed, we
    * let Gtk+ handle the key */
@@ -218,7 +211,7 @@ cheese_window_key_press_event_cb (GtkWidget *win, GdkEventKey *event, CheeseWind
 
   switch (event->keyval)
   {
-    case XF86XK_WebCam:
+    case GDK_WebCam:
 
       /* do stuff */
       cheese_window_action_button_clicked_cb (NULL, cheese_window);
@@ -226,7 +219,6 @@ cheese_window_key_press_event_cb (GtkWidget *win, GdkEventKey *event, CheeseWind
   }
 
   return FALSE;
-#endif /* !HAVE_MMKEYS */
 }
 
 static void



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]