Commit ca2cbd32 authored by Michael Natterer's avatar Michael Natterer Committed by Michael Natterer

First version of per-tool paint options. No PDB interface yet. The tool

1999-04-22  Michael Natterer  <mitschel@cs.tu-berlin.de>

	First version of per-tool paint options. No PDB interface yet.
	The tool options dialog got rather big when in per-tool mode, so
	it will probably have to become a notebook.

	It's not yet 100% consistent. If switched off, everything should
	behave exactly like before.

	* app/Makefile.am
	* app/paint_options.h: new file

	* app/tool_options.c: PaintOptions gui. Maintain a list of all
	paint tools' ToolOptions to enable switching between global and
	per-tool paint options.

	* app/brush_select.[ch]: changed packing boxes, tables, ...
	The paint options in the brush selection can be hidden now.
	Moved create_paint_mode_menu() to paint_options.h and
	tool_options.c and renamed it to paint_mode_menu_new().

	* app/gimage_mask.c
	* app/gimpbrush.[ch]
	* app/gimpbrushlist.[ch]
	* app/paint_core.c: moved gimp_brush_[set|get]_spacing() from
	gimpbrushlist.[ch] to gimpbrush.[ch].
	Moved gimp_brush_[get|set]_[opacity|paint_mode]() to
	paint_options.h and tool_options.c and renamed them to
	paint_options_*_*().  They are "global paint options" now.

	* app/airbrush.c
	* app/blend.c
	* app/bucket_fill.c
	* app/clone.c
	* app/convolve.c
	* app/eraser.c
	* app/ink.c
	* app/paintbrush.c
	* app/pencil.c: all paint tools' options are derived from
	"PaintOptions" now. Opacity and paint mode are obtained through
	macros which take into account the current paint options mode.

	* app/buildmenu.h: #include <gtk/gtk.h>

	* app/color_picker.c
	* app/text_tool.c: changed spacings.

	* app/gimprc.[ch]: new gimprc option "global-paint-options"

	* app/preferences_dialog.c: Added a "Tool Options" page. Code
	cleanup. Some work on the convenience constructors test site.

	* app/tools.c: fixed "unused variable" warning.
parent db3c6bdb
1999-04-22 Michael Natterer <mitschel@cs.tu-berlin.de>
First version of per-tool paint options. No PDB interface yet.
The tool options dialog got rather big when in per-tool mode, so
it will probably have to become a notebook.
It's not yet 100% consistent. If switched off, everything should
behave exactly like before.
* app/Makefile.am
* app/paint_options.h: new file
* app/tool_options.c: PaintOptions gui. Maintain a list of all
paint tools' ToolOptions to enable switching between global and
per-tool paint options.
* app/brush_select.[ch]: changed packing boxes, tables, ...
The paint options in the brush selection can be hidden now.
Moved create_paint_mode_menu() to paint_options.h and
tool_options.c and renamed it to paint_mode_menu_new().
* app/gimage_mask.c
* app/gimpbrush.[ch]
* app/gimpbrushlist.[ch]
* app/paint_core.c: moved gimp_brush_[set|get]_spacing() from
gimpbrushlist.[ch] to gimpbrush.[ch].
Moved gimp_brush_[get|set]_[opacity|paint_mode]() to
paint_options.h and tool_options.c and renamed them to
paint_options_*_*(). They are "global paint options" now.
* app/airbrush.c
* app/blend.c
* app/bucket_fill.c
* app/clone.c
* app/convolve.c
* app/eraser.c
* app/ink.c
* app/paintbrush.c
* app/pencil.c: all paint tools' options are derived from
"PaintOptions" now. Opacity and paint mode are obtained through
macros which take into account the current paint options mode.
* app/buildmenu.h: #include <gtk/gtk.h>
* app/color_picker.c
* app/text_tool.c: changed spacings.
* app/gimprc.[ch]: new gimprc option "global-paint-options"
* app/preferences_dialog.c: Added a "Tool Options" page. Code
cleanup. Some work on the convenience constructors test site.
* app/tools.c: fixed "unused variable" warning.
Thu Apr 22 16:05:10 1999 ape@lrdpf.spacetec.no (Asbjorn Pettersen)
* plug-ins/CEL/CEL.c:
......
......@@ -273,6 +273,7 @@ gimp_SOURCES = \
paint_core.h \
paint_funcs.c \
paint_funcs.h \
paint_options.h \
paintbrush.c \
paintbrush.h \
parasite_cmds.c \
......
......@@ -23,6 +23,7 @@
#include "gdisplay.h"
#include "paint_funcs.h"
#include "paint_core.h"
#include "paint_options.h"
#include "palette.h"
#include "airbrush.h"
#include "selection.h"
......@@ -50,7 +51,7 @@ struct _AirbrushTimeout
typedef struct _AirbrushOptions AirbrushOptions;
struct _AirbrushOptions
{
ToolOptions tool_options;
PaintOptions paint_options;
double rate;
double rate_d;
......@@ -85,6 +86,8 @@ airbrush_options_reset (void)
{
AirbrushOptions *options = airbrush_options;
paint_options_reset ((PaintOptions *) options);
gtk_adjustment_set_value (GTK_ADJUSTMENT (options->rate_w),
options->rate_d);
gtk_adjustment_set_value (GTK_ADJUSTMENT (options->pressure_w),
......@@ -103,18 +106,18 @@ airbrush_options_new (void)
/* the new airbrush tool options structure */
options = (AirbrushOptions *) g_malloc (sizeof (AirbrushOptions));
tool_options_init ((ToolOptions *) options,
_("Airbrush Options"),
airbrush_options_reset);
paint_options_init ((PaintOptions *) options,
AIRBRUSH,
airbrush_options_reset);
options->rate = options->rate_d = 80.0;
options->pressure = options->pressure_d = 10.0;
/* the main vbox */
vbox = options->tool_options.main_vbox;
vbox = ((ToolOptions *) options)->main_vbox;
/* the rate scale */
table = gtk_table_new (2, 2, FALSE);
gtk_table_set_col_spacing (GTK_TABLE (table), 0, 6);
gtk_table_set_col_spacing (GTK_TABLE (table), 0, 4);
gtk_table_set_row_spacings (GTK_TABLE (table), 1);
gtk_box_pack_start (GTK_BOX (vbox), table, FALSE, FALSE, 0);
......@@ -296,8 +299,8 @@ airbrush_motion (PaintCore *paint_core,
/* paste the newly painted area to the image */
paint_core_paste_canvas (paint_core, drawable,
opacity,
(int) (gimp_brush_get_opacity () * 255),
gimp_brush_get_paint_mode (),
(int) (PAINT_OPTIONS_GET_OPACITY (airbrush_options) * 255),
PAINT_OPTIONS_GET_PAINT_MODE (airbrush_options),
SOFT, CONSTANT);
}
......
......@@ -33,6 +33,7 @@
#include "gradient.h"
#include "interface.h"
#include "paint_funcs.h"
#include "paint_options.h"
#include "palette.h"
#include "selection.h"
#include "tool_options_ui.h"
......@@ -75,15 +76,7 @@ struct _BlendTool
typedef struct _BlendOptions BlendOptions;
struct _BlendOptions
{
ToolOptions tool_options;
double opacity;
double opacity_d;
GtkObject *opacity_w;
int paint_mode;
int paint_mode_d;
GtkWidget *paint_mode_w;
PaintOptions paint_options;
double offset;
double offset_d;
......@@ -152,7 +145,6 @@ static PixelRegion distR =
/* local function prototypes */
static void gradient_type_callback (GtkWidget *, gpointer);
static void blend_mode_callback (GtkWidget *, gpointer);
static void paint_mode_callback (GtkWidget *, gpointer);
static void repeat_type_callback (GtkWidget *, gpointer);
static void blend_button_press (Tool *, GdkEventButton *, gpointer);
......@@ -203,13 +195,6 @@ static void calc_hsv_to_rgb(double *h, double *s, double *v);
/* functions */
static void
paint_mode_callback (GtkWidget *w,
gpointer client_data)
{
blend_options->paint_mode = (long) client_data;
}
static void
blend_mode_callback (GtkWidget *w,
gpointer client_data)
......@@ -238,10 +223,7 @@ blend_options_reset ()
{
BlendOptions *options = blend_options;
gtk_adjustment_set_value (GTK_ADJUSTMENT (blend_options->opacity_w),
blend_options->opacity_d);
options->paint_mode = options->paint_mode_d;
gtk_option_menu_set_history (GTK_OPTION_MENU (options->paint_mode_w), 0);
paint_options_reset ((PaintOptions *) options);
options->blend_mode = options->blend_mode_d;
options->gradient_type = options->gradient_type_d;
......@@ -272,7 +254,6 @@ blend_options_new ()
GtkWidget *menu;
GtkWidget *table;
GtkWidget *scale;
GtkWidget *separator;
GtkWidget *frame;
static MenuItem blend_option_items[] =
......@@ -326,11 +307,9 @@ blend_options_new ()
/* the new blend tool options structure */
options = (BlendOptions *) g_malloc (sizeof (BlendOptions));
tool_options_init ((ToolOptions *) options,
_("Blend Options"),
blend_options_reset);
options->opacity = options->opacity_d = 100.0;
options->paint_mode = options->paint_mode_d = NORMAL;
paint_options_init ((PaintOptions *) options,
BLEND,
blend_options_reset);
options->offset = options->offset_d = 0.0;
options->blend_mode = options->blend_mode_d = FG_BG_RGB_MODE;
options->gradient_type = options->gradient_type_d = LINEAR;
......@@ -340,62 +319,13 @@ blend_options_new ()
options->threshold = options->threshold_d = 0.2;
/* the main vbox */
vbox = options->tool_options.main_vbox;
/* the opacity scale */
table = gtk_table_new (2, 2, FALSE);
gtk_table_set_col_spacing (GTK_TABLE (table), 0, 6);
gtk_table_set_row_spacing (GTK_TABLE (table), 0, 2);
gtk_box_pack_start (GTK_BOX (vbox), table, TRUE, TRUE, 0);
label = gtk_label_new (_("Opacity:"));
gtk_misc_set_alignment (GTK_MISC (label), 1.0, 1.0);
gtk_table_attach (GTK_TABLE (table), label, 0, 1, 0, 1,
GTK_SHRINK | GTK_FILL, GTK_SHRINK | GTK_FILL, 0, 0);
gtk_widget_show (label);
options->opacity_w =
gtk_adjustment_new (options->opacity_d, 0.0, 100.0, 1.0, 1.0, 0.0);
gtk_signal_connect (GTK_OBJECT (options->opacity_w), "value_changed",
(GtkSignalFunc) tool_options_double_adjustment_update,
&options->opacity);
scale = gtk_hscale_new (GTK_ADJUSTMENT (options->opacity_w));
gtk_scale_set_value_pos (GTK_SCALE (scale), GTK_POS_TOP);
gtk_range_set_update_policy (GTK_RANGE (scale), GTK_UPDATE_DELAYED);
gtk_table_attach_defaults (GTK_TABLE (table), scale, 1, 2, 0, 1);
gtk_widget_show (scale);
/* the paint mode menu */
label = gtk_label_new (_("Mode:"));
gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5);
gtk_table_attach (GTK_TABLE (table), label, 0, 1, 1, 2,
GTK_SHRINK | GTK_FILL, GTK_SHRINK | GTK_FILL, 0, 0);
gtk_widget_show (label);
abox = gtk_alignment_new (0.0, 0.5, 0.0, 0.0);
gtk_table_attach_defaults (GTK_TABLE (table), abox, 1, 2, 1, 2);
gtk_widget_show (abox);
options->paint_mode_w = gtk_option_menu_new ();
gtk_container_add (GTK_CONTAINER (abox), options->paint_mode_w);
gtk_widget_show (options->paint_mode_w);
menu = create_paint_mode_menu (paint_mode_callback, NULL);
gtk_option_menu_set_menu (GTK_OPTION_MENU (options->paint_mode_w), menu);
/* show the table */
gtk_widget_show (table);
/* a separator after the paint mode options */
separator = gtk_hseparator_new ();
gtk_box_pack_start (GTK_BOX (vbox), separator, FALSE, FALSE, 0);
gtk_widget_show (separator);
vbox = ((ToolOptions *) options)->main_vbox;
/* the offset scale */
table = gtk_table_new (4, 2, FALSE);
gtk_table_set_col_spacing (GTK_TABLE (table), 0, 6);
gtk_table_set_col_spacing (GTK_TABLE (table), 0, 4);
gtk_table_set_row_spacings (GTK_TABLE (table), 1);
gtk_table_set_row_spacing (GTK_TABLE (table), 0, 3);
gtk_table_set_row_spacing (GTK_TABLE (table), 0, 2);
gtk_box_pack_start (GTK_BOX (vbox), table, TRUE, TRUE, 0);
label = gtk_label_new (_("Offset:"));
......@@ -497,7 +427,7 @@ blend_options_new ()
/* table for supersampling options */
table = gtk_table_new (2, 2, FALSE);
gtk_container_set_border_width (GTK_CONTAINER (table), 2);
gtk_table_set_col_spacing (GTK_TABLE (table), 0, 6);
gtk_table_set_col_spacing (GTK_TABLE (table), 0, 4);
gtk_table_set_row_spacings (GTK_TABLE (table), 1);
gtk_box_pack_start (GTK_BOX (vbox), table, FALSE, FALSE, 0);
......@@ -633,9 +563,9 @@ blend_button_release (Tool *tool,
&nreturn_vals,
PDB_DRAWABLE, drawable_ID (gimage_active_drawable (gimage)),
PDB_INT32, (gint32) blend_options->blend_mode,
PDB_INT32, (gint32) blend_options->paint_mode,
PDB_INT32, (gint32) PAINT_OPTIONS_GET_PAINT_MODE (blend_options),
PDB_INT32, (gint32) blend_options->gradient_type,
PDB_FLOAT, (gdouble) blend_options->opacity,
PDB_FLOAT, (gdouble) PAINT_OPTIONS_GET_OPACITY (blend_options) * 100,
PDB_FLOAT, (gdouble) blend_options->offset,
PDB_INT32, (gint32) blend_options->repeat,
PDB_INT32, (gint32) blend_options->supersample,
......@@ -661,9 +591,9 @@ blend_button_release (Tool *tool,
blend (gimage,
gimage_active_drawable (gimage),
blend_options->blend_mode,
blend_options->paint_mode,
PAINT_OPTIONS_GET_PAINT_MODE (blend_options),
blend_options->gradient_type,
blend_options->opacity,
PAINT_OPTIONS_GET_OPACITY (blend_options) * 100,
blend_options->offset,
blend_options->repeat,
blend_options->supersample,
......
This diff is collapsed.
......@@ -18,60 +18,81 @@
#ifndef __BRUSH_SELECT_H__
#define __BRUSH_SELECT_H__
#include "procedural_db.h"
#include "buildmenu.h"
#include <gtk/gtk.h>
#include "gimpbrush.h"
#include "procedural_db.h"
typedef struct _BrushSelect _BrushSelect, *BrushSelectP;
struct _BrushSelect {
GtkWidget *shell;
/* Place holders which enable global<->per-tool paint options switching */
GtkWidget *left_box;
GtkWidget *right_box;
GtkWidget *brush_selection_box;
GtkWidget *paint_options_box;
GtkWidget *frame;
GtkWidget *preview;
GtkWidget *brush_name;
GtkWidget *brush_size;
GtkWidget *options_box;
GtkAdjustment *opacity_data;
GtkAdjustment *spacing_data;
GtkAdjustment *sbar_data;
GtkWidget *edit_button;
GtkWidget *option_menu;
int width, height;
int cell_width, cell_height;
int scroll_offset;
int redraw;
/* Brush preview */
/* Brush preview */
GtkWidget *brush_popup;
GtkWidget *brush_preview;
/* Call back function name */
gchar * callback_name;
/* current brush */
gchar *callback_name;
/* Current brush */
GimpBrushP brush;
/* Stuff for current selection */
int old_row;
int old_col;
gint spacing_value;
/* Current paint options */
gdouble opacity_value;
gint spacing_value;
gint paint_mode;
/* To calc column pos. */
gint paint_mode;
/* Some variables to keep the GUI consistent */
int width, height;
int cell_width, cell_height;
int scroll_offset;
int redraw;
int old_row;
int old_col;
gint NUM_BRUSH_COLUMNS;
gint NUM_BRUSH_ROWS;
};
BrushSelectP brush_select_new (gchar *,
gchar *, /* These are the required initial vals*/
gdouble, /* If init_name == NULL then
* use current brush
*/
gint,
gint);
void brush_select_select (BrushSelectP, int);
void brush_select_free (BrushSelectP);
void brush_change_callbacks (BrushSelectP,gint);
void brushes_check_dialogs(void);
/* An interface to other dialogs which need to create a paint mode menu */
GtkWidget * create_paint_mode_menu (MenuItemCallback, gpointer);
BrushSelectP brush_select_new (gchar *title,
/* These are the required initial vals
* If init_name == NULL then use current brush
*/
gchar *init_name,
gdouble init_opacity,
gint init_spacing,
gint init_mode);
void brush_select_free (BrushSelectP bsp);
void brush_select_select (BrushSelectP bsp,
int index);
void brush_change_callbacks (BrushSelectP bsp,
gint closing);
void brushes_check_dialogs (void);
/* show/hide paint options (main brush dialog if bsp == NULL) */
void brush_select_show_paint_options (BrushSelectP bsp,
gboolean show);
/* PDB entry */
extern ProcRecord brushes_popup_proc;
......
......@@ -26,6 +26,7 @@
#include "gimage_mask.h"
#include "interface.h"
#include "paint_funcs.h"
#include "paint_options.h"
#include "palette.h"
#include "patterns.h"
#include "selection.h"
......@@ -47,15 +48,7 @@ struct _BucketTool
typedef struct _BucketOptions BucketOptions;
struct _BucketOptions
{
ToolOptions tool_options;
double opacity;
double opacity_d;
GtkObject *opacity_w;
int paint_mode;
int paint_mode_d;
GtkWidget *paint_mode_w;
PaintOptions paint_options;
double threshold;
double threshold_d;
......@@ -100,23 +93,12 @@ bucket_fill_mode_callback (GtkWidget *widget,
bucket_options->fill_mode = (BucketFillMode) client_data;
}
static void
bucket_fill_paint_mode_callback (GtkWidget *widget,
gpointer client_data)
{
bucket_options->paint_mode = (long) client_data;
}
static void
bucket_options_reset (void)
{
BucketOptions *options = bucket_options;
options->paint_mode = options->paint_mode_d;
gtk_adjustment_set_value (GTK_ADJUSTMENT (options->opacity_w),
options->opacity_d);
gtk_option_menu_set_history (GTK_OPTION_MENU (options->paint_mode_w), 0);
paint_options_reset ((PaintOptions *) options);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (options->sample_merged_w),
options->sample_merged_d);
......@@ -134,17 +116,13 @@ bucket_options_new (void)
BucketOptions *options;
GtkWidget *vbox;
GtkWidget *table;
GtkWidget *hbox;
GtkWidget *abox;
GtkWidget *label;
GtkWidget *scale;
GtkWidget *menu;
GSList *group = NULL;
GtkWidget *radio_frame;
GtkWidget *radio_box;
GtkWidget *radio_button;
GtkWidget *separator;
int i;
char *button_names[2] =
......@@ -155,69 +133,18 @@ bucket_options_new (void)
/* the new bucket fill tool options structure */
options = (BucketOptions *) g_malloc (sizeof (BucketOptions));
tool_options_init ((ToolOptions *) options,
_("Bucket Fill Options"),
bucket_options_reset);
options->opacity = options->opacity_d = 100.0;
options->paint_mode = options->paint_mode_d = NORMAL;
paint_options_init ((PaintOptions *) options,
BUCKET_FILL,
bucket_options_reset);
options->sample_merged = options->sample_merged_d = FALSE;
options->threshold = options->threshold_d = 15.0;
options->fill_mode = options->fill_mode_d = FG_BUCKET_FILL;
/* the main vbox */
vbox = options->tool_options.main_vbox;
/* the opacity scale */
table = gtk_table_new (2, 2, FALSE);
gtk_table_set_col_spacing (GTK_TABLE (table), 0, 6);
gtk_table_set_row_spacing (GTK_TABLE (table), 0, 2);
gtk_box_pack_start (GTK_BOX (vbox), table, FALSE, FALSE, 0);
label = gtk_label_new (_("Opacity:"));
gtk_misc_set_alignment (GTK_MISC (label), 1.0, 1.0);
gtk_table_attach (GTK_TABLE (table), label, 0, 1, 0, 1,
GTK_SHRINK | GTK_FILL, GTK_SHRINK | GTK_FILL, 0, 0);
gtk_widget_show (label);
options->opacity_w =
gtk_adjustment_new (options->opacity_d, 0.0, 100.0, 1.0, 1.0, 0.0);
scale = gtk_hscale_new (GTK_ADJUSTMENT (options->opacity_w));
gtk_table_attach_defaults (GTK_TABLE (table), scale, 1, 2, 0, 1);
gtk_scale_set_value_pos (GTK_SCALE (scale), GTK_POS_TOP);
gtk_range_set_update_policy (GTK_RANGE (scale), GTK_UPDATE_DELAYED);
gtk_signal_connect (GTK_OBJECT (options->opacity_w), "value_changed",
(GtkSignalFunc) tool_options_double_adjustment_update,
&options->opacity);
gtk_widget_show (scale);
/* the paint mode menu */
label = gtk_label_new (_("Mode:"));
gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5);
gtk_table_attach (GTK_TABLE (table), label, 0, 1, 1, 2,
GTK_SHRINK | GTK_FILL, GTK_SHRINK | GTK_FILL, 0, 0);
gtk_widget_show (label);
abox = gtk_alignment_new (0.0, 0.5, 0.0, 0.0);
gtk_table_attach_defaults (GTK_TABLE (table), abox, 1, 2, 1, 2);
gtk_widget_show (abox);
options->paint_mode_w = gtk_option_menu_new ();
gtk_container_add (GTK_CONTAINER (abox), options->paint_mode_w);
gtk_widget_show (options->paint_mode_w);
menu = create_paint_mode_menu (bucket_fill_paint_mode_callback, NULL);
gtk_option_menu_set_menu (GTK_OPTION_MENU (options->paint_mode_w), menu);
/* show the table */
gtk_widget_show (table);
/* a separator after the paint mode options */
separator = gtk_hseparator_new ();
gtk_box_pack_start (GTK_BOX (vbox), separator, FALSE, FALSE, 0);
gtk_widget_show (separator);
vbox = ((ToolOptions *) options)->main_vbox;
/* the threshold scale */
hbox = gtk_hbox_new (FALSE, 6);
hbox = gtk_hbox_new (FALSE, 4);
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
label = gtk_label_new (_("Threshold:"));
......@@ -335,8 +262,8 @@ bucket_fill_button_release (Tool *tool,
&nreturn_vals,
PDB_DRAWABLE, drawable_ID (gimage_active_drawable (gdisp->gimage)),
PDB_INT32, (gint32) fill_mode,
PDB_INT32, (gint32) bucket_options->paint_mode,
PDB_FLOAT, (gdouble) bucket_options->opacity,
PDB_INT32, (gint32) PAINT_OPTIONS_GET_PAINT_MODE (bucket_options),
PDB_FLOAT, (gdouble) PAINT_OPTIONS_GET_OPACITY (bucket_options) * 100,
PDB_FLOAT, (gdouble) bucket_options->threshold,
PDB_INT32, (gint32) bucket_options->sample_merged,
PDB_FLOAT, (gdouble) bucket_tool->target_x,
......
......@@ -18,6 +18,8 @@
#ifndef __BUILDMENU_H__
#define __BUILDMENU_H__
#include <gtk/gtk.h>
#define PULLDOWN 0
#define POPUP 1
#define OPTION 2
......
......@@ -18,7 +18,6 @@
#include <stdlib.h>
#include <string.h>
#include "appenv.h"
#include "gimpbrushlist.h"
#include "drawable.h"
#include "errors.h"
#include "gdisplay.h"
......@@ -26,6 +25,7 @@
#include "interface.h"
#include "paint_funcs.h"
#include "paint_core.h"
#include "paint_options.h"
#include "patterns.h"
#include "clone.h"
#include "selection.h"
......@@ -48,15 +48,15 @@ typedef enum
typedef struct _CloneOptions CloneOptions;
struct _CloneOptions
{
ToolOptions tool_options;
PaintOptions paint_options;
CloneType type;
CloneType type_d;
GtkWidget *type_w[2]; /* 2 radio buttons */
CloneType type;
CloneType type_d;
GtkWidget *type_w[2]; /* 2 radio buttons */
AlignType aligned;
AlignType aligned_d;
GtkWidget *aligned_w[3]; /* 3 radio buttons */
AlignType aligned;
AlignType aligned_d;
GtkWidget *aligned_w[3]; /* 3 radio buttons */
};
......@@ -111,6 +111,8 @@ clone_options_reset (void)
{
CloneOptions *options = clone_options;
paint_options_reset ((PaintOptions *) options);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (options->type_w[options->type_d]), TRUE);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (options->aligned_w[options->aligned_d]), TRUE);
}
......@@ -141,14 +143,14 @@ clone_options_new (void)
/* the new clone tool options structure */
options = (CloneOptions *) g_malloc (sizeof (CloneOptions));
tool_options_init ((ToolOptions *) options,
_("Clone Tool Options"),
clone_options_reset);
paint_options_init ((PaintOptions *)