From 8c3ea9955f601ee7749ef4346fb4a39b8f821afd Mon Sep 17 00:00:00 2001 From: Sven Neumann Date: Thu, 11 Apr 2002 10:58:19 +0000 Subject: [PATCH] merged fix for bug #75667 from stable branch. 2002-04-11 Sven Neumann * plug-ins/common/ps.c: merged fix for bug #75667 from stable branch. * plug-ins/rcm/rcm_dialog.c * plug-ins/rcm/rcm_misc.c: merged fix for bug #67018 from stable branch. * themes/Default/gtkrc: removed settings for tooltips color since GTK+-2.0 sets a reasonable default. Added a line to allow to change menu accelerators. --- ChangeLog | 12 ++++++++++++ plug-ins/common/postscript.c | 14 ++++++++++---- plug-ins/common/ps.c | 14 ++++++++++---- plug-ins/rcm/rcm_dialog.c | 2 +- plug-ins/rcm/rcm_misc.c | 25 +++++++++++++------------ themes/Default/gtkrc | 12 +++--------- 6 files changed, 49 insertions(+), 30 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5d6e022b56..283d7e9c1b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2002-04-11 Sven Neumann + + * plug-ins/common/ps.c: merged fix for bug #75667 from stable branch. + + * plug-ins/rcm/rcm_dialog.c + * plug-ins/rcm/rcm_misc.c: merged fix for bug #67018 from stable + branch. + + * themes/Default/gtkrc: removed settings for tooltips color since + GTK+-2.0 sets a reasonable default. Added a line to allow to change + menu accelerators. + 2002-04-10 Manish Singh * plug-ins/common/url.c: merges from gimp-1-2 branch diff --git a/plug-ins/common/postscript.c b/plug-ins/common/postscript.c index 3f04b09de7..44a4be8f2c 100644 --- a/plug-ins/common/postscript.c +++ b/plug-ins/common/postscript.c @@ -61,10 +61,11 @@ * 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) + * V 1.13 PK, 07-Apr-2002: Fix problem with DOS binary EPS files */ -#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"; +#define VERSIO 1.13 +static char dversio[] = "v1.13 07-Apr-2002"; +static char ident[] = "@(#) GIMP PostScript/PDF file-plugin v1.13 07-Apr-2002"; #include "config.h" @@ -588,7 +589,7 @@ query (void) gimp_register_magic_load_handler ("file_ps_load", "ps,eps,pdf", "", - "0,string,%!,0,string,%PDF"); + "0,string,%!,0,string,%PDF,0,long,0xc5d0d3c6"); gimp_register_save_handler ("file_ps_save", "ps,eps", ""); @@ -1298,6 +1299,7 @@ ps_open (gchar *filename, if (!is_pdf) /* Check for EPSF */ {char *adobe, *epsf; int ds = 0; + static unsigned char doseps[5] = { 0xc5, 0xd0, 0xd3, 0xc6, 0 }; hdr[sizeof(hdr)-1] = '\0'; adobe = strstr (hdr, "PS-Adobe-"); @@ -1305,6 +1307,10 @@ ps_open (gchar *filename, if ((adobe != NULL) && (epsf != NULL)) ds = epsf - adobe; *is_epsf = ((ds >= 11) && (ds <= 15)); + + /* Check DOS EPS binary file */ + if ((!*is_epsf) && (strncmp (hdr, (char *)doseps, 4) == 0)) + *is_epsf = 1; } fclose (fd_popen); } diff --git a/plug-ins/common/ps.c b/plug-ins/common/ps.c index 3f04b09de7..44a4be8f2c 100644 --- a/plug-ins/common/ps.c +++ b/plug-ins/common/ps.c @@ -61,10 +61,11 @@ * 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) + * V 1.13 PK, 07-Apr-2002: Fix problem with DOS binary EPS files */ -#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"; +#define VERSIO 1.13 +static char dversio[] = "v1.13 07-Apr-2002"; +static char ident[] = "@(#) GIMP PostScript/PDF file-plugin v1.13 07-Apr-2002"; #include "config.h" @@ -588,7 +589,7 @@ query (void) gimp_register_magic_load_handler ("file_ps_load", "ps,eps,pdf", "", - "0,string,%!,0,string,%PDF"); + "0,string,%!,0,string,%PDF,0,long,0xc5d0d3c6"); gimp_register_save_handler ("file_ps_save", "ps,eps", ""); @@ -1298,6 +1299,7 @@ ps_open (gchar *filename, if (!is_pdf) /* Check for EPSF */ {char *adobe, *epsf; int ds = 0; + static unsigned char doseps[5] = { 0xc5, 0xd0, 0xd3, 0xc6, 0 }; hdr[sizeof(hdr)-1] = '\0'; adobe = strstr (hdr, "PS-Adobe-"); @@ -1305,6 +1307,10 @@ ps_open (gchar *filename, if ((adobe != NULL) && (epsf != NULL)) ds = epsf - adobe; *is_epsf = ((ds >= 11) && (ds <= 15)); + + /* Check DOS EPS binary file */ + if ((!*is_epsf) && (strncmp (hdr, (char *)doseps, 4) == 0)) + *is_epsf = 1; } fclose (fd_popen); } diff --git a/plug-ins/rcm/rcm_dialog.c b/plug-ins/rcm/rcm_dialog.c index 1abe3d45a3..ddd08ee757 100644 --- a/plug-ins/rcm/rcm_dialog.c +++ b/plug-ins/rcm/rcm_dialog.c @@ -700,7 +700,7 @@ rcm_create_misc (void) /* create menu entries */ menu = gtk_menu_new (); - item = gtk_radio_menu_item_new_with_label (preview_group, _("Entire Image")); + item = gtk_radio_menu_item_new_with_label (preview_group, _("Entire Layer")); preview_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (item)); gtk_menu_shell_append (GTK_MENU_SHELL (menu), item); gtk_widget_show (item); diff --git a/plug-ins/rcm/rcm_misc.c b/plug-ins/rcm/rcm_misc.c index 634576b046..3e54f1f5f3 100644 --- a/plug-ins/rcm/rcm_misc.c +++ b/plug-ins/rcm/rcm_misc.c @@ -191,8 +191,8 @@ rcm_is_gray (float s) ReducedImage* rcm_reduce_image (GimpDrawable *drawable, GimpDrawable *mask, - gint LongerSize, - gint Slctn) + gint LongerSize, + gint Slctn) { GimpPixelRgn srcPR, srcMask; ReducedImage *temp; @@ -200,6 +200,7 @@ rcm_reduce_image (GimpDrawable *drawable, gint i, j, whichcol, whichrow, x1, x2, y1, y2; gint RH, RW, width, height, bytes; gint NoSelectionMade; + gint offx, offy; gdouble *tempHSV, H, S, V; bytes = drawable->bpp; @@ -209,7 +210,7 @@ rcm_reduce_image (GimpDrawable *drawable, gimp_drawable_mask_bounds(drawable->drawable_id, &x1, &y1, &x2, &y2); - if ( ((x2-x1) != drawable->width) && ((y2-y1) != drawable->height)) + if (((x2-x1) != drawable->width) || ((y2-y1) != drawable->height)) NoSelectionMade = FALSE; else NoSelectionMade = TRUE; @@ -257,7 +258,10 @@ rcm_reduce_image (GimpDrawable *drawable, tempmask = g_new (guchar, RW * RH); gimp_pixel_rgn_init(&srcPR, drawable, x1, y1, width, height, FALSE, FALSE); - gimp_pixel_rgn_init(&srcMask, mask, x1, y1, width, height, FALSE, FALSE); + + gimp_drawable_offsets (drawable->drawable_id, &offx, &offy); + gimp_pixel_rgn_init (&srcMask, mask, + x1 + offx, y1 + offy, width, height, FALSE, FALSE); src_row = g_new (guchar, width * bytes); src_mask_row = g_new (guchar, width * bytes); @@ -267,8 +271,9 @@ rcm_reduce_image (GimpDrawable *drawable, for (i=0; iwidth; RH = reduced->height; @@ -343,12 +350,6 @@ rcm_render_preview (GtkWidget *preview, a = g_new (guchar, bytes * RW); - if (preview == NULL) - { - printf("Asked to preview a NULL! Shouldn't happen!\n"); - return; - } - if (version == CURRENT) { for (i=0; i style +gtk-can-change-accels = 1 + + # Don't define icons for the Default theme as they are compiled in # # include "imagerc" @@ -115,12 +118,3 @@ style "gimp-grid-view-style" = "gimp-dock-style" } widget "*GimpContainerGridView*GtkViewport*" style "gimp-grid-view-style" - - -style "gimp-tooltips-style" -{ - fg[NORMAL] = { 0.0, 0.0, 0.0 } - bg[NORMAL] = { 0.94, 0.90, 0.54 } -} - -widget "gtk-tooltips" style "gimp-tooltips-style"