diff -durpN ghfaxviewer-0.21.1/ChangeLog ghfaxviewer-0.22.0/ChangeLog --- ghfaxviewer-0.21.1/ChangeLog Fri Apr 27 16:11:16 2001 +++ ghfaxviewer-0.22.0/ChangeLog Tue May 8 05:35:44 2001 @@ -1,3 +1,64 @@ +2001-05-08 Wolfgang Sourdeau + + * src/ps_print.c (get_printers): lpc and lpstat are not hard-coded + anymore. We use "ensure_commands" to test for and check the + printing system sanity. This is a bit cleaner that before. + + * src/zoom.c (ti_zoomed_fax_page): unzooming requires y_pix_size + too, if ever the fax resolution is low. The fact that we "zoom" is + because new_width > width, but height was not taken into account, + hence our problem displaying low-res images correctly. + (put_pixel_rot_none_unzoom): in the same case as above, we may + need to draw two pixels instead of one. + +2001-05-06 Wolfgang Sourdeau + + * src/callbcks.c (nextpage_cb): the actions callbacks don't check + if a file is opened anymore since their widget are enabled or + disabled as needed. + + * src/viewer.h (enum): ActionIndex is an enum to reference the + "command widgets" (print, rotate, go to next, ...). + + * src/viewer.c (viewer_set_cmd_widgets_sensitive): this functions + disables or enables the command widgets, when a file is opened or + closed + +2001-05-01 Wolfgang Sourdeau + + * src/viewer.c (viewer_window_cfg_event_cb): flush the event queue + before resizing the window, so that we are sure no other event + will resize it afterwards. Of course, we discard the callback from + the signal handler queue beforehand... + +2001-04-30 Wolfgang Sourdeau + + * src/gtkutils.c (dialog_window_get_gtkwin): new function to + return the GtkWindow of a DialogWindow; + (dialog_window_set_content): this function doesn't add a frame + around the dialog content anymore. + dialog_window_set_content_with_frame does this instead. + + * src/ps_print.c: converted all the dialogs to DialogWindow's. + Deleted all references to parent->parent->... (really dirty) and + used real widget reference instead. + +2001-04-29 Wolfgang Sourdeau + + * src/ps_print.c (no_overwrite_cb): non-event signal callbacks + should be void + + * src/gtkutils.c (dialog_window_set_button_box): handling of the ESC + key put here. If your dialog has no button, you probably don't + want to be able to close it (progress, temporary dialog...). + +2001-04-28 Wolfgang Sourdeau + + * src/viewer.c (viewer_window_cfg_event_cb): this function serves + as a callback to the "configure-event" signal rather than to + "show". This permit us to get rid of the random mis-resizing of + the window. Thanks to Havoc Pennington for his help on this. + 2001-04-27 Wolfgang Sourdeau * configure.in: reversed dependency from gnome-print 0.28 to 0.25. diff -durpN ghfaxviewer-0.21.1/Makefile.am ghfaxviewer-0.22.0/Makefile.am --- ghfaxviewer-0.21.1/Makefile.am Fri Apr 27 13:04:23 2001 +++ ghfaxviewer-0.22.0/Makefile.am Sun May 6 08:15:14 2001 @@ -2,6 +2,4 @@ PACKAGE = @PACKAGE@ VERSION = @VERSION@ SUBDIRS = docs intl po src debian macros -man_MANS = ghfaxviewer.1 - -EXTRA_DIST = README ghfaxviewer.spec Makefile.win32.in gfv_gtkrc $(man_MANS) +EXTRA_DIST = README ghfaxviewer.spec Makefile.win32.in gfv_gtkrc diff -durpN ghfaxviewer-0.21.1/Makefile.in ghfaxviewer-0.22.0/Makefile.in --- ghfaxviewer-0.21.1/Makefile.in Fri Apr 27 17:14:50 2001 +++ ghfaxviewer-0.22.0/Makefile.in Tue May 8 06:06:21 2001 @@ -81,6 +81,7 @@ GNOME_APPLETS_LIBS = @GNOME_APPLETS_LIBS GNOME_CAPPLET_LIBS = @GNOME_CAPPLET_LIBS@ GNOME_CONFIG = @GNOME_CONFIG@ GNOME_DOCKLETS_LIBS = @GNOME_DOCKLETS_LIBS@ +GNOME_GRAPH_APP_DIR = @GNOME_GRAPH_APP_DIR@ GNOME_INCLUDEDIR = @GNOME_INCLUDEDIR@ GNOME_LIBDIR = @GNOME_LIBDIR@ GNOME_LIBS = @GNOME_LIBS@ @@ -98,10 +99,9 @@ INTLOBJS = @INTLOBJS@ INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@ LIBICONV = @LIBICONV@ LIBTOOL = @LIBTOOL@ -LPC_COMMAND = @LPC_COMMAND@ -LPSTAT_COMMAND = @LPSTAT_COMMAND@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ +MANPAGES = @MANPAGES@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ @@ -109,6 +109,7 @@ ORBIT_CFLAGS = @ORBIT_CFLAGS@ ORBIT_CONFIG = @ORBIT_CONFIG@ ORBIT_IDL = @ORBIT_IDL@ ORBIT_LIBS = @ORBIT_LIBS@ +PIXMAPS_DIR = @PIXMAPS_DIR@ POFILES = @POFILES@ POSUB = @POSUB@ PTHREAD_LIB = @PTHREAD_LIB@ @@ -131,17 +132,11 @@ PACKAGE = @PACKAGE@ VERSION = @VERSION@ SUBDIRS = docs intl po src debian macros -man_MANS = ghfaxviewer.1 - -EXTRA_DIST = README ghfaxviewer.spec Makefile.win32.in gfv_gtkrc $(man_MANS) +EXTRA_DIST = README ghfaxviewer.spec Makefile.win32.in gfv_gtkrc ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = Makefile.win32 ghfaxviewer.spec -man1dir = $(mandir)/man1 -MANS = $(man_MANS) - -NROFF = nroff DIST_COMMON = README ./stamp-h.in ABOUT-NLS AUTHORS COPYING ChangeLog \ INSTALL Makefile.am Makefile.in Makefile.win32.in NEWS TODO acconfig.h \ aclocal.m4 config.guess config.h.in config.sub configure configure.in \ @@ -201,45 +196,6 @@ Makefile.win32: $(top_builddir)/config.s ghfaxviewer.spec: $(top_builddir)/config.status ghfaxviewer.spec.in cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status -install-man1: - $(mkinstalldirs) $(DESTDIR)$(man1dir) - @list='$(man1_MANS)'; \ - l2='$(man_MANS)'; for i in $$l2; do \ - case "$$i" in \ - *.1*) list="$$list $$i" ;; \ - esac; \ - done; \ - for i in $$list; do \ - if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ - else file=$$i; fi; \ - ext=`echo $$i | sed -e 's/^.*\\.//'`; \ - inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ - inst=`echo $$inst | sed '$(transform)'`.$$ext; \ - echo " $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst"; \ - $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst; \ - done - -uninstall-man1: - @list='$(man1_MANS)'; \ - l2='$(man_MANS)'; for i in $$l2; do \ - case "$$i" in \ - *.1*) list="$$list $$i" ;; \ - esac; \ - done; \ - for i in $$list; do \ - ext=`echo $$i | sed -e 's/^.*\\.//'`; \ - inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ - inst=`echo $$inst | sed '$(transform)'`.$$ext; \ - echo " rm -f $(DESTDIR)$(man1dir)/$$inst"; \ - rm -f $(DESTDIR)$(man1dir)/$$inst; \ - done -install-man: $(MANS) - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) install-man1 -uninstall-man: - @$(NORMAL_UNINSTALL) - $(MAKE) $(AM_MAKEFLAGS) uninstall-man1 - # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, @@ -401,21 +357,20 @@ all-recursive-am: config.h install-exec-am: install-exec: install-exec-recursive -install-data-am: install-man +install-data-am: install-data: install-data-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am install: install-recursive -uninstall-am: uninstall-man +uninstall-am: uninstall: uninstall-recursive -all-am: Makefile $(MANS) config.h +all-am: Makefile config.h all-redirect: all-recursive-am install-strip: $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install installdirs: installdirs-recursive installdirs-am: - $(mkinstalldirs) $(DESTDIR)$(mandir)/man1 mostlyclean-generic: @@ -449,7 +404,6 @@ maintainer-clean: maintainer-clean-recur -rm -f config.status .PHONY: mostlyclean-hdr distclean-hdr clean-hdr maintainer-clean-hdr \ -install-man1 uninstall-man1 install-man uninstall-man \ install-data-recursive uninstall-data-recursive install-exec-recursive \ uninstall-exec-recursive installdirs-recursive uninstalldirs-recursive \ all-recursive check-recursive installcheck-recursive info-recursive \ diff -durpN ghfaxviewer-0.21.1/Makefile.win32.in ghfaxviewer-0.22.0/Makefile.win32.in --- ghfaxviewer-0.21.1/Makefile.win32.in Fri Apr 27 04:28:24 2001 +++ ghfaxviewer-0.22.0/Makefile.win32.in Sun May 6 08:55:19 2001 @@ -6,7 +6,7 @@ default: @echo "to automate the Win32 distribution packaging." DIST_ARCHIVE = @PACKAGE@-@VERSION@-win32.bin.tar.gz -DIST_DOCFILES = NEWS ChangeLog COPYING docs/README docs/README.cvs HACKING AUTHORS +DIST_DOCFILES = TODO NEWS ChangeLog COPYING docs/README docs/README.cvs HACKING AUTHORS ICONS = printer.xpm left90.xpm right90.xpm reverse.xpm \ right_arrow.xpm left_arrow.xpm \ zoom_in.xpm zoom_out.xpm info.xpm \ @@ -67,14 +67,15 @@ remaining-installation: done cp gfv_gtkrc $(DIST_DIR) cp src/@PACKAGE@.exe $(DIST_DIR) - $(STRIP) $(DIST_DIR)/@PACKAGE@.exe + $(STRIP) --remove-section=.comment --remove-section=.note $(DIST_DIR)/@PACKAGE@.exe $(DIST_ARCHIVE): src/@PACKAGE@.exe dir-skeleton conversions remaining-installation +win32-bin-dist: win32-bin-package win32-bin-package: $(DIST_ARCHIVE) ( cd tmp ; \ tar czf $(DIST_ARCHIVE) @PACKAGE@ ; \ mv -f $(DIST_ARCHIVE) .. ) @echo done. -.PHONY: win32-bin-package +.PHONY: win32-bin-package win32-bin-dist diff -durpN ghfaxviewer-0.21.1/NEWS ghfaxviewer-0.22.0/NEWS --- ghfaxviewer-0.21.1/NEWS Wed Apr 11 10:48:08 2001 +++ ghfaxviewer-0.22.0/NEWS Tue May 8 06:04:45 2001 @@ -2,6 +2,17 @@ This file lists user-visible changes. It although an effort is made to keep it so. For even more programming-related informations, see the file 'ChangeLog'. +05/08/2001: +- menu and toolbar widgets are enabled or disabled as needed; +- all the dialog windows are escapable; +- the dialog windows are managed through one consistent api; +- fixes for compilation on FreeBSD; +- the viewer doesn't get randomly resized after being mapped anymore; +- the path to lpc and to lpstat are not hard-coded any longer; +- different versions of lpc are now tolerated; +- a bug which caused low-res faxes to be displayed incorrectly has + been fixed. + 04/07/2001: - zooming functions have been splitted for better optimization; @@ -13,8 +24,10 @@ programming-related informations, see th - the Windows icon is built automatically from the .xpm equivalent; - the GNOME version is using GNOME native icons; - the GNOME version is using gnome-print; -- the GNOME and Win32 versions are able to recover its last window position and size; -- the GNOME and Win32 versions are able to remember the last directory from where a file was open; +- the GNOME and Win32 versions are able to recover its last window + position and size; +- the GNOME and Win32 versions are able to remember the last directory + from where a file was open; - the UNIX printing version is putting the default printer at the top of the list; - the UNIX printing version is supposed to work with the "standard" BSD LPR system; diff -durpN ghfaxviewer-0.21.1/TODO ghfaxviewer-0.22.0/TODO --- ghfaxviewer-0.21.1/TODO Wed Apr 11 10:48:09 2001 +++ ghfaxviewer-0.22.0/TODO Sun May 6 09:09:09 2001 @@ -1,18 +1,28 @@ -Before version 1.0 (03/29/2001): +Before version 1.0 (2001/05/06): -DONE - implement Win32 printing; -D - implement usage of gnome-print; -D (PARTIALLY) - "gnomification"; -DONE - printing to an existing file needs to be reported; +- add support for plain G3 format and Winfax format; (->independent image library) - add better handling of paper size in both Win32 and UNIX versions; - add paper selection for common types of paper format, the viewer currently assumes that the output format is the same as the input file; -DONE - add checks for tiff files: +- fix problems and conflicts due to different BSD lpr versions and + behaviours (what a standard) +- integration with libghfl (the GNU HaliFAX Library for transport); +- LPSTAT_COMMAND and LPC_COMMAND are dirty static macros that should be + replaced with dynamic functions to handle the printing system. + +CONTINUOUS - checking for memleaks and bugs; + +D - implement Win32 printing; +D - implement usage of gnome-print; +D - "gnomification"; +D - printing to an existing file needs to be reported; +D - add checks for tiff files: D - check for file magic; D - check for coherence between images infos and actual image data; -DONE - add error dialogs; -DONE (partially) - add progress dialogs; -- integration with libghfl (the GNU HaliFAX Library); -CONTINUOUS - checking for memleaks and bugs; -- add support for plain G3 format and Winfax format; \ No newline at end of file +D - add error dialogs; +D - add progress dialogs; +D - make dialogs rely on the DialogWindow pseudo-widget (gtkutils.c) +D - all the relevant buttons and menus should be enabled/disabled when + it is visually logical to do so (file opened/closed) + diff -durpN ghfaxviewer-0.21.1/acconfig.h ghfaxviewer-0.22.0/acconfig.h --- ghfaxviewer-0.21.1/acconfig.h Wed Apr 11 10:48:09 2001 +++ ghfaxviewer-0.22.0/acconfig.h Tue May 8 05:36:39 2001 @@ -4,6 +4,3 @@ #undef HAVE_LC_MESSAGES #undef HAVE_STPCPY #undef HAVE_LIBSM - -#undef LPC_COMMAND -#undef LPSTAT_COMMAND diff -durpN ghfaxviewer-0.21.1/config.h.in ghfaxviewer-0.22.0/config.h.in --- ghfaxviewer-0.21.1/config.h.in Fri Apr 13 12:49:19 2001 +++ ghfaxviewer-0.22.0/config.h.in Tue May 8 06:06:20 2001 @@ -47,9 +47,6 @@ #undef HAVE_STPCPY #undef HAVE_LIBSM -#undef LPC_COMMAND -#undef LPSTAT_COMMAND - /* Define if you have the __argz_count function. */ #undef HAVE___ARGZ_COUNT diff -durpN ghfaxviewer-0.21.1/configure ghfaxviewer-0.22.0/configure --- ghfaxviewer-0.21.1/configure Fri Apr 27 13:53:24 2001 +++ ghfaxviewer-0.22.0/configure Tue May 8 05:56:29 2001 @@ -757,7 +757,7 @@ fi PACKAGE=ghfaxviewer -VERSION=0.21.1 +VERSION=0.22.0 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; } @@ -1294,13 +1294,12 @@ ALL_LINGUAS="de fr pl zh_TW.Big5" CFLAGS="" -GCONF_CFLAGS="" -GCONF_LIBS="" +MANPAGES=ghfaxviewer.1 # Extract the first word of ""libtool"", so it can be a program name with args. set dummy "libtool"; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1304: checking for $ac_word" >&5 +echo "configure:1303: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_LIBTOOL'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1333,6 +1332,17 @@ else fi +# FreeBSD hacks +if test "`uname`" = "FreeBSD"; then + echo "configure: warning: Compiling for FreeBSD" 1>&2 + if test -x /usr/X11R6/bin/gtk12-config; then + GTK_CONFIG=/usr/X11R6/bin/gtk12-config + fi + if test -x /usr/local/bin/glib12-config; then + GLIB_CONFIG=/usr/local/bin/glib12-config + fi +fi + if test "$CYGWIN" = yes || test "$MINGW32" = yes; then # under Windows OS=WIN32 @@ -1340,7 +1350,7 @@ echo "configure: warning: It seems we ar window_system=yes; echo $ac_n "checking how we adapt to gcc""... $ac_c" 1>&6 -echo "configure:1344: checking how we adapt to gcc" >&5 +echo "configure:1354: checking how we adapt to gcc" >&5 GCC_VERSION="`gcc --version`" if test $? != 0; then { echo "configure: error: Your gcc executable couldn't be found." 1>&2; exit 1; } @@ -1356,7 +1366,7 @@ else fi echo $ac_n "checking which version of the GCC port you are using""... $ac_c" 1>&6 -echo "configure:1360: checking which version of the GCC port you are using" >&5 +echo "configure:1370: checking which version of the GCC port you are using" >&5 if test "$CYGWIN" = yes; then echo "$ac_t""using cygwin, CFLAGS+=-mno-cygwin" 1>&6 CFLAGS="$CFLAGS -mno-cygwin -I$includedir/w32api" @@ -1373,7 +1383,7 @@ else { echo "configure: error: can not r fi echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:1377: checking host system type" >&5 +echo "configure:1387: checking host system type" >&5 host_alias=$host case "$host_alias" in @@ -1394,7 +1404,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)- echo "$ac_t""$host" 1>&6 echo $ac_n "checking build system type""... $ac_c" 1>&6 -echo "configure:1398: checking build system type" >&5 +echo "configure:1408: checking build system type" >&5 build_alias=$build case "$build_alias" in @@ -1420,7 +1430,7 @@ fi # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args. set dummy ${ac_tool_prefix}windres; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1424: checking for $ac_word" >&5 +echo "configure:1434: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1452,7 +1462,7 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "windres", so it can be a program name with args. set dummy windres; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1456: checking for $ac_word" >&5 +echo "configure:1466: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1497,12 +1507,10 @@ USE_NLS="yes" CATALOGS="`for cats in $ALL_LINGUAS; do echo -n "$cats.gmo "; done`" GMSGFMT="msgfmt" -XPM2WICO="" - # Extract the first word of ""xgettext"", so it can be a program name with args. set dummy "xgettext"; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1506: checking for $ac_word" >&5 +echo "configure:1514: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1537,7 +1545,7 @@ fi # Extract the first word of ""gettext"", so it can be a program name with args. set dummy "gettext"; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1541: checking for $ac_word" >&5 +echo "configure:1549: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GETTEXT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1572,7 +1580,7 @@ fi # Extract the first word of ""msgfmt"", so it can be a program name with args. set dummy "msgfmt"; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1576: checking for $ac_word" >&5 +echo "configure:1584: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1607,7 +1615,7 @@ fi # Extract the first word of ""gencat"", so it can be a program name with args. set dummy "gencat"; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1611: checking for $ac_word" >&5 +echo "configure:1619: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GENCAT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1642,7 +1650,7 @@ fi # Extract the first word of ""msgmerge"", so it can be a program name with args. set dummy "msgmerge"; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1646: checking for $ac_word" >&5 +echo "configure:1654: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_MSGMERGE'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1677,7 +1685,7 @@ fi # Extract the first word of ""xpm2wico"", so it can be a program name with args. set dummy "xpm2wico"; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1681: checking for $ac_word" >&5 +echo "configure:1689: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_XPM2WICO'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1729,6 +1737,7 @@ fi + cat >> confdefs.h <<\EOF #define ENABLE_NLS 1 EOF @@ -1757,7 +1766,7 @@ OS=GNU WIN32_LIBS= echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1761: checking how to run the C preprocessor" >&5 +echo "configure:1770: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -1772,13 +1781,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1782: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1791: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -1789,13 +1798,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1799: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1808: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -1806,13 +1815,13 @@ else rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1816: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1825: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -1839,7 +1848,7 @@ echo "$ac_t""$CPP" 1>&6 # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1843: checking for $ac_word" >&5 +echo "configure:1852: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1867,12 +1876,12 @@ else fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:1871: checking for ANSI C header files" >&5 +echo "configure:1880: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -1880,7 +1889,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1884: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1893: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -1897,7 +1906,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -1915,7 +1924,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -1936,7 +1945,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -1947,7 +1956,7 @@ if (XOR (islower (i), ISLOWER (i)) || to exit (0); } EOF -if { (eval echo configure:1951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1960: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -1971,12 +1980,12 @@ EOF fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:1975: checking for working const" >&5 +echo "configure:1984: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2038: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -2046,21 +2055,21 @@ EOF fi echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:2050: checking for inline" >&5 +echo "configure:2059: checking for inline" >&5 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2073: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -2086,12 +2095,12 @@ EOF esac echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:2090: checking for off_t" >&5 +echo "configure:2099: checking for off_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -2119,12 +2128,12 @@ EOF fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:2123: checking for size_t" >&5 +echo "configure:2132: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -2154,19 +2163,19 @@ fi # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 -echo "configure:2158: checking for working alloca.h" >&5 +echo "configure:2167: checking for working alloca.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { char *p = alloca(2 * sizeof(int)); ; return 0; } EOF -if { (eval echo configure:2170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_header_alloca_h=yes else @@ -2187,12 +2196,12 @@ EOF fi echo $ac_n "checking for alloca""... $ac_c" 1>&6 -echo "configure:2191: checking for alloca" >&5 +echo "configure:2200: checking for alloca" >&5 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2233: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_alloca_works=yes else @@ -2252,12 +2261,12 @@ EOF echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 -echo "configure:2256: checking whether alloca needs Cray hooks" >&5 +echo "configure:2265: checking whether alloca needs Cray hooks" >&5 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 if test $ac_cv_os_cray = yes; then for ac_func in _getb67 GETB67 getb67; do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2286: checking for $ac_func" >&5 +echo "configure:2295: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2323: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2337,7 +2346,7 @@ done fi echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 -echo "configure:2341: checking stack direction for C alloca" >&5 +echo "configure:2350: checking stack direction for C alloca" >&5 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2345,7 +2354,7 @@ else ac_cv_c_stack_direction=0 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2377: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_stack_direction=1 else @@ -2389,17 +2398,17 @@ for ac_hdr in unistd.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2393: checking for $ac_hdr" >&5 +echo "configure:2402: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2403: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2412: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2428,12 +2437,12 @@ done for ac_func in getpagesize do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2432: checking for $ac_func" >&5 +echo "configure:2441: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2469: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2481,7 +2490,7 @@ fi done echo $ac_n "checking for working mmap""... $ac_c" 1>&6 -echo "configure:2485: checking for working mmap" >&5 +echo "configure:2494: checking for working mmap" >&5 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2489,7 +2498,7 @@ else ac_cv_func_mmap_fixed_mapped=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_mmap_fixed_mapped=yes else @@ -2657,17 +2666,17 @@ stdlib.h string.h unistd.h sys/param.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2661: checking for $ac_hdr" >&5 +echo "configure:2670: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2671: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2680: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2698,12 +2707,12 @@ setenv setlocale stpcpy strchr strcasecm __argz_count __argz_stringify __argz_next do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2702: checking for $ac_func" >&5 +echo "configure:2711: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2739: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2753,7 +2762,7 @@ done echo $ac_n "checking for iconv""... $ac_c" 1>&6 -echo "configure:2757: checking for iconv" >&5 +echo "configure:2766: checking for iconv" >&5 if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2761,7 +2770,7 @@ else am_cv_func_iconv="no, consider installing GNU libiconv" am_cv_lib_iconv=no cat > conftest.$ac_ext < #include @@ -2771,7 +2780,7 @@ iconv_t cd = iconv_open("",""); iconv_close(cd); ; return 0; } EOF -if { (eval echo configure:2775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* am_cv_func_iconv=yes else @@ -2783,7 +2792,7 @@ rm -f conftest* am_save_LIBS="$LIBS" LIBS="$LIBS -liconv" cat > conftest.$ac_ext < #include @@ -2793,7 +2802,7 @@ iconv_t cd = iconv_open("",""); iconv_close(cd); ; return 0; } EOF -if { (eval echo configure:2797: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* am_cv_lib_iconv=yes am_cv_func_iconv=yes @@ -2814,13 +2823,13 @@ echo "$ac_t""$am_cv_func_iconv" 1>&6 EOF echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6 -echo "configure:2818: checking for iconv declaration" >&5 +echo "configure:2827: checking for iconv declaration" >&5 if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -2839,7 +2848,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:2843: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2852: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* am_cv_proto_iconv_arg1="" else @@ -2868,19 +2877,19 @@ EOF echo $ac_n "checking for nl_langinfo and CODESET""... $ac_c" 1>&6 -echo "configure:2872: checking for nl_langinfo and CODESET" >&5 +echo "configure:2881: checking for nl_langinfo and CODESET" >&5 if eval "test \"`echo '$''{'am_cv_langinfo_codeset'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { char* cs = nl_langinfo(CODESET); ; return 0; } EOF -if { (eval echo configure:2884: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* am_cv_langinfo_codeset=yes else @@ -2903,19 +2912,19 @@ EOF if test $ac_cv_header_locale_h = yes; then echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6 -echo "configure:2907: checking for LC_MESSAGES" >&5 +echo "configure:2916: checking for LC_MESSAGES" >&5 if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { return LC_MESSAGES ; return 0; } EOF -if { (eval echo configure:2919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* am_cv_val_LC_MESSAGES=yes else @@ -2936,7 +2945,7 @@ EOF fi fi echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6 -echo "configure:2940: checking whether NLS is requested" >&5 +echo "configure:2949: checking whether NLS is requested" >&5 # Check whether --enable-nls or --disable-nls was given. if test "${enable_nls+set}" = set; then enableval="$enable_nls" @@ -2957,7 +2966,7 @@ fi EOF echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6 -echo "configure:2961: checking whether included gettext is requested" >&5 +echo "configure:2970: checking whether included gettext is requested" >&5 # Check whether --with-included-gettext or --without-included-gettext was given. if test "${with_included_gettext+set}" = set; then withval="$with_included_gettext" @@ -2977,17 +2986,17 @@ fi ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for libintl.h""... $ac_c" 1>&6 -echo "configure:2981: checking for libintl.h" >&5 +echo "configure:2990: checking for libintl.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2991: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3000: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3004,12 +3013,12 @@ fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 echo $ac_n "checking for GNU gettext in libc""... $ac_c" 1>&6 -echo "configure:3008: checking for GNU gettext in libc" >&5 +echo "configure:3017: checking for GNU gettext in libc" >&5 if eval "test \"`echo '$''{'gt_cv_func_gnugettext1_libc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < extern int _nl_msg_cat_cntr; @@ -3018,7 +3027,7 @@ bindtextdomain ("", ""); return (int) gettext ("") + _nl_msg_cat_cntr ; return 0; } EOF -if { (eval echo configure:3022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3031: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gt_cv_func_gnugettext1_libc=yes else @@ -3034,14 +3043,14 @@ echo "$ac_t""$gt_cv_func_gnugettext1_lib if test "$gt_cv_func_gnugettext1_libc" != "yes"; then echo $ac_n "checking for GNU gettext in libintl""... $ac_c" 1>&6 -echo "configure:3038: checking for GNU gettext in libintl" >&5 +echo "configure:3047: checking for GNU gettext in libintl" >&5 if eval "test \"`echo '$''{'gt_cv_func_gnugettext1_libintl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else gt_save_LIBS="$LIBS" LIBS="$LIBS -lintl" cat > conftest.$ac_ext < extern int _nl_msg_cat_cntr; @@ -3050,7 +3059,7 @@ bindtextdomain ("", ""); return (int) gettext ("") + _nl_msg_cat_cntr ; return 0; } EOF -if { (eval echo configure:3054: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3063: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gt_cv_func_gnugettext1_libintl=yes else @@ -3075,12 +3084,12 @@ EOF for ac_func in dcgettext do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3079: checking for $ac_func" >&5 +echo "configure:3088: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3116: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3130,7 +3139,7 @@ done # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3134: checking for $ac_word" >&5 +echo "configure:3143: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3164,7 +3173,7 @@ fi # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3168: checking for $ac_word" >&5 +echo "configure:3177: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3201,7 +3210,7 @@ fi # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3205: checking for $ac_word" >&5 +echo "configure:3214: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3253,7 +3262,7 @@ fi # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3257: checking for $ac_word" >&5 +echo "configure:3266: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3287,7 +3296,7 @@ fi # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3291: checking for $ac_word" >&5 +echo "configure:3300: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3323,7 +3332,7 @@ fi # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3327: checking for $ac_word" >&5 +echo "configure:3336: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3389,7 +3398,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3393: checking for $ac_word" >&5 +echo "configure:3402: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_INTLBISON'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3422,7 +3431,7 @@ done ac_verc_fail=yes else echo $ac_n "checking version of bison""... $ac_c" 1>&6 -echo "configure:3426: checking version of bison" >&5 +echo "configure:3435: checking version of bison" >&5 ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison .* \([0-9]*\.[0-9.]*\).*$/\1/p'` case $ac_prog_version in '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; @@ -3463,7 +3472,7 @@ echo "configure:3426: checking version o LINGUAS= else echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6 -echo "configure:3467: checking for catalogs to be installed" >&5 +echo "configure:3476: checking for catalogs to be installed" >&5 NEW_LINGUAS= for presentlang in $ALL_LINGUAS; do useit=no @@ -3524,7 +3533,7 @@ echo "configure:3467: checking for catal # Uses ac_ vars as temps to allow command line to override cache and checks. # --without-x overrides everything else, but does not touch the cache. echo $ac_n "checking for X""... $ac_c" 1>&6 -echo "configure:3528: checking for X" >&5 +echo "configure:3537: checking for X" >&5 # Check whether --with-x or --without-x was given. if test "${with_x+set}" = set; then @@ -3586,12 +3595,12 @@ if test "$ac_x_includes" = NO; then # First, try using that file with no special directory specified. cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3595: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3604: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3660,14 +3669,14 @@ if test "$ac_x_libraries" = NO; then ac_save_LIBS="$LIBS" LIBS="-l$x_direct_test_library $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* LIBS="$ac_save_LIBS" # We can link X programs with no special library path. @@ -3810,7 +3819,7 @@ fi # Extract the first word of "gnome-config", so it can be a program name with args. set dummy gnome-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3814: checking for $ac_word" >&5 +echo "configure:3823: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GNOME_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3847,7 +3856,7 @@ fi no_gnome_config="yes" else echo $ac_n "checking if $GNOME_CONFIG works""... $ac_c" 1>&6 -echo "configure:3851: checking if $GNOME_CONFIG works" >&5 +echo "configure:3860: checking if $GNOME_CONFIG works" >&5 if $GNOME_CONFIG --libs-only-l gnome >/dev/null 2>&1; then echo "$ac_t""yes" 1>&6 @@ -3855,7 +3864,7 @@ echo "configure:3851: checking if $GNOME # Extract the first word of "orbit-config", so it can be a program name with args. set dummy orbit-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3859: checking for $ac_word" >&5 +echo "configure:3868: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_ORBIT_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3891,7 +3900,7 @@ fi # Extract the first word of "orbit-idl", so it can be a program name with args. set dummy orbit-idl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3895: checking for $ac_word" >&5 +echo "configure:3904: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_ORBIT_IDL'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3925,7 +3934,7 @@ else fi echo $ac_n "checking for working ORBit environment""... $ac_c" 1>&6 -echo "configure:3929: checking for working ORBit environment" >&5 +echo "configure:3938: checking for working ORBit environment" >&5 if eval "test \"`echo '$''{'gnome_cv_orbit_found'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3961,7 +3970,7 @@ fi fi echo $ac_n "checking for gnorba libraries""... $ac_c" 1>&6 -echo "configure:3965: checking for gnorba libraries" >&5 +echo "configure:3974: checking for gnorba libraries" >&5 if eval "test \"`echo '$''{'gnome_cv_gnorba_found'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4025,7 +4034,7 @@ fi if test "$no_gnome_config" = "yes"; then echo $ac_n "checking for gnomeConf.sh file in $gnome_prefix""... $ac_c" 1>&6 -echo "configure:4029: checking for gnomeConf.sh file in $gnome_prefix" >&5 +echo "configure:4038: checking for gnomeConf.sh file in $gnome_prefix" >&5 if test -f $gnome_prefix/gnomeConf.sh; then echo "$ac_t""found" 1>&6 echo "loading gnome configuration from" \ @@ -4045,7 +4054,7 @@ echo "configure:4029: checking for gnome n="" for i in $n; do echo $ac_n "checking extra library \"$i\"""... $ac_c" 1>&6 -echo "configure:4049: checking extra library \"$i\"" >&5 +echo "configure:4058: checking extra library \"$i\"" >&5 case $i in applets) @@ -4077,7 +4086,7 @@ fi echo $ac_n "checking what warning flags to pass to the C compiler""... $ac_c" 1>&6 -echo "configure:4081: checking what warning flags to pass to the C compiler" >&5 +echo "configure:4090: checking what warning flags to pass to the C compiler" >&5 warnCFLAGS= if test "x$GCC" != xyes; then enable_compile_warnings=no @@ -4109,7 +4118,7 @@ fi echo $ac_n "checking what language compliance flags to pass to the C compiler""... $ac_c" 1>&6 -echo "configure:4113: checking what language compliance flags to pass to the C compiler" >&5 +echo "configure:4122: checking what language compliance flags to pass to the C compiler" >&5 complCFLAGS= if test "x$enable_iso_c" != "xno"; then if test "x$GCC" = "xyes"; then @@ -4134,7 +4143,7 @@ echo "configure:4113: checking what lang PTHREAD_LIB="" echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6 -echo "configure:4138: checking for pthread_create in -lpthread" >&5 +echo "configure:4147: checking for pthread_create in -lpthread" >&5 ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4142,7 +4151,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lpthread $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4166: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4172,7 +4181,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_l else echo "$ac_t""no" 1>&6 echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6 -echo "configure:4176: checking for pthread_create in -lpthreads" >&5 +echo "configure:4185: checking for pthread_create in -lpthreads" >&5 ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4180,7 +4189,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lpthreads $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4210,7 +4219,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_l else echo "$ac_t""no" 1>&6 echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6 -echo "configure:4214: checking for pthread_create in -lc_r" >&5 +echo "configure:4223: checking for pthread_create in -lc_r" >&5 ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4218,7 +4227,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lc_r $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4242: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4248,12 +4257,12 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_l else echo "$ac_t""no" 1>&6 echo $ac_n "checking for pthread_create""... $ac_c" 1>&6 -echo "configure:4252: checking for pthread_create" >&5 +echo "configure:4261: checking for pthread_create" >&5 if eval "test \"`echo '$''{'ac_cv_func_pthread_create'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4289: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_pthread_create=yes" else @@ -4358,7 +4367,7 @@ fi # Extract the first word of "gtk-config", so it can be a program name with args. set dummy gtk-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4362: checking for $ac_word" >&5 +echo "configure:4371: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GTK_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4393,7 +4402,7 @@ fi min_gtk_version=1.2.0 echo $ac_n "checking for GTK - version >= $min_gtk_version""... $ac_c" 1>&6 -echo "configure:4397: checking for GTK - version >= $min_gtk_version" >&5 +echo "configure:4406: checking for GTK - version >= $min_gtk_version" >&5 no_gtk="" if test "$GTK_CONFIG" = "no" ; then no_gtk=yes @@ -4416,7 +4425,7 @@ echo "configure:4397: checking for GTK - echo $ac_n "cross compiling; assumed OK... $ac_c" else cat > conftest.$ac_ext < @@ -4494,7 +4503,7 @@ main () } EOF -if { (eval echo configure:4498: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -4528,7 +4537,7 @@ fi CFLAGS="$CFLAGS $GTK_CFLAGS" LIBS="$LIBS $GTK_LIBS" cat > conftest.$ac_ext < @@ -4538,7 +4547,7 @@ int main() { return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ; return 0; } EOF -if { (eval echo configure:4542: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4551: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* 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" @@ -4597,7 +4606,7 @@ rm -f conftest* ;; *) echo $ac_n "checking for SmcSaveYourselfDone in -lSM""... $ac_c" 1>&6 -echo "configure:4601: checking for SmcSaveYourselfDone in -lSM" >&5 +echo "configure:4610: checking for SmcSaveYourselfDone in -lSM" >&5 ac_lib_var=`echo SM'_'SmcSaveYourselfDone | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4605,7 +4614,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lSM $x_libs -lICE $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4629: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4645,17 +4654,17 @@ fi do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4649: checking for $ac_hdr" >&5 +echo "configure:4658: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4659: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4668: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -4693,7 +4702,7 @@ EOF XPM_LIBS="" echo $ac_n "checking for XpmFreeXpmImage in -lXpm""... $ac_c" 1>&6 -echo "configure:4697: checking for XpmFreeXpmImage in -lXpm" >&5 +echo "configure:4706: checking for XpmFreeXpmImage in -lXpm" >&5 ac_lib_var=`echo Xpm'_'XpmFreeXpmImage | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4701,7 +4710,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lXpm $x_libs $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4725: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4742,12 +4751,16 @@ fi if test "x$want_gnome" = "xyes"; then echo $ac_n "checking for gnome-libs >= 1.0.55""... $ac_c" 1>&6 -echo "configure:4746: checking for gnome-libs >= 1.0.55" >&5 +echo "configure:4755: checking for gnome-libs >= 1.0.55" >&5 if gnome-config --version > /dev/null 2>&1; then echo "$ac_t""found" 1>&6 + + USING_GNOME="yes" CFLAGS="$CFLAGS `gnome-config --cflags gnomeui`" LDFLAGS="$LDFLAGS `gnome-config --libs gnomeui`" - USING_GNOME="yes" + PIXMAPS_DIR="`gnome-config --datadir`/pixmaps/ghfaxviewer" + GNOME_GRAPH_APP_DIR="`gnome-config --datadir`/gnome/apps/Graphics" + # Check whether --with-gnome-print-prefix or --without-gnome-print-prefix was given. if test "${with_gnome_print_prefix+set}" = set; then withval="$with_gnome_print_prefix" @@ -4789,7 +4802,7 @@ fi # Extract the first word of "gnome-config", so it can be a program name with args. set dummy gnome-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4793: checking for $ac_word" >&5 +echo "configure:4806: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GNOME_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4824,7 +4837,7 @@ fi min_gnome_print_version=0.25.0 echo $ac_n "checking for GNOME-PRINT - version >= $min_gnome_print_version""... $ac_c" 1>&6 -echo "configure:4828: checking for GNOME-PRINT - version >= $min_gnome_print_version" >&5 +echo "configure:4841: checking for GNOME-PRINT - version >= $min_gnome_print_version" >&5 no_gnome_print="" if test "$GNOME_CONFIG" = "no" ; then no_gnome_print=yes @@ -4848,7 +4861,7 @@ echo "configure:4828: checking for GNOME echo $ac_n "cross compiling; assumed OK... $ac_c" else cat > conftest.$ac_ext < @@ -4908,7 +4921,7 @@ int main () EOF -if { (eval echo configure:4912: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -4942,7 +4955,7 @@ fi CFLAGS="$CFLAGS $GNOME_PRINT_CFLAGS" LIBS="$LIBS $GNOME_PRINT_LIBS" cat > conftest.$ac_ext < @@ -4952,7 +4965,7 @@ int main() { return 0; ; return 0; } EOF -if { (eval echo configure:4956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4969: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding GNOME-PRINT or finding the wrong" @@ -5028,7 +5041,7 @@ fi # Extract the first word of "gconf-config", so it can be a program name with args. set dummy gconf-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:5032: checking for $ac_word" >&5 +echo "configure:5045: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GCONF_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5063,7 +5076,7 @@ fi min_gconf_version=1.0.0 echo $ac_n "checking for GCONF - version >= $min_gconf_version""... $ac_c" 1>&6 -echo "configure:5067: checking for GCONF - version >= $min_gconf_version" >&5 +echo "configure:5080: checking for GCONF - version >= $min_gconf_version" >&5 no_gconf="" if test "$GCONF_CONFIG" = "no" ; then no_gconf=yes @@ -5098,11 +5111,18 @@ echo "configure:5067: checking for GCONF rm -f conf.gconftest + + + + + if test "x$no_gconf" = xyes; then { echo "configure: error: You need gconf installed to compile this application for GNOME. Use the --without-gnome to fall back on the GTK+ only version." 1>&2; exit 1; } fi else + PIXMAPS_DIR="$datadir/pixmaps/ghfaxviewer" + echo "configure: warning: Did not find gnome-libraries" 1>&2 # Check whether --with-glib-prefix or --without-glib-prefix was given. if test "${with_glib_prefix+set}" = set; then @@ -5157,7 +5177,7 @@ fi # Extract the first word of "glib-config", so it can be a program name with args. set dummy glib-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:5161: checking for $ac_word" >&5 +echo "configure:5181: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GLIB_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5192,7 +5212,7 @@ fi min_glib_version=1.2.0 echo $ac_n "checking for GLIB - version >= $min_glib_version""... $ac_c" 1>&6 -echo "configure:5196: checking for GLIB - version >= $min_glib_version" >&5 +echo "configure:5216: checking for GLIB - version >= $min_glib_version" >&5 no_glib="" if test "$GLIB_CONFIG" = "no" ; then no_glib=yes @@ -5215,7 +5235,7 @@ echo "configure:5196: checking for GLIB echo $ac_n "cross compiling; assumed OK... $ac_c" else cat > conftest.$ac_ext < @@ -5291,7 +5311,7 @@ main () } EOF -if { (eval echo configure:5295: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5315: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -5325,7 +5345,7 @@ fi CFLAGS="$CFLAGS $GLIB_CFLAGS" LIBS="$LIBS $GLIB_LIBS" cat > conftest.$ac_ext < @@ -5335,7 +5355,7 @@ int main() { return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ; return 0; } EOF -if { (eval echo configure:5339: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5359: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding GLIB or finding the wrong" @@ -5425,7 +5445,7 @@ fi # Extract the first word of "gtk-config", so it can be a program name with args. set dummy gtk-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:5429: checking for $ac_word" >&5 +echo "configure:5449: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GTK_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5460,7 +5480,7 @@ fi min_gtk_version=1.2.8 echo $ac_n "checking for GTK - version >= $min_gtk_version""... $ac_c" 1>&6 -echo "configure:5464: checking for GTK - version >= $min_gtk_version" >&5 +echo "configure:5484: checking for GTK - version >= $min_gtk_version" >&5 no_gtk="" if test "$GTK_CONFIG" = "no" ; then no_gtk=yes @@ -5483,7 +5503,7 @@ echo "configure:5464: checking for GTK - echo $ac_n "cross compiling; assumed OK... $ac_c" else cat > conftest.$ac_ext < @@ -5561,7 +5581,7 @@ main () } EOF -if { (eval echo configure:5565: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -5595,7 +5615,7 @@ fi CFLAGS="$CFLAGS $GTK_CFLAGS" LIBS="$LIBS $GTK_LIBS" cat > conftest.$ac_ext < @@ -5605,7 +5625,7 @@ int main() { return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ; return 0; } EOF -if { (eval echo configure:5609: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5629: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* 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" @@ -5648,6 +5668,8 @@ rm -f conftest* no_gnome_print=yes fi else + PIXMAPS_DIR="$datadir/pixmaps/ghfaxviewer" + echo "configure: warning: GNOME support disabled" 1>&2 # Check whether --with-glib-prefix or --without-glib-prefix was given. if test "${with_glib_prefix+set}" = set; then @@ -5702,7 +5724,7 @@ fi # Extract the first word of "glib-config", so it can be a program name with args. set dummy glib-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:5706: checking for $ac_word" >&5 +echo "configure:5728: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GLIB_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5737,7 +5759,7 @@ fi min_glib_version=1.2.0 echo $ac_n "checking for GLIB - version >= $min_glib_version""... $ac_c" 1>&6 -echo "configure:5741: checking for GLIB - version >= $min_glib_version" >&5 +echo "configure:5763: checking for GLIB - version >= $min_glib_version" >&5 no_glib="" if test "$GLIB_CONFIG" = "no" ; then no_glib=yes @@ -5760,7 +5782,7 @@ echo "configure:5741: checking for GLIB echo $ac_n "cross compiling; assumed OK... $ac_c" else cat > conftest.$ac_ext < @@ -5836,7 +5858,7 @@ main () } EOF -if { (eval echo configure:5840: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5862: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -5870,7 +5892,7 @@ fi CFLAGS="$CFLAGS $GLIB_CFLAGS" LIBS="$LIBS $GLIB_LIBS" cat > conftest.$ac_ext < @@ -5880,7 +5902,7 @@ int main() { return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ; return 0; } EOF -if { (eval echo configure:5884: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding GLIB or finding the wrong" @@ -5970,7 +5992,7 @@ fi # Extract the first word of "gtk-config", so it can be a program name with args. set dummy gtk-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:5974: checking for $ac_word" >&5 +echo "configure:5996: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GTK_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6005,7 +6027,7 @@ fi min_gtk_version=1.2.8 echo $ac_n "checking for GTK - version >= $min_gtk_version""... $ac_c" 1>&6 -echo "configure:6009: checking for GTK - version >= $min_gtk_version" >&5 +echo "configure:6031: checking for GTK - version >= $min_gtk_version" >&5 no_gtk="" if test "$GTK_CONFIG" = "no" ; then no_gtk=yes @@ -6028,7 +6050,7 @@ echo "configure:6009: checking for GTK - echo $ac_n "cross compiling; assumed OK... $ac_c" else cat > conftest.$ac_ext < @@ -6106,7 +6128,7 @@ main () } EOF -if { (eval echo configure:6110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:6132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -6140,7 +6162,7 @@ fi CFLAGS="$CFLAGS $GTK_CFLAGS" LIBS="$LIBS $GTK_LIBS" cat > conftest.$ac_ext < @@ -6150,7 +6172,7 @@ int main() { return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ; return 0; } EOF -if { (eval echo configure:6154: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6176: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* 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" @@ -6200,15 +6222,15 @@ if test "$window_system" = "yes"; then old_ld_flags="${LDFLAGS}" if test "x${x_includes}" != "x"; then CPPFLAGS="${CPPFLAGS} -I${x_includes}" - CFLAGS="${CFLAGS} -I${x_includes}" + CFLAGS="${CFLAGS} -I${x_includes} -I/usr/local/include" fi if test "x${x_libraries}" != "x"; then - LDFLAGS="${LDFLAGS} -L${x_libraries} -Wl,-rpath-link -Wl,${x_libraries}" + LDFLAGS="${LDFLAGS} -L${x_libraries} -L/usr/local/lib -Wl,-rpath-link -Wl,${x_libraries}" fi fi if test -z "$TIFF_LIBS"; then echo $ac_n "checking for TIFFReadScanline in -ltiff""... $ac_c" 1>&6 -echo "configure:6212: checking for TIFFReadScanline in -ltiff" >&5 +echo "configure:6234: checking for TIFFReadScanline in -ltiff" >&5 ac_lib_var=`echo tiff'_'TIFFReadScanline | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -6216,7 +6238,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ltiff -lm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6253: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6244,17 +6266,17 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_l echo "$ac_t""yes" 1>&6 ac_safe=`echo "tiffio.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for tiffio.h""... $ac_c" 1>&6 -echo "configure:6248: checking for tiffio.h" >&5 +echo "configure:6270: checking for tiffio.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:6258: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6280: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -6279,7 +6301,7 @@ fi else echo "$ac_t""no" 1>&6 echo $ac_n "checking for TIFFWriteScanline in -ltiff""... $ac_c" 1>&6 -echo "configure:6283: checking for TIFFWriteScanline in -ltiff" >&5 +echo "configure:6305: checking for TIFFWriteScanline in -ltiff" >&5 ac_lib_var=`echo tiff'_'TIFFWriteScanline | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -6287,7 +6309,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ltiff -ljpeg -lz -lm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6315,17 +6337,17 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_l echo "$ac_t""yes" 1>&6 ac_safe=`echo "tiffio.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for tiffio.h""... $ac_c" 1>&6 -echo "configure:6319: checking for tiffio.h" >&5 +echo "configure:6341: checking for tiffio.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:6329: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6351: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -6350,7 +6372,7 @@ fi else echo "$ac_t""no" 1>&6 echo $ac_n "checking for TIFFFlushData in -ltiff34""... $ac_c" 1>&6 -echo "configure:6354: checking for TIFFFlushData in -ltiff34" >&5 +echo "configure:6376: checking for TIFFFlushData in -ltiff34" >&5 ac_lib_var=`echo tiff34'_'TIFFFlushData | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -6358,7 +6380,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ltiff34 -ljpeg -lz -lm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6395: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6386,17 +6408,17 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_l echo "$ac_t""yes" 1>&6 ac_safe=`echo "tiffio.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for tiffio.h""... $ac_c" 1>&6 -echo "configure:6390: checking for tiffio.h" >&5 +echo "configure:6412: checking for tiffio.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:6400: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6422: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -6435,123 +6457,11 @@ fi fi fi -if test "x$no_gnome_print" = xyes; then - echo "configure: warning: Switching back to standard UNIX print system..." 1>&2 -#tests for print commands - ac_old_path=$PATH - PATH=/usr/sbin:$PATH - # Extract the first word of ""lpc"", so it can be a program name with args. -set dummy "lpc"; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:6447: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_LPC_COMMAND'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - case "$LPC_COMMAND" in - /*) - ac_cv_path_LPC_COMMAND="$LPC_COMMAND" # Let the user override the test with a path. - ;; - ?:/*) - ac_cv_path_LPC_COMMAND="$LPC_COMMAND" # Let the user override the test with a dos path. - ;; - *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_path_LPC_COMMAND="$ac_dir/$ac_word" - break - fi - done - IFS="$ac_save_ifs" - ;; -esac -fi -LPC_COMMAND="$ac_cv_path_LPC_COMMAND" -if test -n "$LPC_COMMAND"; then - echo "$ac_t""$LPC_COMMAND" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - if test "x$LPC_COMMAND" != "x"; then - cat >> confdefs.h <&6 -echo "configure:6489: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_LPSTAT_COMMAND'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - case "$LPSTAT_COMMAND" in - /*) - ac_cv_path_LPSTAT_COMMAND="$LPSTAT_COMMAND" # Let the user override the test with a path. - ;; - ?:/*) - ac_cv_path_LPSTAT_COMMAND="$LPSTAT_COMMAND" # Let the user override the test with a dos path. - ;; - *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_path_LPSTAT_COMMAND="$ac_dir/$ac_word" - break - fi - done - IFS="$ac_save_ifs" - ;; -esac -fi -LPSTAT_COMMAND="$ac_cv_path_LPSTAT_COMMAND" -if test -n "$LPSTAT_COMMAND"; then - echo "$ac_t""$LPSTAT_COMMAND" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - if test "x$LPSTAT_COMMAND" != "x"; then - cat >> confdefs.h < confcache <<\EOF @@ -6716,8 +6644,8 @@ Makefile.win32 ghfaxviewer.spec debian/Makefile macros/Makefile -docs/Makefile intl/Makefile +docs/Makefile src/Makefile src/ghfaxviewer-res.rc src/pixmaps/Makefile @@ -6795,6 +6723,7 @@ s%@BUILD_INCLUDED_LIBINTL@%$BUILD_INCLUD s%@USE_NLS@%$USE_NLS%g s%@CATALOGS@%$CATALOGS%g s%@GMSGFMT@%$GMSGFMT%g +s%@WIN32_LIBS@%$WIN32_LIBS%g s%@HAS_XPM2WICO_TRUE@%$HAS_XPM2WICO_TRUE%g s%@HAS_XPM2WICO_FALSE@%$HAS_XPM2WICO_FALSE%g s%@RANLIB@%$RANLIB%g @@ -6843,24 +6772,24 @@ s%@GNOME_PRINT_LIBS@%$GNOME_PRINT_LIBS%g s%@GCONF_CONFIG@%$GCONF_CONFIG%g s%@GCONF_CFLAGS@%$GCONF_CFLAGS%g s%@GCONF_LIBS@%$GCONF_LIBS%g +s%@GNOME_GRAPH_APP_DIR@%$GNOME_GRAPH_APP_DIR%g s%@GLIB_CONFIG@%$GLIB_CONFIG%g s%@GLIB_CFLAGS@%$GLIB_CFLAGS%g s%@GLIB_LIBS@%$GLIB_LIBS%g -s%@LPC_COMMAND@%$LPC_COMMAND%g -s%@LPSTAT_COMMAND@%$LPSTAT_COMMAND%g -s%@WITHOUT_GNOMEPRINT_TRUE@%$WITHOUT_GNOMEPRINT_TRUE%g -s%@WITHOUT_GNOMEPRINT_FALSE@%$WITHOUT_GNOMEPRINT_FALSE%g +s%@PIXMAPS_DIR@%$PIXMAPS_DIR%g +s%@MANPAGES@%$MANPAGES%g s%@TIFF_LIBS@%$TIFF_LIBS%g -s%@HAVE_TIFF_TRUE@%$HAVE_TIFF_TRUE%g -s%@HAVE_TIFF_FALSE@%$HAVE_TIFF_FALSE%g -s%@WIN32_LIBS@%$WIN32_LIBS%g s%@RC_ICON_DIRECTIVE@%$RC_ICON_DIRECTIVE%g s%@TARGET_GNU_TRUE@%$TARGET_GNU_TRUE%g s%@TARGET_GNU_FALSE@%$TARGET_GNU_FALSE%g s%@TARGET_WIN32_TRUE@%$TARGET_WIN32_TRUE%g s%@TARGET_WIN32_FALSE@%$TARGET_WIN32_FALSE%g +s%@HAVE_TIFF_TRUE@%$HAVE_TIFF_TRUE%g +s%@HAVE_TIFF_FALSE@%$HAVE_TIFF_FALSE%g s%@GNOME_TRUE@%$GNOME_TRUE%g s%@GNOME_FALSE@%$GNOME_FALSE%g +s%@WITHOUT_GNOMEPRINT_TRUE@%$WITHOUT_GNOMEPRINT_TRUE%g +s%@WITHOUT_GNOMEPRINT_FALSE@%$WITHOUT_GNOMEPRINT_FALSE%g CEOF EOF @@ -6907,8 +6836,8 @@ Makefile.win32 ghfaxviewer.spec debian/Makefile macros/Makefile -docs/Makefile intl/Makefile +docs/Makefile src/Makefile src/ghfaxviewer-res.rc src/pixmaps/Makefile diff -durpN ghfaxviewer-0.21.1/configure.in ghfaxviewer-0.22.0/configure.in --- ghfaxviewer-0.21.1/configure.in Fri Apr 27 12:45:49 2001 +++ ghfaxviewer-0.22.0/configure.in Tue May 8 05:52:14 2001 @@ -1,7 +1,7 @@ dnl Process this file with autoconf to produce a configure script. AC_INIT(src/cursors.c) AM_CONFIG_HEADER(config.h) -AM_INIT_AUTOMAKE(ghfaxviewer, 0.21.1) +AM_INIT_AUTOMAKE(ghfaxviewer, 0.22.0) AM_MAINTAINER_MODE @@ -19,11 +19,21 @@ ALL_LINGUAS="de fr pl zh_TW.Big5" CFLAGS="" -GCONF_CFLAGS="" -GCONF_LIBS="" +MANPAGES=ghfaxviewer.1 AC_PATH_PROG(LIBTOOL, "libtool") +# FreeBSD hacks +if test "`uname`" = "FreeBSD"; then + AC_MSG_WARN(Compiling for FreeBSD) + if test -x /usr/X11R6/bin/gtk12-config; then + GTK_CONFIG=/usr/X11R6/bin/gtk12-config + fi + if test -x /usr/local/bin/glib12-config; then + GLIB_CONFIG=/usr/local/bin/glib12-config + fi +fi + if test "$CYGWIN" = yes || test "$MINGW32" = yes; then # under Windows OS=WIN32 @@ -69,8 +79,6 @@ USE_NLS="yes" CATALOGS="`for cats in $ALL_LINGUAS; do echo -n "$cats.gmo "; done`" GMSGFMT="msgfmt" -XPM2WICO="" - AC_PATH_PROG(XGETTEXT, "xgettext") AC_PATH_PROG(GETTEXT, "gettext") AC_PATH_PROG(MSGFMT, "msgfmt") @@ -96,6 +104,7 @@ AC_SUBST(GMSGFMT) AC_SUBST(GENCAT) AC_SUBST(MSGMERGE) AC_SUBST(XPM2WICO) +AC_SUBST(WIN32_LIBS) AC_DEFINE(ENABLE_NLS) AC_DEFINE(HAVE_GETTEXT) @@ -123,16 +132,27 @@ if test "x$want_gnome" = "xyes"; then AC_MSG_CHECKING(for gnome-libs >= 1.0.55) if gnome-config --version > /dev/null 2>&1; then AC_MSG_RESULT(found) + + USING_GNOME="yes" CFLAGS="$CFLAGS `gnome-config --cflags gnomeui`" LDFLAGS="$LDFLAGS `gnome-config --libs gnomeui`" - USING_GNOME="yes" + PIXMAPS_DIR="`gnome-config --datadir`/pixmaps/ghfaxviewer" + GNOME_GRAPH_APP_DIR="`gnome-config --datadir`/gnome/apps/Graphics" + AM_PATH_GNOME_PRINT(0.25.0) AM_PATH_GCONF(1.0.0,,,gconf-gtk) + + AC_SUBST(GNOME_GRAPH_APP_DIR) + AC_SUBST(GCONF_LIBS) + AC_SUBST(GCONF_CFLAGS) + if test "x$no_gconf" = xyes; then AC_MSG_ERROR([You need gconf installed to compile this application for GNOME. Use the --without-gnome to fall back on the GTK+ only version.]) fi else + PIXMAPS_DIR="$datadir/pixmaps/ghfaxviewer" + AC_MSG_WARN(Did not find gnome-libraries, falling back on GTK+) dnl Checks for libraries. AM_PATH_GLIB([1.2.0],[],[ @@ -144,6 +164,8 @@ dnl Checks for libraries. no_gnome_print=yes fi else + PIXMAPS_DIR="$datadir/pixmaps/ghfaxviewer" + AC_MSG_WARN(GNOME support disabled, falling back on GTK+) AM_PATH_GLIB([1.2.0],[],[ AC_MSG_ERROR([You need GLib installed.]) @@ -162,10 +184,10 @@ if test "$window_system" = "yes"; then old_ld_flags="${LDFLAGS}" if test "x${x_includes}" != "x"; then CPPFLAGS="${CPPFLAGS} -I${x_includes}" - CFLAGS="${CFLAGS} -I${x_includes}" + CFLAGS="${CFLAGS} -I${x_includes} -I/usr/local/include" fi if test "x${x_libraries}" != "x"; then - LDFLAGS="${LDFLAGS} -L${x_libraries} -Wl,-rpath-link -Wl,${x_libraries}" + LDFLAGS="${LDFLAGS} -L${x_libraries} -L/usr/local/lib -Wl,-rpath-link -Wl,${x_libraries}" fi fi if test -z "$TIFF_LIBS"; then @@ -190,33 +212,11 @@ if test "$window_system" = "yes"; then fi fi -if test "x$no_gnome_print" = xyes; then - AC_MSG_WARN(Switching back to standard UNIX print system...) -#tests for print commands - ac_old_path=$PATH - PATH=/usr/sbin:$PATH - AC_PATH_PROG(LPC_COMMAND, "lpc") - if test "x$LPC_COMMAND" != "x"; then - AC_DEFINE_UNQUOTED(LPC_COMMAND, "$LPC_COMMAND") - fi - - AC_PATH_PROG(LPSTAT_COMMAND, "lpstat") - if test "x$LPSTAT_COMMAND" != "x"; then - AC_DEFINE_UNQUOTED(LPSTAT_COMMAND, "$LPSTAT_COMMAND") - fi - PATH=$ac_old_path -fi - # no_gnome_print fi -AM_CONDITIONAL(WITHOUT_GNOMEPRINT, test "x$no_gnome_print" = xyes) - deps="$TIFF_LIBS" -AC_SUBST(TIFF_LIBS) -AM_CONDITIONAL(HAVE_TIFF, test "x$TIFF_LIBS" != x) - AC_ARG_ENABLE(debug, [ --enable-debug warnings, debugging codes and messages], debug="$enableval", debug="no") @@ -236,14 +236,16 @@ else fi fi -AC_SUBST(WIN32_LIBS) +AC_SUBST(PIXMAPS_DIR) +AC_SUBST(MANPAGES) +AC_SUBST(TIFF_LIBS) AC_SUBST(RC_ICON_DIRECTIVE) + AM_CONDITIONAL(TARGET_GNU, test $OS = GNU) AM_CONDITIONAL(TARGET_WIN32, test $OS = WIN32) +AM_CONDITIONAL(HAVE_TIFF, test "x$TIFF_LIBS" != x) AM_CONDITIONAL(GNOME, test x"$USING_GNOME" = xyes) - -AC_SUBST(GCONF_LIBS) -AC_SUBST(GCONF_CFLAGS) +AM_CONDITIONAL(WITHOUT_GNOMEPRINT, test "x$no_gnome_print" = xyes) AC_OUTPUT([ Makefile @@ -251,8 +253,8 @@ Makefile.win32 ghfaxviewer.spec debian/Makefile macros/Makefile -docs/Makefile intl/Makefile +docs/Makefile src/Makefile src/ghfaxviewer-res.rc src/pixmaps/Makefile diff -durpN ghfaxviewer-0.21.1/debian/Makefile.in ghfaxviewer-0.22.0/debian/Makefile.in --- ghfaxviewer-0.21.1/debian/Makefile.in Fri Apr 27 17:14:53 2001 +++ ghfaxviewer-0.22.0/debian/Makefile.in Tue May 8 06:06:24 2001 @@ -81,6 +81,7 @@ GNOME_APPLETS_LIBS = @GNOME_APPLETS_LIBS GNOME_CAPPLET_LIBS = @GNOME_CAPPLET_LIBS@ GNOME_CONFIG = @GNOME_CONFIG@ GNOME_DOCKLETS_LIBS = @GNOME_DOCKLETS_LIBS@ +GNOME_GRAPH_APP_DIR = @GNOME_GRAPH_APP_DIR@ GNOME_INCLUDEDIR = @GNOME_INCLUDEDIR@ GNOME_LIBDIR = @GNOME_LIBDIR@ GNOME_LIBS = @GNOME_LIBS@ @@ -98,10 +99,9 @@ INTLOBJS = @INTLOBJS@ INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@ LIBICONV = @LIBICONV@ LIBTOOL = @LIBTOOL@ -LPC_COMMAND = @LPC_COMMAND@ -LPSTAT_COMMAND = @LPSTAT_COMMAND@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ +MANPAGES = @MANPAGES@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ @@ -110,6 +110,7 @@ ORBIT_CONFIG = @ORBIT_CONFIG@ ORBIT_IDL = @ORBIT_IDL@ ORBIT_LIBS = @ORBIT_LIBS@ PACKAGE = @PACKAGE@ +PIXMAPS_DIR = @PIXMAPS_DIR@ POFILES = @POFILES@ POSUB = @POSUB@ PTHREAD_LIB = @PTHREAD_LIB@ diff -durpN ghfaxviewer-0.21.1/debian/changelog ghfaxviewer-0.22.0/debian/changelog --- ghfaxviewer-0.21.1/debian/changelog Fri Apr 27 17:14:10 2001 +++ ghfaxviewer-0.22.0/debian/changelog Tue May 8 05:59:44 2001 @@ -1,3 +1,17 @@ +ghfaxviewer (0.22.0-1) unstable; urgency=low + + * New upstream release. + * specify pixmapsdir and gnome_graph_app_dir during make install. + + -- Wolfgang Sourdeau Tue, 8 May 2001 05:59:44 -0400 + +ghfaxviewer (0.21.1-3) unstable; urgency=low + + * fixed typo in Build-Depends that was referencing libtiff3g-dev instead + of libtiffg3-dev... (closes: #96209) + + -- Wolfgang Sourdeau Thu, 3 May 2001 23:16:48 -0400 + ghfaxviewer (0.21.1-2) unstable; urgency=low * 0.21.1-1 was built against a bad archive. @@ -45,6 +59,4 @@ gfaxviewer (0.9.8-1) unstable; urgency=l -- Wolfgang Sourdeau Wed, 20 Sep 2000 23:49:50 -0400 -Local variables: -mode: debian-changelog -End: + diff -durpN ghfaxviewer-0.21.1/debian/control ghfaxviewer-0.22.0/debian/control --- ghfaxviewer-0.21.1/debian/control Wed Apr 25 16:38:37 2001 +++ ghfaxviewer-0.22.0/debian/control Sun May 6 01:51:59 2001 @@ -2,7 +2,7 @@ Source: ghfaxviewer Section: graphics Priority: optional Maintainer: Wolfgang Sourdeau -Build-Depends: debhelper, gettext, libtiffg3-dev, libgtk1.2-dev, libgnome-dev, libgconf-dev, libgnomeprint-dev +Build-Depends: debhelper, gettext, libtiff3g-dev, libgtk1.2-dev, libgnome-dev, libgconf-dev, libgnomeprint-dev Standards-Version: 3.5.2 Package: ghfaxviewer @@ -12,7 +12,7 @@ Conflicts: gfaxviewer, ghfaxviewer-gtk, Architecture: any Depends: ${shlibs:Depends} Suggests: gfax -Description: The GNU HaliFAX - Viewer +Description: The GNU HaliFAX Viewer This is the GNU HaliFAX Viewer, a component of GNU HaliFAX which will help you look at the TIFF g3/g4 fax files produced by HylaFAX . diff -durpN ghfaxviewer-0.21.1/debian/rules ghfaxviewer-0.22.0/debian/rules --- ghfaxviewer-0.21.1/debian/rules Fri Apr 27 17:13:42 2001 +++ ghfaxviewer-0.22.0/debian/rules Tue May 8 05:57:31 2001 @@ -35,11 +35,15 @@ install-stamp: build-stamp dh_clean -k dh_installdirs $(MAKE) install \ - prefix=`pwd`/debian/ghfaxviewer/usr \ - sysconfdir=`pwd`/debian/ghfaxviewer/etc \ - infodir=`pwd`/debian/ghfaxviewer/usr/share/info \ - mandir=`pwd`/debian/ghfaxviewer/usr/share/man \ - datadir=`pwd`/debian/ghfaxviewer/usr/share + prefix=`pwd`/debian/$(package)/usr \ + sysconfdir=`pwd`/debian/$(package)/etc \ + infodir=`pwd`/debian/$(package)/usr/share/info \ + mandir=`pwd`/debian/$(package)/usr/share/man \ + man1dir=`pwd`/debian/$(package)/usr/share/man/man1 \ + datadir=`pwd`/debian/$(package)/usr/share \ + localedir=`pwd`/debian/$(package)/usr/share/locale \ + pixmapsdir=`pwd`/debian/$(package)/usr/share/pixmaps/ghfaxviewer \ + gnome_graph_app_dir=`pwd`/debian/$(package)/usr/share/gnome/apps/Graphics touch install-stamp @@ -60,7 +64,8 @@ binary-arch: build install #dh_installmime #dh_installinit #dh_installcron - dh_installman ghfaxviewer.1 + dh_installman docs/ghfaxviewer.1 + rm -f `pwd`/debian/$(package)/usr/share/man/man1/halifax.1 #dh_installinfo #dh_undocumented ghfaxviewer.1.gz dh_installchangelogs ChangeLog diff -durpN ghfaxviewer-0.21.1/docs/Makefile.am ghfaxviewer-0.22.0/docs/Makefile.am --- ghfaxviewer-0.21.1/docs/Makefile.am Fri Apr 13 12:44:18 2001 +++ ghfaxviewer-0.22.0/docs/Makefile.am Sun May 6 08:10:31 2001 @@ -1 +1,3 @@ -EXTRA_DIST = README README.cvs +man_MANS = halifax.1 @MANPAGES@ + +EXTRA_DIST = README README.cvs $(man_MANS) diff -durpN ghfaxviewer-0.21.1/docs/Makefile.in ghfaxviewer-0.22.0/docs/Makefile.in --- ghfaxviewer-0.21.1/docs/Makefile.in Fri Apr 27 17:14:51 2001 +++ ghfaxviewer-0.22.0/docs/Makefile.in Tue May 8 06:06:21 2001 @@ -81,6 +81,7 @@ GNOME_APPLETS_LIBS = @GNOME_APPLETS_LIBS GNOME_CAPPLET_LIBS = @GNOME_CAPPLET_LIBS@ GNOME_CONFIG = @GNOME_CONFIG@ GNOME_DOCKLETS_LIBS = @GNOME_DOCKLETS_LIBS@ +GNOME_GRAPH_APP_DIR = @GNOME_GRAPH_APP_DIR@ GNOME_INCLUDEDIR = @GNOME_INCLUDEDIR@ GNOME_LIBDIR = @GNOME_LIBDIR@ GNOME_LIBS = @GNOME_LIBS@ @@ -98,10 +99,9 @@ INTLOBJS = @INTLOBJS@ INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@ LIBICONV = @LIBICONV@ LIBTOOL = @LIBTOOL@ -LPC_COMMAND = @LPC_COMMAND@ -LPSTAT_COMMAND = @LPSTAT_COMMAND@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ +MANPAGES = @MANPAGES@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ @@ -110,6 +110,7 @@ ORBIT_CONFIG = @ORBIT_CONFIG@ ORBIT_IDL = @ORBIT_IDL@ ORBIT_LIBS = @ORBIT_LIBS@ PACKAGE = @PACKAGE@ +PIXMAPS_DIR = @PIXMAPS_DIR@ POFILES = @POFILES@ POSUB = @POSUB@ PTHREAD_LIB = @PTHREAD_LIB@ @@ -129,10 +130,16 @@ ZVT_LIBS = @ZVT_LIBS@ cflags_set = @cflags_set@ cxxflags_set = @cxxflags_set@ -EXTRA_DIST = README README.cvs +man_MANS = halifax.1 @MANPAGES@ + +EXTRA_DIST = README README.cvs $(man_MANS) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = ../config.h CONFIG_CLEAN_FILES = +man1dir = $(mandir)/man1 +MANS = $(man_MANS) + +NROFF = nroff DIST_COMMON = README Makefile.am Makefile.in @@ -149,6 +156,45 @@ Makefile: $(srcdir)/Makefile.in $(top_b cd $(top_builddir) \ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status + +install-man1: + $(mkinstalldirs) $(DESTDIR)$(man1dir) + @list='$(man1_MANS)'; \ + l2='$(man_MANS)'; for i in $$l2; do \ + case "$$i" in \ + *.1*) list="$$list $$i" ;; \ + esac; \ + done; \ + for i in $$list; do \ + if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ + else file=$$i; fi; \ + ext=`echo $$i | sed -e 's/^.*\\.//'`; \ + inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ + inst=`echo $$inst | sed '$(transform)'`.$$ext; \ + echo " $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst"; \ + $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst; \ + done + +uninstall-man1: + @list='$(man1_MANS)'; \ + l2='$(man_MANS)'; for i in $$l2; do \ + case "$$i" in \ + *.1*) list="$$list $$i" ;; \ + esac; \ + done; \ + for i in $$list; do \ + ext=`echo $$i | sed -e 's/^.*\\.//'`; \ + inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ + inst=`echo $$inst | sed '$(transform)'`.$$ext; \ + echo " rm -f $(DESTDIR)$(man1dir)/$$inst"; \ + rm -f $(DESTDIR)$(man1dir)/$$inst; \ + done +install-man: $(MANS) + @$(NORMAL_INSTALL) + $(MAKE) $(AM_MAKEFLAGS) install-man1 +uninstall-man: + @$(NORMAL_UNINSTALL) + $(MAKE) $(AM_MAKEFLAGS) uninstall-man1 tags: TAGS TAGS: @@ -179,19 +225,20 @@ installcheck: installcheck-am install-exec-am: install-exec: install-exec-am -install-data-am: +install-data-am: install-man install-data: install-data-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am install: install-am -uninstall-am: +uninstall-am: uninstall-man uninstall: uninstall-am -all-am: Makefile +all-am: Makefile $(MANS) all-redirect: all-am install-strip: $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install installdirs: + $(mkinstalldirs) $(DESTDIR)$(mandir)/man1 mostlyclean-generic: @@ -221,12 +268,12 @@ maintainer-clean-am: maintainer-clean-g maintainer-clean: maintainer-clean-am -.PHONY: tags distdir info-am info dvi-am dvi check check-am \ -installcheck-am installcheck install-exec-am install-exec \ -install-data-am install-data install-am install uninstall-am uninstall \ -all-redirect all-am all installdirs mostlyclean-generic \ -distclean-generic clean-generic maintainer-clean-generic clean \ -mostlyclean distclean maintainer-clean +.PHONY: install-man1 uninstall-man1 install-man uninstall-man tags \ +distdir info-am info dvi-am dvi check check-am installcheck-am \ +installcheck install-exec-am install-exec install-data-am install-data \ +install-am install uninstall-am uninstall all-redirect all-am all \ +installdirs mostlyclean-generic distclean-generic clean-generic \ +maintainer-clean-generic clean mostlyclean distclean maintainer-clean # Tell versions [3.59,3.63) of GNU make to not export all variables. diff -durpN ghfaxviewer-0.21.1/docs/README.cvs ghfaxviewer-0.22.0/docs/README.cvs --- ghfaxviewer-0.21.1/docs/README.cvs Fri Apr 13 11:08:43 2001 +++ ghfaxviewer-0.22.0/docs/README.cvs Sun May 6 02:06:51 2001 @@ -5,7 +5,6 @@ GNU HaliFAX and CVS Downloading GNU HaliFAX ----------------------- - As from April 13, 2001 it is possible to download the GNU HaliFAX project from the GNU cvs repository. If you don't have an account on subversions.gnu.org, you can download the package as user "anoncvs". Here is @@ -37,7 +36,6 @@ whole archive each time. Building the configure tree --------------------------- - This process is very simple. Actually it only has generally to be done once per new release. Small changes will only require the one or two last steps. @@ -67,13 +65,12 @@ autoconf Making patches -------------- - Whenever you have an interesting change to send us. Please issue the following command from the top directory of the active module: cvs -z3 diff u > [module]-[description].diff -Please note that any changes is not guaranteed to be accepted. We are going +Please note that any change is not guaranteed to be accepted. We are going to discuss this patch within the development team and with you to evaluate how much this patch will be needed, useful, appropriate and bugfree. diff -durpN ghfaxviewer-0.21.1/docs/ghfaxviewer.1 ghfaxviewer-0.22.0/docs/ghfaxviewer.1 --- ghfaxviewer-0.21.1/docs/ghfaxviewer.1 Wed Dec 31 19:00:00 1969 +++ ghfaxviewer-0.22.0/docs/ghfaxviewer.1 Sun May 6 02:01:41 2001 @@ -0,0 +1,55 @@ +.TH "ghfaxviewer" "1" "0.21.1" "Wolfgang Sourdeau" "The GNU HaliFAX Viewer" +.SH "NAME" +.LP +ghfaxviewer \- display G3/G4 (fax) encoded TIFF files +.SH "SYNTAX" +.LP +ghfaxviewer [\fIoptions\fP] <\fIfilename\fP> +.br +ghfaxviewer + +.SH "DESCRIPTION" +.LP +This program is the GNU HaliFAX project's viewer. It is able to display fax files output by the \fIHylaFAX(tm)\fP system as well as any other G3/G4\-encoded TIFF fax file. +.LP +The range of supported file\-formats will be extended in future versions. +.LP +More informations about the GNU HaliFAX project are available at the GNU HaliFAX official website: +.LP +\fBhttp://www.gnu.org/software/halifax/\fP +.SH "OPTIONS" +.LP +.TP +\fB\-\-help\fR +Output help information and exit. +.TP +\fB\-\-version\fR +Output version information and exit. +.SH "FILES" +.LP +\fI~/.gconf/apps/ghfaxviewer/*\fP on the GNOME version +.br +.SH "ENVIRONMENT VARIABLES" +.LP +.TP +\fBPRINTER\fP +Specifies the default printer. +.br +If this variable isn't set, the system default printer will be used instead. The system default printer generally is the first entry specified in /etc/printcap. +.SH "EXAMPLES" +.LP +To run this program the standard way type: +.LP +ghfaxviewer +.LP +Alternatively you can specify a filename on the command\-line: +.LP +ghfaxviewer /var/spool/fax/recvq/fax00005.tif +.SH "AUTHORS" +.LP +Wolfgang Sourdeau +.SH "SEE ALSO" +.LP +gfax(1) \- the GNU HaliFAX Sender +.br +viewfax(1) diff -durpN ghfaxviewer-0.21.1/docs/halifax.1 ghfaxviewer-0.22.0/docs/halifax.1 --- ghfaxviewer-0.21.1/docs/halifax.1 Wed Dec 31 19:00:00 1969 +++ ghfaxviewer-0.22.0/docs/halifax.1 Sun May 6 08:10:31 2001 @@ -0,0 +1,52 @@ +.if n .po 0 +.ds Fx \fIHyla\s-1FAX\s+1\fP +.ds Hx \fIGNU\ HaliFAX\s+1\fP +.ds Mx \fIMgetty+Sendfax\s+1\fP +.ds Gx \fIGFax\s+1\fP +.TH "halifax" "1" "Release 0.0.0" "Wolfgang Sourdeau" "The GNU HaliFAX Project" +.SH "NAME" +.LP +\fBGNU HaliFAX\fR \- an introduction +.SH "OVERVIEW" +.LP +The \*(Hx Project aims at writing a complete free client\-suite for +fax\-systems such as \*(Fx(\*(Tm), efax or mgetty+sendfax. +.LP +\*(Hx is a GNU project. It means its developers have taken engagement +in integrating HaliFAX as much as it can with the rest of the GNU +system, and in promising HaliFAX will be free software as well as its +documentation. +.LP +The name "Halifax" was chosen after the name of a Canadian City, which +happens to be located nearly between George Farris and Tilman Bubeck, +who are the most separated developers of the project. +.br +But also to show that is it the client counter\-part to \*(Fx(\*(Tm), +the most complete, full\-featured, industrial\-strengh, earthquake +proof, free fax system, which was chosen as the main target for +HaliFAX. +.LP +The \*(Hx project was written by George Farris, Dr Tilmann Bubeck and +Wolfgang Sourdeau. Many other people have contributed patches and +translations. A big thank goes to them. +.SH "LINKS" +.LP +More informations about the \*(Hx project are available at the +\*(Hx official website: +.br +\t\fBhttp://www.gnu.org/software/halifax/\fP +.LP +The GNU Project aims at writing a complete free UNIX\-like Operating +System so that computer users can regain the freedom to share and +improve their software, and be part of a community of people who work +together to make a better world. Those freedom were denied to them by +most of the software publishers. +.br +\t\fBhttp://www.gnu.org/\fP +.SH "SEE ALSO" +.LP +.BR gfax (1) +- the GNU HaliFAX Sender +.br +.BR ghfaxviewer (1) +- the GNU HaliFAX Viewer diff -durpN ghfaxviewer-0.21.1/ghfaxviewer.1 ghfaxviewer-0.22.0/ghfaxviewer.1 --- ghfaxviewer-0.21.1/ghfaxviewer.1 Fri Apr 27 12:54:38 2001 +++ ghfaxviewer-0.22.0/ghfaxviewer.1 Wed Dec 31 19:00:00 1969 @@ -1,55 +0,0 @@ -.TH "ghfaxviewer" "1" "0.21.1" "Wolfgang Sourdeau" "The GNU HaliFAX Viewer" -.SH "NAME" -.LP -ghfaxviewer \- display G3/G4 (fax) encoded TIFF files -.SH "SYNTAX" -.LP -ghfaxviewer [\fIoptions\fP] <\fIfilename\fP> -.br -ghfaxviewer - -.SH "DESCRIPTION" -.LP -This program is the GNU HaliFAX project's viewer. It is able to display fax files output by the \fIHylaFAX(tm)\fP system as well as any other G3/G4\-encoded TIFF fax file. -.LP -The range of supported file\-formats will be extended in future versions. -.LP -More informations about the GNU HaliFAX project are available at the GNU HaliFAX official website: -.LP -\fBhttp://www.gnu.org/software/halifax/\fP -.SH "OPTIONS" -.LP -.TP -\fB\-\-help\fR -Output help information and exit. -.TP -\fB\-\-version\fR -Output version information and exit. -.SH "FILES" -.LP -\fI~/.gconf/apps/ghfaxviewer/*\fP on the GNOME version -.br -.SH "ENVIRONMENT VARIABLES" -.LP -.TP -\fBPRINTER\fP -Specifies the default printer. -.br -If this variable isn't set, the system default printer will be used instead. The system default printer generally is the first entry specified in /etc/printcap. -.SH "EXAMPLES" -.LP -To run this program the standard way type: -.LP -ghfaxviewer -.LP -Alternatively you can specify a filename on the command\-line: -.LP -ghfaxviewer /var/spool/fax/recvq/fax00005.tif -.SH "AUTHORS" -.LP -Wolfgang Sourdeau -.SH "SEE ALSO" -.LP -gfax(1) \- the GNU HaliFAX Sender -.br -viewfax(1) diff -durpN ghfaxviewer-0.21.1/ghfaxviewer.spec ghfaxviewer-0.22.0/ghfaxviewer.spec --- ghfaxviewer-0.21.1/ghfaxviewer.spec Fri Apr 27 17:04:12 2001 +++ ghfaxviewer-0.22.0/ghfaxviewer.spec Tue May 8 05:57:48 2001 @@ -2,7 +2,7 @@ # for Mandrake, you might want to change the .gz extension to .bz2 # for the manpage (at the end of the file) -%define ver 0.21.1 +%define ver 0.22.0 %define rel 1 %define prefix /usr diff -durpN ghfaxviewer-0.21.1/macros/Makefile.in ghfaxviewer-0.22.0/macros/Makefile.in --- ghfaxviewer-0.21.1/macros/Makefile.in Fri Apr 27 17:14:53 2001 +++ ghfaxviewer-0.22.0/macros/Makefile.in Tue May 8 06:06:24 2001 @@ -81,6 +81,7 @@ GNOME_APPLETS_LIBS = @GNOME_APPLETS_LIBS GNOME_CAPPLET_LIBS = @GNOME_CAPPLET_LIBS@ GNOME_CONFIG = @GNOME_CONFIG@ GNOME_DOCKLETS_LIBS = @GNOME_DOCKLETS_LIBS@ +GNOME_GRAPH_APP_DIR = @GNOME_GRAPH_APP_DIR@ GNOME_INCLUDEDIR = @GNOME_INCLUDEDIR@ GNOME_LIBDIR = @GNOME_LIBDIR@ GNOME_LIBS = @GNOME_LIBS@ @@ -98,10 +99,9 @@ INTLOBJS = @INTLOBJS@ INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@ LIBICONV = @LIBICONV@ LIBTOOL = @LIBTOOL@ -LPC_COMMAND = @LPC_COMMAND@ -LPSTAT_COMMAND = @LPSTAT_COMMAND@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ +MANPAGES = @MANPAGES@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ @@ -110,6 +110,7 @@ ORBIT_CONFIG = @ORBIT_CONFIG@ ORBIT_IDL = @ORBIT_IDL@ ORBIT_LIBS = @ORBIT_LIBS@ PACKAGE = @PACKAGE@ +PIXMAPS_DIR = @PIXMAPS_DIR@ POFILES = @POFILES@ POSUB = @POSUB@ PTHREAD_LIB = @PTHREAD_LIB@ diff -durpN ghfaxviewer-0.21.1/po/ChangeLog ghfaxviewer-0.22.0/po/ChangeLog --- ghfaxviewer-0.21.1/po/ChangeLog Fri Apr 27 13:52:57 2001 +++ ghfaxviewer-0.22.0/po/ChangeLog Sun May 6 08:30:23 2001 @@ -1,4 +1,4 @@ -2001-04-27 gettextize +2001-05-06 gettextize * Makefile.in.in: Upgrade to gettext-0.10.37. diff -durpN ghfaxviewer-0.21.1/src/Makefile.am ghfaxviewer-0.22.0/src/Makefile.am --- ghfaxviewer-0.21.1/src/Makefile.am Wed Apr 11 10:48:15 2001 +++ ghfaxviewer-0.22.0/src/Makefile.am Tue May 8 05:55:54 2001 @@ -1,11 +1,11 @@ SUBDIRS = pixmaps gnulocaledir = $(datadir)/locale +pixmapsdir = @PIXMAPS_DIR@ +gnome_graph_app_dir = @GNOME_GRAPH_APP_DIR@ LIBS = @GTK_LIBS@ @TIFF_LIBS@ @WIN32_LIBS@ @GNOME_PRINT_LIBS@ @GCONF_LIBS@ -DEFS = @DEFS@ -DLOCALEDIR="\"$(gnulocaledir)\"" -DPIXMAP_DIR="\"$(datadir)/pixmaps/@PACKAGE@\"" - INCLUDES = -I.. -I. @GTK_CFLAGS@ @GNOME_PRINT_CFLAGS@ @GCONF_CFLAGS@ bin_PROGRAMS = ghfaxviewer @@ -19,6 +19,7 @@ PRINTSRC = gn_print.c NOPRINTSRC = winprint.c ps_print.c endif RCSRC = +SYSDEPDEFS = -DLOCALEDIR="\"$(gnulocaledir)\"" -DPIXMAP_DIR="\"$(pixmapsdir)\"" else if TARGET_WIN32 NOPRINTSRC = ps_print.c gn_print.c @@ -31,6 +32,8 @@ RCSRC = ghfaxviewer-res.rc endif endif +DEFS = @DEFS@ $(SYSDEPDEFS) + SUFFIXES = .rc .o noinst_HEADERS = setup.h tiffimages.h tiffinfo.h viewer.h cursors.h print.h \ @@ -45,16 +48,14 @@ ghfaxviewer_SOURCES = setup.c fileopen.c EXTRA_DIST = ghfaxviewer.desktop ghfaxviewer-res.rc if GNOME -GNOME_UTILITIES_DIR = $(prefix)/share/gnome/apps/Graphics - install-data-local: - $(mkinstalldirs) $(GNOME_UTILITIES_DIR) + $(mkinstalldirs) $(gnome_graph_app_dir) $(INSTALL_DATA) $(srcdir)/ghfaxviewer.desktop \ - $(GNOME_UTILITIES_DIR) + $(gnome_graph_app_dir) uninstall-local: - test -f $(GNOME_UTILITIES_DIR)/ghfaxviewer.desktop && \ - rm -f $(GNOME_UTILITIES_DIR)/ghfaxviewer.desktop - test -d $(GNOME_UTILITIES_DIR) && \ - rmdir --ignore-fail-on-non-empty $(GNOME_UTILITIES_DIR) + test -f $(gnome_graph_app_dir)/ghfaxviewer.desktop && \ + rm -f $(gnome_graph_app_dir)/ghfaxviewer.desktop + test -d $(gnome_graph_app_dir) && \ + rmdir --ignore-fail-on-non-empty $(gnome_graph_app_dir) endif diff -durpN ghfaxviewer-0.21.1/src/Makefile.in ghfaxviewer-0.22.0/src/Makefile.in --- ghfaxviewer-0.21.1/src/Makefile.in Fri Apr 27 17:14:52 2001 +++ ghfaxviewer-0.22.0/src/Makefile.in Tue May 8 06:06:23 2001 @@ -81,6 +81,7 @@ GNOME_APPLETS_LIBS = @GNOME_APPLETS_LIBS GNOME_CAPPLET_LIBS = @GNOME_CAPPLET_LIBS@ GNOME_CONFIG = @GNOME_CONFIG@ GNOME_DOCKLETS_LIBS = @GNOME_DOCKLETS_LIBS@ +GNOME_GRAPH_APP_DIR = @GNOME_GRAPH_APP_DIR@ GNOME_INCLUDEDIR = @GNOME_INCLUDEDIR@ GNOME_LIBDIR = @GNOME_LIBDIR@ GNOME_LIBS = @GNOME_LIBS@ @@ -98,10 +99,9 @@ INTLOBJS = @INTLOBJS@ INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@ LIBICONV = @LIBICONV@ LIBTOOL = @LIBTOOL@ -LPC_COMMAND = @LPC_COMMAND@ -LPSTAT_COMMAND = @LPSTAT_COMMAND@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ +MANPAGES = @MANPAGES@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ @@ -110,6 +110,7 @@ ORBIT_CONFIG = @ORBIT_CONFIG@ ORBIT_IDL = @ORBIT_IDL@ ORBIT_LIBS = @ORBIT_LIBS@ PACKAGE = @PACKAGE@ +PIXMAPS_DIR = @PIXMAPS_DIR@ POFILES = @POFILES@ POSUB = @POSUB@ PTHREAD_LIB = @PTHREAD_LIB@ @@ -132,11 +133,11 @@ cxxflags_set = @cxxflags_set@ SUBDIRS = pixmaps gnulocaledir = $(datadir)/locale +pixmapsdir = @PIXMAPS_DIR@ +gnome_graph_app_dir = @GNOME_GRAPH_APP_DIR@ LIBS = @GTK_LIBS@ @TIFF_LIBS@ @WIN32_LIBS@ @GNOME_PRINT_LIBS@ @GCONF_LIBS@ -DEFS = @DEFS@ -DLOCALEDIR="\"$(gnulocaledir)\"" -DPIXMAP_DIR="\"$(datadir)/pixmaps/@PACKAGE@\"" - INCLUDES = -I.. -I. @GTK_CFLAGS@ @GNOME_PRINT_CFLAGS@ @GCONF_CFLAGS@ bin_PROGRAMS = ghfaxviewer @@ -148,6 +149,9 @@ bin_PROGRAMS = ghfaxviewer @TARGET_GNU_FALSE@@TARGET_WIN32_TRUE@NOPRINTSRC = ps_print.c gn_print.c @TARGET_GNU_TRUE@RCSRC = @TARGET_GNU_FALSE@@TARGET_WIN32_TRUE@RCSRC = ghfaxviewer-res.rc +@TARGET_GNU_TRUE@SYSDEPDEFS = -DLOCALEDIR="\"$(gnulocaledir)\"" -DPIXMAP_DIR="\"$(pixmapsdir)\"" + +DEFS = @DEFS@ $(SYSDEPDEFS) SUFFIXES = .rc .o @@ -158,8 +162,6 @@ ghfaxviewer_SOURCES = setup.c fileopen.c EXTRA_DIST = ghfaxviewer.desktop ghfaxviewer-res.rc - -@GNOME_TRUE@GNOME_UTILITIES_DIR = $(prefix)/share/gnome/apps/Graphics mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = ../config.h CONFIG_CLEAN_FILES = ghfaxviewer-res.rc @@ -597,15 +599,15 @@ maintainer-clean @TARGET_GNU_FALSE@@TARGET_WIN32_TRUE@ @WINDRES@ --include-dir=$(prefix)/include $< $@ @GNOME_TRUE@install-data-local: -@GNOME_TRUE@ $(mkinstalldirs) $(GNOME_UTILITIES_DIR) +@GNOME_TRUE@ $(mkinstalldirs) $(gnome_graph_app_dir) @GNOME_TRUE@ $(INSTALL_DATA) $(srcdir)/ghfaxviewer.desktop \ -@GNOME_TRUE@ $(GNOME_UTILITIES_DIR) +@GNOME_TRUE@ $(gnome_graph_app_dir) @GNOME_TRUE@uninstall-local: -@GNOME_TRUE@ test -f $(GNOME_UTILITIES_DIR)/ghfaxviewer.desktop && \ -@GNOME_TRUE@ rm -f $(GNOME_UTILITIES_DIR)/ghfaxviewer.desktop -@GNOME_TRUE@ test -d $(GNOME_UTILITIES_DIR) && \ -@GNOME_TRUE@ rmdir --ignore-fail-on-non-empty $(GNOME_UTILITIES_DIR) +@GNOME_TRUE@ test -f $(gnome_graph_app_dir)/ghfaxviewer.desktop && \ +@GNOME_TRUE@ rm -f $(gnome_graph_app_dir)/ghfaxviewer.desktop +@GNOME_TRUE@ test -d $(gnome_graph_app_dir) && \ +@GNOME_TRUE@ rmdir --ignore-fail-on-non-empty $(gnome_graph_app_dir) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff -durpN ghfaxviewer-0.21.1/src/about.c ghfaxviewer-0.22.0/src/about.c --- ghfaxviewer-0.21.1/src/about.c Fri Apr 27 13:33:35 2001 +++ ghfaxviewer-0.22.0/src/about.c Mon Apr 30 04:12:32 2001 @@ -184,7 +184,7 @@ about_cb (GtkWidget *irrelevant, gpointe about_dialog = dialog_window_new (_("About...")); content = about_content (viewer_window); - dialog_window_set_content (about_dialog, content); + dialog_window_set_content_with_frame (about_dialog, content); ok_button = gtk_button_new_with_label (_("Close")); gtk_signal_connect (GTK_OBJECT (ok_button), "clicked", @@ -192,6 +192,7 @@ about_cb (GtkWidget *irrelevant, gpointe about_dialog); dialog_window_set_button (about_dialog, ok_button); + dialog_window_set_escapable (about_dialog); dialog_window_show (about_dialog, GTK_WINDOW (viewer_window)); } diff -durpN ghfaxviewer-0.21.1/src/callbcks.c ghfaxviewer-0.22.0/src/callbcks.c --- ghfaxviewer-0.21.1/src/callbcks.c Thu Apr 12 04:28:44 2001 +++ ghfaxviewer-0.22.0/src/callbcks.c Sun May 6 08:15:14 2001 @@ -32,16 +32,13 @@ nextpage_cb (GtkWidget *widget, ViewerDa { FaxPage *current_page, *next_page; - if (viewer_data->fax_file) - { - current_page = viewer_data->current_page; - next_page = current_page->next; + current_page = viewer_data->current_page; + next_page = current_page->next; - if (next_page) - { - viewer_data->current_page = current_page->next; - draw_page (viewer_data); - } + if (next_page) + { + viewer_data->current_page = current_page->next; + draw_page (viewer_data); } } @@ -50,119 +47,99 @@ prevpage_cb (GtkWidget *widget, ViewerDa { FaxPage *current_page, *prev_page; - if (viewer_data->fax_file) + current_page = viewer_data->current_page; + prev_page = current_page->prev; + + if (prev_page) { - current_page = viewer_data->current_page; - prev_page = current_page->prev; - - if (prev_page) - { - viewer_data->current_page = current_page->prev; - draw_page (viewer_data); - } + viewer_data->current_page = current_page->prev; + draw_page (viewer_data); } } void zoomout_cb (GtkWidget *widget, ViewerData *viewer_data) { - if (viewer_data->fax_file - && viewer_data->zoom_index != 0) - { - viewer_data->zoom_index--; + viewer_data->zoom_index--; - draw_page (viewer_data); - } + draw_page (viewer_data); } void zoomin_cb (GtkWidget *widget, ViewerData *viewer_data) { - if (viewer_data->fax_file - && viewer_data->zoom_index != MAX_ZOOM_INDEX) - { - viewer_data->zoom_index++; + viewer_data->zoom_index++; - draw_page (viewer_data); - } + draw_page (viewer_data); } void reverse_cb (GtkWidget *widget, ViewerData *viewer_data) { - if (viewer_data->fax_file) + switch (viewer_data->rotation) { - switch (viewer_data->rotation) - { - case ROT_NONE: - viewer_data->rotation = ROT_180; - break; - case ROT_180: - viewer_data->rotation = ROT_NONE; - break; - case ROT_RIGHT90: - viewer_data->rotation = ROT_LEFT90; - break; - case ROT_LEFT90: - viewer_data->rotation = ROT_RIGHT90; - break; - default: - } - - draw_page (viewer_data); + case ROT_NONE: + viewer_data->rotation = ROT_180; + break; + case ROT_180: + viewer_data->rotation = ROT_NONE; + break; + case ROT_RIGHT90: + viewer_data->rotation = ROT_LEFT90; + break; + case ROT_LEFT90: + viewer_data->rotation = ROT_RIGHT90; + break; + default: } + + draw_page (viewer_data); } void right90_cb (GtkWidget *widget, ViewerData *viewer_data) { - if (viewer_data->fax_file) + switch (viewer_data->rotation) { - switch (viewer_data->rotation) - { - case ROT_NONE: - viewer_data->rotation = ROT_RIGHT90; - break; - case ROT_180: - viewer_data->rotation = ROT_LEFT90; - break; - case ROT_RIGHT90: - viewer_data->rotation = ROT_180; - break; - case ROT_LEFT90: - viewer_data->rotation = ROT_NONE; - break; - default: - } - - draw_page (viewer_data); + case ROT_NONE: + viewer_data->rotation = ROT_RIGHT90; + break; + case ROT_180: + viewer_data->rotation = ROT_LEFT90; + break; + case ROT_RIGHT90: + viewer_data->rotation = ROT_180; + break; + case ROT_LEFT90: + viewer_data->rotation = ROT_NONE; + break; + default: } + + draw_page (viewer_data); } void left90_cb (GtkWidget *widget, ViewerData *viewer_data) { - if (viewer_data->fax_file) + switch (viewer_data->rotation) { - switch (viewer_data->rotation) - { - case ROT_NONE: - viewer_data->rotation = ROT_LEFT90; - break; - case ROT_180: - viewer_data->rotation = ROT_RIGHT90; - break; - case ROT_RIGHT90: - viewer_data->rotation = ROT_NONE; - break; - case ROT_LEFT90: - viewer_data->rotation = ROT_180; - break; - default: - } - - draw_page (viewer_data); + case ROT_NONE: + viewer_data->rotation = ROT_LEFT90; + break; + case ROT_180: + viewer_data->rotation = ROT_RIGHT90; + break; + case ROT_RIGHT90: + viewer_data->rotation = ROT_NONE; + break; + case ROT_LEFT90: + viewer_data->rotation = ROT_180; + break; + default: } + + draw_page (viewer_data); } void widget_close_cb (GtkWidget *widget, ViewerData *viewer_data) diff -durpN ghfaxviewer-0.21.1/src/draw_page.c ghfaxviewer-0.22.0/src/draw_page.c --- ghfaxviewer-0.21.1/src/draw_page.c Fri Apr 27 01:55:11 2001 +++ ghfaxviewer-0.22.0/src/draw_page.c Sun May 6 08:15:14 2001 @@ -108,32 +108,62 @@ refresh_widgets (ViewerData *viewer_data int bcounter; if (viewer_data->current_page->next == NULL) - gtk_widget_set_sensitive(viewer_data->bb_buttons[NEXT_PAGE], - FALSE); + { + gtk_widget_set_sensitive(viewer_data->cmd_menus[VIEW_NEXT_PAGE], + FALSE); + gtk_widget_set_sensitive(viewer_data->cmd_buttons[VIEW_NEXT_PAGE], + FALSE); + } else - gtk_widget_set_sensitive(viewer_data->bb_buttons[NEXT_PAGE], - TRUE); + { + gtk_widget_set_sensitive(viewer_data->cmd_menus[VIEW_NEXT_PAGE], + TRUE); + gtk_widget_set_sensitive(viewer_data->cmd_buttons[VIEW_NEXT_PAGE], + TRUE); + } if (viewer_data->current_page->prev == NULL) - gtk_widget_set_sensitive(viewer_data->bb_buttons[PREV_PAGE], - FALSE); + { + gtk_widget_set_sensitive(viewer_data->cmd_menus[VIEW_PREV_PAGE], + FALSE); + gtk_widget_set_sensitive(viewer_data->cmd_buttons[VIEW_PREV_PAGE], + FALSE); + } else - gtk_widget_set_sensitive(viewer_data->bb_buttons[PREV_PAGE], - TRUE); + { + gtk_widget_set_sensitive(viewer_data->cmd_menus[VIEW_PREV_PAGE], + TRUE); + gtk_widget_set_sensitive(viewer_data->cmd_buttons[VIEW_PREV_PAGE], + TRUE); + } if (viewer_data->zoom_index == 0) - gtk_widget_set_sensitive (viewer_data->bb_buttons[ZOOM_OUT], - FALSE); + { + gtk_widget_set_sensitive(viewer_data->cmd_menus[VIEW_ZOOM_OUT], + FALSE); + gtk_widget_set_sensitive (viewer_data->cmd_buttons[VIEW_ZOOM_OUT], + FALSE); + } else { - gtk_widget_set_sensitive (viewer_data->bb_buttons[ZOOM_OUT], + gtk_widget_set_sensitive(viewer_data->cmd_menus[VIEW_ZOOM_OUT], + TRUE); + gtk_widget_set_sensitive (viewer_data->cmd_buttons[VIEW_ZOOM_OUT], TRUE); if (viewer_data->zoom_index == MAX_ZOOM_INDEX) - gtk_widget_set_sensitive (viewer_data->bb_buttons[ZOOM_IN], - FALSE); + { + gtk_widget_set_sensitive(viewer_data->cmd_menus[VIEW_ZOOM_IN], + FALSE); + gtk_widget_set_sensitive (viewer_data->cmd_buttons[VIEW_ZOOM_IN], + FALSE); + } else - gtk_widget_set_sensitive (viewer_data->bb_buttons[ZOOM_IN], - TRUE); + { + gtk_widget_set_sensitive(viewer_data->cmd_menus[VIEW_ZOOM_IN], + TRUE); + gtk_widget_set_sensitive (viewer_data->cmd_buttons[VIEW_ZOOM_IN], + TRUE); + } } for (bcounter = 0; diff -durpN ghfaxviewer-0.21.1/src/errors.c ghfaxviewer-0.22.0/src/errors.c --- ghfaxviewer-0.21.1/src/errors.c Fri Apr 27 03:03:38 2001 +++ ghfaxviewer-0.22.0/src/errors.c Tue May 8 03:01:14 2001 @@ -74,14 +74,14 @@ /* return ret_str; */ /* } */ -static void +void display_failure (GtkWidget *window, gchar *title, gchar *message, gchar *but_text) { - DialogWindow *fail_window; + DialogWindow *fail_dialog; GtkWidget *vbox, *msg_lbl, *ok_but; - fail_window = dialog_window_new (title); + fail_dialog = dialog_window_new (title); vbox = gtk_vbox_new (FALSE, 5); gtk_container_set_border_width (GTK_CONTAINER (vbox), 5); @@ -95,12 +95,13 @@ display_failure (GtkWidget *window, ok_but = gtk_button_new_with_label (but_text); gtk_signal_connect (GTK_OBJECT (ok_but), "clicked", dialog_window_destroy_from_signal, - fail_window); + fail_dialog); - dialog_window_set_content (fail_window, vbox); - dialog_window_set_button (fail_window, ok_but); + dialog_window_set_content_with_frame (fail_dialog, vbox); + dialog_window_set_button (fail_dialog, ok_but); + dialog_window_set_escapable (fail_dialog); - dialog_window_show (fail_window, + dialog_window_show (fail_dialog, GTK_WINDOW (window)); } diff -durpN ghfaxviewer-0.21.1/src/errors.h ghfaxviewer-0.22.0/src/errors.h --- ghfaxviewer-0.21.1/src/errors.h Thu Apr 26 16:41:59 2001 +++ ghfaxviewer-0.22.0/src/errors.h Tue May 8 03:01:24 2001 @@ -23,5 +23,7 @@ #define ERRORS_H void file_open_error (GtkWidget *window, gchar *file_name); +void display_failure (GtkWidget *window, + gchar *title, gchar *message, gchar *but_text); #endif diff -durpN ghfaxviewer-0.21.1/src/fileopen.c ghfaxviewer-0.22.0/src/fileopen.c --- ghfaxviewer-0.21.1/src/fileopen.c Wed Apr 11 10:48:18 2001 +++ ghfaxviewer-0.22.0/src/fileopen.c Mon Apr 30 03:04:23 2001 @@ -32,26 +32,23 @@ #include "setup.h" static void -file_dlg_ok_cb (GtkWidget *ok_button, GtkWidget *file_dlg) +file_dlg_ok_cb (GtkWidget *ok_button, ViewerData *viewer_data) { gchar *file_name; #ifdef CAN_SAVE_CONFIG gchar *last_directory; #endif GSList *fail_list, *fail_reason_list; - ViewerData *viewer_data; file_name = g_strdup (gtk_file_selection_get_filename - (GTK_FILE_SELECTION (file_dlg))); + (GTK_FILE_SELECTION (viewer_data->file_dlg))); fail_list = NULL; fail_reason_list = NULL; if (file_name) { - viewer_data = gtk_object_get_user_data (GTK_OBJECT (file_dlg)); - gtk_widget_destroy (file_dlg); fax_viewer_open_file (viewer_data, file_name); - + gtk_widget_destroy (viewer_data->file_dlg); #ifdef CAN_SAVE_CONFIG last_directory = g_dirname (file_name); save_last_directory (last_directory); @@ -71,6 +68,8 @@ file_dialog (ViewerData *viewer_data) open_dialog = gtk_file_selection_new (_("Please choose a FAX " "G3 file to open...")); + gtk_window_set_escapable (GTK_WINDOW (open_dialog)); + viewer_data->file_dlg = open_dialog; #ifdef CAN_SAVE_CONFIG last_dir = load_last_directory (); @@ -83,14 +82,12 @@ file_dialog (ViewerData *viewer_data) (open_dialog)->ok_button), "clicked", GTK_SIGNAL_FUNC (file_dlg_ok_cb), - (gpointer) open_dialog); + viewer_data); gtk_signal_connect_object (GTK_OBJECT (GTK_FILE_SELECTION (open_dialog)->cancel_button), "clicked", GTK_SIGNAL_FUNC (gtk_widget_destroy), GTK_OBJECT (open_dialog)); - gtk_object_set_user_data (GTK_OBJECT (open_dialog), - (gpointer) viewer_data); transient_window_show (GTK_WINDOW (open_dialog), GTK_WINDOW (viewer_data->viewer_window)); diff -durpN ghfaxviewer-0.21.1/src/ghfaxviewer-res.rc ghfaxviewer-0.22.0/src/ghfaxviewer-res.rc --- ghfaxviewer-0.21.1/src/ghfaxviewer-res.rc Fri Apr 27 17:04:13 2001 +++ ghfaxviewer-0.22.0/src/ghfaxviewer-res.rc Tue May 8 05:57:49 2001 @@ -17,7 +17,7 @@ VS_VERSION_INFO VERSIONINFO BEGIN VALUE "CompanyName", "The GNU HaliFAX team" VALUE "FileDescription", "The GNU HaliFAX - Viewer" - VALUE "FileVersion", "0.21.1" + VALUE "FileVersion", "0.22.0" VALUE "InternalName", "ghfaxviewer" VALUE "LegalCopyright", "Copyright © 2000, 2001 Wolfgang Sourdeau" VALUE "OriginalFilename", "ghfaxviewer.exe" diff -durpN ghfaxviewer-0.21.1/src/gn_print.c ghfaxviewer-0.22.0/src/gn_print.c --- ghfaxviewer-0.21.1/src/gn_print.c Fri Apr 27 03:41:16 2001 +++ ghfaxviewer-0.22.0/src/gn_print.c Sun May 6 08:15:14 2001 @@ -281,28 +281,25 @@ print_dlg_clicked_cb (GtkWidget *print_d void print_cb (GtkWidget *widget, ViewerData *viewer_data) { - if (viewer_data->fax_file) - { - viewer_data->print_dialog = - gnome_print_dialog_new (_("Print..."), - GNOME_PRINT_DIALOG_RANGE - | GNOME_PRINT_DIALOG_COPIES); + GtkWidget *print_dialog; - gnome_print_dialog_construct_range_page - (GPD (viewer_data->print_dialog), - GNOME_PRINT_RANGE_CURRENT - | GNOME_PRINT_RANGE_ALL - | GNOME_PRINT_RANGE_RANGE, - 1, - viewer_data->fax_file->nbr_pages + 1, - _("Current page only"), - _("Range")); + print_dialog = + gnome_print_dialog_new (_("Print..."), + GNOME_PRINT_DIALOG_RANGE + | GNOME_PRINT_DIALOG_COPIES); + + gnome_print_dialog_construct_range_page + (GPD (print_dialog), (GNOME_PRINT_RANGE_CURRENT + | GNOME_PRINT_RANGE_ALL + | GNOME_PRINT_RANGE_RANGE), + 1, viewer_data->fax_file->nbr_pages + 1, + _("Current page only"), + _("Range")); - gtk_signal_connect (GTK_OBJECT (viewer_data->print_dialog), - "clicked", print_dlg_clicked_cb, - viewer_data); - - transient_window_show (GTK_WINDOW (viewer_data->print_dialog), - GTK_WINDOW (viewer_data->viewer_window)); - } + gtk_signal_connect (GTK_OBJECT (print_dialog), + "clicked", print_dlg_clicked_cb, + viewer_data); + + transient_window_show (GTK_WINDOW (print_dialog), + GTK_WINDOW (viewer_data->viewer_window)); } diff -durpN ghfaxviewer-0.21.1/src/gtkutils.c ghfaxviewer-0.22.0/src/gtkutils.c --- ghfaxviewer-0.21.1/src/gtkutils.c Fri Apr 27 13:33:56 2001 +++ ghfaxviewer-0.22.0/src/gtkutils.c Sun May 6 08:15:14 2001 @@ -27,20 +27,35 @@ #endif #include +#include #include "setup.h" typedef struct _DialogWindow DialogWindow; +typedef struct _EscCallbackData EscCallbackData; struct _DialogWindow { GtkWidget *window; GtkWidget *vbox; - GtkWidget *frame; GtkWidget *content; GtkHButtonBox *button_box; }; +struct _EscCallbackData +{ + GtkSignalFunc callback; + gpointer user_data; +}; + +/* This function happens to be present in more than one place. Let's + clean up some... */ +void +free_data_on_destroy_cb (GtkWidget *widget, gpointer data) +{ + g_free (data); +} + /* Menu creation */ GtkWidget* @@ -55,7 +70,7 @@ menu_separator_new (GtkWidget *menu) return separator; } -void +GtkWidget * menu_item_new (GtkWidget *menu, gchar *label, GtkSignalFunc callback, gpointer data) { @@ -67,6 +82,8 @@ menu_item_new (GtkWidget *menu, gchar *l if (callback) gtk_signal_connect (GTK_OBJECT (new_menu_item), "activate", callback, data); + + return new_menu_item; } /* Pixmaps and icons */ @@ -146,31 +163,95 @@ transient_window_show (GtkWindow *transi increase_win_count (); } +/* ESC-key handling */ + +static gboolean +key_press_event_cb (GtkWidget *window, GdkEventKey *event, + EscCallbackData *esc_cb_data) +{ + gboolean ret_code; + + if (event->keyval == GDK_Escape) + { + if (esc_cb_data) + { + esc_cb_data->callback (window, esc_cb_data->user_data); + ret_code = FALSE; + } + else + { + gtk_widget_destroy (window); + ret_code = TRUE; + } + } + else + ret_code = FALSE; + + return ret_code; +} + +void +gtk_window_set_escapable (GtkWindow *window) +{ + gtk_signal_connect (GTK_OBJECT (window), "key-press-event", + GTK_SIGNAL_FUNC (key_press_event_cb), NULL); +} + /* dialog windows */ DialogWindow * dialog_window_new (gchar *title) { - DialogWindow *dialog_win; + DialogWindow *window; - dialog_win = g_malloc (sizeof (DialogWindow)); - dialog_win->window = gtk_window_new (GTK_WINDOW_DIALOG); - gtk_window_set_title (GTK_WINDOW (dialog_win->window), title); - gtk_window_set_position (GTK_WINDOW (dialog_win->window), GTK_WIN_POS_CENTER); + window = g_malloc (sizeof (DialogWindow)); + window->window = gtk_window_new (GTK_WINDOW_DIALOG); + gtk_window_set_title (GTK_WINDOW (window->window), title); + gtk_window_set_position (GTK_WINDOW (window->window), GTK_WIN_POS_CENTER); + window->vbox = gtk_vbox_new (FALSE, 5); + gtk_container_add (GTK_CONTAINER (window->window), + window->vbox); - dialog_win->vbox = gtk_vbox_new (FALSE, 5); - gtk_container_add (GTK_CONTAINER (dialog_win->window), - dialog_win->vbox); + window->content = NULL; + window->button_box = NULL; - dialog_win->frame = gtk_frame_new (NULL); - gtk_box_pack_start (GTK_BOX (dialog_win->vbox), dialog_win->frame, - TRUE, FALSE, 5); - gtk_container_set_border_width (GTK_CONTAINER (dialog_win->frame), 10); + return window; +} - dialog_win->content = NULL; - dialog_win->button_box = NULL; +void +dialog_window_set_escapable (DialogWindow *window) +{ + gtk_window_set_escapable ((GtkWindow*) window->window); +} - return dialog_win; +void +dialog_window_set_escapable_with_callback (DialogWindow *window, + GtkSignalFunc callback, + gpointer user_data) +{ + EscCallbackData *esc_cb_data; + + esc_cb_data = g_malloc (sizeof (EscCallbackData)); + esc_cb_data->callback = callback; + esc_cb_data->user_data = user_data; + gtk_signal_connect (GTK_OBJECT (window->window), "destroy", + (GtkSignalFunc) free_data_on_destroy_cb, + esc_cb_data); + gtk_signal_connect (GTK_OBJECT (window->window), "key-press-event", + GTK_SIGNAL_FUNC (key_press_event_cb), esc_cb_data); +} + +GtkWidget * +dialog_window_bbox () +{ + GtkWidget *button_box; + + button_box = gtk_hbutton_box_new (); + gtk_container_set_border_width (GTK_CONTAINER (button_box), 5); + gtk_button_box_set_layout (GTK_BUTTON_BOX (button_box), GTK_BUTTONBOX_END); + gtk_button_box_set_spacing (GTK_BUTTON_BOX (button_box), 5); + + return button_box; } void @@ -178,7 +259,8 @@ dialog_window_set_content (DialogWindow { if (!window->content) { - gtk_container_add (GTK_CONTAINER (window->frame), content); + gtk_box_pack_start (GTK_BOX (window->vbox), content, + TRUE, FALSE, 2); window->content = content; } else @@ -187,13 +269,36 @@ dialog_window_set_content (DialogWindow } void +dialog_window_set_content_with_frame (DialogWindow *window, GtkWidget *content) +{ + GtkWidget *frame; + + frame = gtk_frame_new (NULL); + gtk_container_set_border_width (GTK_CONTAINER (frame), 10); + gtk_container_add (GTK_CONTAINER (frame), content); + dialog_window_set_content (window, frame); + + window->content = content; +} + +void +dialog_window_add_destroy_callback (DialogWindow *window, + GtkSignalFunc callback, + gpointer data) +{ + gtk_signal_connect (GTK_OBJECT (window->window), + "destroy", + callback, data); +} + +void dialog_window_set_button_box (DialogWindow *window, GtkHButtonBox *button_box) { if (!window->button_box) { gtk_box_pack_end (GTK_BOX (window->vbox), GTK_WIDGET (button_box), - TRUE, FALSE, 5); + FALSE, FALSE, 0); window->button_box = button_box; } else @@ -207,16 +312,23 @@ dialog_window_set_button (DialogWindow * { GtkWidget *button_box; - button_box = gtk_hbutton_box_new (); + button_box = dialog_window_bbox (); gtk_box_pack_start (GTK_BOX (button_box), button, - FALSE, FALSE, 5); + FALSE, FALSE, 0); + dialog_window_set_button_box (window, GTK_HBUTTON_BOX (button_box)); - GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT | GTK_HAS_DEFAULT); + GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT); gtk_widget_grab_default (button); } +GtkWindow * +dialog_window_get_gtkwin (DialogWindow *window) +{ + return ((GtkWindow*) window->window); +} + void dialog_window_show (DialogWindow *dialog, GtkWindow *parent) { @@ -250,4 +362,17 @@ back_gtkstyle (GtkRcStyle *style, GtkSta color.blue = blue; style->bg[state] = color; style->color_flags[state] = GTK_RC_BG; +} + +/* Handle-box transientization */ + +void +handle_box_transient_cb (GtkHandleBox *handle_box, GtkWidget *hb_child, + GdkWindow *parent) +{ + gtk_signal_disconnect_by_func (GTK_OBJECT (handle_box), + GTK_SIGNAL_FUNC (handle_box_transient_cb), + parent); + gdk_window_set_transient_for (handle_box->float_window, + parent); } diff -durpN ghfaxviewer-0.21.1/src/gtkutils.h ghfaxviewer-0.22.0/src/gtkutils.h --- ghfaxviewer-0.21.1/src/gtkutils.h Fri Apr 27 01:52:35 2001 +++ ghfaxviewer-0.22.0/src/gtkutils.h Sun May 6 08:15:14 2001 @@ -19,7 +19,6 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ - /* Some useful GTK+-related functions used all around the program */ #ifndef GTKUTILS_H @@ -27,19 +26,35 @@ typedef gpointer DialogWindow; /* private */ -GtkWidget* menu_separator_new (GtkWidget *menu); -void menu_item_new (GtkWidget *menu, gchar *label, - GtkSignalFunc callback, gpointer data); +void free_data_on_destroy_cb (GtkWidget *widget, gpointer data); + +GtkWidget *menu_separator_new (GtkWidget *menu); +GtkWidget *menu_item_new (GtkWidget *menu, gchar *label, + GtkSignalFunc callback, gpointer data); + +void gtk_window_set_escapable (GtkWindow *window); +void dialog_window_set_escapable_with_callback (DialogWindow *window, + GtkSignalFunc callback, + gpointer user_data); + +void dialog_window_set_escapable (DialogWindow *window); +GtkWidget *dialog_window_bbox (); DialogWindow *dialog_window_new (gchar *title); void dialog_window_set_content (DialogWindow *window, GtkWidget *content); +void dialog_window_set_content_with_frame (DialogWindow *window, + GtkWidget *content); void dialog_window_set_button_box (DialogWindow *window, GtkHButtonBox *button_box); void dialog_window_set_button (DialogWindow *window, GtkWidget *button); +GtkWindow *dialog_window_get_gtkwin (DialogWindow *window); void dialog_window_show (DialogWindow *dialog, GtkWindow *parent); void dialog_window_destroy (DialogWindow *dialog); void dialog_window_destroy_from_signal (GtkWidget *widget, gpointer dialog); +void dialog_window_add_destroy_callback (DialogWindow *window, + GtkSignalFunc callback, + gpointer data); void transient_window_show (GtkWindow *transient, GtkWindow *parent); @@ -47,6 +62,10 @@ GtkWidget *pixmap_from_xpm (GtkWidget *r void back_gtkstyle (GtkRcStyle *style, GtkStateType state, gushort red, gushort green, gushort blue); + +void handle_box_transient_cb (GtkHandleBox *handle_box, + GtkWidget *hb_child, + GdkWindow *parent); #ifndef __WIN32__ void window_set_icon (GtkWidget *window, gchar *file_name); diff -durpN ghfaxviewer-0.21.1/src/info.c ghfaxviewer-0.22.0/src/info.c --- ghfaxviewer-0.21.1/src/info.c Fri Apr 27 02:48:16 2001 +++ ghfaxviewer-0.22.0/src/info.c Mon Apr 30 04:12:32 2001 @@ -312,14 +312,14 @@ create_info_table (GtkWidget *window, Ti } static DialogWindow * -create_info_window (GtkWidget *viewer_window, TiffInfo *file_info) +create_info_dialog (GtkWidget *viewer_window, TiffInfo *file_info) { - DialogWindow *info_window; + DialogWindow *info_dialog; GtkWidget *table, *ok_button; - info_window = dialog_window_new (_("Fax properties")); + info_dialog = dialog_window_new (_("Fax properties")); table = create_info_table (viewer_window, file_info); - dialog_window_set_content (info_window, table); + dialog_window_set_content_with_frame (info_dialog, table); #ifdef NEED_GNOMESUPPORT_H ok_button = gnome_stock_button (GNOME_STOCK_BUTTON_OK); @@ -327,26 +327,27 @@ create_info_window (GtkWidget *viewer_wi ok_button = gtk_button_new_with_label (_("Close")); #endif gtk_signal_connect (GTK_OBJECT (ok_button), "clicked", - dialog_window_destroy_from_signal, info_window); + dialog_window_destroy_from_signal, info_dialog); - dialog_window_set_button (info_window, + dialog_window_set_button (info_dialog, ok_button); + dialog_window_set_escapable (info_dialog); - return info_window; + return info_dialog; } void info_cb (GtkWidget *irrelevant, ViewerData *viewer_data) { - DialogWindow *info_window; + DialogWindow *info_dialog; TiffInfo *file_info; if (viewer_data->fax_file) { file_info = ti_get_file_info (viewer_data->fax_file); - info_window = create_info_window (viewer_data->viewer_window, + info_dialog = create_info_dialog (viewer_data->viewer_window, file_info); - dialog_window_show (info_window, + dialog_window_show (info_dialog, GTK_WINDOW (viewer_data->viewer_window)); ti_destroy_file_info (file_info); diff -durpN ghfaxviewer-0.21.1/src/menu.c ghfaxviewer-0.22.0/src/menu.c --- ghfaxviewer-0.21.1/src/menu.c Fri Apr 27 13:38:25 2001 +++ ghfaxviewer-0.22.0/src/menu.c Sun May 6 08:15:14 2001 @@ -57,7 +57,7 @@ gnome_menu_bar_new (ViewerData *viewer_d GNOMEUIINFO_MENU_EXIT_ITEM (widget_close_cb, viewer_data), GNOMEUIINFO_END }; - + GnomeUIInfo view_menu_uiinfo[] = { { @@ -106,7 +106,7 @@ gnome_menu_bar_new (ViewerData *viewer_d }, GNOMEUIINFO_END }; - + GnomeUIInfo settings_menu_uiinfo[] = { GNOMEUIINFO_MENU_PREFERENCES_ITEM (NULL, NULL), @@ -130,6 +130,17 @@ gnome_menu_bar_new (ViewerData *viewer_d gnome_app_create_menus (GNOME_APP (viewer_data->viewer_window), menubar_uiinfo); + viewer_data->cmd_menus[FILE_CLOSE] = file_menu_uiinfo[1].widget; + viewer_data->cmd_menus[FILE_PRINT] = file_menu_uiinfo[3].widget; + viewer_data->cmd_menus[FILE_PROPERTIES] = file_menu_uiinfo[5].widget; + + viewer_data->cmd_menus[VIEW_PREV_PAGE] = view_menu_uiinfo[0].widget; + viewer_data->cmd_menus[VIEW_NEXT_PAGE] = view_menu_uiinfo[1].widget; + viewer_data->cmd_menus[VIEW_ZOOM_IN] = view_menu_uiinfo[3].widget; + viewer_data->cmd_menus[VIEW_ZOOM_OUT] = view_menu_uiinfo[4].widget; + viewer_data->cmd_menus[VIEW_ROTATE_LEFT90] = view_menu_uiinfo[6].widget; + viewer_data->cmd_menus[VIEW_ROTATE_REVERSE] = view_menu_uiinfo[7].widget; + viewer_data->cmd_menus[VIEW_ROTATE_RIGHT90] = view_menu_uiinfo[8].widget; } #else /* NEED_GNOMESUPPORT_H */ @@ -144,12 +155,21 @@ file_menu_new (ViewerData *viewer_data) gtk_menu_item_set_submenu (GTK_MENU_ITEM (file_menu_item), file_menu); menu_item_new (file_menu, _("Open..."), file_dialog_cb, viewer_data); - menu_item_new (file_menu, _("Close"), close_file_cb, viewer_data); + viewer_data->cmd_menus[FILE_CLOSE] = + menu_item_new (file_menu, _("Close"), close_file_cb, viewer_data); + menu_separator_new (file_menu); - menu_item_new (file_menu, _("Print fax"), print_cb, viewer_data); + + viewer_data->cmd_menus[FILE_PRINT] = + menu_item_new (file_menu, _("Print fax"), print_cb, viewer_data); + menu_separator_new (file_menu); - menu_item_new (file_menu, _("Properties..."), info_cb, viewer_data); + + viewer_data->cmd_menus[FILE_PROPERTIES] = + menu_item_new (file_menu, _("Properties..."), info_cb, viewer_data); + menu_separator_new (file_menu); + menu_item_new (file_menu, _("Quit"), widget_close_cb, viewer_data); return file_menu_item; @@ -164,18 +184,33 @@ view_menu_new (ViewerData *viewer_data) view_menu = gtk_menu_new (); gtk_menu_item_set_submenu (GTK_MENU_ITEM (view_menu_item), view_menu); - menu_item_new (view_menu, _("Go to next page"), nextpage_cb, viewer_data); - menu_item_new (view_menu, _("Go to previous page"), prevpage_cb, viewer_data); + viewer_data->cmd_menus[VIEW_NEXT_PAGE] = + menu_item_new (view_menu, _("Go to next page"), + nextpage_cb, viewer_data); + viewer_data->cmd_menus[VIEW_PREV_PAGE] = + menu_item_new (view_menu, _("Go to previous page"), + prevpage_cb, viewer_data); + menu_separator_new (view_menu); - menu_item_new (view_menu, _("Zoom in"), zoomin_cb, viewer_data); - menu_item_new (view_menu, _("Zoom out"), zoomout_cb, viewer_data); + + viewer_data->cmd_menus[VIEW_ZOOM_IN] = + menu_item_new (view_menu, _("Zoom in"), + zoomin_cb, viewer_data); + viewer_data->cmd_menus[VIEW_ZOOM_OUT] = + menu_item_new (view_menu, _("Zoom out"), + zoomout_cb, viewer_data); + menu_separator_new (view_menu); - menu_item_new (view_menu, _("Rotate 90 degrees clockwise"), - right90_cb, viewer_data); - menu_item_new (view_menu, _("Rotate 90 degrees counter-clockwise"), - left90_cb, viewer_data); - menu_item_new (view_menu, _("Reverse image"), - reverse_cb, viewer_data); + + viewer_data->cmd_menus[VIEW_ROTATE_RIGHT90] = + menu_item_new (view_menu, _("Rotate 90 degrees clockwise"), + right90_cb, viewer_data); + viewer_data->cmd_menus[VIEW_ROTATE_LEFT90] = + menu_item_new (view_menu, _("Rotate 90 degrees counter-clockwise"), + left90_cb, viewer_data); + viewer_data->cmd_menus[VIEW_ROTATE_REVERSE] = + menu_item_new (view_menu, _("Reverse image"), + reverse_cb, viewer_data); return view_menu_item; } @@ -219,6 +254,9 @@ menu_bar_new (ViewerData *viewer_data) /* To give a GNOMEish look to those poor users with only GTK+ available */ menu_handle_box = gtk_handle_box_new (); + gtk_signal_connect (GTK_OBJECT (menu_handle_box), "child-detached", + GTK_SIGNAL_FUNC (handle_box_transient_cb), + viewer_data->viewer_window->window); viewer_menu = gtk_menu_bar_new (); gtk_container_add (GTK_CONTAINER (menu_handle_box), viewer_menu); diff -durpN ghfaxviewer-0.21.1/src/pixmaps/Makefile.am ghfaxviewer-0.22.0/src/pixmaps/Makefile.am --- ghfaxviewer-0.21.1/src/pixmaps/Makefile.am Wed Apr 11 10:48:28 2001 +++ ghfaxviewer-0.22.0/src/pixmaps/Makefile.am Tue May 8 05:52:30 2001 @@ -1,5 +1,3 @@ -pkgdatadir = $(prefix)/share/pixmaps/@PACKAGE@ - if TARGET_WIN32 if HAS_XPM2WICO ghfaxviewer-icon.ico: ghfaxviewer-icon.xpm @@ -9,18 +7,26 @@ all: ghfaxviewer-icon.ico endif endif -pkgdata_DATA = printer.xpm \ - left90.xpm right90.xpm reverse.xpm \ - right_arrow.xpm left_arrow.xpm \ - zoom_in.xpm zoom_out.xpm info.xpm \ - ghfaxviewer-logo.xpm ghfaxviewer-icon.xpm +pixmapsdir = @PIXMAPS_DIR@ + +if GNOME +pixmaps_DATA = info.xpm ghfaxviewer-logo.xpm ghfaxviewer-icon.xpm +else +pixmaps_DATA = info.xpm ghfaxviewer-logo.xpm ghfaxviewer-icon.xpm \ + printer.xpm left90.xpm right90.xpm reverse.xpm \ + right_arrow.xpm left_arrow.xpm zoom_in.xpm zoom_out.xpm +endif EXTRA_DIST = hand-closed-data.xbm hand-closed-mask.xbm \ - hand-open-data.xbm hand-open-mask.xbm \ - stock-zoom-out.xpm stock-zoom-in.xpm \ - stock-zoom-out-menu.xpm stock-zoom-in-menu.xpm \ - $(pkgdata_DATA) + hand-open-data.xbm hand-open-mask.xbm \ + stock-zoom-out.xpm stock-zoom-in.xpm \ + stock-zoom-out-menu.xpm stock-zoom-in-menu.xpm \ + printer.xpm \ + left90.xpm right90.xpm reverse.xpm \ + right_arrow.xpm left_arrow.xpm \ + zoom_in.xpm zoom_out.xpm info.xpm \ + ghfaxviewer-logo.xpm ghfaxviewer-icon.xpm uninstall-local: - test -d $(pkgdatadir) && \ - rmdir --ignore-fail-on-non-empty $(pkgdatadir) + test -d $(pixmapsdir) && \ + rmdir --ignore-fail-on-non-empty $(pixmapsdir) diff -durpN ghfaxviewer-0.21.1/src/pixmaps/Makefile.in ghfaxviewer-0.22.0/src/pixmaps/Makefile.in --- ghfaxviewer-0.21.1/src/pixmaps/Makefile.in Fri Apr 27 17:14:53 2001 +++ ghfaxviewer-0.22.0/src/pixmaps/Makefile.in Tue May 8 06:06:23 2001 @@ -33,6 +33,8 @@ includedir = @includedir@ oldincludedir = /usr/include DESTDIR = + +pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ @@ -79,6 +81,7 @@ GNOME_APPLETS_LIBS = @GNOME_APPLETS_LIBS GNOME_CAPPLET_LIBS = @GNOME_CAPPLET_LIBS@ GNOME_CONFIG = @GNOME_CONFIG@ GNOME_DOCKLETS_LIBS = @GNOME_DOCKLETS_LIBS@ +GNOME_GRAPH_APP_DIR = @GNOME_GRAPH_APP_DIR@ GNOME_INCLUDEDIR = @GNOME_INCLUDEDIR@ GNOME_LIBDIR = @GNOME_LIBDIR@ GNOME_LIBS = @GNOME_LIBS@ @@ -96,10 +99,9 @@ INTLOBJS = @INTLOBJS@ INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@ LIBICONV = @LIBICONV@ LIBTOOL = @LIBTOOL@ -LPC_COMMAND = @LPC_COMMAND@ -LPSTAT_COMMAND = @LPSTAT_COMMAND@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ +MANPAGES = @MANPAGES@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ @@ -108,6 +110,7 @@ ORBIT_CONFIG = @ORBIT_CONFIG@ ORBIT_IDL = @ORBIT_IDL@ ORBIT_LIBS = @ORBIT_LIBS@ PACKAGE = @PACKAGE@ +PIXMAPS_DIR = @PIXMAPS_DIR@ POFILES = @POFILES@ POSUB = @POSUB@ PTHREAD_LIB = @PTHREAD_LIB@ @@ -127,17 +130,16 @@ ZVT_LIBS = @ZVT_LIBS@ cflags_set = @cflags_set@ cxxflags_set = @cxxflags_set@ -pkgdatadir = $(prefix)/share/pixmaps/@PACKAGE@ - -pkgdata_DATA = printer.xpm left90.xpm right90.xpm reverse.xpm right_arrow.xpm left_arrow.xpm zoom_in.xpm zoom_out.xpm info.xpm ghfaxviewer-logo.xpm ghfaxviewer-icon.xpm - +pixmapsdir = @PIXMAPS_DIR@ +@GNOME_TRUE@pixmaps_DATA = info.xpm ghfaxviewer-logo.xpm ghfaxviewer-icon.xpm +@GNOME_FALSE@pixmaps_DATA = info.xpm ghfaxviewer-logo.xpm ghfaxviewer-icon.xpm printer.xpm left90.xpm right90.xpm reverse.xpm right_arrow.xpm left_arrow.xpm zoom_in.xpm zoom_out.xpm -EXTRA_DIST = hand-closed-data.xbm hand-closed-mask.xbm hand-open-data.xbm hand-open-mask.xbm stock-zoom-out.xpm stock-zoom-in.xpm stock-zoom-out-menu.xpm stock-zoom-in-menu.xpm $(pkgdata_DATA) +EXTRA_DIST = hand-closed-data.xbm hand-closed-mask.xbm hand-open-data.xbm hand-open-mask.xbm stock-zoom-out.xpm stock-zoom-in.xpm stock-zoom-out-menu.xpm stock-zoom-in-menu.xpm printer.xpm left90.xpm right90.xpm reverse.xpm right_arrow.xpm left_arrow.xpm zoom_in.xpm zoom_out.xpm info.xpm ghfaxviewer-logo.xpm ghfaxviewer-icon.xpm mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = ../../config.h CONFIG_CLEAN_FILES = -DATA = $(pkgdata_DATA) +DATA = $(pixmaps_DATA) DIST_COMMON = Makefile.am Makefile.in @@ -156,23 +158,23 @@ Makefile: $(srcdir)/Makefile.in $(top_b && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status -install-pkgdataDATA: $(pkgdata_DATA) +install-pixmapsDATA: $(pixmaps_DATA) @$(NORMAL_INSTALL) - $(mkinstalldirs) $(DESTDIR)$(pkgdatadir) - @list='$(pkgdata_DATA)'; for p in $$list; do \ + $(mkinstalldirs) $(DESTDIR)$(pixmapsdir) + @list='$(pixmaps_DATA)'; for p in $$list; do \ if test -f $(srcdir)/$$p; then \ - echo " $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(pkgdatadir)/$$p"; \ - $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(pkgdatadir)/$$p; \ + echo " $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(pixmapsdir)/$$p"; \ + $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(pixmapsdir)/$$p; \ else if test -f $$p; then \ - echo " $(INSTALL_DATA) $$p $(DESTDIR)$(pkgdatadir)/$$p"; \ - $(INSTALL_DATA) $$p $(DESTDIR)$(pkgdatadir)/$$p; \ + echo " $(INSTALL_DATA) $$p $(DESTDIR)$(pixmapsdir)/$$p"; \ + $(INSTALL_DATA) $$p $(DESTDIR)$(pixmapsdir)/$$p; \ fi; fi; \ done -uninstall-pkgdataDATA: +uninstall-pixmapsDATA: @$(NORMAL_UNINSTALL) - list='$(pkgdata_DATA)'; for p in $$list; do \ - rm -f $(DESTDIR)$(pkgdatadir)/$$p; \ + list='$(pixmaps_DATA)'; for p in $$list; do \ + rm -f $(DESTDIR)$(pixmapsdir)/$$p; \ done tags: TAGS TAGS: @@ -204,20 +206,20 @@ installcheck: installcheck-am install-exec-am: install-exec: install-exec-am -install-data-am: install-pkgdataDATA +install-data-am: install-pixmapsDATA install-data: install-data-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am install: install-am -uninstall-am: uninstall-pkgdataDATA uninstall-local +uninstall-am: uninstall-pixmapsDATA uninstall-local uninstall: uninstall-am all-am: Makefile $(DATA) all-redirect: all-am install-strip: $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install installdirs: - $(mkinstalldirs) $(DESTDIR)$(pkgdatadir) + $(mkinstalldirs) $(DESTDIR)$(pixmapsdir) mostlyclean-generic: @@ -247,7 +249,7 @@ maintainer-clean-am: maintainer-clean-g maintainer-clean: maintainer-clean-am -.PHONY: uninstall-pkgdataDATA install-pkgdataDATA tags distdir info-am \ +.PHONY: uninstall-pixmapsDATA install-pixmapsDATA tags distdir info-am \ info dvi-am dvi check check-am installcheck-am installcheck \ install-exec-am install-exec install-data-am install-data install-am \ install uninstall-local uninstall-am uninstall all-redirect all-am all \ @@ -261,8 +263,8 @@ maintainer-clean-generic clean mostlycle @TARGET_WIN32_TRUE@@HAS_XPM2WICO_TRUE@all: ghfaxviewer-icon.ico uninstall-local: - test -d $(pkgdatadir) && \ - rmdir --ignore-fail-on-non-empty $(pkgdatadir) + test -d $(pixmapsdir) && \ + rmdir --ignore-fail-on-non-empty $(pixmapsdir) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff -durpN ghfaxviewer-0.21.1/src/progress.c ghfaxviewer-0.22.0/src/progress.c --- ghfaxviewer-0.21.1/src/progress.c Fri Apr 27 03:35:10 2001 +++ ghfaxviewer-0.22.0/src/progress.c Mon Apr 30 04:34:53 2001 @@ -77,7 +77,7 @@ gfv_progress_new (GtkWindow *parent_wind vbox = gtk_vbox_new (FALSE, 3); gtk_container_set_border_width (GTK_CONTAINER (vbox), 5); - dialog_window_set_content (dlg_window, vbox); + dialog_window_set_content_with_frame (dlg_window, vbox); label = gtk_label_new (action_string); gtk_box_pack_start (GTK_BOX (vbox), label, TRUE, FALSE, 3); @@ -94,9 +94,12 @@ gfv_progress_new (GtkWindow *parent_wind abort_btn = gtk_button_new_with_label (_("Cancel")); #endif gtk_signal_connect (GTK_OBJECT (abort_btn), "clicked", - (GtkSignalFunc) progress_abort, prog_data); + (GtkSignalFunc) progress_abort, prog_data); dialog_window_set_button (dlg_window, abort_btn); - + dialog_window_set_escapable_with_callback (dlg_window, + (GtkSignalFunc) progress_abort, + prog_data); + prog_data->abort_btn = abort_btn; } @@ -177,7 +180,6 @@ gfv_progress_update_with_percentage (gui while (gtk_events_pending ()) gtk_main_iteration (); } - return (prog_data->aborted); } diff -durpN ghfaxviewer-0.21.1/src/ps_print.c ghfaxviewer-0.22.0/src/ps_print.c --- ghfaxviewer-0.21.1/src/ps_print.c Sun Apr 15 00:04:21 2001 +++ ghfaxviewer-0.22.0/src/ps_print.c Tue May 8 05:29:56 2001 @@ -40,20 +40,11 @@ #include "print.h" #include "i18n.h" #include "gtkutils.h" +#include "errors.h" - -/* - * not all systems have defined __compar_fn_t, original definition - * from glibc stdlib.h follows - */ /* Shorthand for type of comparison functions. */ -#ifndef __COMPAR_FN_T -# define __COMPAR_FN_T -typedef int (*__compar_fn_t) __PMT ((__const __ptr_t, __const __ptr_t)); - -# ifdef __USE_GNU -typedef __compar_fn_t comparison_fn_t; -# endif +#ifndef __GLIBC__ +#define __compar_fn_t int (*) (const void *, const void *) #endif typedef struct _PList PList; @@ -89,6 +80,7 @@ struct _PrintData FaxPage *current_page; gint first_page, last_page; PDlgWidgets widgets; + DialogWindow *print_dialog; GtkWidget *parent_window; }; @@ -98,10 +90,147 @@ struct _OutputData FaxFile *document; gchar *out_file_name; gint from_page, to_page; - GtkWidget *print_dlg, *err_dlg, *parent_window; + DialogWindow *print_dialog, *err_dialog; + GtkWidget *parent_window; }; #define MAX_PLIST 8 +static gchar *lpc_command = NULL; +static gchar *lpstat_command = NULL; + +/* Do various tests to determine how to get the list of printers. + There are so many veriants of the lpr system... */ +static gchar * +where_is (gchar *command) +{ + gchar **cur_dir, *path, *test_cmd, *result; + gchar *test_dirs[] = + { + "/usr/sbin", + "/usr/bin", + "/sbin", + "/bin", + NULL + }; + + result = NULL; + cur_dir = test_dirs; + + while (!result && *cur_dir) + { + path = *cur_dir; + test_cmd = g_strdup_printf ("%s/%s", path, command); + + if (access (test_cmd, X_OK)) + { + g_free (test_cmd); + cur_dir++; + } + else + result = test_cmd; + } + + return result; +} + +static gchar * +cmd_result (gchar *cmd) +{ + FILE *pfile; + gchar *result; + + result = NULL; + pfile = popen (cmd, "r"); + + if (pfile) + { + result = g_malloc (129); + fgets(result, 129, pfile); + pclose (pfile); + } + + return result; +} + +static gboolean +test_lpc (gchar *lpc) +{ + gboolean ret_code; + gchar *command, *result; + + ret_code = FALSE; + command = g_strdup_printf ("%s status < /dev/null", lpc); + result = cmd_result (command); + + /* FreeBSD lpr needs to have a printer specified or "all", while + other versions don't */ + if (!strncmp (result, "Usage:", 6)) + { + g_free (result); + g_free (command); + + command = g_strdup_printf ("%s status all < /dev/null", lpc); + result = cmd_result (command); + + if (strncmp (result, "unknown", 7)) + { + lpc_command = command; + ret_code = TRUE; + } + else + g_free (command); + + g_free (result); + } + else + { + g_free (result); + lpc_command = command; + ret_code = TRUE; + } + + return ret_code; +} + +static gboolean +test_lpstat (gchar *lpstat) +{ + gboolean ret_code; +/* gchar *command, *result; */ + + /* I have yet to test multiple versions of lpstat... */ + ret_code = TRUE; + lpstat_command = g_strdup_printf ("%s -d -p < /dev/null", lpstat); + + return ret_code; +} + +static gboolean +ensure_commands () +{ + gboolean ret_code; + gchar *lpc, *lpstat; + + if (lpc_command || lpstat_command) + ret_code = TRUE; + else + { + lpc = where_is ("lpc"); + lpstat = where_is ("lpstat"); + + if (lpc) + ret_code = test_lpc (lpc); + else if (lpstat) + ret_code = test_lpstat (lpstat); + else + ret_code = FALSE; + + g_free (lpc); + g_free (lpstat); + } + + return ret_code; +} static int compare_printers (PList *p1, PList *p2) @@ -137,47 +266,46 @@ make_default_pr (PList *plist, int nbr_p static PList* get_printers (void) { - int plist_count; - char defname[17]; + gint plist_count; + gchar defname[17], name[17]; + gchar line[129]; PList *plist; -#if defined(LPC_COMMAND) || defined(LPSTAT_COMMAND) FILE *pfile; - char line[129]; -#endif defname[0] = '\0'; plist = g_malloc0 (sizeof (PList) * MAX_PLIST); plist_count = 0; - -#ifdef LPC_COMMAND - pfile = popen (LPC_COMMAND " status < /dev/null", "r"); - if (pfile) - { - while (fgets(line, sizeof (line), pfile) != NULL - && plist_count < MAX_PLIST) - if (strchr(line, ':') != NULL - && line[0] != ' ' - && line[0] != '\t' - && strncmp(line, "Press RETURN to continue", 24)) - { - *strchr(line, ':') = '\0'; - strcpy(plist[plist_count].name, line); - if (plist_count == 0) - strcpy(defname, line); - plist[plist_count].active = TRUE; - plist[plist_count].is_default = FALSE; - plist_count++; - } + + if (lpc_command) + { + pfile = popen (lpc_command, "r"); + + if (pfile) + { + while (fgets(line, sizeof (line), pfile) + && plist_count < MAX_PLIST) + if (strchr(line, ':') + && line[0] != ' ' + && line[0] != '\t' + && strncmp(line, "Press RETURN to continue", 24)) + { + *strchr(line, ':') = '\0'; + strcpy(plist[plist_count].name, line); + if (plist_count == 0) + strcpy(defname, line); + plist[plist_count].active = TRUE; + plist[plist_count].is_default = FALSE; + plist_count++; + } - pclose(pfile); + pclose(pfile); + } } -#endif /* LPC_COMMAND */ - -#ifdef LPSTAT_COMMAND - if (!plist_count) + + if (!plist_count && lpstat_command) { - pfile = popen (LPSTAT_COMMAND " -d -p", "r"); + pfile = popen (lpstat_command, "r"); if (pfile) { while (fgets (line, sizeof (line), pfile) != NULL @@ -198,7 +326,6 @@ get_printers (void) pclose(pfile); } } -#endif /* LPSTAT_COMMAND */ if (plist_count) { @@ -257,8 +384,8 @@ make_printer_menu (PrintData *print_data cur_printer++; } - gtk_object_set_data_full (GTK_OBJECT (menu), "printer_list", - plist, g_free); + gtk_signal_connect (GTK_OBJECT (menu), "destroy", + free_data_on_destroy_cb, plist); } else menu = NULL; @@ -502,8 +629,6 @@ create_temp_print_file (gchar **outfile_ template = g_strdup ("/tmp/gfo-XXXXXX"); -#warning Ignore the warning about mktemp at link time, -#warning it is used securely here... while (!file_stream && counter < 64) { file_name = mktemp (template); @@ -573,17 +698,17 @@ print_image (FILE *print_file, FaxPage * if (!aborted) { cur_char = *(fax_image->image + counter); - fprintf(print_file, "%.2x", (unsigned char) ~cur_char); + fprintf (print_file, "%.2x", (unsigned char) ~cur_char); if ((counter + 1) % 40 == 0) - fprintf(print_file, "\n"); + fprintf (print_file, "\n"); } else new_progress = 0; } if (!aborted && ((counter + 1) % 40 != 0)) - fprintf(print_file, "\n"); + fprintf (print_file, "\n"); return new_progress; } @@ -621,20 +746,20 @@ output_document (OutputData *output_data VERSION, output_data->document->file_name); - fprintf(output_data->output_stream, - "%%!PS-Adobe-3.0\n" - "%%%%Creator: %s\n" - "%%%%Title: %s\n" - "%%%%CreationDate: %s" - "%%%%DocumentData: Clean7Bit\n" - "%%%%Origin: 0 0\n" - "%%%%BoundingBox: 0 0 612 792\n" - "%%%%LanguageLevel: 1\n" - "%%%%Pages: (atend)\n" - "%%%%EndComments\n" - "%%%%BeginSetup\n" - "%%%%EndSetup\n", - ps_creator, ps_title, time_string); + fprintf (output_data->output_stream, + "%%!PS-Adobe-3.0\n" + "%%%%Creator: %s\n" + "%%%%Title: %s\n" + "%%%%CreationDate: %s" + "%%%%DocumentData: Clean7Bit\n" + "%%%%Origin: 0 0\n" + "%%%%BoundingBox: 0 0 612 792\n" + "%%%%LanguageLevel: 1\n" + "%%%%Pages: (atend)\n" + "%%%%EndComments\n" + "%%%%BeginSetup\n" + "%%%%EndSetup\n", + ps_creator, ps_title, time_string); g_free (ps_title); g_free (ps_creator); @@ -653,33 +778,33 @@ output_document (OutputData *output_data cur_page = ti_seek_fax_page (output_data->document, cur_page_nbr - 1); - fprintf(output_data->output_stream, - "%%%%Page: %d %d\n", - cur_page_nbr, - cur_page_nbr); - fprintf(output_data->output_stream, - "gsave\n" - "100 dict begin\n" - "%f %f scale\n", - ((float) cur_page->width * 72.0 - / (float) output_data->document->x_res), - ((float) cur_page->height - * 72.0 - / (float) output_data->document->y_res)); - fprintf(output_data->output_stream, - "%%ImageData: %d %d 1 1 0 1 2 \"image\"\n", - cur_page->width, cur_page->height); - fprintf(output_data->output_stream, - "/scanLine %d string def\n", - (int) (cur_page->width / 8)); - fprintf(output_data->output_stream, - "%d %d 1\n", cur_page->width, cur_page->height); - fprintf(output_data->output_stream, - "[%d 0 0 -%d 0 %d]\n", cur_page->width, - cur_page->height, cur_page->height); - fprintf(output_data->output_stream, - "{currentfile scanLine readhexstring pop} bind\n" - "image\n"); + fprintf (output_data->output_stream, + "%%%%Page: %d %d\n", + cur_page_nbr, + cur_page_nbr); + fprintf (output_data->output_stream, + "gsave\n" + "100 dict begin\n" + "%f %f scale\n", + ((float) cur_page->width * 72.0 + / (float) output_data->document->x_res), + ((float) cur_page->height + * 72.0 + / (float) output_data->document->y_res)); + fprintf (output_data->output_stream, + "%%ImageData: %d %d 1 1 0 1 2 \"image\"\n", + cur_page->width, cur_page->height); + fprintf (output_data->output_stream, + "/scanLine %d string def\n", + (int) (cur_page->width / 8)); + fprintf (output_data->output_stream, + "%d %d 1\n", cur_page->width, cur_page->height); + fprintf (output_data->output_stream, + "[%d 0 0 -%d 0 %d]\n", cur_page->width, + cur_page->height, cur_page->height); + fprintf (output_data->output_stream, + "{currentfile scanLine readhexstring pop} bind\n" + "image\n"); ti_load_fax_page (output_data->document, cur_page); cur_byte = print_image (output_data->output_stream, @@ -690,10 +815,10 @@ output_document (OutputData *output_data success = FALSE; else { - fprintf(output_data->output_stream, - "end\n" - "grestore\n" - "showpage\n"); + fprintf (output_data->output_stream, + "end\n" + "grestore\n" + "showpage\n"); cur_page_nbr++; } @@ -717,84 +842,84 @@ output_document (OutputData *output_data return success; } -static gint -print_to_file_anyway_cb (GtkWidget *yes_button, OutputData - *output_data) +static void +print_to_file_anyway_cb (GtkWidget *yes_button, + OutputData *output_data) { gboolean success; - - gtk_widget_destroy (output_data->err_dlg); - - while (gtk_events_pending ()) - gtk_main_iteration (); + DialogWindow *print_dialog; output_data->output_stream = fopen (output_data->out_file_name, "w+"); success = output_document (output_data); + fclose (output_data->output_stream); + print_dialog = output_data->print_dialog; + if (success) - gtk_widget_destroy (output_data->print_dlg); + { + dialog_window_destroy (output_data->err_dialog); + dialog_window_destroy (print_dialog); + } else - unlink (output_data->out_file_name); - - fclose (output_data->output_stream); - g_free (output_data->out_file_name); - g_free (output_data); - - return FALSE; + { + unlink (output_data->out_file_name); + dialog_window_destroy (output_data->err_dialog); + } } -static gint -no_overwrite_cb (GtkWidget *no_button, OutputData *output_data) +static void +file_exists_dialog_destroy_cb (GtkWidget *window, OutputData *output_data) { - gtk_widget_destroy (output_data->err_dlg); g_free (output_data->out_file_name); g_free (output_data); - - return FALSE; } static void -file_exists_dlg (OutputData *output_data, GtkWidget *print_dlg) +file_exists_dialog (OutputData *output_data, DialogWindow *print_dialog) { - GtkWidget *err_win, *vbox, *hbox, *msg_lbl, *yes_but, *no_but; + DialogWindow *err_dialog; + GtkWidget *button_box, *msg_lbl, *yes_but, *no_but; gchar *message; message = g_strdup_printf (_("%s already exists.\n" "Do you want to overwrite it?"), output_data->out_file_name); - err_win = gtk_window_new (GTK_WINDOW_DIALOG); - gtk_window_set_title (GTK_WINDOW (err_win), _("Please answer...")); - gtk_container_set_border_width (GTK_CONTAINER (err_win), 10); - - vbox = gtk_vbox_new (FALSE, 1); - gtk_container_add (GTK_CONTAINER (err_win), vbox); - + err_dialog = dialog_window_new (_("Please answer...")); + dialog_window_add_destroy_callback (err_dialog, + GTK_SIGNAL_FUNC (file_exists_dialog_destroy_cb), + output_data); + msg_lbl = gtk_label_new (message); g_free (message); - gtk_box_pack_start (GTK_BOX (vbox), msg_lbl, TRUE, FALSE, 3); gtk_label_set_justify (GTK_LABEL (msg_lbl), GTK_JUSTIFY_LEFT); + dialog_window_set_content_with_frame (err_dialog, msg_lbl); - hbox = gtk_hbox_new (FALSE, 3); - gtk_box_pack_start (GTK_BOX (vbox), hbox, TRUE, FALSE, 0); - - output_data->err_dlg = err_win; - output_data->print_dlg = print_dlg; + button_box = dialog_window_bbox (); + dialog_window_set_button_box (err_dialog, GTK_HBUTTON_BOX (button_box)); + dialog_window_set_escapable (err_dialog); yes_but = gtk_button_new_with_label (_("Yes, please do")); gtk_signal_connect (GTK_OBJECT (yes_but), "clicked", GTK_SIGNAL_FUNC (print_to_file_anyway_cb), output_data); - gtk_box_pack_start (GTK_BOX (hbox), yes_but, TRUE, FALSE, 2); - + gtk_box_pack_start (GTK_BOX (button_box), yes_but, + FALSE, FALSE, 5); + GTK_WIDGET_SET_FLAGS (yes_but, GTK_CAN_DEFAULT); + no_but = gtk_button_new_with_label (_("No thanks")); gtk_signal_connect (GTK_OBJECT (no_but), "clicked", - GTK_SIGNAL_FUNC (no_overwrite_cb), - output_data); - gtk_box_pack_start (GTK_BOX (hbox), no_but, TRUE, FALSE, 2); + GTK_SIGNAL_FUNC (dialog_window_destroy_from_signal), + err_dialog); + gtk_box_pack_start (GTK_BOX (button_box), no_but, + FALSE, FALSE, 5); + GTK_WIDGET_SET_FLAGS(no_but, GTK_CAN_DEFAULT); + gtk_widget_grab_default (no_but); - transient_window_show (GTK_WINDOW (err_win), - GTK_WINDOW (print_dlg)); + output_data->err_dialog = err_dialog; + output_data->print_dialog = print_dialog; + + dialog_window_show (err_dialog, dialog_window_get_gtkwin (print_dialog)); } static gint @@ -835,7 +960,6 @@ launch_print_job_cb (GtkWidget *widget, output_data->from_page = output_data->to_page = print_data->current_page->nbr + 1; - if (direction == PRINT_TO_PRINTER) { print_command = gtk_entry_get_text @@ -855,7 +979,7 @@ launch_print_job_cb (GtkWidget *widget, system (command); g_free (command); - gtk_widget_destroy (widget->parent->parent); + dialog_window_destroy (print_data->print_dialog); } unlink (output_data->out_file_name); @@ -881,84 +1005,101 @@ launch_print_job_cb (GtkWidget *widget, g_free (output_data->out_file_name); g_free (output_data); - gtk_widget_destroy (widget->parent->parent); + dialog_window_destroy (print_data->print_dialog); } else - file_exists_dlg (output_data, widget->parent->parent); + file_exists_dialog (output_data, print_data->print_dialog); } - return FALSE; } -static gint -cancel_print_cb (GtkWidget *widget, gpointer null) +static void +print_dialog_bbox (PrintData *print_data) { - gtk_widget_destroy (widget->parent->parent); + GtkWidget *button_box, *print_but, *cancel_but; - return FALSE; + button_box = dialog_window_bbox (); + dialog_window_set_button_box (print_data->print_dialog, + GTK_HBUTTON_BOX (button_box)); + dialog_window_set_escapable (print_data->print_dialog); + + print_but = gtk_button_new_with_label (_("Print")); + GTK_WIDGET_SET_FLAGS(print_but, GTK_CAN_DEFAULT); + gtk_box_pack_start (GTK_BOX (button_box), print_but, FALSE, FALSE, 0); + gtk_widget_grab_default (print_but); + gtk_signal_connect (GTK_OBJECT (print_but), "clicked", + GTK_SIGNAL_FUNC (launch_print_job_cb), + print_data); + + cancel_but = gtk_button_new_with_label (_("Cancel")); + GTK_WIDGET_SET_FLAGS(cancel_but, GTK_CAN_DEFAULT); + gtk_box_pack_start (GTK_BOX (button_box), cancel_but, FALSE, FALSE, 0); + gtk_signal_connect (GTK_OBJECT (cancel_but), "clicked", + GTK_SIGNAL_FUNC (dialog_window_destroy_from_signal), + print_data->print_dialog); + + gtk_widget_show (button_box); } -static GtkWidget* +static DialogWindow * print_dialog (ViewerData *viewer_data) { - GtkWidget *print_dlg, *table, - *output_frame, *page_frame, - *print_but, *cancel_but; + DialogWindow *print_dialog; + GtkWidget *table, *output_frame, *page_frame; PrintData *print_data; + print_dialog = dialog_window_new (_("Print...")); + print_data = g_malloc (sizeof (PrintData)); print_data->document = viewer_data->fax_file; print_data->current_page = viewer_data->current_page; print_data->parent_window = viewer_data->viewer_window; - - print_dlg = gtk_window_new (GTK_WINDOW_DIALOG); - gtk_window_set_title (GTK_WINDOW (print_dlg), _("Print...")); - gtk_container_set_border_width (GTK_CONTAINER (print_dlg), 3); + print_data->print_dialog = print_dialog; table = gtk_table_new (3, 2, FALSE); gtk_table_set_row_spacings (GTK_TABLE (table), 5); gtk_table_set_col_spacings (GTK_TABLE (table), 5); - gtk_container_add (GTK_CONTAINER (print_dlg), table); - output_frame = make_output_frame (print_data); + page_frame = make_page_frame (print_data); + gtk_table_attach_defaults (GTK_TABLE (table), output_frame, 0, 2, 0, 1); - - page_frame = make_page_frame (print_data); gtk_table_attach_defaults (GTK_TABLE (table), page_frame, 0, 2, 1, 2); - print_but = gtk_button_new_with_label (_("Print")); - gtk_signal_connect (GTK_OBJECT (print_but), "clicked", - GTK_SIGNAL_FUNC (launch_print_job_cb), - print_data); - gtk_table_attach_defaults (GTK_TABLE (table), - print_but, - 0, 1, 2, 3); - - cancel_but = gtk_button_new_with_label (_("Cancel")); - gtk_signal_connect (GTK_OBJECT (cancel_but), "clicked", - GTK_SIGNAL_FUNC (cancel_print_cb), - NULL); - gtk_table_attach_defaults (GTK_TABLE (table), cancel_but, - 1, 2, 2, 3); + print_dialog_bbox (print_data); - gtk_object_set_data_full (GTK_OBJECT (print_dlg), - "print_data", print_data, g_free); + dialog_window_set_content (print_dialog, table); + dialog_window_add_destroy_callback (print_dialog, + GTK_SIGNAL_FUNC (free_data_on_destroy_cb), + print_data); - return print_dlg; + return print_dialog; } void print_cb (GtkWidget *widget, ViewerData *viewer_data) { - if (viewer_data->fax_file) + DialogWindow *print_dlg; + + if (ensure_commands ()) { - viewer_data->print_dialog = - print_dialog (viewer_data); - - transient_window_show (GTK_WINDOW (viewer_data->print_dialog), - GTK_WINDOW (viewer_data->viewer_window)); + print_dlg = print_dialog (viewer_data); + dialog_window_show (print_dlg, GTK_WINDOW (viewer_data->viewer_window)); + } + else + { + display_failure (viewer_data->viewer_window, + _("This is weird..."), + _("I was not able to determine how to work\n" + "with your printing system appropriately.\n\n" + "Please have your administrator verify if\n" + "a descent printing system is installed.\n" + "If this is so, there must be a bug in\n" + "ghfaxviewer.\n" + "In this case, please fill a bug report\n" + "and send it to halifax-bugs@gnu.org."), + _("I promise!")); } } diff -durpN ghfaxviewer-0.21.1/src/thumbnails.c ghfaxviewer-0.22.0/src/thumbnails.c --- ghfaxviewer-0.21.1/src/thumbnails.c Fri Apr 27 01:54:27 2001 +++ ghfaxviewer-0.22.0/src/thumbnails.c Sun May 6 17:26:25 2001 @@ -42,7 +42,7 @@ struct _DrawReqData { ViewerData *viewer_data; FaxPage *requested_page; - GtkPixmap *pixmap; +/* GtkPixmap *pixmap; */ }; inline static gint @@ -73,15 +73,6 @@ draw_req_page_cb (GtkWidget *widget, Dra return FALSE; } -static gint -destroy_thumb_button_cb (GtkWidget *widget, DrawReqData *draw_req_data) -{ - gtk_pixmap_set (draw_req_data->pixmap, NULL, NULL); - g_free (draw_req_data); - - return FALSE; -} - static void thumbs_fixed_update_size (ViewerData *viewer_data) { @@ -118,16 +109,6 @@ thumbs_fixed_new () return thumbs_fixed; } -GdkPixmap * -thumb_pixmap () -{ - GdkPixmap *pixmap; - - - - return pixmap; -} - GtkWidget * thumb_button (ViewerData *viewer_data, FaxPage *cur_page, gint th_height, gint th_width) @@ -141,7 +122,6 @@ thumb_button (ViewerData *viewer_data, F DrawData *draw_data; gchar *tttext; - gdk_pixmap = pixmap_for_page (viewer_data->viewer_window, th_width, th_height, ROT_NONE, TRUE); @@ -178,10 +158,10 @@ thumb_button (ViewerData *viewer_data, F draw_request = g_malloc (sizeof (DrawReqData)); draw_request->viewer_data = viewer_data; draw_request->requested_page = cur_page; - draw_request->pixmap = GTK_PIXMAP (gtk_pixmap); +/* draw_request->pixmap = GTK_PIXMAP (gtk_pixmap); */ gtk_signal_connect (GTK_OBJECT(button), "destroy", - GTK_SIGNAL_FUNC (destroy_thumb_button_cb), + GTK_SIGNAL_FUNC (free_data_on_destroy_cb), draw_request); gtk_signal_connect (GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC (draw_req_page_cb), diff -durpN ghfaxviewer-0.21.1/src/toolbar.c ghfaxviewer-0.22.0/src/toolbar.c --- ghfaxviewer-0.21.1/src/toolbar.c Fri Apr 27 13:38:05 2001 +++ ghfaxviewer-0.22.0/src/toolbar.c Sun May 6 08:15:14 2001 @@ -45,18 +45,19 @@ #ifdef NEED_GNOMESUPPORT_H static void -remember_widgets (ViewerData *viewer_data, GnomeUIInfo uiinfo[]) +remember_buttons (ViewerData *viewer_data, GnomeUIInfo uiinfo[]) { - viewer_data->bb_buttons[PREV_PAGE] = uiinfo[0].widget; - viewer_data->bb_buttons[NEXT_PAGE] = uiinfo[1].widget; - viewer_data->bb_buttons[ZOOM_IN] = uiinfo[3].widget; - viewer_data->bb_buttons[ZOOM_OUT] = uiinfo[4].widget; + viewer_data->cmd_buttons[VIEW_PREV_PAGE] = uiinfo[0].widget; + viewer_data->cmd_buttons[VIEW_NEXT_PAGE] = uiinfo[1].widget; + viewer_data->cmd_buttons[VIEW_ZOOM_IN] = uiinfo[3].widget; + viewer_data->cmd_buttons[VIEW_ZOOM_OUT] = uiinfo[4].widget; - viewer_data->ut_buttons[LEFT90] = uiinfo[6].widget; - viewer_data->ut_buttons[REVERSE] = uiinfo[7].widget; - viewer_data->ut_buttons[RIGHT90] = uiinfo[8].widget; - viewer_data->ut_buttons[PRINT] = uiinfo[10].widget; - viewer_data->ut_buttons[INFO] = uiinfo[12].widget; + viewer_data->cmd_buttons[VIEW_ROTATE_LEFT90] = uiinfo[6].widget; + viewer_data->cmd_buttons[VIEW_ROTATE_REVERSE] = uiinfo[7].widget; + viewer_data->cmd_buttons[VIEW_ROTATE_RIGHT90] = uiinfo[8].widget; + + viewer_data->cmd_buttons[FILE_PRINT] = uiinfo[10].widget; + viewer_data->cmd_buttons[FILE_PROPERTIES] = uiinfo[12].widget; } void @@ -135,7 +136,7 @@ gnome_toolbar_new (ViewerData *viewer_da gnome_app_set_toolbar (GNOME_APP (viewer_data->viewer_window), GTK_TOOLBAR (toolbar)); - remember_widgets (viewer_data, toolbar_uiinfo); + remember_buttons (viewer_data, toolbar_uiinfo); } #else /* NEED_GNOMESUPPORT_H */ @@ -167,6 +168,10 @@ toolbar_new (ViewerData *viewer_data) /* To give a GNOMEish look to those poor users without GNOME */ bbar_handle_box = gtk_handle_box_new (); + gtk_signal_connect (GTK_OBJECT (bbar_handle_box), "child-detached", + GTK_SIGNAL_FUNC (handle_box_transient_cb), + viewer_data->viewer_window->window); + new_bbar = gtk_toolbar_new (GTK_ORIENTATION_HORIZONTAL, GTK_TOOLBAR_ICONS); gtk_container_add (GTK_CONTAINER (bbar_handle_box), new_bbar); @@ -174,76 +179,76 @@ toolbar_new (ViewerData *viewer_data) gtk_toolbar_set_space_size (GTK_TOOLBAR (new_bbar), 20); - viewer_data->bb_buttons[PREV_PAGE] = + viewer_data->cmd_buttons[VIEW_PREV_PAGE] = toolbar_button_new (viewer_data->viewer_window, PIXMAP ("left_arrow.xpm"), prevpage_cb, viewer_data); gtk_toolbar_append_widget (GTK_TOOLBAR (new_bbar), - viewer_data->bb_buttons[PREV_PAGE], + viewer_data->cmd_buttons[VIEW_PREV_PAGE], _("Go to previous page"), NULL); - viewer_data->bb_buttons[NEXT_PAGE] = + viewer_data->cmd_buttons[VIEW_NEXT_PAGE] = toolbar_button_new (viewer_data->viewer_window, PIXMAP ("right_arrow.xpm"), nextpage_cb, viewer_data); gtk_toolbar_append_widget (GTK_TOOLBAR (new_bbar), - viewer_data->bb_buttons[NEXT_PAGE], + viewer_data->cmd_buttons[VIEW_NEXT_PAGE], _("Go to next page"), NULL); gtk_toolbar_append_space (GTK_TOOLBAR (new_bbar)); - viewer_data->bb_buttons[ZOOM_IN] = + viewer_data->cmd_buttons[VIEW_ZOOM_IN] = toolbar_button_new (viewer_data->viewer_window, PIXMAP ("zoom_in.xpm"), zoomin_cb, viewer_data); gtk_toolbar_append_widget (GTK_TOOLBAR (new_bbar), - viewer_data->bb_buttons[ZOOM_IN], + viewer_data->cmd_buttons[VIEW_ZOOM_IN], _("Zoom in"), NULL); - viewer_data->bb_buttons[ZOOM_OUT] = + viewer_data->cmd_buttons[VIEW_ZOOM_OUT] = toolbar_button_new (viewer_data->viewer_window, PIXMAP ("zoom_out.xpm"), zoomout_cb, viewer_data); gtk_toolbar_append_widget (GTK_TOOLBAR (new_bbar), - viewer_data->bb_buttons[ZOOM_OUT], + viewer_data->cmd_buttons[VIEW_ZOOM_OUT], _("Zoom out"), NULL); gtk_toolbar_append_space (GTK_TOOLBAR (new_bbar)); - viewer_data->ut_buttons[LEFT90] = + viewer_data->cmd_buttons[VIEW_ROTATE_LEFT90] = toolbar_button_new (viewer_data->viewer_window, PIXMAP ("left90.xpm"), left90_cb, viewer_data); gtk_toolbar_append_widget - (GTK_TOOLBAR (new_bbar), viewer_data->ut_buttons[LEFT90], + (GTK_TOOLBAR (new_bbar), viewer_data->cmd_buttons[VIEW_ROTATE_LEFT90], _("Rotate 90 degrees counter-clockwise"), NULL); - viewer_data->ut_buttons[REVERSE] = + viewer_data->cmd_buttons[VIEW_ROTATE_REVERSE] = toolbar_button_new (viewer_data->viewer_window, PIXMAP ("reverse.xpm"), reverse_cb, viewer_data); gtk_toolbar_append_widget - (GTK_TOOLBAR (new_bbar), viewer_data->ut_buttons[REVERSE], + (GTK_TOOLBAR (new_bbar), viewer_data->cmd_buttons[VIEW_ROTATE_REVERSE], _("Reverse image"), NULL); - viewer_data->ut_buttons[RIGHT90] = + viewer_data->cmd_buttons[VIEW_ROTATE_RIGHT90] = toolbar_button_new (viewer_data->viewer_window, PIXMAP ("right90.xpm"), right90_cb, viewer_data); gtk_toolbar_append_widget - (GTK_TOOLBAR (new_bbar), viewer_data->ut_buttons[RIGHT90], + (GTK_TOOLBAR (new_bbar), viewer_data->cmd_buttons[VIEW_ROTATE_RIGHT90], _("Rotate 90 degrees clockwise"), NULL); gtk_toolbar_append_space (GTK_TOOLBAR (new_bbar)); - viewer_data->ut_buttons[PRINT] = + viewer_data->cmd_buttons[FILE_PRINT] = toolbar_button_new (viewer_data->viewer_window, PIXMAP ("printer.xpm"), GTK_SIGNAL_FUNC (print_cb), viewer_data); gtk_toolbar_append_widget - (GTK_TOOLBAR (new_bbar), viewer_data->ut_buttons[PRINT], + (GTK_TOOLBAR (new_bbar), viewer_data->cmd_buttons[FILE_PRINT], _("Print fax"), NULL); gtk_toolbar_append_space (GTK_TOOLBAR (new_bbar)); - viewer_data->ut_buttons[INFO] = + viewer_data->cmd_buttons[FILE_PROPERTIES] = toolbar_button_new (viewer_data->viewer_window, PIXMAP ("info.xpm"), info_cb, viewer_data); gtk_toolbar_append_widget - (GTK_TOOLBAR (new_bbar), viewer_data->ut_buttons[INFO], + (GTK_TOOLBAR (new_bbar), viewer_data->cmd_buttons[FILE_PROPERTIES], _("Properties..."), NULL); return bbar_handle_box; diff -durpN ghfaxviewer-0.21.1/src/viewer.c ghfaxviewer-0.22.0/src/viewer.c --- ghfaxviewer-0.21.1/src/viewer.c Fri Apr 27 03:58:36 2001 +++ ghfaxviewer-0.22.0/src/viewer.c Sun May 6 08:15:14 2001 @@ -228,6 +228,19 @@ page_area_destroy_cb (GtkWidget *widget, #endif /* __WIN32__ */ static void +viewer_set_cmd_widgets_sensitive (ViewerData *viewer_data, gboolean state) +{ + gint wid_count; + + for (wid_count = FIRST_BUTTON; wid_count < NBR_ACTIONS; wid_count++) + gtk_widget_set_sensitive (viewer_data->cmd_buttons [wid_count], + state); + for (wid_count = FIRST_MENU; wid_count < NBR_ACTIONS; wid_count++) + gtk_widget_set_sensitive (viewer_data->cmd_menus [wid_count], + state); +} + +static void viewer_window_unset_file (ViewerData *viewer_data) { GList *fixed_children; @@ -238,21 +251,21 @@ viewer_window_unset_file (ViewerData *vi g_list_foreach (fixed_children, destroy_thumb, viewer_data->thumbs_fixed); + viewer_set_cmd_widgets_sensitive (viewer_data, FALSE); + ti_destroy_fax_file (viewer_data->fax_file); gdk_pixmap_unref (viewer_data->page_pixmap); gdk_window_set_back_pixmap (viewer_data->page_area->window, NULL, FALSE); - gtk_drawing_area_size - (GTK_DRAWING_AREA (viewer_data->page_area), 0, 0); + gtk_widget_hide (viewer_data->page_area); viewer_data->fax_file = NULL; viewer_data->current_page = NULL; - viewer_data->zoom_index = 5; + viewer_data->zoom_index = 4; viewer_data->rotation = ROT_NONE; viewer_data->page_pixmap = NULL; - viewer_data->print_dialog = NULL; } void @@ -260,8 +273,6 @@ fax_viewer_open_file (ViewerData *viewer { FaxFile *fax_file; gchar *title, *app_title; - gint ut_but_cnt, bb_but_cnt; - gboolean set_ut_button_sensitive; app_title = _("GNU HaliFAX - Viewer"); @@ -270,19 +281,13 @@ fax_viewer_open_file (ViewerData *viewer fax_file = ti_open_fax_file (file_name); if (!fax_file) - { - if (viewer_data->fax_file) - set_ut_button_sensitive = TRUE; - else - set_ut_button_sensitive = FALSE; - - file_open_error (viewer_data->viewer_window, - g_basename (file_name)); - } + file_open_error (viewer_data->viewer_window, + g_basename (file_name)); else { if (viewer_data->fax_file) viewer_window_unset_file (viewer_data); + viewer_data->fax_file = fax_file; title = g_strdup_printf ("%s %s (%s)", app_title, @@ -290,10 +295,12 @@ fax_viewer_open_file (ViewerData *viewer gtk_window_set_title (GTK_WINDOW (viewer_data->viewer_window), title); g_free (title); + + viewer_set_cmd_widgets_sensitive (viewer_data, TRUE); + gtk_widget_show (viewer_data->page_area); + add_thumbs (viewer_data); draw_page (viewer_data); - - set_ut_button_sensitive = TRUE; } } else @@ -305,17 +312,7 @@ fax_viewer_open_file (ViewerData *viewer gtk_window_set_title (GTK_WINDOW (viewer_data->viewer_window), title); g_free (title); - - set_ut_button_sensitive = FALSE; - - for (bb_but_cnt = 0; bb_but_cnt < 4; bb_but_cnt++) - gtk_widget_set_sensitive (viewer_data->bb_buttons [bb_but_cnt], - FALSE); } - - for (ut_but_cnt = 0; ut_but_cnt < 5; ut_but_cnt++) - gtk_widget_set_sensitive (viewer_data->ut_buttons [ut_but_cnt], - set_ut_button_sensitive); } static void @@ -380,6 +377,9 @@ viewer_window_realize_cb (GtkWidget *vie gtk_box_pack_start (GTK_BOX (vbox), view_hbox, TRUE, TRUE, 0); #endif + viewer_set_cmd_widgets_sensitive (viewer_data, FALSE); + gtk_widget_hide (viewer_data->page_area); + thumbs_sc_win = gtk_scrolled_window_new (NULL, NULL); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (thumbs_sc_win), @@ -431,10 +431,20 @@ viewer_window_realize_cb (GtkWidget *vie viewer_data); } -static void -viewer_window_show_cb (GtkWidget *viewer_window, gpointer nothing) +static gboolean +viewer_window_cfg_event_cb (GtkWidget *viewer_window, + GdkEventConfigure *event, gpointer nothing) { - vwindow_set_def_coords (viewer_window->window); + /* the signal has to be caught only once */ + gtk_signal_disconnect_by_func (GTK_OBJECT (viewer_window), + GTK_SIGNAL_FUNC (viewer_window_cfg_event_cb), + nothing); + while (gtk_events_pending ()) + gtk_main_iteration (); + + vwindow_set_def_coords (viewer_window->window); + + return FALSE; } static void @@ -452,7 +462,7 @@ viewer_window_new (ViewerData *viewer_da #ifdef CAN_SAVE_CONFIG gtk_signal_connect (GTK_OBJECT (viewer_data->viewer_window), - "delete_event", + "delete-event", GTK_SIGNAL_FUNC (precloseviewer_cb), NULL); #endif @@ -467,10 +477,12 @@ viewer_window_new (ViewerData *viewer_da GTK_SIGNAL_FUNC (viewer_window_realize_cb), viewer_data); - gtk_signal_connect (GTK_OBJECT (viewer_data->viewer_window), - "show", - GTK_SIGNAL_FUNC (viewer_window_show_cb), - NULL); + /* This signal is handled only once, to resize and reposition the + window according to our settings. */ + gtk_signal_connect_after (GTK_OBJECT (viewer_data->viewer_window), + "configure-event", + GTK_SIGNAL_FUNC (viewer_window_cfg_event_cb), + NULL); viewer_data->page_area = gtk_drawing_area_new (); gtk_signal_connect (GTK_OBJECT (viewer_data->page_area), @@ -494,7 +506,6 @@ fax_viewer_new () new_viewer->current_page = NULL; new_viewer->page_area = NULL; new_viewer->page_pixmap = NULL; - new_viewer->print_dialog = NULL; new_viewer->zoom_index = 4; new_viewer->rotation = ROT_NONE; new_viewer->motion_data = g_malloc (sizeof (MotionData)); diff -durpN ghfaxviewer-0.21.1/src/viewer.h ghfaxviewer-0.22.0/src/viewer.h --- ghfaxviewer-0.21.1/src/viewer.h Fri Apr 27 13:38:41 2001 +++ ghfaxviewer-0.22.0/src/viewer.h Sun May 6 08:15:14 2001 @@ -29,6 +29,24 @@ typedef struct _ViewerData ViewerData; typedef struct _MotionData MotionData; +typedef enum +{ + FILE_CLOSE, + FILE_PRINT, + FILE_PROPERTIES, + VIEW_NEXT_PAGE, + VIEW_PREV_PAGE, + VIEW_ZOOM_IN, + VIEW_ZOOM_OUT, + VIEW_ROTATE_RIGHT90, + VIEW_ROTATE_REVERSE, + VIEW_ROTATE_LEFT90, + NBR_ACTIONS +} ActionIndex; + +#define FIRST_BUTTON 1 +#define FIRST_MENU 0 + struct _ViewerData { FaxFile *fax_file; @@ -39,17 +57,14 @@ struct _ViewerData GtkWidget *viewer_window; GtkWidget *page_area; int rotation; - - /* button bar */ - GtkWidget *bb_buttons[4]; - GtkWidget *ut_buttons[5]; - /* print dialog */ - GtkWidget *zoom_entry; - - /* print dialog */ - GtkWidget *print_dialog; + /* File selection dialog */ + GtkWidget *file_dlg; + /* action (command) widgets */ + GtkWidget *cmd_buttons[NBR_ACTIONS]; + GtkWidget *cmd_menus[NBR_ACTIONS]; + /* thumbnails */ GtkWidget *thumbs_fixed; GtkWidget **th_buttons; @@ -64,23 +79,6 @@ struct _MotionData guint orig_x, orig_y; gfloat orig_adj_x, orig_adj_y; }; - -typedef enum -{ - NEXT_PAGE, - PREV_PAGE, - ZOOM_IN, - ZOOM_OUT -} VariableButtonIndex; - -typedef enum -{ - RIGHT90, - LEFT90, - REVERSE, - PRINT, - INFO, -} FixedButtonIndex; GdkPixmap *pixmap_for_page (GtkWidget *ref_widget, gint ref_width, gint ref_height, diff -durpN ghfaxviewer-0.21.1/src/winprint.c ghfaxviewer-0.22.0/src/winprint.c --- ghfaxviewer-0.21.1/src/winprint.c Sun Apr 15 00:04:52 2001 +++ ghfaxviewer-0.22.0/src/winprint.c Sun May 6 08:15:14 2001 @@ -197,30 +197,27 @@ void print_cb (void *ignored, ViewerData int result; PRINTDLG *fax_pdlg; - if (viewer_data->fax_file) - { - fax_pdlg = g_malloc0 (sizeof (PRINTDLG)); - - fax_pdlg->hwndOwner = NULL; - fax_pdlg->hDevNames = NULL; - fax_pdlg->Flags = PD_RETURNDC | PD_PAGENUMS | PD_NOSELECTION; - fax_pdlg->nMinPage = 1; - fax_pdlg->nMaxPage = viewer_data->fax_file->nbr_pages + 1; - fax_pdlg->nFromPage = 1; - fax_pdlg->nToPage = viewer_data->fax_file->nbr_pages + 1; - fax_pdlg->nCopies = 1; - fax_pdlg->lStructSize = sizeof (PRINTDLG); - - result = PrintDlg (fax_pdlg); - - if (result) - { - SetAbortProc (fax_pdlg->hDC, abort_proc); - windows_print (viewer_data, fax_pdlg); - } + fax_pdlg = g_malloc0 (sizeof (PRINTDLG)); - DeleteDC(fax_pdlg->hDC); - g_free (fax_pdlg); + fax_pdlg->hwndOwner = NULL; + fax_pdlg->hDevNames = NULL; + fax_pdlg->Flags = PD_RETURNDC | PD_PAGENUMS | PD_NOSELECTION; + fax_pdlg->nMinPage = 1; + fax_pdlg->nMaxPage = viewer_data->fax_file->nbr_pages + 1; + fax_pdlg->nFromPage = 1; + fax_pdlg->nToPage = viewer_data->fax_file->nbr_pages + 1; + fax_pdlg->nCopies = 1; + fax_pdlg->lStructSize = sizeof (PRINTDLG); + + result = PrintDlg (fax_pdlg); + + if (result) + { + SetAbortProc (fax_pdlg->hDC, abort_proc); + windows_print (viewer_data, fax_pdlg); } + + DeleteDC(fax_pdlg->hDC); + g_free (fax_pdlg); } diff -durpN ghfaxviewer-0.21.1/src/zoom.c ghfaxviewer-0.22.0/src/zoom.c --- ghfaxviewer-0.21.1/src/zoom.c Sun Apr 15 00:07:47 2001 +++ ghfaxviewer-0.22.0/src/zoom.c Tue May 8 02:13:12 2001 @@ -266,7 +266,7 @@ process_ir_zoom (guchar *ir, ir_data_t * offset = (gint) ir - (gint) ir_data->orig_page->image; line = offset / ir_data->orig_page->cwidth; base_column = (offset % ir_data->orig_page->cwidth) * 8; - dest_line = dest_coord (line, ir_data->fact_x); + dest_line = dest_coord (line, ir_data->fact_y); real_offset = 0; bit_offset = 0; @@ -302,13 +302,14 @@ static void put_pixel_rot_none_unzoom (ir_data_t *ir_data, gint column, gint line, gint intensity) { - gint cwidth; + gint cwidth, y_pix_count; gchar *line_coord; cwidth = ir_data->new_page->cwidth; line_coord = ir_data->new_page->image + line * cwidth; - set_pixel (line_coord, column, intensity); + for (y_pix_count = 0; y_pix_count < ir_data->y_pix_size; y_pix_count++) + set_pixel (line_coord + y_pix_count * cwidth, column, intensity); } static void @@ -327,14 +328,15 @@ static void put_pixel_rot_right90_unzoom (ir_data_t *ir_data, gint column, gint line, gint intensity) { - gint tr_line; + gint tr_line, y_pix_count; gchar *line_coord; line_coord = ir_data->new_page->image + column * ir_data->new_page->height; tr_line = ir_data->new_page->height - 1 - line; - set_pixel (line_coord, tr_line, intensity); + for (y_pix_count = 0; y_pix_count < ir_data->y_pix_size; y_pix_count++) + set_pixel (line_coord, tr_line - y_pix_count, intensity); } static void @@ -371,8 +373,8 @@ process_ir_unzoom (guchar *ir, ir_data_t We assume that each index record only covers pixels of the same line, but of course this may not be true. */ line = offset / ir_data->orig_page->cwidth; - dest_line = line * ir_data->fact_y; - +/* dest_line = line * ir_data->fact_y; */ + dest_line = dest_coord (line, ir_data->fact_y); bit_offset = 0; byte_ptr = ir; dest_pix_size = unfloat (ir_data->x_rel_step); @@ -488,6 +490,7 @@ ti_zoomed_fax_page (FaxPage *orig_page, { ir_data->max_intensity = 255 / ir_data->y_rel_step; ir_data->put_pixel = choose_pixel_func (rotation, TRUE); + ir_data->y_pix_size = unfloat (ir_data->fact_y); g_slist_foreach (orig_page->image_index->next, (GFunc) process_ir_unzoom, ir_data);