Commit 52d5e94e authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann
Browse files

applied fix for #51403. applied fix for #37761. applied fix for #50522.

2001-06-21  Sven Neumann  <sven@gimp.org>

	* plug-ins/common/ps.c: applied fix for #51403.
	* plug-ins/flame/flame.c: applied fix for #37761.
	* plug-ins/script-fu/script-fu-console.c: applied fix for #50522.

	All fixes taken from the stable branch.

	* app/gui/file-open-dialog: ported fix for #51722 from stable branch.
parent d0fe8f45
2001-06-21 Sven Neumann <sven@gimp.org>
* plug-ins/common/ps.c: applied fix for #51403.
* plug-ins/flame/flame.c: applied fix for #37761.
* plug-ins/script-fu/script-fu-console.c: applied fix for #50522.
All fixes taken from the stable branch.
* app/gui/file-open-dialog: ported fix for #51722 from stable branch.
2001-06-20 Michael Natterer <mitch@gimp.org>
* app/gdisplay.c: same gdisplays_update_full() fix as in the
......
......@@ -66,6 +66,10 @@
#define REVERT_DATA_KEY "revert_confirm_dialog"
static int file_open_with_proc_and_display (gchar *filename,
gchar *raw_filename,
PlugInProcDef *file_proc);
static void file_open_dialog_create (void);
static void file_revert_confirm_callback (GtkWidget *widget,
......@@ -225,6 +229,17 @@ file_open_by_extension_callback (GtkWidget *widget,
gint
file_open_with_display (gchar *filename,
gchar *raw_filename)
{
return file_open_with_proc_and_display (filename, raw_filename, NULL);
}
/* private functions */
static int
file_open_with_proc_and_display (gchar *filename,
gchar *raw_filename,
PlugInProcDef *file_proc)
{
GimpImage *gimage;
GDisplay *gdisplay;
......@@ -234,7 +249,7 @@ file_open_with_display (gchar *filename,
if ((gimage = file_open_image (filename,
raw_filename,
_("Open"),
NULL,
file_proc,
RUN_INTERACTIVE,
&status)) != NULL)
{
......@@ -262,9 +277,6 @@ file_open_with_display (gchar *filename,
return status;
}
/* private functions */
static void
file_open_dialog_create (void)
{
......@@ -713,7 +725,7 @@ file_open_genbutton_callback (GtkWidget *widget,
gimage_to_be_thumbed = file_open_image (full_filename,
list->data,
NULL,
load_file_proc,
NULL,
RUN_NONINTERACTIVE,
&dummy);
......@@ -809,7 +821,9 @@ file_open_ok_callback (GtkWidget *widget,
if (err) /* e.g. http://server/filename.jpg */
full_filename = raw_filename;
status = file_open_with_display (full_filename, raw_filename);
status = file_open_with_proc_and_display (full_filename,
raw_filename,
load_file_proc);
if (status == GIMP_PDB_SUCCESS)
{
......@@ -851,8 +865,9 @@ file_open_ok_callback (GtkWidget *widget,
if (! (err == 0 && (buf.st_mode & S_IFDIR)))
{ /* Is not directory. */
status = file_open_with_display (full_filename,
(gchar *) list->data);
status = file_open_with_proc_and_display (full_filename,
(gchar *) list->data,
load_file_proc);
if (status == GIMP_PDB_SUCCESS)
{
......@@ -926,7 +941,7 @@ file_revert_confirm_callback (GtkWidget *widget,
new_gimage = file_open_image (filename, filename,
_("Revert"),
load_file_proc,
NULL,
RUN_INTERACTIVE,
&status);
......
......@@ -66,6 +66,10 @@
#define REVERT_DATA_KEY "revert_confirm_dialog"
static int file_open_with_proc_and_display (gchar *filename,
gchar *raw_filename,
PlugInProcDef *file_proc);
static void file_open_dialog_create (void);
static void file_revert_confirm_callback (GtkWidget *widget,
......@@ -225,6 +229,17 @@ file_open_by_extension_callback (GtkWidget *widget,
gint
file_open_with_display (gchar *filename,
gchar *raw_filename)
{
return file_open_with_proc_and_display (filename, raw_filename, NULL);
}
/* private functions */
static int
file_open_with_proc_and_display (gchar *filename,
gchar *raw_filename,
PlugInProcDef *file_proc)
{
GimpImage *gimage;
GDisplay *gdisplay;
......@@ -234,7 +249,7 @@ file_open_with_display (gchar *filename,
if ((gimage = file_open_image (filename,
raw_filename,
_("Open"),
NULL,
file_proc,
RUN_INTERACTIVE,
&status)) != NULL)
{
......@@ -262,9 +277,6 @@ file_open_with_display (gchar *filename,
return status;
}
/* private functions */
static void
file_open_dialog_create (void)
{
......@@ -713,7 +725,7 @@ file_open_genbutton_callback (GtkWidget *widget,
gimage_to_be_thumbed = file_open_image (full_filename,
list->data,
NULL,
load_file_proc,
NULL,
RUN_NONINTERACTIVE,
&dummy);
......@@ -809,7 +821,9 @@ file_open_ok_callback (GtkWidget *widget,
if (err) /* e.g. http://server/filename.jpg */
full_filename = raw_filename;
status = file_open_with_display (full_filename, raw_filename);
status = file_open_with_proc_and_display (full_filename,
raw_filename,
load_file_proc);
if (status == GIMP_PDB_SUCCESS)
{
......@@ -851,8 +865,9 @@ file_open_ok_callback (GtkWidget *widget,
if (! (err == 0 && (buf.st_mode & S_IFDIR)))
{ /* Is not directory. */
status = file_open_with_display (full_filename,
(gchar *) list->data);
status = file_open_with_proc_and_display (full_filename,
(gchar *) list->data,
load_file_proc);
if (status == GIMP_PDB_SUCCESS)
{
......@@ -926,7 +941,7 @@ file_revert_confirm_callback (GtkWidget *widget,
new_gimage = file_open_image (filename, filename,
_("Revert"),
load_file_proc,
NULL,
RUN_INTERACTIVE,
&status);
......
......@@ -59,10 +59,12 @@
* Fix problem with loop when reading not all
* images of a multi page file.
* PK, 31-Aug-2000: Load PS: Add checks for space in filename.
* V 1.12 PK, 19-Jun-2001: Fix problem with command line switch --
* (reported by Ferenc Wagner)
*/
#define VERSIO 1.11
static char dversio[] = "v1.11 31-Aug-2000";
static char ident[] = "@(#) GIMP PostScript/PDF file-plugin v1.11 31-Aug-2000";
#define VERSIO 1.12
static char dversio[] = "v1.12 19-Jun-2001";
static char ident[] = "@(#) GIMP PostScript/PDF file-plugin v1.12 19-Jun-2001";
#include "config.h"
......@@ -1398,7 +1400,7 @@ ps_open (gchar *filename,
/* Offset command for gs to get image part with negative x/y-coord. */
if ((offx != 0) || (offy != 0))
sprintf (offset, "-c %d %d translate -- ", offx, offy);
sprintf (offset, "-c %d %d translate ", offx, offy);
/* Antialiasing not available for PBM-device */
if ((loadopt->pnm_type != 4) && (loadopt->textalpha != 1))
......@@ -1412,7 +1414,7 @@ ps_open (gchar *filename,
sprintf (geometry,"-g%dx%d ", width, height);
cmd = g_strdup_printf ("%s -sDEVICE=%s -r%d %s%s%s-q -dNOPAUSE %s \
-sOutputFile=%s %s%s %s-c quit",
-sOutputFile=%s %s-f %s %s-c quit",
gs, driver, resolution, geometry,
TextAlphaBits, GraphicsAlphaBits,
gs_opts, pnmfile, offset, filename,
......
......@@ -59,10 +59,12 @@
* Fix problem with loop when reading not all
* images of a multi page file.
* PK, 31-Aug-2000: Load PS: Add checks for space in filename.
* V 1.12 PK, 19-Jun-2001: Fix problem with command line switch --
* (reported by Ferenc Wagner)
*/
#define VERSIO 1.11
static char dversio[] = "v1.11 31-Aug-2000";
static char ident[] = "@(#) GIMP PostScript/PDF file-plugin v1.11 31-Aug-2000";
#define VERSIO 1.12
static char dversio[] = "v1.12 19-Jun-2001";
static char ident[] = "@(#) GIMP PostScript/PDF file-plugin v1.12 19-Jun-2001";
#include "config.h"
......@@ -1398,7 +1400,7 @@ ps_open (gchar *filename,
/* Offset command for gs to get image part with negative x/y-coord. */
if ((offx != 0) || (offy != 0))
sprintf (offset, "-c %d %d translate -- ", offx, offy);
sprintf (offset, "-c %d %d translate ", offx, offy);
/* Antialiasing not available for PBM-device */
if ((loadopt->pnm_type != 4) && (loadopt->textalpha != 1))
......@@ -1412,7 +1414,7 @@ ps_open (gchar *filename,
sprintf (geometry,"-g%dx%d ", width, height);
cmd = g_strdup_printf ("%s -sDEVICE=%s -r%d %s%s%s-q -dNOPAUSE %s \
-sOutputFile=%s %s%s %s-c quit",
-sOutputFile=%s %s-f %s %s-c quit",
gs, driver, resolution, geometry,
TextAlphaBits, GraphicsAlphaBits,
gs_opts, pnmfile, offset, filename,
......
......@@ -205,6 +205,11 @@ run (gchar *name,
gimp_get_data ("plug_in_flame", &config);
maybe_init_cp ();
/* reusing a drawable_ID from the last run is a bad idea
since the drawable might have vanished (bug #37761) */
if (config.cmap_drawable >= 0)
config.cmap_drawable = GRADIENT_DRAWABLE;
drawable = gimp_drawable_get (param[2].data.d_drawable);
config.cp.width = drawable->width;
config.cp.height = drawable->height;
......@@ -246,11 +251,10 @@ run (gchar *name,
static void
drawable_to_cmap (control_point *cp)
{
gint i, j;
gint i, j;
GimpPixelRgn pr;
GimpDrawable *d;
guchar *p;
gint indexed;
guchar *p;
if (TABLE_DRAWABLE >= config.cmap_drawable)
{
......@@ -274,7 +278,6 @@ drawable_to_cmap (control_point *cp)
else
{
d = gimp_drawable_get (config.cmap_drawable);
indexed = gimp_drawable_is_indexed (config.cmap_drawable);
p = g_new (guchar, d->bpp);
gimp_pixel_rgn_init (&pr, d, 0, 0,
d->width, d->height, FALSE, FALSE);
......
......@@ -236,7 +236,7 @@ script_fu_console_interface (void)
cint.font_weak =
gdk_font_load ("-*-helvetica-medium-r-normal-*-*-100-*-*-*-*-*-*");
cint.font =
gdk_font_load ("-*-*-medium-r-normal-*-*-100-*-*-c-*-*-*");
gdk_fontset_load ("-*-*-medium-r-normal-*-*-100-*-*-c-*-iso8859-1,*");
/* Realize the widget before allowing new text to be inserted */
gtk_widget_realize (cint.console);
......@@ -244,7 +244,7 @@ script_fu_console_interface (void)
gtk_text_insert (GTK_TEXT (cint.console), cint.font_strong, NULL, NULL,
"The GIMP - GNU Image Manipulation Program\n\n", -1);
gtk_text_insert (GTK_TEXT (cint.console), cint.font_emphasis, NULL, NULL,
"Copyright (C) 1995-2000\n", -1);
"Copyright (C) 1995-2001\n", -1);
gtk_text_insert (GTK_TEXT (cint.console), cint.font_emphasis, NULL, NULL,
"Spencer Kimball, Peter Mattis and the GIMP Development Team\n", -1);
gtk_text_insert (GTK_TEXT (cint.console), cint.font_weak, NULL, NULL,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment