Commit 2b92a59e authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

po/POTFILES.in app/Makefile.am removed.

2000-02-13  Michael Natterer  <mitch@gimp.org>

	* po/POTFILES.in
	* app/Makefile.am
	* app/buildmenu.[ch]: removed.

	* app/blend.c
	* app/brush_select.c
	* app/curves.c
	* app/histogram_tool.c
	* app/layers_dialog.c
	* app/lc_dialog.c
	* app/levels.c
	* app/paint_options.h
	* app/paintbrush.c
	* app/tool_options.c: use the libgimp option menu
	constructor. Removed paint_mode_menu_set_history().

	* app/colormap_dialog.i.c
	* app/colormap_dialog.p.h: use a popup menu as in the palette
	dialog instead of a pulldown menu.

	* app/channels_dialog.c: made color dnd to a channel widget work
	again.

	* libgimp/gimpwidgets.[ch]: new function
	gimp_option_menu_set_history() which sets the history according to
	user_data as passed to gimp_option_menu_new().
parent 263998e0
2000-02-13 Michael Natterer <mitch@gimp.org>
* po/POTFILES.in
* app/Makefile.am
* app/buildmenu.[ch]: removed.
* app/blend.c
* app/brush_select.c
* app/curves.c
* app/histogram_tool.c
* app/layers_dialog.c
* app/lc_dialog.c
* app/levels.c
* app/paint_options.h
* app/paintbrush.c
* app/tool_options.c: use the libgimp option menu
constructor. Removed paint_mode_menu_set_history().
* app/colormap_dialog.i.c
* app/colormap_dialog.p.h: use a popup menu as in the palette
dialog instead of a pulldown menu.
* app/channels_dialog.c: made color dnd to a channel widget work
again.
* libgimp/gimpwidgets.[ch]: new function
gimp_option_menu_set_history() which sets the history according to
user_data as passed to gimp_option_menu_new().
Sun Feb 13 20:34:15 CET 2000 Sven Neumann <sven@gimp.org>
* app/about_dialog.c
......
......@@ -65,8 +65,6 @@ gimp_SOURCES = \
brushes_cmds.c \
bucket_fill.c \
bucket_fill.h \
buildmenu.c \
buildmenu.h \
by_color_select.c \
by_color_select.h \
channel.c \
......
......@@ -16,7 +16,6 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "appenv.h"
#include "buildmenu.h"
#include "colormaps.h"
#include "cursorutil.h"
#include "drawable.h"
......@@ -82,6 +81,8 @@ static CurvesDialog * curves_dialog = NULL;
static GtkWidget *file_dlg = NULL;
static gboolean load_save;
static GtkWidget *channel_items[5];
static CRMatrix CR_basis =
{
{ -0.5, 1.5, -1.5, 0.5 },
......@@ -100,33 +101,29 @@ static void curves_control (Tool *, ToolAction, gpointer);
static CurvesDialog * curves_dialog_new (void);
static void curves_update (CurvesDialog *, int);
static void curves_plot_curve (CurvesDialog *, int, int, int, int);
static void curves_preview (CurvesDialog *);
static void curves_value_callback (GtkWidget *, gpointer);
static void curves_red_callback (GtkWidget *, gpointer);
static void curves_green_callback (GtkWidget *, gpointer);
static void curves_blue_callback (GtkWidget *, gpointer);
static void curves_alpha_callback (GtkWidget *, gpointer);
static void curves_smooth_callback (GtkWidget *, gpointer);
static void curves_free_callback (GtkWidget *, gpointer);
static void curves_reset_callback (GtkWidget *, gpointer);
static void curves_ok_callback (GtkWidget *, gpointer);
static void curves_cancel_callback (GtkWidget *, gpointer);
static void curves_load_callback (GtkWidget *, gpointer);
static void curves_save_callback (GtkWidget *, gpointer);
static void curves_preview_update (GtkWidget *, gpointer);
static gint curves_xrange_events (GtkWidget *, GdkEvent *, CurvesDialog *);
static gint curves_yrange_events (GtkWidget *, GdkEvent *, CurvesDialog *);
static gint curves_graph_events (GtkWidget *, GdkEvent *, CurvesDialog *);
static void curves_CR_compose (CRMatrix, CRMatrix, CRMatrix);
static void make_file_dlg (gpointer);
static void file_ok_callback (GtkWidget *, gpointer);
static void file_cancel_callback (GtkWidget *, gpointer);
static void curves_update (CurvesDialog *, int);
static void curves_plot_curve (CurvesDialog *, int, int, int, int);
static void curves_preview (CurvesDialog *);
static void curves_channel_callback (GtkWidget *, gpointer);
static void curves_smooth_callback (GtkWidget *, gpointer);
static void curves_free_callback (GtkWidget *, gpointer);
static void curves_reset_callback (GtkWidget *, gpointer);
static void curves_ok_callback (GtkWidget *, gpointer);
static void curves_cancel_callback (GtkWidget *, gpointer);
static void curves_load_callback (GtkWidget *, gpointer);
static void curves_save_callback (GtkWidget *, gpointer);
static void curves_preview_update (GtkWidget *, gpointer);
static gint curves_xrange_events (GtkWidget *, GdkEvent *, CurvesDialog *);
static gint curves_yrange_events (GtkWidget *, GdkEvent *, CurvesDialog *);
static gint curves_graph_events (GtkWidget *, GdkEvent *, CurvesDialog *);
static void curves_CR_compose (CRMatrix, CRMatrix, CRMatrix);
static void make_file_dlg (gpointer);
static void file_ok_callback (GtkWidget *, gpointer);
static void file_cancel_callback (GtkWidget *, gpointer);
static gboolean read_curves_from_file (FILE *f);
static void write_curves_to_file (FILE *f);
......@@ -424,16 +421,6 @@ tools_free_curves (Tool *tool)
g_free (private);
}
static MenuItem channel_items[] =
{
{ N_("Value"), 0, 0, curves_value_callback, NULL, NULL, NULL },
{ N_("Red"), 0, 0, curves_red_callback, NULL, NULL, NULL },
{ N_("Green"), 0, 0, curves_green_callback, NULL, NULL, NULL },
{ N_("Blue"), 0, 0, curves_blue_callback, NULL, NULL, NULL },
{ N_("Alpha"), 0, 0, curves_alpha_callback, NULL, NULL, NULL },
{ NULL, 0, 0, NULL, NULL, NULL, NULL }
};
void
curves_initialize (GDisplay *gdisp)
{
......@@ -478,20 +465,21 @@ curves_initialize (GDisplay *gdisp)
/* check for alpha channel */
if (drawable_has_alpha (curves_dialog->drawable))
gtk_widget_set_sensitive (channel_items[4].widget, TRUE);
gtk_widget_set_sensitive (channel_items[4], TRUE);
else
gtk_widget_set_sensitive (channel_items[4].widget, FALSE);
gtk_widget_set_sensitive (channel_items[4], FALSE);
/* hide or show the channel menu based on image type */
if (curves_dialog->color)
for (i = 0; i < 4; i++)
gtk_widget_set_sensitive (channel_items[i].widget, TRUE);
gtk_widget_set_sensitive (channel_items[i], TRUE);
else
for (i = 1; i < 4; i++)
gtk_widget_set_sensitive (channel_items[i].widget, FALSE);
gtk_widget_set_sensitive (channel_items[i], FALSE);
/* set the current selection */
gtk_option_menu_set_history (GTK_OPTION_MENU (curves_dialog->channel_menu), 0);
gtk_option_menu_set_history (GTK_OPTION_MENU (curves_dialog->channel_menu),
curves_dialog->channel);
if (!GTK_WIDGET_VISIBLE (curves_dialog->shell))
gtk_widget_show (curves_dialog->shell);
......@@ -535,18 +523,10 @@ curves_dialog_new (void)
GtkWidget *frame;
GtkWidget *toggle;
GtkWidget *channel_hbox;
GtkWidget *menu;
GtkWidget *table;
GtkWidget *button;
gint i, j;
static MenuItem curve_type_items[] =
{
{ N_("Smooth"), 0, 0, curves_smooth_callback, NULL, NULL, NULL },
{ N_("Free"), 0, 0, curves_free_callback, NULL, NULL, NULL },
{ NULL, 0, 0, NULL, NULL, NULL, NULL }
};
cd = g_new (CurvesDialog, 1);
cd->cursor_ind_height = -1;
cd->cursor_ind_width = -1;
......@@ -566,14 +546,9 @@ curves_dialog_new (void)
cd->lut = gimp_lut_new ();
for (i = 0; i < 5; i++)
channel_items [i].user_data = (gpointer) cd;
for (i = 0; i < 2; i++)
curve_type_items [i].user_data = (gpointer) cd;
/* The shell and main vbox */
cd->shell = gimp_dialog_new (_("Curves"), "curves",
tools_help_func, NULL,
tools_help_func, tool_info[CURVES].private_tip,
GTK_WIN_POS_NONE,
FALSE, TRUE, FALSE,
......@@ -597,14 +572,23 @@ curves_dialog_new (void)
label = gtk_label_new (_("Modify Curves for Channel:"));
gtk_box_pack_start (GTK_BOX (channel_hbox), label, FALSE, FALSE, 0);
menu = build_menu (channel_items, NULL);
cd->channel_menu = gtk_option_menu_new ();
cd->channel_menu = gimp_option_menu_new2
(FALSE, curves_channel_callback,
cd, (gpointer) cd->channel,
_("Value"), (gpointer) HISTOGRAM_VALUE, &channel_items[0],
_("Red"), (gpointer) HISTOGRAM_RED, &channel_items[1],
_("Green"), (gpointer) HISTOGRAM_GREEN, &channel_items[2],
_("Blue"), (gpointer) HISTOGRAM_BLUE, &channel_items[3],
_("Alpha"), (gpointer) HISTOGRAM_ALPHA, &channel_items[4],
NULL);
gtk_box_pack_start (GTK_BOX (channel_hbox), cd->channel_menu, FALSE, FALSE, 2);
gtk_widget_show (label);
gtk_widget_show (cd->channel_menu);
gtk_widget_show (channel_hbox);
gtk_option_menu_set_menu (GTK_OPTION_MENU (cd->channel_menu), menu);
/* The table for the yrange and the graph */
table = gtk_table_new (2, 2, FALSE);
......@@ -677,15 +661,19 @@ curves_dialog_new (void)
/* The option menu for selecting the drawing method */
label = gtk_label_new (_("Curve Type:"));
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
gtk_widget_show (label);
menu = build_menu (curve_type_items, NULL);
cd->curve_type_menu = gtk_option_menu_new ();
gtk_box_pack_start (GTK_BOX (hbox), cd->curve_type_menu, FALSE, FALSE, 2);
cd->curve_type_menu = gimp_option_menu_new
(FALSE,
gtk_widget_show (label);
_("Smooth"), curves_smooth_callback, cd, NULL, NULL, TRUE,
_("Free"), curves_free_callback, cd, NULL, NULL, FALSE,
NULL);
gtk_box_pack_start (GTK_BOX (hbox), cd->curve_type_menu, FALSE, FALSE, 2);
gtk_widget_show (cd->curve_type_menu);
gtk_widget_show (hbox);
gtk_option_menu_set_menu (GTK_OPTION_MENU (cd->curve_type_menu), menu);
/* The preview toggle */
toggle = gtk_check_button_new_with_label (_("Preview"));
......@@ -708,25 +696,20 @@ curves_dialog_new (void)
button = gtk_button_new_with_label (_("Load"));
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_box_pack_start (GTK_BOX (hbbox), button, FALSE, FALSE, 0);
gtk_signal_connect (GTK_OBJECT (button), "clicked",
GTK_SIGNAL_FUNC (curves_load_callback),
NULL);
gtk_widget_show (button);
button = gtk_button_new_with_label (_("Save"));
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_box_pack_start (GTK_BOX (hbbox), button, FALSE, FALSE, 0);
gtk_signal_connect (GTK_OBJECT (button), "clicked",
GTK_SIGNAL_FUNC (curves_save_callback),
NULL);
gtk_widget_show (button);
gtk_widget_show (hbbox);
gtk_widget_show (vbox);
return cd;
......@@ -986,12 +969,12 @@ curves_plot_curve (CurvesDialog *cd,
CRMatrix geometry;
CRMatrix tmp1, tmp2;
CRMatrix deltas;
double x, dx, dx2, dx3;
double y, dy, dy2, dy3;
double d, d2, d3;
int lastx, lasty;
gint32 newx, newy;
int i;
gdouble x, dx, dx2, dx3;
gdouble y, dy, dy2, dy3;
gdouble d, d2, d3;
gint lastx, lasty;
gint32 newx, newy;
gint i;
/* construct the geometry matrix from the segment */
for (i = 0; i < 4; i++)
......@@ -1071,10 +1054,10 @@ curves_plot_curve (CurvesDialog *cd,
void
curves_calculate_curve (CurvesDialog *cd)
{
int i;
int points[17];
int num_pts;
int p1, p2, p3, p4;
gint i;
gint points[17];
gint num_pts;
gint p1, p2, p3, p4;
switch (cd->curve_type[cd->channel])
{
......@@ -1128,88 +1111,18 @@ curves_preview (CurvesDialog *cd)
}
static void
curves_value_callback (GtkWidget *widget,
gpointer data)
curves_channel_callback (GtkWidget *widget,
gpointer data)
{
CurvesDialog *cd;
cd = (CurvesDialog *) data;
if (cd->channel != HISTOGRAM_VALUE)
{
cd->channel = HISTOGRAM_VALUE;
gtk_option_menu_set_history (GTK_OPTION_MENU (cd->curve_type_menu),
cd->curve_type[HISTOGRAM_VALUE]);
curves_update (cd, XRANGE_TOP | YRANGE | GRAPH | DRAW);
}
}
gimp_menu_item_update (widget, &cd->channel);
static void
curves_red_callback (GtkWidget *widget,
gpointer data)
{
CurvesDialog *cd;
cd = (CurvesDialog *) data;
if (cd->channel != HISTOGRAM_RED)
{
cd->channel = HISTOGRAM_RED;
gtk_option_menu_set_history (GTK_OPTION_MENU (cd->curve_type_menu),
cd->curve_type[HISTOGRAM_RED]);
curves_update (cd, XRANGE_TOP | YRANGE | GRAPH | DRAW);
}
}
static void
curves_green_callback (GtkWidget *widget,
gpointer data)
{
CurvesDialog *cd;
cd = (CurvesDialog *) data;
if (cd->channel != HISTOGRAM_GREEN)
{
cd->channel = HISTOGRAM_GREEN;
gtk_option_menu_set_history (GTK_OPTION_MENU (cd->curve_type_menu),
cd->curve_type[HISTOGRAM_GREEN]);
curves_update (cd, XRANGE_TOP | YRANGE | GRAPH | DRAW);
}
}
static void
curves_blue_callback (GtkWidget *widget,
gpointer data)
{
CurvesDialog *cd;
cd = (CurvesDialog *) data;
if (cd->channel != HISTOGRAM_BLUE)
{
cd->channel = HISTOGRAM_BLUE;
gtk_option_menu_set_history (GTK_OPTION_MENU (cd->curve_type_menu),
cd->curve_type[HISTOGRAM_BLUE]);
curves_update (cd, XRANGE_TOP | YRANGE | GRAPH | DRAW);
}
}
static void
curves_alpha_callback (GtkWidget *widget,
gpointer data)
{
CurvesDialog *cd;
cd = (CurvesDialog *) data;
if (cd->channel != HISTOGRAM_ALPHA)
{
cd->channel = HISTOGRAM_ALPHA;
gtk_option_menu_set_history (GTK_OPTION_MENU (cd->curve_type_menu),
cd->curve_type[HISTOGRAM_ALPHA]);
curves_update (cd, XRANGE_TOP | YRANGE | GRAPH | DRAW);
}
gtk_option_menu_set_history (GTK_OPTION_MENU (cd->curve_type_menu),
cd->curve_type[cd->channel]);
curves_update (cd, XRANGE_TOP | YRANGE | GRAPH | DRAW);
}
static void
......@@ -1673,6 +1586,9 @@ make_file_dlg (gpointer data)
gimp_directory ());
gtk_file_selection_set_filename (GTK_FILE_SELECTION (file_dlg), temp);
g_free (temp);
gimp_help_connect_help_accel (file_dlg, tools_help_func,
tool_info[CURVES].private_tip);
}
static void
......@@ -1775,7 +1691,8 @@ read_curves_from_file (FILE *f)
curves_dialog->channel = current_channel;
curves_update (curves_dialog, ALL);
gtk_option_menu_set_history (GTK_OPTION_MENU (curves_dialog->curve_type_menu), SMOOTH);
gtk_option_menu_set_history (GTK_OPTION_MENU (curves_dialog->curve_type_menu),
SMOOTH);
if (curves_dialog->preview)
curves_preview (curves_dialog);
......
......@@ -143,8 +143,6 @@ static PixelRegion distR =
/* local function prototypes */
static void gradient_type_callback (GtkWidget *, gpointer);
static void blend_mode_callback (GtkWidget *, gpointer);
static void repeat_type_callback (GtkWidget *, gpointer);
static void blend_button_press (Tool *, GdkEventButton *, gpointer);
static void blend_button_release (Tool *, GdkEventButton *, gpointer);
......@@ -194,31 +192,18 @@ static void gradient_fill_region (GImage *gimage, GimpDrawable *drawa
/* functions */
static void
blend_mode_callback (GtkWidget *widget,
gpointer client_data)
{
blend_options->blend_mode = (BlendMode) client_data;
}
static void
gradient_type_callback (GtkWidget *widget,
gpointer client_data)
gpointer data)
{
blend_options->gradient_type = (GradientType) client_data;
gimp_menu_item_update (widget, data);
gtk_widget_set_sensitive (blend_options->repeat_w,
(blend_options->gradient_type < 6));
}
static void
repeat_type_callback (GtkWidget *widget,
gpointer client_data)
{
blend_options->repeat = (RepeatMode) client_data;
}
static void
blend_options_reset ()
blend_options_reset (void)
{
BlendOptions *options = blend_options;
......@@ -228,9 +213,12 @@ blend_options_reset ()
options->gradient_type = options->gradient_type_d;
options->repeat = options->repeat_d;
gtk_option_menu_set_history (GTK_OPTION_MENU (blend_options->blend_mode_w), 0);
gtk_option_menu_set_history (GTK_OPTION_MENU (options->gradient_type_w), 0);
gtk_option_menu_set_history (GTK_OPTION_MENU (blend_options->repeat_w), 0);
gtk_option_menu_set_history (GTK_OPTION_MENU (blend_options->blend_mode_w),
blend_options->blend_mode_d);
gtk_option_menu_set_history (GTK_OPTION_MENU (options->gradient_type_w),
blend_options->gradient_type_d);
gtk_option_menu_set_history (GTK_OPTION_MENU (blend_options->repeat_w),
blend_options->repeat_d);
gtk_adjustment_set_value (GTK_ADJUSTMENT (blend_options->offset_w),
blend_options->offset_d);
......@@ -248,60 +236,10 @@ blend_options_new (void)
BlendOptions *options;
GtkWidget *vbox;
GtkWidget *menu;
GtkWidget *table;
GtkWidget *scale;
GtkWidget *frame;
static MenuItem blend_option_items[] =
{
{ N_("FG to BG (RGB)"), 0, 0, blend_mode_callback,
(gpointer) FG_BG_RGB_MODE, NULL, NULL },
{ N_("FG to BG (HSV)"), 0, 0, blend_mode_callback,
(gpointer) FG_BG_HSV_MODE, NULL, NULL },
{ N_("FG to Transparent"), 0, 0, blend_mode_callback,
(gpointer) FG_TRANS_MODE, NULL, NULL },
{ N_("Custom from Editor"), 0, 0, blend_mode_callback,
(gpointer) CUSTOM_MODE, NULL, NULL },
{ NULL, 0, 0, NULL, NULL, NULL, NULL }
};
static MenuItem gradient_option_items[] =
{
{ N_("Linear"), 0, 0, gradient_type_callback,
(gpointer) LINEAR, NULL, NULL },
{ N_("Bi-Linear"), 0, 0, gradient_type_callback,
(gpointer) BILINEAR, NULL, NULL },
{ N_("Radial"), 0, 0, gradient_type_callback,
(gpointer) RADIAL, NULL, NULL },
{ N_("Square"), 0, 0, gradient_type_callback,
(gpointer) SQUARE, NULL, NULL },
{ N_("Conical (symmetric)"), 0, 0, gradient_type_callback,
(gpointer) CONICAL_SYMMETRIC, NULL, NULL },
{ N_("Conical (asymmetric)"), 0, 0, gradient_type_callback,
(gpointer) CONICAL_ASYMMETRIC, NULL, NULL },
{ N_("Shapeburst (angular)"), 0, 0, gradient_type_callback,
(gpointer) SHAPEBURST_ANGULAR, NULL, NULL },
{ N_("Shapeburst (spherical)"), 0, 0, gradient_type_callback,
(gpointer) SHAPEBURST_SPHERICAL, NULL, NULL },
{ N_("Shapeburst (dimpled)"), 0, 0, gradient_type_callback,
(gpointer) SHAPEBURST_DIMPLED, NULL, NULL },
{ N_("Spiral (clockwise)"), 0, 0, gradient_type_callback,
(gpointer) SPIRAL_CLOCKWISE, NULL, NULL },
{ N_("Spiral (anticlockwise)"), 0, 0, gradient_type_callback,
(gpointer) SPIRAL_ANTICLOCKWISE, NULL, NULL },
{ NULL, 0, 0, NULL, NULL, NULL, NULL }
};
static MenuItem repeat_option_items[] =
{
{ N_("None"), 0, 0, repeat_type_callback,
(gpointer) REPEAT_NONE, NULL, NULL },
{ N_("Sawtooth Wave"), 0, 0, repeat_type_callback,
(gpointer) REPEAT_SAWTOOTH, NULL, NULL },
{ N_("Triangular Wave"), 0, 0, repeat_type_callback,
(gpointer) REPEAT_TRIANGULAR, NULL, NULL },
{ NULL, 0, 0, NULL, NULL, NULL, NULL }
};
/* the new blend tool options structure */
options = g_new (BlendOptions, 1);
paint_options_init ((PaintOptions *) options,
......@@ -338,25 +276,52 @@ blend_options_new (void)
&options->offset);
/* the blend mode menu */
options->blend_mode_w = gtk_option_menu_new ();
menu = build_menu (blend_option_items, NULL);
gtk_option_menu_set_menu (GTK_OPTION_MENU (options->blend_mode_w), menu);
options->blend_mode_w = gimp_option_menu_new2
(FALSE, gimp_menu_item_update,
&options->blend_mode, (gpointer) options->blend_mode_d,
_("FG to BG (RGB)"), (gpointer) FG_BG_RGB_MODE, NULL,
_("FG to BG (HSV)"), (gpointer) FG_BG_HSV_MODE, NULL,
_("FG to Transparent"), (gpointer) FG_TRANS_MODE, NULL,
_("Custom from Editor"), (gpointer) CUSTOM_MODE, NULL,
NULL);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 1,
_("Blend:"), 1.0, 0.5,
options->blend_mode_w, 1, TRUE);
/* the gradient type menu */
options->gradient_type_w = gtk_option_menu_new ();
menu = build_menu (gradient_option_items, NULL);
gtk_option_menu_set_menu (GTK_OPTION_MENU (options->gradient_type_w), menu);
options->gradient_type_w = gimp_option_menu_new2
(FALSE, gradient_type_callback,
&options->gradient_type, (gpointer) options->gradient_type_d,
_("Linear"), (gpointer) LINEAR, NULL,
_("Bi-Linear"), (gpointer) BILINEAR, NULL,
_("Radial"), (gpointer) RADIAL, NULL,
_("Square"), (gpointer) SQUARE, NULL,
_("Conical (symmetric)"), (gpointer) CONICAL_SYMMETRIC, NULL,
_("Conical (asymmetric)"), (gpointer) CONICAL_ASYMMETRIC, NULL,
_("Shapeburst (angular)"), (gpointer) SHAPEBURST_ANGULAR, NULL,
_("Shapeburst (spherical)"), (gpointer) SHAPEBURST_SPHERICAL, NULL,
_("Shapeburst (dimpled)"), (gpointer) SHAPEBURST_DIMPLED, NULL,
_("Spiral (clockwise)"), (gpointer) SPIRAL_CLOCKWISE, NULL,
_("Spiral (anticlockwise)"), (gpointer) SPIRAL_ANTICLOCKWISE, NULL,
NULL);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 2,
_("Gradient:"), 1.0, 0.5,
options->gradient_type_w, 1, TRUE);
/* the repeat option */
options->repeat_w = gtk_option_menu_new ();
menu = build_menu (repeat_option_items, NULL);
gtk_option_menu_set_menu (GTK_OPTION_MENU (options->repeat_w), menu);
options->repeat_w = gimp_option_menu_new2
(FALSE, gimp_menu_item_update,
&options->repeat, (gpointer) options->repeat_d,
_("None"), (gpointer) REPEAT_NONE, NULL,
_("Sawtooth Wave"), (gpointer) REPEAT_SAWTOOTH, NULL,
_("Triangular Wave"), (gpointer) REPEAT_TRIANGULAR, NULL,
NULL);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 3,
_("Repeat:"), 1.0, 0.5,
options->repeat_w, 1, TRUE);
......
......@@ -785,10 +785,8 @@ brush_select_opacity_changed (GimpContext *context,
BrushSelect *bsp)
{
gtk_signal_handler_block_by_data (GTK_OBJECT (bsp->opacity_data), bsp);
gtk_adjustment_set_value (GTK_ADJUSTMENT (bsp->opacity_data),
opacity * 100.0);
gtk_signal_handler_unblock_by_data (GTK_OBJECT (bsp->opacity_data), bsp);
if (bsp->callback_name)
......@@ -800,8 +798,8 @@ brush_select_paint_mode_changed (GimpContext *context,
LayerModeEffects paint_mode,
BrushSelect *bsp)
{
paint_mode_menu_set_paint_mode (GTK_OPTION_MENU (bsp->option_menu),
paint_mode);
gimp_option_menu_set_history (GTK_OPTION_MENU (bsp->option_menu),
(gpointer) paint_mode);
if (bsp->callback_name)
brush_change_callbacks (bsp, FALSE);
......@@ -1670,16 +1668,20 @@ opacity_scale_update (GtkAdjustment *adjustment,
bsp = (BrushSelect *) data;
gtk_signal_handler_block_by_data (GTK_OBJECT (bsp->context), data);
gimp_context_set_opacity (bsp->context, adjustment->value / 100.0);
gtk_signal_handler_unblock_by_data (GTK_OBJECT (bsp->context), data);
}
static void
paint_mode_menu_callback (GtkWidget *widget,