Commit fbfdf4b3 authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

app/Makefile.am removed.

2000-01-14  Michael Natterer  <mitch@gimp.org>

	* app/Makefile.am
	* app/tool_options_ui.h: removed.

	* app/tool_options.c
	* libgimp/gimpwidgets.[ch]: moved some more ui utility functions
	to libgimp.

	* app/airbrush.c
	* app/blend.c
	* app/bucket_fill.c
	* app/channel_ops.c
	* app/clone.c
	* app/color_picker.c
	* app/convolve.c
	* app/crop.c
	* app/dodgeburn.c
	* app/eraser.c
	* app/file_new_dialog.[ch]
	* app/flip_tool.c
	* app/image_new.[ch]
	* app/ink.c
	* app/layers_dialog.c
	* app/magnify.c
	* app/measure.c
	* app/paintbrush.c
	* app/pencil.c
	* app/smudge.c
	* app/text_tool.c
	* app/tool_options.c
	* app/transform_tool.c
	* app/xinput_airbrush.c: use the libgimp functions (esp. the radio
	button group constructor), some code cleanup.

	* plug-ins/common/csource.c
	* plug-ins/common/despeckle.c
	* plug-ins/common/diffraction.c
	* plug-ins/common/jpeg.c
	* plug-ins/common/png.c
	* plug-ins/unsharp/unsharp.c: more plugin ui tuning.

	* plug-ins/unsharp/Makefile.am
	* plug-ins/unsharp/dialog_f.[ch]
	* plug-ins/unsharp/dialog_i.[ch]: removed.
parent 8c1d97b7
2000-01-14 Michael Natterer <mitch@gimp.org>
* app/Makefile.am
* app/tool_options_ui.h: removed.
* app/tool_options.c
* libgimp/gimpwidgets.[ch]: moved some more ui utility functions
to libgimp.
* app/airbrush.c
* app/blend.c
* app/bucket_fill.c
* app/channel_ops.c
* app/clone.c
* app/color_picker.c
* app/convolve.c
* app/crop.c
* app/dodgeburn.c
* app/eraser.c
* app/file_new_dialog.[ch]
* app/flip_tool.c
* app/image_new.[ch]
* app/ink.c
* app/layers_dialog.c
* app/magnify.c
* app/measure.c
* app/paintbrush.c
* app/pencil.c
* app/smudge.c
* app/text_tool.c
* app/tool_options.c
* app/transform_tool.c
* app/xinput_airbrush.c: use the libgimp functions (esp. the radio
button group constructor), some code cleanup.
* plug-ins/common/csource.c
* plug-ins/common/despeckle.c
* plug-ins/common/diffraction.c
* plug-ins/common/jpeg.c
* plug-ins/common/png.c
* plug-ins/unsharp/unsharp.c: more plugin ui tuning.
* plug-ins/unsharp/Makefile.am
* plug-ins/unsharp/dialog_f.[ch]
* plug-ins/unsharp/dialog_i.[ch]: removed.
Thu Jan 13 16:35:44 PST 2000 Manish Singh <yosh@gimp.org> Thu Jan 13 16:35:44 PST 2000 Manish Singh <yosh@gimp.org>
* Made 1.1.15 release * Made 1.1.15 release
......
...@@ -419,7 +419,6 @@ gimp_SOURCES = \ ...@@ -419,7 +419,6 @@ gimp_SOURCES = \
tips_dialog.h \ tips_dialog.h \
tool_options.c \ tool_options.c \
tool_options.h \ tool_options.h \
tool_options_ui.h \
tools.c \ tools.c \
tools.h \ tools.h \
toolsF.h \ toolsF.h \
......
...@@ -30,7 +30,6 @@ ...@@ -30,7 +30,6 @@
#include "paint_core.h" #include "paint_core.h"
#include "paint_options.h" #include "paint_options.h"
#include "selection.h" #include "selection.h"
#include "tool_options_ui.h"
#include "tools.h" #include "tools.h"
#include "libgimp/gimpintl.h" #include "libgimp/gimpintl.h"
...@@ -114,7 +113,7 @@ airbrush_options_new (void) ...@@ -114,7 +113,7 @@ airbrush_options_new (void)
GtkWidget *scale; GtkWidget *scale;
/* the new airbrush tool options structure */ /* the new airbrush tool options structure */
options = (AirbrushOptions *) g_malloc (sizeof (AirbrushOptions)); options = g_new (AirbrushOptions, 1);
paint_options_init ((PaintOptions *) options, paint_options_init ((PaintOptions *) options,
AIRBRUSH, AIRBRUSH,
airbrush_options_reset); airbrush_options_reset);
...@@ -136,7 +135,7 @@ airbrush_options_new (void) ...@@ -136,7 +135,7 @@ airbrush_options_new (void)
gtk_scale_set_value_pos (GTK_SCALE (scale), GTK_POS_TOP); gtk_scale_set_value_pos (GTK_SCALE (scale), GTK_POS_TOP);
gtk_range_set_update_policy (GTK_RANGE (scale), GTK_UPDATE_DELAYED); gtk_range_set_update_policy (GTK_RANGE (scale), GTK_UPDATE_DELAYED);
gtk_signal_connect (GTK_OBJECT (options->rate_w), "value_changed", gtk_signal_connect (GTK_OBJECT (options->rate_w), "value_changed",
(GtkSignalFunc) tool_options_double_adjustment_update, GTK_SIGNAL_FUNC (gimp_double_adjustment_update),
&options->rate); &options->rate);
gimp_table_attach_aligned (GTK_TABLE (table), 0, gimp_table_attach_aligned (GTK_TABLE (table), 0,
_("Rate:"), 1.0, 1.0, _("Rate:"), 1.0, 1.0,
...@@ -149,7 +148,7 @@ airbrush_options_new (void) ...@@ -149,7 +148,7 @@ airbrush_options_new (void)
gtk_scale_set_value_pos (GTK_SCALE (scale), GTK_POS_TOP); gtk_scale_set_value_pos (GTK_SCALE (scale), GTK_POS_TOP);
gtk_range_set_update_policy (GTK_RANGE (scale), GTK_UPDATE_DELAYED); gtk_range_set_update_policy (GTK_RANGE (scale), GTK_UPDATE_DELAYED);
gtk_signal_connect (GTK_OBJECT (options->pressure_w), "value_changed", gtk_signal_connect (GTK_OBJECT (options->pressure_w), "value_changed",
(GtkSignalFunc) tool_options_double_adjustment_update, GTK_SIGNAL_FUNC (gimp_double_adjustment_update),
&options->pressure); &options->pressure);
gimp_table_attach_aligned (GTK_TABLE (table), 1, gimp_table_attach_aligned (GTK_TABLE (table), 1,
_("Pressure:"), 1.0, 1.0, _("Pressure:"), 1.0, 1.0,
...@@ -200,10 +199,10 @@ airbrush_paint_func (PaintCore *paint_core, ...@@ -200,10 +199,10 @@ airbrush_paint_func (PaintCore *paint_core,
case INIT_PAINT : case INIT_PAINT :
/* timer_state = OFF; */ /* timer_state = OFF; */
if (timer_state == ON) if (timer_state == ON)
{ {
g_warning ("killing stray timer, please report to lewing@gimp.org"); g_warning ("killing stray timer, please report to lewing@gimp.org");
gtk_timeout_remove (timer); gtk_timeout_remove (timer);
} }
timer_state = OFF; timer_state = OFF;
break; break;
......
...@@ -34,7 +34,6 @@ ...@@ -34,7 +34,6 @@
#include "interface.h" #include "interface.h"
#include "paint_options.h" #include "paint_options.h"
#include "selection.h" #include "selection.h"
#include "tool_options_ui.h"
#include "tools.h" #include "tools.h"
#include "undo.h" #include "undo.h"
...@@ -46,35 +45,37 @@ ...@@ -46,35 +45,37 @@
/* target size */ /* target size */
#define TARGET_HEIGHT 15 #define TARGET_HEIGHT 15
#define TARGET_WIDTH 15 #define TARGET_WIDTH 15
#define STATUSBAR_SIZE 128 #define STATUSBAR_SIZE 128
/* the blend structures */ /* the blend structures */
typedef double (*RepeatFunc)(double); typedef gdouble (* RepeatFunc) (gdouble);
typedef struct _BlendTool BlendTool; typedef struct _BlendTool BlendTool;
struct _BlendTool struct _BlendTool
{ {
DrawCore * core; /* Core select object */ DrawCore *core; /* Core select object */
int startx; /* starting x coord */ gint startx; /* starting x coord */
int starty; /* starting y coord */ gint starty; /* starting y coord */
int endx; /* ending x coord */ gint endx; /* ending x coord */
int endy; /* ending y coord */ gint endy; /* ending y coord */
guint context_id; /* for the statusbar */ guint context_id; /* for the statusbar */
}; };
typedef struct _BlendOptions BlendOptions; typedef struct _BlendOptions BlendOptions;
struct _BlendOptions struct _BlendOptions
{ {
PaintOptions paint_options; PaintOptions paint_options;
double offset; gdouble offset;
double offset_d; gdouble offset_d;
GtkObject *offset_w; GtkObject *offset_w;
BlendMode blend_mode; BlendMode blend_mode;
...@@ -89,37 +90,37 @@ struct _BlendOptions ...@@ -89,37 +90,37 @@ struct _BlendOptions
RepeatMode repeat_d; RepeatMode repeat_d;
GtkWidget *repeat_w; GtkWidget *repeat_w;
int supersample; gint supersample;
int supersample_d; gint supersample_d;
GtkWidget *supersample_w; GtkWidget *supersample_w;
int max_depth; gint max_depth;
int max_depth_d; gint max_depth_d;
GtkObject *max_depth_w; GtkObject *max_depth_w;
double threshold; gdouble threshold;
double threshold_d; gdouble threshold_d;
GtkObject *threshold_w; GtkObject *threshold_w;
}; };
typedef struct typedef struct
{ {
double offset; gdouble offset;
double sx, sy; gdouble sx, sy;
BlendMode blend_mode; BlendMode blend_mode;
GradientType gradient_type; GradientType gradient_type;
color_t fg, bg; color_t fg, bg;
double dist; gdouble dist;
double vec[2]; gdouble vec[2];
RepeatFunc repeat_func; RepeatFunc repeat_func;
} RenderBlendData; } RenderBlendData;
typedef struct typedef struct
{ {
PixelRegion *PR; PixelRegion *PR;
unsigned char *row_data; guchar *row_data;
int bytes; gint bytes;
int width; gint width;
} PutPixelData; } PutPixelData;
...@@ -302,7 +303,7 @@ blend_options_new () ...@@ -302,7 +303,7 @@ blend_options_new ()
}; };
/* the new blend tool options structure */ /* the new blend tool options structure */
options = (BlendOptions *) g_malloc (sizeof (BlendOptions)); options = g_new (BlendOptions, 1);
paint_options_init ((PaintOptions *) options, paint_options_init ((PaintOptions *) options,
BLEND, BLEND,
blend_options_reset); blend_options_reset);
...@@ -333,7 +334,7 @@ blend_options_new () ...@@ -333,7 +334,7 @@ blend_options_new ()
_("Offset:"), 1.0, 1.0, _("Offset:"), 1.0, 1.0,
scale, FALSE); scale, FALSE);
gtk_signal_connect (GTK_OBJECT (options->offset_w), "value_changed", gtk_signal_connect (GTK_OBJECT (options->offset_w), "value_changed",
(GtkSignalFunc) tool_options_double_adjustment_update, GTK_SIGNAL_FUNC (gimp_double_adjustment_update),
&options->offset); &options->offset);
/* the blend mode menu */ /* the blend mode menu */
...@@ -380,7 +381,7 @@ blend_options_new () ...@@ -380,7 +381,7 @@ blend_options_new ()
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (options->supersample_w), gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (options->supersample_w),
options->supersample_d); options->supersample_d);
gtk_signal_connect (GTK_OBJECT (options->supersample_w), "toggled", gtk_signal_connect (GTK_OBJECT (options->supersample_w), "toggled",
(GtkSignalFunc) tool_options_toggle_update, GTK_SIGNAL_FUNC (gimp_toggle_button_update),
&options->supersample); &options->supersample);
gtk_box_pack_start (GTK_BOX (vbox), options->supersample_w, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (vbox), options->supersample_w, FALSE, FALSE, 0);
gtk_widget_show (options->supersample_w); gtk_widget_show (options->supersample_w);
...@@ -407,7 +408,7 @@ blend_options_new () ...@@ -407,7 +408,7 @@ blend_options_new ()
_("Max Depth:"), 1.0, 1.0, _("Max Depth:"), 1.0, 1.0,
scale, FALSE); scale, FALSE);
gtk_signal_connect (GTK_OBJECT(options->max_depth_w), "value_changed", gtk_signal_connect (GTK_OBJECT(options->max_depth_w), "value_changed",
(GtkSignalFunc) tool_options_int_adjustment_update, GTK_SIGNAL_FUNC (gimp_int_adjustment_update),
&options->max_depth); &options->max_depth);
/* threshold scale */ /* threshold scale */
...@@ -420,7 +421,7 @@ blend_options_new () ...@@ -420,7 +421,7 @@ blend_options_new ()
_("Threshold:"), 1.0, 1.0, _("Threshold:"), 1.0, 1.0,
scale, FALSE); scale, FALSE);
gtk_signal_connect (GTK_OBJECT(options->threshold_w), "value_changed", gtk_signal_connect (GTK_OBJECT(options->threshold_w), "value_changed",
(GtkSignalFunc) tool_options_double_adjustment_update, GTK_SIGNAL_FUNC (gimp_double_adjustment_update),
&options->threshold); &options->threshold);
/* show the table */ /* show the table */
......
...@@ -16,7 +16,9 @@ ...@@ -16,7 +16,9 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/ */
#include <stdlib.h> #include <stdlib.h>
#include "gdk/gdkkeysyms.h"
#include <gdk/gdkkeysyms.h>
#include "appenv.h" #include "appenv.h"
#include "bucket_fill.h" #include "bucket_fill.h"
#include "cursorutil.h" #include "cursorutil.h"
...@@ -24,11 +26,11 @@ ...@@ -24,11 +26,11 @@
#include "fuzzy_select.h" #include "fuzzy_select.h"
#include "gdisplay.h" #include "gdisplay.h"
#include "gimage_mask.h" #include "gimage_mask.h"
#include "gimpui.h"
#include "interface.h" #include "interface.h"
#include "paint_funcs.h" #include "paint_funcs.h"
#include "paint_options.h" #include "paint_options.h"
#include "selection.h" #include "selection.h"
#include "tool_options_ui.h"
#include "tools.h" #include "tools.h"
#include "undo.h" #include "undo.h"
...@@ -104,12 +106,6 @@ bucket_options_new (void) ...@@ -104,12 +106,6 @@ bucket_options_new (void)
GtkWidget *label; GtkWidget *label;
GtkWidget *scale; GtkWidget *scale;
GtkWidget *frame; GtkWidget *frame;
gchar* fill_mode_label[3] = { N_("FG Color Fill"),
N_("BG Color Fill"),
N_("Pattern Fill") };
gint fill_mode_value[3] = { FG_BUCKET_FILL,
BG_BUCKET_FILL,
PATTERN_BUCKET_FILL };
/* the new bucket fill tool options structure */ /* the new bucket fill tool options structure */
options = (BucketOptions *) g_malloc (sizeof (BucketOptions)); options = (BucketOptions *) g_malloc (sizeof (BucketOptions));
...@@ -139,7 +135,7 @@ bucket_options_new (void) ...@@ -139,7 +135,7 @@ bucket_options_new (void)
gtk_scale_set_value_pos (GTK_SCALE (scale), GTK_POS_TOP); gtk_scale_set_value_pos (GTK_SCALE (scale), GTK_POS_TOP);
gtk_range_set_update_policy (GTK_RANGE (scale), GTK_UPDATE_DELAYED); gtk_range_set_update_policy (GTK_RANGE (scale), GTK_UPDATE_DELAYED);
gtk_signal_connect (GTK_OBJECT (options->threshold_w), "value_changed", gtk_signal_connect (GTK_OBJECT (options->threshold_w), "value_changed",
(GtkSignalFunc) tool_options_double_adjustment_update, GTK_SIGNAL_FUNC (gimp_double_adjustment_update),
&options->threshold); &options->threshold);
gtk_widget_show (scale); gtk_widget_show (scale);
...@@ -149,19 +145,29 @@ bucket_options_new (void) ...@@ -149,19 +145,29 @@ bucket_options_new (void)
options->sample_merged_w = options->sample_merged_w =
gtk_check_button_new_with_label (_("Sample Merged")); gtk_check_button_new_with_label (_("Sample Merged"));
gtk_signal_connect (GTK_OBJECT (options->sample_merged_w), "toggled", gtk_signal_connect (GTK_OBJECT (options->sample_merged_w), "toggled",
(GtkSignalFunc) tool_options_toggle_update, GTK_SIGNAL_FUNC (gimp_toggle_button_update),
&options->sample_merged); &options->sample_merged);
gtk_box_pack_start (GTK_BOX (vbox), options->sample_merged_w, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (vbox), options->sample_merged_w, FALSE, FALSE, 0);
gtk_widget_show (options->sample_merged_w); gtk_widget_show (options->sample_merged_w);
/* fill type */ /* fill type */
frame = tool_options_radio_buttons_new (_("Fill Type"), frame =
&options->fill_mode, gimp_radio_group_new2 (TRUE, _("Fill Type"),
options->fill_mode_w, gimp_radio_button_update,
fill_mode_label, &options->fill_mode, (gpointer) options->fill_mode,
fill_mode_value,
3); _("FG Color Fill"),
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (options->fill_mode_w[options->fill_mode_d]), TRUE); (gpointer) FG_BUCKET_FILL,
&options->fill_mode_w[0],
_("BG Color Fill"),
(gpointer) BG_BUCKET_FILL,
&options->fill_mode_w[1],
_("Pattern Fill"),
(gpointer) PATTERN_BUCKET_FILL,
&options->fill_mode_w[2],
NULL);
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
gtk_widget_show (frame); gtk_widget_show (frame);
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/ */
#include <string.h> #include <string.h>
#include <math.h>
#include "appenv.h" #include "appenv.h"
#include "channel_ops.h" #include "channel_ops.h"
#include "cursorutil.h" #include "cursorutil.h"
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
#include "interface.h" #include "interface.h"
#include "libgimp/gimpsizeentry.h" #include "libgimp/gimpsizeentry.h"
#include "libgimp/gimpmath.h"
#include "libgimp/gimpintl.h" #include "libgimp/gimpintl.h"
#include "channel_pvt.h" #include "channel_pvt.h"
...@@ -43,8 +44,6 @@ struct _OffsetDialog ...@@ -43,8 +44,6 @@ struct _OffsetDialog
GtkWidget *off_se; GtkWidget *off_se;
gboolean wrap_around; gboolean wrap_around;
GtkWidget *fill_options;
ChannelOffsetType fill_type; ChannelOffsetType fill_type;
GimpImage *gimage; GimpImage *gimage;
...@@ -54,8 +53,6 @@ struct _OffsetDialog ...@@ -54,8 +53,6 @@ struct _OffsetDialog
static void offset_ok_callback (GtkWidget *, gpointer); static void offset_ok_callback (GtkWidget *, gpointer);
static void offset_cancel_callback (GtkWidget *, gpointer); static void offset_cancel_callback (GtkWidget *, gpointer);
static void offset_wraparound_update (GtkWidget *, gpointer);
static void offset_fill_type_update (GtkWidget *, gpointer);
static void offset_halfheight_callback (GtkWidget *, gpointer); static void offset_halfheight_callback (GtkWidget *, gpointer);
...@@ -70,9 +67,8 @@ channel_ops_offset (GimpImage* gimage) ...@@ -70,9 +67,8 @@ channel_ops_offset (GimpImage* gimage)
GtkWidget *table; GtkWidget *table;
GtkObject *adjustment; GtkObject *adjustment;
GtkWidget *spinbutton; GtkWidget *spinbutton;
GtkWidget *radio_box; GtkWidget *frame;
GtkWidget *radio_button; GtkWidget *radio_button;
GSList *group = NULL;
GimpDrawable *drawable; GimpDrawable *drawable;
...@@ -167,39 +163,22 @@ channel_ops_offset (GimpImage* gimage) ...@@ -167,39 +163,22 @@ channel_ops_offset (GimpImage* gimage)
gtk_widget_show (check); gtk_widget_show (check);
/* The fill options */ /* The fill options */
off_d->fill_options = gtk_frame_new (_("Fill Options")); frame =
gtk_box_pack_start (GTK_BOX (vbox), off_d->fill_options, FALSE, FALSE, 0); gimp_radio_group_new2 (TRUE, _("Fill Options"),
gimp_radio_button_update,
radio_box = gtk_vbox_new (FALSE, 1); &off_d->fill_type, (gpointer) off_d->fill_type,
gtk_container_set_border_width (GTK_CONTAINER (radio_box), 2);
gtk_container_add (GTK_CONTAINER (off_d->fill_options), radio_box); _("Background"), (gpointer) OFFSET_BACKGROUND, NULL,
_("Transparent"), (gpointer) OFFSET_TRANSPARENT,
radio_button = gtk_radio_button_new_with_label (group, _("Background")); &radio_button,
group = gtk_radio_button_group (GTK_RADIO_BUTTON (radio_button));
gtk_box_pack_start (GTK_BOX (radio_box), radio_button, FALSE, FALSE, 0);
gtk_object_set_data (GTK_OBJECT (radio_button), "fill_type",
(gpointer) OFFSET_BACKGROUND);
gtk_signal_connect (GTK_OBJECT (radio_button), "toggled",
(GtkSignalFunc) offset_fill_type_update,
off_d);
gtk_widget_show (radio_button);
radio_button = gtk_radio_button_new_with_label (group, _("Transparent"));
group = gtk_radio_button_group (GTK_RADIO_BUTTON (radio_button));
gtk_box_pack_start (GTK_BOX (radio_box), radio_button, FALSE, FALSE, 0);
gtk_object_set_data (GTK_OBJECT (radio_button), "fill_type",
(gpointer) OFFSET_TRANSPARENT);
gtk_signal_connect (GTK_OBJECT (radio_button), "toggled",
(GtkSignalFunc) offset_fill_type_update,
off_d);
gtk_widget_show (radio_button);
if (drawable_has_alpha (drawable))
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (radio_button), TRUE);
else
gtk_widget_set_sensitive (radio_button, FALSE);
gtk_widget_show (radio_box); NULL);
gtk_widget_show (off_d->fill_options);
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
gtk_widget_show (frame);
if (!drawable_has_alpha (drawable))
gtk_widget_set_sensitive (radio_button, FALSE);
/* The by half height and half width option */ /* The by half height and half width option */
push = gtk_button_new_with_label (_("Offset by (x/2),(y/2)")); push = gtk_button_new_with_label (_("Offset by (x/2),(y/2)"));
...@@ -209,8 +188,9 @@ channel_ops_offset (GimpImage* gimage) ...@@ -209,8 +188,9 @@ channel_ops_offset (GimpImage* gimage)
/* Hook up the wrap around */ /* Hook up the wrap around */
gtk_signal_connect (GTK_OBJECT (check), "toggled", gtk_signal_connect (GTK_OBJECT (check), "toggled",
(GtkSignalFunc) offset_wraparound_update, GTK_SIGNAL_FUNC (gimp_toggle_button_update),