From 8785eaaedc75af46cbc10c463c4a733e4db6d22d Mon Sep 17 00:00:00 2001 From: Manish Singh Date: Mon, 4 May 1998 11:16:19 +0000 Subject: [PATCH] define and export version number parts. Check for gtk 1.0.1 * configure.in: define and export version number parts. Check for gtk 1.0.1 * gimptool.in: do some arg check for --build * app/fileops.c: handle file overwrite dialog too -Yosh --- ChangeLog | 9 +++++++++ acconfig.h | 3 +++ app/fileops.c | 4 ++++ config.h.in | 3 +++ configure.in | 9 ++++++++- gimptool-1.2.in | 24 +++++++++++++++++++++--- gimptool.in | 24 +++++++++++++++++++++--- 7 files changed, 69 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index fb002ef563..f3ac9b839f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +Mon May 4 04:12:54 PDT 1998 Manish Singh + + * configure.in: define and export version number parts. Check for + gtk 1.0.1 + + * gimptool.in: do some arg check for --build + + * app/fileops.c: handle file overwrite dialog too + Sun May 3 22:10:05 EDT 1998 Matthew Wilson * app/fileops.c: make fileselectors insensitive during diff --git a/acconfig.h b/acconfig.h index efd031acf9..d4a7c7c27e 100644 --- a/acconfig.h +++ b/acconfig.h @@ -14,6 +14,9 @@ Leave the following blank line there!! Autoheader needs it. */ +#undef GIMP_MAJOR_VERSION +#undef GIMP_MINOR_VERSION +#undef GIMP_MICRO_VERSION #undef GIMP_VERSION #undef HAVE_DIRENT_H diff --git a/app/fileops.c b/app/fileops.c index 16259e3797..2565cdfbcf 100644 --- a/app/fileops.c +++ b/app/fileops.c @@ -1019,6 +1019,8 @@ file_overwrite_yes_callback (GtkWidget *w, g_free (overwrite_box->full_filename); g_free (overwrite_box->raw_filename); g_free (overwrite_box); + + gtk_widget_set_sensitive (GTK_WIDGET(filesave), TRUE); } static gint @@ -1043,6 +1045,8 @@ file_overwrite_no_callback (GtkWidget *w, g_free (overwrite_box->full_filename); g_free (overwrite_box->raw_filename); g_free (overwrite_box); + + gtk_widget_set_sensitive (GTK_WIDGET(filesave), TRUE); } static PlugInProcDef* diff --git a/config.h.in b/config.h.in index 600fdee8c1..38ca5d1967 100644 --- a/config.h.in +++ b/config.h.in @@ -46,6 +46,9 @@ /* Define if you can safely include both and . */ #undef TIME_WITH_SYS_TIME +#undef GIMP_MAJOR_VERSION +#undef GIMP_MINOR_VERSION +#undef GIMP_MICRO_VERSION #undef GIMP_VERSION #undef HAVE_DIRENT_H diff --git a/configure.in b/configure.in index 52f6975346..0ec1cd0f5d 100644 --- a/configure.in +++ b/configure.in @@ -44,7 +44,7 @@ fi) AC_DEFUN(AC_GIMP_CHECK, [ - AM_PATH_GTK(1.0.0,, + AM_PATH_GTK(1.0.1,, AC_MSG_ERROR(Test for GTK failed. See the file 'INSTALL' for help.)) X_LIBS=$GTK_LIBS X_CFLAGS=$GTK_CFLAGS @@ -382,9 +382,16 @@ if test $ac_cv_path_LPC_COMMAND != ":"; then LPC_DEF="-DLPC_COMMAND=\\\"$ac_cv_path_LPC_COMMAND\\\"" fi +AC_DEFINE_UNQUOTED(GIMP_MAJOR_VERSION, $GIMP_MAJOR_VERSION) +AC_DEFINE_UNQUOTED(GIMP_MINOR_VERSION, $GIMP_MINOR_VERSION) +AC_DEFINE_UNQUOTED(GIMP_MICRO_VERSION, $GIMP_MICRO_VERSION) AC_DEFINE_UNQUOTED(GIMP_VERSION, "$GIMP_VERSION") +AC_SUBST(GIMP_MAJOR_VERSION) +AC_SUBST(GIMP_MINOR_VERSION) +AC_SUBST(GIMP_MICRO_VERSION) AC_SUBST(GIMP_VERSION) + AC_SUBST(gimpdir) AC_SUBST(gimpdatadir) AC_SUBST(gimpplugindir) diff --git a/gimptool-1.2.in b/gimptool-1.2.in index 3311d00ea5..9f6c888f45 100644 --- a/gimptool-1.2.in +++ b/gimptool-1.2.in @@ -7,6 +7,12 @@ exec_prefix_set=no usage="\ Usage: gimptool [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--libs] [--cflags] [--build plug-in.c]" +noarg="\ +Error: --build needs a filename to work with" + +notfound="\ +Error: Couldn't find source file to build" + if test $# -eq 0; then echo "${usage}" 1>&2 exit 1 @@ -70,9 +76,21 @@ while test $# -gt 0; do includes=-I@includedir@ fi shift - cmd="$cc $cflags $includes `gtk-config --cflags` -o `echo $1|sed 's/\.[^\.]*$//'` $1 -L@libdir@ -lgimpui -lgimp `$gtk_config --libs`" - echo $cmd - eval $cmd + if test "x$1" != "x"; then + if test -e "$1"; then + cmd="$cc $cflags $includes `gtk-config --cflags` -o `echo $1|sed 's/\.[^\.]*$//'` $1 -L@libdir@ -lgimpui -lgimp `$gtk_config --libs`" + echo $cmd + eval $cmd + else + echo "${notfound}" 1>&2 + echo "${usage}" 1>&2 + exit 1 + fi + else + echo "${noarg}" 1>&2 + echo "${usage}" 1>&2 + exit 1 + fi ;; *) echo "${usage}" 1>&2 diff --git a/gimptool.in b/gimptool.in index 3311d00ea5..9f6c888f45 100644 --- a/gimptool.in +++ b/gimptool.in @@ -7,6 +7,12 @@ exec_prefix_set=no usage="\ Usage: gimptool [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--libs] [--cflags] [--build plug-in.c]" +noarg="\ +Error: --build needs a filename to work with" + +notfound="\ +Error: Couldn't find source file to build" + if test $# -eq 0; then echo "${usage}" 1>&2 exit 1 @@ -70,9 +76,21 @@ while test $# -gt 0; do includes=-I@includedir@ fi shift - cmd="$cc $cflags $includes `gtk-config --cflags` -o `echo $1|sed 's/\.[^\.]*$//'` $1 -L@libdir@ -lgimpui -lgimp `$gtk_config --libs`" - echo $cmd - eval $cmd + if test "x$1" != "x"; then + if test -e "$1"; then + cmd="$cc $cflags $includes `gtk-config --cflags` -o `echo $1|sed 's/\.[^\.]*$//'` $1 -L@libdir@ -lgimpui -lgimp `$gtk_config --libs`" + echo $cmd + eval $cmd + else + echo "${notfound}" 1>&2 + echo "${usage}" 1>&2 + exit 1 + fi + else + echo "${noarg}" 1>&2 + echo "${usage}" 1>&2 + exit 1 + fi ;; *) echo "${usage}" 1>&2