[gnome-power-manager] Remove obsolete check-foreground-console support.



commit be1aa650adee6655895ed0137d1a8333a3b04dd8
Author: Michael Biebl <biebl debian org>
Date:   Tue Sep 29 07:30:04 2009 +0200

    Remove obsolete check-foreground-console support.
    
    pam_foreground has been deprecated and removed from Ubuntu for quite
    some time now, so remove the dead code.

 configure.ac      |   18 ------------------
 src/gpm-control.c |   18 ------------------
 2 files changed, 0 insertions(+), 36 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 05045a8..606b65b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -233,24 +233,6 @@ fi
 AM_CONDITIONAL([HAVE_HAL], [test $enable_hal = yes])
 
 dnl ---------------------------------------------------------------------------
-dnl - Use check-foreground-console (Ubuntu specific) support?
-dnl ---------------------------------------------------------------------------
-AC_ARG_ENABLE(checkfg,
-              AS_HELP_STRING([--enable-checkfg],
-                             [Use check-foreground-console (Ubuntu systems)]),
-              enable_checkfg=$enableval,enable_checkfg=no)
-
-AC_MSG_CHECKING([whether to use check-foreground-console])
-have_checkfg=no
-if test x$enable_checkfg = xyes ; then
-    have_checkfg=yes
-    AC_DEFINE(HAVE_CHECK_FG, 1, [Define if we want to use check-foreground-console])
-    AC_MSG_RESULT(yes)
-else
-    AC_MSG_RESULT(no)
-fi
-
-dnl ---------------------------------------------------------------------------
 dnl - Build self tests
 dnl ---------------------------------------------------------------------------
 AC_ARG_ENABLE(tests,
diff --git a/src/gpm-control.c b/src/gpm-control.c
index 4148dcf..3038013 100644
--- a/src/gpm-control.c
+++ b/src/gpm-control.c
@@ -93,29 +93,11 @@ gpm_control_error_quark (void)
  * Checks if the difference in time between this request for an action, and
  * the last action completing is larger than the timeout set in gconf.
  *
- * Also check for the foreground console if we specified
- * --enable-checkfg on the command line. This is only needed on Debian.
- *
  * Return value: TRUE if we can perform the action.
  **/
 static gboolean
 gpm_control_check_foreground_console (GpmControl *control)
 {
-#ifdef HAVE_CHECK_FG
-	gchar *argv[] = { "check-foreground-console", NULL };
-	int retcode;
-
-	if (!g_spawn_sync (NULL, argv, NULL, G_SPAWN_SEARCH_PATH, NULL, NULL,
-				 NULL, NULL, &retcode, NULL)  || ! WIFEXITED (retcode)) {
-		/* if check-foreground-console could not be executed,
-		 * assume active console */
-		egg_debug ("could not execute check-foreground-console");
-		return TRUE;
-	}
-	egg_debug ("check-foreground-console returned with %i", WEXITSTATUS (retcode));
-	return WEXITSTATUS (retcode) == 0;
-#endif
-	/* no other checks failed, so return okay */
 	return TRUE;
 }
 



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