Commit 6239dddd authored by Kevin Cozens's avatar Kevin Cozens Committed by Kevin Cozens

With this commit we finally say goodbye to SIOD. This large set of changes

2006-10-15  Kevin Cozens  <kcozens@cvs.gnome.org>

	With this commit we finally say goodbye to SIOD. This large set of
	changes updates the Script-Fu plug-in to use the TinyScheme Scheme
	interpreter. These changes originated with changes originally made
	to Script-Fu which created Tiny-Fu (aka. the gimp-tiny-fu module).

	* plug-ins/script-fu/Makefile.am
	* plug-ins/script-fu/script-fu-console.c
	* plug-ins/script-fu/script-fu-interface.c
	* plug-ins/script-fu/script-fu-scripts.c
	* plug-ins/script-fu/script-fu-scripts.h
	* plug-ins/script-fu/script-fu-server.c
	* plug-ins/script-fu/script-fu-text-console.c
	* plug-ins/script-fu/script-fu.c: Updated with the changes made to
	these files as part of the work on the Tiny-Fu project.

	* plug-ins/script-fu/scheme-wrapper.c
	* plug-ins/script-fu/scheme-wrapper.h: Renamed from siod-wrapper.[ch]
	and updated based on differences to ts-wrapper.[ch] from gimp-tiny-fu.

	* plug-ins/script-fu/ftx/*
	* plug-ins/script-fu/re/*
	* plug-ins/script-fu/tinyscheme/*
	* plug-ins/script-fu/scripts/script-fu.init
	* plug-ins/script-fu/scripts/script-fu-compat.init
	* plug-ins/script-fu/scripts/contactsheet.scm
	* plug-ins/script-fu/scripts/script-fu-set-cmap.scm
	* plug-ins/script-fu/scripts/script-fu-util-setpt.scm
	* plug-ins/script-fu/scripts/ts-helloworld.scm: Added all of these
	files and directories from Tiny-Fu. Updated the Makefile.am files
	of ftx, re, and tinyscheme now they are in the GIMP source tree.

	* plug-ins/script-fu/scripts/*.scm: All scripts have been updated as
	needed to ensure they will work with the TinyScheme interpreter. Most
	of the files have been reformatted making it easier to see the syntax
	of Scheme and making them easier to read.

	* plug-ins/script-fu/scripts/Makefile.am: Updated script file lists.

	* plug-ins/script-fu/siod-wrapper.c
	* plug-ins/script-fu/siod-wrapper.h
	* plug-ins/script-fu/siod/*: Removed obsolete files.

	* configure.in: Updated list of files in AC_CONFIG_FILES. Changed
	--disable-script-fu to --without-script-fu which it should have
	been when originally added.

	* INSTALL: Updated to show change to --without-script-fu.
parent 9314c3ea
2006-10-15 Kevin Cozens <kcozens@cvs.gnome.org>
With this commit we finally say goodbye to SIOD. This large set of
changes updates the Script-Fu plug-in to use the TinyScheme Scheme
interpreter. These changes originated with changes originally made
to Script-Fu which created Tiny-Fu (aka. the gimp-tiny-fu module).
* plug-ins/script-fu/Makefile.am
* plug-ins/script-fu/script-fu-console.c
* plug-ins/script-fu/script-fu-interface.c
* plug-ins/script-fu/script-fu-scripts.c
* plug-ins/script-fu/script-fu-scripts.h
* plug-ins/script-fu/script-fu-server.c
* plug-ins/script-fu/script-fu-text-console.c
* plug-ins/script-fu/script-fu.c: Updated with the changes made to
these files as part of the work on the Tiny-Fu project.
* plug-ins/script-fu/scheme-wrapper.c
* plug-ins/script-fu/scheme-wrapper.h: Renamed from siod-wrapper.[ch]
and updated based on differences to ts-wrapper.[ch] from gimp-tiny-fu.
* plug-ins/script-fu/ftx/*
* plug-ins/script-fu/re/*
* plug-ins/script-fu/tinyscheme/*
* plug-ins/script-fu/scripts/script-fu.init
* plug-ins/script-fu/scripts/script-fu-compat.init
* plug-ins/script-fu/scripts/contactsheet.scm
* plug-ins/script-fu/scripts/script-fu-set-cmap.scm
* plug-ins/script-fu/scripts/script-fu-util-setpt.scm
* plug-ins/script-fu/scripts/ts-helloworld.scm: Added all of these
files and directories from Tiny-Fu. Updated the Makefile.am files
of ftx, re, and tinyscheme now they are in the GIMP source tree.
* plug-ins/script-fu/scripts/*.scm: All scripts have been updated as
needed to ensure they will work with the TinyScheme interpreter. Most
of the files have been reformatted making it easier to see the syntax
of Scheme and making them easier to read.
* plug-ins/script-fu/scripts/Makefile.am: Updated script file lists.
* plug-ins/script-fu/siod-wrapper.c
* plug-ins/script-fu/siod-wrapper.h
* plug-ins/script-fu/siod/*: Removed obsolete files.
* configure.in: Updated list of files in AC_CONFIG_FILES. Changed
--disable-script-fu to --without-script-fu which it should have
been when originally added.
* INSTALL: Updated to show change to --without-script-fu.
2006-10-15 Michael Natterer <mitch@gimp.org> 2006-10-15 Michael Natterer <mitch@gimp.org>
* app/file/file-utils.c (file_utils_filename_to_uri): if the * app/file/file-utils.c (file_utils_filename_to_uri): if the
......
...@@ -197,8 +197,8 @@ These are: ...@@ -197,8 +197,8 @@ These are:
--disable-python. If for some reason you don't want to build the --disable-python. If for some reason you don't want to build the
Python based pygimp plug-in, you can use --disable-python. Python based pygimp plug-in, you can use --disable-python.
--disable-script-fu. If for some reason you don't want to build the --without-script-fu. If for some reason you don't want to build the
Script-Fu plug-in, you can use --disable-script-fu. Script-Fu plug-in, you can use --without-script-fu.
The `make' command builds several things: The `make' command builds several things:
- A bunch of public libraries in the directories starting with 'libgimp'. - A bunch of public libraries in the directories starting with 'libgimp'.
......
...@@ -1479,16 +1479,17 @@ AM_CONDITIONAL(BUILD_PYTHON, test "x$enable_python" != xno) ...@@ -1479,16 +1479,17 @@ AM_CONDITIONAL(BUILD_PYTHON, test "x$enable_python" != xno)
# Check whether script_fu should be built # Check whether script_fu should be built
######################################### #########################################
AC_ARG_ENABLE(script-fu, have_script_fu=yes
AC_HELP_STRING([--disable-script-fu], AC_ARG_WITH(script-fu,
AC_HELP_STRING([--without-script-fu],
[do not build the script-fu extension])) [do not build the script-fu extension]))
if test "x$enable_script_fu" != "xno"; then if test "x$have_script_fu" = "xyes"; then
enable_script_fu="yes" have_script_fu="yes"
else else
enable_script_fu="no (script-fu extension disabled)" have_script_fu="no (script-fu extension disabled)"
fi fi
AM_CONDITIONAL(BUILD_SCRIPT_FU, test "x$enable_script_fu" == "xyes") AM_CONDITIONAL(BUILD_SCRIPT_FU, test "x$have_script_fu" == "xyes")
########################################################### ###########################################################
...@@ -1737,7 +1738,9 @@ app/widgets/Makefile ...@@ -1737,7 +1738,9 @@ app/widgets/Makefile
app/xcf/Makefile app/xcf/Makefile
plug-ins/Makefile plug-ins/Makefile
plug-ins/script-fu/Makefile plug-ins/script-fu/Makefile
plug-ins/script-fu/siod/Makefile plug-ins/script-fu/ftx/Makefile
plug-ins/script-fu/re/Makefile
plug-ins/script-fu/tinyscheme/Makefile
plug-ins/script-fu/scripts/Makefile plug-ins/script-fu/scripts/Makefile
plug-ins/script-fu/scripts/images/Makefile plug-ins/script-fu/scripts/images/Makefile
plug-ins/xjt/Makefile plug-ins/xjt/Makefile
...@@ -1878,7 +1881,8 @@ Optional Plug-Ins: ...@@ -1878,7 +1881,8 @@ Optional Plug-Ins:
PNG: $have_libpng PNG: $have_libpng
Print: $enable_print Print: $enable_print
PSP: $have_zlib PSP: $have_zlib
Script-Fu: $enable_script_fu Python: $enable_python
Script-Fu: $have_script_fu
SVG: $have_librsvg SVG: $have_librsvg
TIFF: $have_libtiff TIFF: $have_libtiff
TWAIN (MacOS X): $mac_twain_ok TWAIN (MacOS X): $mac_twain_ok
......
...@@ -8,14 +8,27 @@ libgimpbase = $(top_builddir)/libgimpbase/libgimpbase-$(GIMP_API_VERSION).la ...@@ -8,14 +8,27 @@ libgimpbase = $(top_builddir)/libgimpbase/libgimpbase-$(GIMP_API_VERSION).la
libgimpconfig = $(top_builddir)/libgimpconfig/libgimpconfig-$(GIMP_API_VERSION).la libgimpconfig = $(top_builddir)/libgimpconfig/libgimpconfig-$(GIMP_API_VERSION).la
libgimpmath = $(top_builddir)/libgimpmath/libgimpmath-$(GIMP_API_VERSION).la libgimpmath = $(top_builddir)/libgimpmath/libgimpmath-$(GIMP_API_VERSION).la
libtinyscheme=tinyscheme/libtinyscheme.a
libftx=ftx/libftx.a
libre=re/libre.a
if OS_WIN32 if OS_WIN32
mwindows = -mwindows mwindows = -mwindows
WINSOCK_LIBS = -lws2_32 WINSOCK_LIBS = -lws2_32
endif endif
AM_CFLAGS = \
-DUSE_INTERFACE=1 \
-DUSE_STRCASECMP=1 \
-DUSE_STRLWR=1 \
-I$(top_srcdir) \
$(GTK_CFLAGS) \
-I$(includedir)
AM_LDFLAGS = $(mwindows) AM_LDFLAGS = $(mwindows)
SUBDIRS = siod scripts SUBDIRS = tinyscheme ftx re scripts
libexecdir = $(gimpplugindir)/plug-ins libexecdir = $(gimpplugindir)/plug-ins
...@@ -36,13 +49,8 @@ script_fu_SOURCES = \ ...@@ -36,13 +49,8 @@ script_fu_SOURCES = \
script-fu-server.h \ script-fu-server.h \
script-fu-types.h \ script-fu-types.h \
script-fu-enums.h \ script-fu-enums.h \
siod-wrapper.c \ scheme-wrapper.c \
siod-wrapper.h scheme-wrapper.h
INCLUDES = \
-I$(top_srcdir) \
$(GTK_CFLAGS) \
-I$(includedir)
if HAVE_GLIBC_REGEX if HAVE_GLIBC_REGEX
REGEXREPL = REGEXREPL =
...@@ -58,7 +66,9 @@ LDADD = \ ...@@ -58,7 +66,9 @@ LDADD = \
$(libgimp) \ $(libgimp) \
$(libgimpcolor) \ $(libgimpcolor) \
$(libgimpbase) \ $(libgimpbase) \
siod/libsiod.a \ $(libtinyscheme) \
$(libftx) \
$(libre) \
$(REGEXREPL) \ $(REGEXREPL) \
$(GTK_LIBS) \ $(GTK_LIBS) \
$(SOCKET_LIBS) \ $(SOCKET_LIBS) \
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
AM_CFLAGS = \ AM_CFLAGS = \
-DUSE_INTERFACE=1 \ -DUSE_INTERFACE=1 \
-I$(top_srcdir) \ -I.. \
$(GIMP_CFLAGS) $(GLIB_CFLAGS)
noinst_LIBRARIES = libftx.a noinst_LIBRARIES = libftx.a
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
AM_CFLAGS = \ AM_CFLAGS = \
-DUSE_INTERFACE=1 \ -DUSE_INTERFACE=1 \
-I$(top_srcdir) \ -I.. \
$(GIMP_CFLAGS) $(GLIB_CFLAGS)
noinst_LIBRARIES = libre.a noinst_LIBRARIES = libre.a
......
This diff is collapsed.
...@@ -16,31 +16,29 @@ ...@@ -16,31 +16,29 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/ */
#ifndef SIOD_WRAPPER_H #ifndef SCHEME_WRAPPER_H
#define SIOD_WRAPPER_H #define SCHEME_WRAPPER_H
FILE * ts_get_output_file (void);
void ts_set_output_file (FILE *file);
void siod_init (gboolean register_scripts); void ts_set_console_mode (int flag);
FILE * siod_get_output_file (void); gint ts_get_verbose_level (void);
void siod_set_output_file (FILE *file); void ts_set_verbose_level (gint);
void siod_set_console_mode (int flag); void ts_set_print_flag (gint);
void ts_print_welcome (void);
gint siod_get_verbose_level (void); const gchar * ts_get_error_msg (void);
void siod_set_verbose_level (gint verbose_level); const gchar * ts_get_success_msg (void);
void siod_print_welcome (void); void tinyscheme_init (gboolean);
void tinyscheme_deinit (void);
const gchar * siod_get_error_msg (void); void ts_output_string (FILE *fp, char *string, int len);
const gchar * siod_get_success_msg (void);
void siod_output_string (FILE *fp,
const gchar *format,
...) G_GNUC_PRINTF (2, 3);
/* if the return value is 0, success. error otherwise. */ /* if the return value is 0, success. error otherwise. */
gint siod_interpret_string (const gchar *expr); gint ts_interpret_string (const gchar *);
#endif /* SIOD_WRAPPER_H */ #endif /* SCHEME_WRAPPER_H */
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
#include "config.h" #include "config.h"
#include <errno.h>
#include <gdk/gdkkeysyms.h> #include <gdk/gdkkeysyms.h>
#include "libgimp/gimp.h" #include "libgimp/gimp.h"
...@@ -25,7 +26,8 @@ ...@@ -25,7 +26,8 @@
#include "script-fu-intl.h" #include "script-fu-intl.h"
#include "siod-wrapper.h" #include "tinyscheme/scheme.h"
#include "scheme-wrapper.h"
#include "script-fu-console.h" #include "script-fu-console.h"
...@@ -54,6 +56,10 @@ typedef struct ...@@ -54,6 +56,10 @@ typedef struct
} ConsoleInterface; } ConsoleInterface;
enum TF_RESPONSES {
RESPONSE_CLEAR, RESPONSE_SAVE
};
/* /*
* Local Functions * Local Functions
*/ */
...@@ -61,6 +67,10 @@ static void script_fu_console_interface (void); ...@@ -61,6 +67,10 @@ static void script_fu_console_interface (void);
static void script_fu_response (GtkWidget *widget, static void script_fu_response (GtkWidget *widget,
gint response_id, gint response_id,
ConsoleInterface *console); ConsoleInterface *console);
static void script_fu_save_dialog (GtkWidget *parent);
static void script_fu_save_output (GtkWidget *dialog,
gint response_id,
gpointer data);
static void script_fu_browse_callback (GtkWidget *widget, static void script_fu_browse_callback (GtkWidget *widget,
ConsoleInterface *console); ConsoleInterface *console);
static void script_fu_browse_response (GtkWidget *widget, static void script_fu_browse_response (GtkWidget *widget,
...@@ -72,8 +82,8 @@ static gboolean script_fu_cc_key_function (GtkWidget *widget, ...@@ -72,8 +82,8 @@ static gboolean script_fu_cc_key_function (GtkWidget *widget,
GdkEventKey *event, GdkEventKey *event,
ConsoleInterface *console); ConsoleInterface *console);
static void script_fu_open_siod_console (void); static void script_fu_open_ts_console (void);
static void script_fu_close_siod_console (void); static void script_fu_close_ts_console (void);
/* /*
...@@ -102,18 +112,18 @@ static ConsoleInterface cint = ...@@ -102,18 +112,18 @@ static ConsoleInterface cint =
void void
script_fu_console_run (const gchar *name, script_fu_console_run (const gchar *name,
gint nparams, gint nparams,
const GimpParam *params, const GimpParam *params,
gint *nreturn_vals, gint *nreturn_vals,
GimpParam **return_vals) GimpParam **return_vals)
{ {
static GimpParam values[1]; static GimpParam values[1];
script_fu_open_siod_console (); script_fu_open_ts_console ();
script_fu_console_interface (); script_fu_console_interface ();
script_fu_close_siod_console (); script_fu_close_ts_console ();
*nreturn_vals = 1; *nreturn_vals = 1;
*return_vals = values; *return_vals = values;
...@@ -146,29 +156,31 @@ script_fu_console_interface (void) ...@@ -146,29 +156,31 @@ script_fu_console_interface (void)
NULL, 0, NULL, 0,
gimp_standard_help_func, PROC_NAME, gimp_standard_help_func, PROC_NAME,
_("_Save Output"), RESPONSE_SAVE,
_("Cl_ear Output"), RESPONSE_CLEAR,
GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE, GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE,
NULL); NULL);
g_signal_connect (console->dialog, "response", g_signal_connect (console->dialog, "response",
G_CALLBACK (script_fu_response), G_CALLBACK (script_fu_response),
console); console);
g_signal_connect (console->dialog, "destroy", g_signal_connect (console->dialog, "destroy",
G_CALLBACK (gtk_widget_destroyed), G_CALLBACK (gtk_widget_destroyed),
&console->dialog); &console->dialog);
/* The main vbox */ /* The main vbox */
vbox = gtk_vbox_new (FALSE, 12); vbox = gtk_vbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 12); gtk_container_set_border_width (GTK_CONTAINER (vbox), 12);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (console->dialog)->vbox), vbox, gtk_box_pack_start (GTK_BOX (GTK_DIALOG (console->dialog)->vbox), vbox,
TRUE, TRUE, 0); TRUE, TRUE, 0);
gtk_widget_show (vbox); gtk_widget_show (vbox);
/* The output text widget */ /* The output text widget */
scrolled_window = gtk_scrolled_window_new (NULL, NULL); scrolled_window = gtk_scrolled_window_new (NULL, NULL);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_window), gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_window),
GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC,
GTK_POLICY_ALWAYS); GTK_POLICY_ALWAYS);
gtk_box_pack_start (GTK_BOX (vbox), scrolled_window, TRUE, TRUE, 0); gtk_box_pack_start (GTK_BOX (vbox), scrolled_window, TRUE, TRUE, 0);
gtk_widget_show (scrolled_window); gtk_widget_show (scrolled_window);
...@@ -184,25 +196,24 @@ script_fu_console_interface (void) ...@@ -184,25 +196,24 @@ script_fu_console_interface (void)
gtk_widget_show (console->text_view); gtk_widget_show (console->text_view);
gtk_text_buffer_create_tag (console->console, "strong", gtk_text_buffer_create_tag (console->console, "strong",
"weight", PANGO_WEIGHT_BOLD, "weight", PANGO_WEIGHT_BOLD,
"size", 12 * PANGO_SCALE, "size", 12 * PANGO_SCALE,
NULL); NULL);
gtk_text_buffer_create_tag (console->console, "emphasis", gtk_text_buffer_create_tag (console->console, "emphasis",
"style", PANGO_STYLE_OBLIQUE, "style", PANGO_STYLE_OBLIQUE,
"size", 10 * PANGO_SCALE, "size", 10 * PANGO_SCALE,
NULL); NULL);
gtk_text_buffer_create_tag (console->console, "weak", gtk_text_buffer_create_tag (console->console, "weak",
"size", 10 * PANGO_SCALE, "size", 10 * PANGO_SCALE,
NULL); NULL);
{ {
const gchar *greeting_texts[] = const gchar *greeting_texts[] =
{ {
"weak", "\n", "strong", _("Welcome to TinyScheme\n"),
"strong", "Welcome to SIOD, Scheme In One Defun\n", "weak", _("Copyright (c) Dimitrios Souflis\n\n"),
"weak", "(C) Copyright 1988-1994 Paradigm Associates Inc.\n\n", "strong", _("Script-Fu Console - "),
"strong", "Script-Fu Console - ", "emphasis", _("Interactive Scheme Development"),
"emphasis", "Interactive Scheme Development\n",
NULL NULL
}; };
...@@ -213,10 +224,10 @@ script_fu_console_interface (void) ...@@ -213,10 +224,10 @@ script_fu_console_interface (void)
for (i = 0; greeting_texts[i]; i += 2) for (i = 0; greeting_texts[i]; i += 2)
{ {
gtk_text_buffer_insert_with_tags_by_name (console->console, &cursor, gtk_text_buffer_insert_with_tags_by_name (console->console, &cursor,
greeting_texts[i + 1], -1, greeting_texts[i + 1], -1,
greeting_texts[i], greeting_texts[i],
NULL); NULL);
} }
} }
...@@ -231,8 +242,8 @@ script_fu_console_interface (void) ...@@ -231,8 +242,8 @@ script_fu_console_interface (void)
gtk_widget_show (console->cc); gtk_widget_show (console->cc);
g_signal_connect (console->cc, "key-press-event", g_signal_connect (console->cc, "key-press-event",
G_CALLBACK (script_fu_cc_key_function), G_CALLBACK (script_fu_cc_key_function),
console); console);
button = gtk_button_new_with_mnemonic (_("_Browse...")); button = gtk_button_new_with_mnemonic (_("_Browse..."));
gtk_misc_set_padding (GTK_MISC (GTK_BIN (button)->child), 2, 0); gtk_misc_set_padding (GTK_MISC (GTK_BIN (button)->child), 2, 0);
...@@ -240,8 +251,8 @@ script_fu_console_interface (void) ...@@ -240,8 +251,8 @@ script_fu_console_interface (void)
gtk_widget_show (button); gtk_widget_show (button);
g_signal_connect (button, "clicked", g_signal_connect (button, "clicked",
G_CALLBACK (script_fu_browse_callback), G_CALLBACK (script_fu_browse_callback),
console); console);
/* Initialize the history */ /* Initialize the history */
console->history = g_list_append (console->history, NULL); console->history = g_list_append (console->history, NULL);
...@@ -262,12 +273,95 @@ script_fu_response (GtkWidget *widget, ...@@ -262,12 +273,95 @@ script_fu_response (GtkWidget *widget,
gint response_id, gint response_id,
ConsoleInterface *console) ConsoleInterface *console)
{ {
GtkTextIter start, end;
switch (response_id)
{
case RESPONSE_CLEAR:
gtk_text_buffer_get_start_iter (console->console, &start);
gtk_text_buffer_get_end_iter (console->console, &end);
gtk_text_buffer_delete (console->console, &start, &end);
break;
case RESPONSE_SAVE:
script_fu_save_dialog(widget);
break;
default:
gtk_main_quit (); gtk_main_quit ();
break;
}
}
static void
script_fu_save_dialog(GtkWidget *parent)
{
static GtkWidget *dialog = NULL;
if (! dialog)
{
dialog =
gtk_file_chooser_dialog_new (_("Save TinyScheme Output"),
NULL,
GTK_FILE_CHOOSER_ACTION_SAVE,
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
GTK_STOCK_SAVE, GTK_RESPONSE_ACCEPT,
NULL);
g_signal_connect (dialog, "destroy",
G_CALLBACK (gtk_widget_destroyed),
&dialog);
g_signal_connect (dialog, "response",
G_CALLBACK (script_fu_save_output),
NULL);
}
gtk_window_present (GTK_WINDOW (dialog));
}
static void
script_fu_save_output (GtkWidget *dialog,
gint response_id,
gpointer data)
{
GtkTextIter start, end;
if (response_id == GTK_RESPONSE_ACCEPT)
{
gchar *filename;
gchar *str;
FILE *fh;
filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dialog));
fh = fopen (filename, "w");
if (! fh)
{
gchar *message =
g_strdup_printf ("Could not open '%s' for writing: %s",
gimp_filename_to_utf8 (filename),
g_strerror (errno));
g_message (message);
g_free (message);
g_free (filename);
return;
}
gtk_text_buffer_get_start_iter (cint.console, &start);
gtk_text_buffer_get_end_iter (cint.console, &end);
str = gtk_text_buffer_get_text (cint.console, &start, &end, TRUE);
fputs (str, fh);
fclose (fh);
}
gtk_widget_destroy (dialog);
}