merged fix for bug #75667 from stable branch.

2002-04-11  Sven Neumann  <sven@gimp.org>

	* 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.
This commit is contained in:
Sven Neumann 2002-04-11 10:58:19 +00:00 committed by Sven Neumann
parent 57aaac8d9c
commit 8c3ea9955f
6 changed files with 49 additions and 30 deletions

View file

@ -1,3 +1,15 @@
2002-04-11 Sven Neumann <sven@gimp.org>
* 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 <yosh@gimp.org>
* plug-ins/common/url.c: merges from gimp-1-2 branch

View file

@ -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);
}

View file

@ -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);
}

View file

@ -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);

View file

@ -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; i<RH; i++)
{
whichrow = (float)i * (float)height / (float)RH;
gimp_pixel_rgn_get_row (&srcPR, src_row, x1, y1+whichrow, width);
gimp_pixel_rgn_get_row (&srcMask, src_mask_row, x1, y1+whichrow, width);
gimp_pixel_rgn_get_row (&srcPR, src_row, x1, y1 + whichrow, width);
gimp_pixel_rgn_get_row (&srcMask, src_mask_row,
x1 + offx, y1 + offy + whichrow, width);
for (j=0; j<RW; j++)
{
@ -334,6 +339,8 @@ rcm_render_preview (GtkWidget *preview,
/* init some variables */
g_return_if_fail (preview != NULL);
reduced = Current.reduced;
RW = reduced->width;
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<RH; i++)

View file

@ -11,6 +11,9 @@
# widget_class <widget_class_set> style <style_name>
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"