diff -ur nmap-3.78/nmapfe/aclocal.m4 nmap-3.78-gtk2/nmapfe/aclocal.m4 --- nmap-3.78/nmapfe/aclocal.m4 2004-10-07 23:59:47.000000000 +0200 +++ nmap-3.78-gtk2/nmapfe/aclocal.m4 2005-02-02 15:18:11.000000000 +0100 @@ -1,6 +1,6 @@ -# aclocal.m4 generated automatically by aclocal 1.6.3 -*- Autoconf -*- +# generated automatically by aclocal 1.9.2 -*- Autoconf -*- -# Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002 +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 # Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -12,58 +12,70 @@ # PARTICULAR PURPOSE. # Configure paths for GTK+ -# Owen Taylor 97-11-3 +# Owen Taylor 1997-2001 -dnl AM_PATH_GTK([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]]) -dnl Test for GTK, and define GTK_CFLAGS and GTK_LIBS +dnl AM_PATH_GTK_2_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]]) +dnl Test for GTK+, and define GTK_CFLAGS and GTK_LIBS, if gthread is specified in MODULES, +dnl pass to pkg-config dnl -AC_DEFUN(AM_PATH_GTK, +AC_DEFUN([AM_PATH_GTK_2_0], [dnl -dnl Get the cflags and libraries from the gtk-config script +dnl Get the cflags and libraries from pkg-config dnl -AC_ARG_WITH(gtk-prefix,[ --with-gtk-prefix=PFX Prefix where GTK is installed (optional)], - gtk_config_prefix="$withval", gtk_config_prefix="") -AC_ARG_WITH(gtk-exec-prefix,[ --with-gtk-exec-prefix=PFX Exec prefix where GTK is installed (optional)], - gtk_config_exec_prefix="$withval", gtk_config_exec_prefix="") -AC_ARG_ENABLE(gtktest, [ --disable-gtktest Do not try to compile and run a test GTK program], +AC_ARG_ENABLE(gtktest, [ --disable-gtktest do not try to compile and run a test GTK+ program], , enable_gtktest=yes) + pkg_config_args=gtk+-2.0 for module in . $4 do case "$module" in gthread) - gtk_config_args="$gtk_config_args gthread" + pkg_config_args="$pkg_config_args gthread-2.0" ;; esac done - if test x$gtk_config_exec_prefix != x ; then - gtk_config_args="$gtk_config_args --exec-prefix=$gtk_config_exec_prefix" - if test x${GTK_CONFIG+set} != xset ; then - GTK_CONFIG=$gtk_config_exec_prefix/bin/gtk-config - fi + no_gtk="" + + AC_PATH_PROG(PKG_CONFIG, pkg-config, no) + + if test x$PKG_CONFIG != xno ; then + if pkg-config --atleast-pkgconfig-version 0.7 ; then + : + else + echo "*** pkg-config too old; version 0.7 or better required." + no_gtk=yes + PKG_CONFIG=no + fi + else + no_gtk=yes fi - if test x$gtk_config_prefix != x ; then - gtk_config_args="$gtk_config_args --prefix=$gtk_config_prefix" - if test x${GTK_CONFIG+set} != xset ; then - GTK_CONFIG=$gtk_config_prefix/bin/gtk-config - fi + + min_gtk_version=ifelse([$1], ,2.0.0,$1) + AC_MSG_CHECKING(for GTK+ - version >= $min_gtk_version) + + if test x$PKG_CONFIG != xno ; then + ## don't try to run the test against uninstalled libtool libs + if $PKG_CONFIG --uninstalled $pkg_config_args; then + echo "Will use uninstalled version of GTK+ found in PKG_CONFIG_PATH" + enable_gtktest=no + fi + + if $PKG_CONFIG --atleast-version $min_gtk_version $pkg_config_args; then + : + else + no_gtk=yes + fi fi - AC_PATH_PROG(GTK_CONFIG, gtk-config, no) - min_gtk_version=ifelse([$1], ,0.99.7,$1) - AC_MSG_CHECKING(for GTK - version >= $min_gtk_version) - no_gtk="" - if test "$GTK_CONFIG" = "no" ; then - no_gtk=yes - else - GTK_CFLAGS=`$GTK_CONFIG $gtk_config_args --cflags` - GTK_LIBS=`$GTK_CONFIG $gtk_config_args --libs` - gtk_config_major_version=`$GTK_CONFIG $gtk_config_args --version | \ + if test x"$no_gtk" = x ; then + GTK_CFLAGS=`$PKG_CONFIG $pkg_config_args --cflags` + GTK_LIBS=`$PKG_CONFIG $pkg_config_args --libs` + gtk_config_major_version=`$PKG_CONFIG --modversion gtk+-2.0 | \ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` - gtk_config_minor_version=`$GTK_CONFIG $gtk_config_args --version | \ + gtk_config_minor_version=`$PKG_CONFIG --modversion gtk+-2.0 | \ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` - gtk_config_micro_version=`$GTK_CONFIG $gtk_config_args --version | \ + gtk_config_micro_version=`$PKG_CONFIG --modversion gtk+-2.0 | \ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` if test "x$enable_gtktest" = "xyes" ; then ac_save_CFLAGS="$CFLAGS" @@ -71,8 +83,8 @@ CFLAGS="$CFLAGS $GTK_CFLAGS" LIBS="$GTK_LIBS $LIBS" dnl -dnl Now check if the installed GTK is sufficiently new. (Also sanity -dnl checks the results of gtk-config to some extent +dnl Now check if the installed GTK+ is sufficiently new. (Also sanity +dnl checks the results of pkg-config to some extent) dnl rm -f conf.gtktest AC_TRY_RUN([ @@ -99,19 +111,17 @@ (gtk_minor_version != $gtk_config_minor_version) || (gtk_micro_version != $gtk_config_micro_version)) { - printf("\n*** 'gtk-config --version' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n", + printf("\n*** 'pkg-config --modversion gtk+-2.0' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n", $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version, gtk_major_version, gtk_minor_version, gtk_micro_version); - printf ("*** was found! If gtk-config was correct, then it is best\n"); + printf ("*** was found! If pkg-config was correct, then it is best\n"); printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n"); printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); printf("*** required on your system.\n"); - printf("*** If gtk-config was wrong, set the environment variable GTK_CONFIG\n"); - printf("*** to point to the correct copy of gtk-config, and remove the file config.cache\n"); - printf("*** before re-running configure\n"); + printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n"); + printf("*** to point to the correct configuration files\n"); } -#if defined (GTK_MAJOR_VERSION) && defined (GTK_MINOR_VERSION) && defined (GTK_MICRO_VERSION) else if ((gtk_major_version != GTK_MAJOR_VERSION) || (gtk_minor_version != GTK_MINOR_VERSION) || (gtk_micro_version != GTK_MICRO_VERSION)) @@ -121,7 +131,6 @@ printf("*** library (version %d.%d.%d)\n", gtk_major_version, gtk_minor_version, gtk_micro_version); } -#endif /* defined (GTK_MAJOR_VERSION) ... */ else { if ((gtk_major_version > major) || @@ -139,10 +148,10 @@ printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n"); printf("***\n"); printf("*** If you have already installed a sufficiently new version, this error\n"); - printf("*** probably means that the wrong copy of the gtk-config shell script is\n"); + printf("*** probably means that the wrong copy of the pkg-config shell script is\n"); printf("*** being found. The easiest way to fix this is to remove the old version\n"); - printf("*** of GTK+, but you can also set the GTK_CONFIG environment to point to the\n"); - printf("*** correct copy of gtk-config. (In this case, you will have to\n"); + printf("*** of GTK+, but you can also set the PKG_CONFIG environment to point to the\n"); + printf("*** correct copy of pkg-config. (In this case, you will have to\n"); printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); printf("*** so that the correct libraries are found at run-time))\n"); } @@ -155,20 +164,20 @@ fi fi if test "x$no_gtk" = x ; then - AC_MSG_RESULT(yes) + AC_MSG_RESULT(yes (version $gtk_config_major_version.$gtk_config_minor_version.$gtk_config_micro_version)) ifelse([$2], , :, [$2]) else AC_MSG_RESULT(no) - if test "$GTK_CONFIG" = "no" ; then - echo "*** The gtk-config script installed by GTK could not be found" - echo "*** If GTK was installed in PREFIX, make sure PREFIX/bin is in" - echo "*** your path, or set the GTK_CONFIG environment variable to the" - echo "*** full path to gtk-config." + if test "$PKG_CONFIG" = "no" ; then + echo "*** A new enough version of pkg-config was not found." + echo "*** See http://pkgconfig.sourceforge.net" else if test -f conf.gtktest ; then : else - echo "*** Could not run GTK test program, checking why..." + echo "*** Could not run GTK+ test program, checking why..." + ac_save_CFLAGS="$CFLAGS" + ac_save_LIBS="$LIBS" CFLAGS="$CFLAGS $GTK_CFLAGS" LIBS="$LIBS $GTK_LIBS" AC_TRY_LINK([ @@ -176,23 +185,16 @@ #include ], [ return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ], [ echo "*** The test program compiled, but did not run. This usually means" - echo "*** that the run-time linker is not finding GTK or finding the wrong" - echo "*** version of GTK. If it is not finding GTK, you'll need to set your" + echo "*** that the run-time linker is not finding GTK+ or finding the wrong" + echo "*** version of GTK+. If it is not finding GTK+, you'll need to set your" echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" echo "*** to the installed location Also, make sure you have run ldconfig if that" echo "*** is required on your system" echo "***" echo "*** If you have an old version installed, it is best to remove it, although" - echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" - echo "***" - echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that" - echo "*** came with the system with the command" - echo "***" - echo "*** rpm --erase --nodeps gtk gtk-devel" ], + echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ], [ echo "*** The test program failed to compile or link. See the file config.log for the" - echo "*** exact error that occured. This usually means GTK was incorrectly installed" - echo "*** or that you have moved GTK since it was installed. In the latter case, you" - echo "*** may want to edit the gtk-config script: $GTK_CONFIG" ]) + echo "*** exact error that occured. This usually means GTK+ is incorrectly installed."]) CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi diff -ur nmap-3.78/nmapfe/configure nmap-3.78-gtk2/nmapfe/configure --- nmap-3.78/nmapfe/configure 2004-10-07 23:59:48.000000000 +0200 +++ nmap-3.78-gtk2/nmapfe/configure 2005-02-02 15:18:12.000000000 +0100 @@ -272,7 +272,7 @@ PACKAGE_BUGREPORT= ac_unique_file="nmapfe.c" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT GTK_CONFIG GTK_CFLAGS GTK_LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os NBASEDIR LIBOBJS LTLIBOBJS' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT PKG_CONFIG GTK_CFLAGS GTK_LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os NBASEDIR LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -803,13 +803,11 @@ Optional Features: --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --disable-gtktest Do not try to compile and run a test GTK program + --disable-gtktest do not try to compile and run a test GTK+ program Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --with-gtk-prefix=PFX Prefix where GTK is installed (optional) - --with-gtk-exec-prefix=PFX Exec prefix where GTK is installed (optional) --with-libnbase=DIR Look for nbase include/libs in DIR Some influential environment variables: @@ -2196,22 +2194,6 @@ # [LIBS="$LIBS $GTK_LIBS" CFLAGS="$CFLAGS $GTK_CFLAGS"], # AC_MSG_ERROR(Cannot find GTK: Is gtk-config in path?)) - -# Check whether --with-gtk-prefix or --without-gtk-prefix was given. -if test "${with_gtk_prefix+set}" = set; then - withval="$with_gtk_prefix" - gtk_config_prefix="$withval" -else - gtk_config_prefix="" -fi; - -# Check whether --with-gtk-exec-prefix or --without-gtk-exec-prefix was given. -if test "${with_gtk_exec_prefix+set}" = set; then - withval="$with_gtk_exec_prefix" - gtk_config_exec_prefix="$withval" -else - gtk_config_exec_prefix="" -fi; # Check whether --enable-gtktest or --disable-gtktest was given. if test "${enable_gtktest+set}" = set; then enableval="$enable_gtktest" @@ -2220,38 +2202,28 @@ enable_gtktest=yes fi; + pkg_config_args=gtk+-2.0 for module in . do case "$module" in gthread) - gtk_config_args="$gtk_config_args gthread" + pkg_config_args="$pkg_config_args gthread-2.0" ;; esac done - if test x$gtk_config_exec_prefix != x ; then - gtk_config_args="$gtk_config_args --exec-prefix=$gtk_config_exec_prefix" - if test x${GTK_CONFIG+set} != xset ; then - GTK_CONFIG=$gtk_config_exec_prefix/bin/gtk-config - fi - fi - if test x$gtk_config_prefix != x ; then - gtk_config_args="$gtk_config_args --prefix=$gtk_config_prefix" - if test x${GTK_CONFIG+set} != xset ; then - GTK_CONFIG=$gtk_config_prefix/bin/gtk-config - fi - fi + no_gtk="" - # Extract the first word of "gtk-config", so it can be a program name with args. -set dummy gtk-config; ac_word=$2 + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_GTK_CONFIG+set}" = set; then +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - case $GTK_CONFIG in + case $PKG_CONFIG in [\\/]* | ?:[\\/]*) - ac_cv_path_GTK_CONFIG="$GTK_CONFIG" # Let the user override the test with a path. + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -2261,41 +2233,66 @@ test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_GTK_CONFIG="$as_dir/$ac_word$ac_exec_ext" + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done - test -z "$ac_cv_path_GTK_CONFIG" && ac_cv_path_GTK_CONFIG="no" + test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" ;; esac fi -GTK_CONFIG=$ac_cv_path_GTK_CONFIG +PKG_CONFIG=$ac_cv_path_PKG_CONFIG -if test -n "$GTK_CONFIG"; then - echo "$as_me:$LINENO: result: $GTK_CONFIG" >&5 -echo "${ECHO_T}$GTK_CONFIG" >&6 +if test -n "$PKG_CONFIG"; then + echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 +echo "${ECHO_T}$PKG_CONFIG" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi - min_gtk_version=1.0.0 - echo "$as_me:$LINENO: checking for GTK - version >= $min_gtk_version" >&5 -echo $ECHO_N "checking for GTK - version >= $min_gtk_version... $ECHO_C" >&6 - no_gtk="" - if test "$GTK_CONFIG" = "no" ; then - no_gtk=yes + + if test x$PKG_CONFIG != xno ; then + if pkg-config --atleast-pkgconfig-version 0.7 ; then + : + else + echo "*** pkg-config too old; version 0.7 or better required." + no_gtk=yes + PKG_CONFIG=no + fi else - GTK_CFLAGS=`$GTK_CONFIG $gtk_config_args --cflags` - GTK_LIBS=`$GTK_CONFIG $gtk_config_args --libs` - gtk_config_major_version=`$GTK_CONFIG $gtk_config_args --version | \ + no_gtk=yes + fi + + min_gtk_version=2.0.0 + echo "$as_me:$LINENO: checking for GTK+ - version >= $min_gtk_version" >&5 +echo $ECHO_N "checking for GTK+ - version >= $min_gtk_version... $ECHO_C" >&6 + + if test x$PKG_CONFIG != xno ; then + ## don't try to run the test against uninstalled libtool libs + if $PKG_CONFIG --uninstalled $pkg_config_args; then + echo "Will use uninstalled version of GTK+ found in PKG_CONFIG_PATH" + enable_gtktest=no + fi + + if $PKG_CONFIG --atleast-version $min_gtk_version $pkg_config_args; then + : + else + no_gtk=yes + fi + fi + + if test x"$no_gtk" = x ; then + GTK_CFLAGS=`$PKG_CONFIG $pkg_config_args --cflags` + GTK_LIBS=`$PKG_CONFIG $pkg_config_args --libs` + gtk_config_major_version=`$PKG_CONFIG --modversion gtk+-2.0 | \ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'` - gtk_config_minor_version=`$GTK_CONFIG $gtk_config_args --version | \ + gtk_config_minor_version=`$PKG_CONFIG --modversion gtk+-2.0 | \ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'` - gtk_config_micro_version=`$GTK_CONFIG $gtk_config_args --version | \ + gtk_config_micro_version=`$PKG_CONFIG --modversion gtk+-2.0 | \ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'` if test "x$enable_gtktest" = "xyes" ; then ac_save_CFLAGS="$CFLAGS" @@ -2336,19 +2333,17 @@ (gtk_minor_version != $gtk_config_minor_version) || (gtk_micro_version != $gtk_config_micro_version)) { - printf("\n*** 'gtk-config --version' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n", + printf("\n*** 'pkg-config --modversion gtk+-2.0' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n", $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version, gtk_major_version, gtk_minor_version, gtk_micro_version); - printf ("*** was found! If gtk-config was correct, then it is best\n"); + printf ("*** was found! If pkg-config was correct, then it is best\n"); printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n"); printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); printf("*** required on your system.\n"); - printf("*** If gtk-config was wrong, set the environment variable GTK_CONFIG\n"); - printf("*** to point to the correct copy of gtk-config, and remove the file config.cache\n"); - printf("*** before re-running configure\n"); + printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n"); + printf("*** to point to the correct configuration files\n"); } -#if defined (GTK_MAJOR_VERSION) && defined (GTK_MINOR_VERSION) && defined (GTK_MICRO_VERSION) else if ((gtk_major_version != GTK_MAJOR_VERSION) || (gtk_minor_version != GTK_MINOR_VERSION) || (gtk_micro_version != GTK_MICRO_VERSION)) @@ -2358,7 +2353,6 @@ printf("*** library (version %d.%d.%d)\n", gtk_major_version, gtk_minor_version, gtk_micro_version); } -#endif /* defined (GTK_MAJOR_VERSION) ... */ else { if ((gtk_major_version > major) || @@ -2376,10 +2370,10 @@ printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n"); printf("***\n"); printf("*** If you have already installed a sufficiently new version, this error\n"); - printf("*** probably means that the wrong copy of the gtk-config shell script is\n"); + printf("*** probably means that the wrong copy of the pkg-config shell script is\n"); printf("*** being found. The easiest way to fix this is to remove the old version\n"); - printf("*** of GTK+, but you can also set the GTK_CONFIG environment to point to the\n"); - printf("*** correct copy of gtk-config. (In this case, you will have to\n"); + printf("*** of GTK+, but you can also set the PKG_CONFIG environment to point to the\n"); + printf("*** correct copy of pkg-config. (In this case, you will have to\n"); printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); printf("*** so that the correct libraries are found at run-time))\n"); } @@ -2415,22 +2409,22 @@ fi fi if test "x$no_gtk" = x ; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - LIBS="$LIBS $GTK_LIBS" CFLAGS="$CFLAGS $GTK_CFLAGS" + echo "$as_me:$LINENO: result: yes (version $gtk_config_major_version.$gtk_config_minor_version.$gtk_config_micro_version)" >&5 +echo "${ECHO_T}yes (version $gtk_config_major_version.$gtk_config_minor_version.$gtk_config_micro_version)" >&6 + LIBS="$LIBS $GTK_LIBS" CFLAGS="$CFLAGS $GTK_CFLAGS -DGTK_ENABLE_BROKEN" else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 - if test "$GTK_CONFIG" = "no" ; then - echo "*** The gtk-config script installed by GTK could not be found" - echo "*** If GTK was installed in PREFIX, make sure PREFIX/bin is in" - echo "*** your path, or set the GTK_CONFIG environment variable to the" - echo "*** full path to gtk-config." + if test "$PKG_CONFIG" = "no" ; then + echo "*** A new enough version of pkg-config was not found." + echo "*** See http://pkgconfig.sourceforge.net" else if test -f conf.gtktest ; then : else - echo "*** Could not run GTK test program, checking why..." + echo "*** Could not run GTK+ test program, checking why..." + ac_save_CFLAGS="$CFLAGS" + ac_save_LIBS="$LIBS" CFLAGS="$CFLAGS $GTK_CFLAGS" LIBS="$LIBS $GTK_LIBS" cat >conftest.$ac_ext <<_ACEOF @@ -2474,27 +2468,20 @@ echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then echo "*** The test program compiled, but did not run. This usually means" - echo "*** that the run-time linker is not finding GTK or finding the wrong" - echo "*** version of GTK. If it is not finding GTK, you'll need to set your" + echo "*** that the run-time linker is not finding GTK+ or finding the wrong" + echo "*** version of GTK+. If it is not finding GTK+, you'll need to set your" echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" echo "*** to the installed location Also, make sure you have run ldconfig if that" echo "*** is required on your system" echo "***" echo "*** If you have an old version installed, it is best to remove it, although" echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" - echo "***" - echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that" - echo "*** came with the system with the command" - echo "***" - echo "*** rpm --erase --nodeps gtk gtk-devel" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 echo "*** The test program failed to compile or link. See the file config.log for the" - echo "*** exact error that occured. This usually means GTK was incorrectly installed" - echo "*** or that you have moved GTK since it was installed. In the latter case, you" - echo "*** may want to edit the gtk-config script: $GTK_CONFIG" + echo "*** exact error that occured. This usually means GTK+ is incorrectly installed." fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext @@ -3425,7 +3412,7 @@ s,@ac_ct_CC@,$ac_ct_CC,;t t s,@EXEEXT@,$EXEEXT,;t t s,@OBJEXT@,$OBJEXT,;t t -s,@GTK_CONFIG@,$GTK_CONFIG,;t t +s,@PKG_CONFIG@,$PKG_CONFIG,;t t s,@GTK_CFLAGS@,$GTK_CFLAGS,;t t s,@GTK_LIBS@,$GTK_LIBS,;t t s,@build@,$build,;t t diff -ur nmap-3.78/nmapfe/configure.ac nmap-3.78-gtk2/nmapfe/configure.ac --- nmap-3.78/nmapfe/configure.ac 2004-10-07 23:57:46.000000000 +0200 +++ nmap-3.78-gtk2/nmapfe/configure.ac 2005-02-02 15:18:01.000000000 +0100 @@ -9,8 +9,8 @@ #AM_PATH_GTK(1.0.0, # [LIBS="$LIBS $GTK_LIBS" CFLAGS="$CFLAGS $GTK_CFLAGS"], # AC_MSG_ERROR(Cannot find GTK: Is gtk-config in path?)) -AM_PATH_GTK(1.0.0, - [LIBS="$LIBS $GTK_LIBS" CFLAGS="$CFLAGS $GTK_CFLAGS"], +AM_PATH_GTK_2_0(2.0.0, + [LIBS="$LIBS $GTK_LIBS" CFLAGS="$CFLAGS $GTK_CFLAGS -DGTK_ENABLE_BROKEN"], AC_DEFINE(MISSING_GTK) \ AC_MSG_WARN(NMAPFE WILL NOT BE BUILT -- BUT NMAP SHOULD STILL WORK )) Nur in nmap-3.78-gtk2/nmapfe: Makefile. diff -ur nmap-3.78/nmapfe/nmapfe.c nmap-3.78-gtk2/nmapfe/nmapfe.c --- nmap-3.78/nmapfe/nmapfe.c 2004-08-29 11:12:04.000000000 +0200 +++ nmap-3.78-gtk2/nmapfe/nmapfe.c 2005-02-02 16:10:37.000000000 +0100 @@ -349,7 +349,7 @@ /* Exit button (rightmost in hbox) */ button = gtk_button_new_with_label("Exit"); - gtk_object_set(GTK_OBJECT(button), "width", 48, NULL); + /*gtk_object_set(GTK_OBJECT(button), "width", 48, NULL);*/ gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(exitNmapFE_cb), NULL); gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0); @@ -357,7 +357,7 @@ /* Scan button (2nd right in hbox) */ opt.scanButton = gtk_toggle_button_new_with_label("Scan"); - gtk_object_set(GTK_OBJECT(opt.scanButton), "width", 72, NULL); + /*gtk_object_set(GTK_OBJECT(opt.scanButton), "width", 72, NULL);*/ gtk_signal_connect(GTK_OBJECT(opt.scanButton), "toggled", GTK_SIGNAL_FUNC(scanButton_toggled_cb), NULL); gtk_box_pack_end(GTK_BOX(hbox), opt.scanButton, FALSE, FALSE, 0); @@ -394,7 +394,8 @@ opt.scanValue = (opt.uid == 0) ? SYN_SCAN : CONNECT_SCAN; gtk_option_menu_set_history(GTK_OPTION_MENU(opt.scanType), opt.scanValue - SCAN_OFFSET); - gtk_object_set(GTK_OBJECT(opt.scanType), "height", 26, NULL); + + /*gtk_object_set(GTK_OBJECT(opt.scanType), "height", 26, NULL);*/ gtk_table_attach_defaults(GTK_TABLE(table), opt.scanType, 0, 4, 0, 1); gtk_widget_show(opt.scanType); @@ -407,7 +408,7 @@ opt.scanRelay = gtk_entry_new(); gtk_entry_set_max_length(GTK_ENTRY(opt.scanRelay), 256); - gtk_object_set(GTK_OBJECT(opt.scanRelay), "width", 150, NULL); + /*gtk_object_set(GTK_OBJECT(opt.scanRelay), "width", 150, NULL);*/ gtk_signal_connect(GTK_OBJECT(opt.scanRelay), "changed", GTK_SIGNAL_FUNC(display_nmap_command_cb), NULL); if ((opt.scanValue != BOUNCE_SCAN) && (opt.scanValue != IDLE_SCAN)) @@ -433,7 +434,7 @@ protportEntries, &opt.protportValue); gtk_option_menu_set_history(GTK_OPTION_MENU(opt.protportType), opt.protportValue - PROTPORT_OFFSET); - gtk_object_set(GTK_OBJECT(opt.protportType), "height", 26, NULL); + /* gtk_object_set(GTK_OBJECT(opt.protportType), "height", 26, NULL);*/ gtk_table_attach_defaults(GTK_TABLE(table), opt.protportType, 0, 2, 0, 1); gtk_widget_show(opt.protportType); @@ -446,7 +447,7 @@ opt.protportRange = gtk_entry_new(); gtk_entry_set_max_length(GTK_ENTRY(opt.protportRange), 256); - gtk_object_set(GTK_OBJECT(opt.protportRange), "width", 100, NULL); + /*gtk_object_set(GTK_OBJECT(opt.protportRange), "width", 100, NULL);*/ gtk_signal_connect(GTK_OBJECT(opt.protportRange), "changed", GTK_SIGNAL_FUNC(display_nmap_command_cb), NULL); if (opt.protportValue != GIVEN_PROTPORT) @@ -513,7 +514,7 @@ /* Discover/Ping page (second in notebook) */ nblabel = gtk_label_new("Discover"); - nbpage = gtk_table_new(4, 4, TRUE); + nbpage = gtk_table_new(4, 4, FALSE); // nbpage = gtk_vbox_new(FALSE, 5); gtk_container_set_border_width(GTK_CONTAINER(nbpage), 5); @@ -577,7 +578,7 @@ opt.tcpPingPorts = gtk_entry_new(); gtk_entry_set_max_length(GTK_ENTRY(opt.tcpPingPorts), 256); - gtk_object_set(GTK_OBJECT(opt.tcpPingPorts), "width", 100, NULL); + /*gtk_object_set(GTK_OBJECT(opt.tcpPingPorts), "width", 100, NULL);*/ gtk_signal_connect(GTK_OBJECT(opt.tcpPingPorts), "changed", GTK_SIGNAL_FUNC(display_nmap_command_cb), NULL); gtk_table_attach_defaults(GTK_TABLE(table), opt.tcpPingPorts, 3, 4, 0, 1); @@ -600,7 +601,7 @@ opt.synPingPorts = gtk_entry_new(); gtk_entry_set_max_length(GTK_ENTRY(opt.synPingPorts), 256); - gtk_object_set(GTK_OBJECT(opt.synPingPorts), "width", 100, NULL); + /*gtk_object_set(GTK_OBJECT(opt.synPingPorts), "width", 100, NULL);*/ gtk_signal_connect(GTK_OBJECT(opt.synPingPorts), "changed", GTK_SIGNAL_FUNC(display_nmap_command_cb), NULL); if ((opt.uid != 0) || (! GTK_TOGGLE_BUTTON(opt.synPing)->active)) @@ -625,7 +626,7 @@ opt.udpPingPorts = gtk_entry_new(); gtk_entry_set_max_length(GTK_ENTRY(opt.udpPingPorts), 256); - gtk_object_set(GTK_OBJECT(opt.udpPingPorts), "width", 100, NULL); + /*gtk_object_set(GTK_OBJECT(opt.udpPingPorts), "width", 100, NULL);*/ gtk_signal_connect(GTK_OBJECT(opt.udpPingPorts), "changed", GTK_SIGNAL_FUNC(display_nmap_command_cb), NULL); if ((opt.uid != 0) || (! GTK_TOGGLE_BUTTON(opt.udpPing)->active)) @@ -638,6 +639,7 @@ gtk_widget_show(nblabel); gtk_widget_show(nbpage); + gtk_notebook_append_page(GTK_NOTEBOOK(notebook), GTK_WIDGET(nbpage), GTK_WIDGET(nblabel)); @@ -660,7 +662,7 @@ throttleEntries, &opt.throttleValue); gtk_option_menu_set_history(GTK_OPTION_MENU(opt.throttleType), opt.throttleValue - THROTTLE_OFFSET); - gtk_object_set(GTK_OBJECT(opt.throttleType), "height", 24, NULL); + /*gtk_object_set(GTK_OBJECT(opt.throttleType), "height", 24, NULL);*/ gtk_table_attach_defaults(GTK_TABLE(table), opt.throttleType, 0, 2, 0, 1); gtk_widget_show(opt.throttleType); @@ -676,7 +678,7 @@ gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(opt.ipv4TtlValue), TRUE); gtk_signal_connect(GTK_OBJECT(opt.ipv4Ttl), "released", GTK_SIGNAL_FUNC(toggle_button_set_sensitive_cb), opt.ipv4TtlValue); - gtk_object_set(GTK_OBJECT(opt.ipv4TtlValue), "width", 55, NULL); + /* gtk_object_set(GTK_OBJECT(opt.ipv4TtlValue), "width", 55, NULL);*/ gtk_signal_connect(GTK_OBJECT(opt.ipv4TtlValue), "changed", GTK_SIGNAL_FUNC(display_nmap_command_cb), NULL); if ((opt.uid != 0) || (! GTK_TOGGLE_BUTTON(opt.ipv4Ttl)->active)) @@ -694,7 +696,7 @@ adjust = (GtkAdjustment *) gtk_adjustment_new(1.0, 1.0, 150.0, 1.0, 10.0, 10.0); opt.minParSocks = gtk_spin_button_new(adjust, 1.0, 0); gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(opt.minParSocks), TRUE); - gtk_object_set(GTK_OBJECT(opt.minParSocks), "width", 55, NULL); + /*gtk_object_set(GTK_OBJECT(opt.minParSocks), "width", 55, NULL);*/ gtk_signal_connect(GTK_OBJECT(opt.minPar), "released", GTK_SIGNAL_FUNC(toggle_button_set_sensitive_cb), opt.minParSocks); gtk_signal_connect(GTK_OBJECT(opt.minParSocks), "changed", @@ -714,7 +716,7 @@ adjust = (GtkAdjustment *) gtk_adjustment_new(1.0, 1.0, 1500.0, 1.0, 10.0, 10.0); opt.maxParSocks = gtk_spin_button_new(adjust, 1.0, 0); gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(opt.maxParSocks), TRUE); - gtk_object_set(GTK_OBJECT(opt.maxParSocks), "width", 55, NULL); + /*gtk_object_set(GTK_OBJECT(opt.maxParSocks), "width", 55, NULL);*/ gtk_signal_connect(GTK_OBJECT(opt.maxPar), "released", GTK_SIGNAL_FUNC(toggle_button_set_sensitive_cb), opt.maxParSocks); gtk_signal_connect(GTK_OBJECT(opt.maxParSocks), "changed", @@ -733,7 +735,7 @@ adjust = (GtkAdjustment *) gtk_adjustment_new(6000.0, 0.0, 9999999.0, 10.0, 100.0, 100.0); opt.startRttTime = gtk_spin_button_new(adjust, 10.0, 0); - gtk_object_set(GTK_OBJECT(opt.startRttTime), "width", 75, NULL); + /* gtk_object_set(GTK_OBJECT(opt.startRttTime), "width", 75, NULL);*/ gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(opt.startRttTime), TRUE); gtk_signal_connect(GTK_OBJECT(opt.startRtt), "released", GTK_SIGNAL_FUNC(toggle_button_set_sensitive_cb), opt.startRttTime); @@ -760,7 +762,7 @@ adjust = (GtkAdjustment *) gtk_adjustment_new(6000.0, 1.0, 9999999.0, 10.0, 100.0, 100.0); opt.minRttTime = gtk_spin_button_new(adjust, 10.0, 0); gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(opt.minRttTime), TRUE); - gtk_object_set(GTK_OBJECT(opt.minRttTime), "width", 75, NULL); + /*gtk_object_set(GTK_OBJECT(opt.minRttTime), "width", 75, NULL);*/ gtk_signal_connect(GTK_OBJECT(opt.minRtt), "released", GTK_SIGNAL_FUNC(toggle_button_set_sensitive_cb), opt.minRttTime); gtk_signal_connect(GTK_OBJECT(opt.minRttTime), "changed", @@ -786,7 +788,7 @@ adjust = (GtkAdjustment *) gtk_adjustment_new(6000.0, 6.0, 9999999.0, 10.0, 100.0, 100.0); opt.maxRttTime = gtk_spin_button_new(adjust, 10.0, 0); gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(opt.maxRttTime), TRUE); - gtk_object_set(GTK_OBJECT(opt.maxRttTime), "width", 75, NULL); + /*gtk_object_set(GTK_OBJECT(opt.maxRttTime), "width", 75, NULL);*/ gtk_signal_connect(GTK_OBJECT(opt.maxRtt), "released", GTK_SIGNAL_FUNC(toggle_button_set_sensitive_cb), opt.maxRttTime); gtk_signal_connect(GTK_OBJECT(opt.maxRttTime), "changed", @@ -812,7 +814,7 @@ adjust = (GtkAdjustment *) gtk_adjustment_new(6000.0, 201.0, 9999999.0, 10.0, 100.0, 100.0); opt.hostTimeoutTime = gtk_spin_button_new(adjust, 10.0, 0); gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(opt.hostTimeoutTime), TRUE); - gtk_object_set(GTK_OBJECT(opt.hostTimeoutTime), "width", 75, NULL); + /*gtk_object_set(GTK_OBJECT(opt.hostTimeoutTime), "width", 75, NULL);*/ gtk_signal_connect(GTK_OBJECT(opt.hostTimeout), "released", GTK_SIGNAL_FUNC(toggle_button_set_sensitive_cb), opt.hostTimeoutTime); gtk_signal_connect(GTK_OBJECT(opt.hostTimeoutTime), "changed", @@ -838,7 +840,7 @@ adjust = (GtkAdjustment *) gtk_adjustment_new(6000.0, 1.0, 9999999.0, 10.0, 100.0, 100.0); opt.scanDelayTime = gtk_spin_button_new(adjust, 10.0, 0); gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(opt.scanDelayTime), TRUE); - gtk_object_set(GTK_OBJECT(opt.scanDelayTime), "width", 75, NULL); + /*gtk_object_set(GTK_OBJECT(opt.scanDelayTime), "width", 75, NULL);*/ gtk_signal_connect(GTK_OBJECT(opt.scanDelay), "released", GTK_SIGNAL_FUNC(toggle_button_set_sensitive_cb), opt.scanDelayTime); gtk_signal_connect(GTK_OBJECT(opt.scanDelayTime), "changed", @@ -860,6 +862,7 @@ gtk_widget_show(nblabel); gtk_widget_show(nbpage); + gtk_notebook_append_page(GTK_NOTEBOOK(notebook), GTK_WIDGET(nbpage), GTK_WIDGET(nblabel)); @@ -886,7 +889,7 @@ opt.inputFilename = gtk_entry_new(); gtk_entry_set_max_length(GTK_ENTRY(opt.inputFilename), 256); - gtk_object_set(GTK_OBJECT(opt.inputFilename), "width", 110, NULL); + /* gtk_object_set(GTK_OBJECT(opt.inputFilename), "width", 110, NULL);*/ gtk_signal_connect(GTK_OBJECT(opt.inputFilename), "changed", GTK_SIGNAL_FUNC(display_nmap_command_cb), NULL); gtk_widget_set_sensitive(GTK_WIDGET(opt.inputFilename), @@ -923,7 +926,7 @@ opt.outputFilename = gtk_entry_new(); gtk_entry_set_max_length(GTK_ENTRY(opt.outputFilename), 256); - gtk_object_set(GTK_OBJECT(opt.outputFilename), "width", 110, NULL); + /*gtk_object_set(GTK_OBJECT(opt.outputFilename), "width", 110, NULL);*/ gtk_signal_connect(GTK_OBJECT(opt.outputFilename), "changed", GTK_SIGNAL_FUNC(display_nmap_command_cb), NULL); gtk_widget_set_sensitive(GTK_WIDGET(opt.outputFilename), @@ -949,7 +952,7 @@ outputFormatEntries, &opt.outputFormatValue); gtk_option_menu_set_history(GTK_OPTION_MENU(opt.outputFormatType), opt.outputFormatValue - OUTPUT_OFFSET); - gtk_object_set(GTK_OBJECT(opt.outputFormatType), "height", 24, NULL); + /* gtk_object_set(GTK_OBJECT(opt.outputFormatType), "height", 24, NULL);*/ gtk_widget_set_sensitive(GTK_WIDGET(opt.outputFormatType), GTK_TOGGLE_BUTTON(opt.useOutputFile)->active); gtk_table_attach_defaults(GTK_TABLE(table), opt.outputFormatType, 2, 4, 3, 4); @@ -968,6 +971,7 @@ gtk_widget_show(nblabel); gtk_widget_show(nbpage); + gtk_notebook_append_page(GTK_NOTEBOOK(notebook), GTK_WIDGET(nbpage), GTK_WIDGET(nblabel)); @@ -989,7 +993,7 @@ resolveEntries, &opt.resolveValue); gtk_option_menu_set_history(GTK_OPTION_MENU(opt.resolveType), opt.resolveValue - RESOLVE_OFFSET); - gtk_object_set(GTK_OBJECT(opt.resolveType), "height", 24, NULL); + /*gtk_object_set(GTK_OBJECT(opt.resolveType), "height", 24, NULL);*/ gtk_box_pack_start(GTK_BOX(vbox), opt.resolveType, TRUE, FALSE, 0); gtk_widget_show(opt.resolveType); @@ -1008,7 +1012,7 @@ verboseEntries, &opt.verboseValue); gtk_option_menu_set_history(GTK_OPTION_MENU(opt.verboseType), opt.verboseValue - VERBOSE_OFFSET); - gtk_object_set(GTK_OBJECT(opt.verboseType), "height", 24, NULL); + /* gtk_object_set(GTK_OBJECT(opt.verboseType), "height", 24, NULL);*/ gtk_box_pack_start(GTK_BOX(vbox), opt.verboseType, TRUE, FALSE, 0); gtk_widget_show(opt.verboseType); @@ -1034,7 +1038,7 @@ opt.SourceDevice = gtk_entry_new(); gtk_entry_set_max_length(GTK_ENTRY(opt.SourceDevice), 64); - gtk_object_set(GTK_OBJECT(opt.SourceDevice), "width", 110, NULL); + /*gtk_object_set(GTK_OBJECT(opt.SourceDevice), "width", 110, NULL);*/ gtk_signal_connect(GTK_OBJECT(opt.useSourceDevice), "toggled", GTK_SIGNAL_FUNC(toggle_button_set_sensitive_cb), opt.SourceDevice); gtk_signal_connect(GTK_OBJECT(opt.SourceDevice), "changed", @@ -1055,7 +1059,7 @@ opt.SourcePort = gtk_entry_new(); gtk_entry_set_max_length(GTK_ENTRY(opt.SourcePort), 64); - gtk_object_set(GTK_OBJECT(opt.SourcePort), "width", 110, NULL); + /*gtk_object_set(GTK_OBJECT(opt.SourcePort), "width", 110, NULL);*/ gtk_signal_connect(GTK_OBJECT(opt.useSourcePort), "toggled", GTK_SIGNAL_FUNC(toggle_button_set_sensitive_cb), opt.SourcePort); gtk_signal_connect(GTK_OBJECT(opt.SourcePort), "changed", @@ -1076,7 +1080,7 @@ opt.SourceIP = gtk_entry_new(); gtk_entry_set_max_length(GTK_ENTRY(opt.SourceIP), 64); - gtk_object_set(GTK_OBJECT(opt.SourceIP), "width", 110, NULL); + /*gtk_object_set(GTK_OBJECT(opt.SourceIP), "width", 110, NULL);*/ gtk_signal_connect(GTK_OBJECT(opt.useSourceIP), "toggled", GTK_SIGNAL_FUNC(toggle_button_set_sensitive_cb), opt.SourceIP); gtk_signal_connect(GTK_OBJECT(opt.SourceIP), "changed", @@ -1097,7 +1101,7 @@ opt.Decoy = gtk_entry_new(); gtk_entry_set_max_length(GTK_ENTRY(opt.Decoy), 256); - gtk_object_set(GTK_OBJECT(opt.Decoy), "width", 110, NULL); + /*gtk_object_set(GTK_OBJECT(opt.Decoy), "width", 110, NULL);*/ gtk_signal_connect(GTK_OBJECT(opt.useDecoy), "toggled", GTK_SIGNAL_FUNC(toggle_button_set_sensitive_cb), opt.Decoy); gtk_signal_connect(GTK_OBJECT(opt.Decoy), "changed", @@ -1151,29 +1155,32 @@ gtk_widget_show(nblabel); gtk_widget_show(nbpage); + gtk_notebook_append_page(GTK_NOTEBOOK(notebook), GTK_WIDGET(nbpage), GTK_WIDGET(nblabel)); - + gtk_box_pack_start(GTK_BOX(main_vbox), notebook, FALSE, TRUE, 5); gtk_widget_show(notebook); -/* output box (variable; below notebook) */ - hbox = gtk_hbox_new(FALSE, 0); - gtk_box_pack_start(GTK_BOX(main_vbox), hbox, TRUE, TRUE, 5); - -/* text widget with scroll bar */ - opt.output = gtk_text_new(NULL, NULL); - gtk_box_pack_start(GTK_BOX(hbox), opt.output, TRUE, TRUE, 0); - gtk_text_set_word_wrap(GTK_TEXT(opt.output), 1); - gtk_widget_set_usize(opt.output, 500, 248); - gtk_widget_show(opt.output); - gtk_widget_realize(opt.output); - - vscroll = gtk_vscrollbar_new(GTK_TEXT(opt.output)->vadj); - gtk_box_pack_end (GTK_BOX(hbox), vscroll, FALSE, FALSE, 0); - gtk_widget_show(vscroll); - - gtk_widget_show(hbox); + /* output box (variable; below notebook) */ + hbox = gtk_hbox_new(FALSE, 0); + gtk_box_pack_start(GTK_BOX(main_vbox), hbox, TRUE, TRUE, 5); + + /* text widget with scroll bar */ + { + GtkWidget *sw; + sw = gtk_scrolled_window_new(NULL, NULL); + gtk_box_pack_start(GTK_BOX(main_vbox), sw, TRUE, TRUE, 5); + + opt.output = gtk_text_new(NULL, NULL); + gtk_container_add(GTK_CONTAINER(sw),opt.output); + gtk_text_set_word_wrap(GTK_TEXT(opt.output), 1); + gtk_widget_set_usize(opt.output, 500, 248); + gtk_widget_show(opt.output); + gtk_widget_realize(opt.output); + + gtk_widget_show(sw); + } /* status hbox at bottom */ @@ -1208,19 +1215,24 @@ GtkWidget *notebook; GtkWidget *text; GtkWidget *label; -GtkWidget *hbox; -GtkWidget *button; - aboutDialog = gtk_window_new(GTK_WINDOW_TOPLEVEL); + aboutDialog = gtk_dialog_new_with_buttons("About NmapFE & Nmap", + NULL, + GTK_DIALOG_MODAL, + GTK_STOCK_OK, + GTK_RESPONSE_NONE, + NULL); + + + g_signal_connect_swapped (aboutDialog, + "response", + G_CALLBACK (gtk_widget_destroy), + aboutDialog); + gtk_widget_set_usize(aboutDialog, 200, 200); - gtk_window_set_title(GTK_WINDOW(aboutDialog), "About NmapFE & Nmap"); - gtk_window_set_policy(GTK_WINDOW(aboutDialog), FALSE, FALSE, FALSE); gtk_window_position(GTK_WINDOW(aboutDialog), GTK_WIN_POS_CENTER); - vbox = gtk_vbox_new(FALSE, 0); - gtk_widget_show(vbox); - gtk_container_add(GTK_CONTAINER(aboutDialog), vbox); - gtk_container_set_border_width(GTK_CONTAINER(vbox), 5); + vbox = GTK_DIALOG(aboutDialog)->vbox; notebook = gtk_notebook_new(); gtk_box_pack_start(GTK_BOX(vbox), notebook, TRUE, TRUE, 0); @@ -1251,17 +1263,6 @@ gtk_widget_show(notebook); - hbox = gtk_hbox_new(FALSE, 0); - gtk_widget_show(hbox); - gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, TRUE, 5); - - button = gtk_button_new_with_label("OK"); - gtk_widget_show(button); - gtk_box_pack_start(GTK_BOX(hbox), button, TRUE, TRUE, 0); - gtk_signal_connect_object(GTK_OBJECT(button), "clicked", - GTK_SIGNAL_FUNC(gtk_widget_destroy), - (gpointer) aboutDialog); - return(aboutDialog); } @@ -1303,19 +1304,24 @@ GtkWidget *notebook; GtkWidget *text; GtkWidget *label; -GtkWidget *hbox; -GtkWidget *button; - helpDialog = gtk_window_new(GTK_WINDOW_DIALOG); + helpDialog = gtk_dialog_new_with_buttons("Help With NmapFE", + NULL, + GTK_DIALOG_MODAL, + GTK_STOCK_OK, + GTK_RESPONSE_NONE, + NULL); + + + g_signal_connect_swapped (helpDialog, + "response", + G_CALLBACK (gtk_widget_destroy), + helpDialog); + gtk_widget_set_usize(helpDialog, 400, 300); - gtk_window_set_title(GTK_WINDOW(helpDialog), "Help With NmapFE"); - gtk_window_set_policy(GTK_WINDOW(helpDialog), FALSE, FALSE, FALSE); gtk_window_position(GTK_WINDOW(helpDialog), GTK_WIN_POS_CENTER); - vbox = gtk_vbox_new(FALSE, 0); - gtk_widget_show(vbox); - gtk_container_set_border_width(GTK_CONTAINER(vbox), 5); - gtk_container_add(GTK_CONTAINER(helpDialog), vbox); + vbox = GTK_DIALOG(helpDialog)->vbox; notebook = gtk_notebook_new(); gtk_widget_show(notebook); @@ -1379,17 +1385,6 @@ gtk_widget_show(notebook); - hbox = gtk_hbox_new(FALSE, 0); - gtk_widget_show(hbox); - gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, TRUE, 5); - - button = gtk_button_new_with_label("OK"); - gtk_widget_show(button); - gtk_box_pack_start(GTK_BOX(hbox), button, TRUE, TRUE, 0); - gtk_signal_connect_object(GTK_OBJECT(button), "clicked", - GTK_SIGNAL_FUNC(gtk_widget_destroy), - (gpointer) helpDialog); - return(helpDialog); }