Commit c82adc22 authored by Karine Delvare's avatar Karine Delvare Committed by Karine Delvare
Browse files

app/tools/gimpcropoptions.c app/tools/gimprectangleoptions.[ch] moved

2006-03-26  Karine Delvare  <edhel@gimp.org>

	* app/tools/gimpcropoptions.c
	* app/tools/gimprectangleoptions.[ch]
	* app/tools/gimprectangletool.[ch]: moved options gui creation
	from the tool to the options.

	* app/tools/gimpselectionoptions.c
	* app/tools/gimpnewrectselecttool.[ch]
	* app/tools/gimpellipseselecttool.[ch]: ported ellipse selection
	tool to the new rectangle interface.
parent 2ed407b5
2006-03-26 Karine Delvare <edhel@gimp.org>
* app/tools/gimpcropoptions.c
* app/tools/gimprectangleoptions.[ch]
* app/tools/gimprectangletool.[ch]: moved options gui creation
from the tool to the options.
* app/tools/gimpselectionoptions.c
* app/tools/gimpnewrectselecttool.[ch]
* app/tools/gimpellipseselecttool.[ch]: ported ellipse selection
tool to the new rectangle interface.
2006-03-25 Michael Natterer <mitch@gimp.org>
 
* app/tools/gimptool.[ch]
......
......@@ -112,6 +112,7 @@ gimp_crop_options_set_property (GObject *object,
case GIMP_RECTANGLE_OPTIONS_PROP_CENTER_X:
case GIMP_RECTANGLE_OPTIONS_PROP_CENTER_Y:
case GIMP_RECTANGLE_OPTIONS_PROP_UNIT:
case GIMP_RECTANGLE_OPTIONS_PROP_DIMENSIONS_ENTRY:
gimp_rectangle_options_set_property (object, property_id, value, pspec);
break;
case PROP_LAYER_ONLY:
......@@ -147,6 +148,7 @@ gimp_crop_options_get_property (GObject *object,
case GIMP_RECTANGLE_OPTIONS_PROP_CENTER_X:
case GIMP_RECTANGLE_OPTIONS_PROP_CENTER_Y:
case GIMP_RECTANGLE_OPTIONS_PROP_UNIT:
case GIMP_RECTANGLE_OPTIONS_PROP_DIMENSIONS_ENTRY:
gimp_rectangle_options_get_property (object, property_id, value, pspec);
break;
case PROP_LAYER_ONLY:
......
......@@ -36,7 +36,7 @@
#include "display/gimpdisplay.h"
#include "gimpellipseselecttool.h"
#include "gimpselectionoptions.h"
#include "gimpnewrectselectoptions.h"
#include "gimptoolcontrol.h"
#include "gimp-intl.h"
......@@ -44,15 +44,15 @@
static void gimp_ellipse_select_tool_draw (GimpDrawTool *draw_tool);
static void gimp_ellipse_select_tool_rect_select (GimpRectSelectTool *rect_tool,
gint x,
gint y,
gint w,
gint h);
static void gimp_ellipse_select_tool_rect_select (GimpNewRectSelectTool *rect_tool,
gint x,
gint y,
gint w,
gint h);
G_DEFINE_TYPE (GimpEllipseSelectTool, gimp_ellipse_select_tool,
GIMP_TYPE_RECT_SELECT_TOOL);
GIMP_TYPE_NEW_RECT_SELECT_TOOL);
#define parent_class gimp_ellipse_select_tool_parent_class
......@@ -64,8 +64,8 @@ gimp_ellipse_select_tool_register (GimpToolRegisterCallback callback,
gpointer data)
{
(* callback) (GIMP_TYPE_ELLIPSE_SELECT_TOOL,
GIMP_TYPE_SELECTION_OPTIONS,
gimp_selection_options_gui,
GIMP_TYPE_NEW_RECT_SELECT_OPTIONS,
gimp_new_rect_select_options_gui,
0,
"gimp-ellipse-select-tool",
_("Ellipse Select"),
......@@ -82,11 +82,11 @@ gimp_ellipse_select_tool_register (GimpToolRegisterCallback callback,
static void
gimp_ellipse_select_tool_class_init (GimpEllipseSelectToolClass *klass)
{
GimpDrawToolClass *draw_tool_class;
GimpRectSelectToolClass *rect_tool_class;
GimpDrawToolClass *draw_tool_class;
GimpNewRectSelectToolClass *rect_tool_class;
draw_tool_class = GIMP_DRAW_TOOL_CLASS (klass);
rect_tool_class = GIMP_RECT_SELECT_TOOL_CLASS (klass);
rect_tool_class = GIMP_NEW_RECT_SELECT_TOOL_CLASS (klass);
draw_tool_class->draw = gimp_ellipse_select_tool_draw;
......@@ -105,34 +105,41 @@ gimp_ellipse_select_tool_init (GimpEllipseSelectTool *ellipse_select)
static void
gimp_ellipse_select_tool_draw (GimpDrawTool *draw_tool)
{
GimpRectSelectTool *rect_sel = GIMP_RECT_SELECT_TOOL (draw_tool);
GimpNewRectSelectTool *rect_sel = GIMP_NEW_RECT_SELECT_TOOL (draw_tool);
gint x1, y1;
gint x2, y2;
g_object_get (rect_sel,
"x1", &x1,
"y1", &y1,
"x2", &x2,
"y2", &y2,
NULL);
gimp_draw_tool_draw_arc (draw_tool,
FALSE,
rect_sel->x, rect_sel->y,
rect_sel->w, rect_sel->h,
x1, y1,
x2 - x1, y2 - y1,
0, 23040,
FALSE);
}
static void
gimp_ellipse_select_tool_rect_select (GimpRectSelectTool *rect_tool,
gint x,
gint y,
gint w,
gint h)
gimp_ellipse_select_tool_rect_select (GimpNewRectSelectTool *rect_tool,
gint x,
gint y,
gint w,
gint h)
{
GimpTool *tool;
GimpSelectionTool *sel_tool;
GimpSelectionOptions *options;
tool = GIMP_TOOL (rect_tool);
sel_tool = GIMP_SELECTION_TOOL (rect_tool);
options = GIMP_SELECTION_OPTIONS (tool->tool_info->tool_options);
gimp_channel_select_ellipse (gimp_image_get_mask (tool->gdisp->gimage),
x, y, w, h,
sel_tool->op,
options->operation,
options->antialias,
options->feather,
options->feather_radius,
......
......@@ -20,7 +20,7 @@
#define __GIMP_ELLIPSE_SELECT_TOOL_H__
#include "gimprectselecttool.h"
#include "gimpnewrectselecttool.h"
#define GIMP_TYPE_ELLIPSE_SELECT_TOOL (gimp_ellipse_select_tool_get_type ())
......@@ -36,12 +36,12 @@ typedef struct _GimpEllipseSelectToolClass GimpEllipseSelectToolClass;
struct _GimpEllipseSelectTool
{
GimpRectSelectTool parent_instance;
GimpNewRectSelectTool parent_instance;
};
struct _GimpEllipseSelectToolClass
{
GimpRectSelectToolClass parent_class;
GimpNewRectSelectToolClass parent_class;
};
......
......@@ -85,6 +85,11 @@ static gboolean gimp_new_rect_select_tool_execute (GimpRectangleTool *rec
gint y,
gint w,
gint h);
static void gimp_new_rect_select_tool_real_rect_select (GimpNewRectSelectTool *rect_select,
gint x,
gint y,
gint w,
gint h);
G_DEFINE_TYPE_WITH_CODE (GimpNewRectSelectTool, gimp_new_rect_select_tool,
......@@ -138,6 +143,8 @@ gimp_new_rect_select_tool_class_init (GimpNewRectSelectToolClass *klass)
tool_class->cursor_update = gimp_rectangle_tool_cursor_update;
draw_tool_class->draw = gimp_rectangle_tool_draw;
klass->rect_select = gimp_new_rect_select_tool_real_rect_select;
}
static void
......@@ -263,18 +270,19 @@ gimp_new_rect_select_tool_execute (GimpRectangleTool *rectangle,
gint w,
gint h)
{
GimpTool *tool = GIMP_TOOL (rectangle);
GimpSelectionOptions *options;
GimpImage *gimage;
gint max_x, max_y;
gboolean rectangle_exists;
gboolean selected;
gint val;
GimpChannel *selection_mask;
gint x1, y1;
gint x2, y2;
gint pressx, pressy;
guchar *val_ptr;
GimpTool *tool = GIMP_TOOL (rectangle);
GimpNewRectSelectTool *rect_select = GIMP_NEW_RECT_SELECT_TOOL (rectangle);
GimpSelectionOptions *options;
GimpImage *gimage;
gint max_x, max_y;
gboolean rectangle_exists;
gboolean selected;
gint val;
GimpChannel *selection_mask;
gint x1, y1;
gint x2, y2;
gint pressx, pressy;
guchar *val_ptr;
options = GIMP_SELECTION_OPTIONS (tool->tool_info->tool_options);
......@@ -310,14 +318,8 @@ gimp_new_rect_select_tool_execute (GimpRectangleTool *rectangle,
/* if rectangle exists, turn it into a selection */
if (rectangle_exists)
{
GimpChannel *selection_mask = gimp_image_get_mask (gimage);
gimp_channel_select_rectangle (selection_mask,
x, y, w, h,
options->operation,
options->feather,
options->feather_radius,
options->feather_radius);
GIMP_NEW_RECT_SELECT_TOOL_GET_CLASS (rect_select)->rect_select (rect_select, x, y, w, h);
return TRUE;
}
......@@ -396,3 +398,23 @@ gimp_new_rect_select_tool_execute (GimpRectangleTool *rectangle,
return TRUE;
}
static void
gimp_new_rect_select_tool_real_rect_select (GimpNewRectSelectTool *rect_select,
gint x,
gint y,
gint w,
gint h)
{
GimpTool *tool = GIMP_TOOL (rect_select);
GimpSelectionOptions *options;
options = GIMP_SELECTION_OPTIONS (tool->tool_info->tool_options);
gimp_channel_select_rectangle (gimp_image_get_mask (tool->gdisp->gimage),
x, y, w, h,
options->operation,
options->feather,
options->feather_radius,
options->feather_radius);
}
......@@ -26,7 +26,7 @@
#define GIMP_NEW_RECT_SELECT_TOOL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_NEW_RECT_SELECT_TOOL, GimpNewRectSelectTool))
#define GIMP_NEW_RECT_SELECT_TOOL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_NEW_RECT_SELECT_TOOL, GimpNewRectSelectToolClass))
#define GIMP_IS_NEW_RECT_SELECT_TOOL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_NEW_RECT_SELECT_TOOL))
#define GIMP_IS_NEW_RECT_SELECT_TOOL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_NEW_RECT_SELECT_TOOL))
#define GIMP_IS_NEW_RECT_SELECT_TOOL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_NEW_RECT_SELECT_TOOL))
#define GIMP_NEW_RECT_SELECT_TOOL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_NEW_RECT_SELECT_TOOL, GimpNewRectSelectToolClass))
......@@ -41,6 +41,12 @@ struct _GimpNewRectSelectTool
struct _GimpNewRectSelectToolClass
{
GimpSelectionToolClass parent_class;
void (* rect_select) (GimpNewRectSelectTool *rect_select,
gint x,
gint y,
gint w,
gint h);
};
......
......@@ -54,6 +54,8 @@ struct _GimpRectangleOptionsPrivate
gdouble center_y;
GimpUnit unit;
GtkWidget *dimensions_entry;
};
static void gimp_rectangle_options_iface_base_init (GimpRectangleOptionsInterface *rectangle_options_iface);
......@@ -100,6 +102,13 @@ void gimp_rectangle_options_set_unit (GimpRectangleOptions *op
GimpUnit unit);
GimpUnit gimp_rectangle_options_get_unit (GimpRectangleOptions *options);
void gimp_rectangle_options_set_entry (GimpRectangleOptions *options,
GtkWidget *entry);
GtkWidget * gimp_rectangle_options_get_entry (GimpRectangleOptions *options);
static void rectangle_dimensions_changed (GtkWidget *widget,
GimpRectangleOptions *options);
GType
gimp_rectangle_options_interface_get_type (void)
......@@ -204,6 +213,12 @@ gimp_rectangle_options_iface_base_init (GimpRectangleOptionsInterface *options_i
GIMP_UNIT_PIXEL,
GIMP_PARAM_READWRITE));
g_object_interface_install_property (options_iface,
g_param_spec_object ("dimensions-entry",
NULL, NULL,
GTK_TYPE_WIDGET,
GIMP_PARAM_READWRITE));
initialized = TRUE;
}
}
......@@ -300,6 +315,9 @@ gimp_rectangle_options_install_properties (GObjectClass *klass)
g_object_class_override_property (klass,
GIMP_RECTANGLE_OPTIONS_PROP_UNIT,
"unit");
g_object_class_override_property (klass,
GIMP_RECTANGLE_OPTIONS_PROP_DIMENSIONS_ENTRY,
"dimensions-entry");
}
void
......@@ -588,6 +606,32 @@ gimp_rectangle_options_get_unit (GimpRectangleOptions *options)
return private->unit;
}
void
gimp_rectangle_options_set_entry (GimpRectangleOptions *options,
GtkWidget *entry)
{
GimpRectangleOptionsPrivate *private;
g_return_if_fail (GIMP_IS_RECTANGLE_OPTIONS (options));
private = GIMP_RECTANGLE_OPTIONS_GET_PRIVATE (options);
private->dimensions_entry = entry;
g_object_notify (G_OBJECT (options), "dimensions-entry");
}
GtkWidget *
gimp_rectangle_options_get_entry (GimpRectangleOptions *options)
{
GimpRectangleOptionsPrivate *private;
g_return_val_if_fail (GIMP_IS_RECTANGLE_OPTIONS (options), NULL);
private = GIMP_RECTANGLE_OPTIONS_GET_PRIVATE (options);
return private->dimensions_entry;
}
void
gimp_rectangle_options_set_property (GObject *object,
guint property_id,
......@@ -631,6 +675,9 @@ gimp_rectangle_options_set_property (GObject *object,
case GIMP_RECTANGLE_OPTIONS_PROP_UNIT:
gimp_rectangle_options_set_unit (options, g_value_get_int (value));
break;
case GIMP_RECTANGLE_OPTIONS_PROP_DIMENSIONS_ENTRY:
gimp_rectangle_options_set_entry (options, g_value_get_object (value));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
......@@ -680,6 +727,9 @@ gimp_rectangle_options_get_property (GObject *object,
case GIMP_RECTANGLE_OPTIONS_PROP_UNIT:
g_value_set_int (value, gimp_rectangle_options_get_unit (options));
break;
case GIMP_RECTANGLE_OPTIONS_PROP_DIMENSIONS_ENTRY:
g_value_set_object (value, gimp_rectangle_options_get_entry (options));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
......@@ -692,12 +742,12 @@ gimp_rectangle_options_gui (GimpToolOptions *tool_options)
GObject *config = G_OBJECT (tool_options);
GtkWidget *vbox;
GtkWidget *button;
GtkWidget *controls_container;
GtkWidget *table;
GtkWidget *entry;
GtkWidget *hbox;
GtkWidget *label;
GtkWidget *spinbutton;
GtkObject *adjustment;
vbox = gimp_tool_options_gui (tool_options);
......@@ -748,11 +798,52 @@ gimp_rectangle_options_gui (GimpToolOptions *tool_options)
gtk_widget_show (table);
controls_container = gtk_vbox_new (FALSE, 0);
gtk_box_pack_start (GTK_BOX (vbox), controls_container, FALSE, FALSE, 0);
gtk_widget_show (controls_container);
g_object_set_data (G_OBJECT (tool_options),
"controls-container", controls_container);
entry = gimp_size_entry_new (2, GIMP_UNIT_PIXEL, "%a",
TRUE, TRUE, FALSE, 4,
GIMP_SIZE_ENTRY_UPDATE_SIZE);
g_object_set (tool_options, "dimensions-entry", entry, NULL);
gtk_table_set_row_spacings (GTK_TABLE (entry), 3);
gtk_table_set_col_spacings (GTK_TABLE (entry), 3);
spinbutton = gimp_spin_button_new (&adjustment, 1, 0, 1, 1, 10, 1, 1, 2);
gtk_entry_set_width_chars (GTK_ENTRY (spinbutton), 4);
gimp_size_entry_add_field (GIMP_SIZE_ENTRY (entry),
GTK_SPIN_BUTTON (spinbutton), NULL);
gtk_table_attach_defaults (GTK_TABLE (entry), spinbutton, 1, 2, 2, 3);
gtk_widget_show (spinbutton);
spinbutton = gimp_spin_button_new (&adjustment, 1, 0, 1, 1, 10, 1, 1, 2);
gtk_entry_set_width_chars (GTK_ENTRY (spinbutton), 4);
gimp_size_entry_add_field (GIMP_SIZE_ENTRY (entry),
GTK_SPIN_BUTTON (spinbutton), NULL);
gtk_table_attach_defaults (GTK_TABLE (entry), spinbutton, 2, 3, 2, 3);
gtk_widget_show (spinbutton);
gimp_size_entry_attach_label (GIMP_SIZE_ENTRY (entry), _("1 "), 1, 0, 0.0);
gimp_size_entry_attach_label (GIMP_SIZE_ENTRY (entry), _("2 "), 2, 0, 0.0);
gimp_size_entry_attach_label (GIMP_SIZE_ENTRY (entry), _("X"), 0, 1, 0.5);
gimp_size_entry_attach_label (GIMP_SIZE_ENTRY (entry), _("Y"), 0, 2, 0.5);
gtk_box_pack_start (GTK_BOX (vbox), entry, FALSE, FALSE, 0);
g_signal_connect (entry, "value-changed",
G_CALLBACK (rectangle_dimensions_changed),
tool_options);
gtk_widget_show (entry);
gimp_size_entry_set_refval (GIMP_SIZE_ENTRY (entry), 0, 0);
gimp_size_entry_set_refval (GIMP_SIZE_ENTRY (entry), 1, 0);
gimp_size_entry_set_refval (GIMP_SIZE_ENTRY (entry), 2, 0);
gimp_size_entry_set_refval (GIMP_SIZE_ENTRY (entry), 3, 0);
return vbox;
}
static void
rectangle_dimensions_changed (GtkWidget *widget,
GimpRectangleOptions *options)
{
g_object_notify (G_OBJECT (options), "dimensions-entry");
}
......@@ -34,7 +34,8 @@ typedef enum
GIMP_RECTANGLE_OPTIONS_PROP_CENTER_X,
GIMP_RECTANGLE_OPTIONS_PROP_CENTER_Y,
GIMP_RECTANGLE_OPTIONS_PROP_UNIT,
GIMP_RECTANGLE_OPTIONS_PROP_LAST = GIMP_RECTANGLE_OPTIONS_PROP_UNIT
GIMP_RECTANGLE_OPTIONS_PROP_DIMENSIONS_ENTRY,
GIMP_RECTANGLE_OPTIONS_PROP_LAST = GIMP_RECTANGLE_OPTIONS_PROP_DIMENSIONS_ENTRY
} GimpRectangleOptionsProp;
......
......@@ -85,6 +85,11 @@ static gboolean gimp_new_rect_select_tool_execute (GimpRectangleTool *rec
gint y,
gint w,
gint h);
static void gimp_new_rect_select_tool_real_rect_select (GimpNewRectSelectTool *rect_select,
gint x,
gint y,
gint w,
gint h);
G_DEFINE_TYPE_WITH_CODE (GimpNewRectSelectTool, gimp_new_rect_select_tool,
......@@ -138,6 +143,8 @@ gimp_new_rect_select_tool_class_init (GimpNewRectSelectToolClass *klass)
tool_class->cursor_update = gimp_rectangle_tool_cursor_update;
draw_tool_class->draw = gimp_rectangle_tool_draw;
klass->rect_select = gimp_new_rect_select_tool_real_rect_select;
}
static void
......@@ -263,18 +270,19 @@ gimp_new_rect_select_tool_execute (GimpRectangleTool *rectangle,
gint w,
gint h)
{
GimpTool *tool = GIMP_TOOL (rectangle);
GimpSelectionOptions *options;
GimpImage *gimage;
gint max_x, max_y;
gboolean rectangle_exists;
gboolean selected;
gint val;
GimpChannel *selection_mask;
gint x1, y1;
gint x2, y2;
gint pressx, pressy;
guchar *val_ptr;
GimpTool *tool = GIMP_TOOL (rectangle);
GimpNewRectSelectTool *rect_select = GIMP_NEW_RECT_SELECT_TOOL (rectangle);
GimpSelectionOptions *options;
GimpImage *gimage;
gint max_x, max_y;
gboolean rectangle_exists;
gboolean selected;
gint val;
GimpChannel *selection_mask;
gint x1, y1;
gint x2, y2;
gint pressx, pressy;
guchar *val_ptr;
options = GIMP_SELECTION_OPTIONS (tool->tool_info->tool_options);
......@@ -310,14 +318,8 @@ gimp_new_rect_select_tool_execute (GimpRectangleTool *rectangle,
/* if rectangle exists, turn it into a selection */
if (rectangle_exists)
{
GimpChannel *selection_mask = gimp_image_get_mask (gimage);
gimp_channel_select_rectangle (selection_mask,
x, y, w, h,
options->operation,
options->feather,
options->feather_radius,
options->feather_radius);
GIMP_NEW_RECT_SELECT_TOOL_GET_CLASS (rect_select)->rect_select (rect_select, x, y, w, h);
return TRUE;
}
......@@ -396,3 +398,23 @@ gimp_new_rect_select_tool_execute (GimpRectangleTool *rectangle,
return TRUE;
}
static void
gimp_new_rect_select_tool_real_rect_select (GimpNewRectSelectTool *rect_select,
gint x,
gint y,
gint w,
gint h)
{
GimpTool *tool = GIMP_TOOL (rect_select);
GimpSelectionOptions *options;
options = GIMP_SELECTION_OPTIONS (tool->tool_info->tool_options);
gimp_channel_select_rectangle (gimp_image_get_mask (tool->gdisp->gimage),
x, y, w, h,
options->operation,
options->feather,
options->feather_radius,
options->feather_radius);
}
......@@ -26,7 +26,7 @@
#define GIMP_NEW_RECT_SELECT_TOOL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_NEW_RECT_SELECT_TOOL, GimpNewRectSelectTool))
#define GIMP_NEW_RECT_SELECT_TOOL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_NEW_RECT_SELECT_TOOL, GimpNewRectSelectToolClass))
#define GIMP_IS_NEW_RECT_SELECT_TOOL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_NEW_RECT_SELECT_TOOL))
#define GIMP_IS_NEW_RECT_SELECT_TOOL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_NEW_RECT_SELECT_TOOL))
#define GIMP_IS_NEW_RECT_SELECT_TOOL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_NEW_RECT_SELECT_TOOL))
#define GIMP_NEW_RECT_SELECT_TOOL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_NEW_RECT_SELECT_TOOL, GimpNewRectSelectToolClass))
......@@ -41,6 +41,12 @@ struct _GimpNewRectSelectTool
struct _GimpNewRectSelectToolClass
{
GimpSelectionToolClass parent_class;
void (* rect_select) (GimpNewRectSelectTool *rect_select,
gint x,
gint y,
gint w,
gint h);
};
......
This diff is collapsed.
......@@ -27,10 +27,6 @@ typedef enum
GIMP_RECTANGLE_TOOL_PROP_0,
GIMP_RECTANGLE_TOOL_PROP_CONTROLS,
GIMP_RECTANGLE_TOOL_PROP_DIMENSIONS_ENTRY,
GIMP_RECTANGLE_TOOL_PROP_STARTX,
GIMP_RECTANGLE_TOOL_PROP_STARTY,
GIMP_RECTANGLE_TOOL_PROP_LASTX,
GIMP_RECTANGLE_TOOL_PROP_LASTY,
GIMP_RECTANGLE_TOOL_PROP_PRESSX,
GIMP_RECTANGLE_TOOL_PROP_PRESSY,
GIMP_RECTANGLE_TOOL_PROP_X1,
......@@ -38,17 +34,7 @@ typedef enum
GIMP_RECTANGLE_TOOL_PROP_X2,
GIMP_RECTANGLE_TOOL_PROP_Y2,
GIMP_RECTANGLE_TOOL_PROP_FUNCTION,
GIMP_RECTANGLE_TOOL_PROP_DX1,
GIMP_RECTANGLE_TOOL_PROP_DY1,
GIMP_RECTANGLE_TOOL_PROP_DX2,
GIMP_RECTANGLE_TOOL_PROP_DY2,
GIMP_RECTANGLE_TOOL_PROP_DCW,
GIMP_RECTANGLE_TOOL_PROP_DCH,
GIMP_RECTANGLE_TOOL_PROP_ORIGX,
GIMP_RECTANGLE_TOOL_PROP_ORIGY,
GIMP_RECTANGLE_TOOL_PROP_SIZEW,
GIMP_RECTANGLE_TOOL_PROP_SIZEH,
GIMP_RECTANGLE_TOOL_PROP_LAST = GIMP_RECTANGLE_TOOL_PROP_SIZEH
GIMP_RECTANGLE_TOOL_PROP_LAST = GIMP_RECTANGLE_TOOL_PROP_FUNCTION
} GimpRectangleToolProp;
#define GIMP_TYPE_RECTANGLE_TOOL (gimp_rectangle_tool_interface_get_type ())
......
......@@ -37,6 +37,7 @@
#include "gimpellipseselecttool.h"
#include "gimpforegroundselecttool.h"
#include "gimpnewrectselecttool.h"
#include "gimprectselecttool.h"
#include "gimpfuzzyselecttool.h"
#include "gimpiscissorstool.h"
#include "gimpselectionoptions.h"
......@@ -504,6 +505,7 @@ gimp_selection_options_gui (GimpToolOptions *tool_options)
/* widgets for fixed size select */
if (tool_options->tool_info->tool_type == GIMP_TYPE_RECT_SELECT_TOOL ||
tool_options->tool_info->tool_type == GIMP_TYPE_NEW_RECT_SELECT_TOOL ||
tool_options->tool_info->tool_type == GIMP_TYPE_ELLIPSE_SELECT_TOOL)
{
GtkWidget *frame;
......@@ -537,51 +539,54 @@ gimp_selection_options_gui (GimpToolOptions *tool_options)
gtk_box_pack_start (GTK_BOX (vbox2), button, FALSE, FALSE, 0);