Commit 83bb5a38 authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer
Browse files

s/"Only"/"only"/

2000-03-03  Michael Natterer  <mitch@gimp.org>

	* app/crop.c: s/"Only"/"only"/

	* app/iscissors.c: one more cursor_update fix. This time I don't
	claim that it's _really_ correct.

	* app/tool_options.c: don't add a separator after
	opacity/paint_mode if a paint pressure options box follows.

	* cursors/bad.xbm
	* cursors/bad_mask.xbm: made it FAT (no need to use thin lines
	which show as much as possible of the image below because the
	cursor indicates that no operation is possible).

	* libgimp/gimpprotocol.[ch]: s/int/gboolean/ where appopriate,
	indentation paranoia.

	_gp_*_read(): free the already allocated parts of the message if
	reading a subsequent part fails. These cleanups will probably occur
	shortly before the process crashes, but at least they make the
	search for real leaks easier.

	* plug-ins/common/uniteditor.c: some more tooltips.

	* plug-ins/common/xbm.c: store the image comment in the
	"gimp-comment" parasite and the hot spot in the new "hot-spot"
	parasite. Added ui for entering the hot spot.

	* docs/parasites.txt: documented the new "hot-spot" parasite.
parent 5c4c51d2
2000-03-03 Michael Natterer <mitch@gimp.org>
* app/crop.c: s/"Only"/"only"/
* app/iscissors.c: one more cursor_update fix. This time I don't
claim that it's _really_ correct.
* app/tool_options.c: don't add a separator after
opacity/paint_mode if a paint pressure options box follows.
* cursors/bad.xbm
* cursors/bad_mask.xbm: made it FAT (no need to use thin lines
which show as much as possible of the image below because the
cursor indicates that no operation is possible).
* libgimp/gimpprotocol.[ch]: s/int/gboolean/ where appopriate,
indentation paranoia.
_gp_*_read(): free the already allocated parts of the message if
reading a subsequent part fails. These cleanups will probably occur
shortly before the process crashes, but at least they make the
search for real leaks easier.
* plug-ins/common/uniteditor.c: some more tooltips.
* plug-ins/common/xbm.c: store the image comment in the
"gimp-comment" parasite and the hot spot in the new "hot-spot"
parasite. Added ui for entering the hot spot.
* docs/parasites.txt: documented the new "hot-spot" parasite.
Fri Mar 3 15:08:41 PST 2000 Manish Singh <yosh@gimp.org>
 
* Made 1.1.18 release
......
......@@ -472,14 +472,13 @@ paint_options_init (PaintOptions *options,
reset_func);
/* initialize the paint options structure */
options->global = NULL;
options->opacity_w = NULL;
options->paint_mode_w = NULL;
options->context = tool_context;
options->incremental_w = NULL;
options->global = NULL;
options->opacity_w = NULL;
options->paint_mode_w = NULL;
options->context = tool_context;
options->incremental_w = NULL;
options->incremental = options->incremental_d = FALSE;
options->pressure_options = paint_pressure_options_new (tool_type);
options->pressure_options = NULL;
/* the main vbox */
vbox = gtk_vbox_new (FALSE, 2);
......@@ -551,20 +550,20 @@ paint_options_init (PaintOptions *options,
{
case BUCKET_FILL:
case BLEND:
case CLONE:
case CONVOLVE:
case INK:
case DODGEBURN:
case SMUDGE:
/* case XINPUT_AIRBRUSH: */
/* case XINPUT_AIRBRUSH: */
separator = gtk_hseparator_new ();
gtk_box_pack_start (GTK_BOX (vbox), separator, FALSE, FALSE, 0);
gtk_widget_show (separator);
break;
case AIRBRUSH:
case ERASER:
case PAINTBRUSH:
case PENCIL:
case PAINTBRUSH:
case ERASER:
case AIRBRUSH:
case CLONE:
case CONVOLVE:
case DODGEBURN:
case SMUDGE:
break;
default:
break;
......@@ -602,6 +601,8 @@ paint_options_init (PaintOptions *options,
break;
}
options->pressure_options = paint_pressure_options_new (tool_type);
if (options->pressure_options->frame)
{
gtk_box_pack_start (GTK_BOX (options->tool_options.main_vbox),
......@@ -662,7 +663,7 @@ paint_pressure_options_new (ToolType tool_type)
GtkWidget *hbox = NULL;
pressure = g_new (PaintPressureOptions, 1);
pressure->opacity = pressure->opacity_d = TRUE;
pressure->pressure = pressure->pressure_d = TRUE;
pressure->rate = pressure->rate_d = FALSE;
......
......@@ -186,7 +186,7 @@ crop_options_new (void)
/* layer toggle */
options->layer_only_w =
gtk_check_button_new_with_label(_("Current Layer Only"));
gtk_check_button_new_with_label(_("Current Layer only"));
gtk_box_pack_start (GTK_BOX (vbox), options->layer_only_w,
FALSE, FALSE, 0);
gtk_signal_connect (GTK_OBJECT (options->layer_only_w), "toggled",
......
......@@ -967,7 +967,7 @@ iscissors_modifier_update (Tool *tool,
op = SELECTION_REPLACE;
else if (op == SELECTION_SUB)
op = SELECTION_INTERSECT;
else
else if (op == SELECTION_INTERSECT)
op = SELECTION_SUB;
break;
......@@ -978,7 +978,7 @@ iscissors_modifier_update (Tool *tool,
op = SELECTION_INTERSECT;
else if (op == SELECTION_SUB)
op = SELECTION_REPLACE;
else
else if (op == SELECTION_INTERSECT)
op = SELECTION_ADD;
break;
}
......
......@@ -472,14 +472,13 @@ paint_options_init (PaintOptions *options,
reset_func);
/* initialize the paint options structure */
options->global = NULL;
options->opacity_w = NULL;
options->paint_mode_w = NULL;
options->context = tool_context;
options->incremental_w = NULL;
options->global = NULL;
options->opacity_w = NULL;
options->paint_mode_w = NULL;
options->context = tool_context;
options->incremental_w = NULL;
options->incremental = options->incremental_d = FALSE;
options->pressure_options = paint_pressure_options_new (tool_type);
options->pressure_options = NULL;
/* the main vbox */
vbox = gtk_vbox_new (FALSE, 2);
......@@ -551,20 +550,20 @@ paint_options_init (PaintOptions *options,
{
case BUCKET_FILL:
case BLEND:
case CLONE:
case CONVOLVE:
case INK:
case DODGEBURN:
case SMUDGE:
/* case XINPUT_AIRBRUSH: */
/* case XINPUT_AIRBRUSH: */
separator = gtk_hseparator_new ();
gtk_box_pack_start (GTK_BOX (vbox), separator, FALSE, FALSE, 0);
gtk_widget_show (separator);
break;
case AIRBRUSH:
case ERASER:
case PAINTBRUSH:
case PENCIL:
case PAINTBRUSH:
case ERASER:
case AIRBRUSH:
case CLONE:
case CONVOLVE:
case DODGEBURN:
case SMUDGE:
break;
default:
break;
......@@ -602,6 +601,8 @@ paint_options_init (PaintOptions *options,
break;
}
options->pressure_options = paint_pressure_options_new (tool_type);
if (options->pressure_options->frame)
{
gtk_box_pack_start (GTK_BOX (options->tool_options.main_vbox),
......@@ -662,7 +663,7 @@ paint_pressure_options_new (ToolType tool_type)
GtkWidget *hbox = NULL;
pressure = g_new (PaintPressureOptions, 1);
pressure->opacity = pressure->opacity_d = TRUE;
pressure->pressure = pressure->pressure_d = TRUE;
pressure->rate = pressure->rate_d = FALSE;
......
......@@ -186,7 +186,7 @@ crop_options_new (void)
/* layer toggle */
options->layer_only_w =
gtk_check_button_new_with_label(_("Current Layer Only"));
gtk_check_button_new_with_label(_("Current Layer only"));
gtk_box_pack_start (GTK_BOX (vbox), options->layer_only_w,
FALSE, FALSE, 0);
gtk_signal_connect (GTK_OBJECT (options->layer_only_w), "toggled",
......
......@@ -186,7 +186,7 @@ crop_options_new (void)
/* layer toggle */
options->layer_only_w =
gtk_check_button_new_with_label(_("Current Layer Only"));
gtk_check_button_new_with_label(_("Current Layer only"));
gtk_box_pack_start (GTK_BOX (vbox), options->layer_only_w,
FALSE, FALSE, 0);
gtk_signal_connect (GTK_OBJECT (options->layer_only_w), "toggled",
......
......@@ -967,7 +967,7 @@ iscissors_modifier_update (Tool *tool,
op = SELECTION_REPLACE;
else if (op == SELECTION_SUB)
op = SELECTION_INTERSECT;
else
else if (op == SELECTION_INTERSECT)
op = SELECTION_SUB;
break;
......@@ -978,7 +978,7 @@ iscissors_modifier_update (Tool *tool,
op = SELECTION_INTERSECT;
else if (op == SELECTION_SUB)
op = SELECTION_REPLACE;
else
else if (op == SELECTION_INTERSECT)
op = SELECTION_ADD;
break;
}
......
......@@ -967,7 +967,7 @@ iscissors_modifier_update (Tool *tool,
op = SELECTION_REPLACE;
else if (op == SELECTION_SUB)
op = SELECTION_INTERSECT;
else
else if (op == SELECTION_INTERSECT)
op = SELECTION_SUB;
break;
......@@ -978,7 +978,7 @@ iscissors_modifier_update (Tool *tool,
op = SELECTION_INTERSECT;
else if (op == SELECTION_SUB)
op = SELECTION_REPLACE;
else
else if (op == SELECTION_INTERSECT)
op = SELECTION_ADD;
break;
}
......
......@@ -472,14 +472,13 @@ paint_options_init (PaintOptions *options,
reset_func);
/* initialize the paint options structure */
options->global = NULL;
options->opacity_w = NULL;
options->paint_mode_w = NULL;
options->context = tool_context;
options->incremental_w = NULL;
options->global = NULL;
options->opacity_w = NULL;
options->paint_mode_w = NULL;
options->context = tool_context;
options->incremental_w = NULL;
options->incremental = options->incremental_d = FALSE;
options->pressure_options = paint_pressure_options_new (tool_type);
options->pressure_options = NULL;
/* the main vbox */
vbox = gtk_vbox_new (FALSE, 2);
......@@ -551,20 +550,20 @@ paint_options_init (PaintOptions *options,
{
case BUCKET_FILL:
case BLEND:
case CLONE:
case CONVOLVE:
case INK:
case DODGEBURN:
case SMUDGE:
/* case XINPUT_AIRBRUSH: */
/* case XINPUT_AIRBRUSH: */
separator = gtk_hseparator_new ();
gtk_box_pack_start (GTK_BOX (vbox), separator, FALSE, FALSE, 0);
gtk_widget_show (separator);
break;
case AIRBRUSH:
case ERASER:
case PAINTBRUSH:
case PENCIL:
case PAINTBRUSH:
case ERASER:
case AIRBRUSH:
case CLONE:
case CONVOLVE:
case DODGEBURN:
case SMUDGE:
break;
default:
break;
......@@ -602,6 +601,8 @@ paint_options_init (PaintOptions *options,
break;
}
options->pressure_options = paint_pressure_options_new (tool_type);
if (options->pressure_options->frame)
{
gtk_box_pack_start (GTK_BOX (options->tool_options.main_vbox),
......@@ -662,7 +663,7 @@ paint_pressure_options_new (ToolType tool_type)
GtkWidget *hbox = NULL;
pressure = g_new (PaintPressureOptions, 1);
pressure->opacity = pressure->opacity_d = TRUE;
pressure->pressure = pressure->pressure_d = TRUE;
pressure->rate = pressure->rate_d = FALSE;
......
/* Created with The GIMP */
#define bad_width 16
#define bad_height 16
#define bad_x_hot 7
#define bad_y_hot 7
static unsigned char bad_bits[] = {
0x00, 0x00, 0xe0, 0x03, 0x10, 0x04, 0x08, 0x08, 0x04, 0x14, 0x02, 0x22,
0x02, 0x21, 0x82, 0x20, 0x42, 0x20, 0x22, 0x20, 0x14, 0x10, 0x08, 0x08,
0x10, 0x04, 0xe0, 0x03, 0x00, 0x00, 0x00, 0x00};
#define bad_x_hot 8
#define bad_y_hot 8
static char bad_bits[] = {
0x00, 0x00, 0xe0, 0x07, 0xf8, 0x1f, 0x1c, 0x38, 0x0c, 0x3c, 0x06, 0x6e,
0x06, 0x67, 0x86, 0x63, 0xc6, 0x61, 0xe6, 0x60, 0x76, 0x60, 0x3c, 0x30,
0x1c, 0x38, 0xf8, 0x1f, 0xe0, 0x07, 0x00, 0x00 };
/* Created with The GIMP */
#define bad_mask_width 16
#define bad_mask_height 16
static unsigned char bad_mask_bits[] = {
0xc0, 0x01, 0xf0, 0x07, 0xf8, 0x0f, 0x1c, 0x1c, 0x0e, 0x3e, 0x06, 0x37,
0x87, 0x73, 0xc7, 0x71, 0xe7, 0x70, 0x76, 0x30, 0x3e, 0x38, 0x1c, 0x1c,
0xf8, 0x0f, 0xf0, 0x07, 0xc0, 0x01, 0x00, 0x00};
static char bad_mask_bits[] = {
0xf0, 0x0f, 0xfc, 0x3f, 0xfe, 0x7f, 0xfe, 0x7f, 0x3f, 0xff, 0x9f, 0xff,
0xcf, 0xff, 0xef, 0xff, 0xff, 0xf7, 0xff, 0xf3, 0xff, 0xf9, 0xff, 0xfc,
0xfe, 0x7f, 0xfe, 0x7f, 0xfc, 0x3f, 0xf0, 0x0f };
......@@ -37,7 +37,7 @@ Global data follows no strict rules.
human-readable text, preferably in utf8 encoding. A trailing \0
might be included and is not part of the comment.
gimp-brush-pipe-parameters" (IMAGE, PERSISTENT)
"gimp-brush-pipe-parameters" (IMAGE, PERSISTENT)
This is all very preliminary:
A string, containing parameters describing how an brush pipe
......@@ -115,6 +115,12 @@ gimp-brush-pipe-parameters" (IMAGE, PERSISTENT)
data (Data::Dumper) or a serialized data stream created by
Storable::nfreeze.
"hot-spot" (IMAGE, PERSISTENT)
Use this parasite to store an image's "hot spot". Currently
used by the XBM plugin to store mouse cursor hot spots.
Example: a hot spot at coordinates (5,5) is stored as "5 5"
------------------------------------------------------------------
......@@ -180,6 +186,3 @@ non-persistant data might be fine as well):
data += length;
if (tlength != size)
gdeserialize the next one, etc.
This diff is collapsed.
......@@ -19,7 +19,6 @@
#ifndef __GIMP_PROTOCOL_H__
#define __GIMP_PROTOCOL_H__
#include <glib.h>
/* Increment every time the protocol changes
......@@ -27,7 +26,8 @@
#define GP_VERSION 0x0003
enum {
enum
{
GP_QUIT,
GP_CONFIG,
GP_TILE_REQ,
......@@ -44,16 +44,16 @@ enum {
};
typedef struct _GPConfig GPConfig;
typedef struct _GPTileReq GPTileReq;
typedef struct _GPTileAck GPTileAck;
typedef struct _GPTileData GPTileData;
typedef struct _GPParam GPParam;
typedef struct _GPParamDef GPParamDef;
typedef struct _GPProcRun GPProcRun;
typedef struct _GPProcReturn GPProcReturn;
typedef struct _GPProcInstall GPProcInstall;
typedef struct _GPProcUninstall GPProcUninstall;
typedef struct _GPConfig GPConfig;
typedef struct _GPTileReq GPTileReq;
typedef struct _GPTileAck GPTileAck;
typedef struct _GPTileData GPTileData;
typedef struct _GPParam GPParam;
typedef struct _GPParamDef GPParamDef;
typedef struct _GPProcRun GPProcRun;
typedef struct _GPProcReturn GPProcReturn;
typedef struct _GPProcInstall GPProcInstall;
typedef struct _GPProcUninstall GPProcUninstall;
struct _GPConfig
......@@ -61,54 +61,57 @@ struct _GPConfig
guint32 version;
guint32 tile_width;
guint32 tile_height;
gint32 shm_ID;
gint32 shm_ID;
gdouble gamma;
gint8 install_cmap;
gint8 use_xshm;
guint8 color_cube[4];
gint32 gdisp_ID;
gint8 install_cmap;
gint8 use_xshm;
guint8 color_cube[4];
gint32 gdisp_ID;
};
struct _GPTileReq
{
gint32 drawable_ID;
gint32 drawable_ID;
guint32 tile_num;
guint32 shadow;
};
struct _GPTileData
{
gint32 drawable_ID;
guint32 tile_num;
guint32 shadow;
guint32 bpp;
guint32 width;
guint32 height;
guint32 use_shm;
guchar *data;
gint32 drawable_ID;
guint32 tile_num;
guint32 shadow;
guint32 bpp;
guint32 width;
guint32 height;
guint32 use_shm;
guchar *data;
};
struct _GPParam
{
guint32 type;
union {
gint32 d_int32;
gint16 d_int16;
gint8 d_int8;
gdouble d_float;
gchar *d_string;
gint32 *d_int32array;
gint16 *d_int16array;
gint8 *d_int8array;
gdouble *d_floatarray;
gchar **d_stringarray;
struct {
union
{
gint32 d_int32;
gint16 d_int16;
gint8 d_int8;
gdouble d_float;
gchar *d_string;
gint32 *d_int32array;
gint16 *d_int16array;
gint8 *d_int8array;
gdouble *d_floatarray;
gchar **d_stringarray;
struct
{
guint8 red;
guint8 green;
guint8 blue;
} d_color;
struct {
struct
{
gint32 x;
gint32 y;
gint32 width;
......@@ -124,10 +127,10 @@ struct _GPParam
gint32 d_path;
struct
{
char *name;
guint32 flags;
guint32 size;
void *data;
gchar *name;
guint32 flags;
guint32 size;
gpointer data;
} d_parasite;
gint32 d_status;
} data;
......@@ -135,71 +138,72 @@ struct _GPParam
struct _GPParamDef
{
guint32 type;
char *name;
char *description;
guint32 type;
gchar *name;
gchar *description;
};
struct _GPProcRun
{
char *name;
guint32 nparams;
gchar *name;
guint32 nparams;
GPParam *params;
};
struct _GPProcReturn
{
char *name;
guint32 nparams;
gchar *name;
guint32 nparams;
GPParam *params;
};
struct _GPProcInstall
{
char *name;
char *blurb;
char *help;
char *author;
char *copyright;
char *date;
char *menu_path;
char *image_types;
guint32 type;
guint32 nparams;
guint32 nreturn_vals;
gchar *name;
gchar *blurb;
gchar *help;
gchar *author;
gchar *copyright;
gchar *date;
gchar *menu_path;
gchar *image_types;
guint32 type;
guint32 nparams;
guint32 nreturn_vals;
GPParamDef *params;
GPParamDef *return_vals;
};
struct _GPProcUninstall
{
char *name;
gchar *name;
};
void gp_init (void);
int gp_quit_write (GIOChannel *channel);
int gp_config_write (GIOChannel *channel,
GPConfig *config);
int gp_tile_req_write (GIOChannel *channel,
GPTileReq *tile_req);
int gp_tile_ack_write (GIOChannel *channel);
int gp_tile_data_write (GIOChannel *channel,
GPTileData *tile_data);
int gp_proc_run_write (GIOChannel *channel,
GPProcRun *proc_run);
int gp_proc_return_write (GIOChannel *channel,
GPProcReturn *proc_return);
int gp_temp_proc_run_write (GIOChannel *channel,
GPProcRun *proc_run);
int gp_temp_proc_return_write (GIOChannel *channel,
GPProcReturn *proc_return);
int gp_proc_install_write (GIOChannel *channel,
GPProcInstall *proc_install);
int gp_proc_uninstall_write (GIOChannel *channel,
GPProcUninstall *proc_uninstall);
int gp_extension_ack_write (GIOChannel *channel);
int gp_request_wakeups_write (GIOChannel *channel);
void gp_init (void);
gboolean gp_quit_write (GIOChannel *channel);
gboolean gp_config_write (GIOChannel *channel,
GPConfig *config);
gboolean gp_tile_req_write (GIOChannel *channel,
GPTileReq *tile_req);
gboolean gp_tile_ack_write (GIOChannel *channel);
gboolean gp_tile_data_write (GIOChannel *channel,
GPTileData *tile_data);
gboolean gp_proc_run_write (GIOChannel *channel,
GPProcRun *proc_run);
gboolean gp_proc_return_write (GIOChannel *channel,
GPProcReturn *proc_return);
gboolean gp_temp_proc_run_write (GIOChannel *channel,