removed value GIMP_CURSOR_FORMAT_PIXBUF_PREMULTIPLY because it's the job

2004-06-21  Michael Natterer  <mitch@gimp.org>

	* app/widgets/widgets-enums.[ch] (enum GimpCursorFormat): removed
	value GIMP_CURSOR_FORMAT_PIXBUF_PREMULTIPLY because it's the job
	of GDK to do that (it was GDK that was broken, not some of the X
	servers).

	* app/widgets/gimpcursor.c (gimp_cursor_new): premultiply the
	cursor's pixels for GTK+ < 2.4.4.
This commit is contained in:
Michael Natterer 2004-06-21 16:17:16 +00:00 committed by Michael Natterer
parent 57ce8c61be
commit 5e2c4257bb
4 changed files with 18 additions and 6 deletions

View File

@ -1,3 +1,13 @@
2004-06-21 Michael Natterer <mitch@gimp.org>
* app/widgets/widgets-enums.[ch] (enum GimpCursorFormat): removed
value GIMP_CURSOR_FORMAT_PIXBUF_PREMULTIPLY because it's the job
of GDK to do that (it was GDK that was broken, not some of the X
servers).
* app/widgets/gimpcursor.c (gimp_cursor_new): premultiply the
cursor's pixels for GTK+ < 2.4.4.
2004-06-21 Sven Neumann <sven@gimp.org>
* app/gui/gui.c (gui_exit_callback): improved message in quit

View File

@ -581,7 +581,11 @@ gimp_cursor_new (GdkDisplay *display,
0.0, 0.0, 1.0, 1.0,
GDK_INTERP_NEAREST, 200);
if (cursor_format == GIMP_CURSOR_FORMAT_PIXBUF_PREMULTIPLY)
#ifdef __GNUC__
#warning FIXME: remove this hack as soon as we depend on GTK+ 2.4.4
#endif
/* premultiply the cursor pixels manually for GTK+ < 2.4.4 */
if (gtk_check_version (2, 4, 4))
{
guint rowstride;
guchar *pixels, *p;

View File

@ -71,8 +71,7 @@ gimp_color_frame_mode_get_type (void)
static const GEnumValue gimp_cursor_format_enum_values[] =
{
{ GIMP_CURSOR_FORMAT_BITMAP, N_("Black & White"), "bitmap" },
{ GIMP_CURSOR_FORMAT_PIXBUF, N_("RGBA"), "pixbuf" },
{ GIMP_CURSOR_FORMAT_PIXBUF_PREMULTIPLY, N_("RGBA Premultiplied"), "pixbuf-premultiply" },
{ GIMP_CURSOR_FORMAT_PIXBUF, N_("Fancy"), "pixbuf" },
{ 0, NULL, NULL }
};

View File

@ -66,9 +66,8 @@ GType gimp_cursor_format_get_type (void) G_GNUC_CONST;
typedef enum
{
GIMP_CURSOR_FORMAT_BITMAP, /*< desc="Black & White" >*/
GIMP_CURSOR_FORMAT_PIXBUF, /*< desc="RGBA" >*/
GIMP_CURSOR_FORMAT_PIXBUF_PREMULTIPLY /*< desc="RGBA Premultiplied" >*/
GIMP_CURSOR_FORMAT_BITMAP, /*< desc="Black & White" >*/
GIMP_CURSOR_FORMAT_PIXBUF /*< desc="Fancy" >*/
} GimpCursorFormat;