diff options
32 files changed, 724 insertions, 763 deletions
diff --git a/Makefile.am b/Makefile.am index 13683038..d83d901a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,5 +1,4 @@ SUBDIRS = \ - defaults \ docs \ engines \ icons \ diff --git a/Makefile.in b/Makefile.in index 9042e44a..4bde20fc 100644 --- a/Makefile.in +++ b/Makefile.in @@ -223,7 +223,6 @@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ SUBDIRS = \ - defaults \ docs \ engines \ icons \ diff --git a/config.h.in b/config.h.in index 716d98c7..9804402d 100644 --- a/config.h.in +++ b/config.h.in @@ -165,6 +165,9 @@ /* Version number of package */ #undef VERSION +/* Shutdown helper implementation */ +#undef XFSM_SHUTDOWN_HELPER_IMPL_C + /* Define to 1 if the X Window System is missing or not being used. */ #undef X_DISPLAY_MISSING @@ -1075,6 +1075,8 @@ Optional Packages: include additional configurations [automatic] --with-x use the X Window System --with-locales-dir=DIR Install locales into DIR + --with-shutdown-style=auto/none/redhat/sudo + Shutdown style Some influential environment variables: CC C compiler command @@ -5410,7 +5412,7 @@ ia64-*-hpux*) ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 5413 "configure"' > conftest.$ac_ext + echo '#line 5415 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -6504,7 +6506,7 @@ fi # Provide some information about the compiler. -echo "$as_me:6507:" \ +echo "$as_me:6509:" \ "checking for Fortran 77 compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5 @@ -7538,11 +7540,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7541: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7543: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:7545: \$? = $ac_status" >&5 + echo "$as_me:7547: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -7771,11 +7773,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7774: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7776: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:7778: \$? = $ac_status" >&5 + echo "$as_me:7780: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -7831,11 +7833,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7834: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7836: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:7838: \$? = $ac_status" >&5 + echo "$as_me:7840: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -9165,7 +9167,7 @@ linux*) libsuff= case "$host_cpu" in x86_64*|s390x*|powerpc64*) - echo '#line 9168 "configure"' > conftest.$ac_ext + echo '#line 9170 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -10036,7 +10038,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<EOF -#line 10039 "configure" +#line 10041 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10134,7 +10136,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<EOF -#line 10137 "configure" +#line 10139 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -12313,11 +12315,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:12316: $lt_compile\"" >&5) + (eval echo "\"\$as_me:12318: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:12320: \$? = $ac_status" >&5 + echo "$as_me:12322: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -12373,11 +12375,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:12376: $lt_compile\"" >&5) + (eval echo "\"\$as_me:12378: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:12380: \$? = $ac_status" >&5 + echo "$as_me:12382: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -12884,7 +12886,7 @@ linux*) libsuff= case "$host_cpu" in x86_64*|s390x*|powerpc64*) - echo '#line 12887 "configure"' > conftest.$ac_ext + echo '#line 12889 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -13755,7 +13757,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<EOF -#line 13758 "configure" +#line 13760 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -13853,7 +13855,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<EOF -#line 13856 "configure" +#line 13858 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -14680,11 +14682,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:14683: $lt_compile\"" >&5) + (eval echo "\"\$as_me:14685: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:14687: \$? = $ac_status" >&5 + echo "$as_me:14689: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -14740,11 +14742,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:14743: $lt_compile\"" >&5) + (eval echo "\"\$as_me:14745: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:14747: \$? = $ac_status" >&5 + echo "$as_me:14749: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -16054,7 +16056,7 @@ linux*) libsuff= case "$host_cpu" in x86_64*|s390x*|powerpc64*) - echo '#line 16057 "configure"' > conftest.$ac_ext + echo '#line 16059 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -16795,11 +16797,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:16798: $lt_compile\"" >&5) + (eval echo "\"\$as_me:16800: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:16802: \$? = $ac_status" >&5 + echo "$as_me:16804: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -17028,11 +17030,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:17031: $lt_compile\"" >&5) + (eval echo "\"\$as_me:17033: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:17035: \$? = $ac_status" >&5 + echo "$as_me:17037: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -17088,11 +17090,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:17091: $lt_compile\"" >&5) + (eval echo "\"\$as_me:17093: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:17095: \$? = $ac_status" >&5 + echo "$as_me:17097: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -18422,7 +18424,7 @@ linux*) libsuff= case "$host_cpu" in x86_64*|s390x*|powerpc64*) - echo '#line 18425 "configure"' > conftest.$ac_ext + echo '#line 18427 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -19293,7 +19295,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<EOF -#line 19296 "configure" +#line 19298 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -19391,7 +19393,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<EOF -#line 19394 "configure" +#line 19396 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -24281,23 +24283,23 @@ fi else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - echo "$as_me:$LINENO: checking for libxfcegui4-1.0 >= 4.1.20" >&5 -echo $ECHO_N "checking for libxfcegui4-1.0 >= 4.1.20... $ECHO_C" >&6 + echo "$as_me:$LINENO: checking for libxfcegui4-1.0 >= 4.1.24" >&5 +echo $ECHO_N "checking for libxfcegui4-1.0 >= 4.1.24... $ECHO_C" >&6 - if $PKG_CONFIG --exists "libxfcegui4-1.0 >= 4.1.20" ; then + if $PKG_CONFIG --exists "libxfcegui4-1.0 >= 4.1.24" ; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 succeeded=yes echo "$as_me:$LINENO: checking LIBXFCEGUI4_CFLAGS" >&5 echo $ECHO_N "checking LIBXFCEGUI4_CFLAGS... $ECHO_C" >&6 - LIBXFCEGUI4_CFLAGS=`$PKG_CONFIG --cflags "libxfcegui4-1.0 >= 4.1.20"` + LIBXFCEGUI4_CFLAGS=`$PKG_CONFIG --cflags "libxfcegui4-1.0 >= 4.1.24"` echo "$as_me:$LINENO: result: $LIBXFCEGUI4_CFLAGS" >&5 echo "${ECHO_T}$LIBXFCEGUI4_CFLAGS" >&6 echo "$as_me:$LINENO: checking LIBXFCEGUI4_LIBS" >&5 echo $ECHO_N "checking LIBXFCEGUI4_LIBS... $ECHO_C" >&6 - LIBXFCEGUI4_LIBS=`$PKG_CONFIG --libs "libxfcegui4-1.0 >= 4.1.20"` + LIBXFCEGUI4_LIBS=`$PKG_CONFIG --libs "libxfcegui4-1.0 >= 4.1.24"` echo "$as_me:$LINENO: result: $LIBXFCEGUI4_LIBS" >&5 echo "${ECHO_T}$LIBXFCEGUI4_LIBS" >&6 else @@ -24305,7 +24307,7 @@ echo "${ECHO_T}$LIBXFCEGUI4_LIBS" >&6 LIBXFCEGUI4_LIBS="" ## If we have a custom action on failure, don't print errors, but ## do set a variable so people can do so. - LIBXFCEGUI4_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libxfcegui4-1.0 >= 4.1.20"` + LIBXFCEGUI4_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libxfcegui4-1.0 >= 4.1.24"` echo $LIBXFCEGUI4_PKG_ERRORS fi @@ -24320,12 +24322,12 @@ echo "${ECHO_T}$LIBXFCEGUI4_LIBS" >&6 if test $succeeded = yes; then : else - { { echo "$as_me:$LINENO: error: Library requirements (libxfcegui4-1.0 >= 4.1.20) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 -echo "$as_me: error: Library requirements (libxfcegui4-1.0 >= 4.1.20) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} + { { echo "$as_me:$LINENO: error: Library requirements (libxfcegui4-1.0 >= 4.1.24) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 +echo "$as_me: error: Library requirements (libxfcegui4-1.0 >= 4.1.24) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} { (exit 1); exit 1; }; } fi - LIBXFCEGUI4_REQUIRED_VERSION=4.1.20 + LIBXFCEGUI4_REQUIRED_VERSION=4.1.24 @@ -24854,8 +24856,35 @@ echo "${ECHO_T}yes" >&6 fi +# Check whether --with-shutdown-style or --without-shutdown-style was given. +if test "${with_shutdown_style+set}" = set; then + withval="$with_shutdown_style" + with_shutdown=$withval +else + with_shutdown=auto +fi; +echo "$as_me:$LINENO: checking what shutdown style should be used" >&5 +echo $ECHO_N "checking what shutdown style should be used... $ECHO_C" >&6 +if test x"$with_shutdown" != x"redhat" -a x"$with_shutdown" != x"sudo" -a x"$with_shutdown" != x"none"; then + if test -d "/var/lock/console" -o -d "/var/run/console"; then + with_shutdown="redhat" + elif test x"$SUDO" != x""; then + with_shutdown="sudo" + else + with_shutdown="none" + fi +fi + +cat >>confdefs.h <<_ACEOF +#define XFSM_SHUTDOWN_HELPER_IMPL_C <xfce4-session/xfsm-shutdown-helper-$with_shutdown.c> +_ACEOF + +echo "$as_me:$LINENO: result: $with_shutdown" >&5 +echo "${ECHO_T}$with_shutdown" >&6 + + - ac_config_files="$ac_config_files Makefile xfce4-session.spec defaults/Makefile docs/Makefile engines/Makefile engines/balou/Makefile engines/balou/scripts/Makefile engines/balou/themes/Makefile engines/balou/themes/Default/Makefile engines/mice/Makefile engines/simple/Makefile icons/Makefile icons/48x48/Makefile icons/64x64/Makefile icons/72x72/Makefile icons/128x128/Makefile po/Makefile.in settings/Makefile settings/session/Makefile settings/splash/Makefile xfce4-session/Makefile xfce4-session/xfce4-session-1.0.pc xfsm-shutdown-helper/Makefile" + ac_config_files="$ac_config_files Makefile xfce4-session.spec docs/Makefile engines/Makefile engines/balou/Makefile engines/balou/scripts/Makefile engines/balou/themes/Makefile engines/balou/themes/Default/Makefile engines/mice/Makefile engines/simple/Makefile icons/Makefile icons/48x48/Makefile icons/64x64/Makefile icons/72x72/Makefile icons/128x128/Makefile po/Makefile.in settings/Makefile settings/session/Makefile settings/splash/Makefile xfce4-session/Makefile xfce4-session/xfce4-session-1.0.pc xfsm-shutdown-helper/Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure @@ -25429,7 +25458,6 @@ do # Handling of arguments. "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; "xfce4-session.spec" ) CONFIG_FILES="$CONFIG_FILES xfce4-session.spec" ;; - "defaults/Makefile" ) CONFIG_FILES="$CONFIG_FILES defaults/Makefile" ;; "docs/Makefile" ) CONFIG_FILES="$CONFIG_FILES docs/Makefile" ;; "engines/Makefile" ) CONFIG_FILES="$CONFIG_FILES engines/Makefile" ;; "engines/balou/Makefile" ) CONFIG_FILES="$CONFIG_FILES engines/balou/Makefile" ;; diff --git a/configure.ac b/configure.ac index de4ad4b9..cc57ba61 100644 --- a/configure.ac +++ b/configure.ac @@ -63,7 +63,7 @@ BM_I18N([xfce4-session], [ar az ca de es es_MX eu fa_IR fr hi it ja ko lt dnl Check for required packages BM_DEPEND([LIBXFCE4UTIL], [libxfce4util-1.0], [4.1.11]) BM_DEPEND([LIBXFCE4MCS_CLIENT], [libxfce4mcs-client-1.0], [4.1.0]) -BM_DEPEND([LIBXFCEGUI4], [libxfcegui4-1.0], [4.1.20]) +BM_DEPEND([LIBXFCEGUI4], [libxfcegui4-1.0], [4.1.24]) dnl Configure the MCS plugins XFCE_MCS_PLUGIN([XFCE_MCS_MANAGER], [4.1.0]) @@ -120,6 +120,25 @@ else AC_MSG_RESULT([yes]) fi +dnl Check for shutdown method +AC_ARG_WITH([shutdown-style], +AC_HELP_STRING([--with-shutdown-style=auto/none/redhat/sudo], [Shutdown style]), + [with_shutdown=$withval], [with_shutdown=auto]) +AC_MSG_CHECKING([what shutdown style should be used]) +if test x"$with_shutdown" != x"redhat" -a x"$with_shutdown" != x"sudo" -a x"$with_shutdown" != x"none"; then + if test -d "/var/lock/console" -o -d "/var/run/console"; then + with_shutdown="redhat" + elif test x"$SUDO" != x""; then + with_shutdown="sudo" + else + with_shutdown="none" + fi +fi +AC_DEFINE_UNQUOTED([XFSM_SHUTDOWN_HELPER_IMPL_C], + [<xfce4-session/xfsm-shutdown-helper-$with_shutdown.c>], + [Shutdown helper implementation]) +AC_MSG_RESULT([$with_shutdown]) + dnl dnl arguments to set shutdown commands dnl @@ -157,7 +176,6 @@ dnl AC_MSG_RESULT([$with_reboot]) AC_OUTPUT([ Makefile xfce4-session.spec -defaults/Makefile docs/Makefile engines/Makefile engines/balou/Makefile diff --git a/defaults/Makefile.am b/defaults/Makefile.am deleted file mode 100644 index 95de9185..00000000 --- a/defaults/Makefile.am +++ /dev/null @@ -1,6 +0,0 @@ -conffilesdir = $(sysconfdir)/xfce4 -conffiles_DATA = \ - xinitrc.xfce4-session - -EXTRA_DIST = \ - $(conffiles_DATA) diff --git a/defaults/Makefile.in b/defaults/Makefile.in deleted file mode 100644 index 5166ca1b..00000000 --- a/defaults/Makefile.in +++ /dev/null @@ -1,389 +0,0 @@ -# Makefile.in generated by automake 1.8.3 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = .. -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -host_triplet = @host@ -subdir = defaults -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/X11.m4 \ - $(top_srcdir)/m4/debug.m4 $(top_srcdir)/m4/depends.m4 \ - $(top_srcdir)/m4/i18n.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = -SOURCES = -DIST_SOURCES = -am__installdirs = "$(DESTDIR)$(conffilesdir)" -conffilesDATA_INSTALL = $(INSTALL_DATA) -DATA = $(conffiles_DATA) -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CATALOGS = @CATALOGS@ -CATOBJEXT = @CATOBJEXT@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DATADIRNAME = @DATADIRNAME@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -ECHO = @ECHO@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ -GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ -GMOFILES = @GMOFILES@ -GMSGFMT = @GMSGFMT@ -GNOME_CFLAGS = @GNOME_CFLAGS@ -GNOME_LIBS = @GNOME_LIBS@ -GNOME_REQUIRED_VERSION = @GNOME_REQUIRED_VERSION@ -ICEAUTH = @ICEAUTH@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTOBJEXT = @INSTOBJEXT@ -INTLLIBS = @INTLLIBS@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBSM_CFLAGS = @LIBSM_CFLAGS@ -LIBSM_LDFLAGS = @LIBSM_LDFLAGS@ -LIBSM_LIBS = @LIBSM_LIBS@ -LIBTOOL = @LIBTOOL@ -LIBX11_CFLAGS = @LIBX11_CFLAGS@ -LIBX11_LDFLAGS = @LIBX11_LDFLAGS@ -LIBX11_LIBS = @LIBX11_LIBS@ -LIBXFCE4MCS_CLIENT_CFLAGS = @LIBXFCE4MCS_CLIENT_CFLAGS@ -LIBXFCE4MCS_CLIENT_LIBS = @LIBXFCE4MCS_CLIENT_LIBS@ -LIBXFCE4MCS_CLIENT_REQUIRED_VERSION = @LIBXFCE4MCS_CLIENT_REQUIRED_VERSION@ -LIBXFCE4UTIL_CFLAGS = @LIBXFCE4UTIL_CFLAGS@ -LIBXFCE4UTIL_LIBS = @LIBXFCE4UTIL_LIBS@ -LIBXFCE4UTIL_REQUIRED_VERSION = @LIBXFCE4UTIL_REQUIRED_VERSION@ -LIBXFCEGUI4_CFLAGS = @LIBXFCEGUI4_CFLAGS@ -LIBXFCEGUI4_LIBS = @LIBXFCEGUI4_LIBS@ -LIBXFCEGUI4_REQUIRED_VERSION = @LIBXFCEGUI4_REQUIRED_VERSION@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAINT = @MAINT@ -MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ -MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ -MAKEINFO = @MAKEINFO@ -MKINSTALLDIRS = @MKINSTALLDIRS@ -MSGFMT = @MSGFMT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ -POFILES = @POFILES@ -POSUB = @POSUB@ -PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ -PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ -RANLIB = @RANLIB@ -RM = @RM@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -SUDO = @SUDO@ -USE_NLS = @USE_NLS@ -VERSION = @VERSION@ -XFCE_MCS_MANAGER_CFLAGS = @XFCE_MCS_MANAGER_CFLAGS@ -XFCE_MCS_MANAGER_LIBS = @XFCE_MCS_MANAGER_LIBS@ -XFCE_MCS_MANAGER_PLUGINSDIR = @XFCE_MCS_MANAGER_PLUGINSDIR@ -XFCE_MCS_MANAGER_REQUIRED_VERSION = @XFCE_MCS_MANAGER_REQUIRED_VERSION@ -XGETTEXT = @XGETTEXT@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ -ac_ct_RANLIB = @ac_ct_RANLIB@ -ac_ct_STRIP = @ac_ct_STRIP@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ -am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ -am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -datadir = @datadir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -conffilesdir = $(sysconfdir)/xfce4 -conffiles_DATA = \ - xinitrc.xfce4-session - -EXTRA_DIST = \ - $(conffiles_DATA) - -all: all-am - -.SUFFIXES: -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign defaults/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign defaults/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -distclean-libtool: - -rm -f libtool -uninstall-info-am: -install-conffilesDATA: $(conffiles_DATA) - @$(NORMAL_INSTALL) - test -z "$(conffilesdir)" || $(mkdir_p) "$(DESTDIR)$(conffilesdir)" - @list='$(conffiles_DATA)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f="`echo $$p | sed -e 's|^.*/||'`"; \ - echo " $(conffilesDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(conffilesdir)/$$f'"; \ - $(conffilesDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(conffilesdir)/$$f"; \ - done - -uninstall-conffilesDATA: - @$(NORMAL_UNINSTALL) - @list='$(conffiles_DATA)'; for p in $$list; do \ - f="`echo $$p | sed -e 's|^.*/||'`"; \ - echo " rm -f '$(DESTDIR)$(conffilesdir)/$$f'"; \ - rm -f "$(DESTDIR)$(conffilesdir)/$$f"; \ - done -tags: TAGS -TAGS: - -ctags: CTAGS -CTAGS: - - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ - if test -d $$d/$$file; then \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(DATA) -installdirs: - for dir in "$(DESTDIR)$(conffilesdir)"; do \ - test -z "$$dir" || $(mkdir_p) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-libtool - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: install-conffilesDATA - -install-exec-am: - -install-info: install-info-am - -install-man: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-conffilesDATA uninstall-info-am - -.PHONY: all all-am check check-am clean clean-generic clean-libtool \ - distclean distclean-generic distclean-libtool distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-conffilesDATA install-data install-data-am \ - install-exec install-exec-am install-info install-info-am \ - install-man install-strip installcheck installcheck-am \ - installdirs maintainer-clean maintainer-clean-generic \ - mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ - ps ps-am uninstall uninstall-am uninstall-conffilesDATA \ - uninstall-info-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/defaults/xinitrc.xfce4-session b/defaults/xinitrc.xfce4-session deleted file mode 100755 index 79875179..00000000 --- a/defaults/xinitrc.xfce4-session +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/sh - -xsetroot -solid black -cursor_name watch - -# Those are my settings, change them as appropriate... -# Xft DPI: 96 -# Xft.hintstyle: hintnone/hintslight/hintmedium/hintfull -# Xft hinting: 1/0 - -xrdb -merge - << EOF -Xft.dpi: 96 -Xft.hinting: 1 -Xft.hintstyle: hintmedium -EOF - -# Launch xscreensaver (if available), but only as non-root user -test $UID -gt 0 && xscreensaver -no-splash & - -if test -f $HOME/.Xmodmap; then - xmodmap $HOME/.Xmodmap -fi - -# launch the session manager -xfce4-session - -xsetroot -solid black -cursor_name watch diff --git a/engines/.cvsignore b/engines/.cvsignore new file mode 100644 index 00000000..f3c7a7c5 --- /dev/null +++ b/engines/.cvsignore @@ -0,0 +1 @@ +Makefile diff --git a/engines/balou/.cvsignore b/engines/balou/.cvsignore new file mode 100644 index 00000000..fb21864a --- /dev/null +++ b/engines/balou/.cvsignore @@ -0,0 +1,9 @@ +.deps +.libs +Makefile +libbalou.la +libbalou_la-balou-theme.lo +libbalou_la-balou.lo +libbalou_la-config.lo +libbalou_la-engine.lo +libbalou_la-gnome-uri.lo diff --git a/engines/balou/scripts/.cvsignore b/engines/balou/scripts/.cvsignore new file mode 100644 index 00000000..f3c7a7c5 --- /dev/null +++ b/engines/balou/scripts/.cvsignore @@ -0,0 +1 @@ +Makefile diff --git a/engines/balou/themes/.cvsignore b/engines/balou/themes/.cvsignore new file mode 100644 index 00000000..f3c7a7c5 --- /dev/null +++ b/engines/balou/themes/.cvsignore @@ -0,0 +1 @@ +Makefile diff --git a/engines/balou/themes/Default/.cvsignore b/engines/balou/themes/Default/.cvsignore new file mode 100644 index 00000000..f3c7a7c5 --- /dev/null +++ b/engines/balou/themes/Default/.cvsignore @@ -0,0 +1 @@ +Makefile diff --git a/engines/mice/.cvsignore b/engines/mice/.cvsignore new file mode 100644 index 00000000..5a52270c --- /dev/null +++ b/engines/mice/.cvsignore @@ -0,0 +1,6 @@ +.deps +.libs +Makefile +generate +libmice.la +libmice_la-mice.lo diff --git a/engines/simple/.cvsignore b/engines/simple/.cvsignore new file mode 100644 index 00000000..2c9b25b9 --- /dev/null +++ b/engines/simple/.cvsignore @@ -0,0 +1,5 @@ +.deps +.libs +Makefile +libsimple.la +libsimple_la-simple.lo diff --git a/engines/simple/simple.c b/engines/simple/simple.c index f5453304..704f9a36 100644 --- a/engines/simple/simple.c +++ b/engines/simple/simple.c @@ -296,7 +296,6 @@ engine_init (XfsmSplashEngine *engine) -#if GTK_CHECK_VERSION(2,4,0) /* FIXME: 2.4.x only because of missing GtkColorButton! Add XfceColorButton to libxfcegui4? */ static void @@ -395,7 +394,7 @@ config_configure (XfsmSplashConfig *config, gdk_color_parse (xfsm_splash_rc_read_entry (config->rc, "BgColor", DEFAULT_BGCOLOR), &color); - sel_bg = gtk_color_button_new_with_color (&color); + sel_bg = xfce_color_button_new_with_color (&color); gtk_table_attach (GTK_TABLE (table), sel_bg, 1, 2, 0, 1, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0); gtk_widget_show (sel_bg); @@ -407,7 +406,7 @@ config_configure (XfsmSplashConfig *config, gdk_color_parse (xfsm_splash_rc_read_entry (config->rc, "FgColor", DEFAULT_FGCOLOR), &color); - sel_fg = gtk_color_button_new_with_color (&color); + sel_fg = xfce_color_button_new_with_color (&color); gtk_table_attach (GTK_TABLE (table), sel_fg, 1, 2, 1, 2, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0); gtk_widget_show (sel_fg); @@ -466,14 +465,14 @@ config_configure (XfsmSplashConfig *config, font = gtk_font_button_get_font_name (GTK_FONT_BUTTON (btn_font)); xfsm_splash_rc_write_entry (config->rc, "Font", font); - gtk_color_button_get_color (GTK_COLOR_BUTTON (sel_bg), &color); + xfce_color_button_get_color (XFCE_COLOR_BUTTON (sel_bg), &color); g_snprintf (buffer, 32, "#%02x%02x%02x", (unsigned) color.red >> 8, (unsigned) color.green >> 8, (unsigned) color.blue >> 8); xfsm_splash_rc_write_entry (config->rc, "BgColor", buffer); - gtk_color_button_get_color (GTK_COLOR_BUTTON (sel_fg), &color); + xfce_color_button_get_color (XFCE_COLOR_BUTTON (sel_fg), &color); g_snprintf (buffer, 32, "#%02x%02x%02x", (unsigned) color.red >> 8, (unsigned) color.green >> 8, @@ -493,7 +492,6 @@ config_configure (XfsmSplashConfig *config, gtk_widget_destroy (dialog); } -#endif static GdkPixbuf* @@ -512,9 +510,7 @@ config_init (XfsmSplashConfig *config) config->author = g_strdup ("Benedikt Meurer"); config->homepage = g_strdup ("http://www.xfce.org/"); -#if GTK_CHECK_VERSION(2,4,0) config->configure = config_configure; -#endif config->preview = config_preview; } diff --git a/icons/.cvsignore b/icons/.cvsignore new file mode 100644 index 00000000..f3c7a7c5 --- /dev/null +++ b/icons/.cvsignore @@ -0,0 +1 @@ +Makefile diff --git a/icons/128x128/.cvsignore b/icons/128x128/.cvsignore new file mode 100644 index 00000000..f3c7a7c5 --- /dev/null +++ b/icons/128x128/.cvsignore @@ -0,0 +1 @@ +Makefile diff --git a/icons/48x48/.cvsignore b/icons/48x48/.cvsignore new file mode 100644 index 00000000..f3c7a7c5 --- /dev/null +++ b/icons/48x48/.cvsignore @@ -0,0 +1 @@ +Makefile diff --git a/icons/64x64/.cvsignore b/icons/64x64/.cvsignore new file mode 100644 index 00000000..f3c7a7c5 --- /dev/null +++ b/icons/64x64/.cvsignore @@ -0,0 +1 @@ +Makefile diff --git a/icons/72x72/.cvsignore b/icons/72x72/.cvsignore new file mode 100644 index 00000000..f3c7a7c5 --- /dev/null +++ b/icons/72x72/.cvsignore @@ -0,0 +1 @@ +Makefile diff --git a/settings/.cvsignore b/settings/.cvsignore index 99dc2d18..2d38332e 100644 --- a/settings/.cvsignore +++ b/settings/.cvsignore @@ -1,5 +1,3 @@ .deps .libs Makefile -session_settings.la -session_settings_la-session.lo diff --git a/settings/scripts/.cvsignore b/settings/scripts/.cvsignore new file mode 100644 index 00000000..f3c7a7c5 --- /dev/null +++ b/settings/scripts/.cvsignore @@ -0,0 +1 @@ +Makefile diff --git a/settings/session/.cvsignore b/settings/session/.cvsignore new file mode 100644 index 00000000..99dc2d18 --- /dev/null +++ b/settings/session/.cvsignore @@ -0,0 +1,5 @@ +.deps +.libs +Makefile +session_settings.la +session_settings_la-session.lo diff --git a/settings/splash/.cvsignore b/settings/splash/.cvsignore new file mode 100644 index 00000000..ba6c36ae --- /dev/null +++ b/settings/splash/.cvsignore @@ -0,0 +1,6 @@ +.deps +.libs +Makefile +splash_settings.la +splash_settings_la-module.lo +splash_settings_la-splash.lo diff --git a/xfce4-session/.cvsignore b/xfce4-session/.cvsignore index a77057be..001376ab 100644 --- a/xfce4-session/.cvsignore +++ b/xfce4-session/.cvsignore @@ -1,4 +1,8 @@ .deps .libs Makefile +libxfsm.la +libxfsm_la-xfsm-splash-rc.lo +libxfsm_la-xfsm-util.lo xfce4-session +xfce4-session-1.0.pc diff --git a/xfce4-session/Makefile.am b/xfce4-session/Makefile.am index bb3bb44d..1b7fd97e 100644 --- a/xfce4-session/Makefile.am +++ b/xfce4-session/Makefile.am @@ -14,6 +14,7 @@ libxfsm_la_CFLAGS = \ man_MANS = xfce4-session.1 + bin_PROGRAMS = xfce4-session xfce4_session_SOURCES = \ @@ -93,4 +94,8 @@ chooser-icon.h: $(srcdir)/chooser-icon.png EXTRA_DIST = \ $(man_MANS) \ - chooser-icon.png + chooser-icon.png \ + xfsm-shutdown-helper-none.c \ + xfsm-shutdown-helper-redhat.c \ + xfsm-shutdown-helper-sudo.c + diff --git a/xfce4-session/Makefile.in b/xfce4-session/Makefile.in index 110ba457..1966048d 100644 --- a/xfce4-session/Makefile.in +++ b/xfce4-session/Makefile.in @@ -350,7 +350,10 @@ pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = xfce4-session-1.0.pc EXTRA_DIST = \ $(man_MANS) \ - chooser-icon.png + chooser-icon.png \ + xfsm-shutdown-helper-none.c \ + xfsm-shutdown-helper-redhat.c \ + xfsm-shutdown-helper-sudo.c all: all-am diff --git a/xfce4-session/xfsm-shutdown-helper-none.c b/xfce4-session/xfsm-shutdown-helper-none.c new file mode 100644 index 00000000..1abbade2 --- /dev/null +++ b/xfce4-session/xfsm-shutdown-helper-none.c @@ -0,0 +1,71 @@ +/* $Id$ */ +/*- + * Copyright (c) 2003-2004 Benedikt Meurer <benny@xfce.org> + * All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA + * 02111-1307, USA. + */ + +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + + +#include <xfce4-session/xfsm-shutdown-helper.h> + + +struct _XfmShutdownHelper +{ + gint dummy; +}; + + +XfsmShutdownHelper* +xfsm_shutdown_helper_spawn (void) +{ + return NULL; +} + + +gboolean +xfsm_shutdown_helper_need_password (const XfsmShutdownHelper *helper) +{ + return FALSE; +} + + +gboolean +xfsm_shutdown_helper_send_password (XfsmShutdownHelper *helper, + const gchar *password) +{ + return TRUE; +} + + +gboolean +xfsm_shutdown_helper_send_command (XfsmShutdownHelper *helper, + XfsmShutdownCommand command) +{ + return FALSE; +} + + +void +xfsm_shutdown_helper_destroy (XfsmShutdownHelper *helper) +{ +} + + diff --git a/xfce4-session/xfsm-shutdown-helper-redhat.c b/xfce4-session/xfsm-shutdown-helper-redhat.c new file mode 100644 index 00000000..7e833d47 --- /dev/null +++ b/xfce4-session/xfsm-shutdown-helper-redhat.c @@ -0,0 +1,186 @@ +/* $Id$ */ +/*- + * Copyright (c) 2003-2004 Benedikt Meurer <benny@xfce.org> + * All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA + * 02111-1307, USA. + * + * The permission check was taken from gnome-session/logout.c, originally + * written by Owen Taylor <otaylor@redhat.com>. + */ + +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + +#ifdef HAVE_SYS_TYPES_H +#include <sys/types.h> +#endif +#ifdef HAVE_SYS_WAIT_H +#include <sys/wait.h> +#endif +#ifdef HAVE_SYS_TIME_H +#include <sys/time.h> +#endif +#ifdef HAVE_SYS_RESOURCE_H +#include <sys/resource.h> +#endif + +#ifdef HAVE_ERRNO_H +#include <errno.h> +#endif +#ifdef HAVE_FCNTL_H +#include <fcntl.h> +#endif +#ifdef HAVE_SIGNAL_H +#include <signal.h> +#endif +#ifdef HAVE_STDLIB_H +#include <stdlib.h> +#endif +#ifdef HAVE_UNISTD_H +#include <unistd.h> +#endif + +#include <xfce4-session/xfsm-shutdown-helper.h> + + +struct _XfsmShutdownHelper +{ + gint dummy; +}; + + +static char *halt_command[] = { "/usr/bin/halt", "halt", NULL }; +static char *reboot_command[] = { "/usr/bin/reboot", "reboot", NULL }; + + +XfsmShutdownHelper* +xfsm_shutdown_helper_spawn (void) +{ + XfsmShutdownHelper *helper = NULL; + gchar *s; + gchar *t; + + s = g_build_filename ("/var/lock/console", g_get_user_name (), NULL); + t = g_build_filename ("/var/run/console", g_get_user_name (), NULL); + + if (((geteuid () == 0) + || g_file_test (s, G_FILE_TEST_EXISTS) + || g_file_test (t, G_FILE_TEST_EXISTS)) + && access (halt_command[0], X_OK) == 0) + { + helper = g_new0 (XfsmShutdownHelper, 1); + } + + g_free (s); + g_free (t); + + return helper; +} + + +gboolean +xfsm_shutdown_helper_need_password (const XfsmShutdownHelper *helper) +{ + return FALSE; +} + + +gboolean +xfsm_shutdown_helper_send_password (XfsmShutdownHelper *helper, + const gchar *password) +{ + return TRUE; +} + + +gboolean +xfsm_shutdown_helper_send_command (XfsmShutdownHelper *helper, + XfsmShutdownCommand command) +{ +#ifdef HAVE_SIGPROCMASK + sigset_t sigset; +#endif + struct rlimit rlp; + int result; + int status; + int fd; + char **argv; + pid_t pid; + + if (command == XFSM_SHUTDOWN_POWEROFF) + argv = halt_command; + else + argv = reboot_command; + + pid = fork (); + if (pid < 0) + { + return FALSE; + } + else if (pid == 0) + { +#ifdef HAVE_SETSID + setsid (); +#endif + +#ifdef HAVE_SIGPROCMASK + sigemptyset (&sigset); + sigaddset (&sigset, SIGHUP); + sigaddset (&sigset, SIGINT); + sigaddset (&sigset, SIGPIPE); + sigprocmask (SIG_BLOCK, &sigset, NULL); +#endif + + /* setup the 3 standard file handles */ + fd = open ("/dev/null", O_RDWR, 0); + if (fd >= 0) + { + dup2 (fd, STDIN_FILENO); + dup2 (fd, STDOUT_FILENO); + dup2 (fd, STDERR_FILENO); + close (fd); + } + + /* Close all other file handles */ + getrlimit (RLIMIT_NOFILE, &rlp); + for (fd = 0; fd < (int) rlp.rlim_cur; ++fd) + { + if (fd != STDIN_FILENO && fd != STDOUT_FILENO && fd != STDERR_FILENO) + close (fd); + } + + execv (argv[0], argv); + _exit (127); + } + + /* check if the shutdown command failed */ + result = waitpid (pid, &status, 0); + if ((result == pid && status != 0) || (result < 0 && errno == ECHILD)) + return FALSE; + + return TRUE; +} + + +void +xfsm_shutdown_helper_destroy (XfsmShutdownHelper *helper) +{ + g_free (helper); +} + + diff --git a/xfce4-session/xfsm-shutdown-helper-sudo.c b/xfce4-session/xfsm-shutdown-helper-sudo.c new file mode 100644 index 00000000..89fbf463 --- /dev/null +++ b/xfce4-session/xfsm-shutdown-helper-sudo.c @@ -0,0 +1,310 @@ +/* $Id$ */ +/*- + * Copyright (c) 2003-2004 Benedikt Meurer <benny@xfce.org> + * All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA + * 02111-1307, USA. + */ + +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + +#ifdef HAVE_SYS_TYPES_H +#include <sys/types.h> +#endif +#ifdef HAVE_SYS_TIME_H +#include <sys/time.h> +#endif +#ifdef HAVE_SYS_RESOURCE_H +#include <sys/resource.h> +#endif + +#ifdef HAVE_MEMORY_H +#include <memory.h> +#endif +#include <stdio.h> +#ifdef HAVE_STDLIB_H +#include <stdlib.h> +#endif +#ifdef HAVE_SIGNAL_H +#include <signal.h> +#endif +#ifdef HAVE_STRING_H +#include <string.h> +#endif +#ifdef HAVE_UNISTD_H +#include <unistd.h> +#endif + +#include <libxfce4util/libxfce4util.h> + +#include <xfce4-session/xfsm-shutdown-helper.h> + + +struct _XfsmShutdownHelper +{ + FILE *infile; + FILE *outfile; + gboolean need_password; +}; + + +XfsmShutdownHelper* +xfsm_shutdown_helper_spawn (void) +{ +#if defined(SUDO_CMD) + XfsmShutdownHelper *helper; + int parent_pipe[2]; + int child_pipe[2]; + struct rlimit rlp; + char buf[15]; + int result; + pid_t pid; + int n; + + helper = g_new0 (XfsmShutdownHelper, 1); + + result = pipe (parent_pipe); + if (result < 0) + goto error0; + + result = pipe (child_pipe); + if (result < 0) + goto error1; + + pid = fork (); + if (pid < 0) + { + goto error2; + } + else if (pid == 0) + { + /* setup signals */ + signal (SIGPIPE, SIG_IGN); + + /* setup environment */ + xfce_setenv ("LC_ALL", "C", TRUE); + xfce_setenv ("LANG", "C", TRUE); + xfce_setenv ("LANGUAGE", "C", TRUE); + + /* setup the 3 standard file handles */ + dup2 (child_pipe[0], STDIN_FILENO); + dup2 (parent_pipe[1], STDOUT_FILENO); + dup2 (parent_pipe[1], STDERR_FILENO); + + /* Close all other file handles */ + getrlimit (RLIMIT_NOFILE, &rlp); + for (n = 0; n < (int) rlp.rlim_cur; ++n) + { + if (n != STDIN_FILENO && n != STDOUT_FILENO && n != STDERR_FILENO) + close (n); + } + + /* execute sudo with the helper */ + execl (SUDO_CMD, "sudo", "-H", "-S", "-p", + "XFSM_SUDO_PASS ", "--", XFSM_SHUTDOWN_HELPER, NULL); + _exit (127); + } + + close (parent_pipe[1]); + + /* read sudo/helper answer */ + n = read (parent_pipe[0], buf, 15); + if (n < 15) + goto error2; + + helper->infile = fdopen (parent_pipe[0], "r"); + if (helper->infile == NULL) + goto error2; + + helper->outfile = fdopen (child_pipe[1], "w"); + if (helper->outfile == NULL) + goto error3; + + if (memcmp (buf, "XFSM_SUDO_PASS ", 15) == 0) + { + helper->need_password = TRUE; + } + else if (memcmp (buf, "XFSM_SUDO_DONE ", 15) == 0) + { + helper->need_password = FALSE; + } + else + goto error3; + + close (parent_pipe[1]); + close (child_pipe[0]); + + return helper; + +error3: + if (helper->infile != NULL) + fclose (helper->infile); + if (helper->outfile != NULL) + fclose (helper->outfile); + +error2: + close (child_pipe[0]); + close (child_pipe[1]); + +error1: + close (parent_pipe[0]); + close (parent_pipe[1]); + +error0: + g_free (helper); + return NULL; +#else + /* won't work without sudo */ + return NULL; +#endif +} + + +gboolean +xfsm_shutdown_helper_need_password (const XfsmShutdownHelper *helper) +{ + return helper->need_password; +} + + +gboolean +xfsm_shutdown_helper_send_password (XfsmShutdownHelper *helper, + const gchar *password) +{ + char buffer[1024]; + ssize_t result; + size_t failed; + size_t length; + size_t bytes; + int fd; + + g_return_val_if_fail (helper != NULL, FALSE); + g_return_val_if_fail (password != NULL, FALSE); + g_return_val_if_fail (helper->need_password, FALSE); + + g_snprintf (buffer, 1024, "%s\n", password); + length = strlen (buffer); + bytes = fwrite (buffer, 1, length, helper->outfile); + fflush (helper->outfile); + bzero (buffer, length); + + if (bytes != length) + { + fprintf (stderr, "Failed to write password (bytes=%u, length=%u)\n", + bytes, length); + return FALSE; + } + + if (ferror (helper->outfile)) + { + fprintf (stderr, "Pipe error\n"); + return FALSE; + } + + fd = fileno (helper->infile); + + for (failed = length = 0;;) + { + result = read (fd, buffer + length, 256 - length); + + if (result < 0) + { + perror ("read"); + return FALSE; + } + else if (result == 0) + { + if (++failed > 20) + return FALSE; + continue; + } + else if (result + length >= 1024) + { + fprintf (stderr, "Too much output from sudo!\n"); + return FALSE; + } + + length += result; + buffer[length] = 0; + + if (length >= 15) + { + if (strncmp (buffer + (length - 15), "XFSM_SUDO_PASS ", 15) == 0) + { + return FALSE; + } + else if (strncmp (buffer + (length - 15), "XFSM_SUDO_DONE ", 15) == 0) + { + helper->need_password = FALSE; + break; + } + } + } + + return TRUE; +} + + +gboolean +xfsm_shutdown_helper_send_command (XfsmShutdownHelper *helper, + XfsmShutdownCommand command) +{ + static char *command_table[] = { "POWEROFF", "REBOOT" }; + char response[256]; + + g_return_val_if_fail (helper != NULL, FALSE); + g_return_val_if_fail (!helper->need_password, FALSE); + + fprintf (helper->outfile, "%s\n", command_table[command]); + fflush (helper->outfile); + + if (ferror (helper->outfile)) + { + fprintf (stderr, "Error sending command to helper\n"); + return FALSE; + } + + if (fgets (response, 256, helper->infile) == NULL) + { + fprintf (stderr, "No response from helper\n"); + return FALSE; + } + + if (strncmp (response, "SUCCEED", 7) != 0) + { + fprintf (stderr, "Command failed\n"); + return FALSE; + } + + return TRUE; +} + + +void +xfsm_shutdown_helper_destroy (XfsmShutdownHelper *helper) +{ + g_return_if_fail (helper != NULL); + + if (helper->infile != NULL) + fclose (helper->infile); + if (helper->outfile != NULL) + fclose (helper->outfile); + g_free (helper); +} + + diff --git a/xfce4-session/xfsm-shutdown-helper.c b/xfce4-session/xfsm-shutdown-helper.c index 9b9d2446..1af9124f 100644 --- a/xfce4-session/xfsm-shutdown-helper.c +++ b/xfce4-session/xfsm-shutdown-helper.c @@ -17,294 +17,15 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA * 02111-1307, USA. + * + * The permission check was taken from gnome-session/logout.c, originally + * written by Owen Taylor <otaylor@redhat.com>. */ #ifdef HAVE_CONFIG_H #include <config.h> #endif -#ifdef HAVE_SYS_TYPES_H -#include <sys/types.h> -#endif -#ifdef HAVE_SYS_TIME_H -#include <sys/time.h> -#endif -#ifdef HAVE_SYS_RESOURCE_H -#include <sys/resource.h> -#endif - -#ifdef HAVE_MEMORY_H -#include <memory.h> -#endif -#include <stdio.h> -#ifdef HAVE_STDLIB_H -#include <stdlib.h> -#endif -#ifdef HAVE_SIGNAL_H -#include <signal.h> -#endif -#ifdef HAVE_STRING_H -#include <string.h> -#endif -#ifdef HAVE_UNISTD_H -#include <unistd.h> -#endif - -#include <libxfce4util/libxfce4util.h> - -#include <xfce4-session/xfsm-shutdown-helper.h> - - -struct _XfsmShutdownHelper -{ - FILE *infile; - FILE *outfile; - gboolean need_password; -}; - - -XfsmShutdownHelper* -xfsm_shutdown_helper_spawn (void) -{ -#if defined(SUDO_CMD) - XfsmShutdownHelper *helper; - int parent_pipe[2]; - int child_pipe[2]; - struct rlimit rlp; - char buf[15]; - int result; - pid_t pid; - int n; - - helper = g_new0 (XfsmShutdownHelper, 1); - - result = pipe (parent_pipe); - if (result < 0) - goto error0; - - result = pipe (child_pipe); - if (result < 0) - goto error1; - - pid = fork (); - if (pid < 0) - { - goto error2; - } - else if (pid == 0) - { - /* setup signals */ - signal (SIGPIPE, SIG_DFL); - - /* setup environment */ - xfce_setenv ("LC_ALL", "C", TRUE); - xfce_setenv ("LANG", "C", TRUE); - xfce_setenv ("LANGUAGE", "C", TRUE); - - /* setup the 3 standard file handles */ - dup2 (child_pipe[0], STDIN_FILENO); - dup2 (parent_pipe[1], STDOUT_FILENO); - dup2 (parent_pipe[1], STDERR_FILENO); - - /* Close all other file handles */ - getrlimit (RLIMIT_NOFILE, &rlp); - for (n = 0; n < (int) rlp.rlim_cur; ++n) - { - if (n != STDIN_FILENO && n != STDOUT_FILENO && n != STDERR_FILENO) - close (n); - } - - /* execute sudo with the helper */ - execl (SUDO_CMD, "sudo", "-H", "-S", "-p", - "XFSM_SUDO_PASS ", "--", XFSM_SHUTDOWN_HELPER, NULL); - _exit (127); - } - - close (parent_pipe[1]); - - /* read sudo/helper answer */ - n = read (parent_pipe[0], buf, 15); - if (n < 15) - goto error2; - - helper->infile = fdopen (parent_pipe[0], "r"); - if (helper->infile == NULL) - goto error2; - - helper->outfile = fdopen (child_pipe[1], "w"); - if (helper->outfile == NULL) - goto error3; - - if (memcmp (buf, "XFSM_SUDO_PASS ", 15) == 0) - { - helper->need_password = TRUE; - } - else if (memcmp (buf, "XFSM_SUDO_DONE ", 15) == 0) - { - helper->need_password = FALSE; - } - else - goto error3; - - close (parent_pipe[1]); - close (child_pipe[0]); - - return helper; - -error3: - if (helper->infile != NULL) - fclose (helper->infile); - if (helper->outfile != NULL) - fclose (helper->outfile); - -error2: - close (child_pipe[0]); - close (child_pipe[1]); - -error1: - close (parent_pipe[0]); - close (parent_pipe[1]); - -error0: - g_free (helper); - return NULL; -#else - /* won't work without sudo */ - return NULL; -#endif -} - - -gboolean -xfsm_shutdown_helper_need_password (const XfsmShutdownHelper *helper) -{ - return helper->need_password; -} - - -gboolean -xfsm_shutdown_helper_send_password (XfsmShutdownHelper *helper, - const gchar *password) -{ - char buffer[1024]; - ssize_t result; - size_t failed; - size_t length; - size_t bytes; - int fd; - - g_return_val_if_fail (helper != NULL, FALSE); - g_return_val_if_fail (password != NULL, FALSE); - g_return_val_if_fail (helper->need_password, FALSE); - - g_snprintf (buffer, 1024, "%s\n", password); - length = strlen (buffer); - bytes = fwrite (buffer, 1, length, helper->outfile); - fflush (helper->outfile); - bzero (buffer, length); - - if (bytes != length) - { - fprintf (stderr, "Failed to write password (bytes=%u, length=%u)\n", - bytes, length); - return FALSE; - } - - if (ferror (helper->outfile)) - { - fprintf (stderr, "Pipe error\n"); - return FALSE; - } - - fd = fileno (helper->infile); - - for (failed = length = 0;;) - { - result = read (fd, buffer + length, 256 - length); - - if (result < 0) - { - perror ("read"); - return FALSE; - } - else if (result == 0) - { - if (++failed > 20) - return FALSE; - continue; - } - else if (result + length >= 1024) - { - fprintf (stderr, "Too much output from sudo!\n"); - return FALSE; - } - - length += result; - buffer[length] = 0; - - if (length >= 15) - { - if (strncmp (buffer + (length - 15), "XFSM_SUDO_PASS ", 15) == 0) - { - return FALSE; - } - else if (strncmp (buffer + (length - 15), "XFSM_SUDO_DONE ", 15) == 0) - { - helper->need_password = FALSE; - break; - } - } - } - - return TRUE; -} - - -gboolean -xfsm_shutdown_helper_send_command (XfsmShutdownHelper *helper, - XfsmShutdownCommand command) -{ - static char *command_table[] = { "POWEROFF", "REBOOT" }; - char response[256]; - - g_return_val_if_fail (helper != NULL, FALSE); - g_return_val_if_fail (!helper->need_password, FALSE); - - fprintf (helper->outfile, "%s\n", command_table[command]); - fflush (helper->outfile); - - if (ferror (helper->outfile)) - { - fprintf (stderr, "Error sending command to helper\n"); - return FALSE; - } - - if (fgets (response, 256, helper->infile) == NULL) - { - fprintf (stderr, "No response from helper\n"); - return FALSE; - } - - if (strncmp (response, "SUCCEED", 7) != 0) - { - fprintf (stderr, "Command failed\n"); - return FALSE; - } - - return TRUE; -} - - -void -xfsm_shutdown_helper_destroy (XfsmShutdownHelper *helper) -{ - g_return_if_fail (helper != NULL); - - if (helper->infile != NULL) - fclose (helper->infile); - if (helper->outfile != NULL) - fclose (helper->outfile); - g_free (helper); -} +#include XFSM_SHUTDOWN_HELPER_IMPL_C |