Commit c104ee5f authored by Sven Neumann's avatar Sven Neumann
Browse files

renamed "Custom from Editor" to "Custom Gradient" and added the

possibility to drop gradients onto the blend tooloptions to set
the blend mode and the gradient in one move.


--Sven
parent a78e51c4
Thu Mar 9 22:29:14 GMT 2000
Fri Mar 10 02:55:12 CET 2000 Sven Neumann <sven@gimp.org>
* app/blend.c: renamed Blend Mode from "Custom from Editor" to
"Custom Gradient" since the gradient editor is not any longer
the primary source for gradients. As an extra bonus, you get a
new dnd target...
Thu Mar 9 22:29:14 GMT 2000 Andy Thomas <alt@gimp.org>
* app/gimpimage.c
 
......
......@@ -29,6 +29,7 @@
#include "fuzzy_select.h"
#include "gdisplay.h"
#include "gimage_mask.h"
#include "gimpdnd.h"
#include "gimpui.h"
#include "gradient.h"
#include "interface.h"
......@@ -139,6 +140,14 @@ static PixelRegion distR =
0 /* process count */
};
/* dnd stuff */
static GtkTargetEntry blend_target_table[] =
{
GIMP_TARGET_GRADIENT,
GIMP_TARGET_TOOL
};
static guint blend_n_targets = (sizeof (blend_target_table) /
sizeof (blend_target_table[0]));
/* local function prototypes */
......@@ -150,6 +159,9 @@ static void blend_motion (Tool *, GdkEventMotion *, gpointer);
static void blend_cursor_update (Tool *, GdkEventMotion *, gpointer);
static void blend_control (Tool *, ToolAction, gpointer);
static void blend_options_drop_gradient (GtkWidget *, gradient_t *, gpointer);
static void blend_options_drop_tool (GtkWidget *, ToolType, gpointer);
static double gradient_calc_conical_sym_factor (double dist, double *axis, double offset,
double x, double y);
static double gradient_calc_conical_asym_factor (double dist, double *axis, double offset,
......@@ -256,6 +268,16 @@ blend_options_new (void)
/* the main vbox */
vbox = ((ToolOptions *) options)->main_vbox;
/* dnd stuff */
gtk_drag_dest_set (vbox,
GTK_DEST_DEFAULT_HIGHLIGHT |
GTK_DEST_DEFAULT_MOTION |
GTK_DEST_DEFAULT_DROP,
blend_target_table, blend_n_targets,
GDK_ACTION_COPY);
gimp_dnd_gradient_dest_set (vbox, blend_options_drop_gradient, NULL);
gimp_dnd_tool_dest_set (vbox, blend_options_drop_tool, NULL);
/* the offset scale */
table = gtk_table_new (4, 2, FALSE);
gtk_table_set_col_spacing (GTK_TABLE (table), 0, 4);
......@@ -283,7 +305,7 @@ blend_options_new (void)
_("FG to BG (RGB)"), (gpointer) FG_BG_RGB_MODE, NULL,
_("FG to BG (HSV)"), (gpointer) FG_BG_HSV_MODE, NULL,
_("FG to Transparent"), (gpointer) FG_TRANS_MODE, NULL,
_("Custom from Editor"), (gpointer) CUSTOM_MODE, NULL,
_("Custom Gradient"), (gpointer) CUSTOM_MODE, NULL,
NULL);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 1,
......@@ -692,6 +714,26 @@ blend_control (Tool *tool,
}
static void
blend_options_drop_gradient (GtkWidget *widget,
gradient_t *gradient,
gpointer data)
{
gimp_context_set_gradient (gimp_context_get_user (), gradient);
gtk_option_menu_set_history (GTK_OPTION_MENU (blend_options->blend_mode_w),
CUSTOM_MODE);
blend_options->blend_mode = CUSTOM_MODE;
}
static void
blend_options_drop_tool (GtkWidget *widget,
ToolType tool,
gpointer data)
{
gimp_context_set_tool (gimp_context_get_user (), tool);
}
/*****/
/* The actual blending procedure */
......
......@@ -29,6 +29,7 @@
#include "fuzzy_select.h"
#include "gdisplay.h"
#include "gimage_mask.h"
#include "gimpdnd.h"
#include "gimpui.h"
#include "gradient.h"
#include "interface.h"
......@@ -139,6 +140,14 @@ static PixelRegion distR =
0 /* process count */
};
/* dnd stuff */
static GtkTargetEntry blend_target_table[] =
{
GIMP_TARGET_GRADIENT,
GIMP_TARGET_TOOL
};
static guint blend_n_targets = (sizeof (blend_target_table) /
sizeof (blend_target_table[0]));
/* local function prototypes */
......@@ -150,6 +159,9 @@ static void blend_motion (Tool *, GdkEventMotion *, gpointer);
static void blend_cursor_update (Tool *, GdkEventMotion *, gpointer);
static void blend_control (Tool *, ToolAction, gpointer);
static void blend_options_drop_gradient (GtkWidget *, gradient_t *, gpointer);
static void blend_options_drop_tool (GtkWidget *, ToolType, gpointer);
static double gradient_calc_conical_sym_factor (double dist, double *axis, double offset,
double x, double y);
static double gradient_calc_conical_asym_factor (double dist, double *axis, double offset,
......@@ -256,6 +268,16 @@ blend_options_new (void)
/* the main vbox */
vbox = ((ToolOptions *) options)->main_vbox;
/* dnd stuff */
gtk_drag_dest_set (vbox,
GTK_DEST_DEFAULT_HIGHLIGHT |
GTK_DEST_DEFAULT_MOTION |
GTK_DEST_DEFAULT_DROP,
blend_target_table, blend_n_targets,
GDK_ACTION_COPY);
gimp_dnd_gradient_dest_set (vbox, blend_options_drop_gradient, NULL);
gimp_dnd_tool_dest_set (vbox, blend_options_drop_tool, NULL);
/* the offset scale */
table = gtk_table_new (4, 2, FALSE);
gtk_table_set_col_spacing (GTK_TABLE (table), 0, 4);
......@@ -283,7 +305,7 @@ blend_options_new (void)
_("FG to BG (RGB)"), (gpointer) FG_BG_RGB_MODE, NULL,
_("FG to BG (HSV)"), (gpointer) FG_BG_HSV_MODE, NULL,
_("FG to Transparent"), (gpointer) FG_TRANS_MODE, NULL,
_("Custom from Editor"), (gpointer) CUSTOM_MODE, NULL,
_("Custom Gradient"), (gpointer) CUSTOM_MODE, NULL,
NULL);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 1,
......@@ -692,6 +714,26 @@ blend_control (Tool *tool,
}
static void
blend_options_drop_gradient (GtkWidget *widget,
gradient_t *gradient,
gpointer data)
{
gimp_context_set_gradient (gimp_context_get_user (), gradient);
gtk_option_menu_set_history (GTK_OPTION_MENU (blend_options->blend_mode_w),
CUSTOM_MODE);
blend_options->blend_mode = CUSTOM_MODE;
}
static void
blend_options_drop_tool (GtkWidget *widget,
ToolType tool,
gpointer data)
{
gimp_context_set_tool (gimp_context_get_user (), tool);
}
/*****/
/* The actual blending procedure */
......
......@@ -29,6 +29,7 @@
#include "fuzzy_select.h"
#include "gdisplay.h"
#include "gimage_mask.h"
#include "gimpdnd.h"
#include "gimpui.h"
#include "gradient.h"
#include "interface.h"
......@@ -139,6 +140,14 @@ static PixelRegion distR =
0 /* process count */
};
/* dnd stuff */
static GtkTargetEntry blend_target_table[] =
{
GIMP_TARGET_GRADIENT,
GIMP_TARGET_TOOL
};
static guint blend_n_targets = (sizeof (blend_target_table) /
sizeof (blend_target_table[0]));
/* local function prototypes */
......@@ -150,6 +159,9 @@ static void blend_motion (Tool *, GdkEventMotion *, gpointer);
static void blend_cursor_update (Tool *, GdkEventMotion *, gpointer);
static void blend_control (Tool *, ToolAction, gpointer);
static void blend_options_drop_gradient (GtkWidget *, gradient_t *, gpointer);
static void blend_options_drop_tool (GtkWidget *, ToolType, gpointer);
static double gradient_calc_conical_sym_factor (double dist, double *axis, double offset,
double x, double y);
static double gradient_calc_conical_asym_factor (double dist, double *axis, double offset,
......@@ -256,6 +268,16 @@ blend_options_new (void)
/* the main vbox */
vbox = ((ToolOptions *) options)->main_vbox;
/* dnd stuff */
gtk_drag_dest_set (vbox,
GTK_DEST_DEFAULT_HIGHLIGHT |
GTK_DEST_DEFAULT_MOTION |
GTK_DEST_DEFAULT_DROP,
blend_target_table, blend_n_targets,
GDK_ACTION_COPY);
gimp_dnd_gradient_dest_set (vbox, blend_options_drop_gradient, NULL);
gimp_dnd_tool_dest_set (vbox, blend_options_drop_tool, NULL);
/* the offset scale */
table = gtk_table_new (4, 2, FALSE);
gtk_table_set_col_spacing (GTK_TABLE (table), 0, 4);
......@@ -283,7 +305,7 @@ blend_options_new (void)
_("FG to BG (RGB)"), (gpointer) FG_BG_RGB_MODE, NULL,
_("FG to BG (HSV)"), (gpointer) FG_BG_HSV_MODE, NULL,
_("FG to Transparent"), (gpointer) FG_TRANS_MODE, NULL,
_("Custom from Editor"), (gpointer) CUSTOM_MODE, NULL,
_("Custom Gradient"), (gpointer) CUSTOM_MODE, NULL,
NULL);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 1,
......@@ -692,6 +714,26 @@ blend_control (Tool *tool,
}
static void
blend_options_drop_gradient (GtkWidget *widget,
gradient_t *gradient,
gpointer data)
{
gimp_context_set_gradient (gimp_context_get_user (), gradient);
gtk_option_menu_set_history (GTK_OPTION_MENU (blend_options->blend_mode_w),
CUSTOM_MODE);
blend_options->blend_mode = CUSTOM_MODE;
}
static void
blend_options_drop_tool (GtkWidget *widget,
ToolType tool,
gpointer data)
{
gimp_context_set_tool (gimp_context_get_user (), tool);
}
/*****/
/* The actual blending procedure */
......
......@@ -29,6 +29,7 @@
#include "fuzzy_select.h"
#include "gdisplay.h"
#include "gimage_mask.h"
#include "gimpdnd.h"
#include "gimpui.h"
#include "gradient.h"
#include "interface.h"
......@@ -139,6 +140,14 @@ static PixelRegion distR =
0 /* process count */
};
/* dnd stuff */
static GtkTargetEntry blend_target_table[] =
{
GIMP_TARGET_GRADIENT,
GIMP_TARGET_TOOL
};
static guint blend_n_targets = (sizeof (blend_target_table) /
sizeof (blend_target_table[0]));
/* local function prototypes */
......@@ -150,6 +159,9 @@ static void blend_motion (Tool *, GdkEventMotion *, gpointer);
static void blend_cursor_update (Tool *, GdkEventMotion *, gpointer);
static void blend_control (Tool *, ToolAction, gpointer);
static void blend_options_drop_gradient (GtkWidget *, gradient_t *, gpointer);
static void blend_options_drop_tool (GtkWidget *, ToolType, gpointer);
static double gradient_calc_conical_sym_factor (double dist, double *axis, double offset,
double x, double y);
static double gradient_calc_conical_asym_factor (double dist, double *axis, double offset,
......@@ -256,6 +268,16 @@ blend_options_new (void)
/* the main vbox */
vbox = ((ToolOptions *) options)->main_vbox;
/* dnd stuff */
gtk_drag_dest_set (vbox,
GTK_DEST_DEFAULT_HIGHLIGHT |
GTK_DEST_DEFAULT_MOTION |
GTK_DEST_DEFAULT_DROP,
blend_target_table, blend_n_targets,
GDK_ACTION_COPY);
gimp_dnd_gradient_dest_set (vbox, blend_options_drop_gradient, NULL);
gimp_dnd_tool_dest_set (vbox, blend_options_drop_tool, NULL);
/* the offset scale */
table = gtk_table_new (4, 2, FALSE);
gtk_table_set_col_spacing (GTK_TABLE (table), 0, 4);
......@@ -283,7 +305,7 @@ blend_options_new (void)
_("FG to BG (RGB)"), (gpointer) FG_BG_RGB_MODE, NULL,
_("FG to BG (HSV)"), (gpointer) FG_BG_HSV_MODE, NULL,
_("FG to Transparent"), (gpointer) FG_TRANS_MODE, NULL,
_("Custom from Editor"), (gpointer) CUSTOM_MODE, NULL,
_("Custom Gradient"), (gpointer) CUSTOM_MODE, NULL,
NULL);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 1,
......@@ -692,6 +714,26 @@ blend_control (Tool *tool,
}
static void
blend_options_drop_gradient (GtkWidget *widget,
gradient_t *gradient,
gpointer data)
{
gimp_context_set_gradient (gimp_context_get_user (), gradient);
gtk_option_menu_set_history (GTK_OPTION_MENU (blend_options->blend_mode_w),
CUSTOM_MODE);
blend_options->blend_mode = CUSTOM_MODE;
}
static void
blend_options_drop_tool (GtkWidget *widget,
ToolType tool,
gpointer data)
{
gimp_context_set_tool (gimp_context_get_user (), tool);
}
/*****/
/* The actual blending procedure */
......
......@@ -6,7 +6,7 @@
msgid ""
msgstr ""
"Project-Id-Version: GIMP 1.1.18\n"
"POT-Creation-Date: 2000-03-09 20:57+0100\n"
"POT-Creation-Date: 2000-03-10 02:47+0100\n"
"PO-Revision-Date: 2000-03-08 21:52+0100\n"
"Last-Translator: Sven Neumann <sven@gimp.org>\n"
"Language-Team: German <de@li.org>\n"
......@@ -145,123 +145,123 @@ msgstr "Kurve ist nicht geschlossen!"
msgid "Paintbrush operation failed."
msgstr "Pinseloperation schlug fehl."
#: app/blend.c:272
#: app/blend.c:294
msgid "Offset:"
msgstr "Versatz:"
#: app/blend.c:283
#: app/blend.c:305
msgid "FG to BG (RGB)"
msgstr "VG nach HG (RGB)"
#: app/blend.c:284
#: app/blend.c:306
msgid "FG to BG (HSV)"
msgstr "VG nach HG (HSV)"
#: app/blend.c:285
#: app/blend.c:307
msgid "FG to Transparent"
msgstr "VG nach Transparent"
#: app/blend.c:286
msgid "Custom from Editor"
msgstr "Selbsterstellt aus Editor"
#: app/blend.c:308
msgid "Custom Gradient"
msgstr "Eigener Farbverlauf"
#: app/blend.c:290
#: app/blend.c:312
msgid "Blend:"
msgstr "bergang:"
#: app/blend.c:298 app/gradient.c:533 app/preferences_dialog.c:2209
#: app/blend.c:320 app/gradient.c:533 app/preferences_dialog.c:2209
msgid "Linear"
msgstr "Linear"
#: app/blend.c:299
#: app/blend.c:321
msgid "Bi-Linear"
msgstr "Bi-Linear"
#: app/blend.c:300
#: app/blend.c:322
msgid "Radial"
msgstr "Kreisfrmig"
#: app/blend.c:301
#: app/blend.c:323
msgid "Square"
msgstr "Quadratisch"
#: app/blend.c:302
#: app/blend.c:324
msgid "Conical (symmetric)"
msgstr "Konisch (symmetrisch)"
#: app/blend.c:303
#: app/blend.c:325
msgid "Conical (asymmetric)"
msgstr "Konisch (asymmetrisch)"
#: app/blend.c:304
#: app/blend.c:326
msgid "Shapeburst (angular)"
msgstr "Formangepasst (winklig)"
#: app/blend.c:305
#: app/blend.c:327
msgid "Shapeburst (spherical)"
msgstr "Formangepasst (sphrisch)"
#: app/blend.c:306
#: app/blend.c:328
msgid "Shapeburst (dimpled)"
msgstr "Formangepasst (dimpled)"
#: app/blend.c:307
#: app/blend.c:329
msgid "Spiral (clockwise)"
msgstr "Spirale (rechtsdrehend)"
#: app/blend.c:308
#: app/blend.c:330
msgid "Spiral (anticlockwise)"
msgstr "Spirale (linksdrehend)"
#: app/blend.c:312
#: app/blend.c:334
msgid "Gradient:"
msgstr "Farbverlauf:"
#: app/blend.c:320 app/preferences_dialog.c:1808
#: app/blend.c:342 app/preferences_dialog.c:1808
msgid "None"
msgstr "Keine"
#: app/blend.c:321
#: app/blend.c:343
msgid "Sawtooth Wave"
msgstr "Sgezahnwelle"
#: app/blend.c:322
#: app/blend.c:344
msgid "Triangular Wave"
msgstr "Dreieckswelle"
#: app/blend.c:326
#: app/blend.c:348
msgid "Repeat:"
msgstr "Wiederholung:"
#: app/blend.c:345
#: app/blend.c:367
msgid "Adaptive Supersampling"
msgstr "Anpassende Hochrechnung"
#: app/blend.c:373
#: app/blend.c:395
msgid "Max Depth:"
msgstr "Maximale Tiefe:"
#: app/blend.c:386 app/bucket_fill.c:127 app/fuzzy_select.c:661
#: app/blend.c:408 app/bucket_fill.c:127 app/fuzzy_select.c:661
msgid "Threshold:"
msgstr "Schwellenwert:"
#: app/blend.c:413
#: app/blend.c:435
msgid "Blend: Invalid for indexed images."
msgstr "bergang: Bei indizierten Bildern nicht mglich."
#: app/blend.c:438
#: app/blend.c:460
msgid "Blend: 0, 0"
msgstr "bergang: 0, 0"
#: app/blend.c:501
#: app/blend.c:523
msgid "Blend operation failed."
msgstr "bergang schlug fehl."
#: app/blend.c:507
#: app/blend.c:529
msgid "Blending..."
msgstr "bergang..."
#: app/blend.c:585 app/blend.c:595
#: app/blend.c:607 app/blend.c:617
msgid "Blend: "
msgstr "bergang: "
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment