diff -Nru unity-greeter-0.2.8/Makefile.in unity-greeter-0.2.9/Makefile.in --- unity-greeter-0.2.8/Makefile.in 2012-04-18 07:20:30.000000000 +0000 +++ unity-greeter-0.2.9/Makefile.in 2012-11-21 02:24:58.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11.3 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -17,6 +17,23 @@ # -*- Mode: Automake; indent-tabs-mode: t; tab-width: 4 -*- VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -64,6 +81,11 @@ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ @@ -469,13 +491,10 @@ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ @@ -561,7 +580,7 @@ *.zip*) \ unzip $(distdir).zip ;;\ esac - chmod -R a-w $(distdir); chmod a+w $(distdir) + chmod -R a-w $(distdir); chmod u+w $(distdir) mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) diff -Nru unity-greeter-0.2.8/NEWS unity-greeter-0.2.9/NEWS --- unity-greeter-0.2.8/NEWS 2012-04-18 07:01:36.000000000 +0000 +++ unity-greeter-0.2.9/NEWS 2012-11-21 02:24:47.000000000 +0000 @@ -1,3 +1,19 @@ +Overview of changes in unity-greeter 0.2.9 + + * Backport better keyboard focus handling from upstream as new windows + appear and disappear. This fixes keyboard navigation in dialogs + * Don't write garbage data to state cache file + * Make sure background alpha is never stuck at non-1.0 value, blocking + login + * When the default session is changed in lightdm.conf, don't still show the + Ubuntu badge + * Recognize the "kde-plasma" session as "kde" so it gets a properly branded + icon in the greeter + * Try to run unity_support_test for ubuntu for pre-caching the result in + /tmp for further call while the user is typing his password + * Support multiple prompts from PAM + * Support timed login + Overview of changes in unity-greeter 0.2.8 * Add play-ready-sound option to control making a sound when the greeter diff -Nru unity-greeter-0.2.8/aclocal.m4 unity-greeter-0.2.9/aclocal.m4 --- unity-greeter-0.2.8/aclocal.m4 2012-04-18 07:20:29.000000000 +0000 +++ unity-greeter-0.2.9/aclocal.m4 2012-11-21 02:24:58.000000000 +0000 @@ -1,4 +1,4 @@ -# generated automatically by aclocal 1.11.3 -*- Autoconf -*- +# generated automatically by aclocal 1.11.6 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, @@ -14,8 +14,8 @@ m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],, -[m4_warning([this file was generated for autoconf 2.68. +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, +[m4_warning([this file was generated for autoconf 2.69. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically `autoreconf'.])]) @@ -672,7 +672,7 @@ [am__api_version='1.11' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.11.3], [], +m4_if([$1], [1.11.6], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -688,7 +688,7 @@ # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.11.3])dnl +[AM_AUTOMAKE_VERSION([1.11.6])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) diff -Nru unity-greeter-0.2.8/compile unity-greeter-0.2.9/compile --- unity-greeter-0.2.8/compile 2012-02-21 04:12:58.000000000 +0000 +++ unity-greeter-0.2.9/compile 2012-11-20 03:57:48.000000000 +0000 @@ -1,7 +1,7 @@ #! /bin/sh # Wrapper for compilers which do not understand '-c -o'. -scriptversion=2012-01-04.17; # UTC +scriptversion=2012-03-05.13; # UTC # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2009, 2010, 2012 Free # Software Foundation, Inc. @@ -79,6 +79,48 @@ esac } +# func_cl_dashL linkdir +# Make cl look for libraries in LINKDIR +func_cl_dashL () +{ + func_file_conv "$1" + if test -z "$lib_path"; then + lib_path=$file + else + lib_path="$lib_path;$file" + fi + linker_opts="$linker_opts -LIBPATH:$file" +} + +# func_cl_dashl library +# Do a library search-path lookup for cl +func_cl_dashl () +{ + lib=$1 + found=no + save_IFS=$IFS + IFS=';' + for dir in $lib_path $LIB + do + IFS=$save_IFS + if $shared && test -f "$dir/$lib.dll.lib"; then + found=yes + lib=$dir/$lib.dll.lib + break + fi + if test -f "$dir/$lib.lib"; then + found=yes + lib=$dir/$lib.lib + break + fi + done + IFS=$save_IFS + + if test "$found" != yes; then + lib=$lib.lib + fi +} + # func_cl_wrapper cl arg... # Adjust compile command to suit cl func_cl_wrapper () @@ -109,43 +151,34 @@ ;; esac ;; + -I) + eat=1 + func_file_conv "$2" mingw + set x "$@" -I"$file" + shift + ;; -I*) func_file_conv "${1#-I}" mingw set x "$@" -I"$file" shift ;; + -l) + eat=1 + func_cl_dashl "$2" + set x "$@" "$lib" + shift + ;; -l*) - lib=${1#-l} - found=no - save_IFS=$IFS - IFS=';' - for dir in $lib_path $LIB - do - IFS=$save_IFS - if $shared && test -f "$dir/$lib.dll.lib"; then - found=yes - set x "$@" "$dir/$lib.dll.lib" - break - fi - if test -f "$dir/$lib.lib"; then - found=yes - set x "$@" "$dir/$lib.lib" - break - fi - done - IFS=$save_IFS - - test "$found" != yes && set x "$@" "$lib.lib" + func_cl_dashl "${1#-l}" + set x "$@" "$lib" shift ;; + -L) + eat=1 + func_cl_dashL "$2" + ;; -L*) - func_file_conv "${1#-L}" - if test -z "$lib_path"; then - lib_path=$file - else - lib_path="$lib_path;$file" - fi - linker_opts="$linker_opts -LIBPATH:$file" + func_cl_dashL "${1#-L}" ;; -static) shared=false diff -Nru unity-greeter-0.2.8/configure unity-greeter-0.2.9/configure --- unity-greeter-0.2.8/configure 2012-04-18 07:20:31.000000000 +0000 +++ unity-greeter-0.2.9/configure 2012-11-21 02:24:58.000000000 +0000 @@ -1,11 +1,9 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for unity-greeter 0.2.8. +# Generated by GNU Autoconf 2.69 for unity-greeter 0.2.9. # # -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software -# Foundation, Inc. +# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation @@ -134,6 +132,31 @@ # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH +# Use a proper internal environment variable to ensure we don't fall + # into an infinite loop, continuously re-executing ourselves. + if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then + _as_can_reexec=no; export _as_can_reexec; + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +as_fn_exit 255 + fi + # We don't want this to propagate to other subprocesses. + { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh @@ -167,7 +190,8 @@ else exitcode=1; echo positional parameters were not saved. fi -test x\$exitcode = x0 || exit 1" +test x\$exitcode = x0 || exit 1 +test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && @@ -211,21 +235,25 @@ if test "x$CONFIG_SHELL" != x; then : - # We cannot yet assume a decent shell, so we have to provide a - # neutralization value for shells without unset; and this also - # works around shells that cannot unset nonexistent variables. - # Preserve -v and -x to the replacement shell. - BASH_ENV=/dev/null - ENV=/dev/null - (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV - export CONFIG_SHELL - case $- in # (((( - *v*x* | *x*v* ) as_opts=-vx ;; - *v* ) as_opts=-v ;; - *x* ) as_opts=-x ;; - * ) as_opts= ;; - esac - exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"} + export CONFIG_SHELL + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +exit 255 fi if test x$as_have_required = xno; then : @@ -327,6 +355,14 @@ } # as_fn_mkdir_p + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take @@ -448,6 +484,10 @@ chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + # If we had to re-execute with $CONFIG_SHELL, we're ensured to have + # already done that, so ensure we don't try to do so again and fall + # in an infinite loop. This has already happened in practice. + _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). @@ -482,16 +522,16 @@ # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. + # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' + as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null @@ -503,28 +543,8 @@ as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x +as_test_x='test -x' +as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -616,8 +636,8 @@ # Identity of this package. PACKAGE_NAME='unity-greeter' PACKAGE_TARNAME='unity-greeter' -PACKAGE_VERSION='0.2.8' -PACKAGE_STRING='unity-greeter 0.2.8' +PACKAGE_VERSION='0.2.9' +PACKAGE_STRING='unity-greeter 0.2.9' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1238,8 +1258,6 @@ if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe - $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used" >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi @@ -1325,7 +1343,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures unity-greeter 0.2.8 to adapt to many kinds of systems. +\`configure' configures unity-greeter 0.2.9 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1391,7 +1409,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of unity-greeter 0.2.8:";; + short | recursive ) echo "Configuration of unity-greeter 0.2.9:";; esac cat <<\_ACEOF @@ -1496,10 +1514,10 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -unity-greeter configure 0.2.8 -generated by GNU Autoconf 2.68 +unity-greeter configure 0.2.9 +generated by GNU Autoconf 2.69 -Copyright (C) 2010 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -1575,7 +1593,7 @@ test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext + test -x conftest$ac_exeext }; then : ac_retval=0 else @@ -1664,8 +1682,8 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by unity-greeter $as_me 0.2.8, which was -generated by GNU Autoconf 2.68. Invocation command line was +It was created by unity-greeter $as_me 0.2.9, which was +generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2081,7 +2099,7 @@ # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. @@ -2250,7 +2268,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2290,7 +2308,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2341,7 +2359,7 @@ test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do - { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue + as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ @@ -2394,7 +2412,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2480,7 +2498,7 @@ # Define the identity of the package. PACKAGE='unity-greeter' - VERSION='0.2.8' + VERSION='0.2.9' cat >>confdefs.h <<_ACEOF @@ -2605,7 +2623,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2645,7 +2663,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2698,7 +2716,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2739,7 +2757,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue @@ -2797,7 +2815,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2841,7 +2859,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3287,8 +3305,7 @@ /* end confdefs.h. */ #include #include -#include -#include +struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); @@ -3647,7 +3664,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_VALAC="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3803,7 +3820,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3846,7 +3863,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3919,7 +3936,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_GLIB_COMPILE_SCHEMAS="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4118,7 +4135,7 @@ gtk+-3.0 gdk-x11-3.0 indicator3-0.4 - liblightdm-gobject-1 >= 1.1.7 + liblightdm-gobject-1 >= 1.2.3 freetype2 cairo-ft libcanberra @@ -4127,7 +4144,7 @@ gtk+-3.0 gdk-x11-3.0 indicator3-0.4 - liblightdm-gobject-1 >= 1.1.7 + liblightdm-gobject-1 >= 1.2.3 freetype2 cairo-ft libcanberra @@ -4139,7 +4156,7 @@ gtk+-3.0 gdk-x11-3.0 indicator3-0.4 - liblightdm-gobject-1 >= 1.1.7 + liblightdm-gobject-1 >= 1.2.3 freetype2 cairo-ft libcanberra @@ -4159,7 +4176,7 @@ gtk+-3.0 gdk-x11-3.0 indicator3-0.4 - liblightdm-gobject-1 >= 1.1.7 + liblightdm-gobject-1 >= 1.2.3 freetype2 cairo-ft libcanberra @@ -4168,7 +4185,7 @@ gtk+-3.0 gdk-x11-3.0 indicator3-0.4 - liblightdm-gobject-1 >= 1.1.7 + liblightdm-gobject-1 >= 1.2.3 freetype2 cairo-ft libcanberra @@ -4180,7 +4197,7 @@ gtk+-3.0 gdk-x11-3.0 indicator3-0.4 - liblightdm-gobject-1 >= 1.1.7 + liblightdm-gobject-1 >= 1.2.3 freetype2 cairo-ft libcanberra @@ -4209,7 +4226,7 @@ gtk+-3.0 gdk-x11-3.0 indicator3-0.4 - liblightdm-gobject-1 >= 1.1.7 + liblightdm-gobject-1 >= 1.2.3 freetype2 cairo-ft libcanberra @@ -4219,7 +4236,7 @@ gtk+-3.0 gdk-x11-3.0 indicator3-0.4 - liblightdm-gobject-1 >= 1.1.7 + liblightdm-gobject-1 >= 1.2.3 freetype2 cairo-ft libcanberra @@ -4232,7 +4249,7 @@ gtk+-3.0 gdk-x11-3.0 indicator3-0.4 - liblightdm-gobject-1 >= 1.1.7 + liblightdm-gobject-1 >= 1.2.3 freetype2 cairo-ft libcanberra @@ -4327,7 +4344,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_INTLTOOL_UPDATE="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4367,7 +4384,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_INTLTOOL_MERGE="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4407,7 +4424,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_INTLTOOL_EXTRACT="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4591,7 +4608,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_XGETTEXT="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4631,7 +4648,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_MSGMERGE="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4671,7 +4688,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_MSGFMT="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4711,7 +4728,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4762,7 +4779,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_INTLTOOL_PERL="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5294,16 +5311,16 @@ # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. + # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' + as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null @@ -5363,28 +5380,16 @@ as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +as_test_x='test -x' +as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -5405,8 +5410,8 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by unity-greeter $as_me 0.2.8, which was -generated by GNU Autoconf 2.68. Invocation command line was +This file was extended by unity-greeter $as_me 0.2.9, which was +generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -5471,11 +5476,11 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -unity-greeter config.status 0.2.8 -configured by $0, generated by GNU Autoconf 2.68, +unity-greeter config.status 0.2.9 +configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" -Copyright (C) 2010 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -5566,7 +5571,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then - set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' diff -Nru unity-greeter-0.2.8/configure.ac unity-greeter-0.2.9/configure.ac --- unity-greeter-0.2.8/configure.ac 2012-04-18 07:20:08.000000000 +0000 +++ unity-greeter-0.2.9/configure.ac 2012-11-21 02:24:53.000000000 +0000 @@ -2,7 +2,7 @@ dnl Process this file with autoconf to produce a configure script. -AC_INIT(unity-greeter, 0.2.8) +AC_INIT(unity-greeter, 0.2.9) AC_CONFIG_MACRO_DIR(m4) AM_INIT_AUTOMAKE AM_PROG_CC_C_O @@ -22,7 +22,7 @@ gtk+-3.0 gdk-x11-3.0 indicator3-0.4 - liblightdm-gobject-1 >= 1.1.7 + liblightdm-gobject-1 >= 1.2.3 freetype2 cairo-ft libcanberra diff -Nru unity-greeter-0.2.8/data/Makefile.in unity-greeter-0.2.9/data/Makefile.in --- unity-greeter-0.2.8/data/Makefile.in 2012-04-18 07:20:30.000000000 +0000 +++ unity-greeter-0.2.9/data/Makefile.in 2012-11-21 02:24:58.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11.3 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -18,6 +18,23 @@ # -*- Mode: Automake; indent-tabs-mode: t; tab-width: 4 -*- VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -54,6 +71,11 @@ am__v_at_0 = @ SOURCES = DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -255,8 +277,11 @@ $(am__aclocal_m4_deps): install-dist_pkgdataDATA: $(dist_pkgdata_DATA) @$(NORMAL_INSTALL) - test -z "$(pkgdatadir)" || $(MKDIR_P) "$(DESTDIR)$(pkgdatadir)" @list='$(dist_pkgdata_DATA)'; test -n "$(pkgdatadir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(pkgdatadir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(pkgdatadir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ @@ -273,8 +298,11 @@ dir='$(DESTDIR)$(pkgdatadir)'; $(am__uninstall_files_from_dir) install-dist_xgreeterDATA: $(dist_xgreeter_DATA) @$(NORMAL_INSTALL) - test -z "$(xgreeterdir)" || $(MKDIR_P) "$(DESTDIR)$(xgreeterdir)" @list='$(dist_xgreeter_DATA)'; test -n "$(xgreeterdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(xgreeterdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(xgreeterdir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ diff -Nru unity-greeter-0.2.8/debian/changelog unity-greeter-0.2.9/debian/changelog --- unity-greeter-0.2.8/debian/changelog 2012-10-22 16:36:46.000000000 +0000 +++ unity-greeter-0.2.9/debian/changelog 2013-01-29 00:53:02.000000000 +0000 @@ -1,3 +1,31 @@ +unity-greeter (0.2.9-0ubuntu1) precise-proposed; urgency=low + + * New upstream release: + - Backport better keyboard focus handling from upstream as new windows + appear and disappear. This fixes keyboard navigation in dialogs + - Don't write garbage data to state cache file + - Make sure background alpha is never stuck at non-1.0 value, blocking + login + - When the default session is changed in lightdm.conf, don't still show the + Ubuntu badge + - Recognize the "kde-plasma" session as "kde" so it gets a properly branded + icon in the greeter + - Try to run unity_support_test for ubuntu for pre-caching the result in + /tmp for further call while the user is typing his password + - Support multiple prompts from PAM (LP: #972537) + - Support timed login (LP: #902852) + * debian/control: + - Bump build-depends on liblightdm-gobject-1-dev + * debian/patches/fix-focus.patch: + * debian/patches/fix-hung-logging-in.patch: + * debian/patches/recognize-kde-plasma.patch: + * debian/patches/run_unity_support_test.patch: + * debian/patches/show-changed-default-badge.patch: + * debian/patches/state-file-garbage.patch: + - Applied upstream + + -- Robert Ancell Wed, 21 Nov 2012 15:41:57 +1300 + unity-greeter (0.2.8-0ubuntu1.4) precise-proposed; urgency=low * debian/maintscript, debian/control: diff -Nru unity-greeter-0.2.8/debian/control unity-greeter-0.2.9/debian/control --- unity-greeter-0.2.8/debian/control 2012-10-22 16:36:28.000000000 +0000 +++ unity-greeter-0.2.9/debian/control 2013-01-29 00:53:02.000000000 +0000 @@ -10,7 +10,7 @@ libcanberra-dev, libgtk-3-dev, libindicator3-dev, - liblightdm-gobject-1-dev (>= 1.1.3), + liblightdm-gobject-1-dev (>= 1.2.3), valac-0.16 Homepage: https://launchpad.net/unity-greeter Vcs-Bzr: https://code.launchpad.net/~ubuntu-desktop/unity-greeter/ubuntu diff -Nru unity-greeter-0.2.8/debian/patches/fix-focus.patch unity-greeter-0.2.9/debian/patches/fix-focus.patch --- unity-greeter-0.2.8/debian/patches/fix-focus.patch 2012-10-01 18:16:40.000000000 +0000 +++ unity-greeter-0.2.9/debian/patches/fix-focus.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,107 +0,0 @@ -Index: unity-greeter-0.2.8/src/unity-greeter.vala -=================================================================== ---- unity-greeter-0.2.8.orig/src/unity-greeter.vala 2012-10-01 14:15:07.014342740 -0400 -+++ unity-greeter-0.2.8/src/unity-greeter.vala 2012-10-01 14:16:34.170343662 -0400 -@@ -681,17 +681,51 @@ - } - } - -- private Gdk.FilterReturn focus_upon_map (X.Event xevent, Gdk.Event event) -+ private Gdk.FilterReturn focus_upon_map (Gdk.XEvent gxevent, Gdk.Event event) - { -+ var xevent = (X.Event*)gxevent; - if (xevent.type == X.EventType.MapNotify) - { -- var display = Gdk.Display.get_default (); -- var win = Gdk.X11Window.foreign_new_for_display (display, xevent.xmap.window); -+ var display = Gdk.x11_lookup_xdisplay (xevent.xmap.display); -+ var xwin = xevent.xmap.window; -+ var win = Gdk.X11Window.foreign_new_for_display (display, xwin); - -- if (win.get_accept_focus ()) -+ /* Check to see if this window is our onboard window, since we don't want to focus it. */ -+ X.Window keyboard_xid = 0; -+ if (main_window.menubar.keyboard_window != null) -+ keyboard_xid = Gdk.X11Window.get_xid (main_window.menubar.keyboard_window.get_window ()); -+ -+ if (xwin != keyboard_xid && win.get_type_hint() != Gdk.WindowTypeHint.NOTIFICATION) -+ { - win.focus (Gdk.CURRENT_TIME); -- else -- user_list.focus_prompt (); -+ -+ /* Make sure to keep keyboard above */ -+ if (main_window.menubar.keyboard_window != null) -+ main_window.menubar.keyboard_window.get_window ().raise (); -+ } -+ } -+ else if (xevent.type == X.EventType.UnmapNotify) -+ { -+ // Since we aren't keeping track of focus (for example, we don't -+ // track the Z stack of windows) like a normal WM would, when we -+ // decide here where to return focus after another window unmaps, -+ // we don't have much to go on. X will tell us if we should take -+ // focus back. (I could not find an obvious way to determine this, -+ // but checking if the X input focus is RevertTo.None seems -+ // reliable.) -+ -+ X.Window xwin; -+ int revert_to; -+ xevent.xunmap.display.get_input_focus (out xwin, out revert_to); -+ -+ if (revert_to == X.RevertTo.None) -+ { -+ main_window.get_window ().focus (Gdk.CURRENT_TIME); -+ -+ /* Make sure to keep keyboard above */ -+ if (main_window.menubar.keyboard_window != null) -+ main_window.menubar.keyboard_window.get_window ().raise (); -+ } - } - return Gdk.FilterReturn.CONTINUE; - } -@@ -704,7 +738,7 @@ - continuing even if not actually marked as modal) */ - var root = Gdk.get_default_root_window (); - root.set_events (root.get_events () | Gdk.EventMask.SUBSTRUCTURE_MASK); -- root.add_filter ((Gdk.FilterFunc) focus_upon_map); -+ root.add_filter (focus_upon_map); - } - - private static Cairo.XlibSurface? create_root_surface (Gdk.Screen screen) -Index: unity-greeter-0.2.8/src/main-window.vala -=================================================================== ---- unity-greeter-0.2.8.orig/src/main-window.vala 2012-09-14 15:50:14.641008600 -0400 -+++ unity-greeter-0.2.8/src/main-window.vala 2012-10-01 14:15:07.054342741 -0400 -@@ -21,10 +21,10 @@ - public class MainWindow : Gtk.Window - { - public UserList user_list; -+ public MenuBar menubar; - - private List monitors; - private Background background; -- private MenuBar menubar; - private Gtk.Box login_box; - - private uint change_background_timeout = 0; -Index: unity-greeter-0.2.8/src/menubar.vala -=================================================================== ---- unity-greeter-0.2.8.orig/src/menubar.vala 2012-09-14 15:50:14.641008600 -0400 -+++ unity-greeter-0.2.8/src/menubar.vala 2012-10-01 14:15:07.058342741 -0400 -@@ -67,6 +67,7 @@ - { - public Background? background {get; construct; default = null;} - public bool high_contrast {get; private set; default = false;} -+ public Gtk.Window? keyboard_window {get; private set; default = null;} - - public Gtk.AccelGroup? accel_group {get; construct;} - -@@ -121,7 +122,6 @@ - private Gtk.CheckMenuItem high_contrast_item; - private Gtk.Label keyboard_label = null; - private Pid keyboard_pid = 0; -- private Gtk.Window? keyboard_window = null; - - construct - { diff -Nru unity-greeter-0.2.8/debian/patches/fix-hung-logging-in.patch unity-greeter-0.2.9/debian/patches/fix-hung-logging-in.patch --- unity-greeter-0.2.8/debian/patches/fix-hung-logging-in.patch 2012-07-26 13:57:31.000000000 +0000 +++ unity-greeter-0.2.9/debian/patches/fix-hung-logging-in.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,12 +0,0 @@ -Index: unity-greeter-0.2.8/src/background.vala -=================================================================== ---- unity-greeter-0.2.8.orig/src/background.vala 2012-04-17 00:14:44.000000000 -0700 -+++ unity-greeter-0.2.8/src/background.vala 2012-05-03 11:11:05.030820042 -0700 -@@ -433,6 +433,7 @@ - { - old = current; - current = new_background; -+ alpha = 1.0; - timer.stop (); - } - diff -Nru unity-greeter-0.2.8/debian/patches/recognize-kde-plasma.patch unity-greeter-0.2.9/debian/patches/recognize-kde-plasma.patch --- unity-greeter-0.2.8/debian/patches/recognize-kde-plasma.patch 2012-07-26 13:57:31.000000000 +0000 +++ unity-greeter-0.2.9/debian/patches/recognize-kde-plasma.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,12 +0,0 @@ -Index: unity-greeter-0.2.8/src/session-chooser.vala -=================================================================== ---- unity-greeter-0.2.8.orig/src/session-chooser.vala 2012-03-18 15:38:33.000000000 -0700 -+++ unity-greeter-0.2.8/src/session-chooser.vala 2012-05-03 14:43:16.947218675 -0700 -@@ -121,6 +121,7 @@ - case "gnome-shell": - return "gnome_badge.png"; - case "kde": -+ case "kde-plasma": - return "kde_badge.png"; - case "xterm": - return "recovery_console_badge.png"; diff -Nru unity-greeter-0.2.8/debian/patches/run_unity_support_test.patch unity-greeter-0.2.9/debian/patches/run_unity_support_test.patch --- unity-greeter-0.2.8/debian/patches/run_unity_support_test.patch 2012-07-26 13:57:31.000000000 +0000 +++ unity-greeter-0.2.9/debian/patches/run_unity_support_test.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,25 +0,0 @@ -# Description: try to run unity_support_test for ubuntu for pre-caching the -# result in /tmp for further call while the user is typing his -# password. - -Index: ubuntu-unity-greeter/src/unity-greeter.vala -=================================================================== ---- ubuntu-unity-greeter.orig/src/unity-greeter.vala 2011-09-06 16:30:06.209204307 +0200 -+++ ubuntu-unity-greeter/src/unity-greeter.vala 2011-09-06 16:36:59.483253629 +0200 -@@ -420,6 +420,16 @@ - debug ("Showing greeter"); - greeter.show (); - -+ /* Launch the unity_support_test tool as an async process to cache -+ its result */ -+ var exec = new string[1]; -+ exec[0] = "/usr/lib/nux/unity_support_test"; -+ try { -+ Process.spawn_async (null, exec, null, SpawnFlags.SEARCH_PATH, null, null); -+ } catch (SpawnError e) { -+ warning ("Failed to spawn unity-support-test tool for pre-caching: %s", e.message); -+ } -+ - debug ("Starting main loop"); - Gtk.main (); - diff -Nru unity-greeter-0.2.8/debian/patches/series unity-greeter-0.2.9/debian/patches/series --- unity-greeter-0.2.8/debian/patches/series 2012-10-01 18:33:05.000000000 +0000 +++ unity-greeter-0.2.9/debian/patches/series 1970-01-01 00:00:00.000000000 +0000 @@ -1,6 +0,0 @@ -run_unity_support_test.patch -recognize-kde-plasma.patch -show-changed-default-badge.patch -fix-hung-logging-in.patch -state-file-garbage.patch -fix-focus.patch diff -Nru unity-greeter-0.2.8/debian/patches/show-changed-default-badge.patch unity-greeter-0.2.9/debian/patches/show-changed-default-badge.patch --- unity-greeter-0.2.8/debian/patches/show-changed-default-badge.patch 2012-07-26 13:57:31.000000000 +0000 +++ unity-greeter-0.2.9/debian/patches/show-changed-default-badge.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,28 +0,0 @@ -=== modified file 'src/user-list.vala' -Index: unity-greeter-0.2.8/src/user-list.vala -=================================================================== ---- unity-greeter-0.2.8.orig/src/user-list.vala 2012-04-16 00:20:33.000000000 -0700 -+++ unity-greeter-0.2.8/src/user-list.vala 2012-05-03 14:46:22.375224481 -0700 -@@ -178,8 +178,20 @@ - add_manual_entry (); - } - } -- -- public string default_session = "ubuntu"; -+ -+ private string _default_session = "ubuntu"; -+ public string default_session -+ { -+ get -+ { -+ return _default_session; -+ } -+ set -+ { -+ _default_session = value; -+ session_image.set_from_pixbuf (get_badge ()); -+ } -+ } - - private string? _session = null; - public string? session diff -Nru unity-greeter-0.2.8/debian/patches/state-file-garbage.patch unity-greeter-0.2.9/debian/patches/state-file-garbage.patch --- unity-greeter-0.2.8/debian/patches/state-file-garbage.patch 2012-07-26 13:57:31.000000000 +0000 +++ unity-greeter-0.2.9/debian/patches/state-file-garbage.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,42 +0,0 @@ -=== modified file 'src/unity-greeter.vala' ---- a/src/unity-greeter.vala 2012-04-20 16:50:55 +0000 -+++ b/src/unity-greeter.vala 2012-05-29 16:40:24 +0000 -@@ -36,7 +36,7 @@ - - private static Timer log_timer; - -- private File state_file; -+ private string state_file; - private KeyFile state; - - private static Cairo.XlibSurface background_surface; -@@ -119,16 +119,16 @@ - var state_dir = Path.build_filename (Environment.get_user_cache_dir (), "unity-greeter"); - DirUtils.create_with_parents (state_dir, 0775); - -- state_file = File.new_for_path (Path.build_filename (state_dir, "state")); -+ state_file = Path.build_filename (state_dir, "state"); - state = new KeyFile (); - try - { -- state.load_from_file (state_file.get_path (), KeyFileFlags.NONE); -+ state.load_from_file (state_file, KeyFileFlags.NONE); - } - catch (Error e) - { - if (!(e is FileError.NOENT)) -- warning ("Failed to load state from %s: %s\n", state_file.get_path (), e.message); -+ warning ("Failed to load state from %s: %s\n", state_file, e.message); - } - var last_user = ""; - try -@@ -490,7 +490,7 @@ - var data = state.to_data (); - try - { -- state_file.replace_contents ((uint8[])data, null, false, FileCreateFlags.NONE, null); -+ FileUtils.set_contents (state_file, data); - } - catch (Error e) - { - diff -Nru unity-greeter-0.2.8/depcomp unity-greeter-0.2.9/depcomp --- unity-greeter-0.2.8/depcomp 2012-02-21 04:12:58.000000000 +0000 +++ unity-greeter-0.2.9/depcomp 2012-11-20 03:57:49.000000000 +0000 @@ -1,10 +1,10 @@ #! /bin/sh # depcomp - compile a program generating dependencies as side-effects -scriptversion=2011-12-04.11; # UTC +scriptversion=2012-03-27.16; # UTC # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009, 2010, -# 2011 Free Software Foundation, Inc. +# 2011, 2012 Free Software Foundation, Inc. # 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 @@ -28,7 +28,7 @@ case $1 in '') - echo "$0: No command. Try \`$0 --help' for more information." 1>&2 + echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) @@ -40,8 +40,8 @@ Environment variables: depmode Dependency tracking mode. - source Source file read by `PROGRAMS ARGS'. - object Object file output by `PROGRAMS ARGS'. + source Source file read by 'PROGRAMS ARGS'. + object Object file output by 'PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputting dependencies. @@ -57,6 +57,12 @@ ;; esac +# A tabulation character. +tab=' ' +# A newline character. +nl=' +' + if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 @@ -102,6 +108,12 @@ depmode=msvc7 fi +if test "$depmode" = xlc; then + # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency informations. + gccflag=-qmakedep=gcc,-MF + depmode=gcc +fi + case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what @@ -156,15 +168,14 @@ ## The second -e expression handles DOS-style file names with drive letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" -## This next piece of magic avoids the `deleted header file' problem. +## This next piece of magic avoids the "deleted header file" problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. - tr ' ' ' -' < "$tmpdepfile" | -## Some versions of gcc put a space before the `:'. On the theory + tr ' ' "$nl" < "$tmpdepfile" | +## Some versions of gcc put a space before the ':'. On the theory ## that the space means something, we add a space to the output as ## well. hp depmode also adds that space, but also prefixes the VPATH ## to the object. Take care to not repeat it in the output. @@ -203,18 +214,15 @@ # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; - # the IRIX cc adds comments like `#:fec' to the end of the + # the IRIX cc adds comments like '#:fec' to the end of the # dependency line. - tr ' ' ' -' < "$tmpdepfile" \ + tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ - tr ' -' ' ' >> "$depfile" + tr "$nl" ' ' >> "$depfile" echo >> "$depfile" # The second pass generates a dummy entry for each header file. - tr ' ' ' -' < "$tmpdepfile" \ + tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> "$depfile" else @@ -226,10 +234,17 @@ rm -f "$tmpdepfile" ;; +xlc) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the - # current directory. Also, the AIX compiler puts `$object:' at the + # current directory. Also, the AIX compiler puts '$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` @@ -259,12 +274,11 @@ test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then - # Each line is of the form `foo.o: dependent.h'. + # Each line is of the form 'foo.o: dependent.h'. # Do two passes, one to just change these to - # `$object: dependent.h' and one to simply `dependent.h:'. + # '$object: dependent.h' and one to simply 'dependent.h:'. sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" - # That's a tab and a space in the []. - sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" + sed -e 's,^.*\.[a-z]*:['"$tab"' ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile @@ -275,23 +289,26 @@ ;; icc) - # Intel's C compiler understands `-MD -MF file'. However on - # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c + # Intel's C compiler anf tcc (Tiny C Compiler) understand '-MD -MF file'. + # However on + # $CC -MD -MF foo.d -c -o sub/foo.o sub/foo.c # ICC 7.0 will fill foo.d with something like # foo.o: sub/foo.c # foo.o: sub/foo.h - # which is wrong. We want: + # which is wrong. We want # sub/foo.o: sub/foo.c # sub/foo.o: sub/foo.h # sub/foo.c: # sub/foo.h: # ICC 7.1 will output # foo.o: sub/foo.c sub/foo.h - # and will wrap long lines using \ : + # and will wrap long lines using '\': # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... - + # tcc 0.9.26 (FIXME still under development at the moment of writing) + # will emit a similar output, but also prepend the continuation lines + # with horizontal tabulation characters. "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : @@ -300,15 +317,21 @@ exit $stat fi rm -f "$depfile" - # Each line is of the form `foo.o: dependent.h', - # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. + # Each line is of the form 'foo.o: dependent.h', + # or 'foo.o: dep1.h dep2.h \', or ' dep3.h dep4.h \'. # Do two passes, one to just change these to - # `$object: dependent.h' and one to simply `dependent.h:'. - sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" - # Some versions of the HPUX 10.20 sed can't process this invocation - # correctly. Breaking it into two sed invocations is a workaround. - sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | - sed -e 's/$/ :/' >> "$depfile" + # '$object: dependent.h' and one to simply 'dependent.h:'. + sed -e "s/^[ $tab][ $tab]*/ /" -e "s,^[^:]*:,$object :," \ + < "$tmpdepfile" > "$depfile" + sed ' + s/[ '"$tab"'][ '"$tab"']*/ /g + s/^ *// + s/ *\\*$// + s/^[^:]*: *// + /^$/d + /:$/d + s/$/ :/ + ' < "$tmpdepfile" >> "$depfile" rm -f "$tmpdepfile" ;; @@ -344,7 +367,7 @@ done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" - # Add `dependent.h:' lines. + # Add 'dependent.h:' lines. sed -ne '2,${ s/^ *// s/ \\*$// @@ -359,9 +382,9 @@ tru64) # The Tru64 compiler uses -MD to generate dependencies as a side - # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. + # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put - # dependencies in `foo.d' instead, so we check for that too. + # dependencies in 'foo.d' instead, so we check for that too. # Subdirectories are respected. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= @@ -407,8 +430,7 @@ done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" - # That's a tab and a space in the []. - sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" + sed -e 's,^.*\.[a-z]*:['"$tab"' ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi @@ -443,11 +465,11 @@ p }' | $cygpath_u | sort -u | sed -n ' s/ /\\ /g -s/\(.*\)/ \1 \\/p +s/\(.*\)/'"$tab"'\1 \\/p s/.\(.*\) \\/\1:/ H $ { - s/.*/ / + s/.*/'"$tab"'/ G p }' >> "$depfile" @@ -478,7 +500,7 @@ shift fi - # Remove `-o $object'. + # Remove '-o $object'. IFS=" " for arg do @@ -498,15 +520,14 @@ done test -z "$dashmflag" && dashmflag=-M - # Require at least two characters before searching for `:' + # Require at least two characters before searching for ':' # in the target name. This is to cope with DOS-style filenames: - # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. + # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise. "$@" $dashmflag | - sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" + sed 's:^['"$tab"' ]*[^:'"$tab"' ][^:][^:]*\:['"$tab"' ]*:'"$object"'\: :' > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" - tr ' ' ' -' < "$tmpdepfile" | \ + tr ' ' "$nl" < "$tmpdepfile" | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" @@ -562,8 +583,7 @@ # makedepend may prepend the VPATH from the source file name to the object. # No need to regex-escape $object, excess matching of '.' is harmless. sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" - sed '1,2d' "$tmpdepfile" | tr ' ' ' -' | \ + sed '1,2d' "$tmpdepfile" | tr ' ' "$nl" | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" @@ -583,7 +603,7 @@ shift fi - # Remove `-o $object'. + # Remove '-o $object'. IFS=" " for arg do @@ -652,8 +672,8 @@ sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" - sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" - echo " " >> "$depfile" + sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile" + echo "$tab" >> "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; diff -Nru unity-greeter-0.2.8/src/Makefile.in unity-greeter-0.2.9/src/Makefile.in --- unity-greeter-0.2.8/src/Makefile.in 2012-04-18 07:20:30.000000000 +0000 +++ unity-greeter-0.2.9/src/Makefile.in 2012-11-21 02:24:58.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11.3 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -18,6 +18,23 @@ # -*- Mode: Automake; indent-tabs-mode: t; tab-width: 4 -*- VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -102,6 +119,11 @@ am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(unity_greeter_SOURCES) DIST_SOURCES = $(unity_greeter_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -300,8 +322,11 @@ $(am__aclocal_m4_deps): install-sbinPROGRAMS: $(sbin_PROGRAMS) @$(NORMAL_INSTALL) - test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)" @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(sbindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(sbindir)" || exit 1; \ + fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p; \ @@ -679,9 +704,9 @@ @if test -f $@; then :; else \ $(MAKE) $(AM_MAKEFLAGS) $(srcdir)/unity_greeter_vala.stamp; \ fi -$(srcdir)/unity_greeter_vala.stamp: $(unity_greeter_SOURCES) +$(srcdir)/unity_greeter_vala.stamp: config.vapi fixes.vapi indicator.vapi animate-timer.vala background.vala cached-image.vala dash-box.vala dash-button.vala dash-entry.vala fadable.vala fadable-box.vala main-window.vala menu.vala menubar.vala session-chooser.vala settings.vala settings-daemon.vala unity-greeter.vala user-list.vala $(AM_V_at)rm -f $@ && echo stamp > $@-t - $(AM_V_VALAC)$(am__cd) $(srcdir) && $(VALAC) $(unity_greeter_VALAFLAGS) $(VALAFLAGS) -C $(unity_greeter_SOURCES) + $(AM_V_VALAC)$(am__cd) $(srcdir) && $(VALAC) $(unity_greeter_VALAFLAGS) $(VALAFLAGS) -C config.vapi fixes.vapi indicator.vapi animate-timer.vala background.vala cached-image.vala dash-box.vala dash-button.vala dash-entry.vala fadable.vala fadable-box.vala main-window.vala menu.vala menubar.vala session-chooser.vala settings.vala settings-daemon.vala unity-greeter.vala user-list.vala $(AM_V_at)mv -f $@-t $@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) diff -Nru unity-greeter-0.2.8/src/animate-timer.c unity-greeter-0.2.9/src/animate-timer.c --- unity-greeter-0.2.8/src/animate-timer.c 2012-04-17 07:08:57.000000000 +0000 +++ unity-greeter-0.2.9/src/animate-timer.c 2012-11-20 03:57:57.000000000 +0000 @@ -1,4 +1,4 @@ -/* animate-timer.c generated by valac 0.16.0, the Vala compiler +/* animate-timer.c generated by valac 0.16.1, the Vala compiler * generated from animate-timer.vala, do not modify */ /* -*- Mode: Vala; indent-tabs-mode: nil; tab-width: 4 -*- diff -Nru unity-greeter-0.2.8/src/background.c unity-greeter-0.2.9/src/background.c --- unity-greeter-0.2.8/src/background.c 2012-04-17 07:14:53.000000000 +0000 +++ unity-greeter-0.2.9/src/background.c 2012-11-20 21:59:26.000000000 +0000 @@ -1,4 +1,4 @@ -/* background.c generated by valac 0.16.0, the Vala compiler +/* background.c generated by valac 0.16.1, the Vala compiler * generated from background.vala, do not modify */ /* -*- Mode: Vala; indent-tabs-mode: nil; tab-width: 4 -*- @@ -2201,6 +2201,7 @@ _tmp8_ = _g_object_ref0 (_tmp7_); _g_object_unref0 (self->priv->current); self->priv->current = _tmp8_; + background_set_alpha (self, 1.0); _tmp9_ = self->priv->timer; animate_timer_stop (_tmp9_); } diff -Nru unity-greeter-0.2.8/src/background.vala unity-greeter-0.2.9/src/background.vala --- unity-greeter-0.2.8/src/background.vala 2012-04-17 07:14:44.000000000 +0000 +++ unity-greeter-0.2.9/src/background.vala 2012-11-20 21:54:27.000000000 +0000 @@ -433,6 +433,7 @@ { old = current; current = new_background; + alpha = 1.0; timer.stop (); } diff -Nru unity-greeter-0.2.8/src/cached-image.c unity-greeter-0.2.9/src/cached-image.c --- unity-greeter-0.2.8/src/cached-image.c 2012-04-17 07:08:57.000000000 +0000 +++ unity-greeter-0.2.9/src/cached-image.c 2012-11-20 03:57:57.000000000 +0000 @@ -1,4 +1,4 @@ -/* cached-image.c generated by valac 0.16.0, the Vala compiler +/* cached-image.c generated by valac 0.16.1, the Vala compiler * generated from cached-image.vala, do not modify */ /* -*- Mode: Vala; indent-tabs-mode: nil; tab-width: 4 -*- diff -Nru unity-greeter-0.2.8/src/dash-box.c unity-greeter-0.2.9/src/dash-box.c --- unity-greeter-0.2.8/src/dash-box.c 2012-04-17 07:08:57.000000000 +0000 +++ unity-greeter-0.2.9/src/dash-box.c 2012-11-20 03:57:57.000000000 +0000 @@ -1,4 +1,4 @@ -/* dash-box.c generated by valac 0.16.0, the Vala compiler +/* dash-box.c generated by valac 0.16.1, the Vala compiler * generated from dash-box.vala, do not modify */ /* -*- Mode: Vala; indent-tabs-mode: nil; tab-width: 4 -*- diff -Nru unity-greeter-0.2.8/src/dash-button.c unity-greeter-0.2.9/src/dash-button.c --- unity-greeter-0.2.8/src/dash-button.c 2012-04-17 07:08:57.000000000 +0000 +++ unity-greeter-0.2.9/src/dash-button.c 2012-11-20 03:57:57.000000000 +0000 @@ -1,4 +1,4 @@ -/* dash-button.c generated by valac 0.16.0, the Vala compiler +/* dash-button.c generated by valac 0.16.1, the Vala compiler * generated from dash-button.vala, do not modify */ /* -*- Mode: Vala; indent-tabs-mode: nil; tab-width: 4 -*- diff -Nru unity-greeter-0.2.8/src/dash-entry.c unity-greeter-0.2.9/src/dash-entry.c --- unity-greeter-0.2.8/src/dash-entry.c 2012-04-17 07:08:57.000000000 +0000 +++ unity-greeter-0.2.9/src/dash-entry.c 2012-11-20 03:57:57.000000000 +0000 @@ -1,4 +1,4 @@ -/* dash-entry.c generated by valac 0.16.0, the Vala compiler +/* dash-entry.c generated by valac 0.16.1, the Vala compiler * generated from dash-entry.vala, do not modify */ /* -*- Mode: Vala; indent-tabs-mode: nil; tab-width: 4 -*- diff -Nru unity-greeter-0.2.8/src/fadable-box.c unity-greeter-0.2.9/src/fadable-box.c --- unity-greeter-0.2.8/src/fadable-box.c 2012-04-17 07:08:57.000000000 +0000 +++ unity-greeter-0.2.9/src/fadable-box.c 2012-11-20 03:57:57.000000000 +0000 @@ -1,4 +1,4 @@ -/* fadable-box.c generated by valac 0.16.0, the Vala compiler +/* fadable-box.c generated by valac 0.16.1, the Vala compiler * generated from fadable-box.vala, do not modify */ /* -*- Mode: Vala; indent-tabs-mode: nil; tab-width: 4 -*- diff -Nru unity-greeter-0.2.8/src/fadable.c unity-greeter-0.2.9/src/fadable.c --- unity-greeter-0.2.8/src/fadable.c 2012-04-17 07:08:57.000000000 +0000 +++ unity-greeter-0.2.9/src/fadable.c 2012-11-20 03:57:57.000000000 +0000 @@ -1,4 +1,4 @@ -/* fadable.c generated by valac 0.16.0, the Vala compiler +/* fadable.c generated by valac 0.16.1, the Vala compiler * generated from fadable.vala, do not modify */ /* -*- Mode: Vala; indent-tabs-mode: nil; tab-width: 4 -*- diff -Nru unity-greeter-0.2.8/src/main-window.c unity-greeter-0.2.9/src/main-window.c --- unity-greeter-0.2.8/src/main-window.c 2012-04-17 07:14:53.000000000 +0000 +++ unity-greeter-0.2.9/src/main-window.c 2012-11-21 02:25:02.000000000 +0000 @@ -1,4 +1,4 @@ -/* main-window.c generated by valac 0.16.0, the Vala compiler +/* main-window.c generated by valac 0.16.1, the Vala compiler * generated from main-window.vala, do not modify */ /* -*- Mode: Vala; indent-tabs-mode: nil; tab-width: 4 -*- @@ -55,6 +55,16 @@ typedef struct _UserList UserList; typedef struct _UserListClass UserListClass; +#define TYPE_MENU_BAR (menu_bar_get_type ()) +#define MENU_BAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MENU_BAR, MenuBar)) +#define MENU_BAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MENU_BAR, MenuBarClass)) +#define IS_MENU_BAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MENU_BAR)) +#define IS_MENU_BAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MENU_BAR)) +#define MENU_BAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MENU_BAR, MenuBarClass)) + +typedef struct _MenuBar MenuBar; +typedef struct _MenuBarClass MenuBarClass; + #define TYPE_MONITOR (monitor_get_type ()) #define MONITOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MONITOR, Monitor)) #define MONITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MONITOR, MonitorClass)) @@ -74,16 +84,6 @@ typedef struct _Background Background; typedef struct _BackgroundClass BackgroundClass; - -#define TYPE_MENU_BAR (menu_bar_get_type ()) -#define MENU_BAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MENU_BAR, MenuBar)) -#define MENU_BAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MENU_BAR, MenuBarClass)) -#define IS_MENU_BAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MENU_BAR)) -#define IS_MENU_BAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MENU_BAR)) -#define MENU_BAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MENU_BAR, MenuBarClass)) - -typedef struct _MenuBar MenuBar; -typedef struct _MenuBarClass MenuBarClass; #define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) #define __g_list_free__monitor_unref0_0(var) ((var == NULL) ? NULL : (var = (_g_list_free__monitor_unref0_ (var), NULL))) #define _g_free0(var) (var = (g_free (var), NULL)) @@ -108,6 +108,7 @@ GtkWindow parent_instance; MainWindowPrivate * priv; UserList* user_list; + MenuBar* menubar; }; struct _MainWindowClass { @@ -117,7 +118,6 @@ struct _MainWindowPrivate { GList* monitors; Background* background; - MenuBar* menubar; GtkBox* login_box; guint change_background_timeout; }; @@ -170,6 +170,7 @@ GType main_window_get_type (void) G_GNUC_CONST; GType user_list_get_type (void) G_GNUC_CONST; +GType menu_bar_get_type (void) G_GNUC_CONST; gpointer monitor_ref (gpointer instance); void monitor_unref (gpointer instance); GParamSpec* param_spec_monitor (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); @@ -178,7 +179,6 @@ gpointer value_get_monitor (const GValue* value); GType monitor_get_type (void) G_GNUC_CONST; GType background_get_type (void) G_GNUC_CONST; -GType menu_bar_get_type (void) G_GNUC_CONST; #define MAIN_WINDOW_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_MAIN_WINDOW, MainWindowPrivate)) enum { MAIN_WINDOW_DUMMY_PROPERTY @@ -230,15 +230,15 @@ #define UG_SETTINGS_KEY_BACKGROUND_LOGO "background-logo" MenuBar* menu_bar_new (Background* bg, GtkAccelGroup* ag); MenuBar* menu_bar_construct (GType object_type, Background* bg, GtkAccelGroup* ag); -static void _main_window___lambda7_ (MainWindow* self); -static void __main_window___lambda7__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self); +static void _main_window___lambda8_ (MainWindow* self); +static void __main_window___lambda8__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self); UserList* user_list_new (Background* bg, MenuBar* mb); UserList* user_list_construct (GType object_type, Background* bg, MenuBar* mb); -static void _main_window___lambda8_ (MainWindow* self); -static void __main_window___lambda8__user_list_user_displayed_start (UserList* _sender, gpointer self); static void _main_window___lambda9_ (MainWindow* self); +static void __main_window___lambda9__user_list_user_displayed_start (UserList* _sender, gpointer self); +static void _main_window___lambda10_ (MainWindow* self); void menu_bar_set_layouts (MenuBar* self, GList* layouts); -static void __main_window___lambda9__user_list_user_displayed_done (UserList* _sender, gpointer self); +static void __main_window___lambda10__user_list_user_displayed_done (UserList* _sender, gpointer self); static void _main_window_monitors_changed_cb_gdk_screen_monitors_changed (GdkScreen* _sender, gpointer self); static void main_window_finalize (GObject* obj); @@ -465,7 +465,7 @@ Background* _tmp11_; const gchar* _tmp12_; g_return_val_if_fail (self != NULL, FALSE); - _tmp1_ = self->priv->menubar; + _tmp1_ = self->menubar; _tmp2_ = menu_bar_get_high_contrast (_tmp1_); _tmp3_ = _tmp2_; if (_tmp3_) { @@ -771,7 +771,7 @@ case GDK_KEY_F10: { MenuBar* _tmp7_; - _tmp7_ = self->priv->menubar; + _tmp7_ = self->menubar; gtk_menu_shell_select_first ((GtkMenuShell*) _tmp7_, FALSE); break; } @@ -802,33 +802,33 @@ } -static void _main_window___lambda7_ (MainWindow* self) { +static void _main_window___lambda8_ (MainWindow* self) { main_window_change_background (self); } -static void __main_window___lambda7__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) { - _main_window___lambda7_ (self); +static void __main_window___lambda8__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) { + _main_window___lambda8_ (self); } -static void _main_window___lambda8_ (MainWindow* self) { +static void _main_window___lambda9_ (MainWindow* self) { main_window_change_background (self); } -static void __main_window___lambda8__user_list_user_displayed_start (UserList* _sender, gpointer self) { - _main_window___lambda8_ (self); +static void __main_window___lambda9__user_list_user_displayed_start (UserList* _sender, gpointer self) { + _main_window___lambda9_ (self); } -static void _main_window___lambda9_ (MainWindow* self) { +static void _main_window___lambda10_ (MainWindow* self) { MenuBar* _tmp0_; UserList* _tmp1_; UserEntry* _tmp2_; UserEntry* _tmp3_; GList* _tmp4_; - _tmp0_ = self->priv->menubar; + _tmp0_ = self->menubar; _tmp1_ = self->user_list; _tmp2_ = user_list_get_selected_entry (_tmp1_); _tmp3_ = _tmp2_; @@ -838,8 +838,8 @@ } -static void __main_window___lambda9__user_list_user_displayed_done (UserList* _sender, gpointer self) { - _main_window___lambda9_ (self); +static void __main_window___lambda10__user_list_user_displayed_done (UserList* _sender, gpointer self) { + _main_window___lambda10_ (self); } @@ -980,19 +980,19 @@ _tmp34_ = accel_group; _tmp35_ = menu_bar_new (_tmp33_, _tmp34_); _tmp36_ = g_object_ref_sink (_tmp35_); - _g_object_unref0 (self->priv->menubar); - self->priv->menubar = _tmp36_; - _tmp37_ = self->priv->menubar; - g_signal_connect_object ((GObject*) _tmp37_, "notify::high-contrast", (GCallback) __main_window___lambda7__g_object_notify, self, 0); - _tmp38_ = self->priv->menubar; + _g_object_unref0 (self->menubar); + self->menubar = _tmp36_; + _tmp37_ = self->menubar; + g_signal_connect_object ((GObject*) _tmp37_, "notify::high-contrast", (GCallback) __main_window___lambda8__g_object_notify, self, 0); + _tmp38_ = self->menubar; gtk_widget_show ((GtkWidget*) _tmp38_); _tmp39_ = self->priv->login_box; - _tmp40_ = self->priv->menubar; + _tmp40_ = self->menubar; gtk_container_add ((GtkContainer*) _tmp39_, (GtkWidget*) _tmp40_); - _tmp41_ = self->priv->menubar; + _tmp41_ = self->menubar; unity_greeter_add_style_class ((GtkWidget*) _tmp41_); _tmp42_ = self->priv->background; - _tmp43_ = self->priv->menubar; + _tmp43_ = self->menubar; _tmp44_ = user_list_new (_tmp42_, _tmp43_); _tmp45_ = g_object_ref_sink (_tmp44_); _g_object_unref0 (self->user_list); @@ -1000,9 +1000,9 @@ _tmp46_ = self->user_list; g_object_set ((GtkWidget*) _tmp46_, "expand", TRUE, NULL); _tmp47_ = self->user_list; - g_signal_connect_object (_tmp47_, "user-displayed-start", (GCallback) __main_window___lambda8__user_list_user_displayed_start, self, 0); + g_signal_connect_object (_tmp47_, "user-displayed-start", (GCallback) __main_window___lambda9__user_list_user_displayed_start, self, 0); _tmp48_ = self->user_list; - g_signal_connect_object (_tmp48_, "user-displayed-done", (GCallback) __main_window___lambda9__user_list_user_displayed_done, self, 0); + g_signal_connect_object (_tmp48_, "user-displayed-done", (GCallback) __main_window___lambda10__user_list_user_displayed_done, self, 0); _tmp49_ = self->user_list; gtk_widget_show ((GtkWidget*) _tmp49_); _tmp50_ = self->priv->login_box; @@ -1071,9 +1071,9 @@ MainWindow * self; self = MAIN_WINDOW (obj); _g_object_unref0 (self->user_list); + _g_object_unref0 (self->menubar); __g_list_free__monitor_unref0_0 (self->priv->monitors); _g_object_unref0 (self->priv->background); - _g_object_unref0 (self->priv->menubar); _g_object_unref0 (self->priv->login_box); G_OBJECT_CLASS (main_window_parent_class)->finalize (obj); } diff -Nru unity-greeter-0.2.8/src/main-window.vala unity-greeter-0.2.9/src/main-window.vala --- unity-greeter-0.2.8/src/main-window.vala 2012-04-17 07:14:44.000000000 +0000 +++ unity-greeter-0.2.9/src/main-window.vala 2012-11-20 21:56:53.000000000 +0000 @@ -21,10 +21,10 @@ public class MainWindow : Gtk.Window { public UserList user_list; + public MenuBar menubar; private List monitors; private Background background; - private MenuBar menubar; private Gtk.Box login_box; private uint change_background_timeout = 0; diff -Nru unity-greeter-0.2.8/src/menu.c unity-greeter-0.2.9/src/menu.c --- unity-greeter-0.2.8/src/menu.c 2012-04-17 07:08:57.000000000 +0000 +++ unity-greeter-0.2.9/src/menu.c 2012-11-20 03:57:57.000000000 +0000 @@ -1,4 +1,4 @@ -/* menu.c generated by valac 0.16.0, the Vala compiler +/* menu.c generated by valac 0.16.1, the Vala compiler * generated from menu.vala, do not modify */ /* -*- Mode: Vala; indent-tabs-mode: nil; tab-width: 4 -*- diff -Nru unity-greeter-0.2.8/src/menubar.c unity-greeter-0.2.9/src/menubar.c --- unity-greeter-0.2.8/src/menubar.c 2012-04-17 07:08:57.000000000 +0000 +++ unity-greeter-0.2.9/src/menubar.c 2012-11-20 21:59:26.000000000 +0000 @@ -1,4 +1,4 @@ -/* menubar.c generated by valac 0.16.0, the Vala compiler +/* menubar.c generated by valac 0.16.1, the Vala compiler * generated from menubar.vala, do not modify */ /* -*- Mode: Vala; indent-tabs-mode: nil; tab-width: 4 -*- @@ -116,6 +116,7 @@ struct _MenuBarPrivate { Background* _background; gboolean _high_contrast; + GtkWindow* _keyboard_window; GtkAccelGroup* _accel_group; gchar* default_theme_name; GList* indicator_objects; @@ -123,7 +124,6 @@ GtkCheckMenuItem* high_contrast_item; GtkLabel* keyboard_label; GPid keyboard_pid; - GtkWindow* keyboard_window; }; typedef enum { @@ -155,6 +155,7 @@ MENU_BAR_DUMMY_PROPERTY, MENU_BAR_BACKGROUND, MENU_BAR_HIGH_CONTRAST, + MENU_BAR_KEYBOARD_WINDOW, MENU_BAR_ACCEL_GROUP }; static void _g_object_unref0_ (gpointer var); @@ -190,6 +191,8 @@ static void menu_bar_indicator_removed_cb (MenuBar* self, IndicatorObject* object, IndicatorObjectEntry* entry); static void _menu_bar_indicator_removed_cb_indicator_object_entry_removed (IndicatorObject* _sender, IndicatorObjectEntry* entry, gpointer self); gboolean ug_settings_set_boolean (const gchar* key, gboolean value); +GtkWindow* menu_bar_get_keyboard_window (MenuBar* self); +static void menu_bar_set_keyboard_window (MenuBar* self, GtkWindow* value); static gint _menu_bar_cmp_layout_gcompare_func (gconstpointer a, gconstpointer b); static void _menu_bar_layout_toggled_cb_gtk_check_menu_item_toggled (GtkCheckMenuItem* _sender, gpointer self); static void menu_bar_set_high_contrast (MenuBar* self, gboolean value); @@ -1213,7 +1216,7 @@ _tmp1_ = gtk_check_menu_item_get_active (_tmp0_); _tmp2_ = _tmp1_; ug_settings_set_boolean (UG_SETTINGS_KEY_ONSCREEN_KEYBOARD, _tmp2_); - _tmp3_ = self->priv->keyboard_window; + _tmp3_ = self->priv->_keyboard_window; if (_tmp3_ == NULL) { gint id = 0; GtkSocket* _tmp18_; @@ -1337,13 +1340,13 @@ gtk_widget_show ((GtkWidget*) _tmp20_); _tmp21_ = (GtkWindow*) gtk_window_new (GTK_WINDOW_TOPLEVEL); _tmp22_ = g_object_ref_sink (_tmp21_); - _g_object_unref0 (self->priv->keyboard_window); - self->priv->keyboard_window = _tmp22_; - _tmp23_ = self->priv->keyboard_window; + menu_bar_set_keyboard_window (self, _tmp22_); + _g_object_unref0 (_tmp22_); + _tmp23_ = self->priv->_keyboard_window; gtk_window_set_accept_focus (_tmp23_, FALSE); - _tmp24_ = self->priv->keyboard_window; + _tmp24_ = self->priv->_keyboard_window; gtk_window_set_focus_on_map (_tmp24_, FALSE); - _tmp25_ = self->priv->keyboard_window; + _tmp25_ = self->priv->_keyboard_window; _tmp26_ = keyboard_socket; gtk_container_add ((GtkContainer*) _tmp25_, (GtkWidget*) _tmp26_); _tmp27_ = keyboard_socket; @@ -1360,7 +1363,7 @@ _tmp35_ = monitor; gdk_screen_get_monitor_geometry (_tmp34_, _tmp35_, &_tmp36_); geom = _tmp36_; - _tmp37_ = self->priv->keyboard_window; + _tmp37_ = self->priv->_keyboard_window; _tmp38_ = geom; _tmp39_ = _tmp38_.x; _tmp40_ = geom; @@ -1368,14 +1371,14 @@ _tmp42_ = geom; _tmp43_ = _tmp42_.height; gtk_window_move (_tmp37_, _tmp39_, (_tmp41_ + _tmp43_) - 200); - _tmp44_ = self->priv->keyboard_window; + _tmp44_ = self->priv->_keyboard_window; _tmp45_ = geom; _tmp46_ = _tmp45_.width; gtk_window_resize (_tmp44_, _tmp46_, 200); _g_object_unref0 (screen); _g_object_unref0 (keyboard_socket); } - _tmp47_ = self->priv->keyboard_window; + _tmp47_ = self->priv->_keyboard_window; _tmp48_ = item; _tmp49_ = gtk_check_menu_item_get_active (_tmp48_); _tmp50_ = _tmp49_; @@ -1861,6 +1864,28 @@ } +GtkWindow* menu_bar_get_keyboard_window (MenuBar* self) { + GtkWindow* result; + GtkWindow* _tmp0_; + g_return_val_if_fail (self != NULL, NULL); + _tmp0_ = self->priv->_keyboard_window; + result = _tmp0_; + return result; +} + + +static void menu_bar_set_keyboard_window (MenuBar* self, GtkWindow* value) { + GtkWindow* _tmp0_; + GtkWindow* _tmp1_; + g_return_if_fail (self != NULL); + _tmp0_ = value; + _tmp1_ = _g_object_ref0 (_tmp0_); + _g_object_unref0 (self->priv->_keyboard_window); + self->priv->_keyboard_window = _tmp1_; + g_object_notify ((GObject *) self, "keyboard-window"); +} + + GtkAccelGroup* menu_bar_get_accel_group (MenuBar* self) { GtkAccelGroup* result; GtkAccelGroup* _tmp0_; @@ -2004,6 +2029,7 @@ G_OBJECT_CLASS (klass)->finalize = menu_bar_finalize; g_object_class_install_property (G_OBJECT_CLASS (klass), MENU_BAR_BACKGROUND, g_param_spec_object ("background", "background", "background", TYPE_BACKGROUND, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY)); g_object_class_install_property (G_OBJECT_CLASS (klass), MENU_BAR_HIGH_CONTRAST, g_param_spec_boolean ("high-contrast", "high-contrast", "high-contrast", FALSE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE)); + g_object_class_install_property (G_OBJECT_CLASS (klass), MENU_BAR_KEYBOARD_WINDOW, g_param_spec_object ("keyboard-window", "keyboard-window", "keyboard-window", GTK_TYPE_WINDOW, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE)); g_object_class_install_property (G_OBJECT_CLASS (klass), MENU_BAR_ACCEL_GROUP, g_param_spec_object ("accel-group", "accel-group", "accel-group", GTK_TYPE_ACCEL_GROUP, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY)); } @@ -2012,9 +2038,9 @@ self->priv = MENU_BAR_GET_PRIVATE (self); self->priv->_background = NULL; self->priv->_high_contrast = FALSE; + self->priv->_keyboard_window = NULL; self->priv->keyboard_label = NULL; self->priv->keyboard_pid = (GPid) 0; - self->priv->keyboard_window = NULL; } @@ -2036,13 +2062,13 @@ self->priv->keyboard_pid = (GPid) 0; } _g_object_unref0 (self->priv->_background); + _g_object_unref0 (self->priv->_keyboard_window); _g_object_unref0 (self->priv->_accel_group); _g_free0 (self->priv->default_theme_name); __g_list_free__g_object_unref0_0 (self->priv->indicator_objects); _g_object_unref0 (self->priv->keyboard_item); _g_object_unref0 (self->priv->high_contrast_item); _g_object_unref0 (self->priv->keyboard_label); - _g_object_unref0 (self->priv->keyboard_window); G_OBJECT_CLASS (menu_bar_parent_class)->finalize (obj); } @@ -2069,6 +2095,9 @@ case MENU_BAR_HIGH_CONTRAST: g_value_set_boolean (value, menu_bar_get_high_contrast (self)); break; + case MENU_BAR_KEYBOARD_WINDOW: + g_value_set_object (value, menu_bar_get_keyboard_window (self)); + break; case MENU_BAR_ACCEL_GROUP: g_value_set_object (value, menu_bar_get_accel_group (self)); break; @@ -2089,6 +2118,9 @@ case MENU_BAR_HIGH_CONTRAST: menu_bar_set_high_contrast (self, g_value_get_boolean (value)); break; + case MENU_BAR_KEYBOARD_WINDOW: + menu_bar_set_keyboard_window (self, g_value_get_object (value)); + break; case MENU_BAR_ACCEL_GROUP: menu_bar_set_accel_group (self, g_value_get_object (value)); break; diff -Nru unity-greeter-0.2.8/src/menubar.vala unity-greeter-0.2.9/src/menubar.vala --- unity-greeter-0.2.8/src/menubar.vala 2012-03-23 04:33:46.000000000 +0000 +++ unity-greeter-0.2.9/src/menubar.vala 2012-11-20 21:56:53.000000000 +0000 @@ -67,6 +67,7 @@ { public Background? background {get; construct; default = null;} public bool high_contrast {get; private set; default = false;} + public Gtk.Window? keyboard_window {get; private set; default = null;} public Gtk.AccelGroup? accel_group {get; construct;} @@ -121,7 +122,6 @@ private Gtk.CheckMenuItem high_contrast_item; private Gtk.Label keyboard_label = null; private Pid keyboard_pid = 0; - private Gtk.Window? keyboard_window = null; construct { diff -Nru unity-greeter-0.2.8/src/session-chooser.c unity-greeter-0.2.9/src/session-chooser.c --- unity-greeter-0.2.8/src/session-chooser.c 2012-04-17 07:08:57.000000000 +0000 +++ unity-greeter-0.2.9/src/session-chooser.c 2012-11-20 21:59:26.000000000 +0000 @@ -1,4 +1,4 @@ -/* session-chooser.c generated by valac 0.16.0, the Vala compiler +/* session-chooser.c generated by valac 0.16.1, the Vala compiler * generated from session-chooser.vala, do not modify */ /* -*- Mode: Vala; indent-tabs-mode: nil; tab-width: 4 -*- @@ -403,6 +403,7 @@ static GQuark _tmp2_label5 = 0; static GQuark _tmp2_label6 = 0; static GQuark _tmp2_label7 = 0; + static GQuark _tmp2_label8 = 0; g_return_val_if_fail (session != NULL, NULL); _tmp0_ = session; _tmp1_ = _tmp0_; @@ -427,7 +428,7 @@ return result; } } - } else if (_tmp3_ == ((0 != _tmp2_label6) ? _tmp2_label6 : (_tmp2_label6 = g_quark_from_static_string ("kde")))) { + } else if ((_tmp3_ == ((0 != _tmp2_label6) ? _tmp2_label6 : (_tmp2_label6 = g_quark_from_static_string ("kde")))) || (_tmp3_ == ((0 != _tmp2_label7) ? _tmp2_label7 : (_tmp2_label7 = g_quark_from_static_string ("kde-plasma"))))) { switch (0) { default: { @@ -437,7 +438,7 @@ return result; } } - } else if (_tmp3_ == ((0 != _tmp2_label7) ? _tmp2_label7 : (_tmp2_label7 = g_quark_from_static_string ("xterm")))) { + } else if (_tmp3_ == ((0 != _tmp2_label8) ? _tmp2_label8 : (_tmp2_label8 = g_quark_from_static_string ("xterm")))) { switch (0) { default: { @@ -587,7 +588,7 @@ _tmp32_ = name; _tmp33_ = e; _tmp34_ = _tmp33_->message; - g_debug ("session-chooser.vala:162: Error loading badge %s: %s", _tmp32_, _tmp34_); + g_debug ("session-chooser.vala:163: Error loading badge %s: %s", _tmp32_, _tmp34_); _g_error_free0 (e); } __finally10: diff -Nru unity-greeter-0.2.8/src/session-chooser.vala unity-greeter-0.2.9/src/session-chooser.vala --- unity-greeter-0.2.8/src/session-chooser.vala 2012-03-18 22:38:33.000000000 +0000 +++ unity-greeter-0.2.9/src/session-chooser.vala 2012-11-20 21:45:45.000000000 +0000 @@ -121,6 +121,7 @@ case "gnome-shell": return "gnome_badge.png"; case "kde": + case "kde-plasma": return "kde_badge.png"; case "xterm": return "recovery_console_badge.png"; diff -Nru unity-greeter-0.2.8/src/settings-daemon.c unity-greeter-0.2.9/src/settings-daemon.c --- unity-greeter-0.2.8/src/settings-daemon.c 2012-04-17 07:08:57.000000000 +0000 +++ unity-greeter-0.2.9/src/settings-daemon.c 2012-11-20 03:57:57.000000000 +0000 @@ -1,4 +1,4 @@ -/* settings-daemon.c generated by valac 0.16.0, the Vala compiler +/* settings-daemon.c generated by valac 0.16.1, the Vala compiler * generated from settings-daemon.vala, do not modify */ /* -*- Mode:Vala; indent-tabs-mode:nil; tab-width:4 -*- diff -Nru unity-greeter-0.2.8/src/settings.c unity-greeter-0.2.9/src/settings.c --- unity-greeter-0.2.8/src/settings.c 2012-04-17 07:14:53.000000000 +0000 +++ unity-greeter-0.2.9/src/settings.c 2012-11-20 03:57:57.000000000 +0000 @@ -1,4 +1,4 @@ -/* settings.c generated by valac 0.16.0, the Vala compiler +/* settings.c generated by valac 0.16.1, the Vala compiler * generated from settings.vala, do not modify */ /* -*- Mode: Vala; indent-tabs-mode: nil; tab-width: 4 -*- diff -Nru unity-greeter-0.2.8/src/unity-greeter.c unity-greeter-0.2.9/src/unity-greeter.c --- unity-greeter-0.2.8/src/unity-greeter.c 2012-04-17 07:08:57.000000000 +0000 +++ unity-greeter-0.2.9/src/unity-greeter.c 2012-11-21 02:25:02.000000000 +0000 @@ -1,4 +1,4 @@ -/* unity-greeter.c generated by valac 0.16.0, the Vala compiler +/* unity-greeter.c generated by valac 0.16.1, the Vala compiler * generated from unity-greeter.vala, do not modify */ /* -*- Mode: Vala; indent-tabs-mode: nil; tab-width: 4 -*- @@ -23,12 +23,13 @@ #include #include #include -#include -#include #include #include +#include #include #include +#include +#include #include #include #include @@ -88,9 +89,20 @@ typedef struct _MainWindow MainWindow; typedef struct _MainWindowClass MainWindowClass; -#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) -#define _g_key_file_free0(var) ((var == NULL) ? NULL : (var = (g_key_file_free (var), NULL))) + +#define TYPE_PROMPT (prompt_get_type ()) +#define PROMPT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PROMPT, Prompt)) +#define PROMPT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PROMPT, PromptClass)) +#define IS_PROMPT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PROMPT)) +#define IS_PROMPT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PROMPT)) +#define PROMPT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PROMPT, PromptClass)) + +typedef struct _Prompt Prompt; +typedef struct _PromptClass PromptClass; #define _g_free0(var) (var = (g_free (var), NULL)) +#define _g_key_file_free0(var) ((var == NULL) ? NULL : (var = (g_key_file_free (var), NULL))) +#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) +#define __g_list_free__prompt_unref0_0(var) ((var == NULL) ? NULL : (var = (_g_list_free__prompt_unref0_ (var), NULL))) #define __g_list_free__g_free0_0(var) ((var == NULL) ? NULL : (var = (_g_list_free__g_free0_ (var), NULL))) #define _ca_context_destroy0(var) ((var == NULL) ? NULL : (var = (ca_context_destroy (var), NULL))) @@ -98,7 +110,18 @@ typedef struct _TestEntry TestEntry; #define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL))) typedef struct _MainWindowPrivate MainWindowPrivate; + +#define TYPE_MENU_BAR (menu_bar_get_type ()) +#define MENU_BAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MENU_BAR, MenuBar)) +#define MENU_BAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MENU_BAR, MenuBarClass)) +#define IS_MENU_BAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MENU_BAR)) +#define IS_MENU_BAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MENU_BAR)) +#define MENU_BAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MENU_BAR, MenuBarClass)) + +typedef struct _MenuBar MenuBar; +typedef struct _MenuBarClass MenuBarClass; #define _g_dir_close0(var) ((var == NULL) ? NULL : (var = (g_dir_close (var), NULL))) +#define __g_list_free__g_object_unref0_0(var) ((var == NULL) ? NULL : (var = (_g_list_free__g_object_unref0_ (var), NULL))) typedef struct _UserListPrivate UserListPrivate; #define TYPE_BACKGROUND (background_get_type ()) @@ -111,24 +134,16 @@ typedef struct _Background Background; typedef struct _BackgroundClass BackgroundClass; -#define TYPE_MENU_BAR (menu_bar_get_type ()) -#define MENU_BAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MENU_BAR, MenuBar)) -#define MENU_BAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MENU_BAR, MenuBarClass)) -#define IS_MENU_BAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MENU_BAR)) -#define IS_MENU_BAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MENU_BAR)) -#define MENU_BAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MENU_BAR, MenuBarClass)) - -typedef struct _MenuBar MenuBar; -typedef struct _MenuBarClass MenuBarClass; -#define __g_list_free__g_object_unref0_0(var) ((var == NULL) ? NULL : (var = (_g_list_free__g_object_unref0_ (var), NULL))) - #define BACKGROUND_TYPE_DRAW_FLAGS (background_draw_flags_get_type ()) #define _cairo_destroy0(var) ((var == NULL) ? NULL : (var = (cairo_destroy (var), NULL))) +#define _prompt_unref0(var) ((var == NULL) ? NULL : (var = (prompt_unref (var), NULL))) +typedef struct _PromptPrivate PromptPrivate; #define _cairo_surface_destroy0(var) ((var == NULL) ? NULL : (var = (cairo_surface_destroy (var), NULL))) #define _g_timer_destroy0(var) ((var == NULL) ? NULL : (var = (g_timer_destroy (var), NULL))) #define _g_option_context_free0(var) ((var == NULL) ? NULL : (var = (g_option_context_free (var), NULL))) #define _unity_greeter_unref0(var) ((var == NULL) ? NULL : (var = (unity_greeter_unref (var), NULL))) typedef struct _ParamSpecUnityGreeter ParamSpecUnityGreeter; +typedef struct _ParamSpecPrompt ParamSpecPrompt; struct _UnityGreeter { GTypeInstance parent_instance; @@ -143,18 +158,20 @@ }; struct _UnityGreeterPrivate { - GFile* state_file; + gchar* state_file; GKeyFile* state; SettingsDaemon* settings_daemon; MainWindow* main_window; LightDMGreeter* greeter; gboolean prompted; gboolean clear_messages; + GList* active_prompts; gchar* authenticate_user; GList* test_backgrounds; gint n_test_entries; gchar* test_username; gboolean test_prompted_sso; + gchar* test_two_prompts_first; gboolean test_request_new_password; gchar* test_new_password; gboolean test_is_authenticated; @@ -175,6 +192,7 @@ GtkWindow parent_instance; MainWindowPrivate * priv; UserList* user_list; + MenuBar* menubar; }; struct _MainWindowClass { @@ -186,7 +204,6 @@ UserListPrivate * priv; Background* background; MenuBar* menubar; - gchar* default_session; }; struct _UserListClass { @@ -198,10 +215,27 @@ BACKGROUND_DRAW_FLAGS_GRID } BackgroundDrawFlags; +struct _Prompt { + GTypeInstance parent_instance; + volatile int ref_count; + PromptPrivate * priv; + gchar* text; + LightDMPromptType type; +}; + +struct _PromptClass { + GTypeClass parent_class; + void (*finalize) (Prompt *self); +}; + struct _ParamSpecUnityGreeter { GParamSpec parent_instance; }; +struct _ParamSpecPrompt { + GParamSpec parent_instance; +}; + static gpointer unity_greeter_parent_class = NULL; static gboolean unity_greeter_show_version; @@ -212,6 +246,7 @@ static GTimer* unity_greeter_log_timer = NULL; static cairo_surface_t* unity_greeter_background_surface; static cairo_surface_t* unity_greeter_background_surface = NULL; +static gpointer prompt_parent_class = NULL; #define grid_size 40 gpointer unity_greeter_ref (gpointer instance); @@ -224,10 +259,19 @@ GType user_list_get_type (void) G_GNUC_CONST; GType settings_daemon_get_type (void) G_GNUC_CONST; GType main_window_get_type (void) G_GNUC_CONST; +gpointer prompt_ref (gpointer instance); +void prompt_unref (gpointer instance); +GParamSpec* param_spec_prompt (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); +void value_set_prompt (GValue* value, gpointer v_object); +void value_take_prompt (GValue* value, gpointer v_object); +gpointer value_get_prompt (const GValue* value); +GType prompt_get_type (void) G_GNUC_CONST; #define UNITY_GREETER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_UNITY_GREETER, UnityGreeterPrivate)) enum { UNITY_GREETER_DUMMY_PROPERTY }; +static void _prompt_unref0_ (gpointer var); +static void _g_list_free__prompt_unref0_ (GList* self); static void _g_free0_ (gpointer var); static void _g_list_free__g_free0_ (GList* self); GType test_entry_get_type (void) G_GNUC_CONST; @@ -241,6 +285,8 @@ static void _unity_greeter_show_message_cb_lightdm_greeter_show_message (LightDMGreeter* _sender, const gchar* text, LightDMMessageType type, gpointer self); static void unity_greeter_show_prompt_cb (UnityGreeter* self, const gchar* text, LightDMPromptType type); static void _unity_greeter_show_prompt_cb_lightdm_greeter_show_prompt (LightDMGreeter* _sender, const gchar* text, LightDMPromptType type, gpointer self); +static void __lambda7_ (UnityGreeter* self); +static void ___lambda7__lightdm_greeter_autologin_timer_expired (LightDMGreeter* _sender, gpointer self); static void unity_greeter_authentication_complete_cb (UnityGreeter* self); static void _unity_greeter_authentication_complete_cb_lightdm_greeter_authentication_complete (LightDMGreeter* _sender, gpointer self); SettingsDaemon* settings_daemon_new (void); @@ -249,13 +295,13 @@ void settings_daemon_start_finish (SettingsDaemon* self, GAsyncResult* _res_); MainWindow* main_window_new (void); MainWindow* main_window_construct (GType object_type); +GType menu_bar_get_type (void) G_GNUC_CONST; static gboolean unity_greeter_add_test_entry (UnityGreeter* self); void user_list_set_offer_guest (UserList* self, gboolean value); static gboolean unity_greeter_key_press_cb (UnityGreeter* self, GdkEventKey* event); static gboolean _unity_greeter_key_press_cb_gtk_widget_key_press_event (GtkWidget* _sender, GdkEventKey* event, gpointer self); void user_list_set_active_entry (UserList* self, const gchar* name); -GType background_get_type (void) G_GNUC_CONST; -GType menu_bar_get_type (void) G_GNUC_CONST; +void user_list_set_default_session (UserList* self, const gchar* value); void user_list_set_always_show_manual (UserList* self, gboolean value); static void unity_greeter_user_added_cb (UnityGreeter* self, LightDMUser* user); static void _unity_greeter_user_added_cb_lightdm_user_list_user_added (LightDMUserList* _sender, LightDMUser* user, gpointer self); @@ -285,10 +331,14 @@ void unity_greeter_show (UnityGreeter* self); void user_list_clear_messages (UserList* self); void user_list_show_message (UserList* self, const gchar* text, gboolean is_error); +Prompt* prompt_new (const gchar* text, LightDMPromptType type); +Prompt* prompt_construct (GType object_type, const gchar* text, LightDMPromptType type); +static void unity_greeter_set_prompt (UnityGreeter* self, const gchar* text, LightDMPromptType type); const gchar* user_list_get_manual_username (UserList* self); void user_list_set_manual_username (UserList* self, const gchar* value); void user_list_show_prompt (UserList* self, const gchar* text, gboolean secret); static void unity_greeter_background_loaded_cb (UnityGreeter* self, GParamSpec* pspec); +GType background_get_type (void) G_GNUC_CONST; gdouble background_get_alpha (Background* self); static void _unity_greeter_background_loaded_cb_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self); static void unity_greeter_start_session (UnityGreeter* self); @@ -300,8 +350,9 @@ void user_list_show_authenticated (UserList* self, gboolean successful); gboolean user_list_have_messages (UserList* self); static void unity_greeter_start_authentication (UnityGreeter* self); -static GdkFilterReturn unity_greeter_focus_upon_map (UnityGreeter* self, XEvent* xevent, GdkEvent* event); -void user_list_focus_prompt (UserList* self); +static GdkFilterReturn unity_greeter_focus_upon_map (UnityGreeter* self, GdkXEvent* gxevent, GdkEvent* event); +GtkWindow* menu_bar_get_keyboard_window (MenuBar* self); +static GdkFilterReturn _unity_greeter_focus_upon_map_gdk_filter_func (GdkXEvent* xevent, GdkEvent* event, gpointer self); static cairo_surface_t* unity_greeter_create_root_surface (GdkScreen* screen); static void unity_greeter_log_cb (const gchar* log_domain, GLogLevelFlags log_level, const gchar* message); gint unity_greeter_main (gchar** args, int args_length1); @@ -316,12 +367,27 @@ #define UG_SETTINGS_KEY_XFT_HINTSTYLE "xft-hintstyle" #define UG_SETTINGS_KEY_XFT_RGBA "xft-rgba" static void unity_greeter_finalize (UnityGreeter* obj); +enum { + PROMPT_DUMMY_PROPERTY +}; +static void prompt_finalize (Prompt* obj); static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func); static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func); static gint _vala_array_length (gpointer array); const GOptionEntry UNITY_GREETER_options[3] = {{"version", 'v', 0, G_OPTION_ARG_NONE, &unity_greeter_show_version, "Show release version", NULL}, {"test-mode", (gchar) 0, 0, G_OPTION_ARG_NONE, &unity_greeter_test_mode, "Run in test mode", NULL}, {NULL}}; -static const TestEntry UNITY_GREETER_test_entries[26] = {{"has-password", "Has Password", "*", "uk;us", FALSE, FALSE, NULL}, {"different-prompt", "Different Prompt", "*", "uk;us", FALSE, FALSE, NULL}, {"no-password", "No Password", "*", "uk;us", FALSE, FALSE, NULL}, {"change-password", "Change Password", "*", "uk;us", FALSE, FALSE, NULL}, {"auth-error", "Auth Error", "*", "uk;us", FALSE, FALSE, NULL}, {"two-factor", "Two Factor", "*", "uk;us", FALSE, FALSE, NULL}, {"info-prompt", "Info Prompt", "*", "uk;us", FALSE, FALSE, NULL}, {"long-info-prompt", "Long Info Prompt", "*", "uk;us", FALSE, FALSE, NULL}, {"wide-info-prompt", "Wide Info Prompt", "*", "uk;us", FALSE, FALSE, NULL}, {"multi-info-prompt", "Multi Info Prompt", "*", "uk;us", FALSE, FALSE, NULL}, {"very-very-long-name", "Long name (far too long to fit)", "*", "uk;us", FALSE, FALSE, NULL}, {"long-name-and-messages", "Long name and messages", "*", "uk;us", FALSE, TRUE, NULL}, {"active", "Active Account", "*", "uk;us", TRUE, FALSE, NULL}, {"has-messages", "Has Messages", "*", "uk;us", FALSE, TRUE, NULL}, {"gnome", "GNOME", "*", "uk;us", FALSE, FALSE, "gnome-shell"}, {"locked", "Locked Account", "*", "uk;us", FALSE, FALSE, NULL}, {"color-background", "Color Background", "#dd4814", "uk;us", FALSE, FALSE, NULL}, {"white-background", "White Background", "#ffffff", "uk;us", FALSE, FALSE, NULL}, {"black-background", "Black Background", "#000000", "uk;us", FALSE, FALSE, NULL}, {"no-background", "No Background", NULL, "uk;us", FALSE, FALSE, NULL}, {"unicode", "가나다라마", "*", "uk;us", FALSE, FALSE, NULL}, {"system-layout", "System Layout", "*", NULL, FALSE, FALSE, NULL}, {"four-layouts", "Four Layouts", "*", "de\tdvorak;ca;gb;fr\toss", FALSE, FALSE, NULL}, {"hy-layout", "Layout Is 'hy'", "*", "am\teastern-alt", FALSE, FALSE, NULL}, {"no-response", "No Response", "*", NULL, FALSE, FALSE, NULL}, {"", "", NULL, NULL, FALSE, FALSE, NULL}}; +static const TestEntry UNITY_GREETER_test_entries[27] = {{"has-password", "Has Password", "*", "uk;us", FALSE, FALSE, NULL}, {"different-prompt", "Different Prompt", "*", "uk;us", FALSE, FALSE, NULL}, {"no-password", "No Password", "*", "uk;us", FALSE, FALSE, NULL}, {"change-password", "Change Password", "*", "uk;us", FALSE, FALSE, NULL}, {"auth-error", "Auth Error", "*", "uk;us", FALSE, FALSE, NULL}, {"two-factor", "Two Factor", "*", "uk;us", FALSE, FALSE, NULL}, {"two-prompts", "Two Prompts", "*", "uk;us", FALSE, FALSE, NULL}, {"info-prompt", "Info Prompt", "*", "uk;us", FALSE, FALSE, NULL}, {"long-info-prompt", "Long Info Prompt", "*", "uk;us", FALSE, FALSE, NULL}, {"wide-info-prompt", "Wide Info Prompt", "*", "uk;us", FALSE, FALSE, NULL}, {"multi-info-prompt", "Multi Info Prompt", "*", "uk;us", FALSE, FALSE, NULL}, {"very-very-long-name", "Long name (far too long to fit)", "*", "uk;us", FALSE, FALSE, NULL}, {"long-name-and-messages", "Long name and messages", "*", "uk;us", FALSE, TRUE, NULL}, {"active", "Active Account", "*", "uk;us", TRUE, FALSE, NULL}, {"has-messages", "Has Messages", "*", "uk;us", FALSE, TRUE, NULL}, {"gnome", "GNOME", "*", "uk;us", FALSE, FALSE, "gnome-shell"}, {"locked", "Locked Account", "*", "uk;us", FALSE, FALSE, NULL}, {"color-background", "Color Background", "#dd4814", "uk;us", FALSE, FALSE, NULL}, {"white-background", "White Background", "#ffffff", "uk;us", FALSE, FALSE, NULL}, {"black-background", "Black Background", "#000000", "uk;us", FALSE, FALSE, NULL}, {"no-background", "No Background", NULL, "uk;us", FALSE, FALSE, NULL}, {"unicode", "가나다라마", "*", "uk;us", FALSE, FALSE, NULL}, {"system-layout", "System Layout", "*", NULL, FALSE, FALSE, NULL}, {"four-layouts", "Four Layouts", "*", "de\tdvorak;ca;gb;fr\toss", FALSE, FALSE, NULL}, {"hy-layout", "Layout Is 'hy'", "*", "am\teastern-alt", FALSE, FALSE, NULL}, {"no-response", "No Response", "*", NULL, FALSE, FALSE, NULL}, {"", "", NULL, NULL, FALSE, FALSE, NULL}}; + +static void _prompt_unref0_ (gpointer var) { + (var == NULL) ? NULL : (var = (prompt_unref (var), NULL)); +} + + +static void _g_list_free__prompt_unref0_ (GList* self) { + g_list_foreach (self, (GFunc) _prompt_unref0_, NULL); + g_list_free (self); +} + static void _g_free0_ (gpointer var) { var = (g_free (var), NULL); @@ -344,6 +410,18 @@ } +static void __lambda7_ (UnityGreeter* self) { + LightDMGreeter* _tmp0_; + _tmp0_ = self->priv->greeter; + lightdm_greeter_authenticate_autologin (_tmp0_); +} + + +static void ___lambda7__lightdm_greeter_autologin_timer_expired (LightDMGreeter* _sender, gpointer self) { + __lambda7_ (self); +} + + static void _unity_greeter_authentication_complete_cb_lightdm_greeter_authentication_complete (LightDMGreeter* _sender, gpointer self) { unity_greeter_authentication_complete_cb (self); } @@ -404,34 +482,33 @@ LightDMGreeter* _tmp1_; LightDMGreeter* _tmp2_; LightDMGreeter* _tmp3_; + LightDMGreeter* _tmp4_; gboolean connected; - gboolean _tmp7_ = FALSE; - gboolean _tmp8_; - gboolean _tmp10_; + gboolean _tmp8_ = FALSE; + gboolean _tmp9_; gboolean _tmp11_; - const gchar* _tmp14_ = NULL; - gchar* _tmp15_ = NULL; + gboolean _tmp12_; + const gchar* _tmp15_ = NULL; + gchar* _tmp16_ = NULL; gchar* state_dir; - const gchar* _tmp16_; const gchar* _tmp17_; - gchar* _tmp18_ = NULL; - gchar* _tmp19_; - GFile* _tmp20_ = NULL; - GKeyFile* _tmp21_; - gchar* _tmp32_; + const gchar* _tmp18_; + gchar* _tmp19_ = NULL; + GKeyFile* _tmp20_; + gchar* _tmp27_; gchar* last_user; - MainWindow* _tmp36_; - MainWindow* _tmp37_; - MainWindow* _tmp38_; - UserList* _tmp39_; - UserList* _tmp40_; - gboolean _tmp41_; - UserList* _tmp90_; - UserList* _tmp91_; - UserList* _tmp92_; - UserList* _tmp93_; - const gchar* _tmp94_; - const gchar* _tmp95_; + MainWindow* _tmp31_; + MainWindow* _tmp32_; + MainWindow* _tmp33_; + UserList* _tmp34_; + UserList* _tmp35_; + gboolean _tmp36_; + UserList* _tmp84_; + UserList* _tmp85_; + UserList* _tmp86_; + UserList* _tmp87_; + const gchar* _tmp88_; + const gchar* _tmp89_; GError * _inner_error_ = NULL; self = (UnityGreeter*) g_type_create_instance (object_type); _tmp0_ = lightdm_greeter_new (); @@ -442,19 +519,21 @@ _tmp2_ = self->priv->greeter; g_signal_connect (_tmp2_, "show-prompt", (GCallback) _unity_greeter_show_prompt_cb_lightdm_greeter_show_prompt, self); _tmp3_ = self->priv->greeter; - g_signal_connect (_tmp3_, "authentication-complete", (GCallback) _unity_greeter_authentication_complete_cb_lightdm_greeter_authentication_complete, self); + g_signal_connect (_tmp3_, "autologin-timer-expired", (GCallback) ___lambda7__lightdm_greeter_autologin_timer_expired, self); + _tmp4_ = self->priv->greeter; + g_signal_connect (_tmp4_, "authentication-complete", (GCallback) _unity_greeter_authentication_complete_cb_lightdm_greeter_authentication_complete, self); connected = FALSE; { - LightDMGreeter* _tmp4_; - gboolean _tmp5_ = FALSE; - gboolean _tmp6_; - _tmp4_ = self->priv->greeter; - _tmp5_ = lightdm_greeter_connect_sync (_tmp4_, &_inner_error_); - _tmp6_ = _tmp5_; + LightDMGreeter* _tmp5_; + gboolean _tmp6_ = FALSE; + gboolean _tmp7_; + _tmp5_ = self->priv->greeter; + _tmp6_ = lightdm_greeter_connect_sync (_tmp5_, &_inner_error_); + _tmp7_ = _tmp6_; if (_inner_error_ != NULL) { goto __catch12_g_error; } - connected = _tmp6_; + connected = _tmp7_; } goto __finally12; __catch12_g_error: @@ -462,7 +541,7 @@ GError* e = NULL; e = _inner_error_; _inner_error_ = NULL; - g_warning ("unity-greeter.vala:107: Failed to connect to LightDM daemon"); + g_warning ("unity-greeter.vala:112: Failed to connect to LightDM daemon"); _g_error_free0 (e); } __finally12: @@ -471,54 +550,46 @@ g_clear_error (&_inner_error_); return NULL; } - _tmp8_ = connected; - if (!_tmp8_) { - gboolean _tmp9_; - _tmp9_ = unity_greeter_test_mode; - _tmp7_ = !_tmp9_; + _tmp9_ = connected; + if (!_tmp9_) { + gboolean _tmp10_; + _tmp10_ = unity_greeter_test_mode; + _tmp8_ = !_tmp10_; } else { - _tmp7_ = FALSE; + _tmp8_ = FALSE; } - _tmp10_ = _tmp7_; - if (_tmp10_) { + _tmp11_ = _tmp8_; + if (_tmp11_) { exit (EXIT_FAILURE); } - _tmp11_ = unity_greeter_test_mode; - if (!_tmp11_) { - SettingsDaemon* _tmp12_; + _tmp12_ = unity_greeter_test_mode; + if (!_tmp12_) { SettingsDaemon* _tmp13_; - _tmp12_ = settings_daemon_new (); + SettingsDaemon* _tmp14_; + _tmp13_ = settings_daemon_new (); _g_object_unref0 (self->priv->settings_daemon); - self->priv->settings_daemon = _tmp12_; - _tmp13_ = self->priv->settings_daemon; - settings_daemon_start (_tmp13_, NULL, NULL); - } - _tmp14_ = g_get_user_cache_dir (); - _tmp15_ = g_build_filename (_tmp14_, "unity-greeter", NULL); - state_dir = _tmp15_; - _tmp16_ = state_dir; - g_mkdir_with_parents (_tmp16_, 0775); + self->priv->settings_daemon = _tmp13_; + _tmp14_ = self->priv->settings_daemon; + settings_daemon_start (_tmp14_, NULL, NULL); + } + _tmp15_ = g_get_user_cache_dir (); + _tmp16_ = g_build_filename (_tmp15_, "unity-greeter", NULL); + state_dir = _tmp16_; _tmp17_ = state_dir; - _tmp18_ = g_build_filename (_tmp17_, "state", NULL); - _tmp19_ = _tmp18_; - _tmp20_ = g_file_new_for_path (_tmp19_); - _g_object_unref0 (self->priv->state_file); - self->priv->state_file = _tmp20_; - _g_free0 (_tmp19_); - _tmp21_ = g_key_file_new (); + g_mkdir_with_parents (_tmp17_, 0775); + _tmp18_ = state_dir; + _tmp19_ = g_build_filename (_tmp18_, "state", NULL); + _g_free0 (self->priv->state_file); + self->priv->state_file = _tmp19_; + _tmp20_ = g_key_file_new (); _g_key_file_free0 (self->priv->state); - self->priv->state = _tmp21_; + self->priv->state = _tmp20_; { - GKeyFile* _tmp22_; - GFile* _tmp23_; - gchar* _tmp24_ = NULL; - gchar* _tmp25_; - _tmp22_ = self->priv->state; - _tmp23_ = self->priv->state_file; - _tmp24_ = g_file_get_path (_tmp23_); - _tmp25_ = _tmp24_; - g_key_file_load_from_file (_tmp22_, _tmp25_, G_KEY_FILE_NONE, &_inner_error_); - _g_free0 (_tmp25_); + GKeyFile* _tmp21_; + const gchar* _tmp22_; + _tmp21_ = self->priv->state; + _tmp22_ = self->priv->state_file; + g_key_file_load_from_file (_tmp21_, _tmp22_, G_KEY_FILE_NONE, &_inner_error_); if (_inner_error_ != NULL) { goto __catch13_g_error; } @@ -527,23 +598,18 @@ __catch13_g_error: { GError* e = NULL; - GError* _tmp26_; + GError* _tmp23_; e = _inner_error_; _inner_error_ = NULL; - _tmp26_ = e; - if (!g_error_matches (_tmp26_, G_FILE_ERROR, G_FILE_ERROR_NOENT)) { - GFile* _tmp27_; - gchar* _tmp28_ = NULL; - gchar* _tmp29_; - GError* _tmp30_; - const gchar* _tmp31_; - _tmp27_ = self->priv->state_file; - _tmp28_ = g_file_get_path (_tmp27_); - _tmp29_ = _tmp28_; - _tmp30_ = e; - _tmp31_ = _tmp30_->message; - g_warning ("unity-greeter.vala:130: Failed to load state from %s: %s\n", _tmp29_, _tmp31_); - _g_free0 (_tmp29_); + _tmp23_ = e; + if (!g_error_matches (_tmp23_, G_FILE_ERROR, G_FILE_ERROR_NOENT)) { + const gchar* _tmp24_; + GError* _tmp25_; + const gchar* _tmp26_; + _tmp24_ = self->priv->state_file; + _tmp25_ = e; + _tmp26_ = _tmp25_->message; + g_warning ("unity-greeter.vala:135: Failed to load state from %s: %s\n", _tmp24_, _tmp26_); } _g_error_free0 (e); } @@ -554,20 +620,20 @@ g_clear_error (&_inner_error_); return NULL; } - _tmp32_ = g_strdup (""); - last_user = _tmp32_; + _tmp27_ = g_strdup (""); + last_user = _tmp27_; { - GKeyFile* _tmp33_; - gchar* _tmp34_ = NULL; - gchar* _tmp35_; - _tmp33_ = self->priv->state; - _tmp34_ = g_key_file_get_value (_tmp33_, "greeter", "last-user", &_inner_error_); - _tmp35_ = _tmp34_; + GKeyFile* _tmp28_; + gchar* _tmp29_ = NULL; + gchar* _tmp30_; + _tmp28_ = self->priv->state; + _tmp29_ = g_key_file_get_value (_tmp28_, "greeter", "last-user", &_inner_error_); + _tmp30_ = _tmp29_; if (_inner_error_ != NULL) { goto __catch14_g_error; } _g_free0 (last_user); - last_user = _tmp35_; + last_user = _tmp30_; } goto __finally14; __catch14_g_error: @@ -585,27 +651,27 @@ g_clear_error (&_inner_error_); return NULL; } - _tmp36_ = main_window_new (); - _tmp37_ = g_object_ref_sink (_tmp36_); + _tmp31_ = main_window_new (); + _tmp32_ = g_object_ref_sink (_tmp31_); _g_object_unref0 (self->priv->main_window); - self->priv->main_window = _tmp37_; - _tmp38_ = self->priv->main_window; - _tmp39_ = _tmp38_->user_list; - _tmp40_ = _g_object_ref0 (_tmp39_); + self->priv->main_window = _tmp32_; + _tmp33_ = self->priv->main_window; + _tmp34_ = _tmp33_->user_list; + _tmp35_ = _g_object_ref0 (_tmp34_); _g_object_unref0 (self->user_list); - self->user_list = _tmp40_; - _tmp41_ = unity_greeter_test_mode; - if (_tmp41_) { - UserList* _tmp50_; - MainWindow* _tmp51_; - const gchar* _tmp52_; + self->user_list = _tmp35_; + _tmp36_ = unity_greeter_test_mode; + if (_tmp36_) { + UserList* _tmp45_; + MainWindow* _tmp46_; + const gchar* _tmp47_; __g_list_free__g_free0_0 (self->priv->test_backgrounds); self->priv->test_backgrounds = NULL; { - GDir* _tmp42_ = NULL; + GDir* _tmp37_ = NULL; GDir* dir; - _tmp42_ = g_dir_open ("/usr/share/backgrounds/", (guint) 0, &_inner_error_); - dir = _tmp42_; + _tmp37_ = g_dir_open ("/usr/share/backgrounds/", (guint) 0, &_inner_error_); + dir = _tmp37_; if (_inner_error_ != NULL) { if (_inner_error_->domain == G_FILE_ERROR) { goto __catch15_g_file_error; @@ -617,25 +683,25 @@ return NULL; } while (TRUE) { - GDir* _tmp43_; - const gchar* _tmp44_ = NULL; - gchar* _tmp45_; + GDir* _tmp38_; + const gchar* _tmp39_ = NULL; + gchar* _tmp40_; gchar* bg; - const gchar* _tmp46_; - const gchar* _tmp47_; - gchar* _tmp48_; - _tmp43_ = dir; - _tmp44_ = g_dir_read_name (_tmp43_); - _tmp45_ = g_strdup (_tmp44_); - bg = _tmp45_; - _tmp46_ = bg; - if (_tmp46_ == NULL) { + const gchar* _tmp41_; + const gchar* _tmp42_; + gchar* _tmp43_; + _tmp38_ = dir; + _tmp39_ = g_dir_read_name (_tmp38_); + _tmp40_ = g_strdup (_tmp39_); + bg = _tmp40_; + _tmp41_ = bg; + if (_tmp41_ == NULL) { _g_free0 (bg); break; } - _tmp47_ = bg; - _tmp48_ = g_strconcat ("/usr/share/backgrounds/", _tmp47_, NULL); - self->priv->test_backgrounds = g_list_append (self->priv->test_backgrounds, _tmp48_); + _tmp42_ = bg; + _tmp43_ = g_strconcat ("/usr/share/backgrounds/", _tmp42_, NULL); + self->priv->test_backgrounds = g_list_append (self->priv->test_backgrounds, _tmp43_); _g_free0 (bg); } _g_dir_close0 (dir); @@ -657,140 +723,137 @@ return NULL; } while (TRUE) { - gboolean _tmp49_ = FALSE; - _tmp49_ = unity_greeter_add_test_entry (self); - if (!_tmp49_) { + gboolean _tmp44_ = FALSE; + _tmp44_ = unity_greeter_add_test_entry (self); + if (!_tmp44_) { break; } } - _tmp50_ = self->user_list; - user_list_set_offer_guest (_tmp50_, TRUE); - _tmp51_ = self->priv->main_window; - g_signal_connect ((GtkWidget*) _tmp51_, "key-press-event", (GCallback) _unity_greeter_key_press_cb_gtk_widget_key_press_event, self); - _tmp52_ = last_user; - if (_tmp52_ != NULL) { - UserList* _tmp53_; - const gchar* _tmp54_; - _tmp53_ = self->user_list; - _tmp54_ = last_user; - user_list_set_active_entry (_tmp53_, _tmp54_); + _tmp45_ = self->user_list; + user_list_set_offer_guest (_tmp45_, TRUE); + _tmp46_ = self->priv->main_window; + g_signal_connect ((GtkWidget*) _tmp46_, "key-press-event", (GCallback) _unity_greeter_key_press_cb_gtk_widget_key_press_event, self); + _tmp47_ = last_user; + if (_tmp47_ != NULL) { + UserList* _tmp48_; + const gchar* _tmp49_; + _tmp48_ = self->user_list; + _tmp49_ = last_user; + user_list_set_active_entry (_tmp48_, _tmp49_); } } else { - UserList* _tmp55_; - LightDMGreeter* _tmp56_; - const gchar* _tmp57_; - const gchar* _tmp58_; - gchar* _tmp59_; - UserList* _tmp60_; - LightDMGreeter* _tmp61_; - gboolean _tmp62_; - gboolean _tmp63_; - LightDMGreeter* _tmp64_; - gboolean _tmp65_; - gboolean _tmp66_; - LightDMGreeter* _tmp76_; - gboolean _tmp77_; - gboolean _tmp78_; - LightDMGreeter* _tmp80_; - const gchar* _tmp81_; - const gchar* _tmp82_; - _tmp55_ = self->user_list; - _tmp56_ = self->priv->greeter; - _tmp57_ = lightdm_greeter_get_default_session_hint (_tmp56_); - _tmp58_ = _tmp57_; - _tmp59_ = g_strdup (_tmp58_); - _g_free0 (_tmp55_->default_session); - _tmp55_->default_session = _tmp59_; - _tmp60_ = self->user_list; - _tmp61_ = self->priv->greeter; - _tmp62_ = lightdm_greeter_get_show_manual_login_hint (_tmp61_); - _tmp63_ = _tmp62_; - user_list_set_always_show_manual (_tmp60_, _tmp63_); - _tmp64_ = self->priv->greeter; - _tmp65_ = lightdm_greeter_get_hide_users_hint (_tmp64_); - _tmp66_ = _tmp65_; - if (!_tmp66_) { - LightDMUserList* _tmp67_ = NULL; - LightDMUserList* _tmp68_; + UserList* _tmp50_; + LightDMGreeter* _tmp51_; + const gchar* _tmp52_; + const gchar* _tmp53_; + UserList* _tmp54_; + LightDMGreeter* _tmp55_; + gboolean _tmp56_; + gboolean _tmp57_; + LightDMGreeter* _tmp58_; + gboolean _tmp59_; + gboolean _tmp60_; + LightDMGreeter* _tmp70_; + gboolean _tmp71_; + gboolean _tmp72_; + LightDMGreeter* _tmp74_; + const gchar* _tmp75_; + const gchar* _tmp76_; + _tmp50_ = self->user_list; + _tmp51_ = self->priv->greeter; + _tmp52_ = lightdm_greeter_get_default_session_hint (_tmp51_); + _tmp53_ = _tmp52_; + user_list_set_default_session (_tmp50_, _tmp53_); + _tmp54_ = self->user_list; + _tmp55_ = self->priv->greeter; + _tmp56_ = lightdm_greeter_get_show_manual_login_hint (_tmp55_); + _tmp57_ = _tmp56_; + user_list_set_always_show_manual (_tmp54_, _tmp57_); + _tmp58_ = self->priv->greeter; + _tmp59_ = lightdm_greeter_get_hide_users_hint (_tmp58_); + _tmp60_ = _tmp59_; + if (!_tmp60_) { + LightDMUserList* _tmp61_ = NULL; + LightDMUserList* _tmp62_; LightDMUserList* users; - LightDMUserList* _tmp69_; - LightDMUserList* _tmp70_; - LightDMUserList* _tmp71_; - LightDMUserList* _tmp72_; - GList* _tmp73_; - GList* _tmp74_; - _tmp67_ = lightdm_user_list_get_instance (); - _tmp68_ = _g_object_ref0 (_tmp67_); - users = _tmp68_; - _tmp69_ = users; - g_signal_connect (_tmp69_, "user-added", (GCallback) _unity_greeter_user_added_cb_lightdm_user_list_user_added, self); - _tmp70_ = users; - g_signal_connect (_tmp70_, "user-changed", (GCallback) _unity_greeter_user_added_cb_lightdm_user_list_user_changed, self); - _tmp71_ = users; - g_signal_connect (_tmp71_, "user-removed", (GCallback) _unity_greeter_user_removed_cb_lightdm_user_list_user_removed, self); - _tmp72_ = users; - _tmp73_ = lightdm_user_list_get_users (_tmp72_); - _tmp74_ = _tmp73_; + LightDMUserList* _tmp63_; + LightDMUserList* _tmp64_; + LightDMUserList* _tmp65_; + LightDMUserList* _tmp66_; + GList* _tmp67_; + GList* _tmp68_; + _tmp61_ = lightdm_user_list_get_instance (); + _tmp62_ = _g_object_ref0 (_tmp61_); + users = _tmp62_; + _tmp63_ = users; + g_signal_connect (_tmp63_, "user-added", (GCallback) _unity_greeter_user_added_cb_lightdm_user_list_user_added, self); + _tmp64_ = users; + g_signal_connect (_tmp64_, "user-changed", (GCallback) _unity_greeter_user_added_cb_lightdm_user_list_user_changed, self); + _tmp65_ = users; + g_signal_connect (_tmp65_, "user-removed", (GCallback) _unity_greeter_user_removed_cb_lightdm_user_list_user_removed, self); + _tmp66_ = users; + _tmp67_ = lightdm_user_list_get_users (_tmp66_); + _tmp68_ = _tmp67_; { GList* user_collection = NULL; GList* user_it = NULL; - user_collection = _tmp74_; + user_collection = _tmp68_; for (user_it = user_collection; user_it != NULL; user_it = user_it->next) { LightDMUser* user = NULL; user = (LightDMUser*) user_it->data; { - LightDMUser* _tmp75_; - _tmp75_ = user; - unity_greeter_user_added_cb (self, _tmp75_); + LightDMUser* _tmp69_; + _tmp69_ = user; + unity_greeter_user_added_cb (self, _tmp69_); } } } _g_object_unref0 (users); } - _tmp76_ = self->priv->greeter; - _tmp77_ = lightdm_greeter_get_has_guest_account_hint (_tmp76_); - _tmp78_ = _tmp77_; - if (_tmp78_) { - UserList* _tmp79_; - g_debug ("unity-greeter.vala:184: Adding guest account entry"); - _tmp79_ = self->user_list; - user_list_set_offer_guest (_tmp79_, TRUE); - } - _tmp80_ = self->priv->greeter; - _tmp81_ = lightdm_greeter_get_select_user_hint (_tmp80_); - _tmp82_ = _tmp81_; - if (_tmp82_ != NULL) { - UserList* _tmp83_; - LightDMGreeter* _tmp84_; - const gchar* _tmp85_; - const gchar* _tmp86_; - _tmp83_ = self->user_list; - _tmp84_ = self->priv->greeter; - _tmp85_ = lightdm_greeter_get_select_user_hint (_tmp84_); - _tmp86_ = _tmp85_; - user_list_set_active_entry (_tmp83_, _tmp86_); + _tmp70_ = self->priv->greeter; + _tmp71_ = lightdm_greeter_get_has_guest_account_hint (_tmp70_); + _tmp72_ = _tmp71_; + if (_tmp72_) { + UserList* _tmp73_; + g_debug ("unity-greeter.vala:189: Adding guest account entry"); + _tmp73_ = self->user_list; + user_list_set_offer_guest (_tmp73_, TRUE); + } + _tmp74_ = self->priv->greeter; + _tmp75_ = lightdm_greeter_get_select_user_hint (_tmp74_); + _tmp76_ = _tmp75_; + if (_tmp76_ != NULL) { + UserList* _tmp77_; + LightDMGreeter* _tmp78_; + const gchar* _tmp79_; + const gchar* _tmp80_; + _tmp77_ = self->user_list; + _tmp78_ = self->priv->greeter; + _tmp79_ = lightdm_greeter_get_select_user_hint (_tmp78_); + _tmp80_ = _tmp79_; + user_list_set_active_entry (_tmp77_, _tmp80_); } else { - const gchar* _tmp87_; - _tmp87_ = last_user; - if (_tmp87_ != NULL) { - UserList* _tmp88_; - const gchar* _tmp89_; - _tmp88_ = self->user_list; - _tmp89_ = last_user; - user_list_set_active_entry (_tmp88_, _tmp89_); + const gchar* _tmp81_; + _tmp81_ = last_user; + if (_tmp81_ != NULL) { + UserList* _tmp82_; + const gchar* _tmp83_; + _tmp82_ = self->user_list; + _tmp83_ = last_user; + user_list_set_active_entry (_tmp82_, _tmp83_); } } } - _tmp90_ = self->user_list; - g_signal_connect (_tmp90_, "user-selected", (GCallback) _unity_greeter_user_selected_cb_user_list_user_selected, self); - _tmp91_ = self->user_list; - g_signal_connect (_tmp91_, "respond-to-prompt", (GCallback) _unity_greeter_respond_to_prompt_cb_user_list_respond_to_prompt, self); - _tmp92_ = self->user_list; - g_signal_connect (_tmp92_, "start-session", (GCallback) _unity_greeter_start_session_cb_user_list_start_session, self); - _tmp93_ = self->user_list; - _tmp94_ = user_list_get_selected (_tmp93_); - _tmp95_ = _tmp94_; - unity_greeter_user_selected_cb (self, _tmp95_); + _tmp84_ = self->user_list; + g_signal_connect (_tmp84_, "user-selected", (GCallback) _unity_greeter_user_selected_cb_user_list_user_selected, self); + _tmp85_ = self->user_list; + g_signal_connect (_tmp85_, "respond-to-prompt", (GCallback) _unity_greeter_respond_to_prompt_cb_user_list_respond_to_prompt, self); + _tmp86_ = self->user_list; + g_signal_connect (_tmp86_, "start-session", (GCallback) _unity_greeter_start_session_cb_user_list_start_session, self); + _tmp87_ = self->user_list; + _tmp88_ = user_list_get_selected (_tmp87_); + _tmp89_ = _tmp88_; + unity_greeter_user_selected_cb (self, _tmp89_); unity_greeter_start_fake_wm (self); gdk_threads_add_idle (_unity_greeter_ready_cb_gsource_func, self); _g_free0 (last_user); @@ -1183,7 +1246,7 @@ ca_context* _tmp0_ = NULL; gboolean _tmp1_ = FALSE; g_return_val_if_fail (self != NULL, FALSE); - g_debug ("unity-greeter.vala:310: starting system-ready sound"); + g_debug ("unity-greeter.vala:315: starting system-ready sound"); ca_context_create (&_tmp0_); _ca_context_destroy0 (self->priv->canberra_context); self->priv->canberra_context = _tmp0_; @@ -1243,7 +1306,7 @@ _tmp3_ = user; _tmp4_ = lightdm_user_get_real_name (_tmp3_); _tmp5_ = _tmp4_; - g_debug ("unity-greeter.vala:327: Adding/updating user %s (%s)", _tmp2_, _tmp5_); + g_debug ("unity-greeter.vala:332: Adding/updating user %s (%s)", _tmp2_, _tmp5_); _tmp6_ = user; _tmp7_ = lightdm_user_get_real_name (_tmp6_); _tmp8_ = _tmp7_; @@ -1337,7 +1400,7 @@ _tmp0_ = user; _tmp1_ = lightdm_user_get_name (_tmp0_); _tmp2_ = _tmp1_; - g_debug ("unity-greeter.vala:346: Removing user %s", _tmp2_); + g_debug ("unity-greeter.vala:351: Removing user %s", _tmp2_); _tmp3_ = self->user_list; _tmp4_ = user; _tmp5_ = lightdm_user_get_name (_tmp4_); @@ -1351,7 +1414,7 @@ MainWindow* _tmp1_; GdkWindow* _tmp2_ = NULL; g_return_if_fail (self != NULL); - g_debug ("unity-greeter.vala:352: Showing main window"); + g_debug ("unity-greeter.vala:357: Showing main window"); _tmp0_ = self->priv->main_window; gtk_widget_show ((GtkWidget*) _tmp0_); _tmp1_ = self->priv->main_window; @@ -1382,6 +1445,30 @@ static void unity_greeter_show_prompt_cb (UnityGreeter* self, const gchar* text, LightDMPromptType type) { + const gchar* _tmp0_; + LightDMPromptType _tmp1_; + Prompt* _tmp2_; + GList* _tmp3_; + guint _tmp4_ = 0U; + g_return_if_fail (self != NULL); + g_return_if_fail (text != NULL); + _tmp0_ = text; + _tmp1_ = type; + _tmp2_ = prompt_new (_tmp0_, _tmp1_); + self->priv->active_prompts = g_list_append (self->priv->active_prompts, _tmp2_); + _tmp3_ = self->priv->active_prompts; + _tmp4_ = g_list_length (_tmp3_); + if (_tmp4_ == ((guint) 1)) { + const gchar* _tmp5_; + LightDMPromptType _tmp6_; + _tmp5_ = text; + _tmp6_ = type; + unity_greeter_set_prompt (self, _tmp5_, _tmp6_); + } +} + + +static void unity_greeter_set_prompt (UnityGreeter* self, const gchar* text, LightDMPromptType type) { gboolean _tmp0_; gboolean _tmp2_ = FALSE; UserList* _tmp3_; @@ -1536,7 +1623,7 @@ _inner_error_ = NULL; _tmp11_ = e; _tmp12_ = _tmp11_->message; - g_warning ("unity-greeter.vala:418: Failed to start session: %s", _tmp12_); + g_warning ("unity-greeter.vala:430: Failed to start session: %s", _tmp12_); _g_error_free0 (e); } __finally16: @@ -1555,6 +1642,8 @@ gboolean _tmp0_; gboolean _tmp5_; g_return_if_fail (self != NULL); + __g_list_free__prompt_unref0_0 (self->priv->active_prompts); + self->priv->active_prompts = NULL; _tmp0_ = unity_greeter_test_mode; if (_tmp0_) { gboolean _tmp1_; @@ -1618,7 +1707,7 @@ _tmp20_ = gdk_screen_get_default (); _tmp21_ = unity_greeter_background_surface; unity_greeter_refresh_background (self, _tmp20_, _tmp21_); - g_debug ("unity-greeter.vala:451: Successfully logged in! Quitting..."); + g_debug ("unity-greeter.vala:465: Successfully logged in! Quitting..."); gtk_main_quit (); _cairo_destroy0 (c); } @@ -1687,9 +1776,9 @@ _tmp3_ = g_key_file_to_data (_tmp2_, NULL, NULL); data = _tmp3_; { - GFile* _tmp4_; + const gchar* _tmp4_; _tmp4_ = self->priv->state_file; - g_file_replace_contents (_tmp4_, (guint8*) data, (gsize) -1, NULL, FALSE, G_FILE_CREATE_NONE, NULL, NULL, &_inner_error_); + g_file_set_contents (_tmp4_, data, (gssize) (-1), &_inner_error_); if (_inner_error_ != NULL) { goto __catch17_g_error; } @@ -1704,7 +1793,7 @@ _inner_error_ = NULL; _tmp5_ = e; _tmp6_ = _tmp5_->message; - g_debug ("unity-greeter.vala:496: Failed to write state: %s", _tmp6_); + g_debug ("unity-greeter.vala:510: Failed to write state: %s", _tmp6_); _g_error_free0 (e); } __finally17: @@ -1726,6 +1815,8 @@ gboolean _tmp1_; g_return_if_fail (self != NULL); self->priv->prompted = FALSE; + __g_list_free__prompt_unref0_0 (self->priv->active_prompts); + self->priv->active_prompts = NULL; _tmp0_ = self->user_list; user_list_set_manual_username (_tmp0_, NULL); self->priv->clear_messages = FALSE; @@ -1745,10 +1836,13 @@ static GQuark _tmp6_label6 = 0; static GQuark _tmp6_label7 = 0; static GQuark _tmp6_label8 = 0; + static GQuark _tmp6_label9 = 0; _g_free0 (self->priv->test_username); self->priv->test_username = NULL; self->priv->test_is_authenticated = FALSE; self->priv->test_prompted_sso = FALSE; + _g_free0 (self->priv->test_two_prompts_first); + self->priv->test_two_prompts_first = NULL; self->priv->test_request_new_password = FALSE; _g_free0 (self->priv->test_new_password); self->priv->test_new_password = NULL; @@ -1871,118 +1965,162 @@ break; } } - } else { + } else if (_tmp7_ == ((0 != _tmp6_label9) ? _tmp6_label9 : (_tmp6_label9 = g_quark_from_static_string ("two-prompts")))) { switch (0) { default: { const gchar* _tmp17_ = NULL; - _tmp17_ = _ ("Password:"); - unity_greeter_show_prompt_cb (self, _tmp17_, LIGHTDM_PROMPT_TYPE_SECRET); + const gchar* _tmp18_ = NULL; + _tmp17_ = _ ("Favorite Color (blue):"); + unity_greeter_show_prompt_cb (self, _tmp17_, LIGHTDM_PROMPT_TYPE_QUESTION); + _tmp18_ = _ ("Password:"); + unity_greeter_show_prompt_cb (self, _tmp18_, LIGHTDM_PROMPT_TYPE_SECRET); + break; + } + } + } else { + switch (0) { + default: + { + const gchar* _tmp19_ = NULL; + _tmp19_ = _ ("Password:"); + unity_greeter_show_prompt_cb (self, _tmp19_, LIGHTDM_PROMPT_TYPE_SECRET); break; } } } } else { - UserList* _tmp18_; - const gchar* _tmp19_; - const gchar* _tmp20_; - _tmp18_ = self->user_list; - _tmp19_ = user_list_get_selected (_tmp18_); - _tmp20_ = _tmp19_; - if (g_strcmp0 (_tmp20_, "*other") == 0) { - LightDMGreeter* _tmp21_; - _tmp21_ = self->priv->greeter; - lightdm_greeter_authenticate (_tmp21_, NULL); + UserList* _tmp20_; + const gchar* _tmp21_; + const gchar* _tmp22_; + _tmp20_ = self->user_list; + _tmp21_ = user_list_get_selected (_tmp20_); + _tmp22_ = _tmp21_; + if (g_strcmp0 (_tmp22_, "*other") == 0) { + LightDMGreeter* _tmp23_; + _tmp23_ = self->priv->greeter; + lightdm_greeter_authenticate (_tmp23_, NULL); } else { - UserList* _tmp22_; - const gchar* _tmp23_; - const gchar* _tmp24_; - _tmp22_ = self->user_list; - _tmp23_ = user_list_get_selected (_tmp22_); - _tmp24_ = _tmp23_; - if (g_strcmp0 (_tmp24_, "*guest") == 0) { - LightDMGreeter* _tmp25_; - _tmp25_ = self->priv->greeter; - lightdm_greeter_authenticate_as_guest (_tmp25_); + UserList* _tmp24_; + const gchar* _tmp25_; + const gchar* _tmp26_; + _tmp24_ = self->user_list; + _tmp25_ = user_list_get_selected (_tmp24_); + _tmp26_ = _tmp25_; + if (g_strcmp0 (_tmp26_, "*guest") == 0) { + LightDMGreeter* _tmp27_; + _tmp27_ = self->priv->greeter; + lightdm_greeter_authenticate_as_guest (_tmp27_); } else { - LightDMGreeter* _tmp26_; - UserList* _tmp27_; - const gchar* _tmp28_; - const gchar* _tmp29_; - _tmp26_ = self->priv->greeter; - _tmp27_ = self->user_list; - _tmp28_ = user_list_get_selected (_tmp27_); - _tmp29_ = _tmp28_; - lightdm_greeter_authenticate (_tmp26_, _tmp29_); + LightDMGreeter* _tmp28_; + UserList* _tmp29_; + const gchar* _tmp30_; + const gchar* _tmp31_; + _tmp28_ = self->priv->greeter; + _tmp29_ = self->user_list; + _tmp30_ = user_list_get_selected (_tmp29_); + _tmp31_ = _tmp30_; + lightdm_greeter_authenticate (_tmp28_, _tmp31_); } } } } +static gpointer _prompt_ref0 (gpointer self) { + return self ? prompt_ref (self) : NULL; +} + + static void unity_greeter_respond_to_prompt_cb (UnityGreeter* self, const gchar* text) { - gboolean _tmp0_; + GList* _tmp0_; + GList* _tmp1_ = NULL; + Prompt* next_prompt; + GList* _tmp2_; + guint _tmp3_ = 0U; + gboolean _tmp8_; + Prompt* _tmp42_; g_return_if_fail (self != NULL); g_return_if_fail (text != NULL); - _tmp0_ = unity_greeter_test_mode; - if (_tmp0_) { - const gchar* _tmp1_; - UserList* _tmp2_; - const gchar* _tmp3_; - const gchar* _tmp4_; - const gchar* _tmp5_; - GQuark _tmp7_ = 0U; - static GQuark _tmp6_label0 = 0; - static GQuark _tmp6_label1 = 0; - static GQuark _tmp6_label2 = 0; - static GQuark _tmp6_label3 = 0; - static GQuark _tmp6_label4 = 0; - _tmp1_ = text; - g_debug ("unity-greeter.vala:586: response %s", _tmp1_); - _tmp2_ = self->user_list; - _tmp3_ = user_list_get_selected (_tmp2_); - _tmp4_ = _tmp3_; - _tmp5_ = _tmp4_; - _tmp7_ = (NULL == _tmp5_) ? 0 : g_quark_from_string (_tmp5_); - if (_tmp7_ == ((0 != _tmp6_label0) ? _tmp6_label0 : (_tmp6_label0 = g_quark_from_static_string ("*other")))) { + _tmp0_ = self->priv->active_prompts; + _tmp1_ = g_list_first (_tmp0_); + self->priv->active_prompts = g_list_remove_link (self->priv->active_prompts, _tmp1_); + next_prompt = NULL; + _tmp2_ = self->priv->active_prompts; + _tmp3_ = g_list_length (_tmp2_); + if (_tmp3_ > ((guint) 0)) { + GList* _tmp4_; + gconstpointer _tmp5_ = NULL; + Prompt* _tmp6_; + Prompt* _tmp7_; + _tmp4_ = self->priv->active_prompts; + _tmp5_ = g_list_nth_data (_tmp4_, (guint) 0); + _tmp6_ = _prompt_ref0 ((Prompt*) _tmp5_); + _prompt_unref0 (next_prompt); + next_prompt = _tmp6_; + _tmp7_ = next_prompt; + self->priv->active_prompts = g_list_remove (self->priv->active_prompts, _tmp7_); + } + _tmp8_ = unity_greeter_test_mode; + if (_tmp8_) { + const gchar* _tmp9_; + UserList* _tmp10_; + const gchar* _tmp11_; + const gchar* _tmp12_; + const gchar* _tmp13_; + GQuark _tmp15_ = 0U; + static GQuark _tmp14_label0 = 0; + static GQuark _tmp14_label1 = 0; + static GQuark _tmp14_label2 = 0; + static GQuark _tmp14_label3 = 0; + static GQuark _tmp14_label4 = 0; + static GQuark _tmp14_label5 = 0; + _tmp9_ = text; + g_debug ("unity-greeter.vala:615: response %s", _tmp9_); + _tmp10_ = self->user_list; + _tmp11_ = user_list_get_selected (_tmp10_); + _tmp12_ = _tmp11_; + _tmp13_ = _tmp12_; + _tmp15_ = (NULL == _tmp13_) ? 0 : g_quark_from_string (_tmp13_); + if (_tmp15_ == ((0 != _tmp14_label0) ? _tmp14_label0 : (_tmp14_label0 = g_quark_from_static_string ("*other")))) { switch (0) { default: { - const gchar* _tmp8_; - _tmp8_ = self->priv->test_username; - if (_tmp8_ == NULL) { - const gchar* _tmp9_; - const gchar* _tmp10_; - gchar* _tmp11_; - const gchar* _tmp12_ = NULL; - _tmp9_ = text; - g_debug ("unity-greeter.vala:592: username=%s", _tmp9_); - _tmp10_ = text; - _tmp11_ = g_strdup (_tmp10_); + const gchar* _tmp16_; + _tmp16_ = self->priv->test_username; + if (_tmp16_ == NULL) { + const gchar* _tmp17_; + const gchar* _tmp18_; + gchar* _tmp19_; + const gchar* _tmp20_ = NULL; + _tmp17_ = text; + g_debug ("unity-greeter.vala:621: username=%s", _tmp17_); + _tmp18_ = text; + _tmp19_ = g_strdup (_tmp18_); _g_free0 (self->priv->test_username); - self->priv->test_username = _tmp11_; - _tmp12_ = _ ("Password:"); - unity_greeter_show_prompt_cb (self, _tmp12_, LIGHTDM_PROMPT_TYPE_SECRET); + self->priv->test_username = _tmp19_; + _tmp20_ = _ ("Password:"); + unity_greeter_show_prompt_cb (self, _tmp20_, LIGHTDM_PROMPT_TYPE_SECRET); } else { - const gchar* _tmp13_; - _tmp13_ = text; - self->priv->test_is_authenticated = g_strcmp0 (_tmp13_, "password") == 0; + const gchar* _tmp21_; + _tmp21_ = text; + self->priv->test_is_authenticated = g_strcmp0 (_tmp21_, "password") == 0; unity_greeter_authentication_complete_cb (self); } break; } } - } else if (_tmp7_ == ((0 != _tmp6_label1) ? _tmp6_label1 : (_tmp6_label1 = g_quark_from_static_string ("two-factor")))) { + } else if (_tmp15_ == ((0 != _tmp14_label1) ? _tmp14_label1 : (_tmp14_label1 = g_quark_from_static_string ("two-factor")))) { switch (0) { default: { - gboolean _tmp14_; - _tmp14_ = self->priv->test_prompted_sso; - if (!_tmp14_) { - const gchar* _tmp15_; - _tmp15_ = text; - if (g_strcmp0 (_tmp15_, "password") == 0) { - g_debug ("unity-greeter.vala:607: prompt otp"); + gboolean _tmp22_; + _tmp22_ = self->priv->test_prompted_sso; + if (!_tmp22_) { + const gchar* _tmp23_; + _tmp23_ = text; + if (g_strcmp0 (_tmp23_, "password") == 0) { + g_debug ("unity-greeter.vala:636: prompt otp"); self->priv->test_prompted_sso = TRUE; unity_greeter_show_prompt_cb (self, "OTP:", LIGHTDM_PROMPT_TYPE_QUESTION); } else { @@ -1990,42 +2128,74 @@ unity_greeter_authentication_complete_cb (self); } } else { - const gchar* _tmp16_; - _tmp16_ = text; - self->priv->test_is_authenticated = g_strcmp0 (_tmp16_, "otp") == 0; + const gchar* _tmp24_; + _tmp24_ = text; + self->priv->test_is_authenticated = g_strcmp0 (_tmp24_, "otp") == 0; unity_greeter_authentication_complete_cb (self); } break; } } - } else if (_tmp7_ == ((0 != _tmp6_label2) ? _tmp6_label2 : (_tmp6_label2 = g_quark_from_static_string ("change-password")))) { + } else if (_tmp15_ == ((0 != _tmp14_label2) ? _tmp14_label2 : (_tmp14_label2 = g_quark_from_static_string ("two-prompts")))) { switch (0) { default: { - const gchar* _tmp17_; - _tmp17_ = self->priv->test_new_password; - if (_tmp17_ != NULL) { - const gchar* _tmp18_; - const gchar* _tmp19_; - _tmp18_ = text; - _tmp19_ = self->priv->test_new_password; - self->priv->test_is_authenticated = g_strcmp0 (_tmp18_, _tmp19_) == 0; + const gchar* _tmp25_; + _tmp25_ = self->priv->test_two_prompts_first; + if (_tmp25_ == NULL) { + const gchar* _tmp26_; + gchar* _tmp27_; + _tmp26_ = text; + _tmp27_ = g_strdup (_tmp26_); + _g_free0 (self->priv->test_two_prompts_first); + self->priv->test_two_prompts_first = _tmp27_; + } else { + gboolean _tmp28_ = FALSE; + const gchar* _tmp29_; + gboolean _tmp31_; + _tmp29_ = self->priv->test_two_prompts_first; + if (g_strcmp0 (_tmp29_, "blue") == 0) { + const gchar* _tmp30_; + _tmp30_ = text; + _tmp28_ = g_strcmp0 (_tmp30_, "password") == 0; + } else { + _tmp28_ = FALSE; + } + _tmp31_ = _tmp28_; + self->priv->test_is_authenticated = _tmp31_; + unity_greeter_authentication_complete_cb (self); + } + break; + } + } + } else if (_tmp15_ == ((0 != _tmp14_label3) ? _tmp14_label3 : (_tmp14_label3 = g_quark_from_static_string ("change-password")))) { + switch (0) { + default: + { + const gchar* _tmp32_; + _tmp32_ = self->priv->test_new_password; + if (_tmp32_ != NULL) { + const gchar* _tmp33_; + const gchar* _tmp34_; + _tmp33_ = text; + _tmp34_ = self->priv->test_new_password; + self->priv->test_is_authenticated = g_strcmp0 (_tmp33_, _tmp34_) == 0; unity_greeter_authentication_complete_cb (self); } else { - gboolean _tmp20_; - _tmp20_ = self->priv->test_request_new_password; - if (_tmp20_) { - const gchar* _tmp21_; - gchar* _tmp22_; - _tmp21_ = text; - _tmp22_ = g_strdup (_tmp21_); + gboolean _tmp35_; + _tmp35_ = self->priv->test_request_new_password; + if (_tmp35_) { + const gchar* _tmp36_; + gchar* _tmp37_; + _tmp36_ = text; + _tmp37_ = g_strdup (_tmp36_); _g_free0 (self->priv->test_new_password); - self->priv->test_new_password = _tmp22_; + self->priv->test_new_password = _tmp37_; unity_greeter_show_prompt_cb (self, "Retype new UNIX password: ", LIGHTDM_PROMPT_TYPE_SECRET); } else { - const gchar* _tmp23_; - _tmp23_ = text; - if (g_strcmp0 (_tmp23_, "password") != 0) { + const gchar* _tmp38_; + _tmp38_ = text; + if (g_strcmp0 (_tmp38_, "password") != 0) { self->priv->test_is_authenticated = FALSE; unity_greeter_authentication_complete_cb (self); } else { @@ -2038,14 +2208,14 @@ break; } } - } else if (_tmp7_ == ((0 != _tmp6_label3) ? _tmp6_label3 : (_tmp6_label3 = g_quark_from_static_string ("no-response")))) { + } else if (_tmp15_ == ((0 != _tmp14_label4) ? _tmp14_label4 : (_tmp14_label4 = g_quark_from_static_string ("no-response")))) { switch (0) { default: { break; } } - } else if (_tmp7_ == ((0 != _tmp6_label4) ? _tmp6_label4 : (_tmp6_label4 = g_quark_from_static_string ("locked")))) { + } else if (_tmp15_ == ((0 != _tmp14_label5) ? _tmp14_label5 : (_tmp14_label5 = g_quark_from_static_string ("locked")))) { switch (0) { default: { @@ -2059,21 +2229,35 @@ switch (0) { default: { - const gchar* _tmp24_; - _tmp24_ = text; - self->priv->test_is_authenticated = g_strcmp0 (_tmp24_, "password") == 0; + const gchar* _tmp39_; + _tmp39_ = text; + self->priv->test_is_authenticated = g_strcmp0 (_tmp39_, "password") == 0; unity_greeter_authentication_complete_cb (self); break; } } } } else { - LightDMGreeter* _tmp25_; - const gchar* _tmp26_; - _tmp25_ = self->priv->greeter; - _tmp26_ = text; - lightdm_greeter_respond (_tmp25_, _tmp26_); + LightDMGreeter* _tmp40_; + const gchar* _tmp41_; + _tmp40_ = self->priv->greeter; + _tmp41_ = text; + lightdm_greeter_respond (_tmp40_, _tmp41_); + } + _tmp42_ = next_prompt; + if (_tmp42_ != NULL) { + Prompt* _tmp43_; + const gchar* _tmp44_; + Prompt* _tmp45_; + LightDMPromptType _tmp46_; + self->priv->clear_messages = FALSE; + _tmp43_ = next_prompt; + _tmp44_ = _tmp43_->text; + _tmp45_ = next_prompt; + _tmp46_ = _tmp45_->type; + unity_greeter_set_prompt (self, _tmp44_, _tmp46_); } + _prompt_unref0 (next_prompt); } @@ -2109,57 +2293,182 @@ } -static GdkFilterReturn unity_greeter_focus_upon_map (UnityGreeter* self, XEvent* xevent, GdkEvent* event) { +static GdkFilterReturn unity_greeter_focus_upon_map (UnityGreeter* self, GdkXEvent* gxevent, GdkEvent* event) { GdkFilterReturn result = 0; - XEvent _tmp0_; - gint _tmp1_; + GdkXEvent* _tmp0_; + XEvent* xevent; + XEvent* _tmp1_; + gint _tmp2_; g_return_val_if_fail (self != NULL, 0); - g_return_val_if_fail (xevent != NULL, 0); + g_return_val_if_fail (gxevent != NULL, 0); g_return_val_if_fail (event != NULL, 0); - _tmp0_ = *xevent; - _tmp1_ = _tmp0_.type; - if (_tmp1_ == ((gint) MapNotify)) { - GdkDisplay* _tmp2_ = NULL; - GdkDisplay* _tmp3_; + _tmp0_ = gxevent; + xevent = (XEvent*) _tmp0_; + _tmp1_ = xevent; + _tmp2_ = (*_tmp1_).type; + if (_tmp2_ == ((gint) MapNotify)) { + XEvent* _tmp3_; + XMapEvent _tmp4_; + Display* _tmp5_; + GdkDisplay* _tmp6_ = NULL; + GdkDisplay* _tmp7_; GdkDisplay* display; - GdkDisplay* _tmp4_; - XEvent _tmp5_; - XMapEvent _tmp6_; - Window _tmp7_; - GdkWindow* _tmp8_ = NULL; - GdkWindow* _tmp9_; + XEvent* _tmp8_; + XMapEvent _tmp9_; + Window _tmp10_; + Window xwin; + GdkDisplay* _tmp11_; + Window _tmp12_; + GdkWindow* _tmp13_ = NULL; + GdkWindow* _tmp14_; GdkWindow* win; - GdkWindow* _tmp10_; - gboolean _tmp11_ = FALSE; - _tmp2_ = gdk_display_get_default (); - _tmp3_ = _g_object_ref0 (_tmp2_); - display = _tmp3_; - _tmp4_ = display; - _tmp5_ = *xevent; - _tmp6_ = _tmp5_.xmap; - _tmp7_ = _tmp6_.window; - _tmp8_ = gdk_x11_window_foreign_new_for_display (_tmp4_, _tmp7_); - _tmp9_ = _g_object_ref0 (_tmp8_); - win = _tmp9_; - _tmp10_ = win; - _tmp11_ = gdk_window_get_accept_focus (_tmp10_); - if (_tmp11_) { - GdkWindow* _tmp12_; - _tmp12_ = win; - gdk_window_focus (_tmp12_, (guint32) GDK_CURRENT_TIME); + Window keyboard_xid; + MainWindow* _tmp15_; + MenuBar* _tmp16_; + GtkWindow* _tmp17_; + GtkWindow* _tmp18_; + gboolean _tmp25_ = FALSE; + Window _tmp26_; + Window _tmp27_; + gboolean _tmp30_; + _tmp3_ = xevent; + _tmp4_ = (*_tmp3_).xmap; + _tmp5_ = _tmp4_.display; + _tmp6_ = gdk_x11_lookup_xdisplay (_tmp5_); + _tmp7_ = _g_object_ref0 (_tmp6_); + display = _tmp7_; + _tmp8_ = xevent; + _tmp9_ = (*_tmp8_).xmap; + _tmp10_ = _tmp9_.window; + xwin = _tmp10_; + _tmp11_ = display; + _tmp12_ = xwin; + _tmp13_ = gdk_x11_window_foreign_new_for_display (_tmp11_, _tmp12_); + _tmp14_ = _g_object_ref0 (_tmp13_); + win = _tmp14_; + keyboard_xid = (Window) 0; + _tmp15_ = self->priv->main_window; + _tmp16_ = _tmp15_->menubar; + _tmp17_ = menu_bar_get_keyboard_window (_tmp16_); + _tmp18_ = _tmp17_; + if (_tmp18_ != NULL) { + MainWindow* _tmp19_; + MenuBar* _tmp20_; + GtkWindow* _tmp21_; + GtkWindow* _tmp22_; + GdkWindow* _tmp23_ = NULL; + Window _tmp24_ = 0; + _tmp19_ = self->priv->main_window; + _tmp20_ = _tmp19_->menubar; + _tmp21_ = menu_bar_get_keyboard_window (_tmp20_); + _tmp22_ = _tmp21_; + _tmp23_ = gtk_widget_get_window ((GtkWidget*) _tmp22_); + _tmp24_ = gdk_x11_window_get_xid (_tmp23_); + keyboard_xid = _tmp24_; + } + _tmp26_ = xwin; + _tmp27_ = keyboard_xid; + if (_tmp26_ != _tmp27_) { + GdkWindow* _tmp28_; + GdkWindowTypeHint _tmp29_ = 0; + _tmp28_ = win; + _tmp29_ = gdk_window_get_type_hint (_tmp28_); + _tmp25_ = _tmp29_ != GDK_WINDOW_TYPE_HINT_NOTIFICATION; } else { - UserList* _tmp13_; - _tmp13_ = self->user_list; - user_list_focus_prompt (_tmp13_); + _tmp25_ = FALSE; + } + _tmp30_ = _tmp25_; + if (_tmp30_) { + GdkWindow* _tmp31_; + MainWindow* _tmp32_; + MenuBar* _tmp33_; + GtkWindow* _tmp34_; + GtkWindow* _tmp35_; + _tmp31_ = win; + gdk_window_focus (_tmp31_, (guint32) GDK_CURRENT_TIME); + _tmp32_ = self->priv->main_window; + _tmp33_ = _tmp32_->menubar; + _tmp34_ = menu_bar_get_keyboard_window (_tmp33_); + _tmp35_ = _tmp34_; + if (_tmp35_ != NULL) { + MainWindow* _tmp36_; + MenuBar* _tmp37_; + GtkWindow* _tmp38_; + GtkWindow* _tmp39_; + GdkWindow* _tmp40_ = NULL; + _tmp36_ = self->priv->main_window; + _tmp37_ = _tmp36_->menubar; + _tmp38_ = menu_bar_get_keyboard_window (_tmp37_); + _tmp39_ = _tmp38_; + _tmp40_ = gtk_widget_get_window ((GtkWidget*) _tmp39_); + gdk_window_raise (_tmp40_); + } } _g_object_unref0 (win); _g_object_unref0 (display); + } else { + XEvent* _tmp41_; + gint _tmp42_; + _tmp41_ = xevent; + _tmp42_ = (*_tmp41_).type; + if (_tmp42_ == ((gint) UnmapNotify)) { + Window xwin = 0; + gint revert_to = 0; + XEvent* _tmp43_; + XUnmapEvent _tmp44_; + Display* _tmp45_; + Window _tmp46_ = 0; + gint _tmp47_ = 0; + gint _tmp48_; + _tmp43_ = xevent; + _tmp44_ = (*_tmp43_).xunmap; + _tmp45_ = _tmp44_.display; + XGetInputFocus (_tmp45_, &_tmp46_, &_tmp47_); + xwin = _tmp46_; + revert_to = _tmp47_; + _tmp48_ = revert_to; + if (_tmp48_ == ((gint) RevertToNone)) { + MainWindow* _tmp49_; + GdkWindow* _tmp50_ = NULL; + MainWindow* _tmp51_; + MenuBar* _tmp52_; + GtkWindow* _tmp53_; + GtkWindow* _tmp54_; + _tmp49_ = self->priv->main_window; + _tmp50_ = gtk_widget_get_window ((GtkWidget*) _tmp49_); + gdk_window_focus (_tmp50_, (guint32) GDK_CURRENT_TIME); + _tmp51_ = self->priv->main_window; + _tmp52_ = _tmp51_->menubar; + _tmp53_ = menu_bar_get_keyboard_window (_tmp52_); + _tmp54_ = _tmp53_; + if (_tmp54_ != NULL) { + MainWindow* _tmp55_; + MenuBar* _tmp56_; + GtkWindow* _tmp57_; + GtkWindow* _tmp58_; + GdkWindow* _tmp59_ = NULL; + _tmp55_ = self->priv->main_window; + _tmp56_ = _tmp55_->menubar; + _tmp57_ = menu_bar_get_keyboard_window (_tmp56_); + _tmp58_ = _tmp57_; + _tmp59_ = gtk_widget_get_window ((GtkWidget*) _tmp58_); + gdk_window_raise (_tmp59_); + } + } + } } result = GDK_FILTER_CONTINUE; return result; } +static GdkFilterReturn _unity_greeter_focus_upon_map_gdk_filter_func (GdkXEvent* xevent, GdkEvent* event, gpointer self) { + GdkFilterReturn result; + result = unity_greeter_focus_upon_map (self, xevent, event); + return result; +} + + static void unity_greeter_start_fake_wm (UnityGreeter* self) { GdkWindow* _tmp0_ = NULL; GdkWindow* _tmp1_; @@ -2171,7 +2480,7 @@ root = _tmp1_; _tmp2_ = gdk_window_get_events (root); gdk_window_set_events (root, _tmp2_ | GDK_SUBSTRUCTURE_MASK); - gdk_window_add_filter (root, (GdkFilterFunc) unity_greeter_focus_upon_map, self); + gdk_window_add_filter (root, _unity_greeter_focus_upon_map_gdk_filter_func, self); _g_object_unref0 (root); } @@ -2398,7 +2707,15 @@ UnityGreeter* _tmp60_; UnityGreeter* greeter; UnityGreeter* _tmp61_; - GPid _tmp62_; + gchar** _tmp62_ = NULL; + gchar** exec; + gint exec_length1; + gint _exec_size_; + gchar** _tmp63_; + gint _tmp63__length1; + gchar* _tmp64_; + gchar* _tmp65_; + GPid _tmp69_; GError * _inner_error_ = NULL; g_unsetenv ("UBUNTU_MENUPROXY"); setlocale (LC_ALL, ""); @@ -2445,7 +2762,7 @@ _inner_error_ = NULL; _tmp4_ = e; _tmp5_ = _tmp4_->message; - g_warning ("unity-greeter.vala:808: Error starting the at-spi registry: %s", _tmp5_); + g_warning ("unity-greeter.vala:887: Error starting the at-spi registry: %s", _tmp5_); _g_error_free0 (e); } __finally18: @@ -2461,19 +2778,19 @@ g_log_set_default_handler (_unity_greeter_log_cb_glog_func, NULL); _tmp7_ = getuid (); _tmp8_ = g_getenv ("LANG"); - g_debug ("unity-greeter.vala:816: Starting unity-greeter %s UID=%d LANG=%s", VERSION, (gint) _tmp7_, _tmp8_); - g_debug ("unity-greeter.vala:819: Setting cursor"); + g_debug ("unity-greeter.vala:895: Starting unity-greeter %s UID=%d LANG=%s", VERSION, (gint) _tmp7_, _tmp8_); + g_debug ("unity-greeter.vala:898: Setting cursor"); _tmp9_ = gdk_get_default_root_window (); _tmp10_ = gdk_cursor_new (GDK_LEFT_PTR); _tmp11_ = _tmp10_; gdk_window_set_cursor (_tmp9_, _tmp11_); _g_object_unref0 (_tmp11_); - g_debug ("unity-greeter.vala:823: Creating background surface"); + g_debug ("unity-greeter.vala:902: Creating background surface"); _tmp12_ = gdk_screen_get_default (); _tmp13_ = unity_greeter_create_root_surface (_tmp12_); _cairo_surface_destroy0 (unity_greeter_background_surface); unity_greeter_background_surface = _tmp13_; - g_debug ("unity-greeter.vala:826: Loading command line options"); + g_debug ("unity-greeter.vala:905: Loading command line options"); _tmp14_ = _ ("- Unity Greeter"); _tmp15_ = g_option_context_new (_tmp14_); c = _tmp15_; @@ -2540,9 +2857,9 @@ } _tmp30_ = unity_greeter_test_mode; if (_tmp30_) { - g_debug ("unity-greeter.vala:851: Running in test mode"); + g_debug ("unity-greeter.vala:930: Running in test mode"); } - g_debug ("unity-greeter.vala:854: Setting GTK+ settings"); + g_debug ("unity-greeter.vala:933: Setting GTK+ settings"); _tmp31_ = gtk_settings_get_default (); _tmp32_ = _g_object_ref0 (_tmp31_); settings = _tmp32_; @@ -2615,28 +2932,84 @@ _tmp59_ = value; g_object_set ((GObject*) _tmp58_, "gtk-xft-rgba", _tmp59_, NULL, NULL); } - g_debug ("unity-greeter.vala:877: Creating Unity Greeter"); + g_debug ("unity-greeter.vala:956: Creating Unity Greeter"); _tmp60_ = unity_greeter_new (); greeter = _tmp60_; - g_debug ("unity-greeter.vala:880: Showing greeter"); + g_debug ("unity-greeter.vala:959: Showing greeter"); _tmp61_ = greeter; unity_greeter_show (_tmp61_); - g_debug ("unity-greeter.vala:883: Starting main loop"); + _tmp62_ = g_new0 (gchar*, 1 + 1); + exec = _tmp62_; + exec_length1 = 1; + _exec_size_ = exec_length1; + _tmp63_ = exec; + _tmp63__length1 = exec_length1; + _tmp64_ = g_strdup ("/usr/lib/nux/unity_support_test"); + _g_free0 (_tmp63_[0]); + _tmp63_[0] = _tmp64_; + _tmp65_ = _tmp63_[0]; + { + gchar** _tmp66_; + gint _tmp66__length1; + _tmp66_ = exec; + _tmp66__length1 = exec_length1; + g_spawn_async (NULL, _tmp66_, NULL, G_SPAWN_SEARCH_PATH, NULL, NULL, NULL, &_inner_error_); + if (_inner_error_ != NULL) { + if (_inner_error_->domain == G_SPAWN_ERROR) { + goto __catch20_g_spawn_error; + } + exec = (_vala_array_free (exec, exec_length1, (GDestroyNotify) g_free), NULL); + _unity_greeter_unref0 (greeter); + _g_free0 (value); + _g_object_unref0 (settings); + _g_option_context_free0 (c); + g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); + g_clear_error (&_inner_error_); + return 0; + } + } + goto __finally20; + __catch20_g_spawn_error: + { + GError* e = NULL; + GError* _tmp67_; + const gchar* _tmp68_; + e = _inner_error_; + _inner_error_ = NULL; + _tmp67_ = e; + _tmp68_ = _tmp67_->message; + g_warning ("unity-greeter.vala:969: Failed to spawn unity-support-test tool for pr" \ +"e-caching: %s", _tmp68_); + _g_error_free0 (e); + } + __finally20: + if (_inner_error_ != NULL) { + exec = (_vala_array_free (exec, exec_length1, (GDestroyNotify) g_free), NULL); + _unity_greeter_unref0 (greeter); + _g_free0 (value); + _g_object_unref0 (settings); + _g_option_context_free0 (c); + g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); + g_clear_error (&_inner_error_); + return 0; + } + g_debug ("unity-greeter.vala:972: Starting main loop"); gtk_main (); - _tmp62_ = atspi_pid; - if (_tmp62_ != ((GPid) 0)) { - GPid _tmp63_; + _tmp69_ = atspi_pid; + if (_tmp69_ != ((GPid) 0)) { + GPid _tmp70_; gint status = 0; - GPid _tmp64_; - gint _tmp65_ = 0; - _tmp63_ = atspi_pid; - kill ((pid_t) _tmp63_, SIGKILL); - _tmp64_ = atspi_pid; - waitpid ((pid_t) _tmp64_, &_tmp65_, 0); - status = _tmp65_; + GPid _tmp71_; + gint _tmp72_ = 0; + _tmp70_ = atspi_pid; + kill ((pid_t) _tmp70_, SIGKILL); + _tmp71_ = atspi_pid; + waitpid ((pid_t) _tmp71_, &_tmp72_, 0); + status = _tmp72_; atspi_pid = (GPid) 0; } result = EXIT_SUCCESS; + exec = (_vala_array_free (exec, exec_length1, (GDestroyNotify) g_free), NULL); _unity_greeter_unref0 (greeter); _g_free0 (value); _g_object_unref0 (settings); @@ -2776,6 +3149,7 @@ self->priv->n_test_entries = 0; self->priv->test_username = NULL; self->priv->test_prompted_sso = FALSE; + self->priv->test_two_prompts_first = NULL; self->priv->test_request_new_password = FALSE; self->priv->test_new_password = NULL; self->priv->test_is_authenticated = FALSE; @@ -2786,15 +3160,17 @@ static void unity_greeter_finalize (UnityGreeter* obj) { UnityGreeter * self; self = UNITY_GREETER (obj); - _g_object_unref0 (self->priv->state_file); + _g_free0 (self->priv->state_file); _g_key_file_free0 (self->priv->state); _g_object_unref0 (self->priv->settings_daemon); _g_object_unref0 (self->priv->main_window); _g_object_unref0 (self->user_list); _g_object_unref0 (self->priv->greeter); + __g_list_free__prompt_unref0_0 (self->priv->active_prompts); _g_free0 (self->priv->authenticate_user); __g_list_free__g_free0_0 (self->priv->test_backgrounds); _g_free0 (self->priv->test_username); + _g_free0 (self->priv->test_two_prompts_first); _g_free0 (self->priv->test_new_password); _ca_context_destroy0 (self->priv->canberra_context); } @@ -2832,6 +3208,188 @@ } +Prompt* prompt_construct (GType object_type, const gchar* text, LightDMPromptType type) { + Prompt* self = NULL; + const gchar* _tmp0_; + gchar* _tmp1_; + LightDMPromptType _tmp2_; + g_return_val_if_fail (text != NULL, NULL); + self = (Prompt*) g_type_create_instance (object_type); + _tmp0_ = text; + _tmp1_ = g_strdup (_tmp0_); + _g_free0 (self->text); + self->text = _tmp1_; + _tmp2_ = type; + self->type = _tmp2_; + return self; +} + + +Prompt* prompt_new (const gchar* text, LightDMPromptType type) { + return prompt_construct (TYPE_PROMPT, text, type); +} + + +static void value_prompt_init (GValue* value) { + value->data[0].v_pointer = NULL; +} + + +static void value_prompt_free_value (GValue* value) { + if (value->data[0].v_pointer) { + prompt_unref (value->data[0].v_pointer); + } +} + + +static void value_prompt_copy_value (const GValue* src_value, GValue* dest_value) { + if (src_value->data[0].v_pointer) { + dest_value->data[0].v_pointer = prompt_ref (src_value->data[0].v_pointer); + } else { + dest_value->data[0].v_pointer = NULL; + } +} + + +static gpointer value_prompt_peek_pointer (const GValue* value) { + return value->data[0].v_pointer; +} + + +static gchar* value_prompt_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { + if (collect_values[0].v_pointer) { + Prompt* object; + object = collect_values[0].v_pointer; + if (object->parent_instance.g_class == NULL) { + return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); + } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) { + return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); + } + value->data[0].v_pointer = prompt_ref (object); + } else { + value->data[0].v_pointer = NULL; + } + return NULL; +} + + +static gchar* value_prompt_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { + Prompt** object_p; + object_p = collect_values[0].v_pointer; + if (!object_p) { + return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value)); + } + if (!value->data[0].v_pointer) { + *object_p = NULL; + } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) { + *object_p = value->data[0].v_pointer; + } else { + *object_p = prompt_ref (value->data[0].v_pointer); + } + return NULL; +} + + +GParamSpec* param_spec_prompt (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) { + ParamSpecPrompt* spec; + g_return_val_if_fail (g_type_is_a (object_type, TYPE_PROMPT), NULL); + spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags); + G_PARAM_SPEC (spec)->value_type = object_type; + return G_PARAM_SPEC (spec); +} + + +gpointer value_get_prompt (const GValue* value) { + g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_PROMPT), NULL); + return value->data[0].v_pointer; +} + + +void value_set_prompt (GValue* value, gpointer v_object) { + Prompt* old; + g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_PROMPT)); + old = value->data[0].v_pointer; + if (v_object) { + g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_PROMPT)); + g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); + value->data[0].v_pointer = v_object; + prompt_ref (value->data[0].v_pointer); + } else { + value->data[0].v_pointer = NULL; + } + if (old) { + prompt_unref (old); + } +} + + +void value_take_prompt (GValue* value, gpointer v_object) { + Prompt* old; + g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_PROMPT)); + old = value->data[0].v_pointer; + if (v_object) { + g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_PROMPT)); + g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); + value->data[0].v_pointer = v_object; + } else { + value->data[0].v_pointer = NULL; + } + if (old) { + prompt_unref (old); + } +} + + +static void prompt_class_init (PromptClass * klass) { + prompt_parent_class = g_type_class_peek_parent (klass); + PROMPT_CLASS (klass)->finalize = prompt_finalize; +} + + +static void prompt_instance_init (Prompt * self) { + self->ref_count = 1; +} + + +static void prompt_finalize (Prompt* obj) { + Prompt * self; + self = PROMPT (obj); + _g_free0 (self->text); +} + + +GType prompt_get_type (void) { + static volatile gsize prompt_type_id__volatile = 0; + if (g_once_init_enter (&prompt_type_id__volatile)) { + static const GTypeValueTable g_define_type_value_table = { value_prompt_init, value_prompt_free_value, value_prompt_copy_value, value_prompt_peek_pointer, "p", value_prompt_collect_value, "p", value_prompt_lcopy_value }; + static const GTypeInfo g_define_type_info = { sizeof (PromptClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) prompt_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (Prompt), 0, (GInstanceInitFunc) prompt_instance_init, &g_define_type_value_table }; + static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) }; + GType prompt_type_id; + prompt_type_id = g_type_register_fundamental (g_type_fundamental_next (), "Prompt", &g_define_type_info, &g_define_type_fundamental_info, 0); + g_once_init_leave (&prompt_type_id__volatile, prompt_type_id); + } + return prompt_type_id__volatile; +} + + +gpointer prompt_ref (gpointer instance) { + Prompt* self; + self = instance; + g_atomic_int_inc (&self->ref_count); + return instance; +} + + +void prompt_unref (gpointer instance) { + Prompt* self; + self = instance; + if (g_atomic_int_dec_and_test (&self->ref_count)) { + PROMPT_GET_CLASS (self)->finalize (self); + g_type_free_instance ((GTypeInstance *) self); + } +} + + void test_entry_copy (const TestEntry* self, TestEntry* dest) { const gchar* _tmp0_; gchar* _tmp1_; diff -Nru unity-greeter-0.2.8/src/unity-greeter.vala unity-greeter-0.2.9/src/unity-greeter.vala --- unity-greeter-0.2.8/src/unity-greeter.vala 2012-04-17 07:08:49.000000000 +0000 +++ unity-greeter-0.2.9/src/unity-greeter.vala 2012-11-21 02:24:50.000000000 +0000 @@ -36,7 +36,7 @@ private static Timer log_timer; - private File state_file; + private string state_file; private KeyFile state; private static Cairo.XlibSurface background_surface; @@ -50,6 +50,8 @@ private bool prompted = false; private bool clear_messages = false; + private List active_prompts; + /* User to authenticate against */ private string ?authenticate_user = null; @@ -61,6 +63,7 @@ { "change-password", "Change Password", "*", "uk;us", false, false, null }, { "auth-error", "Auth Error", "*", "uk;us", false, false, null }, { "two-factor", "Two Factor", "*", "uk;us", false, false, null }, + { "two-prompts", "Two Prompts", "*", "uk;us", false, false, null }, { "info-prompt", "Info Prompt", "*", "uk;us", false, false, null }, { "long-info-prompt", "Long Info Prompt", "*", "uk;us", false, false, null }, { "wide-info-prompt", "Wide Info Prompt", "*", "uk;us", false, false, null }, @@ -86,6 +89,7 @@ private int n_test_entries = 0; private string? test_username = null; private bool test_prompted_sso = false; + private string test_two_prompts_first = null; private bool test_request_new_password = false; private string? test_new_password = null; private bool test_is_authenticated = false; @@ -96,6 +100,7 @@ greeter = new LightDM.Greeter (); greeter.show_message.connect (show_message_cb); greeter.show_prompt.connect (show_prompt_cb); + greeter.autologin_timer_expired.connect (() => { greeter.authenticate_autologin (); }); greeter.authentication_complete.connect (authentication_complete_cb); var connected = false; try @@ -118,16 +123,16 @@ var state_dir = Path.build_filename (Environment.get_user_cache_dir (), "unity-greeter"); DirUtils.create_with_parents (state_dir, 0775); - state_file = File.new_for_path (Path.build_filename (state_dir, "state")); + state_file = Path.build_filename (state_dir, "state"); state = new KeyFile (); try { - state.load_from_file (state_file.get_path (), KeyFileFlags.NONE); + state.load_from_file (state_file, KeyFileFlags.NONE); } catch (Error e) { if (!(e is FileError.NOENT)) - warning ("Failed to load state from %s: %s\n", state_file.get_path (), e.message); + warning ("Failed to load state from %s: %s\n", state_file, e.message); } var last_user = ""; try @@ -366,6 +371,13 @@ private void show_prompt_cb (string text, LightDM.PromptType type) { + active_prompts.append (new Prompt (text, type)); + if (active_prompts.length () == 1) + set_prompt (text, type); + } + + private void set_prompt (string text, LightDM.PromptType type) + { if (clear_messages) { user_list.clear_messages (); @@ -421,6 +433,8 @@ private void authentication_complete_cb () { + active_prompts = new List (); + bool is_authenticated; if (test_mode) is_authenticated = test_is_authenticated; @@ -489,7 +503,7 @@ var data = state.to_data (); try { - state_file.replace_contents ((uint8[])data, null, false, FileCreateFlags.NONE, null); + FileUtils.set_contents (state_file, data); } catch (Error e) { @@ -503,6 +517,7 @@ private void start_authentication () { prompted = false; + active_prompts = new List (); /* Reset manual username */ user_list.manual_username = null; @@ -514,6 +529,7 @@ test_username = null; test_is_authenticated = false; test_prompted_sso = false; + test_two_prompts_first = null; test_request_new_password = false; test_new_password = null; @@ -563,6 +579,10 @@ show_message_cb ("You should have seen three messages", LightDM.MessageType.INFO); show_prompt_cb (_("Password:"), LightDM.PromptType.SECRET); break; + case "two-prompts": + show_prompt_cb (_("Favorite Color (blue):"), LightDM.PromptType.QUESTION); + show_prompt_cb (_("Password:"), LightDM.PromptType.SECRET); + break; default: show_prompt_cb (_("Password:"), LightDM.PromptType.SECRET); break; @@ -581,6 +601,15 @@ private void respond_to_prompt_cb (string text) { + /* Prompt complete */ + active_prompts.remove_link (active_prompts.first ()); + Prompt? next_prompt = null; + if (active_prompts.length () > 0) + { + next_prompt = active_prompts.nth_data (0); + active_prompts.remove (next_prompt); + } + if (test_mode) { debug ("response %s", text); @@ -620,6 +649,15 @@ authentication_complete_cb (); } break; + case "two-prompts": + if (test_two_prompts_first == null) + test_two_prompts_first = text; + else + { + test_is_authenticated = test_two_prompts_first == "blue" && text == "password"; + authentication_complete_cb (); + } + break; case "change-password": if (test_new_password != null) { @@ -661,6 +699,13 @@ } else greeter.respond (text); + + /* Move onto next prompt if there is one */ + if (next_prompt != null) + { + clear_messages = false; + set_prompt (next_prompt.text, next_prompt.type); + } } private void start_session_cb () @@ -681,17 +726,51 @@ } } - private Gdk.FilterReturn focus_upon_map (X.Event xevent, Gdk.Event event) + private Gdk.FilterReturn focus_upon_map (Gdk.XEvent gxevent, Gdk.Event event) { + var xevent = (X.Event*)gxevent; if (xevent.type == X.EventType.MapNotify) { - var display = Gdk.Display.get_default (); - var win = Gdk.X11Window.foreign_new_for_display (display, xevent.xmap.window); + var display = Gdk.x11_lookup_xdisplay (xevent.xmap.display); + var xwin = xevent.xmap.window; + var win = Gdk.X11Window.foreign_new_for_display (display, xwin); + + /* Check to see if this window is our onboard window, since we don't want to focus it. */ + X.Window keyboard_xid = 0; + if (main_window.menubar.keyboard_window != null) + keyboard_xid = Gdk.X11Window.get_xid (main_window.menubar.keyboard_window.get_window ()); - if (win.get_accept_focus ()) + if (xwin != keyboard_xid && win.get_type_hint() != Gdk.WindowTypeHint.NOTIFICATION) + { win.focus (Gdk.CURRENT_TIME); - else - user_list.focus_prompt (); + + /* Make sure to keep keyboard above */ + if (main_window.menubar.keyboard_window != null) + main_window.menubar.keyboard_window.get_window ().raise (); + } + } + else if (xevent.type == X.EventType.UnmapNotify) + { + // Since we aren't keeping track of focus (for example, we don't + // track the Z stack of windows) like a normal WM would, when we + // decide here where to return focus after another window unmaps, + // we don't have much to go on. X will tell us if we should take + // focus back. (I could not find an obvious way to determine this, + // but checking if the X input focus is RevertTo.None seems + // reliable.) + + X.Window xwin; + int revert_to; + xevent.xunmap.display.get_input_focus (out xwin, out revert_to); + + if (revert_to == X.RevertTo.None) + { + main_window.get_window ().focus (Gdk.CURRENT_TIME); + + /* Make sure to keep keyboard above */ + if (main_window.menubar.keyboard_window != null) + main_window.menubar.keyboard_window.get_window ().raise (); + } } return Gdk.FilterReturn.CONTINUE; } @@ -704,7 +783,7 @@ continuing even if not actually marked as modal) */ var root = Gdk.get_default_root_window (); root.set_events (root.get_events () | Gdk.EventMask.SUBSTRUCTURE_MASK); - root.add_filter ((Gdk.FilterFunc) focus_upon_map); + root.add_filter (focus_upon_map); } private static Cairo.XlibSurface? create_root_surface (Gdk.Screen screen) @@ -880,6 +959,16 @@ debug ("Showing greeter"); greeter.show (); + /* Launch the unity_support_test tool as an async process to cache + its result */ + var exec = new string[1]; + exec[0] = "/usr/lib/nux/unity_support_test"; + try { + Process.spawn_async (null, exec, null, SpawnFlags.SEARCH_PATH, null, null); + } catch (SpawnError e) { + warning ("Failed to spawn unity-support-test tool for pre-caching: %s", e.message); + } + debug ("Starting main loop"); Gtk.main (); @@ -895,6 +984,18 @@ } } +private class Prompt +{ + public string text; + public LightDM.PromptType type; + + public Prompt (string text, LightDM.PromptType type) + { + this.text = text; + this.type = type; + } +} + private struct TestEntry { string username; diff -Nru unity-greeter-0.2.8/src/user-list.c unity-greeter-0.2.9/src/user-list.c --- unity-greeter-0.2.8/src/user-list.c 2012-04-17 07:08:57.000000000 +0000 +++ unity-greeter-0.2.9/src/user-list.c 2012-11-20 21:59:27.000000000 +0000 @@ -1,4 +1,4 @@ -/* user-list.c generated by valac 0.16.0, the Vala compiler +/* user-list.c generated by valac 0.16.1, the Vala compiler * generated from user-list.vala, do not modify */ /* -*- Mode: Vala; indent-tabs-mode: nil; tab-width: 4 -*- @@ -247,7 +247,6 @@ UserListPrivate * priv; Background* background; MenuBar* menubar; - gchar* default_session; }; struct _UserListClass { @@ -297,6 +296,7 @@ guint n_below; gint box_height; gchar* _manual_username; + gchar* _default_session; gchar* _session; GdkPixbuf* last_session_badge; }; @@ -369,6 +369,7 @@ USER_LIST_ALWAYS_SHOW_MANUAL, USER_LIST_SELECTED, USER_LIST_MANUAL_USERNAME, + USER_LIST_DEFAULT_SESSION, USER_LIST_SESSION }; GType user_list_scroll_target_get_type (void) G_GNUC_CONST; @@ -452,6 +453,7 @@ static void user_list_set_selected_entry (UserList* self, UserEntry* value); const gchar* user_list_get_session (UserList* self); GdkPixbuf* session_chooser_get_badge (const gchar* session); +const gchar* user_list_get_default_session (UserList* self); static void user_list_real_realize (GtkWidget* base); static gint user_list_round_up_to_grid_size (UserList* self, gint size); gdouble animate_timer_get_progress (AnimateTimer* self); @@ -471,6 +473,7 @@ void user_list_set_always_show_manual (UserList* self, gboolean value); const gchar* user_list_get_selected (UserList* self); void user_list_set_manual_username (UserList* self, const gchar* value); +void user_list_set_default_session (UserList* self, const gchar* value); static void user_list_finalize (GObject* obj); static void _vala_user_list_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec); static void _vala_user_list_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec); @@ -1079,13 +1082,13 @@ _g_free0 (_tmp29_); _tmp32_ = _tmp31_; if (_inner_error_ != NULL) { - goto __catch20_g_error; + goto __catch21_g_error; } _g_object_unref0 (self->priv->message_pixbuf); self->priv->message_pixbuf = _tmp32_; } - goto __finally20; - __catch20_g_error: + goto __finally21; + __catch21_g_error: { GError* e = NULL; GError* _tmp33_; @@ -1094,10 +1097,10 @@ _inner_error_ = NULL; _tmp33_ = e; _tmp34_ = _tmp33_->message; - g_debug ("user-list.vala:237: Error loading message image: %s", _tmp34_); + g_debug ("user-list.vala:249: Error loading message image: %s", _tmp34_); _g_error_free0 (e); } - __finally20: + __finally21: if (_inner_error_ != NULL) { g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); g_clear_error (&_inner_error_); @@ -2197,7 +2200,7 @@ g_return_if_fail (self != NULL); _tmp0_ = self->priv->_selected_entry; _tmp1_ = _tmp0_->name; - g_debug ("user-list.vala:546: Start session for %s", _tmp1_); + g_debug ("user-list.vala:558: Start session for %s", _tmp1_); g_signal_emit_by_name (self, "start-session"); } @@ -2628,19 +2631,21 @@ _tmp1_ = _tmp0_; if (_tmp1_ == NULL) { const gchar* _tmp2_; - GdkPixbuf* _tmp3_ = NULL; - _tmp2_ = self->default_session; - _tmp3_ = session_chooser_get_badge (_tmp2_); - result = _tmp3_; + const gchar* _tmp3_; + GdkPixbuf* _tmp4_ = NULL; + _tmp2_ = user_list_get_default_session (self); + _tmp3_ = _tmp2_; + _tmp4_ = session_chooser_get_badge (_tmp3_); + result = _tmp4_; return result; } else { - const gchar* _tmp4_; const gchar* _tmp5_; - GdkPixbuf* _tmp6_ = NULL; - _tmp4_ = user_list_get_session (self); - _tmp5_ = _tmp4_; - _tmp6_ = session_chooser_get_badge (_tmp5_); - result = _tmp6_; + const gchar* _tmp6_; + GdkPixbuf* _tmp7_ = NULL; + _tmp5_ = user_list_get_session (self); + _tmp6_ = _tmp5_; + _tmp7_ = session_chooser_get_badge (_tmp6_); + result = _tmp7_; return result; } } @@ -4473,6 +4478,36 @@ } +const gchar* user_list_get_default_session (UserList* self) { + const gchar* result; + const gchar* _tmp0_; + g_return_val_if_fail (self != NULL, NULL); + _tmp0_ = self->priv->_default_session; + result = _tmp0_; + return result; +} + + +void user_list_set_default_session (UserList* self, const gchar* value) { + const gchar* _tmp0_; + gchar* _tmp1_; + CachedImage* _tmp2_; + GdkPixbuf* _tmp3_ = NULL; + GdkPixbuf* _tmp4_; + g_return_if_fail (self != NULL); + _tmp0_ = value; + _tmp1_ = g_strdup (_tmp0_); + _g_free0 (self->priv->_default_session); + self->priv->_default_session = _tmp1_; + _tmp2_ = self->priv->session_image; + _tmp3_ = user_list_get_badge (self); + _tmp4_ = _tmp3_; + gtk_image_set_from_pixbuf ((GtkImage*) _tmp2_, _tmp4_); + _g_object_unref0 (_tmp4_); + g_object_notify ((GObject *) self, "default-session"); +} + + const gchar* user_list_get_session (UserList* self) { const gchar* result; const gchar* _tmp0_; @@ -4518,6 +4553,7 @@ g_object_class_install_property (G_OBJECT_CLASS (klass), USER_LIST_ALWAYS_SHOW_MANUAL, g_param_spec_boolean ("always-show-manual", "always-show-manual", "always-show-manual", FALSE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE)); g_object_class_install_property (G_OBJECT_CLASS (klass), USER_LIST_SELECTED, g_param_spec_string ("selected", "selected", "selected", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE)); g_object_class_install_property (G_OBJECT_CLASS (klass), USER_LIST_MANUAL_USERNAME, g_param_spec_string ("manual-username", "manual-username", "manual-username", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE)); + g_object_class_install_property (G_OBJECT_CLASS (klass), USER_LIST_DEFAULT_SESSION, g_param_spec_string ("default-session", "default-session", "default-session", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE)); g_object_class_install_property (G_OBJECT_CLASS (klass), USER_LIST_SESSION, g_param_spec_string ("session", "session", "session", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE)); g_signal_new ("user_selected", TYPE_USER_LIST, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__STRING, G_TYPE_NONE, 1, G_TYPE_STRING); g_signal_new ("user_displayed_start", TYPE_USER_LIST, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); @@ -4544,7 +4580,7 @@ self->priv->box_height = 3; self->priv->_manual_username = NULL; _tmp0_ = g_strdup ("ubuntu"); - self->default_session = _tmp0_; + self->priv->_default_session = _tmp0_; self->priv->_session = NULL; self->priv->last_session_badge = NULL; } @@ -4569,7 +4605,7 @@ _g_object_unref0 (self->priv->session_image); _g_object_unref0 (self->priv->session_chooser); _g_free0 (self->priv->_manual_username); - _g_free0 (self->default_session); + _g_free0 (self->priv->_default_session); _g_free0 (self->priv->_session); _g_object_unref0 (self->priv->last_session_badge); G_OBJECT_CLASS (user_list_parent_class)->finalize (obj); @@ -4607,6 +4643,9 @@ case USER_LIST_MANUAL_USERNAME: g_value_set_string (value, user_list_get_manual_username (self)); break; + case USER_LIST_DEFAULT_SESSION: + g_value_set_string (value, user_list_get_default_session (self)); + break; case USER_LIST_SESSION: g_value_set_string (value, user_list_get_session (self)); break; @@ -4633,6 +4672,9 @@ case USER_LIST_MANUAL_USERNAME: user_list_set_manual_username (self, g_value_get_string (value)); break; + case USER_LIST_DEFAULT_SESSION: + user_list_set_default_session (self, g_value_get_string (value)); + break; case USER_LIST_SESSION: user_list_set_session (self, g_value_get_string (value)); break; diff -Nru unity-greeter-0.2.8/src/user-list.vala unity-greeter-0.2.9/src/user-list.vala --- unity-greeter-0.2.8/src/user-list.vala 2012-04-16 07:20:33.000000000 +0000 +++ unity-greeter-0.2.9/src/user-list.vala 2012-11-20 21:46:54.000000000 +0000 @@ -178,8 +178,20 @@ add_manual_entry (); } } - - public string default_session = "ubuntu"; + + private string _default_session = "ubuntu"; + public string default_session + { + get + { + return _default_session; + } + set + { + _default_session = value; + session_image.set_from_pixbuf (get_badge ()); + } + } private string? _session = null; public string? session