kov changed gksu/branches/gksu2/ChangeLog, gksu/branches/gksu2/Makefile.am, gksu/branches/gksu2/aclocal.m4, gksu/branches/gksu2/configure.ac, gksu/branches/gksu2/gksu/Makefile.am, gksu/branches/gksu2/gksu/gksu.c, gksu/branches/gksu2/gksu/gksu.schemas.in, gksu/branches/gksu2/gksu/gksuexec.c, gksu/branches/gksu2/gksu/util.c, gksu/branches/gksu2/gksu/util.h, gksu/branches/gksu2/gksuexec.desktop.in, gksu/branches/gksu2/po/POTFILES.in

Gustavo Noronha kov at costa.debian.org
Sun Apr 23 22:49:45 UTC 2006


Mensagem de log: 
	* gksu/gksu.c:
	- removed all code related to gnome-keyring and gconf,
	  which is now on libgksu

	* gksu/gksuexec.c, gksu/util.{c,h}:
	- removed; code moved to gksu or simply not so useful and
	  unmaintained


-----


Modified: gksu/branches/gksu2/ChangeLog
===================================================================
--- gksu/branches/gksu2/ChangeLog	2006-04-23 16:16:38 UTC (rev 560)
+++ gksu/branches/gksu2/ChangeLog	2006-04-23 22:49:42 UTC (rev 561)
@@ -1,3 +1,13 @@
+2006-04-23  Gustavo Noronha Silva  <kov at debian.org>
+
+	* gksu/gksu.c:
+	- removed all code related to gnome-keyring and gconf,
+	  which is now on libgksu
+
+	* gksu/gksuexec.c, gksu/util.{c,h}:
+	- removed; code moved to gksu or simply not so useful and
+	  unmaintained
+
 2006-04-03  Gustavo Noronha Silva  <kov at debian.org>
 
 	* man/gksu.1:

Modified: gksu/branches/gksu2/Makefile.am
===================================================================
--- gksu/branches/gksu2/Makefile.am	2006-04-23 16:16:38 UTC (rev 560)
+++ gksu/branches/gksu2/Makefile.am	2006-04-23 22:49:42 UTC (rev 561)
@@ -9,7 +9,7 @@
 dist_icon_DATA = gksu-icon.png gksu-root-terminal.png
 
 desktopdir = $(datadir)/applications
-desktop_in_files = gksu.desktop.in gksuexec.desktop.in
+desktop_in_files = gksu.desktop.in
 dist_desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
 @INTLTOOL_DESKTOP_RULE@
 

Modified: gksu/branches/gksu2/aclocal.m4
===================================================================
--- gksu/branches/gksu2/aclocal.m4	2006-04-23 16:16:38 UTC (rev 560)
+++ gksu/branches/gksu2/aclocal.m4	2006-04-23 22:49:42 UTC (rev 561)
@@ -55,23 +55,26 @@
 dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
 # serial 2 IT_PROG_INTLTOOL
 AC_DEFUN([IT_PROG_INTLTOOL],
-[
+[AC_PREREQ([2.50])dnl
 
+case "$am__api_version" in
+    1.[01234])
+	AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
+    ;;
+    *)
+    ;;
+esac
+
 if test -n "$1"; then
     AC_MSG_CHECKING(for intltool >= $1)
 
-    INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ printf "%d", $[1] * 100 + $[2]; }'`
-    INTLTOOL_APPLIED_VERSION=`awk -F\" '/\\$VERSION / { printf $[2]; }'  < ${ac_aux_dir}/intltool-update.in`
-    changequote({{,}})
-    INTLTOOL_APPLIED_VERSION_AS_INT=`awk -F\" '/\\$VERSION / { split(${{2}}, VERSION, "."); printf "%d\n", VERSION[1] * 100 + VERSION[2];}' < ${ac_aux_dir}/intltool-update.in`
-    changequote([,])
-
-    if test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT"; then
-	AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
-    else
-	AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found. Your intltool is too old.  You need intltool $1 or later.])
-	exit 1
-    fi
+    INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 100 + $ 2; }'`
+    INTLTOOL_APPLIED_VERSION=`awk -F\" '/\\$VERSION / { print $ 2; }' ${ac_aux_dir}/intltool-update.in`
+    [INTLTOOL_APPLIED_VERSION_AS_INT=`awk -F\" '/\\$VERSION / { split($ 2, VERSION, "."); print VERSION[1] * 100 + VERSION[2];}' ${ac_aux_dir}/intltool-update.in`
+    ]
+    AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
+    test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
+	AC_MSG_ERROR([Your intltool is too old.  You need intltool $1 or later.])
 fi
 
   INTLTOOL_DESKTOP_RULE='%.desktop:   %.desktop.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
@@ -91,6 +94,7 @@
     INTLTOOL_CAVES_RULE='%.caves:     %.caves.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
   INTLTOOL_SCHEMAS_RULE='%.schemas:   %.schemas.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
     INTLTOOL_THEME_RULE='%.theme:     %.theme.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
+    INTLTOOL_SERVICE_RULE='%.service: %.service.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
 
 AC_SUBST(INTLTOOL_DESKTOP_RULE)
 AC_SUBST(INTLTOOL_DIRECTORY_RULE)
@@ -109,17 +113,13 @@
 AC_SUBST(INTLTOOL_CAVES_RULE)
 AC_SUBST(INTLTOOL_SCHEMAS_RULE)
 AC_SUBST(INTLTOOL_THEME_RULE)
+AC_SUBST(INTLTOOL_SERVICE_RULE)
 
 # Use the tools built into the package, not the ones that are installed.
+AC_SUBST(INTLTOOL_EXTRACT, '$(top_builddir)/intltool-extract')
+AC_SUBST(INTLTOOL_MERGE, '$(top_builddir)/intltool-merge')
+AC_SUBST(INTLTOOL_UPDATE, '$(top_builddir)/intltool-update')
 
-INTLTOOL_EXTRACT='$(top_builddir)/intltool-extract'
-INTLTOOL_MERGE='$(top_builddir)/intltool-merge'
-INTLTOOL_UPDATE='$(top_builddir)/intltool-update'
-
-AC_SUBST(INTLTOOL_EXTRACT)
-AC_SUBST(INTLTOOL_MERGE)
-AC_SUBST(INTLTOOL_UPDATE)
-
 AC_PATH_PROG(INTLTOOL_PERL, perl)
 if test -z "$INTLTOOL_PERL"; then
    AC_MSG_ERROR([perl not found; required for intltool])
@@ -141,81 +141,98 @@
 AC_PATH_PROG(INTLTOOL_MSGMERGE, msgmerge, msgmerge)
 AC_PATH_PROG(INTLTOOL_XGETTEXT, xgettext, xgettext)
 
-# Remove file type tags (using []) from po/POTFILES.
+IT_PO_SUBDIR([po])
 
-ifdef([AC_DIVERSION_ICMDS],[
-  AC_DIVERT_PUSH(AC_DIVERSION_ICMDS)
-     [mv -f po/POTFILES po/POTFILES.tmp
-      sed -e '/[[]encoding.*]/d' -e 's/[[].*] *//' < po/POTFILES.tmp > po/POTFILES
-      rm -f po/POTFILES.tmp
-     ]dnl
-  AC_DIVERT_POP()
-],[
-  ifdef([AC_CONFIG_COMMANDS_PRE],[
-    AC_CONFIG_COMMANDS_PRE([
-       [mv -f po/POTFILES po/POTFILES.tmp
-        sed -e '/[[]encoding.*]/d' -e 's/[[].*] *//' < po/POTFILES.tmp > po/POTFILES
-        rm -f po/POTFILES.tmp
-       ]dnl
-    ])
-  ])
-])
+dnl The following is very similar to
+dnl
+dnl	AC_CONFIG_FILES([intltool-extract intltool-merge intltool-update])
+dnl
+dnl with the following slight differences:
+dnl  - the *.in files are in ac_aux_dir,
+dnl  - if the file haven't changed upon reconfigure, it's not touched,
+dnl  - the evaluation of the third parameter enables a hack which computes
+dnl    the actual value of $libdir,
+dnl  - the user sees "executing intltool commands", instead of
+dnl    "creating intltool-extract" and such.
+dnl
+dnl Nothing crucial here, and we could use AC_CONFIG_FILES, if there were
+dnl a reason for it.
 
-# Manually sed perl in so people don't have to put the intltool scripts in AC_OUTPUT.
-
 AC_CONFIG_COMMANDS([intltool], [
 
-intltool_edit="-e 's#@INTLTOOL_EXTRACT@#`pwd`/intltool-extract#g' \
-               -e 's#@INTLTOOL_ICONV@#${INTLTOOL_ICONV}#g' \
-               -e 's#@INTLTOOL_MSGFMT@#${INTLTOOL_MSGFMT}#g' \
-               -e 's#@INTLTOOL_MSGMERGE@#${INTLTOOL_MSGMERGE}#g' \
-               -e 's#@INTLTOOL_XGETTEXT@#${INTLTOOL_XGETTEXT}#g' \
-               -e 's#@INTLTOOL_PERL@#${INTLTOOL_PERL}#g'"
+for file in intltool-extract intltool-merge intltool-update; do
+  sed -e "s|@INTLTOOL_EXTRACT@|`pwd`/intltool-extract|g" \
+      -e "s|@INTLTOOL_LIBDIR@|${INTLTOOL_LIBDIR}|g" \
+      -e "s|@INTLTOOL_ICONV@|${INTLTOOL_ICONV}|g" \
+      -e "s|@INTLTOOL_MSGFMT@|${INTLTOOL_MSGFMT}|g" \
+      -e "s|@INTLTOOL_MSGMERGE@|${INTLTOOL_MSGMERGE}|g" \
+      -e "s|@INTLTOOL_XGETTEXT@|${INTLTOOL_XGETTEXT}|g" \
+      -e "s|@INTLTOOL_PERL@|${INTLTOOL_PERL}|g" \
+	< ${ac_aux_dir}/${file}.in > ${file}.out
+  if cmp -s ${file} ${file}.out 2>/dev/null; then
+    rm -f ${file}.out
+  else
+    mv -f ${file}.out ${file}
+  fi
+  chmod ugo+x ${file}
+  chmod u+w ${file}
+done
 
-eval sed ${intltool_edit} < ${ac_aux_dir}/intltool-extract.in \
-  > intltool-extract.out
-if cmp -s intltool-extract intltool-extract.out 2>/dev/null; then
-  rm -f intltool-extract.out
-else
-  mv -f intltool-extract.out intltool-extract
-fi
-chmod ugo+x intltool-extract
-chmod u+w intltool-extract
+],
+[INTLTOOL_PERL='${INTLTOOL_PERL}' ac_aux_dir='${ac_aux_dir}'
+prefix="$prefix" exec_prefix="$exec_prefix" INTLTOOL_LIBDIR="$libdir" 
+INTLTOOL_EXTRACT='${INTLTOOL_EXTRACT}' INTLTOOL_ICONV='${INTLTOOL_ICONV}'
+INTLTOOL_MSGFMT='${INTLTOOL_MSGFMT}' INTLTOOL_MSGMERGE='${INTLTOOL_MSGMERGE}'
+INTLTOOL_XGETTEXT='${INTLTOOL_XGETTEXT}'])
 
-eval sed ${intltool_edit} < ${ac_aux_dir}/intltool-merge.in \
-  > intltool-merge.out
-if cmp -s intltool-merge intltool-merge.out 2>/dev/null; then
-  rm -f intltool-merge.out
-else
-  mv -f intltool-merge.out intltool-merge
-fi
-chmod ugo+x intltool-merge
-chmod u+w intltool-merge
+])
 
-eval sed ${intltool_edit} < ${ac_aux_dir}/intltool-update.in \
-  > intltool-update.out
-if cmp -s intltool-update intltool-update.out 2>/dev/null; then
-  rm -f intltool-update.out
-else
-  mv -f intltool-update.out intltool-update
-fi
-chmod ugo+x intltool-update
-chmod u+w intltool-update
 
-], INTLTOOL_PERL='${INTLTOOL_PERL}' ac_aux_dir=${ac_aux_dir}
-INTLTOOL_EXTRACT='${INTLTOOL_EXTRACT}' ICONV='${INTLTOOL_ICONV}'
-MSGFMT='${INTLTOOL_MSGFMT}' MSGMERGE='${INTLTOOL_MSGMERGE}'
-XGETTEXT='${INTLTOOL_XGETTEXT}')
-
+# IT_PO_SUBDIR(DIRNAME)
+# ---------------------
+# All po subdirs have to be declared with this macro; the subdir "po" is
+# declared by IT_PROG_INTLTOOL.
+#
+AC_DEFUN([IT_PO_SUBDIR],
+[AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
+dnl
+dnl The following CONFIG_COMMANDS should be exetuted at the very end
+dnl of config.status.
+AC_CONFIG_COMMANDS_PRE([
+  AC_CONFIG_COMMANDS([$1/stamp-it], [
+    rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
+    >"$1/stamp-it.tmp"
+    [sed '/^#/d
+	 s/^[[].*] *//
+	 /^[ 	]*$/d
+	'"s|^|	$ac_top_srcdir/|" \
+      "$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
+    ]
+    if test ! -f "$1/Makefile"; then
+      AC_MSG_ERROR([$1/Makefile is not ready.])
+    fi
+    mv "$1/Makefile" "$1/Makefile.tmp"
+    [sed '/^POTFILES =/,/[^\\]$/ {
+		/^POTFILES =/!d
+		r $1/POTFILES
+	  }
+	 ' "$1/Makefile.tmp" >"$1/Makefile"]
+    rm -f "$1/Makefile.tmp"
+    mv "$1/stamp-it.tmp" "$1/stamp-it"
+  ])
+])dnl
 ])
 
+
 # deprecated macros
-AC_DEFUN([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL($@)])
+AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
+# A hint is needed for aclocal from Automake <= 1.9.4:
+# AC_DEFUN([AC_PROG_INTLTOOL], ...)
 
 
 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
 
-# serial 48 Debian 1.5.22-2 AC_PROG_LIBTOOL
+# serial 48 Debian 1.5.22-4 AC_PROG_LIBTOOL
 
 
 # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
@@ -1599,18 +1616,6 @@
   dynamic_linker=no
   ;;
 
-kfreebsd*-gnu)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  hardcode_into_libs=yes
-  dynamic_linker='GNU ld.so'
-  ;;
-
 freebsd* | dragonfly*)
   # DragonFly does not have aout.  When/if they implement a new
   # versioning mechanism, adjust this.
@@ -1766,7 +1771,7 @@
   ;;
 
 # This must be Linux ELF.
-linux*)
+linux* | k*bsd*-gnu)
   version_type=linux
   need_lib_prefix=no
   need_version=no
@@ -1807,18 +1812,6 @@
   dynamic_linker='NetBSD ld.elf_so'
   ;;
 
-knetbsd*-gnu)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  hardcode_into_libs=yes
-  dynamic_linker='GNU ld.so'
-  ;;
-
 netbsd*)
   version_type=sunos
   need_lib_prefix=no
@@ -2524,7 +2517,7 @@
   lt_cv_deplibs_check_method=pass_all
   ;;
 
-freebsd* | kfreebsd*-gnu | dragonfly*)
+freebsd* | dragonfly*)
   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
     case $host_cpu in
     i*86 )
@@ -2578,11 +2571,11 @@
   ;;
 
 # This must be Linux ELF.
-linux*)
+linux* | k*bsd*-gnu)
   lt_cv_deplibs_check_method=pass_all
   ;;
 
-netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
+netbsd* | netbsdelf*-gnu)
   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
   else
@@ -3330,7 +3323,7 @@
   freebsd-elf*)
     _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
     ;;
-  freebsd* | kfreebsd*-gnu | dragonfly*)
+  freebsd* | dragonfly*)
     # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
     # conventions
     _LT_AC_TAGVAR(ld_shlibs, $1)=yes
@@ -3489,7 +3482,7 @@
     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
     _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
     ;;
-  linux*)
+  linux* | k*bsd*-gnu)
     case $cc_basename in
       KCC*)
 	# Kuck and Associates, Inc. (KAI) C++ Compiler
@@ -3591,7 +3584,7 @@
 	;;
     esac
     ;;
-  netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
+  netbsd* | netbsdelf*-gnu)
     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
       wlarc=
@@ -4856,7 +4849,7 @@
   lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
   lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
   ;;
-linux*)
+linux* | k*bsd*-gnu)
   if test "$host_cpu" = ia64; then
     symcode='[[ABCDGIRSTW]]'
     lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
@@ -5129,7 +5122,7 @@
 	    ;;
 	esac
 	;;
-      freebsd* | kfreebsd*-gnu | dragonfly*)
+      freebsd* | dragonfly*)
 	# FreeBSD uses GNU C++
 	;;
       hpux9* | hpux10* | hpux11*)
@@ -5172,7 +5165,7 @@
 	    ;;
 	esac
 	;;
-      linux*)
+      linux* | k*bsd*-gnu)
 	case $cc_basename in
 	  KCC*)
 	    # KAI C++ Compiler
@@ -5215,7 +5208,7 @@
 	    ;;
 	esac
 	;;
-      netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
+      netbsd* | netbsdelf*-gnu)
 	;;
       osf3* | osf4* | osf5*)
 	case $cc_basename in
@@ -5426,7 +5419,7 @@
       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
       ;;
 
-    linux*)
+    linux* | k*bsd*-gnu)
       case $cc_basename in
       icc* | ecc*)
 	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
@@ -5567,12 +5560,9 @@
   cygwin* | mingw*)
     _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([[^ ]]*\) [[^ ]]*/\1 DATA/;/^I /d;/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
   ;;
-  kfreebsd*-gnu)
+  linux* | k*bsd*-gnu)
     _LT_AC_TAGVAR(link_all_deplibs, $1)=no
   ;;
-  linux*)
-    _LT_AC_TAGVAR(link_all_deplibs, $1)=no
-  ;;
   *)
     _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
   ;;
@@ -5743,7 +5733,7 @@
       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
       ;;
 
-    linux*)
+    linux* | k*bsd*-gnu)
       if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
 	tmp_addflag=
 	case $cc_basename,$host_cpu in
@@ -5775,7 +5765,7 @@
       fi
       ;;
 
-    netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
+    netbsd* | netbsdelf*-gnu)
       if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
 	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
 	wlarc=
@@ -6111,15 +6101,6 @@
       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
       ;;
-      
-    # GNU/kFreeBSD uses gcc -shared to do shared libraries.
-    kfreebsd*-gnu)
-      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-      _LT_AC_TAGVAR(link_all_deplibs, $1)=no
-      ;;
 
     hpux9*)
       if test "$GCC" = yes; then
@@ -6216,7 +6197,7 @@
       _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
       ;;
 
-    netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
+    netbsd* | netbsdelf*-gnu)
       if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
 	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
       else

Modified: gksu/branches/gksu2/configure.ac
===================================================================
--- gksu/branches/gksu2/configure.ac	2006-04-23 16:16:38 UTC (rev 560)
+++ gksu/branches/gksu2/configure.ac	2006-04-23 22:49:42 UTC (rev 561)
@@ -3,7 +3,7 @@
 
 AC_PREREQ(2.57)
 
-AC_INIT(gksu, 1.3.6, kov at debian.org)
+AC_INIT(gksu, 1.9.0, kov at debian.org)
 AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
 AC_CONFIG_SRCDIR(gksu/gksu.c)
 AM_CONFIG_HEADER(config.h)
@@ -43,7 +43,7 @@
 AC_PATH_PROG(GCONFTOOL, gconftool-2)
 AM_GCONF_SOURCE_2
 
-PKG_CHECK_MODULES(GKSU, [libgksu2, gtk+-2.0 >= 2.4.0, gnome-keyring-1, gconf-2.0])
+PKG_CHECK_MODULES(GKSU, [libgksu2, gtk+-2.0 >= 2.4.0])
 
 gtk_doc_min_version=1.0
 AC_MSG_CHECKING([gtk-doc version >= $gtk_doc_min_version])

Modified: gksu/branches/gksu2/gksu/Makefile.am
===================================================================
--- gksu/branches/gksu2/gksu/Makefile.am	2006-04-23 16:16:38 UTC (rev 560)
+++ gksu/branches/gksu2/gksu/Makefile.am	2006-04-23 22:49:42 UTC (rev 561)
@@ -2,34 +2,14 @@
 INCLUDES = @GKSU_CFLAGS@
 AM_CPPFLAGS = -DLOCALEDIR=\"$(datadir)/locale\" -DDATA_DIR=\"$(datadir)\" -DPREFIX=\"$(prefix)\"
 
-schemasdir       = $(GCONF_SCHEMA_FILE_DIR)
-schemas_in_files = gksu.schemas.in
-schemas_DATA     = $(schemas_in_files:.schemas.in=.schemas)
- at INTLTOOL_SCHEMAS_RULE@
+bin_PROGRAMS = gksu
 
-EXTRA_DIST = gksu.schemas.in
+noinst_HEADERS = defines.h
 
-bin_PROGRAMS = gksu gksuexec
-
-noinst_HEADERS = defines.h util.h
-
 gksu_LDFLAGS = @GKSU_LIBS@ -lutil
-gksu_SOURCES = gksu.c util.c
+gksu_SOURCES = gksu.c
 
-gksuexec_LDFLAGS = @GKSU_LIBS@
-gksuexec_SOURCES = gksuexec.c util.c
-
 install-exec-hook:
 	cd $(DESTDIR)$(bindir) && \
 		$(LN_S) -f gksu gksudo
 
-if GCONF_SCHEMAS_INSTALL
-install-data-local:
-        if test -z "$(DESTDIR)" ; then \
-          for p in $(schemas_DATA) ; do \
-            GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) $(GCONFTOOL) --makefile-install-rule $(srcdir)/$$p ; \
-          done \
-        fi
-else
-install-data-local:
-endif

Modified: gksu/branches/gksu2/gksu/gksu.c
===================================================================
--- gksu/branches/gksu2/gksu/gksu.c	2006-04-23 16:16:38 UTC (rev 560)
+++ gksu/branches/gksu2/gksu/gksu.c	2006-04-23 22:49:42 UTC (rev 561)
@@ -9,24 +9,16 @@
 #include <string.h>
 #include <getopt.h>
 
-#include <glib/gkeyfile.h>
-
 #include <gdk/gdk.h>
 #include <gdk/gdkx.h>
 #include <X11/Xlib.h>
 #include <gtk/gtk.h>
 
-#if 0
-#include <gnome-keyring.h>
-#endif
-
 #include <libgksu.h>
 
 #include "defines.h"
 #include "../config.h"
 
-#include "util.h"
-
 #define BASE_PATH "/apps/gksu/"
 
 /* GLOBALS */
@@ -35,7 +27,6 @@
 gboolean sudo_mode = FALSE;
 gboolean message_changed = FALSE;
 gboolean prompt = FALSE;
-gboolean always_ask_pass = FALSE;
 
 struct option long_opts[] = {
     /*
@@ -55,7 +46,6 @@
     {"debug", no_argument, NULL, 'd'},
     {"sudo-mode", optional_argument, NULL, 'S'},
     {"prompt", optional_argument, NULL, 'P'},
-    {"always-ask-password", optional_argument, NULL, 'a'},
     {"desktop", required_argument, NULL, 'D'},
     {0, 0, 0, 0}
 };
@@ -75,10 +65,6 @@
   const gchar* help_text[] = {
     N_("GKsu version %s\n\n"),
     N_("Usage: %s [-u <user>] [-k] [-l] <command>\n\n"),
-    N_("  --always-ask-password, -a\n"
-       "    Do not try to check if a password is really\n"
-       "    needed for running the command, or if there\n"
-       "    are other means of obtaining it: simply ask for it.\n"),
     N_("  --debug, -d\n"
        "    Print information on the screen that might be\n"
        "    useful for diagnosing and/or solving problems.\n"),
@@ -138,84 +124,34 @@
   g_free (help_trans);
 }
 
-#if 0
 static void
-keyring_create_item_cb (GnomeKeyringResult result,
-                        guint32 id, gpointer keyring_loop)
+gk_dialog (GtkMessageType type, gchar *format, ...)
 {
-  g_main_loop_quit (keyring_loop);
-}
-#endif
+  GtkWidget *diag_win;
 
-gboolean
-try_gnome_keyring_password (GksuContext *context)
-{
-  /* disabled - will probably be moved to libgksu */
-#if 0
-  GnomeKeyringAttributeList *attributes;
-  GnomeKeyringAttribute attribute;
-  GnomeKeyringResult result;
-  GList *list;
-  GError *error = NULL;
-  gboolean keyring_has_password;
-  gchar *keyring_password;
-  gchar *keyring_command;
+  va_list ap;
+  gchar *msg;
 
-  attributes = gnome_keyring_attribute_list_new ();
+  va_start(ap, format);
+  msg = g_strdup_vprintf(format, ap);
+  va_end(ap);
 
-  attribute.name = g_strdup ("user");
-  attribute.type = GNOME_KEYRING_ATTRIBUTE_TYPE_STRING;
-  attribute.value.string = g_strdup (gksu_context_get_user (context));
-  g_array_append_val (attributes, attribute);
+  diag_win = gtk_message_dialog_new_with_markup (NULL, GTK_DIALOG_MODAL,
+						 type, GTK_BUTTONS_CLOSE,
+						 msg);
 
-  attribute.name = g_strdup ("type");
-  attribute.type = GNOME_KEYRING_ATTRIBUTE_TYPE_STRING;
-  attribute.value.string = g_strdup ("local");
-  g_array_append_val (attributes, attribute);
+  gtk_signal_connect_object (GTK_OBJECT(diag_win), "delete_event",
+			     GTK_SIGNAL_FUNC(gtk_main_quit),
+			     NULL);
+  gtk_window_set_position (GTK_WINDOW(diag_win), GTK_WIN_POS_CENTER);
+  gtk_window_set_resizable (GTK_WINDOW(diag_win), FALSE);
 
-  attribute.name = g_strdup ("creator");
-  attribute.type = GNOME_KEYRING_ATTRIBUTE_TYPE_STRING;
-  attribute.value.string = g_strdup ("gksu");
-  g_array_append_val (attributes, attribute);
+  gtk_widget_show_all (diag_win);
+  gtk_dialog_run (GTK_DIALOG(diag_win));
 
-  list = g_list_alloc();
-  keyring_has_password = FALSE;
+  g_free (msg);
 
-  result = gnome_keyring_find_items_sync (GNOME_KEYRING_ITEM_GENERIC_SECRET,
-					  attributes,
-					  &list);
-  gnome_keyring_attribute_list_free (attributes);
-  if (
-      (result == GNOME_KEYRING_RESULT_OK) &&
-      (g_list_length(list) == 1)
-      )
-    {
-      GnomeKeyringFound *found = list->data;
-      keyring_password = g_strdup(found->secret);
-
-      keyring_command = g_strdup (gksu_context_get_command (context));
-      gksu_context_set_command (context, "/bin/echo test > /dev/null");
-      gksu_context_set_password (context, keyring_password);
-      gksu_su_full (context, NULL, NULL, NULL, NULL, &error);
-
-      if (!error)
-	keyring_has_password = TRUE;
-      gksu_context_set_command (context, keyring_command);
-    }
-
-  if (keyring_has_password)
-    {
-      gchar *password;
-
-      password = g_locale_from_utf8 (keyring_password,
-				     strlen (keyring_password),
-				     NULL, NULL, NULL);
-      gksu_context_set_password (context, password);
-      return FALSE; /* we do not need a password */
-    }
-
-#endif
-  return TRUE;
+  gtk_widget_destroy (diag_win);
 }
 
 int
@@ -294,16 +230,20 @@
 	  gksu_context_set_login_shell (context, TRUE);
 	  break;
 	case 'p':
+	  /* FIXME - reimplement */
 	  print_pass = TRUE;
 	  break;
 	case 't':
+	  /* FIXME - reimplement */
 	  title = g_strdup (optarg);
 	  break;
 	case 'm':
+	  /* FIXME - reimplement */
 	  message = g_strdup (optarg);
 	  message_changed = TRUE;
 	  break;
 	case 'i':
+	  /* FIXME - reimplement */
 	  icon = gdk_pixbuf_new_from_file (optarg, NULL);
 	  break;
 	case 'k':
@@ -363,10 +303,8 @@
 	    }
 
 	  break;
-	case 'a':
-	  always_ask_pass = TRUE;
-	  break;
 	case 'D':
+	  /* FIXME - reimplement */
 	  desktop_file_name = g_strdup (optarg);
 	  break;
 	}
@@ -403,58 +341,6 @@
       gtk_widget_destroy (d);
     }
 
-#if 0
-  if (desktop_file_name)
-    set_dialog_from_desktop (GKSUUI_DIALOG(dialog), context,
-			     desktop_file_name);
-
-  if (title)
-    gtk_window_set_title (GTK_WINDOW(dialog), title);
-  if (message)
-    gksuui_dialog_set_message (GKSUUI_DIALOG(dialog), message);
-  if (icon)
-    gksuui_dialog_set_icon (GKSUUI_DIALOG(dialog), icon);
-
-  if (print_pass)
-    {
-      if (!gksuui_dialog_get_message (GKSUUI_DIALOG(dialog)))
-	{
-	  gchar *msg =
-	    g_strdup_printf (_("<b>Please enter %s's password</b>"),
-			     gksu_context_get_user (context));
-
-	  gksuui_dialog_set_message (GKSUUI_DIALOG(dialog), msg);
-	  g_free (msg);
-	}
-
-      int lock = 0;
-      if (grab)
-	lock = grab_keyboard_and_mouse (dialog);
-      retvalue = gtk_dialog_run (GTK_DIALOG(dialog));
-      gtk_widget_hide (dialog);
-      if (grab)
-	ungrab_keyboard_and_mouse (lock);
-
-      /*
-	 the user may have pressed cancel or
-	 closed the window
-      */
-      if (retvalue != GTK_RESPONSE_OK)
-	  return 2;
-
-      {
-	gchar *tmp;
-	tmp = gksuui_dialog_get_password (GKSUUI_DIALOG(dialog));
-	password = g_locale_from_utf8 (tmp, strlen (tmp), NULL, NULL, NULL);
-	g_free (tmp);
-      }
-
-      if (password)
-	printf ("%s\n", password);
-      return 0;
-    }
-#endif
-
   /* now we can begin to care about a command */
   if (newargc <= optind)
     {
@@ -527,58 +413,6 @@
     }
   else
     {
-#if 0
-      if (!always_ask_pass)
-	{
-	  GtkWidget *vbox;
-	  GtkWidget *check_button;
-	  GtkWidget *alignment;
-	  GtkWidget *radio_vbox;
-	  GtkWidget *radio_session, *radio_default;
-	  gboolean remember_password;
-	  gchar *tmp = NULL;
-
-	  vbox = gtk_vbox_new (2, TRUE);
-	  gtk_box_pack_start (GTK_BOX(GKSUUI_DIALOG(dialog)->entry_vbox), vbox, TRUE, TRUE, 0);
-	  gtk_widget_show (vbox);
-
-	  check_button = gtk_check_button_new_with_label (_("Remember password"));
-	  g_signal_connect (G_OBJECT(check_button), "toggled", G_CALLBACK(cb_toggled_cb), "save-to-keyring");
-
-	  remember_password = gconf_client_get_bool (gconf_client, BASE_PATH"save-to-keyring", NULL);
-	  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(check_button), remember_password);
-	  gtk_box_pack_start (GTK_BOX(vbox), check_button, TRUE, TRUE, 0);
-	  gtk_widget_show (check_button);
-
-	  alignment = gtk_alignment_new (0.5, 0.5, 0.6, 1);
-	  gtk_box_pack_start (GTK_BOX(vbox), alignment, TRUE, TRUE, 2);
-	  gtk_widget_show (alignment);
-
-	  radio_vbox = gtk_vbox_new (2, TRUE);
-	  gtk_container_add (GTK_CONTAINER(alignment), radio_vbox);
-	  gtk_widget_set_sensitive (radio_vbox, remember_password);
-	  gtk_widget_show (radio_vbox);
-
-	  radio_session = gtk_radio_button_new_with_label (NULL, _("Save for this session"));
-	  g_signal_connect (G_OBJECT(radio_session), "toggled", G_CALLBACK(cb_toggled_cb), "save-keyring");
-	  gtk_box_pack_start (GTK_BOX(radio_vbox), radio_session, TRUE, TRUE, 0);
-	  gtk_widget_show (radio_session);
-
-	  radio_default = gtk_radio_button_new_with_label_from_widget (GTK_RADIO_BUTTON(radio_session), _("Save in the keyring"));
-	  gtk_box_pack_start (GTK_BOX(radio_vbox), radio_default, TRUE, TRUE, 0);
-	  gtk_widget_show (radio_default);
-
-	  g_signal_connect (G_OBJECT(check_button), "toggled", G_CALLBACK(set_sensitivity_cb), radio_vbox);
-
-	  tmp = gconf_client_get_string (gconf_client, BASE_PATH"save-keyring", NULL);
-	  if (tmp && (!strcmp (tmp, "default")))
-	    gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(radio_default), TRUE);
-	  g_free (tmp);
-
-	  if (gksu_context_try_need_password (context))
-	    try_gnome_keyring_password (context);
-	}
-#endif
       gksu_su_full (context,
 		    NULL, NULL,
 		    NULL, NULL,
@@ -587,67 +421,12 @@
       if (error)
 	{
 	  gk_dialog (GTK_MESSAGE_ERROR,
-		     _("Failed to run %s as user %s:\n %s"),
+		     _("<b>Failed to run %s as user %s.</b>\n\n%s"),
 		     gksu_context_get_command (context),
 		     gksu_context_get_user (context),
 		     error->message);
 	  return 3;
 	}
-#if 0
-      else
-	{
-	  gboolean save_to_keyring;
-
-	  save_to_keyring = gconf_client_get_bool (gconf_client, BASE_PATH"save-to-keyring", NULL);
-
-	  if (context->password && save_to_keyring)
-	    {
-	      static GMainLoop *keyring_loop = NULL;
-	      GnomeKeyringAttributeList *attributes;
-	      GnomeKeyringAttribute attribute;
-
-	      gchar *keyring_name;
-	      gchar *key_name;
-
-	      attributes = gnome_keyring_attribute_list_new ();
-
-	      attribute.name = g_strdup ("user");
-	      attribute.type = GNOME_KEYRING_ATTRIBUTE_TYPE_STRING;
-	      attribute.value.string = g_strdup (gksu_context_get_user (context));
-	      g_array_append_val (attributes, attribute);
-
-	      attribute.name = g_strdup ("type");
-	      attribute.type = GNOME_KEYRING_ATTRIBUTE_TYPE_STRING;
-	      attribute.value.string = g_strdup ("local");
-	      g_array_append_val (attributes, attribute);
-
-	      attribute.name = g_strdup ("creator");
-	      attribute.type = GNOME_KEYRING_ATTRIBUTE_TYPE_STRING;
-	      attribute.value.string = g_strdup ("gksu");
-	      g_array_append_val (attributes, attribute);
-
-	      key_name = g_strdup_printf ("Local password for user %s",
-					  gksu_context_get_user (context));
-
-	      keyring_loop = g_main_loop_new (NULL, FALSE);
-
-	      keyring_name = gconf_client_get_string (gconf_client, BASE_PATH"save-keyring", NULL);
-	      if (keyring_name == NULL)
-		keyring_name = g_strdup ("session");
-	      gnome_keyring_item_create (keyring_name,
-					 GNOME_KEYRING_ITEM_GENERIC_SECRET,
-					 key_name,
-					 attributes,
-					 gksu_context_get_password (context),
-					 TRUE,
-					 keyring_create_item_cb,
-					 keyring_loop, NULL);
-	      gnome_keyring_attribute_list_free (attributes);
-	      g_free (keyring_name);
-	      g_main_loop_run (keyring_loop);
-	    }
-	}
-#endif
     }
 
   return 0;

Deleted: gksu/branches/gksu2/gksu/gksu.schemas.in
===================================================================
--- gksu/branches/gksu2/gksu/gksu.schemas.in	2006-04-23 16:16:38 UTC (rev 560)
+++ gksu/branches/gksu2/gksu/gksu.schemas.in	2006-04-23 22:49:42 UTC (rev 561)
@@ -1,133 +0,0 @@
-<gconfschemafile>
-    <schemalist>
-
-      <schema>
-      <key>/schemas/apps/gksu/disable-grab</key>
-      <applyto>/apps/gksu/disable-grab</applyto>
-      <owner>gksu</owner>
-      <type>bool</type>
-      <default>false</default>
-      <locale name="C">
-	<short>Disable keyboard and mouse grab</short>
-	<long>
-	Whether the keyboard and mouse grabbing should be turned
-	off. This will make it possible for other X applications to
-	listen to keyboard input events, thus making it not possible
-	to shield from malicious applications which may be running.
-	</long>
-      </locale>
-      </schema>
-
-      <schema>
-      <key>/schemas/apps/gksu/force-grab</key>
-      <applyto>/apps/gksu/force-grab</applyto>
-      <owner>gksu</owner>
-      <type>bool</type>
-      <default>false</default>
-      <locale name="C">
-	<short>Force keyboard and mouse grab</short>
-	<long>
-	Grab keyboard and mouse even if -g has been passed as argument
-	on the command line.
-	</long>
-      </locale>
-      </schema>
-
-      <schema>
-      <key>/schemas/apps/gksu/sudo-mode</key>
-      <applyto>/apps/gksu/sudo-mode</applyto>
-      <owner>gksu</owner>
-      <type>bool</type>
-      <default>false</default>
-      <locale name="C">
-	<short>Sudo mode</short>
-	<long>
-	Whether sudo should be the default backend method. This method
-        is otherwise accessed though the -S switch or by running 'gksudo'
-        instead of 'gksu'.
-	</long>
-      </locale>
-      </schema>
-
-      <schema>
-      <key>/schemas/apps/gksu/prompt</key>
-      <applyto>/apps/gksu/prompt</applyto>
-      <owner>gksu</owner>
-      <type>bool</type>
-      <default>false</default>
-      <locale name="C">
-	<short>Prompt for grabbing</short>
-	<long>
-	This option will make gksu prompt the user if he wants to have
-	the screen grabbed before entering the password. Notice that this
-	only has an effect if force-grab is disabled.
-	</long>
-      </locale>
-      </schema>
-
-      <schema>
-      <key>/schemas/apps/gksu/always-ask-password</key>
-      <applyto>/apps/gksu/prompt</applyto>
-      <owner>gksu</owner>
-      <type>bool</type>
-      <default>false</default>
-      <locale name="C">
-	<short>Always request a password</short>
-	<long>
-	This option will prevent gksu from trying to figure out if a
-	password is needed to run the command, or if it can be obtained
-	through	other ways, such as gnome-keyring, making it simply ask
-	for the password every time.
-	</long>
-      </locale>
-      </schema>
-
-      <schema>
-      <key>/schemas/apps/gksu/display-no-pass-info</key>
-      <applyto>/apps/gksu/display-no-pass-info</applyto>
-      <owner>gksu</owner>
-      <type>bool</type>
-      <default>true</default>
-      <locale name="C">
-	<short>Display information message when no password is needed</short>
-	<long>
-	This option determines whether a message dialog will be displayed
-	informing the user that the program is being run without the need
-	of a password being asked for some reason.
-	</long>
-      </locale>
-      </schema>
-
-      <schema>
-      <key>/schemas/apps/gksu/save-to-keyring</key>
-      <applyto>/apps/gksu/save-to-keyring</applyto>
-      <owner>gksu</owner>
-      <type>bool</type>
-      <default>true</default>
-      <locale name="C">
-	<short>Save password to gnome-keyring</short>
-	<long>
-	gksu can save the password you type to the gnome-keyring so you'll
-	not be asked everytime
-	</long>
-      </locale>
-      </schema>
-
-      <schema>
-      <key>/schemas/apps/gksu/save-keyring</key>
-      <applyto>/apps/gksu/save-keyring</applyto>
-      <owner>gksu</owner>
-      <type>string</type>
-      <default>session</default>
-      <locale name="C">
-	<short>Keyring to which passwords will be saved</short>
-	<long>
-	The name of the keyring gksu should use. Usual values are "session",
-	which saves the password for the session, and "default", which saves the
-	password with no timeout.
-	</long>
-      </locale>
-      </schema>
-
-  </schemalist>  
-</gconfschemafile>
\ No newline at end of file

Deleted: gksu/branches/gksu2/gksu/gksuexec.c
===================================================================
--- gksu/branches/gksu2/gksu/gksuexec.c	2006-04-23 16:16:38 UTC (rev 560)
+++ gksu/branches/gksu2/gksu/gksuexec.c	2006-04-23 22:49:42 UTC (rev 561)
@@ -1,331 +0,0 @@
-/*
- * GkSu -- Gtk+ Frontend to su
- * Copyright (C) 2002 Gustavo Noronha Silva
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <string.h>
-#include <errno.h>
-#include <pwd.h>
-#include <sys/types.h>
-#include <gtk/gtk.h>
-#include <locale.h>
-
-#include <gksu.h>
-
-#include "../config.h"
-#include "defines.h"
-
-#include "util.h"
-
-#define GKSU_CMD (PREFIX "/bin/gksu")
-
-void
-run_gksu (GksuContext conf)
-{
-  gchar **cmd = g_malloc (sizeof(gchar*)*7);
-  gint i = 0;
-
-  cmd[i] = g_strdup (GKSU_CMD); i++;
-  cmd[i] = g_strdup ("--user"); i++;
-  cmd[i] = g_strdup (conf.user); i++;
-
-  if (conf.login_shell)
-    {
-      cmd[i] = g_strdup ("--login");
-      i++;
-    }
-
-  if (conf.keep_env)
-    {
-      cmd[i] = g_strdup ("--preserve-env");
-      i++;
-    }
-
-  cmd[i] = g_strdup_printf("%s", conf.command); i++;
-  cmd[i] = NULL;
-
-  /* executes the command */
-  if (execv (cmd[0], cmd) == -1)
-    {
-      gk_dialog (GTK_MESSAGE_ERROR, 
-		 _("Unable to run %s: %s"),
-		 cmd[0], strerror(errno));
-    }
-
-  for (i = 0 ; cmd[i] != NULL ; i++)
-    g_free (cmd[i]);
-  g_free(cmd);
-}
-
-void
-response_ok_cb (GtkWidget *w, gpointer data)
-{
-  GtkWidget *dialog = (GtkWidget*)data;
-
-  gtk_dialog_response (GTK_DIALOG(dialog),
-		       GTK_RESPONSE_OK);
-}
-
-void
-show_hide_advanced (GtkWidget *button, gpointer data)
-{
-  GtkWidget *parent, *tmp;
-
-  GtkWidget *dialog;
-  GtkWidget *vbox;
-  GtkWidget *label;
-  GtkWidget *check_login;
-  GtkWidget *check_presenv;
-
-  GksuContext *conf = (GksuContext*)data;
-  gint response;
-
-  parent = gtk_widget_get_parent (button);
-  while ((tmp = gtk_widget_get_parent (parent)) != NULL)
-    parent = tmp;
-
-  dialog = gtk_dialog_new_with_buttons (_("Advanced options"), 
-					GTK_WINDOW(parent), 
-					GTK_DIALOG_MODAL,
-					GTK_STOCK_CLOSE,
-					GTK_RESPONSE_CLOSE,
-					NULL);
-  gtk_dialog_set_has_separator (GTK_DIALOG(dialog), FALSE);
-  gtk_container_set_border_width (GTK_CONTAINER(dialog), 4);
-
-  /* vbox points to the dialog's vbox */
-  vbox = GTK_DIALOG(dialog)->vbox;
-  gtk_box_set_spacing (GTK_BOX(vbox), 3);
-
-  /* label */
-  label = gtk_label_new ("");
-  gtk_label_set_markup (GTK_LABEL(label), 
-			_("<b>Options to use when changing user</b>"));
-  gtk_box_pack_start (GTK_BOX(vbox), label, TRUE, TRUE, 5);
-  gtk_widget_show (label);
-
-  /* login shell? (--login) */
-  check_login = gtk_check_button_new_with_mnemonic (_("_login shell"));
-  if (conf->login_shell == TRUE) /* window may have been opened before */
-    gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(check_login), TRUE);
-  gtk_box_pack_start (GTK_BOX(vbox), check_login, TRUE, TRUE, 0);
-  gtk_widget_show (check_login);
-
-  /* preserve environment (--preserve-env) */
-  check_presenv = 
-    gtk_check_button_new_with_mnemonic (_("_preserve environment"));
-  if (conf->keep_env == TRUE)
-    gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(check_presenv), TRUE);
-  gtk_box_pack_start (GTK_BOX(vbox), check_presenv, TRUE, TRUE, 0);
-  gtk_widget_show (check_presenv);
-
-  response = gtk_dialog_run (GTK_DIALOG(dialog));
-
-  if (response == GTK_RESPONSE_NONE)
-    return;
-
-  if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(check_login)))
-    conf->login_shell = TRUE;
-  else
-    conf->login_shell = FALSE;
-
-  if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(check_presenv)))
-    conf->keep_env = TRUE;
-  else
-    conf->keep_env = FALSE;
-
-  gtk_widget_destroy (dialog);
-}
-
-typedef struct {
-  char *username;
-  uid_t userid;
-} TmpUser;
-
-/*
- * Comparison function for g_list_sort()
- */
-static int fill_with_user_list_cmp(gconstpointer a, gconstpointer b)
-{
-  return strcmp(((TmpUser *) a)->username, ((TmpUser *) b)->username);
-}
-
-/*
- * Fill combobox with an alphabetically sorted list of all users on the system
- */
-static GList *fill_with_user_list(GtkWidget *combobox)
-{
-  GList *tmp = NULL, *list;
-  TmpUser *tu;
-  struct passwd *pw;
-
-  setpwent();
-
-  /* Get all the users info and store it temporary */
-  while ((pw = getpwent())) {
-    tu = g_new(TmpUser, 1);
-
-    tu->username = g_strdup(pw->pw_name);
-    tu->userid = pw->pw_uid;
-
-    tmp = g_list_prepend(tmp, tu);
-  }
-
-  /* Sort it! */
-  tmp = g_list_sort(tmp, fill_with_user_list_cmp);
-
-  /* Add only the usernames */
-  for (list = tmp; list; list = g_list_next(list)) {
-    tu = list->data;
-
-    gtk_combo_box_append_text (GTK_COMBO_BOX(combobox), tu->username);
-
-    if (!strcmp (tu->username, "root"))
-      gtk_combo_box_set_active (GTK_COMBO_BOX(combobox),
-				g_list_position(tmp, list));
-
-    g_free(tu);
-  }
-
-  g_list_free(tmp);
-  endpwent();
-}
-
-int 
-main (int argc, char **argv)
-{
-  GtkWidget *dialog;
-  GtkWidget *hbox;
-  GtkWidget *lvbox;
-  GtkWidget *rvbox;
-  GtkWidget *image;
-
-  GtkWidget *label_cmd;
-  GtkWidget *entry_cmd;
-
-  GtkWidget *label_user;
-  GtkWidget *combo_user;
-
-  /* advanced stuff */
-  GtkWidget *advanced_button;
-
-  gint response;
-
-  GksuContext conf;
-
-  /* init the default values */
-  conf.login_shell = FALSE;
-  conf.keep_env = FALSE;
-
-  setlocale (LC_ALL, "");
-  bindtextdomain(PACKAGE_NAME, LOCALEDIR);  
-  bind_textdomain_codeset (PACKAGE_NAME, "UTF-8");
-  textdomain(PACKAGE_NAME);
-
-  gtk_init (&argc, &argv);
-
-  gtk_window_set_default_icon_from_file (DATA_DIR "/pixmaps/gksu-icon.png", NULL);
-
-  dialog = gtk_dialog_new_with_buttons (_("Run program"), NULL, 0,
-					GTK_STOCK_CANCEL,
-					GTK_RESPONSE_CANCEL,
-					GTK_STOCK_OK,
-					GTK_RESPONSE_OK,
-					NULL);
-  gtk_dialog_set_has_separator (GTK_DIALOG(dialog), FALSE);
-
-  /* horizontal box */
-  hbox = gtk_hbox_new (FALSE, 4);
-  gtk_container_set_border_width (GTK_CONTAINER(hbox), 5);
-  gtk_box_pack_start (GTK_BOX(GTK_DIALOG(dialog)->vbox),
-		      hbox, TRUE, TRUE, 2);
-
-  /* left vertical box */
-  lvbox = gtk_vbox_new (FALSE, 2);
-  gtk_box_pack_start (GTK_BOX(hbox), lvbox, TRUE, TRUE, 0);
-
-  /* command */
-  label_cmd = gtk_label_new (_("Run:"));
-  gtk_label_set_justify (GTK_LABEL(label_cmd), GTK_JUSTIFY_LEFT);
-  gtk_box_pack_start (GTK_BOX(lvbox), label_cmd, TRUE, TRUE, 0);
-
-  entry_cmd = gtk_entry_new ();
-  gtk_signal_connect (GTK_OBJECT(entry_cmd), "activate",
-		      GTK_SIGNAL_FUNC(response_ok_cb),
-		      dialog);
-  gtk_box_pack_start (GTK_BOX(lvbox), entry_cmd, TRUE, TRUE, 0);
-
-  /* user name */
-  label_user = gtk_label_new (_("As user:"));
-  gtk_label_set_justify (GTK_LABEL(label_user), GTK_JUSTIFY_LEFT);
-  gtk_box_pack_start (GTK_BOX(lvbox), label_user, TRUE, TRUE, 0);
-
-  combo_user = gtk_combo_box_new_text ();
-  fill_with_user_list (combo_user);
-
-  gtk_box_pack_start (GTK_BOX(lvbox), combo_user, TRUE, TRUE, 0);
-
-  /* right vertical box */
-  rvbox = gtk_vbox_new (FALSE, 2);
-  gtk_box_pack_start (GTK_BOX(hbox), rvbox, TRUE, TRUE, 0);
-
-  /* image */
-  image = gtk_image_new_from_file (DATA_DIR"/pixmaps/gksu-icon.png");
-  gtk_box_pack_start (GTK_BOX(rvbox), image, TRUE, TRUE, 0);
-
-  /* advanced button */
-  advanced_button = gtk_button_new_with_mnemonic (_("_Advanced"));
-  g_signal_connect (G_OBJECT(advanced_button), "clicked",
-		    G_CALLBACK(show_hide_advanced), &conf);
-  gtk_box_pack_start (GTK_BOX(rvbox), advanced_button, TRUE, FALSE, 0);
-
-  /* let the magic begin! */
-  gtk_widget_show_all (dialog);
-
-  while (TRUE)
-    {
-      response = gtk_dialog_run (GTK_DIALOG(dialog));
-
-      switch (response)
-	{
-	case GTK_RESPONSE_CANCEL:
-	case GTK_RESPONSE_DELETE_EVENT:
-	case GTK_RESPONSE_NONE:
-	  exit (0);
-	}
-
-      conf.command = gtk_editable_get_chars (GTK_EDITABLE(entry_cmd), 0, -1);
-      conf.user = gtk_combo_box_get_active_text (GTK_COMBO_BOX(combo_user));
-
-      if (!strcmp (conf.command, ""))
-	{
-	  gk_dialog (GTK_MESSAGE_ERROR, _("Missing command to run."));
-	}
-      else
-	{
-	  gtk_widget_destroy (dialog);
-	  run_gksu (conf);
-
-	  break;
-	}
-    }
-
-  return 0;
-}

Deleted: gksu/branches/gksu2/gksu/util.c
===================================================================
--- gksu/branches/gksu2/gksu/util.c	2006-04-23 16:16:38 UTC (rev 560)
+++ gksu/branches/gksu2/gksu/util.c	2006-04-23 22:49:42 UTC (rev 561)
@@ -1,34 +0,0 @@
-#include <gtk/gtk.h>
-
-#include "util.h"
-
-void 
-gk_dialog (GtkMessageType type, gchar *format, ...)
-{
-  GtkWidget *diag_win;
-
-  va_list ap;
-  gchar *msg;
-
-  va_start(ap, format);
-  msg = g_strdup_vprintf(format, ap);
-  va_end(ap);
-
-  diag_win = gtk_message_dialog_new_with_markup (NULL, GTK_DIALOG_MODAL,
-						 type, GTK_BUTTONS_CLOSE,
-						 msg);
-			     
-  gtk_signal_connect_object (GTK_OBJECT(diag_win), "delete_event",
-			     GTK_SIGNAL_FUNC(gtk_main_quit), 
-			     NULL);
-  gtk_window_set_position (GTK_WINDOW(diag_win), GTK_WIN_POS_CENTER);
-  gtk_window_set_resizable (GTK_WINDOW(diag_win), FALSE);
-
-  gtk_widget_show_all (diag_win);
-  gtk_dialog_run (GTK_DIALOG(diag_win));
-
-  g_free (msg);
-
-  gtk_widget_destroy (diag_win);
-}
-

Deleted: gksu/branches/gksu2/gksu/util.h
===================================================================
--- gksu/branches/gksu2/gksu/util.h	2006-04-23 16:16:38 UTC (rev 560)
+++ gksu/branches/gksu2/gksu/util.h	2006-04-23 22:49:42 UTC (rev 561)
@@ -1,7 +0,0 @@
-#ifndef __UTIL_H__
-#define __UTIL_H__ 1
-
-void 
-gk_dialog (GtkMessageType type, gchar *format, ...);
-
-#endif

Deleted: gksu/branches/gksu2/gksuexec.desktop.in
===================================================================
--- gksu/branches/gksu2/gksuexec.desktop.in	2006-04-23 16:16:38 UTC (rev 560)
+++ gksu/branches/gksu2/gksuexec.desktop.in	2006-04-23 22:49:42 UTC (rev 561)
@@ -1,12 +0,0 @@
-[Desktop Entry]
-_Name=Run as different user
-_Comment=Opens a dialog where you can type a command to be run as a given user
-Encoding=UTF-8
-Exec=gksuexec
-Icon=gksu-icon
-StartupNotify=true
-Terminal=false
-X-MultipleArgs=false
-Type=Application
-Categories=Application;System;
-

Modified: gksu/branches/gksu2/po/POTFILES.in
===================================================================
--- gksu/branches/gksu2/po/POTFILES.in	2006-04-23 16:16:38 UTC (rev 560)
+++ gksu/branches/gksu2/po/POTFILES.in	2006-04-23 22:49:42 UTC (rev 561)
@@ -1,5 +1,2 @@
 gksu/gksu.c
-gksu/gksuexec.c
-gksu/gksu.schemas.in
 gksu.desktop.in
-gksuexec.desktop.in




More information about the gksu-commits mailing list