Commit 737aa1a0 authored by Michael Natterer's avatar Michael Natterer Committed by Michael Natterer

corrected a typo

1999-03-25  Michael Natterer  <mitschel@cs.tu-berlin.de>

	* unitrc: corrected a typo

	* app/commands.c
	* app/global_edit.c
	* app/gradient.c
	* app/interface.[ch]
	* app/palette.c
	* app/paths_dialog.c: the query_[string|..]_boxes connect their
	close callback to a user provided signal now.

	* libgimp/gimpimage.c: gimp_image_get_unit() doesn't need a
	g_return_if_fail()

	* libgimp/gimpunitmenu.c: memory leak & compiler warning

	* configure.in
	* gimprc.in
	* user_install
	* user_install.bat
	* plug-ins/Makefile.am
	* plug-ins/FractalExplorer/*: added the FractalExplorer plugin.

	* app/install.c: ditto and made the install help text more
	editable by moving it to an array.
parent 77ae13ef
1999-03-25 Michael Natterer <mitschel@cs.tu-berlin.de>
* unitrc: corrected a typo
* app/commands.c
* app/global_edit.c
* app/gradient.c
* app/interface.[ch]
* app/palette.c
* app/paths_dialog.c: the query_[string|..]_boxes connect their
close callback to a user provided signal now.
* libgimp/gimpimage.c: gimp_image_get_unit() doesn't need a
g_return_if_fail()
* libgimp/gimpunitmenu.c: memory leak & compiler warning
* configure.in
* gimprc.in
* user_install
* user_install.bat
* plug-ins/Makefile.am
* plug-ins/FractalExplorer/*: added the FractalExplorer plugin.
* app/install.c: ditto and made the install help text more
editable by moving it to an array.
Thu Mar 25 22:44:36 GMT 1999 Andy Thomas <alt@gimp.org>
Ok. I'll add the file this time..
......@@ -212,7 +239,7 @@ Tue Mar 16 19:12:08 CET 1999 Marc Lehmann <pcg@goof.com>
* app/gdisplay.h: double the length of the cursor_format_str as
users may define strange units now
* app/xcf.c: forgot a sanity check when loading/saving the user
unit property
......@@ -220,7 +247,7 @@ Tue Mar 16 19:12:08 CET 1999 Marc Lehmann <pcg@goof.com>
This implements the rest of the unit system (unitrc loading and
saving and full PDB interface)
* Makefile.am
* gimp.1
* user_install
......
......@@ -368,13 +368,13 @@ select_border_cmd_callback (GtkWidget *widget,
gdisp = gdisplay_active ();
query_size_box (N_("Border Selection"),
N_("Border selection by:"),
query_size_box (_("Border Selection"),
_("Border selection by:"),
gimage_mask_border_radius, 1, 32767, 0,
gdisp->dot_for_dot ? UNIT_PIXEL : gdisp->gimage->unit,
MIN(gdisp->gimage->xresolution, gdisp->gimage->yresolution),
GTK_OBJECT (gdisp->gimage), gimage_mask_border_callback,
gdisp->gimage);
GTK_OBJECT (gdisp->gimage), "destroy",
gimage_mask_border_callback, gdisp->gimage);
}
void
......@@ -385,13 +385,13 @@ select_feather_cmd_callback (GtkWidget *widget,
gdisp = gdisplay_active ();
query_size_box (N_("Feather Selection"),
N_("Feather selection by:"),
query_size_box (_("Feather Selection"),
_("Feather selection by:"),
gimage_mask_feather_radius, 0, 32767, 3,
gdisp->dot_for_dot ? UNIT_PIXEL : gdisp->gimage->unit,
MIN(gdisp->gimage->xresolution, gdisp->gimage->yresolution),
GTK_OBJECT (gdisp->gimage), gimage_mask_feather_callback,
gdisp->gimage);
GTK_OBJECT (gdisp->gimage), "destroy",
gimage_mask_feather_callback, gdisp->gimage);
}
void
......@@ -407,8 +407,8 @@ select_grow_cmd_callback (GtkWidget *widget,
gimage_mask_grow_pixels, 1, 32767, 0,
gdisp->dot_for_dot ? UNIT_PIXEL : gdisp->gimage->unit,
MIN(gdisp->gimage->xresolution, gdisp->gimage->yresolution),
GTK_OBJECT (gdisp->gimage), gimage_mask_grow_callback,
gdisp->gimage);
GTK_OBJECT (gdisp->gimage), "destroy",
gimage_mask_grow_callback, gdisp->gimage);
}
void
......@@ -424,8 +424,8 @@ select_shrink_cmd_callback (GtkWidget *widget,
gimage_mask_shrink_pixels, 1, 32767, 0,
gdisp->dot_for_dot ? UNIT_PIXEL : gdisp->gimage->unit,
MIN(gdisp->gimage->xresolution, gdisp->gimage->yresolution),
GTK_OBJECT (gdisp->gimage), gimage_mask_shrink_callback,
gdisp->gimage);
GTK_OBJECT (gdisp->gimage), "destroy",
gimage_mask_shrink_callback, gdisp->gimage);
}
void
......
......@@ -368,13 +368,13 @@ select_border_cmd_callback (GtkWidget *widget,
gdisp = gdisplay_active ();
query_size_box (N_("Border Selection"),
N_("Border selection by:"),
query_size_box (_("Border Selection"),
_("Border selection by:"),
gimage_mask_border_radius, 1, 32767, 0,
gdisp->dot_for_dot ? UNIT_PIXEL : gdisp->gimage->unit,
MIN(gdisp->gimage->xresolution, gdisp->gimage->yresolution),
GTK_OBJECT (gdisp->gimage), gimage_mask_border_callback,
gdisp->gimage);
GTK_OBJECT (gdisp->gimage), "destroy",
gimage_mask_border_callback, gdisp->gimage);
}
void
......@@ -385,13 +385,13 @@ select_feather_cmd_callback (GtkWidget *widget,
gdisp = gdisplay_active ();
query_size_box (N_("Feather Selection"),
N_("Feather selection by:"),
query_size_box (_("Feather Selection"),
_("Feather selection by:"),
gimage_mask_feather_radius, 0, 32767, 3,
gdisp->dot_for_dot ? UNIT_PIXEL : gdisp->gimage->unit,
MIN(gdisp->gimage->xresolution, gdisp->gimage->yresolution),
GTK_OBJECT (gdisp->gimage), gimage_mask_feather_callback,
gdisp->gimage);
GTK_OBJECT (gdisp->gimage), "destroy",
gimage_mask_feather_callback, gdisp->gimage);
}
void
......@@ -407,8 +407,8 @@ select_grow_cmd_callback (GtkWidget *widget,
gimage_mask_grow_pixels, 1, 32767, 0,
gdisp->dot_for_dot ? UNIT_PIXEL : gdisp->gimage->unit,
MIN(gdisp->gimage->xresolution, gdisp->gimage->yresolution),
GTK_OBJECT (gdisp->gimage), gimage_mask_grow_callback,
gdisp->gimage);
GTK_OBJECT (gdisp->gimage), "destroy",
gimage_mask_grow_callback, gdisp->gimage);
}
void
......@@ -424,8 +424,8 @@ select_shrink_cmd_callback (GtkWidget *widget,
gimage_mask_shrink_pixels, 1, 32767, 0,
gdisp->dot_for_dot ? UNIT_PIXEL : gdisp->gimage->unit,
MIN(gdisp->gimage->xresolution, gdisp->gimage->yresolution),
GTK_OBJECT (gdisp->gimage), gimage_mask_shrink_callback,
gdisp->gimage);
GTK_OBJECT (gdisp->gimage), "destroy",
gimage_mask_shrink_callback, gdisp->gimage);
}
void
......
......@@ -696,9 +696,10 @@ named_edit_cut (void *gdisp_ptr)
gdisp = (GDisplay *) gdisp_ptr;
active_tool_control (HALT, gdisp_ptr);
query_string_box (N_("Cut Named"),
N_("Enter a name for this buffer"),
NULL, GTK_OBJECT (gdisp->gimage),
query_string_box (_("Cut Named"),
_("Enter a name for this buffer"),
NULL,
GTK_OBJECT (gdisp->gimage), "destroy",
cut_named_buffer_callback, gdisp);
return TRUE;
}
......@@ -727,9 +728,10 @@ named_edit_copy (void *gdisp_ptr)
gdisp = (GDisplay *) gdisp_ptr;
query_string_box (N_("Copy Named"),
N_("Enter a name for this buffer"),
NULL, GTK_OBJECT (gdisp->gimage),
query_string_box (_("Copy Named"),
_("Enter a name for this buffer"),
NULL,
GTK_OBJECT (gdisp->gimage), "destroy",
copy_named_buffer_callback, gdisp);
return TRUE;
}
......
......@@ -696,9 +696,10 @@ named_edit_cut (void *gdisp_ptr)
gdisp = (GDisplay *) gdisp_ptr;
active_tool_control (HALT, gdisp_ptr);
query_string_box (N_("Cut Named"),
N_("Enter a name for this buffer"),
NULL, GTK_OBJECT (gdisp->gimage),
query_string_box (_("Cut Named"),
_("Enter a name for this buffer"),
NULL,
GTK_OBJECT (gdisp->gimage), "destroy",
cut_named_buffer_callback, gdisp);
return TRUE;
}
......@@ -727,9 +728,10 @@ named_edit_copy (void *gdisp_ptr)
gdisp = (GDisplay *) gdisp_ptr;
query_string_box (N_("Copy Named"),
N_("Enter a name for this buffer"),
NULL, GTK_OBJECT (gdisp->gimage),
query_string_box (_("Copy Named"),
_("Enter a name for this buffer"),
NULL,
GTK_OBJECT (gdisp->gimage), "destroy",
copy_named_buffer_callback, gdisp);
return TRUE;
}
......
This diff is collapsed.
......@@ -809,8 +809,8 @@ struct _QueryBox
gpointer data;
};
static QueryBox * create_query_box (char *, char *, GtkObject *, QueryFunc,
gpointer);
static QueryBox * create_query_box (gchar *, gchar *, GtkObject *, gchar *,
QueryFunc, gpointer);
static gint query_box_delete_callback (GtkWidget *, GdkEvent *, gpointer);
static void query_box_cancel_callback (GtkWidget *, gpointer);
static void string_query_box_ok_callback (GtkWidget *, gpointer);
......@@ -822,9 +822,10 @@ static void size_query_box_ok_callback (GtkWidget *, gpointer);
*/
QueryBox *
create_query_box (char *title,
char *message,
create_query_box (gchar *title,
gchar *message,
GtkObject *object,
gchar *signal,
QueryFunc callback,
gpointer data)
{
......@@ -845,11 +846,10 @@ create_query_box (char *title,
(GtkSignalFunc) query_box_delete_callback,
query_box);
/* if we are associated with an object, connect to that object's
* "destroy" signal
/* if we are associated with an object, connect to the provided signal
*/
if (object && GTK_IS_OBJECT (object))
gtk_signal_connect (GTK_OBJECT (object), "destroy",
if (object && GTK_IS_OBJECT (object) && signal)
gtk_signal_connect (GTK_OBJECT (object), signal,
(GtkSignalFunc) query_box_cancel_callback,
query_box);
else
......@@ -894,17 +894,18 @@ create_query_box (char *title,
}
GtkWidget *
query_string_box (char *title,
char *message,
char *initial,
query_string_box (gchar *title,
gchar *message,
gchar *initial,
GtkObject *object,
gchar *signal,
QueryFunc callback,
gpointer data)
{
QueryBox *query_box;
GtkWidget *entry;
query_box = create_query_box (title, message, object, callback, data);
query_box = create_query_box (title, message, object, signal, callback, data);
gtk_signal_connect (GTK_OBJECT (query_box->ok_button), "clicked",
(GtkSignalFunc) string_query_box_ok_callback,
......@@ -925,12 +926,13 @@ query_string_box (char *title,
}
GtkWidget *
query_int_box (char *title,
char *message,
int initial,
int lower,
int upper,
query_int_box (gchar *title,
gchar *message,
gint initial,
gint lower,
gint upper,
GtkObject *object,
gchar *signal,
QueryFunc callback,
gpointer data)
{
......@@ -938,7 +940,7 @@ query_int_box (char *title,
GtkAdjustment* adjustment;
GtkWidget *spinbutton;
query_box = create_query_box (title, message, object, callback, data);
query_box = create_query_box (title, message, object, signal, callback, data);
gtk_signal_connect (GTK_OBJECT (query_box->ok_button), "clicked",
(GtkSignalFunc) int_query_box_ok_callback,
......@@ -959,13 +961,14 @@ query_int_box (char *title,
}
GtkWidget *
query_float_box (char *title,
char *message,
float initial,
float lower,
float upper,
int digits,
query_float_box (gchar *title,
gchar *message,
gfloat initial,
gfloat lower,
gfloat upper,
gint digits,
GtkObject *object,
gchar *signal,
QueryFunc callback,
gpointer data)
{
......@@ -973,7 +976,7 @@ query_float_box (char *title,
GtkAdjustment* adjustment;
GtkWidget *spinbutton;
query_box = create_query_box (title, message, object, callback, data);
query_box = create_query_box (title, message, object, signal, callback, data);
gtk_signal_connect (GTK_OBJECT (query_box->ok_button), "clicked",
(GtkSignalFunc) float_query_box_ok_callback,
......@@ -994,22 +997,23 @@ query_float_box (char *title,
}
GtkWidget *
query_size_box (char *title,
char *message,
float initial,
float lower,
float upper,
int digits,
query_size_box (gchar *title,
gchar *message,
gfloat initial,
gfloat lower,
gfloat upper,
gint digits,
GUnit unit,
float resolution,
gfloat resolution,
GtkObject *object,
gchar *signal,
QueryFunc callback,
gpointer data)
{
QueryBox *query_box;
GtkWidget *sizeentry;
query_box = create_query_box (title, message, object, callback, data);
query_box = create_query_box (title, message, object, signal, callback, data);
gtk_signal_connect (GTK_OBJECT (query_box->ok_button), "clicked",
(GtkSignalFunc) size_query_box_ok_callback,
......@@ -1054,7 +1058,7 @@ query_box_cancel_callback (GtkWidget *w,
query_box = (QueryBox *) client_data;
/* disconnect, if we are connected to some object's "destroy" signal */
/* disconnect, if we are connected to some signal */
if (query_box->object)
gtk_signal_disconnect_by_data (query_box->object, query_box);
......@@ -1069,11 +1073,11 @@ string_query_box_ok_callback (GtkWidget *w,
gpointer client_data)
{
QueryBox *query_box;
char *string;
gchar *string;
query_box = (QueryBox *) client_data;
/* disconnect, if we are connected to some object's "destroy" signal */
/* disconnect, if we are connected to some signal */
if (query_box->object)
gtk_signal_disconnect_by_data (query_box->object, query_box);
......@@ -1094,18 +1098,18 @@ int_query_box_ok_callback (GtkWidget *w,
gpointer client_data)
{
QueryBox *query_box;
int *integer_value;
gint *integer_value;
query_box = (QueryBox *) client_data;
/* disconnect, if we are connected to some object's "destroy" signal */
/* disconnect, if we are connected to some signal */
if (query_box->object)
gtk_signal_disconnect_by_data (query_box->object, query_box);
/* Get the spinbutton data */
integer_value = g_malloc(sizeof(int));
integer_value = g_malloc (sizeof (gint));
*integer_value =
gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(query_box->entry));
gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON(query_box->entry));
/* Call the user defined callback */
(* query_box->callback) (w, query_box->data, (gpointer) integer_value);
......@@ -1121,16 +1125,16 @@ float_query_box_ok_callback (GtkWidget *w,
gpointer client_data)
{
QueryBox *query_box;
float *float_value;
gfloat *float_value;
query_box = (QueryBox *) client_data;
/* disconnect, if we are connected to some object's "destroy" signal */
/* disconnect, if we are connected to some signal */
if (query_box->object)
gtk_signal_disconnect_by_data (query_box->object, query_box);
/* Get the spinbutton data */
float_value = g_malloc(sizeof(float));
float_value = g_malloc (sizeof (gfloat));
*float_value =
gtk_spin_button_get_value_as_float(GTK_SPIN_BUTTON(query_box->entry));
......@@ -1148,16 +1152,16 @@ size_query_box_ok_callback (GtkWidget *w,
gpointer client_data)
{
QueryBox *query_box;
float *float_value;
gfloat *float_value;
query_box = (QueryBox *) client_data;
/* disconnect, if we are connected to some object's "destroy" signal */
/* disconnect, if we are connected to some signal */
if (query_box->object)
gtk_signal_disconnect_by_data (query_box->object, query_box);
/* Get the sizeentry data */
float_value = g_malloc(sizeof(float));
float_value = g_malloc (sizeof (gfloat));
*float_value =
gimp_size_entry_get_refval (GIMP_SIZE_ENTRY (query_box->entry), 0);
......
......@@ -58,41 +58,45 @@ void create_display_shell (GDisplay *gdisp,
*/
/* some simple query dialogs
* if object != NULL then the query boxes will connect to the "destroy"
* signal of this object
* if object != NULL then the query boxes will connect their cancel callback
* to the provided signal of this object
*/
GtkWidget * query_string_box (char *title,
char *message,
char *initial,
GtkWidget * query_string_box (gchar *title,
gchar *message,
gchar *initial,
GtkObject *object,
gchar *signal,
QueryFunc callback,
gpointer data);
GtkWidget * query_int_box (char *title,
GtkWidget * query_int_box (gchar *title,
char *message,
int initial,
int lower,
int upper,
gint initial,
gint lower,
gint upper,
GtkObject *object,
gchar *signal,
QueryFunc callback,
gpointer data);
GtkWidget * query_float_box (char *title,
char *message,
float initial,
float lower,
float upper,
int digits,
GtkWidget * query_float_box (gchar *title,
gchar *message,
gfloat initial,
gfloat lower,
gfloat upper,
gint digits,
GtkObject *object,
gchar *signal,
QueryFunc callback,
gpointer data);
GtkWidget * query_size_box (char *title,
char *message,
float initial,
float lower,
float upper,
int digits,
GtkWidget * query_size_box (gchar *title,
gchar *message,
gfloat initial,
gfloat lower,
gfloat upper,
gint digits,
GUnit unit,
float resolution,
gfloat resolution,
GtkObject *object,
gchar *signal,
QueryFunc callback,
gpointer data);
......
......@@ -809,8 +809,8 @@ struct _QueryBox
gpointer data;
};
static QueryBox * create_query_box (char *, char *, GtkObject *, QueryFunc,
gpointer);
static QueryBox * create_query_box (gchar *, gchar *, GtkObject *, gchar *,
QueryFunc, gpointer);
static gint query_box_delete_callback (GtkWidget *, GdkEvent *, gpointer);
static void query_box_cancel_callback (GtkWidget *, gpointer);
static void string_query_box_ok_callback (GtkWidget *, gpointer);
......@@ -822,9 +822,10 @@ static void size_query_box_ok_callback (GtkWidget *, gpointer);
*/
QueryBox *
create_query_box (char *title,
char *message,
create_query_box (gchar *title,
gchar *message,
GtkObject *object,
gchar *signal,
QueryFunc callback,
gpointer data)
{
......@@ -845,11 +846,10 @@ create_query_box (char *title,
(GtkSignalFunc) query_box_delete_callback,
query_box);
/* if we are associated with an object, connect to that object's
* "destroy" signal
/* if we are associated with an object, connect to the provided signal
*/
if (object && GTK_IS_OBJECT (object))
gtk_signal_connect (GTK_OBJECT (object), "destroy",
if (object && GTK_IS_OBJECT (object) && signal)
gtk_signal_connect (GTK_OBJECT (object), signal,
(GtkSignalFunc) query_box_cancel_callback,
query_box);
else
......@@ -894,17 +894,18 @@ create_query_box (char *title,
}
GtkWidget *
query_string_box (char *title,
char *message,
char *initial,
query_string_box (gchar *title,
gchar *message,
gchar *initial,
GtkObject *object,
gchar *signal,
QueryFunc callback,
gpointer data)
{
QueryBox *query_box;
GtkWidget *entry;
query_box = create_query_box (title, message, object, callback, data);
query_box = create_query_box (title, message, object, signal, callback, data);
gtk_signal_connect (GTK_OBJECT (query_box->ok_button), "clicked",
(GtkSignalFunc) string_query_box_ok_callback,
......@@ -925,12 +926,13 @@ query_string_box (char *title,
}
GtkWidget *
query_int_box (char *title,
char *message,
int initial,
int lower,
int upper,
query_int_box (gchar *title,
gchar *message,
gint initial,
gint lower,
gint upper,
GtkObject *object,
gchar *signal,
QueryFunc callback,
gpointer data)
{
......@@ -938,7 +940,7 @@ query_int_box (char *title,
GtkAdjustment* adjustment;
GtkWidget *spinbutton;
query_box = create_query_box (title, message, object, callback, data);
query_box = create_query_box (title, message, object, signal, callback, data);
gtk_signal_connect (GTK_OBJECT (query_box->ok_button), "clicked",
(GtkSignalFunc) int_query_box_ok_callback,
......@@ -959,13 +961,14 @@ query_int_box (char *title,
}
GtkWidget *
query_float_box (char *title,
char *message,
float initial,
float lower,
float upper,
int digits,
query_float_box (gchar *title,
gchar *message,
gfloat initial,
gfloat lower,
gfloat upper,
gint digits,
GtkObject *object,
gchar *signal,
QueryFunc callback,
gpointer data)
{
......@@ -973,7 +976,7 @@ query_float_box (char *title,
GtkAdjustment* adjustment;
GtkWidget *spinbutton;
query_box = create_query_box (title, message, object, callback, data);
query_box = create_query_box (title, message, object, signal, callback, data);
gtk_signal_connect (GTK_OBJECT (query_box->ok_button), "clicked",
(GtkSignalFunc) float_query_box_ok_callback,
......@@ -994,22 +997,23 @@ query_float_box (char *title,
}
GtkWidget *
query_size_box (char *title,
char *message,
float initial,
float lower,
float upper,
int digits,
query_size_box (gchar *title,
gchar *message,
gfloat initial,
gfloat lower,
gfloat upper,
gint digits,
GUnit unit,
float resolution,
gfloat resolution,
GtkObject *object,
gchar *signal,
QueryFunc callback,
gpointer data)
{
QueryBox *query_box;
GtkWidget *sizeentry;
query_box = create_query_box (title, message, object, callback, data);
query_box = create_query_box (title, message, object, signal, callback, data);
gtk_signal_connect (GTK_OBJECT (query_box->ok_button), "clicked",
(GtkSignalFunc) size_query_box_ok_callback,
......@@ -1054,7 +1058,7 @@ query_box_cancel_callback (GtkWidget *w,
query_box = (QueryBox *) client_data;
/* disconnect, if we are connected to some object's "destroy" signal */
/* disconnect, if we are connected to some signal */
if (query_box->object)
gtk_signal_disconnect_by_data (query_box->object, query_box);