mirror of https://github.com/GNOME/gimp.git
removed path_to_beziersel() so this file can be safely included from
2001-07-17 Michael Natterer <mitch@gimp.org> * app/path.[ch]: removed path_to_beziersel() so this file can be safely included from core/. * app/tools/gimpbezierselecttool.[ch]: added it here. * app/core/core-types.h: added a GimpToolOptions typedef. Removes deps into tools/ and will later be a core object anyway. * app/tools/tools-types.h: removed the ToolOptions typedef here. * app/core/gimpimage-duplicate.c * app/core/gimpimage-mask.c * app/core/gimpimage.c * app/core/gimptoolinfo.[ch]: removed deps into tools/, misc stuff. * app/tools/tool_manager.[ch]: some ugly temp hacks. Please ignore. * app/widgets/gimpdialogfactory.[ch]: added a "remember_if_open" field to the GimpDialogFactoryEntry so we can manage dialogs which should not be re-opened on startup. * app/gui/dialogs-constructors.c * app/gui/dialogs.c: register & create all editor dialog with the "global_dialog_factory". * app/gui/tool-options-dialog.c * app/tools/*: s/ToolOptions/GimpToolOptions/
This commit is contained in:
parent
284e178d4c
commit
b844c98549
ChangeLog
app
base
core
core-types.hgimpdrawable-blend.cgimpimage-duplicate.cgimpimage-guides.cgimpimage-mask.cgimpimage-merge.cgimpimage-pick-color.cgimpimage-projection.cgimpimage-resize.cgimpimage-scale.cgimpimage.cgimpprojection-construct.cgimptoolinfo.cgimptoolinfo.hgimptooloptions.cgimptooloptions.h
dialogs
gui
paint
gimpairbrush.cgimpclone.cgimpconvolve.cgimpdodgeburn.cgimperaser.cgimpink.cgimppaintbrush.cgimppencil.cgimpsmudge.cgimpsourcecore.c
path.cpath.htools
gimpairbrushtool.cgimpbezierselecttool.cgimpbezierselecttool.hgimpblendtool.cgimpbrightnesscontrasttool.cgimpbucketfilltool.cgimpbycolorselecttool.cgimpclonetool.cgimpcolorbalancetool.cgimpcolorpickertool.cgimpconvolvetool.cgimpcroptool.cgimpcurvestool.cgimpdodgeburntool.cgimpellipseselecttool.cgimperasertool.cgimpfliptool.cgimpfreeselecttool.cgimpfuzzyselecttool.cgimphistogramtool.cgimphuesaturationtool.cgimpinktool.cgimpiscissorstool.cgimplevelstool.cgimpmagnifytool.cgimpmeasuretool.cgimpmovetool.cgimppaintbrushtool.cgimppaintoptions-gui.cgimppaintoptions-gui.hgimppathtool.cgimppenciltool.cgimpperspectivetool.cgimpposterizetool.cgimprectselecttool.cgimpregionselecttool.cgimprotatetool.cgimpscaletool.cgimpselectionoptions.cgimpselectionoptions.hgimpsheartool.cgimpsmudgetool.cgimpsourcetool.cgimptexttool.cgimpthresholdtool.cgimptransformoptions.cgimptransformoptions.hpaint_options.cpaint_options.hpath_tool.cselection_options.cselection_options.htool_manager.ctool_manager.htool_options.ctool_options.htools-types.htransform_options.ctransform_options.h
widgets
30
ChangeLog
30
ChangeLog
|
@ -1,3 +1,33 @@
|
||||||
|
2001-07-17 Michael Natterer <mitch@gimp.org>
|
||||||
|
|
||||||
|
* app/path.[ch]: removed path_to_beziersel() so this file can be
|
||||||
|
safely included from core/.
|
||||||
|
|
||||||
|
* app/tools/gimpbezierselecttool.[ch]: added it here.
|
||||||
|
|
||||||
|
* app/core/core-types.h: added a GimpToolOptions typedef. Removes
|
||||||
|
deps into tools/ and will later be a core object anyway.
|
||||||
|
|
||||||
|
* app/tools/tools-types.h: removed the ToolOptions typedef here.
|
||||||
|
|
||||||
|
* app/core/gimpimage-duplicate.c
|
||||||
|
* app/core/gimpimage-mask.c
|
||||||
|
* app/core/gimpimage.c
|
||||||
|
* app/core/gimptoolinfo.[ch]: removed deps into tools/, misc stuff.
|
||||||
|
|
||||||
|
* app/tools/tool_manager.[ch]: some ugly temp hacks. Please ignore.
|
||||||
|
|
||||||
|
* app/widgets/gimpdialogfactory.[ch]: added a "remember_if_open" field
|
||||||
|
to the GimpDialogFactoryEntry so we can manage dialogs which should
|
||||||
|
not be re-opened on startup.
|
||||||
|
|
||||||
|
* app/gui/dialogs-constructors.c
|
||||||
|
* app/gui/dialogs.c: register & create all editor dialog with the
|
||||||
|
"global_dialog_factory".
|
||||||
|
|
||||||
|
* app/gui/tool-options-dialog.c
|
||||||
|
* app/tools/*: s/ToolOptions/GimpToolOptions/
|
||||||
|
|
||||||
2001-07-15 Michael Natterer <mitch@gimp.org>
|
2001-07-15 Michael Natterer <mitch@gimp.org>
|
||||||
|
|
||||||
* libgimpbase/gimpwire.c: remove the usage of printf()/scanf()
|
* libgimpbase/gimpwire.c: remove the usage of printf()/scanf()
|
||||||
|
|
|
@ -93,7 +93,7 @@ static void color_balance_yb_adjustment_update (GtkAdjustment *adj,
|
||||||
|
|
||||||
|
|
||||||
/* the color balance tool options */
|
/* the color balance tool options */
|
||||||
static ToolOptions *color_balance_options = NULL;
|
static GimpToolOptions *color_balance_options = NULL;
|
||||||
|
|
||||||
/* the color balance dialog */
|
/* the color balance dialog */
|
||||||
static ColorBalanceDialog *color_balance_dialog = NULL;
|
static ColorBalanceDialog *color_balance_dialog = NULL;
|
||||||
|
@ -173,7 +173,7 @@ gimp_color_balance_tool_init (GimpColorBalanceTool *bc_tool)
|
||||||
color_balance_options = tool_options_new ();
|
color_balance_options = tool_options_new ();
|
||||||
|
|
||||||
tool_manager_register_tool_options (GIMP_TYPE_COLOR_BALANCE_TOOL,
|
tool_manager_register_tool_options (GIMP_TYPE_COLOR_BALANCE_TOOL,
|
||||||
(ToolOptions *) color_balance_options);
|
(GimpToolOptions *) color_balance_options);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -175,7 +175,7 @@ static void curves_write_to_file (FILE *f);
|
||||||
|
|
||||||
|
|
||||||
/* the curves tool options */
|
/* the curves tool options */
|
||||||
static ToolOptions * curves_options = NULL;
|
static GimpToolOptions * curves_options = NULL;
|
||||||
|
|
||||||
/* the curves dialog */
|
/* the curves dialog */
|
||||||
static CurvesDialog * curves_dialog = NULL;
|
static CurvesDialog * curves_dialog = NULL;
|
||||||
|
@ -270,7 +270,7 @@ gimp_curves_tool_init (GimpCurvesTool *bc_tool)
|
||||||
curves_options = tool_options_new ();
|
curves_options = tool_options_new ();
|
||||||
|
|
||||||
tool_manager_register_tool_options (GIMP_TYPE_CURVES_TOOL,
|
tool_manager_register_tool_options (GIMP_TYPE_CURVES_TOOL,
|
||||||
(ToolOptions *) curves_options);
|
(GimpToolOptions *) curves_options);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -102,7 +102,7 @@ static gint hue_saturation_hue_partition_events (GtkWidget *,
|
||||||
|
|
||||||
|
|
||||||
/* the hue-saturation tool options */
|
/* the hue-saturation tool options */
|
||||||
static ToolOptions *hue_saturation_options = NULL;
|
static GimpToolOptions *hue_saturation_options = NULL;
|
||||||
|
|
||||||
/* the hue-saturation tool dialog */
|
/* the hue-saturation tool dialog */
|
||||||
static HueSaturationDialog *hue_saturation_dialog = NULL;
|
static HueSaturationDialog *hue_saturation_dialog = NULL;
|
||||||
|
@ -195,7 +195,7 @@ gimp_hue_saturation_tool_init (GimpHueSaturationTool *bc_tool)
|
||||||
hue_saturation_options = tool_options_new ();
|
hue_saturation_options = tool_options_new ();
|
||||||
|
|
||||||
tool_manager_register_tool_options (GIMP_TYPE_HUE_SATURATION_TOOL,
|
tool_manager_register_tool_options (GIMP_TYPE_HUE_SATURATION_TOOL,
|
||||||
(ToolOptions *) hue_saturation_options);
|
(GimpToolOptions *) hue_saturation_options);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -100,7 +100,7 @@ static void threshold_histogram_range (HistogramWidget *,
|
||||||
|
|
||||||
|
|
||||||
/* the threshold tool options */
|
/* the threshold tool options */
|
||||||
static ToolOptions *threshold_options = NULL;
|
static GimpToolOptions *threshold_options = NULL;
|
||||||
|
|
||||||
/* the threshold tool dialog */
|
/* the threshold tool dialog */
|
||||||
static ThresholdDialog *threshold_dialog = NULL;
|
static ThresholdDialog *threshold_dialog = NULL;
|
||||||
|
@ -178,7 +178,7 @@ gimp_threshold_tool_init (GimpThresholdTool *bc_tool)
|
||||||
threshold_options = tool_options_new ();
|
threshold_options = tool_options_new ();
|
||||||
|
|
||||||
tool_manager_register_tool_options (GIMP_TYPE_THRESHOLD_TOOL,
|
tool_manager_register_tool_options (GIMP_TYPE_THRESHOLD_TOOL,
|
||||||
(ToolOptions *) threshold_options);
|
(GimpToolOptions *) threshold_options);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -137,6 +137,11 @@ typedef struct _GimpGuide GimpGuide;
|
||||||
typedef struct _GimpImageNewValues GimpImageNewValues;
|
typedef struct _GimpImageNewValues GimpImageNewValues;
|
||||||
|
|
||||||
|
|
||||||
|
/* stuff which is forward declared here so we don't need to cross-include it */
|
||||||
|
|
||||||
|
typedef struct _GimpToolOptions GimpToolOptions;
|
||||||
|
|
||||||
|
|
||||||
/* functions */
|
/* functions */
|
||||||
|
|
||||||
typedef void (* GimpDataFileLoaderFunc) (const gchar *filename,
|
typedef void (* GimpDataFileLoaderFunc) (const gchar *filename,
|
||||||
|
|
|
@ -154,7 +154,7 @@ static void gimp_blend_tool_draw (GimpDrawTool *draw_tool);
|
||||||
|
|
||||||
static BlendOptions * blend_options_new (void);
|
static BlendOptions * blend_options_new (void);
|
||||||
|
|
||||||
static void blend_options_reset (ToolOptions *tool_options);
|
static void blend_options_reset (GimpToolOptions *tool_options);
|
||||||
|
|
||||||
static void gradient_type_callback (GtkWidget *widget,
|
static void gradient_type_callback (GtkWidget *widget,
|
||||||
gpointer data);
|
gpointer data);
|
||||||
|
@ -345,7 +345,7 @@ gimp_blend_tool_init (GimpBlendTool *blend_tool)
|
||||||
blend_options = blend_options_new ();
|
blend_options = blend_options_new ();
|
||||||
|
|
||||||
tool_manager_register_tool_options (GIMP_TYPE_BLEND_TOOL,
|
tool_manager_register_tool_options (GIMP_TYPE_BLEND_TOOL,
|
||||||
(ToolOptions *) blend_options);
|
(GimpToolOptions *) blend_options);
|
||||||
}
|
}
|
||||||
|
|
||||||
tool->tool_cursor = GIMP_BLEND_TOOL_CURSOR;
|
tool->tool_cursor = GIMP_BLEND_TOOL_CURSOR;
|
||||||
|
@ -670,7 +670,7 @@ blend_options_new (void)
|
||||||
options->threshold = options->threshold_d = 0.2;
|
options->threshold = options->threshold_d = 0.2;
|
||||||
|
|
||||||
/* the main vbox */
|
/* the main vbox */
|
||||||
vbox = ((ToolOptions *) options)->main_vbox;
|
vbox = ((GimpToolOptions *) options)->main_vbox;
|
||||||
|
|
||||||
/* dnd stuff */
|
/* dnd stuff */
|
||||||
gtk_drag_dest_set (vbox,
|
gtk_drag_dest_set (vbox,
|
||||||
|
@ -828,7 +828,7 @@ blend_options_new (void)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
blend_options_reset (ToolOptions *tool_options)
|
blend_options_reset (GimpToolOptions *tool_options)
|
||||||
{
|
{
|
||||||
BlendOptions *options;
|
BlendOptions *options;
|
||||||
|
|
||||||
|
|
|
@ -31,9 +31,6 @@
|
||||||
|
|
||||||
#include "paint-funcs/paint-funcs.h"
|
#include "paint-funcs/paint-funcs.h"
|
||||||
|
|
||||||
/* FIXME: remove the Path <-> BezierSelect dependency */
|
|
||||||
#include "tools/tools-types.h"
|
|
||||||
|
|
||||||
#include "gimp.h"
|
#include "gimp.h"
|
||||||
#include "gimpchannel.h"
|
#include "gimpchannel.h"
|
||||||
#include "gimpcontext.h"
|
#include "gimpcontext.h"
|
||||||
|
@ -45,7 +42,6 @@
|
||||||
#include "gimpparasitelist.h"
|
#include "gimpparasitelist.h"
|
||||||
|
|
||||||
#include "floating_sel.h"
|
#include "floating_sel.h"
|
||||||
#include "gdisplay.h"
|
|
||||||
#include "path.h"
|
#include "path.h"
|
||||||
|
|
||||||
#include "libgimp/gimpintl.h"
|
#include "libgimp/gimpintl.h"
|
||||||
|
|
|
@ -35,9 +35,6 @@
|
||||||
|
|
||||||
#include "paint-funcs/paint-funcs.h"
|
#include "paint-funcs/paint-funcs.h"
|
||||||
|
|
||||||
/* FIXME: remove the Path <-> BezierSelect dependency */
|
|
||||||
#include "tools/tools-types.h"
|
|
||||||
|
|
||||||
#include "gimp.h"
|
#include "gimp.h"
|
||||||
#include "gimpcontext.h"
|
#include "gimpcontext.h"
|
||||||
#include "gimpcoreconfig.h"
|
#include "gimpcoreconfig.h"
|
||||||
|
|
|
@ -645,7 +645,7 @@ gimage_mask_stroke (GimpImage *gimage,
|
||||||
GIMP_PDB_END);
|
GIMP_PDB_END);
|
||||||
|
|
||||||
if (return_vals && return_vals[0].value.pdb_int != GIMP_PDB_SUCCESS)
|
if (return_vals && return_vals[0].value.pdb_int != GIMP_PDB_SUCCESS)
|
||||||
g_message (_("Paintbrush operation failed."));
|
g_message (_("Paint operation failed."));
|
||||||
|
|
||||||
procedural_db_destroy_args (return_vals, nreturn_vals);
|
procedural_db_destroy_args (return_vals, nreturn_vals);
|
||||||
|
|
||||||
|
|
|
@ -35,9 +35,6 @@
|
||||||
|
|
||||||
#include "paint-funcs/paint-funcs.h"
|
#include "paint-funcs/paint-funcs.h"
|
||||||
|
|
||||||
/* FIXME: remove the Path <-> BezierSelect dependency */
|
|
||||||
#include "tools/tools-types.h"
|
|
||||||
|
|
||||||
#include "gimp.h"
|
#include "gimp.h"
|
||||||
#include "gimpcontext.h"
|
#include "gimpcontext.h"
|
||||||
#include "gimpcoreconfig.h"
|
#include "gimpcoreconfig.h"
|
||||||
|
|
|
@ -55,7 +55,7 @@ typedef struct _GimpColorPickerToolOptions GimpColorPickerToolOptions;
|
||||||
|
|
||||||
struct _GimpColorPickerToolOptions
|
struct _GimpColorPickerToolOptions
|
||||||
{
|
{
|
||||||
ToolOptions tool_options;
|
GimpToolOptions tool_options;
|
||||||
|
|
||||||
gboolean sample_merged;
|
gboolean sample_merged;
|
||||||
gboolean sample_merged_d;
|
gboolean sample_merged_d;
|
||||||
|
@ -108,7 +108,7 @@ static void gimp_color_picker_tool_draw (GimpDrawTool *draw_to
|
||||||
|
|
||||||
static GimpColorPickerToolOptions * gimp_color_picker_tool_options_new (void);
|
static GimpColorPickerToolOptions * gimp_color_picker_tool_options_new (void);
|
||||||
|
|
||||||
static void gimp_color_picker_tool_options_reset (ToolOptions *tool_options);
|
static void gimp_color_picker_tool_options_reset (GimpToolOptions *tool_options);
|
||||||
static void gimp_color_picker_tool_info_window_close_callback (GtkWidget *widget,
|
static void gimp_color_picker_tool_info_window_close_callback (GtkWidget *widget,
|
||||||
gpointer data);
|
gpointer data);
|
||||||
static void gimp_color_picker_tool_info_update (GimpTool *tool,
|
static void gimp_color_picker_tool_info_update (GimpTool *tool,
|
||||||
|
@ -224,7 +224,7 @@ gimp_color_picker_tool_init (GimpColorPickerTool *color_picker_tool)
|
||||||
gimp_color_picker_tool_options = gimp_color_picker_tool_options_new ();
|
gimp_color_picker_tool_options = gimp_color_picker_tool_options_new ();
|
||||||
|
|
||||||
tool_manager_register_tool_options (GIMP_TYPE_COLOR_PICKER_TOOL,
|
tool_manager_register_tool_options (GIMP_TYPE_COLOR_PICKER_TOOL,
|
||||||
(ToolOptions *) gimp_color_picker_tool_options);
|
(GimpToolOptions *) gimp_color_picker_tool_options);
|
||||||
}
|
}
|
||||||
|
|
||||||
tool->preserve = FALSE; /* Don't preserve on drawable change */
|
tool->preserve = FALSE; /* Don't preserve on drawable change */
|
||||||
|
@ -256,7 +256,7 @@ gimp_color_picker_tool_destroy (GtkObject *object)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gimp_color_picker_tool_options_reset (ToolOptions *tool_options)
|
gimp_color_picker_tool_options_reset (GimpToolOptions *tool_options)
|
||||||
{
|
{
|
||||||
GimpColorPickerToolOptions *options;
|
GimpColorPickerToolOptions *options;
|
||||||
|
|
||||||
|
@ -284,7 +284,7 @@ gimp_color_picker_tool_options_new (void)
|
||||||
GtkWidget *scale;
|
GtkWidget *scale;
|
||||||
|
|
||||||
options = g_new0 (GimpColorPickerToolOptions, 1);
|
options = g_new0 (GimpColorPickerToolOptions, 1);
|
||||||
tool_options_init ((ToolOptions *) options,
|
tool_options_init ((GimpToolOptions *) options,
|
||||||
gimp_color_picker_tool_options_reset);
|
gimp_color_picker_tool_options_reset);
|
||||||
|
|
||||||
options->sample_merged = options->sample_merged_d = FALSE;
|
options->sample_merged = options->sample_merged_d = FALSE;
|
||||||
|
|
|
@ -35,9 +35,6 @@
|
||||||
|
|
||||||
#include "paint-funcs/paint-funcs.h"
|
#include "paint-funcs/paint-funcs.h"
|
||||||
|
|
||||||
/* FIXME: remove the Path <-> BezierSelect dependency */
|
|
||||||
#include "tools/tools-types.h"
|
|
||||||
|
|
||||||
#include "gimp.h"
|
#include "gimp.h"
|
||||||
#include "gimpcontext.h"
|
#include "gimpcontext.h"
|
||||||
#include "gimpcoreconfig.h"
|
#include "gimpcoreconfig.h"
|
||||||
|
|
|
@ -35,9 +35,6 @@
|
||||||
|
|
||||||
#include "paint-funcs/paint-funcs.h"
|
#include "paint-funcs/paint-funcs.h"
|
||||||
|
|
||||||
/* FIXME: remove the Path <-> BezierSelect dependency */
|
|
||||||
#include "tools/tools-types.h"
|
|
||||||
|
|
||||||
#include "gimp.h"
|
#include "gimp.h"
|
||||||
#include "gimpcontext.h"
|
#include "gimpcontext.h"
|
||||||
#include "gimpcoreconfig.h"
|
#include "gimpcoreconfig.h"
|
||||||
|
|
|
@ -35,9 +35,6 @@
|
||||||
|
|
||||||
#include "paint-funcs/paint-funcs.h"
|
#include "paint-funcs/paint-funcs.h"
|
||||||
|
|
||||||
/* FIXME: remove the Path <-> BezierSelect dependency */
|
|
||||||
#include "tools/tools-types.h"
|
|
||||||
|
|
||||||
#include "gimp.h"
|
#include "gimp.h"
|
||||||
#include "gimpcontext.h"
|
#include "gimpcontext.h"
|
||||||
#include "gimpcoreconfig.h"
|
#include "gimpcoreconfig.h"
|
||||||
|
|
|
@ -35,9 +35,6 @@
|
||||||
|
|
||||||
#include "paint-funcs/paint-funcs.h"
|
#include "paint-funcs/paint-funcs.h"
|
||||||
|
|
||||||
/* FIXME: remove the Path <-> BezierSelect dependency */
|
|
||||||
#include "tools/tools-types.h"
|
|
||||||
|
|
||||||
#include "gimp.h"
|
#include "gimp.h"
|
||||||
#include "gimpcontext.h"
|
#include "gimpcontext.h"
|
||||||
#include "gimpcoreconfig.h"
|
#include "gimpcoreconfig.h"
|
||||||
|
|
|
@ -35,9 +35,6 @@
|
||||||
|
|
||||||
#include "paint-funcs/paint-funcs.h"
|
#include "paint-funcs/paint-funcs.h"
|
||||||
|
|
||||||
/* FIXME: remove the Path <-> BezierSelect dependency */
|
|
||||||
#include "tools/tools-types.h"
|
|
||||||
|
|
||||||
#include "gimp.h"
|
#include "gimp.h"
|
||||||
#include "gimpcontext.h"
|
#include "gimpcontext.h"
|
||||||
#include "gimpcoreconfig.h"
|
#include "gimpcoreconfig.h"
|
||||||
|
|
|
@ -210,6 +210,7 @@ gimp_tool_info_new (GimpContext *context,
|
||||||
const gchar *menu_accel,
|
const gchar *menu_accel,
|
||||||
const gchar *help_domain,
|
const gchar *help_domain,
|
||||||
const gchar *help_data,
|
const gchar *help_data,
|
||||||
|
const gchar *pdb_string,
|
||||||
const gchar **icon_data)
|
const gchar **icon_data)
|
||||||
{
|
{
|
||||||
GimpToolInfo *tool_info;
|
GimpToolInfo *tool_info;
|
||||||
|
@ -229,6 +230,9 @@ gimp_tool_info_new (GimpContext *context,
|
||||||
tool_info->help_domain = g_strdup (help_domain);
|
tool_info->help_domain = g_strdup (help_domain);
|
||||||
tool_info->help_data = g_strdup (help_data);
|
tool_info->help_data = g_strdup (help_data);
|
||||||
|
|
||||||
|
tool_info->pdb_string = (pdb_string ?
|
||||||
|
g_strdup (pdb_string) : "gimp_paintbrush_default");
|
||||||
|
|
||||||
tool_info->icon_data = icon_data;
|
tool_info->icon_data = icon_data;
|
||||||
|
|
||||||
if (tool_context)
|
if (tool_context)
|
||||||
|
@ -257,6 +261,7 @@ gimp_tool_info_get_standard (void)
|
||||||
"Well something must be broken",
|
"Well something must be broken",
|
||||||
NULL, NULL,
|
NULL, NULL,
|
||||||
NULL, NULL,
|
NULL, NULL,
|
||||||
|
NULL,
|
||||||
NULL);
|
NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -23,10 +23,6 @@
|
||||||
#include "gimpdata.h"
|
#include "gimpdata.h"
|
||||||
|
|
||||||
|
|
||||||
/* FIXME: the ToolOptions need to be an object living in core/ */
|
|
||||||
#include "tools/tools-types.h"
|
|
||||||
|
|
||||||
|
|
||||||
#define GIMP_TYPE_TOOL_INFO (gimp_tool_info_get_type ())
|
#define GIMP_TYPE_TOOL_INFO (gimp_tool_info_get_type ())
|
||||||
#define GIMP_TOOL_INFO(obj) (GTK_CHECK_CAST ((obj), GIMP_TYPE_TOOL_INFO, GimpToolInfo))
|
#define GIMP_TOOL_INFO(obj) (GTK_CHECK_CAST ((obj), GIMP_TYPE_TOOL_INFO, GimpToolInfo))
|
||||||
#define GIMP_IS_TOOL_INFO(obj) (GTK_CHECK_TYPE ((obj), GIMP_TYPE_TOOL_INFO))
|
#define GIMP_IS_TOOL_INFO(obj) (GTK_CHECK_TYPE ((obj), GIMP_TYPE_TOOL_INFO))
|
||||||
|
@ -52,11 +48,13 @@ struct _GimpToolInfo
|
||||||
gchar *help_domain;
|
gchar *help_domain;
|
||||||
gchar *help_data;
|
gchar *help_data;
|
||||||
|
|
||||||
|
gchar *pdb_string;
|
||||||
|
|
||||||
const gchar **icon_data;
|
const gchar **icon_data;
|
||||||
|
|
||||||
GimpContext *context;
|
GimpContext *context;
|
||||||
|
|
||||||
ToolOptions *tool_options;
|
GimpToolOptions *tool_options;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GimpToolInfoClass
|
struct _GimpToolInfoClass
|
||||||
|
@ -77,6 +75,7 @@ GimpToolInfo * gimp_tool_info_new (GimpContext *context,
|
||||||
const gchar *menu_accel,
|
const gchar *menu_accel,
|
||||||
const gchar *help_domain,
|
const gchar *help_domain,
|
||||||
const gchar *help_data,
|
const gchar *help_data,
|
||||||
|
const gchar *pdb_string,
|
||||||
const gchar **icon_data);
|
const gchar **icon_data);
|
||||||
|
|
||||||
GimpToolInfo * gimp_tool_info_get_standard (void);
|
GimpToolInfo * gimp_tool_info_get_standard (void);
|
||||||
|
|
|
@ -28,21 +28,20 @@
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
tool_options_init (ToolOptions *options,
|
tool_options_init (GimpToolOptions *options,
|
||||||
ToolOptionsResetFunc reset_func)
|
ToolOptionsResetFunc reset_func)
|
||||||
{
|
{
|
||||||
options->main_vbox = gtk_vbox_new (FALSE, 2);
|
options->main_vbox = gtk_vbox_new (FALSE, 2);
|
||||||
options->reset_func = reset_func;
|
options->reset_func = reset_func;
|
||||||
}
|
}
|
||||||
|
|
||||||
ToolOptions *
|
GimpToolOptions *
|
||||||
tool_options_new (void)
|
tool_options_new (void)
|
||||||
{
|
{
|
||||||
ToolOptions *options;
|
GimpToolOptions *options;
|
||||||
|
|
||||||
GtkWidget *label;
|
GtkWidget *label;
|
||||||
|
|
||||||
options = g_new0 (ToolOptions, 1);
|
options = g_new0 (GimpToolOptions, 1);
|
||||||
tool_options_init (options, NULL);
|
tool_options_init (options, NULL);
|
||||||
|
|
||||||
label = gtk_label_new (_("This tool has no options."));
|
label = gtk_label_new (_("This tool has no options."));
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
|
|
||||||
/* the tool options structures */
|
/* the tool options structures */
|
||||||
|
|
||||||
struct _ToolOptions
|
struct _GimpToolOptions
|
||||||
{
|
{
|
||||||
GtkWidget *main_vbox;
|
GtkWidget *main_vbox;
|
||||||
|
|
||||||
|
@ -32,12 +32,12 @@ struct _ToolOptions
|
||||||
/* create a dummy tool options structure
|
/* create a dummy tool options structure
|
||||||
* (to be used by tools without options)
|
* (to be used by tools without options)
|
||||||
*/
|
*/
|
||||||
ToolOptions * tool_options_new (void);
|
GimpToolOptions * tool_options_new (void);
|
||||||
|
|
||||||
/* initialize an already allocated ToolOptions structure
|
/* initialize an already allocated ToolOptions structure
|
||||||
* (to be used by derived tool options only)
|
* (to be used by derived tool options only)
|
||||||
*/
|
*/
|
||||||
void tool_options_init (ToolOptions *options,
|
void tool_options_init (GimpToolOptions *options,
|
||||||
ToolOptionsResetFunc reset_func);
|
ToolOptionsResetFunc reset_func);
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -56,6 +56,7 @@
|
||||||
#include "channels-commands.h"
|
#include "channels-commands.h"
|
||||||
#include "color-area.h"
|
#include "color-area.h"
|
||||||
#include "colormap-dialog.h"
|
#include "colormap-dialog.h"
|
||||||
|
#include "dialogs.h"
|
||||||
#include "devices.h"
|
#include "devices.h"
|
||||||
#include "dialogs-constructors.h"
|
#include "dialogs-constructors.h"
|
||||||
#include "docindex.h"
|
#include "docindex.h"
|
||||||
|
@ -90,6 +91,17 @@
|
||||||
#include "libgimp/gimpintl.h"
|
#include "libgimp/gimpintl.h"
|
||||||
|
|
||||||
|
|
||||||
|
/* FIXME: do something about this uglyness:
|
||||||
|
*/
|
||||||
|
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
GtkWidget *shell;
|
||||||
|
} EEKWrapper;
|
||||||
|
|
||||||
|
|
||||||
|
/* local function prototypes */
|
||||||
|
|
||||||
static void dialogs_indexed_palette_selected (GimpColormapDialog *dialog,
|
static void dialogs_indexed_palette_selected (GimpColormapDialog *dialog,
|
||||||
GimpDockable *dockable);
|
GimpDockable *dockable);
|
||||||
|
|
||||||
|
@ -137,6 +149,13 @@ static void dialogs_indexed_palette_image_changed (GimpContext *context,
|
||||||
GimpColormapDialog *ipal);
|
GimpColormapDialog *ipal);
|
||||||
|
|
||||||
|
|
||||||
|
/* private variables */
|
||||||
|
|
||||||
|
static BrushEditor *brush_editor_dialog = NULL;
|
||||||
|
static GradientEditor *gradient_editor_dialog = NULL;
|
||||||
|
static PaletteEditor *palette_editor_dialog = NULL;
|
||||||
|
|
||||||
|
|
||||||
/* public functions */
|
/* public functions */
|
||||||
|
|
||||||
GtkWidget *
|
GtkWidget *
|
||||||
|
@ -282,21 +301,36 @@ GtkWidget *
|
||||||
dialogs_brush_editor_get (GimpDialogFactory *factory,
|
dialogs_brush_editor_get (GimpDialogFactory *factory,
|
||||||
GimpContext *context)
|
GimpContext *context)
|
||||||
{
|
{
|
||||||
return NULL;
|
if (! brush_editor_dialog)
|
||||||
|
{
|
||||||
|
brush_editor_dialog = brush_editor_new (context->gimp);
|
||||||
|
}
|
||||||
|
|
||||||
|
return ((EEKWrapper *) brush_editor_dialog)->shell;
|
||||||
}
|
}
|
||||||
|
|
||||||
GtkWidget *
|
GtkWidget *
|
||||||
dialogs_gradient_editor_get (GimpDialogFactory *factory,
|
dialogs_gradient_editor_get (GimpDialogFactory *factory,
|
||||||
GimpContext *context)
|
GimpContext *context)
|
||||||
{
|
{
|
||||||
return NULL;
|
if (! gradient_editor_dialog)
|
||||||
|
{
|
||||||
|
gradient_editor_dialog = gradient_editor_new (context->gimp);
|
||||||
|
}
|
||||||
|
|
||||||
|
return ((EEKWrapper *) gradient_editor_dialog)->shell;
|
||||||
}
|
}
|
||||||
|
|
||||||
GtkWidget *
|
GtkWidget *
|
||||||
dialogs_palette_editor_get (GimpDialogFactory *factory,
|
dialogs_palette_editor_get (GimpDialogFactory *factory,
|
||||||
GimpContext *context)
|
GimpContext *context)
|
||||||
{
|
{
|
||||||
return NULL;
|
if (! palette_editor_dialog)
|
||||||
|
{
|
||||||
|
palette_editor_dialog = palette_editor_new (context->gimp);
|
||||||
|
}
|
||||||
|
|
||||||
|
return ((EEKWrapper *) palette_editor_dialog)->shell;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -717,8 +751,6 @@ dialogs_indexed_palette_new (GimpDialogFactory *factory,
|
||||||
void
|
void
|
||||||
dialogs_edit_brush_func (GimpData *data)
|
dialogs_edit_brush_func (GimpData *data)
|
||||||
{
|
{
|
||||||
static BrushEditor *brush_editor_dialog = NULL;
|
|
||||||
|
|
||||||
GimpBrush *brush;
|
GimpBrush *brush;
|
||||||
|
|
||||||
brush = GIMP_BRUSH (data);
|
brush = GIMP_BRUSH (data);
|
||||||
|
@ -727,7 +759,8 @@ dialogs_edit_brush_func (GimpData *data)
|
||||||
{
|
{
|
||||||
if (! brush_editor_dialog)
|
if (! brush_editor_dialog)
|
||||||
{
|
{
|
||||||
brush_editor_dialog = brush_editor_new (the_gimp);
|
gimp_dialog_factory_dialog_raise (global_dialog_factory,
|
||||||
|
"gimp:brush-editor");
|
||||||
}
|
}
|
||||||
|
|
||||||
brush_editor_set_brush (brush_editor_dialog, brush);
|
brush_editor_set_brush (brush_editor_dialog, brush);
|
||||||
|
@ -741,15 +774,14 @@ dialogs_edit_brush_func (GimpData *data)
|
||||||
void
|
void
|
||||||
dialogs_edit_gradient_func (GimpData *data)
|
dialogs_edit_gradient_func (GimpData *data)
|
||||||
{
|
{
|
||||||
static GradientEditor *gradient_editor_dialog = NULL;
|
|
||||||
|
|
||||||
GimpGradient *gradient;
|
GimpGradient *gradient;
|
||||||
|
|
||||||
gradient = GIMP_GRADIENT (data);
|
gradient = GIMP_GRADIENT (data);
|
||||||
|
|
||||||
if (! gradient_editor_dialog)
|
if (! gradient_editor_dialog)
|
||||||
{
|
{
|
||||||
gradient_editor_dialog = gradient_editor_new (the_gimp);
|
gimp_dialog_factory_dialog_raise (global_dialog_factory,
|
||||||
|
"gimp:gradient-editor");
|
||||||
}
|
}
|
||||||
|
|
||||||
gradient_editor_set_gradient (gradient_editor_dialog, gradient);
|
gradient_editor_set_gradient (gradient_editor_dialog, gradient);
|
||||||
|
@ -758,15 +790,14 @@ dialogs_edit_gradient_func (GimpData *data)
|
||||||
void
|
void
|
||||||
dialogs_edit_palette_func (GimpData *data)
|
dialogs_edit_palette_func (GimpData *data)
|
||||||
{
|
{
|
||||||
static PaletteEditor *palette_editor_dialog = NULL;
|
|
||||||
|
|
||||||
GimpPalette *palette;
|
GimpPalette *palette;
|
||||||
|
|
||||||
palette = GIMP_PALETTE (data);
|
palette = GIMP_PALETTE (data);
|
||||||
|
|
||||||
if (! palette_editor_dialog)
|
if (! palette_editor_dialog)
|
||||||
{
|
{
|
||||||
palette_editor_dialog = palette_editor_new (the_gimp);
|
gimp_dialog_factory_dialog_raise (global_dialog_factory,
|
||||||
|
"gimp:palette-editor");
|
||||||
}
|
}
|
||||||
|
|
||||||
palette_editor_set_palette (palette_editor_dialog, palette);
|
palette_editor_set_palette (palette_editor_dialog, palette);
|
||||||
|
|
|
@ -38,52 +38,52 @@ GimpDialogFactory *global_dock_factory = NULL;
|
||||||
|
|
||||||
static const GimpDialogFactoryEntry toplevel_entries[] =
|
static const GimpDialogFactoryEntry toplevel_entries[] =
|
||||||
{
|
{
|
||||||
{ "gimp:toolbox", dialogs_toolbox_get, TRUE, TRUE, TRUE },
|
{ "gimp:toolbox", dialogs_toolbox_get, TRUE, TRUE, TRUE, TRUE },
|
||||||
{ "gimp:tool-options-dialog", dialogs_tool_options_get, TRUE, TRUE, FALSE },
|
{ "gimp:tool-options-dialog", dialogs_tool_options_get, TRUE, TRUE, FALSE, TRUE },
|
||||||
{ "gimp:device-status-dialog", dialogs_device_status_get, TRUE, TRUE, FALSE },
|
{ "gimp:device-status-dialog", dialogs_device_status_get, TRUE, TRUE, FALSE, TRUE },
|
||||||
{ "gimp:brush-select-dialog", dialogs_brush_select_get, TRUE, TRUE, FALSE },
|
{ "gimp:brush-select-dialog", dialogs_brush_select_get, TRUE, TRUE, FALSE, TRUE },
|
||||||
{ "gimp:pattern-select-dialog", dialogs_pattern_select_get, TRUE, TRUE, FALSE },
|
{ "gimp:pattern-select-dialog", dialogs_pattern_select_get, TRUE, TRUE, FALSE, TRUE },
|
||||||
{ "gimp:gradient-select-dialog", dialogs_gradient_select_get, TRUE, TRUE, FALSE },
|
{ "gimp:gradient-select-dialog", dialogs_gradient_select_get, TRUE, TRUE, FALSE, TRUE },
|
||||||
{ "gimp:palette-select-dialog", dialogs_palette_select_get, TRUE, TRUE, FALSE },
|
{ "gimp:palette-select-dialog", dialogs_palette_select_get, TRUE, TRUE, FALSE, TRUE },
|
||||||
{ "gimp:error-console-dialog", dialogs_error_console_get, TRUE, TRUE, TRUE },
|
{ "gimp:error-console-dialog", dialogs_error_console_get, TRUE, TRUE, TRUE, TRUE },
|
||||||
{ "gimp:document-index-dialog", dialogs_document_index_get, TRUE, TRUE, TRUE },
|
{ "gimp:document-index-dialog", dialogs_document_index_get, TRUE, TRUE, TRUE, TRUE },
|
||||||
{ "gimp:preferences-dialog", dialogs_preferences_get, TRUE, FALSE, FALSE },
|
{ "gimp:preferences-dialog", dialogs_preferences_get, TRUE, FALSE, FALSE, TRUE },
|
||||||
{ "gimp:input-devices-dialog", dialogs_input_devices_get, TRUE, FALSE, FALSE },
|
{ "gimp:input-devices-dialog", dialogs_input_devices_get, TRUE, FALSE, FALSE, TRUE },
|
||||||
{ "gimp:module-browser-dialog", dialogs_module_browser_get, TRUE, FALSE, FALSE },
|
{ "gimp:module-browser-dialog", dialogs_module_browser_get, TRUE, FALSE, FALSE, TRUE },
|
||||||
{ "gimp:undo-history-dialog", dialogs_undo_history_get, FALSE, FALSE, FALSE },
|
{ "gimp:undo-history-dialog", dialogs_undo_history_get, FALSE, FALSE, FALSE, TRUE },
|
||||||
{ "gimp:display-filters-dialog", dialogs_display_filters_get, FALSE, FALSE, FALSE },
|
{ "gimp:display-filters-dialog", dialogs_display_filters_get, FALSE, FALSE, FALSE, TRUE },
|
||||||
{ "gimp:tips-dialog", dialogs_tips_get, TRUE, FALSE, FALSE },
|
{ "gimp:tips-dialog", dialogs_tips_get, TRUE, FALSE, FALSE, TRUE },
|
||||||
{ "gimp:about-dialog", dialogs_about_get, TRUE, FALSE, FALSE },
|
{ "gimp:about-dialog", dialogs_about_get, TRUE, FALSE, FALSE, TRUE },
|
||||||
|
|
||||||
{ "gimp:brush-editor", dialogs_brush_editor_get, TRUE, TRUE, TRUE },
|
{ "gimp:brush-editor", dialogs_brush_editor_get, TRUE, TRUE, TRUE, FALSE },
|
||||||
{ "gimp:gradient-editor", dialogs_gradient_editor_get, TRUE, TRUE, TRUE },
|
{ "gimp:gradient-editor", dialogs_gradient_editor_get, TRUE, TRUE, TRUE, FALSE },
|
||||||
{ "gimp:palette-editor", dialogs_palette_editor_get, TRUE, TRUE, TRUE }
|
{ "gimp:palette-editor", dialogs_palette_editor_get, TRUE, TRUE, TRUE, FALSE }
|
||||||
};
|
};
|
||||||
static const gint n_toplevel_entries = (sizeof (toplevel_entries) /
|
static const gint n_toplevel_entries = (sizeof (toplevel_entries) /
|
||||||
sizeof (toplevel_entries[0]));
|
sizeof (toplevel_entries[0]));
|
||||||
|
|
||||||
static const GimpDialogFactoryEntry dock_entries[] =
|
static const GimpDialogFactoryEntry dock_entries[] =
|
||||||
{
|
{
|
||||||
{ "gimp:image-list", dialogs_image_list_view_new, FALSE, FALSE, FALSE },
|
{ "gimp:image-list", dialogs_image_list_view_new, FALSE, FALSE, FALSE, TRUE },
|
||||||
{ "gimp:brush-list", dialogs_brush_list_view_new, FALSE, FALSE, FALSE },
|
{ "gimp:brush-list", dialogs_brush_list_view_new, FALSE, FALSE, FALSE, TRUE },
|
||||||
{ "gimp:pattern-list", dialogs_pattern_list_view_new, FALSE, FALSE, FALSE },
|
{ "gimp:pattern-list", dialogs_pattern_list_view_new, FALSE, FALSE, FALSE, TRUE },
|
||||||
{ "gimp:gradient-list", dialogs_gradient_list_view_new, FALSE, FALSE, FALSE },
|
{ "gimp:gradient-list", dialogs_gradient_list_view_new, FALSE, FALSE, FALSE, TRUE },
|
||||||
{ "gimp:palette-list", dialogs_palette_list_view_new, FALSE, FALSE, FALSE },
|
{ "gimp:palette-list", dialogs_palette_list_view_new, FALSE, FALSE, FALSE, TRUE },
|
||||||
{ "gimp:tool-list", dialogs_tool_list_view_new, FALSE, FALSE, FALSE },
|
{ "gimp:tool-list", dialogs_tool_list_view_new, FALSE, FALSE, FALSE, TRUE },
|
||||||
{ "gimp:buffer-list", dialogs_buffer_list_view_new, FALSE, FALSE, FALSE },
|
{ "gimp:buffer-list", dialogs_buffer_list_view_new, FALSE, FALSE, FALSE, TRUE },
|
||||||
|
|
||||||
{ "gimp:image-grid", dialogs_image_grid_view_new, FALSE, FALSE, FALSE },
|
{ "gimp:image-grid", dialogs_image_grid_view_new, FALSE, FALSE, FALSE, TRUE },
|
||||||
{ "gimp:brush-grid", dialogs_brush_grid_view_new, FALSE, FALSE, FALSE },
|
{ "gimp:brush-grid", dialogs_brush_grid_view_new, FALSE, FALSE, FALSE, TRUE },
|
||||||
{ "gimp:pattern-grid", dialogs_pattern_grid_view_new, FALSE, FALSE, FALSE },
|
{ "gimp:pattern-grid", dialogs_pattern_grid_view_new, FALSE, FALSE, FALSE, TRUE },
|
||||||
{ "gimp:gradient-grid", dialogs_gradient_grid_view_new, FALSE, FALSE, FALSE },
|
{ "gimp:gradient-grid", dialogs_gradient_grid_view_new, FALSE, FALSE, FALSE, TRUE },
|
||||||
{ "gimp:palette-grid", dialogs_palette_grid_view_new, FALSE, FALSE, FALSE },
|
{ "gimp:palette-grid", dialogs_palette_grid_view_new, FALSE, FALSE, FALSE, TRUE },
|
||||||
{ "gimp:tool-grid", dialogs_tool_grid_view_new, FALSE, FALSE, FALSE },
|
{ "gimp:tool-grid", dialogs_tool_grid_view_new, FALSE, FALSE, FALSE, TRUE },
|
||||||
{ "gimp:buffer-grid", dialogs_buffer_grid_view_new, FALSE, FALSE, FALSE },
|
{ "gimp:buffer-grid", dialogs_buffer_grid_view_new, FALSE, FALSE, FALSE, TRUE },
|
||||||
|
|
||||||
{ "gimp:layer-list", dialogs_layer_list_view_new, FALSE, FALSE, FALSE },
|
{ "gimp:layer-list", dialogs_layer_list_view_new, FALSE, FALSE, FALSE, TRUE },
|
||||||
{ "gimp:channel-list", dialogs_channel_list_view_new, FALSE, FALSE, FALSE },
|
{ "gimp:channel-list", dialogs_channel_list_view_new, FALSE, FALSE, FALSE, TRUE },
|
||||||
{ "gimp:path-list", dialogs_path_list_view_new, TRUE, FALSE, FALSE },
|
{ "gimp:path-list", dialogs_path_list_view_new, TRUE, FALSE, FALSE, TRUE },
|
||||||
{ "gimp:indexed-palette", dialogs_indexed_palette_new, FALSE, FALSE, FALSE }
|
{ "gimp:indexed-palette", dialogs_indexed_palette_new, FALSE, FALSE, FALSE, TRUE }
|
||||||
};
|
};
|
||||||
static const gint n_dock_entries = (sizeof (dock_entries) /
|
static const gint n_dock_entries = (sizeof (dock_entries) /
|
||||||
sizeof (dock_entries[0]));
|
sizeof (dock_entries[0]));
|
||||||
|
@ -116,7 +116,8 @@ dialogs_init (Gimp *gimp)
|
||||||
toplevel_entries[i].new_func,
|
toplevel_entries[i].new_func,
|
||||||
toplevel_entries[i].singleton,
|
toplevel_entries[i].singleton,
|
||||||
toplevel_entries[i].session_managed,
|
toplevel_entries[i].session_managed,
|
||||||
toplevel_entries[i].remember_size);
|
toplevel_entries[i].remember_size,
|
||||||
|
toplevel_entries[i].remember_if_open);
|
||||||
|
|
||||||
for (i = 0; i < n_dock_entries; i++)
|
for (i = 0; i < n_dock_entries; i++)
|
||||||
gimp_dialog_factory_register_entry (global_dock_factory,
|
gimp_dialog_factory_register_entry (global_dock_factory,
|
||||||
|
@ -124,7 +125,8 @@ dialogs_init (Gimp *gimp)
|
||||||
dock_entries[i].new_func,
|
dock_entries[i].new_func,
|
||||||
dock_entries[i].singleton,
|
dock_entries[i].singleton,
|
||||||
dock_entries[i].session_managed,
|
dock_entries[i].session_managed,
|
||||||
dock_entries[i].remember_size);
|
dock_entries[i].remember_size,
|
||||||
|
dock_entries[i].remember_if_open);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -56,6 +56,7 @@
|
||||||
#include "channels-commands.h"
|
#include "channels-commands.h"
|
||||||
#include "color-area.h"
|
#include "color-area.h"
|
||||||
#include "colormap-dialog.h"
|
#include "colormap-dialog.h"
|
||||||
|
#include "dialogs.h"
|
||||||
#include "devices.h"
|
#include "devices.h"
|
||||||
#include "dialogs-constructors.h"
|
#include "dialogs-constructors.h"
|
||||||
#include "docindex.h"
|
#include "docindex.h"
|
||||||
|
@ -90,6 +91,17 @@
|
||||||
#include "libgimp/gimpintl.h"
|
#include "libgimp/gimpintl.h"
|
||||||
|
|
||||||
|
|
||||||
|
/* FIXME: do something about this uglyness:
|
||||||
|
*/
|
||||||
|
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
GtkWidget *shell;
|
||||||
|
} EEKWrapper;
|
||||||
|
|
||||||
|
|
||||||
|
/* local function prototypes */
|
||||||
|
|
||||||
static void dialogs_indexed_palette_selected (GimpColormapDialog *dialog,
|
static void dialogs_indexed_palette_selected (GimpColormapDialog *dialog,
|
||||||
GimpDockable *dockable);
|
GimpDockable *dockable);
|
||||||
|
|
||||||
|
@ -137,6 +149,13 @@ static void dialogs_indexed_palette_image_changed (GimpContext *context,
|
||||||
GimpColormapDialog *ipal);
|
GimpColormapDialog *ipal);
|
||||||
|
|
||||||
|
|
||||||
|
/* private variables */
|
||||||
|
|
||||||
|
static BrushEditor *brush_editor_dialog = NULL;
|
||||||
|
static GradientEditor *gradient_editor_dialog = NULL;
|
||||||
|
static PaletteEditor *palette_editor_dialog = NULL;
|
||||||
|
|
||||||
|
|
||||||
/* public functions */
|
/* public functions */
|
||||||
|
|
||||||
GtkWidget *
|
GtkWidget *
|
||||||
|
@ -282,21 +301,36 @@ GtkWidget *
|
||||||
dialogs_brush_editor_get (GimpDialogFactory *factory,
|
dialogs_brush_editor_get (GimpDialogFactory *factory,
|
||||||
GimpContext *context)
|
GimpContext *context)
|
||||||
{
|
{
|
||||||
return NULL;
|
if (! brush_editor_dialog)
|
||||||
|
{
|
||||||
|
brush_editor_dialog = brush_editor_new (context->gimp);
|
||||||
|
}
|
||||||
|
|
||||||
|
return ((EEKWrapper *) brush_editor_dialog)->shell;
|
||||||
}
|
}
|
||||||
|
|
||||||
GtkWidget *
|
GtkWidget *
|
||||||
dialogs_gradient_editor_get (GimpDialogFactory *factory,
|
dialogs_gradient_editor_get (GimpDialogFactory *factory,
|
||||||
GimpContext *context)
|
GimpContext *context)
|
||||||
{
|
{
|
||||||
return NULL;
|
if (! gradient_editor_dialog)
|
||||||
|
{
|
||||||
|
gradient_editor_dialog = gradient_editor_new (context->gimp);
|
||||||
|
}
|
||||||
|
|
||||||
|
return ((EEKWrapper *) gradient_editor_dialog)->shell;
|
||||||
}
|
}
|
||||||
|
|
||||||
GtkWidget *
|
GtkWidget *
|
||||||
dialogs_palette_editor_get (GimpDialogFactory *factory,
|
dialogs_palette_editor_get (GimpDialogFactory *factory,
|
||||||
GimpContext *context)
|
GimpContext *context)
|
||||||
{
|
{
|
||||||
return NULL;
|
if (! palette_editor_dialog)
|
||||||
|
{
|
||||||
|
palette_editor_dialog = palette_editor_new (context->gimp);
|
||||||
|
}
|
||||||
|
|
||||||
|
return ((EEKWrapper *) palette_editor_dialog)->shell;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -717,8 +751,6 @@ dialogs_indexed_palette_new (GimpDialogFactory *factory,
|
||||||
void
|
void
|
||||||
dialogs_edit_brush_func (GimpData *data)
|
dialogs_edit_brush_func (GimpData *data)
|
||||||
{
|
{
|
||||||
static BrushEditor *brush_editor_dialog = NULL;
|
|
||||||
|
|
||||||
GimpBrush *brush;
|
GimpBrush *brush;
|
||||||
|
|
||||||
brush = GIMP_BRUSH (data);
|
brush = GIMP_BRUSH (data);
|
||||||
|
@ -727,7 +759,8 @@ dialogs_edit_brush_func (GimpData *data)
|
||||||
{
|
{
|
||||||
if (! brush_editor_dialog)
|
if (! brush_editor_dialog)
|
||||||
{
|
{
|
||||||
brush_editor_dialog = brush_editor_new (the_gimp);
|
gimp_dialog_factory_dialog_raise (global_dialog_factory,
|
||||||
|
"gimp:brush-editor");
|
||||||
}
|
}
|
||||||
|
|
||||||
brush_editor_set_brush (brush_editor_dialog, brush);
|
brush_editor_set_brush (brush_editor_dialog, brush);
|
||||||
|
@ -741,15 +774,14 @@ dialogs_edit_brush_func (GimpData *data)
|
||||||
void
|
void
|
||||||
dialogs_edit_gradient_func (GimpData *data)
|
dialogs_edit_gradient_func (GimpData *data)
|
||||||
{
|
{
|
||||||
static GradientEditor *gradient_editor_dialog = NULL;
|
|
||||||
|
|
||||||
GimpGradient *gradient;
|
GimpGradient *gradient;
|
||||||
|
|
||||||
gradient = GIMP_GRADIENT (data);
|
gradient = GIMP_GRADIENT (data);
|
||||||
|
|
||||||
if (! gradient_editor_dialog)
|
if (! gradient_editor_dialog)
|
||||||
{
|
{
|
||||||
gradient_editor_dialog = gradient_editor_new (the_gimp);
|
gimp_dialog_factory_dialog_raise (global_dialog_factory,
|
||||||
|
"gimp:gradient-editor");
|
||||||
}
|
}
|
||||||
|
|
||||||
gradient_editor_set_gradient (gradient_editor_dialog, gradient);
|
gradient_editor_set_gradient (gradient_editor_dialog, gradient);
|
||||||
|
@ -758,15 +790,14 @@ dialogs_edit_gradient_func (GimpData *data)
|
||||||
void
|
void
|
||||||
dialogs_edit_palette_func (GimpData *data)
|
dialogs_edit_palette_func (GimpData *data)
|
||||||
{
|
{
|
||||||
static PaletteEditor *palette_editor_dialog = NULL;
|
|
||||||
|
|
||||||
GimpPalette *palette;
|
GimpPalette *palette;
|
||||||
|
|
||||||
palette = GIMP_PALETTE (data);
|
palette = GIMP_PALETTE (data);
|
||||||
|
|
||||||
if (! palette_editor_dialog)
|
if (! palette_editor_dialog)
|
||||||
{
|
{
|
||||||
palette_editor_dialog = palette_editor_new (the_gimp);
|
gimp_dialog_factory_dialog_raise (global_dialog_factory,
|
||||||
|
"gimp:palette-editor");
|
||||||
}
|
}
|
||||||
|
|
||||||
palette_editor_set_palette (palette_editor_dialog, palette);
|
palette_editor_set_palette (palette_editor_dialog, palette);
|
||||||
|
|
|
@ -38,52 +38,52 @@ GimpDialogFactory *global_dock_factory = NULL;
|
||||||
|
|
||||||
static const GimpDialogFactoryEntry toplevel_entries[] =
|
static const GimpDialogFactoryEntry toplevel_entries[] =
|
||||||
{
|
{
|
||||||
{ "gimp:toolbox", dialogs_toolbox_get, TRUE, TRUE, TRUE },
|
{ "gimp:toolbox", dialogs_toolbox_get, TRUE, TRUE, TRUE, TRUE },
|
||||||
{ "gimp:tool-options-dialog", dialogs_tool_options_get, TRUE, TRUE, FALSE },
|
{ "gimp:tool-options-dialog", dialogs_tool_options_get, TRUE, TRUE, FALSE, TRUE },
|
||||||
{ "gimp:device-status-dialog", dialogs_device_status_get, TRUE, TRUE, FALSE },
|
{ "gimp:device-status-dialog", dialogs_device_status_get, TRUE, TRUE, FALSE, TRUE },
|
||||||
{ "gimp:brush-select-dialog", dialogs_brush_select_get, TRUE, TRUE, FALSE },
|
{ "gimp:brush-select-dialog", dialogs_brush_select_get, TRUE, TRUE, FALSE, TRUE },
|
||||||
{ "gimp:pattern-select-dialog", dialogs_pattern_select_get, TRUE, TRUE, FALSE },
|
{ "gimp:pattern-select-dialog", dialogs_pattern_select_get, TRUE, TRUE, FALSE, TRUE },
|
||||||
{ "gimp:gradient-select-dialog", dialogs_gradient_select_get, TRUE, TRUE, FALSE },
|
{ "gimp:gradient-select-dialog", dialogs_gradient_select_get, TRUE, TRUE, FALSE, TRUE },
|
||||||
{ "gimp:palette-select-dialog", dialogs_palette_select_get, TRUE, TRUE, FALSE },
|
{ "gimp:palette-select-dialog", dialogs_palette_select_get, TRUE, TRUE, FALSE, TRUE },
|
||||||
{ "gimp:error-console-dialog", dialogs_error_console_get, TRUE, TRUE, TRUE },
|
{ "gimp:error-console-dialog", dialogs_error_console_get, TRUE, TRUE, TRUE, TRUE },
|
||||||
{ "gimp:document-index-dialog", dialogs_document_index_get, TRUE, TRUE, TRUE },
|
{ "gimp:document-index-dialog", dialogs_document_index_get, TRUE, TRUE, TRUE, TRUE },
|
||||||
{ "gimp:preferences-dialog", dialogs_preferences_get, TRUE, FALSE, FALSE },
|
{ "gimp:preferences-dialog", dialogs_preferences_get, TRUE, FALSE, FALSE, TRUE },
|
||||||
{ "gimp:input-devices-dialog", dialogs_input_devices_get, TRUE, FALSE, FALSE },
|
{ "gimp:input-devices-dialog", dialogs_input_devices_get, TRUE, FALSE, FALSE, TRUE },
|
||||||
{ "gimp:module-browser-dialog", dialogs_module_browser_get, TRUE, FALSE, FALSE },
|
{ "gimp:module-browser-dialog", dialogs_module_browser_get, TRUE, FALSE, FALSE, TRUE },
|
||||||
{ "gimp:undo-history-dialog", dialogs_undo_history_get, FALSE, FALSE, FALSE },
|
{ "gimp:undo-history-dialog", dialogs_undo_history_get, FALSE, FALSE, FALSE, TRUE },
|
||||||
{ "gimp:display-filters-dialog", dialogs_display_filters_get, FALSE, FALSE, FALSE },
|
{ "gimp:display-filters-dialog", dialogs_display_filters_get, FALSE, FALSE, FALSE, TRUE },
|
||||||
{ "gimp:tips-dialog", dialogs_tips_get, TRUE, FALSE, FALSE },
|
{ "gimp:tips-dialog", dialogs_tips_get, TRUE, FALSE, FALSE, TRUE },
|
||||||
{ "gimp:about-dialog", dialogs_about_get, TRUE, FALSE, FALSE },
|
{ "gimp:about-dialog", dialogs_about_get, TRUE, FALSE, FALSE, TRUE },
|
||||||
|
|
||||||
{ "gimp:brush-editor", dialogs_brush_editor_get, TRUE, TRUE, TRUE },
|
{ "gimp:brush-editor", dialogs_brush_editor_get, TRUE, TRUE, TRUE, FALSE },
|
||||||
{ "gimp:gradient-editor", dialogs_gradient_editor_get, TRUE, TRUE, TRUE },
|
{ "gimp:gradient-editor", dialogs_gradient_editor_get, TRUE, TRUE, TRUE, FALSE },
|
||||||
{ "gimp:palette-editor", dialogs_palette_editor_get, TRUE, TRUE, TRUE }
|
{ "gimp:palette-editor", dialogs_palette_editor_get, TRUE, TRUE, TRUE, FALSE }
|
||||||
};
|
};
|
||||||
static const gint n_toplevel_entries = (sizeof (toplevel_entries) /
|
static const gint n_toplevel_entries = (sizeof (toplevel_entries) /
|
||||||
sizeof (toplevel_entries[0]));
|
sizeof (toplevel_entries[0]));
|
||||||
|
|
||||||
static const GimpDialogFactoryEntry dock_entries[] =
|
static const GimpDialogFactoryEntry dock_entries[] =
|
||||||
{
|
{
|
||||||
{ "gimp:image-list", dialogs_image_list_view_new, FALSE, FALSE, FALSE },
|
{ "gimp:image-list", dialogs_image_list_view_new, FALSE, FALSE, FALSE, TRUE },
|
||||||
{ "gimp:brush-list", dialogs_brush_list_view_new, FALSE, FALSE, FALSE },
|
{ "gimp:brush-list", dialogs_brush_list_view_new, FALSE, FALSE, FALSE, TRUE },
|
||||||
{ "gimp:pattern-list", dialogs_pattern_list_view_new, FALSE, FALSE, FALSE },
|
{ "gimp:pattern-list", dialogs_pattern_list_view_new, FALSE, FALSE, FALSE, TRUE },
|
||||||
{ "gimp:gradient-list", dialogs_gradient_list_view_new, FALSE, FALSE, FALSE },
|
{ "gimp:gradient-list", dialogs_gradient_list_view_new, FALSE, FALSE, FALSE, TRUE },
|
||||||
{ "gimp:palette-list", dialogs_palette_list_view_new, FALSE, FALSE, FALSE },
|
{ "gimp:palette-list", dialogs_palette_list_view_new, FALSE, FALSE, FALSE, TRUE },
|
||||||
{ "gimp:tool-list", dialogs_tool_list_view_new, FALSE, FALSE, FALSE },
|
{ "gimp:tool-list", dialogs_tool_list_view_new, FALSE, FALSE, FALSE, TRUE },
|
||||||
{ "gimp:buffer-list", dialogs_buffer_list_view_new, FALSE, FALSE, FALSE },
|
{ "gimp:buffer-list", dialogs_buffer_list_view_new, FALSE, FALSE, FALSE, TRUE },
|
||||||
|
|
||||||
{ "gimp:image-grid", dialogs_image_grid_view_new, FALSE, FALSE, FALSE },
|
{ "gimp:image-grid", dialogs_image_grid_view_new, FALSE, FALSE, FALSE, TRUE },
|
||||||
{ "gimp:brush-grid", dialogs_brush_grid_view_new, FALSE, FALSE, FALSE },
|
{ "gimp:brush-grid", dialogs_brush_grid_view_new, FALSE, FALSE, FALSE, TRUE },
|
||||||
{ "gimp:pattern-grid", dialogs_pattern_grid_view_new, FALSE, FALSE, FALSE },
|
{ "gimp:pattern-grid", dialogs_pattern_grid_view_new, FALSE, FALSE, FALSE, TRUE },
|
||||||
{ "gimp:gradient-grid", dialogs_gradient_grid_view_new, FALSE, FALSE, FALSE },
|
{ "gimp:gradient-grid", dialogs_gradient_grid_view_new, FALSE, FALSE, FALSE, TRUE },
|
||||||
{ "gimp:palette-grid", dialogs_palette_grid_view_new, FALSE, FALSE, FALSE },
|
{ "gimp:palette-grid", dialogs_palette_grid_view_new, FALSE, FALSE, FALSE, TRUE },
|
||||||
{ "gimp:tool-grid", dialogs_tool_grid_view_new, FALSE, FALSE, FALSE },
|
{ "gimp:tool-grid", dialogs_tool_grid_view_new, FALSE, FALSE, FALSE, TRUE },
|
||||||
{ "gimp:buffer-grid", dialogs_buffer_grid_view_new, FALSE, FALSE, FALSE },
|
{ "gimp:buffer-grid", dialogs_buffer_grid_view_new, FALSE, FALSE, FALSE, TRUE },
|
||||||
|
|
||||||
{ "gimp:layer-list", dialogs_layer_list_view_new, FALSE, FALSE, FALSE },
|
{ "gimp:layer-list", dialogs_layer_list_view_new, FALSE, FALSE, FALSE, TRUE },
|
||||||
{ "gimp:channel-list", dialogs_channel_list_view_new, FALSE, FALSE, FALSE },
|
{ "gimp:channel-list", dialogs_channel_list_view_new, FALSE, FALSE, FALSE, TRUE },
|
||||||
{ "gimp:path-list", dialogs_path_list_view_new, TRUE, FALSE, FALSE },
|
{ "gimp:path-list", dialogs_path_list_view_new, TRUE, FALSE, FALSE, TRUE },
|
||||||
{ "gimp:indexed-palette", dialogs_indexed_palette_new, FALSE, FALSE, FALSE }
|
{ "gimp:indexed-palette", dialogs_indexed_palette_new, FALSE, FALSE, FALSE, TRUE }
|
||||||
};
|
};
|
||||||
static const gint n_dock_entries = (sizeof (dock_entries) /
|
static const gint n_dock_entries = (sizeof (dock_entries) /
|
||||||
sizeof (dock_entries[0]));
|
sizeof (dock_entries[0]));
|
||||||
|
@ -116,7 +116,8 @@ dialogs_init (Gimp *gimp)
|
||||||
toplevel_entries[i].new_func,
|
toplevel_entries[i].new_func,
|
||||||
toplevel_entries[i].singleton,
|
toplevel_entries[i].singleton,
|
||||||
toplevel_entries[i].session_managed,
|
toplevel_entries[i].session_managed,
|
||||||
toplevel_entries[i].remember_size);
|
toplevel_entries[i].remember_size,
|
||||||
|
toplevel_entries[i].remember_if_open);
|
||||||
|
|
||||||
for (i = 0; i < n_dock_entries; i++)
|
for (i = 0; i < n_dock_entries; i++)
|
||||||
gimp_dialog_factory_register_entry (global_dock_factory,
|
gimp_dialog_factory_register_entry (global_dock_factory,
|
||||||
|
@ -124,7 +125,8 @@ dialogs_init (Gimp *gimp)
|
||||||
dock_entries[i].new_func,
|
dock_entries[i].new_func,
|
||||||
dock_entries[i].singleton,
|
dock_entries[i].singleton,
|
||||||
dock_entries[i].session_managed,
|
dock_entries[i].session_managed,
|
||||||
dock_entries[i].remember_size);
|
dock_entries[i].remember_size,
|
||||||
|
dock_entries[i].remember_if_open);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -70,7 +70,7 @@ static GtkWidget *options_preview = NULL;
|
||||||
static GtkWidget *options_eventbox = NULL;
|
static GtkWidget *options_eventbox = NULL;
|
||||||
static GtkWidget *options_reset_button = NULL;
|
static GtkWidget *options_reset_button = NULL;
|
||||||
|
|
||||||
static ToolOptions *visible_tool_options = NULL;
|
static GimpToolOptions *visible_tool_options = NULL;
|
||||||
|
|
||||||
|
|
||||||
/* public functions */
|
/* public functions */
|
||||||
|
|
|
@ -104,7 +104,7 @@ static void gimp_airbrush_tool_motion (GimpPaintTool *paint_tool,
|
||||||
static gint airbrush_time_out (gpointer data);
|
static gint airbrush_time_out (gpointer data);
|
||||||
|
|
||||||
static AirbrushOptions * airbrush_options_new (void);
|
static AirbrushOptions * airbrush_options_new (void);
|
||||||
static void airbrush_options_reset (ToolOptions *tool_options);
|
static void airbrush_options_reset (GimpToolOptions *tool_options);
|
||||||
|
|
||||||
|
|
||||||
/* local variables */
|
/* local variables */
|
||||||
|
@ -192,7 +192,7 @@ gimp_airbrush_tool_init (GimpAirbrushTool *airbrush)
|
||||||
airbrush_options = airbrush_options_new ();
|
airbrush_options = airbrush_options_new ();
|
||||||
|
|
||||||
tool_manager_register_tool_options (GIMP_TYPE_AIRBRUSH_TOOL,
|
tool_manager_register_tool_options (GIMP_TYPE_AIRBRUSH_TOOL,
|
||||||
(ToolOptions *) airbrush_options);
|
(GimpToolOptions *) airbrush_options);
|
||||||
}
|
}
|
||||||
|
|
||||||
tool->tool_cursor = GIMP_AIRBRUSH_TOOL_CURSOR;
|
tool->tool_cursor = GIMP_AIRBRUSH_TOOL_CURSOR;
|
||||||
|
@ -504,7 +504,7 @@ airbrush_options_new (void)
|
||||||
options->pressure = options->pressure_d = AIRBRUSH_DEFAULT_PRESSURE;
|
options->pressure = options->pressure_d = AIRBRUSH_DEFAULT_PRESSURE;
|
||||||
|
|
||||||
/* the main vbox */
|
/* the main vbox */
|
||||||
vbox = ((ToolOptions *) options)->main_vbox;
|
vbox = ((GimpToolOptions *) options)->main_vbox;
|
||||||
|
|
||||||
/* the rate scale */
|
/* the rate scale */
|
||||||
table = gtk_table_new (2, 2, FALSE);
|
table = gtk_table_new (2, 2, FALSE);
|
||||||
|
@ -543,7 +543,7 @@ airbrush_options_new (void)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
airbrush_options_reset (ToolOptions *tool_options)
|
airbrush_options_reset (GimpToolOptions *tool_options)
|
||||||
{
|
{
|
||||||
AirbrushOptions *options;
|
AirbrushOptions *options;
|
||||||
|
|
||||||
|
|
|
@ -124,7 +124,7 @@ static void gimp_clone_tool_line_pattern (GimpImage *dest,
|
||||||
gint width);
|
gint width);
|
||||||
|
|
||||||
static CloneOptions * clone_options_new (void);
|
static CloneOptions * clone_options_new (void);
|
||||||
static void clone_options_reset (ToolOptions *options);
|
static void clone_options_reset (GimpToolOptions *options);
|
||||||
|
|
||||||
|
|
||||||
/* The parent class */
|
/* The parent class */
|
||||||
|
@ -228,7 +228,7 @@ gimp_clone_tool_init (GimpCloneTool *clone)
|
||||||
clone_options = clone_options_new ();
|
clone_options = clone_options_new ();
|
||||||
|
|
||||||
tool_manager_register_tool_options (GIMP_TYPE_CLONE_TOOL,
|
tool_manager_register_tool_options (GIMP_TYPE_CLONE_TOOL,
|
||||||
(ToolOptions *) clone_options);
|
(GimpToolOptions *) clone_options);
|
||||||
}
|
}
|
||||||
|
|
||||||
tool->tool_cursor = GIMP_CLONE_TOOL_CURSOR;
|
tool->tool_cursor = GIMP_CLONE_TOOL_CURSOR;
|
||||||
|
@ -804,7 +804,7 @@ clone_options_new (void)
|
||||||
options->aligned = options->aligned_d = CLONE_DEFAULT_ALIGNED;
|
options->aligned = options->aligned_d = CLONE_DEFAULT_ALIGNED;
|
||||||
|
|
||||||
/* the main vbox */
|
/* the main vbox */
|
||||||
vbox = ((ToolOptions *) options)->main_vbox;
|
vbox = ((GimpToolOptions *) options)->main_vbox;
|
||||||
|
|
||||||
frame = gimp_radio_group_new2 (TRUE, _("Source"),
|
frame = gimp_radio_group_new2 (TRUE, _("Source"),
|
||||||
gimp_radio_button_update,
|
gimp_radio_button_update,
|
||||||
|
@ -840,7 +840,7 @@ clone_options_new (void)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
clone_options_reset (ToolOptions *tool_options)
|
clone_options_reset (GimpToolOptions *tool_options)
|
||||||
{
|
{
|
||||||
CloneOptions *options;
|
CloneOptions *options;
|
||||||
|
|
||||||
|
|
|
@ -121,7 +121,7 @@ static void gimp_convolve_tool_motion (GimpPaintTool *paint_tool
|
||||||
gdouble rate);
|
gdouble rate);
|
||||||
|
|
||||||
static ConvolveOptions * convolve_options_new (void);
|
static ConvolveOptions * convolve_options_new (void);
|
||||||
static void convolve_options_reset (ToolOptions *options);
|
static void convolve_options_reset (GimpToolOptions *options);
|
||||||
|
|
||||||
|
|
||||||
/* The parent class */
|
/* The parent class */
|
||||||
|
@ -242,7 +242,7 @@ gimp_convolve_tool_init (GimpConvolveTool *convolve)
|
||||||
convolve_options = convolve_options_new ();
|
convolve_options = convolve_options_new ();
|
||||||
|
|
||||||
tool_manager_register_tool_options (GIMP_TYPE_CONVOLVE_TOOL,
|
tool_manager_register_tool_options (GIMP_TYPE_CONVOLVE_TOOL,
|
||||||
(ToolOptions *) convolve_options);
|
(GimpToolOptions *) convolve_options);
|
||||||
}
|
}
|
||||||
|
|
||||||
tool->tool_cursor = GIMP_BLUR_TOOL_CURSOR;
|
tool->tool_cursor = GIMP_BLUR_TOOL_CURSOR;
|
||||||
|
@ -724,7 +724,7 @@ convolve_options_new (void)
|
||||||
options->rate = options->rate_d = DEFAULT_CONVOLVE_RATE;
|
options->rate = options->rate_d = DEFAULT_CONVOLVE_RATE;
|
||||||
|
|
||||||
/* the main vbox */
|
/* the main vbox */
|
||||||
vbox = ((ToolOptions *) options)->main_vbox;
|
vbox = ((GimpToolOptions *) options)->main_vbox;
|
||||||
|
|
||||||
/* the rate scale */
|
/* the rate scale */
|
||||||
hbox = gtk_hbox_new (FALSE, 4);
|
hbox = gtk_hbox_new (FALSE, 4);
|
||||||
|
@ -765,7 +765,7 @@ convolve_options_new (void)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
convolve_options_reset (ToolOptions *tool_options)
|
convolve_options_reset (GimpToolOptions *tool_options)
|
||||||
{
|
{
|
||||||
ConvolveOptions *options;
|
ConvolveOptions *options;
|
||||||
|
|
||||||
|
|
|
@ -122,7 +122,7 @@ static gfloat gimp_dodgeburn_tool_shadows_lut_func (gpointer user_dat
|
||||||
gfloat value);
|
gfloat value);
|
||||||
|
|
||||||
static DodgeBurnOptions * gimp_dodgeburn_tool_options_new (void);
|
static DodgeBurnOptions * gimp_dodgeburn_tool_options_new (void);
|
||||||
static void gimp_dodgeburn_tool_options_reset (ToolOptions *tool_options);
|
static void gimp_dodgeburn_tool_options_reset (GimpToolOptions *tool_options);
|
||||||
|
|
||||||
|
|
||||||
static gdouble non_gui_exposure;
|
static gdouble non_gui_exposure;
|
||||||
|
@ -205,7 +205,7 @@ gimp_dodgeburn_tool_init (GimpDodgeBurnTool *dodgeburn)
|
||||||
dodgeburn_options = gimp_dodgeburn_tool_options_new ();
|
dodgeburn_options = gimp_dodgeburn_tool_options_new ();
|
||||||
|
|
||||||
tool_manager_register_tool_options (GIMP_TYPE_DODGEBURN_TOOL,
|
tool_manager_register_tool_options (GIMP_TYPE_DODGEBURN_TOOL,
|
||||||
(ToolOptions *) dodgeburn_options);
|
(GimpToolOptions *) dodgeburn_options);
|
||||||
}
|
}
|
||||||
|
|
||||||
tool->tool_cursor = GIMP_DODGE_TOOL_CURSOR;
|
tool->tool_cursor = GIMP_DODGE_TOOL_CURSOR;
|
||||||
|
@ -659,7 +659,7 @@ gimp_dodgeburn_tool_options_new (void)
|
||||||
options->mode = options->mode_d = DODGEBURN_DEFAULT_MODE;
|
options->mode = options->mode_d = DODGEBURN_DEFAULT_MODE;
|
||||||
|
|
||||||
/* the main vbox */
|
/* the main vbox */
|
||||||
vbox = ((ToolOptions *) options)->main_vbox;
|
vbox = ((GimpToolOptions *) options)->main_vbox;
|
||||||
|
|
||||||
/* the exposure scale */
|
/* the exposure scale */
|
||||||
hbox = gtk_hbox_new (FALSE, 4);
|
hbox = gtk_hbox_new (FALSE, 4);
|
||||||
|
@ -721,7 +721,7 @@ gimp_dodgeburn_tool_options_new (void)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gimp_dodgeburn_tool_options_reset (ToolOptions *tool_options)
|
gimp_dodgeburn_tool_options_reset (GimpToolOptions *tool_options)
|
||||||
{
|
{
|
||||||
DodgeBurnOptions *options;
|
DodgeBurnOptions *options;
|
||||||
|
|
||||||
|
|
|
@ -86,7 +86,7 @@ static void gimp_eraser_tool_motion (GimpPaintTool *paint_tool,
|
||||||
gboolean anti_erase);
|
gboolean anti_erase);
|
||||||
|
|
||||||
static EraserOptions * gimp_eraser_tool_options_new (void);
|
static EraserOptions * gimp_eraser_tool_options_new (void);
|
||||||
static void gimp_eraser_tool_options_reset (ToolOptions *tool_options);
|
static void gimp_eraser_tool_options_reset (GimpToolOptions *tool_options);
|
||||||
|
|
||||||
|
|
||||||
/* local variables */
|
/* local variables */
|
||||||
|
@ -170,7 +170,7 @@ gimp_eraser_tool_init (GimpEraserTool *eraser)
|
||||||
eraser_options = gimp_eraser_tool_options_new ();
|
eraser_options = gimp_eraser_tool_options_new ();
|
||||||
|
|
||||||
tool_manager_register_tool_options (GIMP_TYPE_ERASER_TOOL,
|
tool_manager_register_tool_options (GIMP_TYPE_ERASER_TOOL,
|
||||||
(ToolOptions *) eraser_options);
|
(GimpToolOptions *) eraser_options);
|
||||||
}
|
}
|
||||||
|
|
||||||
tool->tool_cursor = GIMP_ERASER_TOOL_CURSOR;
|
tool->tool_cursor = GIMP_ERASER_TOOL_CURSOR;
|
||||||
|
@ -402,7 +402,7 @@ gimp_eraser_tool_options_new (void)
|
||||||
options->anti_erase = options->anti_erase_d = ERASER_DEFAULT_ANTI_ERASE;
|
options->anti_erase = options->anti_erase_d = ERASER_DEFAULT_ANTI_ERASE;
|
||||||
|
|
||||||
/* the main vbox */
|
/* the main vbox */
|
||||||
vbox = ((ToolOptions *) options)->main_vbox;
|
vbox = ((GimpToolOptions *) options)->main_vbox;
|
||||||
|
|
||||||
/* the hard toggle */
|
/* the hard toggle */
|
||||||
options->hard_w = gtk_check_button_new_with_label (_("Hard Edge"));
|
options->hard_w = gtk_check_button_new_with_label (_("Hard Edge"));
|
||||||
|
@ -428,7 +428,7 @@ gimp_eraser_tool_options_new (void)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gimp_eraser_tool_options_reset (ToolOptions *tool_options)
|
gimp_eraser_tool_options_reset (GimpToolOptions *tool_options)
|
||||||
{
|
{
|
||||||
EraserOptions *options;
|
EraserOptions *options;
|
||||||
|
|
||||||
|
|
|
@ -123,7 +123,7 @@ static void gimp_ink_tool_init (GimpInkTool *tool);
|
||||||
static void gimp_ink_tool_destroy (GtkObject *object);
|
static void gimp_ink_tool_destroy (GtkObject *object);
|
||||||
|
|
||||||
static InkOptions * ink_options_new (void);
|
static InkOptions * ink_options_new (void);
|
||||||
static void ink_options_reset (ToolOptions *tool_options);
|
static void ink_options_reset (GimpToolOptions *tool_options);
|
||||||
|
|
||||||
static void ink_button_press (GimpTool *tool,
|
static void ink_button_press (GimpTool *tool,
|
||||||
GdkEventButton *mevent,
|
GdkEventButton *mevent,
|
||||||
|
@ -303,9 +303,9 @@ gimp_ink_tool_init (GimpInkTool *ink_tool)
|
||||||
ink_options = ink_options_new ();
|
ink_options = ink_options_new ();
|
||||||
|
|
||||||
tool_manager_register_tool_options (GIMP_TYPE_INK_TOOL,
|
tool_manager_register_tool_options (GIMP_TYPE_INK_TOOL,
|
||||||
(ToolOptions *) ink_options);
|
(GimpToolOptions *) ink_options);
|
||||||
|
|
||||||
ink_options_reset ((ToolOptions *) ink_options);
|
ink_options_reset ((GimpToolOptions *) ink_options);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -338,7 +338,7 @@ ink_type_update (GtkWidget *radio_button,
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
ink_options_reset (ToolOptions *tool_options)
|
ink_options_reset (GimpToolOptions *tool_options)
|
||||||
{
|
{
|
||||||
InkOptions *options;
|
InkOptions *options;
|
||||||
|
|
||||||
|
@ -398,7 +398,7 @@ ink_options_new (void)
|
||||||
|
|
||||||
/* the main vbox */
|
/* the main vbox */
|
||||||
vbox = gtk_vbox_new (FALSE, 2);
|
vbox = gtk_vbox_new (FALSE, 2);
|
||||||
gtk_box_pack_start (GTK_BOX (((ToolOptions *) options)->main_vbox), vbox,
|
gtk_box_pack_start (GTK_BOX (((GimpToolOptions *) options)->main_vbox), vbox,
|
||||||
TRUE, TRUE, 0);
|
TRUE, TRUE, 0);
|
||||||
gtk_widget_show (vbox);
|
gtk_widget_show (vbox);
|
||||||
|
|
||||||
|
|
|
@ -147,7 +147,7 @@ gimp_paintbrush_tool_init (GimpPaintbrushTool *paintbrush)
|
||||||
paint_options_reset);
|
paint_options_reset);
|
||||||
|
|
||||||
tool_manager_register_tool_options (GIMP_TYPE_PAINTBRUSH_TOOL,
|
tool_manager_register_tool_options (GIMP_TYPE_PAINTBRUSH_TOOL,
|
||||||
(ToolOptions *) paintbrush_options);
|
(GimpToolOptions *) paintbrush_options);
|
||||||
}
|
}
|
||||||
|
|
||||||
tool->tool_cursor = GIMP_PAINTBRUSH_TOOL_CURSOR;
|
tool->tool_cursor = GIMP_PAINTBRUSH_TOOL_CURSOR;
|
||||||
|
|
|
@ -140,7 +140,7 @@ gimp_pencil_tool_init (GimpPencilTool *pencil)
|
||||||
paint_options_reset);
|
paint_options_reset);
|
||||||
|
|
||||||
tool_manager_register_tool_options (GIMP_TYPE_PENCIL_TOOL,
|
tool_manager_register_tool_options (GIMP_TYPE_PENCIL_TOOL,
|
||||||
(ToolOptions *) pencil_options);
|
(GimpToolOptions *) pencil_options);
|
||||||
}
|
}
|
||||||
|
|
||||||
tool->tool_cursor = GIMP_PENCIL_TOOL_CURSOR;
|
tool->tool_cursor = GIMP_PENCIL_TOOL_CURSOR;
|
||||||
|
|
|
@ -95,7 +95,7 @@ static void gimp_smudge_tool_allocate_accum_buffer (gint w,
|
||||||
guchar *do_fill);
|
guchar *do_fill);
|
||||||
|
|
||||||
static SmudgeOptions * smudge_options_new (void);
|
static SmudgeOptions * smudge_options_new (void);
|
||||||
static void smudge_options_reset (ToolOptions *tool_options);
|
static void smudge_options_reset (GimpToolOptions *tool_options);
|
||||||
|
|
||||||
|
|
||||||
/* local variables */
|
/* local variables */
|
||||||
|
@ -177,7 +177,7 @@ gimp_smudge_tool_init (GimpSmudgeTool *smudge)
|
||||||
smudge_options = smudge_options_new ();
|
smudge_options = smudge_options_new ();
|
||||||
|
|
||||||
tool_manager_register_tool_options (GIMP_TYPE_SMUDGE_TOOL,
|
tool_manager_register_tool_options (GIMP_TYPE_SMUDGE_TOOL,
|
||||||
(ToolOptions *) smudge_options);
|
(GimpToolOptions *) smudge_options);
|
||||||
}
|
}
|
||||||
|
|
||||||
tool->tool_cursor = GIMP_SMUDGE_TOOL_CURSOR;
|
tool->tool_cursor = GIMP_SMUDGE_TOOL_CURSOR;
|
||||||
|
@ -533,7 +533,7 @@ smudge_options_new (void)
|
||||||
options->rate = options->rate_d = SMUDGE_DEFAULT_RATE;
|
options->rate = options->rate_d = SMUDGE_DEFAULT_RATE;
|
||||||
|
|
||||||
/* the main vbox */
|
/* the main vbox */
|
||||||
vbox = ((ToolOptions *) options)->main_vbox;
|
vbox = ((GimpToolOptions *) options)->main_vbox;
|
||||||
|
|
||||||
/* the rate scale */
|
/* the rate scale */
|
||||||
hbox = gtk_hbox_new (FALSE, 4);
|
hbox = gtk_hbox_new (FALSE, 4);
|
||||||
|
@ -560,7 +560,7 @@ smudge_options_new (void)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
smudge_options_reset (ToolOptions *tool_options)
|
smudge_options_reset (GimpToolOptions *tool_options)
|
||||||
{
|
{
|
||||||
SmudgeOptions *options;
|
SmudgeOptions *options;
|
||||||
|
|
||||||
|
|
|
@ -124,7 +124,7 @@ static void gimp_clone_tool_line_pattern (GimpImage *dest,
|
||||||
gint width);
|
gint width);
|
||||||
|
|
||||||
static CloneOptions * clone_options_new (void);
|
static CloneOptions * clone_options_new (void);
|
||||||
static void clone_options_reset (ToolOptions *options);
|
static void clone_options_reset (GimpToolOptions *options);
|
||||||
|
|
||||||
|
|
||||||
/* The parent class */
|
/* The parent class */
|
||||||
|
@ -228,7 +228,7 @@ gimp_clone_tool_init (GimpCloneTool *clone)
|
||||||
clone_options = clone_options_new ();
|
clone_options = clone_options_new ();
|
||||||
|
|
||||||
tool_manager_register_tool_options (GIMP_TYPE_CLONE_TOOL,
|
tool_manager_register_tool_options (GIMP_TYPE_CLONE_TOOL,
|
||||||
(ToolOptions *) clone_options);
|
(GimpToolOptions *) clone_options);
|
||||||
}
|
}
|
||||||
|
|
||||||
tool->tool_cursor = GIMP_CLONE_TOOL_CURSOR;
|
tool->tool_cursor = GIMP_CLONE_TOOL_CURSOR;
|
||||||
|
@ -804,7 +804,7 @@ clone_options_new (void)
|
||||||
options->aligned = options->aligned_d = CLONE_DEFAULT_ALIGNED;
|
options->aligned = options->aligned_d = CLONE_DEFAULT_ALIGNED;
|
||||||
|
|
||||||
/* the main vbox */
|
/* the main vbox */
|
||||||
vbox = ((ToolOptions *) options)->main_vbox;
|
vbox = ((GimpToolOptions *) options)->main_vbox;
|
||||||
|
|
||||||
frame = gimp_radio_group_new2 (TRUE, _("Source"),
|
frame = gimp_radio_group_new2 (TRUE, _("Source"),
|
||||||
gimp_radio_button_update,
|
gimp_radio_button_update,
|
||||||
|
@ -840,7 +840,7 @@ clone_options_new (void)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
clone_options_reset (ToolOptions *tool_options)
|
clone_options_reset (GimpToolOptions *tool_options)
|
||||||
{
|
{
|
||||||
CloneOptions *options;
|
CloneOptions *options;
|
||||||
|
|
||||||
|
|
57
app/path.c
57
app/path.c
|
@ -242,63 +242,6 @@ path_list_free (PathList* iml)
|
||||||
g_free (iml);
|
g_free (iml);
|
||||||
}
|
}
|
||||||
|
|
||||||
GimpBezierSelectTool *
|
|
||||||
path_to_beziersel (Path *bzp)
|
|
||||||
{
|
|
||||||
GimpBezierSelectTool *bezier_sel;
|
|
||||||
GimpBezierSelectPoint *bpnt = NULL;
|
|
||||||
GSList *list;
|
|
||||||
|
|
||||||
if (!bzp)
|
|
||||||
g_warning ("path_to_beziersel: NULL bzp");
|
|
||||||
|
|
||||||
list = bzp->path_details;
|
|
||||||
bezier_sel = g_new0 (GimpBezierSelectTool, 1);
|
|
||||||
|
|
||||||
bezier_sel->num_points = 0;
|
|
||||||
bezier_sel->mask = NULL;
|
|
||||||
bezier_select_reset (bezier_sel);
|
|
||||||
bezier_sel->closed = bzp->closed;
|
|
||||||
/* bezier_sel->state = BEZIER_ADD; */
|
|
||||||
bezier_sel->state = bzp->state;
|
|
||||||
|
|
||||||
while (list)
|
|
||||||
{
|
|
||||||
PathPoint *pdata;
|
|
||||||
|
|
||||||
pdata = (PathPoint *) list->data;
|
|
||||||
|
|
||||||
if (pdata->type == BEZIER_MOVE)
|
|
||||||
{
|
|
||||||
bezier_sel->last_point->next = bpnt;
|
|
||||||
bpnt->prev = bezier_sel->last_point;
|
|
||||||
bezier_sel->cur_anchor = NULL;
|
|
||||||
bezier_sel->cur_control = NULL;
|
|
||||||
bpnt = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
bezier_add_point (bezier_sel,
|
|
||||||
(gint) pdata->type,
|
|
||||||
RINT (pdata->x),
|
|
||||||
RINT (pdata->y));
|
|
||||||
|
|
||||||
if (bpnt == NULL)
|
|
||||||
bpnt = bezier_sel->last_point;
|
|
||||||
|
|
||||||
list = g_slist_next (list);
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( bezier_sel->closed )
|
|
||||||
{
|
|
||||||
bezier_sel->last_point->next = bpnt;
|
|
||||||
bpnt->prev = bezier_sel->last_point;
|
|
||||||
bezier_sel->cur_anchor = bezier_sel->points;
|
|
||||||
bezier_sel->cur_control = bezier_sel-> points->next;
|
|
||||||
}
|
|
||||||
|
|
||||||
return bezier_sel;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* Always return a copy that must be freed later */
|
/* Always return a copy that must be freed later */
|
||||||
|
|
||||||
|
|
|
@ -77,7 +77,6 @@ PathList* path_list_new (GimpImage *gimage,
|
||||||
GSList *bz_paths);
|
GSList *bz_paths);
|
||||||
void path_list_free (PathList *plist);
|
void path_list_free (PathList *plist);
|
||||||
|
|
||||||
GimpBezierSelectTool* path_to_beziersel (Path *path);
|
|
||||||
|
|
||||||
#endif /* __PATH_H__ */
|
#endif /* __PATH_H__ */
|
||||||
|
|
||||||
|
|
|
@ -104,7 +104,7 @@ static void gimp_airbrush_tool_motion (GimpPaintTool *paint_tool,
|
||||||
static gint airbrush_time_out (gpointer data);
|
static gint airbrush_time_out (gpointer data);
|
||||||
|
|
||||||
static AirbrushOptions * airbrush_options_new (void);
|
static AirbrushOptions * airbrush_options_new (void);
|
||||||
static void airbrush_options_reset (ToolOptions *tool_options);
|
static void airbrush_options_reset (GimpToolOptions *tool_options);
|
||||||
|
|
||||||
|
|
||||||
/* local variables */
|
/* local variables */
|
||||||
|
@ -192,7 +192,7 @@ gimp_airbrush_tool_init (GimpAirbrushTool *airbrush)
|
||||||
airbrush_options = airbrush_options_new ();
|
airbrush_options = airbrush_options_new ();
|
||||||
|
|
||||||
tool_manager_register_tool_options (GIMP_TYPE_AIRBRUSH_TOOL,
|
tool_manager_register_tool_options (GIMP_TYPE_AIRBRUSH_TOOL,
|
||||||
(ToolOptions *) airbrush_options);
|
(GimpToolOptions *) airbrush_options);
|
||||||
}
|
}
|
||||||
|
|
||||||
tool->tool_cursor = GIMP_AIRBRUSH_TOOL_CURSOR;
|
tool->tool_cursor = GIMP_AIRBRUSH_TOOL_CURSOR;
|
||||||
|
@ -504,7 +504,7 @@ airbrush_options_new (void)
|
||||||
options->pressure = options->pressure_d = AIRBRUSH_DEFAULT_PRESSURE;
|
options->pressure = options->pressure_d = AIRBRUSH_DEFAULT_PRESSURE;
|
||||||
|
|
||||||
/* the main vbox */
|
/* the main vbox */
|
||||||
vbox = ((ToolOptions *) options)->main_vbox;
|
vbox = ((GimpToolOptions *) options)->main_vbox;
|
||||||
|
|
||||||
/* the rate scale */
|
/* the rate scale */
|
||||||
table = gtk_table_new (2, 2, FALSE);
|
table = gtk_table_new (2, 2, FALSE);
|
||||||
|
@ -543,7 +543,7 @@ airbrush_options_new (void)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
airbrush_options_reset (ToolOptions *tool_options)
|
airbrush_options_reset (GimpToolOptions *tool_options)
|
||||||
{
|
{
|
||||||
AirbrushOptions *options;
|
AirbrushOptions *options;
|
||||||
|
|
||||||
|
|
|
@ -50,6 +50,8 @@
|
||||||
#include "app_procs.h"
|
#include "app_procs.h"
|
||||||
#include "errors.h"
|
#include "errors.h"
|
||||||
#include "gdisplay.h"
|
#include "gdisplay.h"
|
||||||
|
#include "path.h"
|
||||||
|
#include "pathP.h"
|
||||||
#include "undo.h"
|
#include "undo.h"
|
||||||
|
|
||||||
#include "libgimp/gimpintl.h"
|
#include "libgimp/gimpintl.h"
|
||||||
|
@ -370,7 +372,7 @@ gimp_bezier_select_tool_init (GimpBezierSelectTool *bezier_select)
|
||||||
selection_options_reset);
|
selection_options_reset);
|
||||||
|
|
||||||
tool_manager_register_tool_options (GIMP_TYPE_BEZIER_SELECT_TOOL,
|
tool_manager_register_tool_options (GIMP_TYPE_BEZIER_SELECT_TOOL,
|
||||||
(ToolOptions *) bezier_options);
|
(GimpToolOptions *) bezier_options);
|
||||||
}
|
}
|
||||||
|
|
||||||
bezier_select->num_points = 0;
|
bezier_select->num_points = 0;
|
||||||
|
@ -1099,6 +1101,63 @@ bezier_select_free (GimpBezierSelectTool *bezier_sel)
|
||||||
g_free (bezier_sel);
|
g_free (bezier_sel);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GimpBezierSelectTool *
|
||||||
|
path_to_beziersel (Path *bzp)
|
||||||
|
{
|
||||||
|
GimpBezierSelectTool *bezier_sel;
|
||||||
|
GimpBezierSelectPoint *bpnt = NULL;
|
||||||
|
GSList *list;
|
||||||
|
|
||||||
|
if (!bzp)
|
||||||
|
g_warning ("path_to_beziersel: NULL bzp");
|
||||||
|
|
||||||
|
list = bzp->path_details;
|
||||||
|
bezier_sel = g_new0 (GimpBezierSelectTool, 1);
|
||||||
|
|
||||||
|
bezier_sel->num_points = 0;
|
||||||
|
bezier_sel->mask = NULL;
|
||||||
|
bezier_select_reset (bezier_sel);
|
||||||
|
bezier_sel->closed = bzp->closed;
|
||||||
|
/* bezier_sel->state = BEZIER_ADD; */
|
||||||
|
bezier_sel->state = bzp->state;
|
||||||
|
|
||||||
|
while (list)
|
||||||
|
{
|
||||||
|
PathPoint *pdata;
|
||||||
|
|
||||||
|
pdata = (PathPoint *) list->data;
|
||||||
|
|
||||||
|
if (pdata->type == BEZIER_MOVE)
|
||||||
|
{
|
||||||
|
bezier_sel->last_point->next = bpnt;
|
||||||
|
bpnt->prev = bezier_sel->last_point;
|
||||||
|
bezier_sel->cur_anchor = NULL;
|
||||||
|
bezier_sel->cur_control = NULL;
|
||||||
|
bpnt = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
bezier_add_point (bezier_sel,
|
||||||
|
(gint) pdata->type,
|
||||||
|
RINT (pdata->x),
|
||||||
|
RINT (pdata->y));
|
||||||
|
|
||||||
|
if (bpnt == NULL)
|
||||||
|
bpnt = bezier_sel->last_point;
|
||||||
|
|
||||||
|
list = g_slist_next (list);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( bezier_sel->closed )
|
||||||
|
{
|
||||||
|
bezier_sel->last_point->next = bpnt;
|
||||||
|
bpnt->prev = bezier_sel->last_point;
|
||||||
|
bezier_sel->cur_anchor = bezier_sel->points;
|
||||||
|
bezier_sel->cur_control = bezier_sel-> points->next;
|
||||||
|
}
|
||||||
|
|
||||||
|
return bezier_sel;
|
||||||
|
}
|
||||||
|
|
||||||
/* Find the curve that points to this curve. This makes to_check point
|
/* Find the curve that points to this curve. This makes to_check point
|
||||||
* the start of a curve.
|
* the start of a curve.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -140,8 +140,11 @@ void bezier_draw_curve (GimpBezierSelectTool *bezier_sel
|
||||||
GimpBezierSelectPointsFunc func,
|
GimpBezierSelectPointsFunc func,
|
||||||
gint coord,
|
gint coord,
|
||||||
gpointer data);
|
gpointer data);
|
||||||
|
|
||||||
void bezier_select_reset (GimpBezierSelectTool *bezier_sel);
|
void bezier_select_reset (GimpBezierSelectTool *bezier_sel);
|
||||||
void bezier_select_free (GimpBezierSelectTool *bezier_sel);
|
void bezier_select_free (GimpBezierSelectTool *bezier_sel);
|
||||||
|
GimpBezierSelectTool* path_to_beziersel (Path *path);
|
||||||
|
|
||||||
void bezier_add_point (GimpBezierSelectTool *bezier_sel,
|
void bezier_add_point (GimpBezierSelectTool *bezier_sel,
|
||||||
gint type,
|
gint type,
|
||||||
gdouble x,
|
gdouble x,
|
||||||
|
|
|
@ -154,7 +154,7 @@ static void gimp_blend_tool_draw (GimpDrawTool *draw_tool);
|
||||||
|
|
||||||
static BlendOptions * blend_options_new (void);
|
static BlendOptions * blend_options_new (void);
|
||||||
|
|
||||||
static void blend_options_reset (ToolOptions *tool_options);
|
static void blend_options_reset (GimpToolOptions *tool_options);
|
||||||
|
|
||||||
static void gradient_type_callback (GtkWidget *widget,
|
static void gradient_type_callback (GtkWidget *widget,
|
||||||
gpointer data);
|
gpointer data);
|
||||||
|
@ -345,7 +345,7 @@ gimp_blend_tool_init (GimpBlendTool *blend_tool)
|
||||||
blend_options = blend_options_new ();
|
blend_options = blend_options_new ();
|
||||||
|
|
||||||
tool_manager_register_tool_options (GIMP_TYPE_BLEND_TOOL,
|
tool_manager_register_tool_options (GIMP_TYPE_BLEND_TOOL,
|
||||||
(ToolOptions *) blend_options);
|
(GimpToolOptions *) blend_options);
|
||||||
}
|
}
|
||||||
|
|
||||||
tool->tool_cursor = GIMP_BLEND_TOOL_CURSOR;
|
tool->tool_cursor = GIMP_BLEND_TOOL_CURSOR;
|
||||||
|
@ -670,7 +670,7 @@ blend_options_new (void)
|
||||||
options->threshold = options->threshold_d = 0.2;
|
options->threshold = options->threshold_d = 0.2;
|
||||||
|
|
||||||
/* the main vbox */
|
/* the main vbox */
|
||||||
vbox = ((ToolOptions *) options)->main_vbox;
|
vbox = ((GimpToolOptions *) options)->main_vbox;
|
||||||
|
|
||||||
/* dnd stuff */
|
/* dnd stuff */
|
||||||
gtk_drag_dest_set (vbox,
|
gtk_drag_dest_set (vbox,
|
||||||
|
@ -828,7 +828,7 @@ blend_options_new (void)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
blend_options_reset (ToolOptions *tool_options)
|
blend_options_reset (GimpToolOptions *tool_options)
|
||||||
{
|
{
|
||||||
BlendOptions *options;
|
BlendOptions *options;
|
||||||
|
|
||||||
|
|
|
@ -111,7 +111,7 @@ static void brightness_contrast_contrast_adjustment_update (GtkAdjustment *a
|
||||||
|
|
||||||
|
|
||||||
/* the brightness-contrast tool options */
|
/* the brightness-contrast tool options */
|
||||||
static ToolOptions *brightness_contrast_options = NULL;
|
static GimpToolOptions *brightness_contrast_options = NULL;
|
||||||
|
|
||||||
/* the brightness-contrast dialog */
|
/* the brightness-contrast dialog */
|
||||||
static BrightnessContrastDialog *brightness_contrast_dialog = NULL;
|
static BrightnessContrastDialog *brightness_contrast_dialog = NULL;
|
||||||
|
@ -189,7 +189,7 @@ gimp_brightness_contrast_tool_init (GimpBrightnessContrastTool *bc_tool)
|
||||||
brightness_contrast_options = tool_options_new ();
|
brightness_contrast_options = tool_options_new ();
|
||||||
|
|
||||||
tool_manager_register_tool_options (GIMP_TYPE_BRIGHTNESS_CONTRAST_TOOL,
|
tool_manager_register_tool_options (GIMP_TYPE_BRIGHTNESS_CONTRAST_TOOL,
|
||||||
(ToolOptions *) brightness_contrast_options);
|
(GimpToolOptions *) brightness_contrast_options);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -91,7 +91,7 @@ static void gimp_bucket_fill_tool_init (GimpBucketFillTool *bucket_
|
||||||
static void gimp_bucket_fill_tool_destroy (GtkObject *object);
|
static void gimp_bucket_fill_tool_destroy (GtkObject *object);
|
||||||
|
|
||||||
static BucketOptions * bucket_options_new (void);
|
static BucketOptions * bucket_options_new (void);
|
||||||
static void bucket_options_reset (ToolOptions *tool_options);
|
static void bucket_options_reset (GimpToolOptions *tool_options);
|
||||||
|
|
||||||
static void gimp_bucket_fill_tool_button_press (GimpTool *tool,
|
static void gimp_bucket_fill_tool_button_press (GimpTool *tool,
|
||||||
GdkEventButton *bevent,
|
GdkEventButton *bevent,
|
||||||
|
@ -194,9 +194,9 @@ gimp_bucket_fill_tool_init (GimpBucketFillTool *bucket_fill_tool)
|
||||||
bucket_options = bucket_options_new ();
|
bucket_options = bucket_options_new ();
|
||||||
|
|
||||||
tool_manager_register_tool_options (GIMP_TYPE_BUCKET_FILL_TOOL,
|
tool_manager_register_tool_options (GIMP_TYPE_BUCKET_FILL_TOOL,
|
||||||
(ToolOptions *) bucket_options);
|
(GimpToolOptions *) bucket_options);
|
||||||
|
|
||||||
bucket_options_reset ((ToolOptions *) bucket_options);
|
bucket_options_reset ((GimpToolOptions *) bucket_options);
|
||||||
}
|
}
|
||||||
|
|
||||||
tool->tool_cursor = GIMP_BUCKET_FILL_TOOL_CURSOR;
|
tool->tool_cursor = GIMP_BUCKET_FILL_TOOL_CURSOR;
|
||||||
|
@ -212,7 +212,7 @@ gimp_bucket_fill_tool_destroy (GtkObject *object)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
bucket_options_reset (ToolOptions *tool_options)
|
bucket_options_reset (GimpToolOptions *tool_options)
|
||||||
{
|
{
|
||||||
BucketOptions *options;
|
BucketOptions *options;
|
||||||
|
|
||||||
|
@ -249,7 +249,7 @@ bucket_options_new (void)
|
||||||
options->fill_mode = options->fill_mode_d = FG_BUCKET_FILL;
|
options->fill_mode = options->fill_mode_d = FG_BUCKET_FILL;
|
||||||
|
|
||||||
/* the main vbox */
|
/* the main vbox */
|
||||||
vbox = ((ToolOptions *) options)->main_vbox;
|
vbox = ((GimpToolOptions *) options)->main_vbox;
|
||||||
|
|
||||||
/* the sample merged toggle */
|
/* the sample merged toggle */
|
||||||
options->sample_merged_w =
|
options->sample_merged_w =
|
||||||
|
|
|
@ -314,7 +314,7 @@ gimp_by_color_select_tool_init (GimpByColorSelectTool *by_color_select)
|
||||||
selection_options_reset);
|
selection_options_reset);
|
||||||
|
|
||||||
tool_manager_register_tool_options (GIMP_TYPE_BY_COLOR_SELECT_TOOL,
|
tool_manager_register_tool_options (GIMP_TYPE_BY_COLOR_SELECT_TOOL,
|
||||||
(ToolOptions *) by_color_options);
|
(GimpToolOptions *) by_color_options);
|
||||||
}
|
}
|
||||||
/* Temporary until we find out how to make a new one */
|
/* Temporary until we find out how to make a new one */
|
||||||
tool->tool_cursor = GIMP_RECT_SELECT_TOOL_CURSOR;
|
tool->tool_cursor = GIMP_RECT_SELECT_TOOL_CURSOR;
|
||||||
|
|
|
@ -124,7 +124,7 @@ static void gimp_clone_tool_line_pattern (GimpImage *dest,
|
||||||
gint width);
|
gint width);
|
||||||
|
|
||||||
static CloneOptions * clone_options_new (void);
|
static CloneOptions * clone_options_new (void);
|
||||||
static void clone_options_reset (ToolOptions *options);
|
static void clone_options_reset (GimpToolOptions *options);
|
||||||
|
|
||||||
|
|
||||||
/* The parent class */
|
/* The parent class */
|
||||||
|
@ -228,7 +228,7 @@ gimp_clone_tool_init (GimpCloneTool *clone)
|
||||||
clone_options = clone_options_new ();
|
clone_options = clone_options_new ();
|
||||||
|
|
||||||
tool_manager_register_tool_options (GIMP_TYPE_CLONE_TOOL,
|
tool_manager_register_tool_options (GIMP_TYPE_CLONE_TOOL,
|
||||||
(ToolOptions *) clone_options);
|
(GimpToolOptions *) clone_options);
|
||||||
}
|
}
|
||||||
|
|
||||||
tool->tool_cursor = GIMP_CLONE_TOOL_CURSOR;
|
tool->tool_cursor = GIMP_CLONE_TOOL_CURSOR;
|
||||||
|
@ -804,7 +804,7 @@ clone_options_new (void)
|
||||||
options->aligned = options->aligned_d = CLONE_DEFAULT_ALIGNED;
|
options->aligned = options->aligned_d = CLONE_DEFAULT_ALIGNED;
|
||||||
|
|
||||||
/* the main vbox */
|
/* the main vbox */
|
||||||
vbox = ((ToolOptions *) options)->main_vbox;
|
vbox = ((GimpToolOptions *) options)->main_vbox;
|
||||||
|
|
||||||
frame = gimp_radio_group_new2 (TRUE, _("Source"),
|
frame = gimp_radio_group_new2 (TRUE, _("Source"),
|
||||||
gimp_radio_button_update,
|
gimp_radio_button_update,
|
||||||
|
@ -840,7 +840,7 @@ clone_options_new (void)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
clone_options_reset (ToolOptions *tool_options)
|
clone_options_reset (GimpToolOptions *tool_options)
|
||||||
{
|
{
|
||||||
CloneOptions *options;
|
CloneOptions *options;
|
||||||
|
|
||||||
|
|
|
@ -93,7 +93,7 @@ static void color_balance_yb_adjustment_update (GtkAdjustment *adj,
|
||||||
|
|
||||||
|
|
||||||
/* the color balance tool options */
|
/* the color balance tool options */
|
||||||
static ToolOptions *color_balance_options = NULL;
|
static GimpToolOptions *color_balance_options = NULL;
|
||||||
|
|
||||||
/* the color balance dialog */
|
/* the color balance dialog */
|
||||||
static ColorBalanceDialog *color_balance_dialog = NULL;
|
static ColorBalanceDialog *color_balance_dialog = NULL;
|
||||||
|
@ -173,7 +173,7 @@ gimp_color_balance_tool_init (GimpColorBalanceTool *bc_tool)
|
||||||
color_balance_options = tool_options_new ();
|
color_balance_options = tool_options_new ();
|
||||||
|
|
||||||
tool_manager_register_tool_options (GIMP_TYPE_COLOR_BALANCE_TOOL,
|
tool_manager_register_tool_options (GIMP_TYPE_COLOR_BALANCE_TOOL,
|
||||||
(ToolOptions *) color_balance_options);
|
(GimpToolOptions *) color_balance_options);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -55,7 +55,7 @@ typedef struct _GimpColorPickerToolOptions GimpColorPickerToolOptions;
|
||||||
|
|
||||||
struct _GimpColorPickerToolOptions
|
struct _GimpColorPickerToolOptions
|
||||||
{
|
{
|
||||||
ToolOptions tool_options;
|
GimpToolOptions tool_options;
|
||||||
|
|
||||||
gboolean sample_merged;
|
gboolean sample_merged;
|
||||||
gboolean sample_merged_d;
|
gboolean sample_merged_d;
|
||||||
|
@ -108,7 +108,7 @@ static void gimp_color_picker_tool_draw (GimpDrawTool *draw_to
|
||||||
|
|
||||||
static GimpColorPickerToolOptions * gimp_color_picker_tool_options_new (void);
|
static GimpColorPickerToolOptions * gimp_color_picker_tool_options_new (void);
|
||||||
|
|
||||||
static void gimp_color_picker_tool_options_reset (ToolOptions *tool_options);
|
static void gimp_color_picker_tool_options_reset (GimpToolOptions *tool_options);
|
||||||
static void gimp_color_picker_tool_info_window_close_callback (GtkWidget *widget,
|
static void gimp_color_picker_tool_info_window_close_callback (GtkWidget *widget,
|
||||||
gpointer data);
|
gpointer data);
|
||||||
static void gimp_color_picker_tool_info_update (GimpTool *tool,
|
static void gimp_color_picker_tool_info_update (GimpTool *tool,
|
||||||
|
@ -224,7 +224,7 @@ gimp_color_picker_tool_init (GimpColorPickerTool *color_picker_tool)
|
||||||
gimp_color_picker_tool_options = gimp_color_picker_tool_options_new ();
|
gimp_color_picker_tool_options = gimp_color_picker_tool_options_new ();
|
||||||
|
|
||||||
tool_manager_register_tool_options (GIMP_TYPE_COLOR_PICKER_TOOL,
|
tool_manager_register_tool_options (GIMP_TYPE_COLOR_PICKER_TOOL,
|
||||||
(ToolOptions *) gimp_color_picker_tool_options);
|
(GimpToolOptions *) gimp_color_picker_tool_options);
|
||||||
}
|
}
|
||||||
|
|
||||||
tool->preserve = FALSE; /* Don't preserve on drawable change */
|
tool->preserve = FALSE; /* Don't preserve on drawable change */
|
||||||
|
@ -256,7 +256,7 @@ gimp_color_picker_tool_destroy (GtkObject *object)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gimp_color_picker_tool_options_reset (ToolOptions *tool_options)
|
gimp_color_picker_tool_options_reset (GimpToolOptions *tool_options)
|
||||||
{
|
{
|
||||||
GimpColorPickerToolOptions *options;
|
GimpColorPickerToolOptions *options;
|
||||||
|
|
||||||
|
@ -284,7 +284,7 @@ gimp_color_picker_tool_options_new (void)
|
||||||
GtkWidget *scale;
|
GtkWidget *scale;
|
||||||
|
|
||||||
options = g_new0 (GimpColorPickerToolOptions, 1);
|
options = g_new0 (GimpColorPickerToolOptions, 1);
|
||||||
tool_options_init ((ToolOptions *) options,
|
tool_options_init ((GimpToolOptions *) options,
|
||||||
gimp_color_picker_tool_options_reset);
|
gimp_color_picker_tool_options_reset);
|
||||||
|
|
||||||
options->sample_merged = options->sample_merged_d = FALSE;
|
options->sample_merged = options->sample_merged_d = FALSE;
|
||||||
|
|
|
@ -121,7 +121,7 @@ static void gimp_convolve_tool_motion (GimpPaintTool *paint_tool
|
||||||
gdouble rate);
|
gdouble rate);
|
||||||
|
|
||||||
static ConvolveOptions * convolve_options_new (void);
|
static ConvolveOptions * convolve_options_new (void);
|
||||||
static void convolve_options_reset (ToolOptions *options);
|
static void convolve_options_reset (GimpToolOptions *options);
|
||||||
|
|
||||||
|
|
||||||
/* The parent class */
|
/* The parent class */
|
||||||
|
@ -242,7 +242,7 @@ gimp_convolve_tool_init (GimpConvolveTool *convolve)
|
||||||
convolve_options = convolve_options_new ();
|
convolve_options = convolve_options_new ();
|
||||||
|
|
||||||
tool_manager_register_tool_options (GIMP_TYPE_CONVOLVE_TOOL,
|
tool_manager_register_tool_options (GIMP_TYPE_CONVOLVE_TOOL,
|
||||||
(ToolOptions *) convolve_options);
|
(GimpToolOptions *) convolve_options);
|
||||||
}
|
}
|
||||||
|
|
||||||
tool->tool_cursor = GIMP_BLUR_TOOL_CURSOR;
|
tool->tool_cursor = GIMP_BLUR_TOOL_CURSOR;
|
||||||
|
@ -724,7 +724,7 @@ convolve_options_new (void)
|
||||||
options->rate = options->rate_d = DEFAULT_CONVOLVE_RATE;
|
options->rate = options->rate_d = DEFAULT_CONVOLVE_RATE;
|
||||||
|
|
||||||
/* the main vbox */
|
/* the main vbox */
|
||||||
vbox = ((ToolOptions *) options)->main_vbox;
|
vbox = ((GimpToolOptions *) options)->main_vbox;
|
||||||
|
|
||||||
/* the rate scale */
|
/* the rate scale */
|
||||||
hbox = gtk_hbox_new (FALSE, 4);
|
hbox = gtk_hbox_new (FALSE, 4);
|
||||||
|
@ -765,7 +765,7 @@ convolve_options_new (void)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
convolve_options_reset (ToolOptions *tool_options)
|
convolve_options_reset (GimpToolOptions *tool_options)
|
||||||
{
|
{
|
||||||
ConvolveOptions *options;
|
ConvolveOptions *options;
|
||||||
|
|
||||||
|
|
|
@ -67,7 +67,7 @@ typedef struct _CropOptions CropOptions;
|
||||||
|
|
||||||
struct _CropOptions
|
struct _CropOptions
|
||||||
{
|
{
|
||||||
ToolOptions tool_options;
|
GimpToolOptions tool_options;
|
||||||
|
|
||||||
gboolean layer_only;
|
gboolean layer_only;
|
||||||
gboolean layer_only_d;
|
gboolean layer_only_d;
|
||||||
|
@ -160,7 +160,7 @@ static void crop_size_changed (GtkWidget *widget,
|
||||||
gpointer data);
|
gpointer data);
|
||||||
|
|
||||||
static CropOptions * crop_options_new (void);
|
static CropOptions * crop_options_new (void);
|
||||||
static void crop_options_reset (ToolOptions *tool_options);
|
static void crop_options_reset (GimpToolOptions *tool_options);
|
||||||
|
|
||||||
|
|
||||||
static GimpDrawToolClass *parent_class = NULL;
|
static GimpDrawToolClass *parent_class = NULL;
|
||||||
|
@ -244,7 +244,7 @@ gimp_crop_tool_init (GimpCropTool *crop_tool)
|
||||||
crop_options = crop_options_new ();
|
crop_options = crop_options_new ();
|
||||||
|
|
||||||
tool_manager_register_tool_options (GIMP_TYPE_CROP_TOOL,
|
tool_manager_register_tool_options (GIMP_TYPE_CROP_TOOL,
|
||||||
(ToolOptions *) crop_options);
|
(GimpToolOptions *) crop_options);
|
||||||
}
|
}
|
||||||
|
|
||||||
tool->preserve = FALSE; /* Don't preserve on drawable change */
|
tool->preserve = FALSE; /* Don't preserve on drawable change */
|
||||||
|
@ -1227,7 +1227,7 @@ crop_options_new (void)
|
||||||
GtkWidget *frame;
|
GtkWidget *frame;
|
||||||
|
|
||||||
options = g_new0 (CropOptions, 1);
|
options = g_new0 (CropOptions, 1);
|
||||||
tool_options_init ((ToolOptions *) options,
|
tool_options_init ((GimpToolOptions *) options,
|
||||||
crop_options_reset);
|
crop_options_reset);
|
||||||
|
|
||||||
options->layer_only = options->layer_only_d = FALSE;
|
options->layer_only = options->layer_only_d = FALSE;
|
||||||
|
@ -1279,7 +1279,7 @@ crop_options_new (void)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
crop_options_reset (ToolOptions *tool_options)
|
crop_options_reset (GimpToolOptions *tool_options)
|
||||||
{
|
{
|
||||||
CropOptions *options;
|
CropOptions *options;
|
||||||
|
|
||||||
|
|
|
@ -175,7 +175,7 @@ static void curves_write_to_file (FILE *f);
|
||||||
|
|
||||||
|
|
||||||
/* the curves tool options */
|
/* the curves tool options */
|
||||||
static ToolOptions * curves_options = NULL;
|
static GimpToolOptions * curves_options = NULL;
|
||||||
|
|
||||||
/* the curves dialog */
|
/* the curves dialog */
|
||||||
static CurvesDialog * curves_dialog = NULL;
|
static CurvesDialog * curves_dialog = NULL;
|
||||||
|
@ -270,7 +270,7 @@ gimp_curves_tool_init (GimpCurvesTool *bc_tool)
|
||||||
curves_options = tool_options_new ();
|
curves_options = tool_options_new ();
|
||||||
|
|
||||||
tool_manager_register_tool_options (GIMP_TYPE_CURVES_TOOL,
|
tool_manager_register_tool_options (GIMP_TYPE_CURVES_TOOL,
|
||||||
(ToolOptions *) curves_options);
|
(GimpToolOptions *) curves_options);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -122,7 +122,7 @@ static gfloat gimp_dodgeburn_tool_shadows_lut_func (gpointer user_dat
|
||||||
gfloat value);
|
gfloat value);
|
||||||
|
|
||||||
static DodgeBurnOptions * gimp_dodgeburn_tool_options_new (void);
|
static DodgeBurnOptions * gimp_dodgeburn_tool_options_new (void);
|
||||||
static void gimp_dodgeburn_tool_options_reset (ToolOptions *tool_options);
|
static void gimp_dodgeburn_tool_options_reset (GimpToolOptions *tool_options);
|
||||||
|
|
||||||
|
|
||||||
static gdouble non_gui_exposure;
|
static gdouble non_gui_exposure;
|
||||||
|
@ -205,7 +205,7 @@ gimp_dodgeburn_tool_init (GimpDodgeBurnTool *dodgeburn)
|
||||||
dodgeburn_options = gimp_dodgeburn_tool_options_new ();
|
dodgeburn_options = gimp_dodgeburn_tool_options_new ();
|
||||||
|
|
||||||
tool_manager_register_tool_options (GIMP_TYPE_DODGEBURN_TOOL,
|
tool_manager_register_tool_options (GIMP_TYPE_DODGEBURN_TOOL,
|
||||||
(ToolOptions *) dodgeburn_options);
|
(GimpToolOptions *) dodgeburn_options);
|
||||||
}
|
}
|
||||||
|
|
||||||
tool->tool_cursor = GIMP_DODGE_TOOL_CURSOR;
|
tool->tool_cursor = GIMP_DODGE_TOOL_CURSOR;
|
||||||
|
@ -659,7 +659,7 @@ gimp_dodgeburn_tool_options_new (void)
|
||||||
options->mode = options->mode_d = DODGEBURN_DEFAULT_MODE;
|
options->mode = options->mode_d = DODGEBURN_DEFAULT_MODE;
|
||||||
|
|
||||||
/* the main vbox */
|
/* the main vbox */
|
||||||
vbox = ((ToolOptions *) options)->main_vbox;
|
vbox = ((GimpToolOptions *) options)->main_vbox;
|
||||||
|
|
||||||
/* the exposure scale */
|
/* the exposure scale */
|
||||||
hbox = gtk_hbox_new (FALSE, 4);
|
hbox = gtk_hbox_new (FALSE, 4);
|
||||||
|
@ -721,7 +721,7 @@ gimp_dodgeburn_tool_options_new (void)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gimp_dodgeburn_tool_options_reset (ToolOptions *tool_options)
|
gimp_dodgeburn_tool_options_reset (GimpToolOptions *tool_options)
|
||||||
{
|
{
|
||||||
DodgeBurnOptions *options;
|
DodgeBurnOptions *options;
|
||||||
|
|
||||||
|
|
|
@ -191,7 +191,7 @@ gimp_ellipse_select_tool_init (GimpEllipseSelectTool *ellipse_select)
|
||||||
selection_options_reset);
|
selection_options_reset);
|
||||||
|
|
||||||
tool_manager_register_tool_options (GIMP_TYPE_ELLIPSE_SELECT_TOOL,
|
tool_manager_register_tool_options (GIMP_TYPE_ELLIPSE_SELECT_TOOL,
|
||||||
(ToolOptions *) ellipse_options);
|
(GimpToolOptions *) ellipse_options);
|
||||||
}
|
}
|
||||||
|
|
||||||
tool->tool_cursor = GIMP_ELLIPSE_SELECT_TOOL_CURSOR;
|
tool->tool_cursor = GIMP_ELLIPSE_SELECT_TOOL_CURSOR;
|
||||||
|
|
|
@ -86,7 +86,7 @@ static void gimp_eraser_tool_motion (GimpPaintTool *paint_tool,
|
||||||
gboolean anti_erase);
|
gboolean anti_erase);
|
||||||
|
|
||||||
static EraserOptions * gimp_eraser_tool_options_new (void);
|
static EraserOptions * gimp_eraser_tool_options_new (void);
|
||||||
static void gimp_eraser_tool_options_reset (ToolOptions *tool_options);
|
static void gimp_eraser_tool_options_reset (GimpToolOptions *tool_options);
|
||||||
|
|
||||||
|
|
||||||
/* local variables */
|
/* local variables */
|
||||||
|
@ -170,7 +170,7 @@ gimp_eraser_tool_init (GimpEraserTool *eraser)
|
||||||
eraser_options = gimp_eraser_tool_options_new ();
|
eraser_options = gimp_eraser_tool_options_new ();
|
||||||
|
|
||||||
tool_manager_register_tool_options (GIMP_TYPE_ERASER_TOOL,
|
tool_manager_register_tool_options (GIMP_TYPE_ERASER_TOOL,
|
||||||
(ToolOptions *) eraser_options);
|
(GimpToolOptions *) eraser_options);
|
||||||
}
|
}
|
||||||
|
|
||||||
tool->tool_cursor = GIMP_ERASER_TOOL_CURSOR;
|
tool->tool_cursor = GIMP_ERASER_TOOL_CURSOR;
|
||||||
|
@ -402,7 +402,7 @@ gimp_eraser_tool_options_new (void)
|
||||||
options->anti_erase = options->anti_erase_d = ERASER_DEFAULT_ANTI_ERASE;
|
options->anti_erase = options->anti_erase_d = ERASER_DEFAULT_ANTI_ERASE;
|
||||||
|
|
||||||
/* the main vbox */
|
/* the main vbox */
|
||||||
vbox = ((ToolOptions *) options)->main_vbox;
|
vbox = ((GimpToolOptions *) options)->main_vbox;
|
||||||
|
|
||||||
/* the hard toggle */
|
/* the hard toggle */
|
||||||
options->hard_w = gtk_check_button_new_with_label (_("Hard Edge"));
|
options->hard_w = gtk_check_button_new_with_label (_("Hard Edge"));
|
||||||
|
@ -428,7 +428,7 @@ gimp_eraser_tool_options_new (void)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gimp_eraser_tool_options_reset (ToolOptions *tool_options)
|
gimp_eraser_tool_options_reset (GimpToolOptions *tool_options)
|
||||||
{
|
{
|
||||||
EraserOptions *options;
|
EraserOptions *options;
|
||||||
|
|
||||||
|
|
|
@ -62,7 +62,7 @@ typedef struct _FlipOptions FlipOptions;
|
||||||
|
|
||||||
struct _FlipOptions
|
struct _FlipOptions
|
||||||
{
|
{
|
||||||
ToolOptions tool_options;
|
GimpToolOptions tool_options;
|
||||||
|
|
||||||
InternalOrientationType type;
|
InternalOrientationType type;
|
||||||
InternalOrientationType type_d;
|
InternalOrientationType type_d;
|
||||||
|
@ -89,7 +89,7 @@ static TileManager * gimp_flip_tool_transform (GimpTransformTool *tool,
|
||||||
TransformState state);
|
TransformState state);
|
||||||
|
|
||||||
static FlipOptions * flip_options_new (void);
|
static FlipOptions * flip_options_new (void);
|
||||||
static void flip_options_reset (ToolOptions *tool_options);
|
static void flip_options_reset (GimpToolOptions *tool_options);
|
||||||
|
|
||||||
|
|
||||||
static FlipOptions *flip_options = NULL;
|
static FlipOptions *flip_options = NULL;
|
||||||
|
@ -250,7 +250,7 @@ gimp_flip_tool_init (GimpFlipTool *flip_tool)
|
||||||
flip_options = flip_options_new ();
|
flip_options = flip_options_new ();
|
||||||
|
|
||||||
tool_manager_register_tool_options (GIMP_TYPE_FLIP_TOOL,
|
tool_manager_register_tool_options (GIMP_TYPE_FLIP_TOOL,
|
||||||
(ToolOptions *) flip_options);
|
(GimpToolOptions *) flip_options);
|
||||||
}
|
}
|
||||||
|
|
||||||
tool->tool_cursor = GIMP_FLIP_HORIZONTAL_TOOL_CURSOR;
|
tool->tool_cursor = GIMP_FLIP_HORIZONTAL_TOOL_CURSOR;
|
||||||
|
@ -387,7 +387,7 @@ flip_options_new (void)
|
||||||
GtkWidget *frame;
|
GtkWidget *frame;
|
||||||
|
|
||||||
options = g_new0 (FlipOptions, 1);
|
options = g_new0 (FlipOptions, 1);
|
||||||
tool_options_init ((ToolOptions *) options,
|
tool_options_init ((GimpToolOptions *) options,
|
||||||
flip_options_reset);
|
flip_options_reset);
|
||||||
|
|
||||||
options->type = options->type_d = ORIENTATION_HORIZONTAL;
|
options->type = options->type_d = ORIENTATION_HORIZONTAL;
|
||||||
|
@ -415,7 +415,7 @@ flip_options_new (void)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
flip_options_reset (ToolOptions *tool_options)
|
flip_options_reset (GimpToolOptions *tool_options)
|
||||||
{
|
{
|
||||||
FlipOptions *options;
|
FlipOptions *options;
|
||||||
|
|
||||||
|
|
|
@ -203,7 +203,7 @@ gimp_free_select_tool_init (GimpFreeSelectTool *free_select)
|
||||||
selection_options_reset);
|
selection_options_reset);
|
||||||
|
|
||||||
tool_manager_register_tool_options (GIMP_TYPE_FREE_SELECT_TOOL,
|
tool_manager_register_tool_options (GIMP_TYPE_FREE_SELECT_TOOL,
|
||||||
(ToolOptions *) free_options);
|
(GimpToolOptions *) free_options);
|
||||||
}
|
}
|
||||||
|
|
||||||
tool->tool_cursor = GIMP_FREE_SELECT_TOOL_CURSOR;
|
tool->tool_cursor = GIMP_FREE_SELECT_TOOL_CURSOR;
|
||||||
|
|
|
@ -460,7 +460,7 @@ gimp_fuzzy_select_tool_init (GimpFuzzySelectTool *fuzzy_select)
|
||||||
selection_options_reset);
|
selection_options_reset);
|
||||||
|
|
||||||
tool_manager_register_tool_options (GIMP_TYPE_FUZZY_SELECT_TOOL,
|
tool_manager_register_tool_options (GIMP_TYPE_FUZZY_SELECT_TOOL,
|
||||||
(ToolOptions *) fuzzy_options);
|
(GimpToolOptions *) fuzzy_options);
|
||||||
}
|
}
|
||||||
|
|
||||||
tool->tool_cursor = GIMP_FUZZY_SELECT_TOOL_CURSOR;
|
tool->tool_cursor = GIMP_FUZZY_SELECT_TOOL_CURSOR;
|
||||||
|
|
|
@ -79,7 +79,7 @@ static void histogram_tool_dialog_update (HistogramToolDialog *htd,
|
||||||
|
|
||||||
|
|
||||||
/* the histogram tool options */
|
/* the histogram tool options */
|
||||||
static ToolOptions * histogram_options = NULL;
|
static GimpToolOptions * histogram_options = NULL;
|
||||||
|
|
||||||
/* the histogram tool dialog */
|
/* the histogram tool dialog */
|
||||||
static HistogramToolDialog * histogram_dialog = NULL;
|
static HistogramToolDialog * histogram_dialog = NULL;
|
||||||
|
@ -157,7 +157,7 @@ gimp_histogram_tool_init (GimpHistogramTool *bc_tool)
|
||||||
histogram_options = tool_options_new ();
|
histogram_options = tool_options_new ();
|
||||||
|
|
||||||
tool_manager_register_tool_options (GIMP_TYPE_HISTOGRAM_TOOL,
|
tool_manager_register_tool_options (GIMP_TYPE_HISTOGRAM_TOOL,
|
||||||
(ToolOptions *) histogram_options);
|
(GimpToolOptions *) histogram_options);
|
||||||
}
|
}
|
||||||
|
|
||||||
tool->scroll_lock = TRUE; /* Disallow scrolling */
|
tool->scroll_lock = TRUE; /* Disallow scrolling */
|
||||||
|
|
|
@ -102,7 +102,7 @@ static gint hue_saturation_hue_partition_events (GtkWidget *,
|
||||||
|
|
||||||
|
|
||||||
/* the hue-saturation tool options */
|
/* the hue-saturation tool options */
|
||||||
static ToolOptions *hue_saturation_options = NULL;
|
static GimpToolOptions *hue_saturation_options = NULL;
|
||||||
|
|
||||||
/* the hue-saturation tool dialog */
|
/* the hue-saturation tool dialog */
|
||||||
static HueSaturationDialog *hue_saturation_dialog = NULL;
|
static HueSaturationDialog *hue_saturation_dialog = NULL;
|
||||||
|
@ -195,7 +195,7 @@ gimp_hue_saturation_tool_init (GimpHueSaturationTool *bc_tool)
|
||||||
hue_saturation_options = tool_options_new ();
|
hue_saturation_options = tool_options_new ();
|
||||||
|
|
||||||
tool_manager_register_tool_options (GIMP_TYPE_HUE_SATURATION_TOOL,
|
tool_manager_register_tool_options (GIMP_TYPE_HUE_SATURATION_TOOL,
|
||||||
(ToolOptions *) hue_saturation_options);
|
(GimpToolOptions *) hue_saturation_options);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -123,7 +123,7 @@ static void gimp_ink_tool_init (GimpInkTool *tool);
|
||||||
static void gimp_ink_tool_destroy (GtkObject *object);
|
static void gimp_ink_tool_destroy (GtkObject *object);
|
||||||
|
|
||||||
static InkOptions * ink_options_new (void);
|
static InkOptions * ink_options_new (void);
|
||||||
static void ink_options_reset (ToolOptions *tool_options);
|
static void ink_options_reset (GimpToolOptions *tool_options);
|
||||||
|
|
||||||
static void ink_button_press (GimpTool *tool,
|
static void ink_button_press (GimpTool *tool,
|
||||||
GdkEventButton *mevent,
|
GdkEventButton *mevent,
|
||||||
|
@ -303,9 +303,9 @@ gimp_ink_tool_init (GimpInkTool *ink_tool)
|
||||||
ink_options = ink_options_new ();
|
ink_options = ink_options_new ();
|
||||||
|
|
||||||
tool_manager_register_tool_options (GIMP_TYPE_INK_TOOL,
|
tool_manager_register_tool_options (GIMP_TYPE_INK_TOOL,
|
||||||
(ToolOptions *) ink_options);
|
(GimpToolOptions *) ink_options);
|
||||||
|
|
||||||
ink_options_reset ((ToolOptions *) ink_options);
|
ink_options_reset ((GimpToolOptions *) ink_options);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -338,7 +338,7 @@ ink_type_update (GtkWidget *radio_button,
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
ink_options_reset (ToolOptions *tool_options)
|
ink_options_reset (GimpToolOptions *tool_options)
|
||||||
{
|
{
|
||||||
InkOptions *options;
|
InkOptions *options;
|
||||||
|
|
||||||
|
@ -398,7 +398,7 @@ ink_options_new (void)
|
||||||
|
|
||||||
/* the main vbox */
|
/* the main vbox */
|
||||||
vbox = gtk_vbox_new (FALSE, 2);
|
vbox = gtk_vbox_new (FALSE, 2);
|
||||||
gtk_box_pack_start (GTK_BOX (((ToolOptions *) options)->main_vbox), vbox,
|
gtk_box_pack_start (GTK_BOX (((GimpToolOptions *) options)->main_vbox), vbox,
|
||||||
TRUE, TRUE, 0);
|
TRUE, TRUE, 0);
|
||||||
gtk_widget_show (vbox);
|
gtk_widget_show (vbox);
|
||||||
|
|
||||||
|
|
|
@ -349,7 +349,7 @@ gimp_iscissors_tool_init (GimpIscissorsTool *iscissors)
|
||||||
iscissors_options = iscissors_options_new ();
|
iscissors_options = iscissors_options_new ();
|
||||||
|
|
||||||
tool_manager_register_tool_options (GIMP_TYPE_ISCISSORS_TOOL,
|
tool_manager_register_tool_options (GIMP_TYPE_ISCISSORS_TOOL,
|
||||||
(ToolOptions *) iscissors_options);
|
(GimpToolOptions *) iscissors_options);
|
||||||
}
|
}
|
||||||
|
|
||||||
tool->auto_snap_to = FALSE; /* Don't snap to guides */
|
tool->auto_snap_to = FALSE; /* Don't snap to guides */
|
||||||
|
|
|
@ -187,7 +187,7 @@ static void levels_write_to_file (FILE *f);
|
||||||
|
|
||||||
|
|
||||||
/* the levels tool options */
|
/* the levels tool options */
|
||||||
static ToolOptions *levels_options = NULL;
|
static GimpToolOptions *levels_options = NULL;
|
||||||
|
|
||||||
/* the levels tool dialog */
|
/* the levels tool dialog */
|
||||||
static LevelsDialog *levels_dialog = NULL;
|
static LevelsDialog *levels_dialog = NULL;
|
||||||
|
@ -271,7 +271,7 @@ gimp_levels_tool_init (GimpLevelsTool *bc_tool)
|
||||||
levels_options = tool_options_new ();
|
levels_options = tool_options_new ();
|
||||||
|
|
||||||
tool_manager_register_tool_options (GIMP_TYPE_LEVELS_TOOL,
|
tool_manager_register_tool_options (GIMP_TYPE_LEVELS_TOOL,
|
||||||
(ToolOptions *) levels_options);
|
(GimpToolOptions *) levels_options);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -47,7 +47,7 @@ typedef struct _MagnifyOptions MagnifyOptions;
|
||||||
|
|
||||||
struct _MagnifyOptions
|
struct _MagnifyOptions
|
||||||
{
|
{
|
||||||
ToolOptions tool_options;
|
GimpToolOptions tool_options;
|
||||||
|
|
||||||
/* gint allow_resize_windows; (from gimprc) */
|
/* gint allow_resize_windows; (from gimprc) */
|
||||||
gint allow_resize_d;
|
gint allow_resize_d;
|
||||||
|
@ -92,7 +92,7 @@ static void zoom_out (gint *src,
|
||||||
gint scale);
|
gint scale);
|
||||||
|
|
||||||
static MagnifyOptions * magnify_options_new (void);
|
static MagnifyOptions * magnify_options_new (void);
|
||||||
static void magnify_options_reset (ToolOptions *tool_options);
|
static void magnify_options_reset (GimpToolOptions *tool_options);
|
||||||
|
|
||||||
|
|
||||||
static MagnifyOptions *magnify_options = NULL;
|
static MagnifyOptions *magnify_options = NULL;
|
||||||
|
@ -175,7 +175,7 @@ gimp_magnify_tool_init (GimpMagnifyTool *magnify_tool)
|
||||||
magnify_options = magnify_options_new ();
|
magnify_options = magnify_options_new ();
|
||||||
|
|
||||||
tool_manager_register_tool_options (GIMP_TYPE_MAGNIFY_TOOL,
|
tool_manager_register_tool_options (GIMP_TYPE_MAGNIFY_TOOL,
|
||||||
(ToolOptions *) magnify_options);
|
(GimpToolOptions *) magnify_options);
|
||||||
}
|
}
|
||||||
|
|
||||||
tool->scroll_lock = TRUE; /* Disallow scrolling */
|
tool->scroll_lock = TRUE; /* Disallow scrolling */
|
||||||
|
@ -198,7 +198,7 @@ gimp_magnify_tool_destroy (GtkObject *object)
|
||||||
/* magnify tool options functions */
|
/* magnify tool options functions */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
magnify_options_reset (ToolOptions *tool_options)
|
magnify_options_reset (GimpToolOptions *tool_options)
|
||||||
{
|
{
|
||||||
MagnifyOptions *options;
|
MagnifyOptions *options;
|
||||||
|
|
||||||
|
@ -222,7 +222,7 @@ magnify_options_new (void)
|
||||||
/* the new magnify tool options structure */
|
/* the new magnify tool options structure */
|
||||||
options = g_new0 (MagnifyOptions, 1);
|
options = g_new0 (MagnifyOptions, 1);
|
||||||
|
|
||||||
tool_options_init ((ToolOptions *) options,
|
tool_options_init ((GimpToolOptions *) options,
|
||||||
magnify_options_reset);
|
magnify_options_reset);
|
||||||
|
|
||||||
options->allow_resize_d = gimprc.allow_resize_windows;
|
options->allow_resize_d = gimprc.allow_resize_windows;
|
||||||
|
|
|
@ -63,7 +63,7 @@ typedef struct _MeasureOptions MeasureOptions;
|
||||||
|
|
||||||
struct _MeasureOptions
|
struct _MeasureOptions
|
||||||
{
|
{
|
||||||
ToolOptions tool_options;
|
GimpToolOptions tool_options;
|
||||||
|
|
||||||
gboolean use_info_window;
|
gboolean use_info_window;
|
||||||
gboolean use_info_window_d;
|
gboolean use_info_window_d;
|
||||||
|
@ -102,7 +102,7 @@ static gdouble measure_get_angle (gint dx,
|
||||||
gdouble xres,
|
gdouble xres,
|
||||||
gdouble yres);
|
gdouble yres);
|
||||||
static MeasureOptions * measure_tool_options_new (void);
|
static MeasureOptions * measure_tool_options_new (void);
|
||||||
static void measure_tool_options_reset (ToolOptions *tool_options);
|
static void measure_tool_options_reset (GimpToolOptions *tool_options);
|
||||||
static void measure_tool_info_window_close_callback (GtkWidget *widget,
|
static void measure_tool_info_window_close_callback (GtkWidget *widget,
|
||||||
gpointer data);
|
gpointer data);
|
||||||
static void measure_tool_info_update (void);
|
static void measure_tool_info_update (void);
|
||||||
|
@ -194,7 +194,7 @@ gimp_measure_tool_init (GimpMeasureTool *measure_tool)
|
||||||
measure_tool_options = measure_tool_options_new ();
|
measure_tool_options = measure_tool_options_new ();
|
||||||
|
|
||||||
tool_manager_register_tool_options (GIMP_TYPE_MEASURE_TOOL,
|
tool_manager_register_tool_options (GIMP_TYPE_MEASURE_TOOL,
|
||||||
(ToolOptions *) measure_tool_options);
|
(GimpToolOptions *) measure_tool_options);
|
||||||
}
|
}
|
||||||
|
|
||||||
tool->preserve = TRUE; /* Preserve on drawable change */
|
tool->preserve = TRUE; /* Preserve on drawable change */
|
||||||
|
@ -782,7 +782,7 @@ gimp_measure_tool_draw (GimpDrawTool *draw_tool)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
measure_tool_options_reset (ToolOptions *tool_options)
|
measure_tool_options_reset (GimpToolOptions *tool_options)
|
||||||
{
|
{
|
||||||
MeasureOptions *options;
|
MeasureOptions *options;
|
||||||
|
|
||||||
|
@ -799,7 +799,7 @@ measure_tool_options_new (void)
|
||||||
GtkWidget *vbox;
|
GtkWidget *vbox;
|
||||||
|
|
||||||
options = g_new0 (MeasureOptions, 1);
|
options = g_new0 (MeasureOptions, 1);
|
||||||
tool_options_init ((ToolOptions *) options,
|
tool_options_init ((GimpToolOptions *) options,
|
||||||
measure_tool_options_reset);
|
measure_tool_options_reset);
|
||||||
|
|
||||||
options->use_info_window = options->use_info_window_d = FALSE;
|
options->use_info_window = options->use_info_window_d = FALSE;
|
||||||
|
|
|
@ -69,7 +69,7 @@ static void move_create_gc (GDisplay *gdisp);
|
||||||
|
|
||||||
|
|
||||||
/* the move tool options */
|
/* the move tool options */
|
||||||
static ToolOptions *move_options = NULL;
|
static GimpToolOptions *move_options = NULL;
|
||||||
|
|
||||||
/* local variables */
|
/* local variables */
|
||||||
static GdkGC *move_gc = NULL;
|
static GdkGC *move_gc = NULL;
|
||||||
|
@ -150,7 +150,7 @@ gimp_move_tool_init (GimpMoveTool *move_tool)
|
||||||
move_options = tool_options_new ();
|
move_options = tool_options_new ();
|
||||||
|
|
||||||
tool_manager_register_tool_options (GIMP_TYPE_MOVE_TOOL,
|
tool_manager_register_tool_options (GIMP_TYPE_MOVE_TOOL,
|
||||||
(ToolOptions *) move_options);
|
(GimpToolOptions *) move_options);
|
||||||
}
|
}
|
||||||
|
|
||||||
move_tool->layer = NULL;
|
move_tool->layer = NULL;
|
||||||
|
|
|
@ -147,7 +147,7 @@ gimp_paintbrush_tool_init (GimpPaintbrushTool *paintbrush)
|
||||||
paint_options_reset);
|
paint_options_reset);
|
||||||
|
|
||||||
tool_manager_register_tool_options (GIMP_TYPE_PAINTBRUSH_TOOL,
|
tool_manager_register_tool_options (GIMP_TYPE_PAINTBRUSH_TOOL,
|
||||||
(ToolOptions *) paintbrush_options);
|
(GimpToolOptions *) paintbrush_options);
|
||||||
}
|
}
|
||||||
|
|
||||||
tool->tool_cursor = GIMP_PAINTBRUSH_TOOL_CURSOR;
|
tool->tool_cursor = GIMP_PAINTBRUSH_TOOL_CURSOR;
|
||||||
|
|
|
@ -137,7 +137,7 @@ paint_options_init (PaintOptions *options,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* initialize the tool options structure */
|
/* initialize the tool options structure */
|
||||||
tool_options_init ((ToolOptions *) options,
|
tool_options_init ((GimpToolOptions *) options,
|
||||||
reset_func);
|
reset_func);
|
||||||
|
|
||||||
/* initialize the paint options structure */
|
/* initialize the paint options structure */
|
||||||
|
@ -275,7 +275,7 @@ paint_options_new (GtkType tool_type,
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
paint_options_reset (ToolOptions *tool_options)
|
paint_options_reset (GimpToolOptions *tool_options)
|
||||||
{
|
{
|
||||||
PaintOptions *options;
|
PaintOptions *options;
|
||||||
GimpContext *default_context;
|
GimpContext *default_context;
|
||||||
|
|
|
@ -91,7 +91,7 @@ typedef struct _PaintOptions PaintOptions;
|
||||||
|
|
||||||
struct _PaintOptions
|
struct _PaintOptions
|
||||||
{
|
{
|
||||||
ToolOptions tool_options;
|
GimpToolOptions tool_options;
|
||||||
|
|
||||||
/* vbox for the common paint options */
|
/* vbox for the common paint options */
|
||||||
GtkWidget *paint_vbox;
|
GtkWidget *paint_vbox;
|
||||||
|
@ -133,7 +133,7 @@ extern PaintGradientOptions non_gui_gradient_options;
|
||||||
PaintOptions * paint_options_new (GtkType tool_type,
|
PaintOptions * paint_options_new (GtkType tool_type,
|
||||||
ToolOptionsResetFunc reset_func);
|
ToolOptionsResetFunc reset_func);
|
||||||
|
|
||||||
void paint_options_reset (ToolOptions *tool_options);
|
void paint_options_reset (GimpToolOptions *tool_options);
|
||||||
|
|
||||||
|
|
||||||
/* to be used by "derived" paint options only */
|
/* to be used by "derived" paint options only */
|
||||||
|
|
|
@ -100,7 +100,7 @@ static void gimp_path_tool_draw (GimpDrawTool *draw_tool);
|
||||||
static GimpDrawToolClass *parent_class = NULL;
|
static GimpDrawToolClass *parent_class = NULL;
|
||||||
|
|
||||||
/* the move tool options */
|
/* the move tool options */
|
||||||
static ToolOptions *path_options = NULL;
|
static GimpToolOptions *path_options = NULL;
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -179,7 +179,7 @@ gimp_path_tool_init (GimpPathTool *path_tool)
|
||||||
path_options = tool_options_new ();
|
path_options = tool_options_new ();
|
||||||
|
|
||||||
tool_manager_register_tool_options (GIMP_TYPE_PATH_TOOL,
|
tool_manager_register_tool_options (GIMP_TYPE_PATH_TOOL,
|
||||||
(ToolOptions *) path_options);
|
(GimpToolOptions *) path_options);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -140,7 +140,7 @@ gimp_pencil_tool_init (GimpPencilTool *pencil)
|
||||||
paint_options_reset);
|
paint_options_reset);
|
||||||
|
|
||||||
tool_manager_register_tool_options (GIMP_TYPE_PENCIL_TOOL,
|
tool_manager_register_tool_options (GIMP_TYPE_PENCIL_TOOL,
|
||||||
(ToolOptions *) pencil_options);
|
(GimpToolOptions *) pencil_options);
|
||||||
}
|
}
|
||||||
|
|
||||||
tool->tool_cursor = GIMP_PENCIL_TOOL_CURSOR;
|
tool->tool_cursor = GIMP_PENCIL_TOOL_CURSOR;
|
||||||
|
|
|
@ -214,7 +214,7 @@ gimp_perspective_tool_init (GimpPerspectiveTool *perspective_tool)
|
||||||
transform_options_reset);
|
transform_options_reset);
|
||||||
|
|
||||||
tool_manager_register_tool_options (GIMP_TYPE_PERSPECTIVE_TOOL,
|
tool_manager_register_tool_options (GIMP_TYPE_PERSPECTIVE_TOOL,
|
||||||
(ToolOptions *) perspective_options);
|
(GimpToolOptions *) perspective_options);
|
||||||
}
|
}
|
||||||
|
|
||||||
tool->tool_cursor = GIMP_PERSPECTIVE_TOOL_CURSOR;
|
tool->tool_cursor = GIMP_PERSPECTIVE_TOOL_CURSOR;
|
||||||
|
|
|
@ -94,7 +94,7 @@ static void posterize_levels_adjustment_update (GtkAdjustment *adjustment,
|
||||||
|
|
||||||
|
|
||||||
/* the posterize tool options */
|
/* the posterize tool options */
|
||||||
static ToolOptions *posterize_options = NULL;
|
static GimpToolOptions *posterize_options = NULL;
|
||||||
|
|
||||||
/* the posterize tool dialog */
|
/* the posterize tool dialog */
|
||||||
static PosterizeDialog *posterize_dialog = NULL;
|
static PosterizeDialog *posterize_dialog = NULL;
|
||||||
|
@ -172,7 +172,7 @@ gimp_posterize_tool_init (GimpPosterizeTool *bc_tool)
|
||||||
posterize_options = tool_options_new ();
|
posterize_options = tool_options_new ();
|
||||||
|
|
||||||
tool_manager_register_tool_options (GIMP_TYPE_POSTERIZE_TOOL,
|
tool_manager_register_tool_options (GIMP_TYPE_POSTERIZE_TOOL,
|
||||||
(ToolOptions *) posterize_options);
|
(GimpToolOptions *) posterize_options);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -233,7 +233,7 @@ gimp_rect_select_tool_init (GimpRectSelectTool *rect_select)
|
||||||
selection_options_reset);
|
selection_options_reset);
|
||||||
|
|
||||||
tool_manager_register_tool_options (GIMP_TYPE_RECT_SELECT_TOOL,
|
tool_manager_register_tool_options (GIMP_TYPE_RECT_SELECT_TOOL,
|
||||||
(ToolOptions *) rect_options);
|
(GimpToolOptions *) rect_options);
|
||||||
}
|
}
|
||||||
|
|
||||||
tool->tool_cursor = GIMP_RECT_SELECT_TOOL_CURSOR;
|
tool->tool_cursor = GIMP_RECT_SELECT_TOOL_CURSOR;
|
||||||
|
|
|
@ -460,7 +460,7 @@ gimp_fuzzy_select_tool_init (GimpFuzzySelectTool *fuzzy_select)
|
||||||
selection_options_reset);
|
selection_options_reset);
|
||||||
|
|
||||||
tool_manager_register_tool_options (GIMP_TYPE_FUZZY_SELECT_TOOL,
|
tool_manager_register_tool_options (GIMP_TYPE_FUZZY_SELECT_TOOL,
|
||||||
(ToolOptions *) fuzzy_options);
|
(GimpToolOptions *) fuzzy_options);
|
||||||
}
|
}
|
||||||
|
|
||||||
tool->tool_cursor = GIMP_FUZZY_SELECT_TOOL_CURSOR;
|
tool->tool_cursor = GIMP_FUZZY_SELECT_TOOL_CURSOR;
|
||||||
|
|
|
@ -192,7 +192,7 @@ gimp_rotate_tool_init (GimpRotateTool *rotate_tool)
|
||||||
transform_options_reset);
|
transform_options_reset);
|
||||||
|
|
||||||
tool_manager_register_tool_options (GIMP_TYPE_ROTATE_TOOL,
|
tool_manager_register_tool_options (GIMP_TYPE_ROTATE_TOOL,
|
||||||
(ToolOptions *) rotate_options);
|
(GimpToolOptions *) rotate_options);
|
||||||
}
|
}
|
||||||
|
|
||||||
tool->tool_cursor = GIMP_ROTATE_TOOL_CURSOR;
|
tool->tool_cursor = GIMP_ROTATE_TOOL_CURSOR;
|
||||||
|
@ -204,7 +204,6 @@ gimp_rotate_tool_init (GimpRotateTool *rotate_tool)
|
||||||
|
|
||||||
/* assemble the transformation matrix */
|
/* assemble the transformation matrix */
|
||||||
gimp_matrix3_identity (tr_tool->transform);
|
gimp_matrix3_identity (tr_tool->transform);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
@ -149,7 +149,7 @@ gimp_scale_tool_init (GimpScaleTool *sc_tool)
|
||||||
transform_options_reset);
|
transform_options_reset);
|
||||||
|
|
||||||
tool_manager_register_tool_options (GIMP_TYPE_SCALE_TOOL,
|
tool_manager_register_tool_options (GIMP_TYPE_SCALE_TOOL,
|
||||||
(ToolOptions *) scale_options);
|
(GimpToolOptions *) scale_options);
|
||||||
}
|
}
|
||||||
|
|
||||||
tool->tool_cursor = GIMP_RESIZE_TOOL_CURSOR;
|
tool->tool_cursor = GIMP_RESIZE_TOOL_CURSOR;
|
||||||
|
|
|
@ -54,7 +54,7 @@ selection_options_init (SelectionOptions *options,
|
||||||
GtkWidget *separator;
|
GtkWidget *separator;
|
||||||
|
|
||||||
/* initialize the tool options structure */
|
/* initialize the tool options structure */
|
||||||
tool_options_init ((ToolOptions *) options,
|
tool_options_init ((GimpToolOptions *) options,
|
||||||
reset_func);
|
reset_func);
|
||||||
|
|
||||||
/* the main vbox */
|
/* the main vbox */
|
||||||
|
@ -305,7 +305,7 @@ selection_options_new (GtkType tool_type,
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
selection_options_reset (ToolOptions *tool_options)
|
selection_options_reset (GimpToolOptions *tool_options)
|
||||||
{
|
{
|
||||||
SelectionOptions *options;
|
SelectionOptions *options;
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
|
|
||||||
struct _SelectionOptions
|
struct _SelectionOptions
|
||||||
{
|
{
|
||||||
ToolOptions tool_options;
|
GimpToolOptions tool_options;
|
||||||
|
|
||||||
/* options used by all selection tools */
|
/* options used by all selection tools */
|
||||||
gboolean feather;
|
gboolean feather;
|
||||||
|
@ -81,7 +81,7 @@ struct _SelectionOptions
|
||||||
SelectionOptions * selection_options_new (GtkType tool_type,
|
SelectionOptions * selection_options_new (GtkType tool_type,
|
||||||
ToolOptionsResetFunc reset_func);
|
ToolOptionsResetFunc reset_func);
|
||||||
|
|
||||||
void selection_options_reset (ToolOptions *tool_options);
|
void selection_options_reset (GimpToolOptions *tool_options);
|
||||||
|
|
||||||
|
|
||||||
/* to be used by "derived" selection options only
|
/* to be used by "derived" selection options only
|
||||||
|
|
|
@ -188,7 +188,7 @@ gimp_shear_tool_init (GimpShearTool *shear_tool)
|
||||||
transform_options_reset);
|
transform_options_reset);
|
||||||
|
|
||||||
tool_manager_register_tool_options (GIMP_TYPE_SHEAR_TOOL,
|
tool_manager_register_tool_options (GIMP_TYPE_SHEAR_TOOL,
|
||||||
(ToolOptions *) shear_options);
|
(GimpToolOptions *) shear_options);
|
||||||
}
|
}
|
||||||
|
|
||||||
tool->tool_cursor = GIMP_SHEAR_TOOL_CURSOR;
|
tool->tool_cursor = GIMP_SHEAR_TOOL_CURSOR;
|
||||||
|
|
|
@ -95,7 +95,7 @@ static void gimp_smudge_tool_allocate_accum_buffer (gint w,
|
||||||
guchar *do_fill);
|
guchar *do_fill);
|
||||||
|
|
||||||
static SmudgeOptions * smudge_options_new (void);
|
static SmudgeOptions * smudge_options_new (void);
|
||||||
static void smudge_options_reset (ToolOptions *tool_options);
|
static void smudge_options_reset (GimpToolOptions *tool_options);
|
||||||
|
|
||||||
|
|
||||||
/* local variables */
|
/* local variables */
|
||||||
|
@ -177,7 +177,7 @@ gimp_smudge_tool_init (GimpSmudgeTool *smudge)
|
||||||
smudge_options = smudge_options_new ();
|
smudge_options = smudge_options_new ();
|
||||||
|
|
||||||
tool_manager_register_tool_options (GIMP_TYPE_SMUDGE_TOOL,
|
tool_manager_register_tool_options (GIMP_TYPE_SMUDGE_TOOL,
|
||||||
(ToolOptions *) smudge_options);
|
(GimpToolOptions *) smudge_options);
|
||||||
}
|
}
|
||||||
|
|
||||||
tool->tool_cursor = GIMP_SMUDGE_TOOL_CURSOR;
|
tool->tool_cursor = GIMP_SMUDGE_TOOL_CURSOR;
|
||||||
|
@ -533,7 +533,7 @@ smudge_options_new (void)
|
||||||
options->rate = options->rate_d = SMUDGE_DEFAULT_RATE;
|
options->rate = options->rate_d = SMUDGE_DEFAULT_RATE;
|
||||||
|
|
||||||
/* the main vbox */
|
/* the main vbox */
|
||||||
vbox = ((ToolOptions *) options)->main_vbox;
|
vbox = ((GimpToolOptions *) options)->main_vbox;
|
||||||
|
|
||||||
/* the rate scale */
|
/* the rate scale */
|
||||||
hbox = gtk_hbox_new (FALSE, 4);
|
hbox = gtk_hbox_new (FALSE, 4);
|
||||||
|
@ -560,7 +560,7 @@ smudge_options_new (void)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
smudge_options_reset (ToolOptions *tool_options)
|
smudge_options_reset (GimpToolOptions *tool_options)
|
||||||
{
|
{
|
||||||
SmudgeOptions *options;
|
SmudgeOptions *options;
|
||||||
|
|
||||||
|
|
|
@ -124,7 +124,7 @@ static void gimp_clone_tool_line_pattern (GimpImage *dest,
|
||||||
gint width);
|
gint width);
|
||||||
|
|
||||||
static CloneOptions * clone_options_new (void);
|
static CloneOptions * clone_options_new (void);
|
||||||
static void clone_options_reset (ToolOptions *options);
|
static void clone_options_reset (GimpToolOptions *options);
|
||||||
|
|
||||||
|
|
||||||
/* The parent class */
|
/* The parent class */
|
||||||
|
@ -228,7 +228,7 @@ gimp_clone_tool_init (GimpCloneTool *clone)
|
||||||
clone_options = clone_options_new ();
|
clone_options = clone_options_new ();
|
||||||
|
|
||||||
tool_manager_register_tool_options (GIMP_TYPE_CLONE_TOOL,
|
tool_manager_register_tool_options (GIMP_TYPE_CLONE_TOOL,
|
||||||
(ToolOptions *) clone_options);
|
(GimpToolOptions *) clone_options);
|
||||||
}
|
}
|
||||||
|
|
||||||
tool->tool_cursor = GIMP_CLONE_TOOL_CURSOR;
|
tool->tool_cursor = GIMP_CLONE_TOOL_CURSOR;
|
||||||
|
@ -804,7 +804,7 @@ clone_options_new (void)
|
||||||
options->aligned = options->aligned_d = CLONE_DEFAULT_ALIGNED;
|
options->aligned = options->aligned_d = CLONE_DEFAULT_ALIGNED;
|
||||||
|
|
||||||
/* the main vbox */
|
/* the main vbox */
|
||||||
vbox = ((ToolOptions *) options)->main_vbox;
|
vbox = ((GimpToolOptions *) options)->main_vbox;
|
||||||
|
|
||||||
frame = gimp_radio_group_new2 (TRUE, _("Source"),
|
frame = gimp_radio_group_new2 (TRUE, _("Source"),
|
||||||
gimp_radio_button_update,
|
gimp_radio_button_update,
|
||||||
|
@ -840,7 +840,7 @@ clone_options_new (void)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
clone_options_reset (ToolOptions *tool_options)
|
clone_options_reset (GimpToolOptions *tool_options)
|
||||||
{
|
{
|
||||||
CloneOptions *options;
|
CloneOptions *options;
|
||||||
|
|
||||||
|
|
|
@ -89,7 +89,7 @@ typedef struct _TextOptions TextOptions;
|
||||||
|
|
||||||
struct _TextOptions
|
struct _TextOptions
|
||||||
{
|
{
|
||||||
ToolOptions tool_options;
|
GimpToolOptions tool_options;
|
||||||
|
|
||||||
gboolean antialias;
|
gboolean antialias;
|
||||||
gboolean antialias_d;
|
gboolean antialias_d;
|
||||||
|
@ -124,7 +124,7 @@ static void text_tool_cursor_update (GimpTool *tool,
|
||||||
GDisplay *gdisp);
|
GDisplay *gdisp);
|
||||||
|
|
||||||
static TextOptions * text_tool_options_new (void);
|
static TextOptions * text_tool_options_new (void);
|
||||||
static void text_tool_options_reset (ToolOptions *tool_options);
|
static void text_tool_options_reset (GimpToolOptions *tool_options);
|
||||||
|
|
||||||
static void text_dialog_create (void);
|
static void text_dialog_create (void);
|
||||||
static void text_dialog_ok_callback (GtkWidget *widget,
|
static void text_dialog_ok_callback (GtkWidget *widget,
|
||||||
|
@ -227,7 +227,7 @@ gimp_text_tool_init (GimpTextTool *text_tool)
|
||||||
text_tool_options = text_tool_options_new ();
|
text_tool_options = text_tool_options_new ();
|
||||||
|
|
||||||
tool_manager_register_tool_options (GIMP_TYPE_TEXT_TOOL,
|
tool_manager_register_tool_options (GIMP_TYPE_TEXT_TOOL,
|
||||||
(ToolOptions *) text_tool_options);
|
(GimpToolOptions *) text_tool_options);
|
||||||
}
|
}
|
||||||
|
|
||||||
tool->tool_cursor = GIMP_TEXT_TOOL_CURSOR;
|
tool->tool_cursor = GIMP_TEXT_TOOL_CURSOR;
|
||||||
|
@ -246,7 +246,7 @@ gimp_text_tool_destroy (GtkObject *object)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
text_tool_options_reset (ToolOptions *tool_options)
|
text_tool_options_reset (GimpToolOptions *tool_options)
|
||||||
{
|
{
|
||||||
TextOptions *options;
|
TextOptions *options;
|
||||||
|
|
||||||
|
@ -271,7 +271,7 @@ text_tool_options_new (void)
|
||||||
GtkWidget *sep;
|
GtkWidget *sep;
|
||||||
|
|
||||||
options = g_new0 (TextOptions, 1);
|
options = g_new0 (TextOptions, 1);
|
||||||
tool_options_init ((ToolOptions *) options,
|
tool_options_init ((GimpToolOptions *) options,
|
||||||
text_tool_options_reset);
|
text_tool_options_reset);
|
||||||
|
|
||||||
options->antialias = options->antialias_d = TRUE;
|
options->antialias = options->antialias_d = TRUE;
|
||||||
|
|
|
@ -100,7 +100,7 @@ static void threshold_histogram_range (HistogramWidget *,
|
||||||
|
|
||||||
|
|
||||||
/* the threshold tool options */
|
/* the threshold tool options */
|
||||||
static ToolOptions *threshold_options = NULL;
|
static GimpToolOptions *threshold_options = NULL;
|
||||||
|
|
||||||
/* the threshold tool dialog */
|
/* the threshold tool dialog */
|
||||||
static ThresholdDialog *threshold_dialog = NULL;
|
static ThresholdDialog *threshold_dialog = NULL;
|
||||||
|
@ -178,7 +178,7 @@ gimp_threshold_tool_init (GimpThresholdTool *bc_tool)
|
||||||
threshold_options = tool_options_new ();
|
threshold_options = tool_options_new ();
|
||||||
|
|
||||||
tool_manager_register_tool_options (GIMP_TYPE_THRESHOLD_TOOL,
|
tool_manager_register_tool_options (GIMP_TYPE_THRESHOLD_TOOL,
|
||||||
(ToolOptions *) threshold_options);
|
(GimpToolOptions *) threshold_options);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -161,7 +161,7 @@ gimp_transform_tool_show_grid (void)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void
|
void
|
||||||
transform_options_reset (ToolOptions *tool_options)
|
transform_options_reset (GimpToolOptions *tool_options)
|
||||||
{
|
{
|
||||||
TransformOptions *options;
|
TransformOptions *options;
|
||||||
|
|
||||||
|
@ -197,7 +197,7 @@ transform_options_init (TransformOptions *options,
|
||||||
GtkWidget *fbox;
|
GtkWidget *fbox;
|
||||||
GtkWidget *grid_density;
|
GtkWidget *grid_density;
|
||||||
|
|
||||||
tool_options_init ((ToolOptions *) options,
|
tool_options_init ((GimpToolOptions *) options,
|
||||||
reset_func);
|
reset_func);
|
||||||
|
|
||||||
options->smoothing = options->smoothing_d = TRUE;
|
options->smoothing = options->smoothing_d = TRUE;
|
||||||
|
@ -311,7 +311,7 @@ transform_options_init (TransformOptions *options,
|
||||||
gtk_widget_show (options->clip_w);
|
gtk_widget_show (options->clip_w);
|
||||||
|
|
||||||
/* Set options to default values */
|
/* Set options to default values */
|
||||||
transform_options_reset((ToolOptions *) options);
|
transform_options_reset ((GimpToolOptions *) options);
|
||||||
}
|
}
|
||||||
|
|
||||||
TransformOptions *
|
TransformOptions *
|
||||||
|
|
|
@ -25,7 +25,7 @@ typedef struct _TransformOptions TransformOptions;
|
||||||
|
|
||||||
struct _TransformOptions
|
struct _TransformOptions
|
||||||
{
|
{
|
||||||
ToolOptions tool_options;
|
GimpToolOptions tool_options;
|
||||||
|
|
||||||
gboolean smoothing;
|
gboolean smoothing;
|
||||||
gboolean smoothing_d;
|
gboolean smoothing_d;
|
||||||
|
@ -59,7 +59,7 @@ TransformOptions * transform_options_new (GtkType tool_type,
|
||||||
void transform_options_init (TransformOptions *options,
|
void transform_options_init (TransformOptions *options,
|
||||||
GtkType tool_type,
|
GtkType tool_type,
|
||||||
ToolOptionsResetFunc reset_func);
|
ToolOptionsResetFunc reset_func);
|
||||||
void transform_options_reset (ToolOptions *tool_options);
|
void transform_options_reset (GimpToolOptions *tool_options);
|
||||||
|
|
||||||
gboolean gimp_transform_tool_smoothing (void);
|
gboolean gimp_transform_tool_smoothing (void);
|
||||||
gboolean gimp_transform_tool_showpath (void);
|
gboolean gimp_transform_tool_showpath (void);
|
||||||
|
|
|
@ -137,7 +137,7 @@ paint_options_init (PaintOptions *options,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* initialize the tool options structure */
|
/* initialize the tool options structure */
|
||||||
tool_options_init ((ToolOptions *) options,
|
tool_options_init ((GimpToolOptions *) options,
|
||||||
reset_func);
|
reset_func);
|
||||||
|
|
||||||
/* initialize the paint options structure */
|
/* initialize the paint options structure */
|
||||||
|
@ -275,7 +275,7 @@ paint_options_new (GtkType tool_type,
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
paint_options_reset (ToolOptions *tool_options)
|
paint_options_reset (GimpToolOptions *tool_options)
|
||||||
{
|
{
|
||||||
PaintOptions *options;
|
PaintOptions *options;
|
||||||
GimpContext *default_context;
|
GimpContext *default_context;
|
||||||
|
|
|
@ -91,7 +91,7 @@ typedef struct _PaintOptions PaintOptions;
|
||||||
|
|
||||||
struct _PaintOptions
|
struct _PaintOptions
|
||||||
{
|
{
|
||||||
ToolOptions tool_options;
|
GimpToolOptions tool_options;
|
||||||
|
|
||||||
/* vbox for the common paint options */
|
/* vbox for the common paint options */
|
||||||
GtkWidget *paint_vbox;
|
GtkWidget *paint_vbox;
|
||||||
|
@ -133,7 +133,7 @@ extern PaintGradientOptions non_gui_gradient_options;
|
||||||
PaintOptions * paint_options_new (GtkType tool_type,
|
PaintOptions * paint_options_new (GtkType tool_type,
|
||||||
ToolOptionsResetFunc reset_func);
|
ToolOptionsResetFunc reset_func);
|
||||||
|
|
||||||
void paint_options_reset (ToolOptions *tool_options);
|
void paint_options_reset (GimpToolOptions *tool_options);
|
||||||
|
|
||||||
|
|
||||||
/* to be used by "derived" paint options only */
|
/* to be used by "derived" paint options only */
|
||||||
|
|
|
@ -164,7 +164,7 @@ void path_tool_motion_curve (Tool *, GdkEventMotion *, GDisplay *);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* the path tool options */
|
/* the path tool options */
|
||||||
static ToolOptions *path_options = NULL;
|
static GimpToolOptions *path_options = NULL;
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1410,7 +1410,7 @@ tools_new_path_tool (void)
|
||||||
if (! path_options)
|
if (! path_options)
|
||||||
{
|
{
|
||||||
path_options = tool_options_new (_("Path Tool"));
|
path_options = tool_options_new (_("Path Tool"));
|
||||||
tools_register (PATH_TOOL, (ToolOptions *) path_options);
|
tools_register (PATH_TOOL, (GimpToolOptions *) path_options);
|
||||||
}
|
}
|
||||||
|
|
||||||
tool = tools_new_tool (PATH_TOOL);
|
tool = tools_new_tool (PATH_TOOL);
|
||||||
|
@ -1887,10 +1887,10 @@ path_tool_draw_helper (NPath *path,
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if 0
|
||||||
void
|
void
|
||||||
path_tool_draw (Tool *tool)
|
path_tool_draw (Tool *tool)
|
||||||
{
|
{
|
||||||
#if 0
|
|
||||||
GDisplay * gdisp;
|
GDisplay * gdisp;
|
||||||
NPath * cur_path;
|
NPath * cur_path;
|
||||||
PathTool * path_tool;
|
PathTool * path_tool;
|
||||||
|
@ -1909,8 +1909,8 @@ path_tool_draw (Tool *tool)
|
||||||
/* fprintf (stderr, "path_tool_draw end.\n");
|
/* fprintf (stderr, "path_tool_draw end.\n");
|
||||||
*/
|
*/
|
||||||
#endif PATH_TOOL_DEBUG
|
#endif PATH_TOOL_DEBUG
|
||||||
#endif
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -54,7 +54,7 @@ selection_options_init (SelectionOptions *options,
|
||||||
GtkWidget *separator;
|
GtkWidget *separator;
|
||||||
|
|
||||||
/* initialize the tool options structure */
|
/* initialize the tool options structure */
|
||||||
tool_options_init ((ToolOptions *) options,
|
tool_options_init ((GimpToolOptions *) options,
|
||||||
reset_func);
|
reset_func);
|
||||||
|
|
||||||
/* the main vbox */
|
/* the main vbox */
|
||||||
|
@ -305,7 +305,7 @@ selection_options_new (GtkType tool_type,
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
selection_options_reset (ToolOptions *tool_options)
|
selection_options_reset (GimpToolOptions *tool_options)
|
||||||
{
|
{
|
||||||
SelectionOptions *options;
|
SelectionOptions *options;
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
|
|
||||||
struct _SelectionOptions
|
struct _SelectionOptions
|
||||||
{
|
{
|
||||||
ToolOptions tool_options;
|
GimpToolOptions tool_options;
|
||||||
|
|
||||||
/* options used by all selection tools */
|
/* options used by all selection tools */
|
||||||
gboolean feather;
|
gboolean feather;
|
||||||
|
@ -81,7 +81,7 @@ struct _SelectionOptions
|
||||||
SelectionOptions * selection_options_new (GtkType tool_type,
|
SelectionOptions * selection_options_new (GtkType tool_type,
|
||||||
ToolOptionsResetFunc reset_func);
|
ToolOptionsResetFunc reset_func);
|
||||||
|
|
||||||
void selection_options_reset (ToolOptions *tool_options);
|
void selection_options_reset (GimpToolOptions *tool_options);
|
||||||
|
|
||||||
|
|
||||||
/* to be used by "derived" selection options only
|
/* to be used by "derived" selection options only
|
||||||
|
|
|
@ -406,6 +406,40 @@ tool_manager_register_tool (Gimp *gimp,
|
||||||
{
|
{
|
||||||
GimpToolManager *tool_manager;
|
GimpToolManager *tool_manager;
|
||||||
GimpToolInfo *tool_info;
|
GimpToolInfo *tool_info;
|
||||||
|
const gchar *pdb_string = "gimp_paintbrush_default";
|
||||||
|
|
||||||
|
if (tool_type == GIMP_TYPE_PENCIL_TOOL)
|
||||||
|
{
|
||||||
|
pdb_string = "gimp_pencil";
|
||||||
|
}
|
||||||
|
else if (tool_type == GIMP_TYPE_PAINTBRUSH_TOOL)
|
||||||
|
{
|
||||||
|
pdb_string = "gimp_paintbrush_default";
|
||||||
|
}
|
||||||
|
else if (tool_type == GIMP_TYPE_ERASER_TOOL)
|
||||||
|
{
|
||||||
|
pdb_string = "gimp_eraser_default";
|
||||||
|
}
|
||||||
|
else if (tool_type == GIMP_TYPE_AIRBRUSH_TOOL)
|
||||||
|
{
|
||||||
|
pdb_string = "gimp_airbrush_default";
|
||||||
|
}
|
||||||
|
else if (tool_type == GIMP_TYPE_CLONE_TOOL)
|
||||||
|
{
|
||||||
|
pdb_string = "gimp_clone_default";
|
||||||
|
}
|
||||||
|
else if (tool_type == GIMP_TYPE_CONVOLVE_TOOL)
|
||||||
|
{
|
||||||
|
pdb_string = "gimp_convolve_default";
|
||||||
|
}
|
||||||
|
else if (tool_type == GIMP_TYPE_SMUDGE_TOOL)
|
||||||
|
{
|
||||||
|
pdb_string = "gimp_smudge_default";
|
||||||
|
}
|
||||||
|
else if (tool_type == GIMP_TYPE_DODGEBURN_TOOL)
|
||||||
|
{
|
||||||
|
pdb_string = "gimp_dodgeburn_default";
|
||||||
|
}
|
||||||
|
|
||||||
tool_manager = tool_manager_get (gimp);
|
tool_manager = tool_manager_get (gimp);
|
||||||
|
|
||||||
|
@ -419,6 +453,7 @@ tool_manager_register_tool (Gimp *gimp,
|
||||||
menu_accel,
|
menu_accel,
|
||||||
help_domain,
|
help_domain,
|
||||||
help_data,
|
help_data,
|
||||||
|
pdb_string,
|
||||||
icon_data);
|
icon_data);
|
||||||
|
|
||||||
gimp_container_add (gimp->tool_info_list, GIMP_OBJECT (tool_info));
|
gimp_container_add (gimp->tool_info_list, GIMP_OBJECT (tool_info));
|
||||||
|
@ -426,7 +461,7 @@ tool_manager_register_tool (Gimp *gimp,
|
||||||
|
|
||||||
void
|
void
|
||||||
tool_manager_register_tool_options (GtkType tool_type,
|
tool_manager_register_tool_options (GtkType tool_type,
|
||||||
ToolOptions *tool_options)
|
GimpToolOptions *tool_options)
|
||||||
{
|
{
|
||||||
GimpToolInfo *tool_info;
|
GimpToolInfo *tool_info;
|
||||||
|
|
||||||
|
|
|
@ -61,7 +61,7 @@ void tool_manager_register_tool (Gimp *gimp,
|
||||||
const gchar **icon_data);
|
const gchar **icon_data);
|
||||||
|
|
||||||
void tool_manager_register_tool_options (GtkType tool_type,
|
void tool_manager_register_tool_options (GtkType tool_type,
|
||||||
ToolOptions *tool_options);
|
GimpToolOptions *tool_options);
|
||||||
|
|
||||||
GimpToolInfo * tool_manager_get_info_by_type (Gimp *gimp,
|
GimpToolInfo * tool_manager_get_info_by_type (Gimp *gimp,
|
||||||
GtkType tool_type);
|
GtkType tool_type);
|
||||||
|
|
|
@ -28,21 +28,20 @@
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
tool_options_init (ToolOptions *options,
|
tool_options_init (GimpToolOptions *options,
|
||||||
ToolOptionsResetFunc reset_func)
|
ToolOptionsResetFunc reset_func)
|
||||||
{
|
{
|
||||||
options->main_vbox = gtk_vbox_new (FALSE, 2);
|
options->main_vbox = gtk_vbox_new (FALSE, 2);
|
||||||
options->reset_func = reset_func;
|
options->reset_func = reset_func;
|
||||||
}
|
}
|
||||||
|
|
||||||
ToolOptions *
|
GimpToolOptions *
|
||||||
tool_options_new (void)
|
tool_options_new (void)
|
||||||
{
|
{
|
||||||
ToolOptions *options;
|
GimpToolOptions *options;
|
||||||
|
|
||||||
GtkWidget *label;
|
GtkWidget *label;
|
||||||
|
|
||||||
options = g_new0 (ToolOptions, 1);
|
options = g_new0 (GimpToolOptions, 1);
|
||||||
tool_options_init (options, NULL);
|
tool_options_init (options, NULL);
|
||||||
|
|
||||||
label = gtk_label_new (_("This tool has no options."));
|
label = gtk_label_new (_("This tool has no options."));
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
|
|
||||||
/* the tool options structures */
|
/* the tool options structures */
|
||||||
|
|
||||||
struct _ToolOptions
|
struct _GimpToolOptions
|
||||||
{
|
{
|
||||||
GtkWidget *main_vbox;
|
GtkWidget *main_vbox;
|
||||||
|
|
||||||
|
@ -32,12 +32,12 @@ struct _ToolOptions
|
||||||
/* create a dummy tool options structure
|
/* create a dummy tool options structure
|
||||||
* (to be used by tools without options)
|
* (to be used by tools without options)
|
||||||
*/
|
*/
|
||||||
ToolOptions * tool_options_new (void);
|
GimpToolOptions * tool_options_new (void);
|
||||||
|
|
||||||
/* initialize an already allocated ToolOptions structure
|
/* initialize an already allocated ToolOptions structure
|
||||||
* (to be used by derived tool options only)
|
* (to be used by derived tool options only)
|
||||||
*/
|
*/
|
||||||
void tool_options_init (ToolOptions *options,
|
void tool_options_init (GimpToolOptions *options,
|
||||||
ToolOptionsResetFunc reset_func);
|
ToolOptionsResetFunc reset_func);
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -39,18 +39,12 @@ typedef struct _GimpBezierSelectTool GimpBezierSelectTool;
|
||||||
|
|
||||||
/* stuff */
|
/* stuff */
|
||||||
|
|
||||||
typedef struct _ToolOptions ToolOptions;
|
|
||||||
typedef struct _SelectionOptions SelectionOptions;
|
typedef struct _SelectionOptions SelectionOptions;
|
||||||
|
|
||||||
|
|
||||||
/* functions */
|
/* functions */
|
||||||
|
|
||||||
typedef void (* ToolOptionsResetFunc) (ToolOptions *tool_options);
|
typedef void (* ToolOptionsResetFunc) (GimpToolOptions *tool_options);
|
||||||
|
|
||||||
|
|
||||||
/* EEK */
|
|
||||||
|
|
||||||
typedef struct _Tool Tool;
|
|
||||||
|
|
||||||
|
|
||||||
/* enums */
|
/* enums */
|
||||||
|
|
|
@ -161,7 +161,7 @@ gimp_transform_tool_show_grid (void)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void
|
void
|
||||||
transform_options_reset (ToolOptions *tool_options)
|
transform_options_reset (GimpToolOptions *tool_options)
|
||||||
{
|
{
|
||||||
TransformOptions *options;
|
TransformOptions *options;
|
||||||
|
|
||||||
|
@ -197,7 +197,7 @@ transform_options_init (TransformOptions *options,
|
||||||
GtkWidget *fbox;
|
GtkWidget *fbox;
|
||||||
GtkWidget *grid_density;
|
GtkWidget *grid_density;
|
||||||
|
|
||||||
tool_options_init ((ToolOptions *) options,
|
tool_options_init ((GimpToolOptions *) options,
|
||||||
reset_func);
|
reset_func);
|
||||||
|
|
||||||
options->smoothing = options->smoothing_d = TRUE;
|
options->smoothing = options->smoothing_d = TRUE;
|
||||||
|
@ -311,7 +311,7 @@ transform_options_init (TransformOptions *options,
|
||||||
gtk_widget_show (options->clip_w);
|
gtk_widget_show (options->clip_w);
|
||||||
|
|
||||||
/* Set options to default values */
|
/* Set options to default values */
|
||||||
transform_options_reset((ToolOptions *) options);
|
transform_options_reset ((GimpToolOptions *) options);
|
||||||
}
|
}
|
||||||
|
|
||||||
TransformOptions *
|
TransformOptions *
|
||||||
|
|
|
@ -25,7 +25,7 @@ typedef struct _TransformOptions TransformOptions;
|
||||||
|
|
||||||
struct _TransformOptions
|
struct _TransformOptions
|
||||||
{
|
{
|
||||||
ToolOptions tool_options;
|
GimpToolOptions tool_options;
|
||||||
|
|
||||||
gboolean smoothing;
|
gboolean smoothing;
|
||||||
gboolean smoothing_d;
|
gboolean smoothing_d;
|
||||||
|
@ -59,7 +59,7 @@ TransformOptions * transform_options_new (GtkType tool_type,
|
||||||
void transform_options_init (TransformOptions *options,
|
void transform_options_init (TransformOptions *options,
|
||||||
GtkType tool_type,
|
GtkType tool_type,
|
||||||
ToolOptionsResetFunc reset_func);
|
ToolOptionsResetFunc reset_func);
|
||||||
void transform_options_reset (ToolOptions *tool_options);
|
void transform_options_reset (GimpToolOptions *tool_options);
|
||||||
|
|
||||||
gboolean gimp_transform_tool_smoothing (void);
|
gboolean gimp_transform_tool_smoothing (void);
|
||||||
gboolean gimp_transform_tool_showpath (void);
|
gboolean gimp_transform_tool_showpath (void);
|
||||||
|
|
|
@ -193,7 +193,8 @@ gimp_dialog_factory_register_entry (GimpDialogFactory *factory,
|
||||||
GimpDialogNewFunc new_func,
|
GimpDialogNewFunc new_func,
|
||||||
gboolean singleton,
|
gboolean singleton,
|
||||||
gboolean session_managed,
|
gboolean session_managed,
|
||||||
gboolean remember_size)
|
gboolean remember_size,
|
||||||
|
gboolean remember_if_open)
|
||||||
{
|
{
|
||||||
GimpDialogFactoryEntry *entry;
|
GimpDialogFactoryEntry *entry;
|
||||||
|
|
||||||
|
@ -208,6 +209,7 @@ gimp_dialog_factory_register_entry (GimpDialogFactory *factory,
|
||||||
entry->singleton = singleton ? TRUE : FALSE;
|
entry->singleton = singleton ? TRUE : FALSE;
|
||||||
entry->session_managed = session_managed ? TRUE : FALSE;
|
entry->session_managed = session_managed ? TRUE : FALSE;
|
||||||
entry->remember_size = remember_size ? TRUE : FALSE;
|
entry->remember_size = remember_size ? TRUE : FALSE;
|
||||||
|
entry->remember_if_open = remember_if_open ? TRUE : FALSE;
|
||||||
|
|
||||||
factory->registered_dialogs = g_list_prepend (factory->registered_dialogs,
|
factory->registered_dialogs = g_list_prepend (factory->registered_dialogs,
|
||||||
entry);
|
entry);
|
||||||
|
@ -1003,7 +1005,10 @@ gimp_dialog_factory_get_window_info (GtkWidget *window,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (! info->toplevel_entry || info->toplevel_entry->remember_if_open)
|
||||||
info->open = GTK_WIDGET_VISIBLE (window);
|
info->open = GTK_WIDGET_VISIBLE (window);
|
||||||
|
else
|
||||||
|
info->open = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
@ -42,6 +42,7 @@ struct _GimpDialogFactoryEntry
|
||||||
gboolean singleton;
|
gboolean singleton;
|
||||||
gboolean session_managed;
|
gboolean session_managed;
|
||||||
gboolean remember_size;
|
gboolean remember_size;
|
||||||
|
gboolean remember_if_open;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GimpSessionInfo
|
struct _GimpSessionInfo
|
||||||
|
@ -113,7 +114,8 @@ void gimp_dialog_factory_register_entry (GimpDialogFactory *factory,
|
||||||
GimpDialogNewFunc new_func,
|
GimpDialogNewFunc new_func,
|
||||||
gboolean singleton,
|
gboolean singleton,
|
||||||
gboolean session_managed,
|
gboolean session_managed,
|
||||||
gboolean remember_size);
|
gboolean remember_size,
|
||||||
|
gboolean remember_if_open);
|
||||||
GimpDialogFactoryEntry * gimp_dialog_factory_find_entry
|
GimpDialogFactoryEntry * gimp_dialog_factory_find_entry
|
||||||
(GimpDialogFactory *factory,
|
(GimpDialogFactory *factory,
|
||||||
const gchar *identifier);
|
const gchar *identifier);
|
||||||
|
|
|
@ -70,7 +70,7 @@ static GtkWidget *options_preview = NULL;
|
||||||
static GtkWidget *options_eventbox = NULL;
|
static GtkWidget *options_eventbox = NULL;
|
||||||
static GtkWidget *options_reset_button = NULL;
|
static GtkWidget *options_reset_button = NULL;
|
||||||
|
|
||||||
static ToolOptions *visible_tool_options = NULL;
|
static GimpToolOptions *visible_tool_options = NULL;
|
||||||
|
|
||||||
|
|
||||||
/* public functions */
|
/* public functions */
|
||||||
|
|
Loading…
Reference in New Issue