Commit e20554fb authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer
Browse files

gimprc.in user_install renamed the "gflares" dir to "gflare" in all places

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

	* gimprc.in
	* user_install
	* user_install.bat: renamed the "gflares" dir to "gflare" in all
	places because this seems to be the naming convention of all the
	other plug-in dirs.

	* libgimp/gimpwidgets.[ch]:

	- gimp_random_seed_new(): return the spinbutton and the time
	  toggle as pointers.
	- gimp_scale_entry_new(): allow the spinbutton to have a larger
	  range of possible values than the scale.

	* plugins/[all calls to the above two functions]: changed the
	calls accordingly.
	Did some more ui updates in some of these plugins (Frames saying
	"Parameter Settings", spacing etc.)

	* plug-ins/gflare/Makefile.am
	* plug-ins/gflare/gflare.c: hacked it to match the plugin ui
	standards. Didn't get rid of the gradient menus.
parent 496d7277
2000-02-05 Michael Natterer <mitch@gimp.org>
* gimprc.in
* user_install
* user_install.bat: renamed the "gflares" dir to "gflare" in all
places because this seems to be the naming convention of all the
other plug-in dirs.
* libgimp/gimpwidgets.[ch]:
- gimp_random_seed_new(): return the spinbutton and the time
toggle as pointers.
- gimp_scale_entry_new(): allow the spinbutton to have a larger
range of possible values than the scale.
* plugins/[all calls to the above two functions]: changed the
calls accordingly.
Did some more ui updates in some of these plugins (Frames saying
"Parameter Settings", spacing etc.)
* plug-ins/gflare/Makefile.am
* plug-ins/gflare/gflare.c: hacked it to match the plugin ui
standards. Didn't get rid of the gradient menus.
Sat Feb 5 13:22:47 CET 2000 Sven Neumann <sven@gimp.org>
 
* app/global_edit.c: Reverted Stanislavs change. While I think that
......
......@@ -46,8 +46,8 @@ echo "mkdir $2/curves"
mkdir $2/curves
echo "mkdir $2/gfig"
mkdir $2/gfig
echo "mkdir $2/gflares"
mkdir $2/gflares
echo "mkdir $2/gflare"
mkdir $2/gflare
echo "mkdir $2/fractalexplorer"
mkdir $2/fractalexplorer
echo "mkdir $2/gimpressionist"
......
......@@ -13,7 +13,7 @@ mkdir %2\plug-ins
mkdir %2\modules
mkdir %2\scripts
mkdir %2\gfig
mkdir %2\gflares
mkdir %2\gflare
mkdir %2\fractalexplorer
mkdir %2\gimpressionist
mkdir %2\gimpressionist\Brushes
......
......@@ -310,6 +310,6 @@
# GFlare path
# This path will be searched for gflares when you use the GFlare plug-in.
(gflare-path "${gimp_dir}/gflares:${gimp_data_dir}/gflares")
(gflare-path "${gimp_dir}/gflare:${gimp_data_dir}/gflare")
# [end of file]
......@@ -310,6 +310,6 @@
# GFlare path
# This path will be searched for gflares when you use the GFlare plug-in.
(gflare-path "${gimp_dir}/gflares:${gimp_data_dir}/gflares")
(gflare-path "${gimp_dir}/gflare:${gimp_data_dir}/gflare")
# [end of file]
......@@ -397,6 +397,17 @@ gimp_spin_button_new (GtkObject **adjustment, /* return value */
return spinbutton;
}
static void
gimp_scale_entry_unconstrained_adjustment_callback (GtkAdjustment *adjustment,
GtkAdjustment *other_adj)
{
gtk_signal_handler_block_by_data (GTK_OBJECT (other_adj), adjustment);
gtk_adjustment_set_value (other_adj, adjustment->value);
gtk_signal_handler_unblock_by_data (GTK_OBJECT (other_adj), adjustment);
}
GtkObject *
gimp_scale_entry_new (GtkTable *table,
gint column,
......@@ -410,6 +421,9 @@ gimp_scale_entry_new (GtkTable *table,
gfloat step_increment,
gfloat page_increment,
guint digits,
gboolean constrain,
gfloat unconstrained_lower,
gfloat unconstrained_upper,
gchar *tooltip,
gchar *private_tip)
{
......@@ -417,6 +431,7 @@ gimp_scale_entry_new (GtkTable *table,
GtkWidget *scale;
GtkWidget *spinbutton;
GtkObject *adjustment;
GtkObject *return_adj;
label = gtk_label_new (text);
gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5);
......@@ -425,9 +440,45 @@ gimp_scale_entry_new (GtkTable *table,
GTK_FILL, GTK_FILL, 0, 0);
gtk_widget_show (label);
spinbutton = gimp_spin_button_new (&adjustment, value, lower, upper,
step_increment, page_increment, 0.0,
1.0, digits);
if (! constrain &&
unconstrained_lower <= lower &&
unconstrained_upper >= upper)
{
GtkObject *constrained_adj;
constrained_adj = gtk_adjustment_new (value, lower, upper,
step_increment, page_increment,
0.0);
spinbutton = gimp_spin_button_new (&adjustment, value,
unconstrained_lower,
unconstrained_upper,
step_increment, page_increment, 0.0,
1.0, digits);
gtk_signal_connect
(GTK_OBJECT (constrained_adj), "value_changed",
GTK_SIGNAL_FUNC (gimp_scale_entry_unconstrained_adjustment_callback),
adjustment);
gtk_signal_connect
(GTK_OBJECT (adjustment), "value_changed",
GTK_SIGNAL_FUNC (gimp_scale_entry_unconstrained_adjustment_callback),
constrained_adj);
return_adj = adjustment;
adjustment = constrained_adj;
}
else
{
spinbutton = gimp_spin_button_new (&adjustment, value, lower, upper,
step_increment, page_increment, 0.0,
1.0, digits);
return_adj = adjustment;
}
if (spinbutton_usize > 0)
gtk_widget_set_usize (spinbutton, spinbutton_usize, -1);
......@@ -438,12 +489,12 @@ gimp_scale_entry_new (GtkTable *table,
gtk_scale_set_draw_value (GTK_SCALE (scale), FALSE);
gtk_table_attach (GTK_TABLE (table), scale,
column + 1, column + 2, row, row + 1,
GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
GTK_FILL | GTK_EXPAND, GTK_FILL, 0, 0);
gtk_widget_show (scale);
gtk_table_attach (GTK_TABLE (table), spinbutton,
column + 2, column + 3, row, row + 1,
GTK_SHRINK, GTK_FILL, 0, 0);
GTK_SHRINK, GTK_SHRINK, 0, 0);
gtk_widget_show (spinbutton);
if (tooltip || private_tip)
......@@ -452,7 +503,7 @@ gimp_scale_entry_new (GtkTable *table,
gimp_help_set_help_data (spinbutton, tooltip, private_tip);
}
return adjustment;
return return_adj;
}
static void
......@@ -474,15 +525,17 @@ gimp_random_seed_toggle_update (GtkWidget *widget,
}
GtkWidget *
gimp_random_seed_new (gint *seed,
gint *use_time,
gint time_true,
gint time_false)
gimp_random_seed_new (gint *seed,
GtkWidget **seed_spinbutton,
gint *use_time,
GtkWidget **time_button,
gint time_true,
gint time_false)
{
GtkWidget *hbox;
GtkWidget *spinbutton;
GtkObject *adj;
GtkWidget *time_button;
GtkWidget *button;
hbox = gtk_hbox_new (FALSE, 4);
......@@ -494,34 +547,40 @@ gimp_random_seed_new (gint *seed,
seed);
gtk_widget_show (spinbutton);
if (seed_spinbutton)
*seed_spinbutton = spinbutton;
gimp_help_set_help_data (spinbutton,
_("If the \"Time\" button is not pressed, "
"use this value for random number generator "
"seed - this allows you to repeat a "
"given \"random\" operation"), NULL);
time_button = gtk_toggle_button_new_with_label (_("Time"));
gtk_misc_set_padding (GTK_MISC (GTK_BIN (time_button)->child), 2, 0);
gtk_signal_connect (GTK_OBJECT (time_button), "toggled",
button = gtk_toggle_button_new_with_label (_("Time"));
gtk_misc_set_padding (GTK_MISC (GTK_BIN (button)->child), 2, 0);
gtk_signal_connect (GTK_OBJECT (button), "toggled",
GTK_SIGNAL_FUNC (gimp_random_seed_toggle_update),
use_time);
gtk_box_pack_end (GTK_BOX (hbox), time_button, FALSE, FALSE, 0);
gtk_widget_show (time_button);
gtk_box_pack_end (GTK_BOX (hbox), button, FALSE, FALSE, 0);
gtk_widget_show (button);
if (time_button)
*time_button = button;
gimp_help_set_help_data (time_button,
gimp_help_set_help_data (button,
_("Seed random number generator from the current "
"time - this guarantees a reasonable "
"randomization"), NULL);
gtk_object_set_data (GTK_OBJECT (time_button), "time_true",
gtk_object_set_data (GTK_OBJECT (button), "time_true",
(gpointer) time_true);
gtk_object_set_data (GTK_OBJECT (time_button), "time_false",
gtk_object_set_data (GTK_OBJECT (button), "time_false",
(gpointer) time_false);
gtk_object_set_data (GTK_OBJECT (time_button), "inverse_sensitive",
gtk_object_set_data (GTK_OBJECT (button), "inverse_sensitive",
spinbutton);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (time_button),
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button),
*use_time == time_true);
return hbox;
......@@ -852,7 +911,7 @@ gimp_table_attach_aligned (GtkTable *table,
gtk_table_attach (table, label,
column, column + 1,
row, row + 1,
GTK_SHRINK | GTK_FILL, GTK_SHRINK | GTK_FILL, 0, 0);
GTK_FILL, GTK_FILL, 0, 0);
gtk_widget_show (label);
}
......@@ -861,19 +920,16 @@ gimp_table_attach_aligned (GtkTable *table,
GtkWidget *alignment;
alignment = gtk_alignment_new (0.0, 0.5, 0.0, 0.0);
gtk_table_attach (table, alignment,
column + 1, column + 1 + colspan,
row, row + 1,
GTK_SHRINK | GTK_FILL, GTK_SHRINK | GTK_FILL, 0, 0);
gtk_widget_show (alignment);
gtk_container_add (GTK_CONTAINER (alignment), widget);
gtk_widget_show (widget);
widget = alignment;
}
else
{
gtk_table_attach_defaults (table, widget,
column + 1, column + 1 + colspan,
row, row + 1);
}
gtk_table_attach (table, widget,
column + 1, column + 1 + colspan,
row, row + 1,
GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
gtk_widget_show (widget);
}
......@@ -112,11 +112,16 @@ GtkObject * gimp_scale_entry_new (GtkTable *table,
gfloat step_increment,
gfloat page_increment,
guint digits,
gboolean constrain,
gfloat unconstrained_lower,
gfloat unconstrained_upper,
gchar *tooltip,
gchar *private_tip);
GtkWidget * gimp_random_seed_new (gint *seed,
GtkWidget **seed_spinbutton,
gint *use_time,
GtkWidget **time_button,
gint time_true,
gint time_false);
......
......@@ -397,6 +397,17 @@ gimp_spin_button_new (GtkObject **adjustment, /* return value */
return spinbutton;
}
static void
gimp_scale_entry_unconstrained_adjustment_callback (GtkAdjustment *adjustment,
GtkAdjustment *other_adj)
{
gtk_signal_handler_block_by_data (GTK_OBJECT (other_adj), adjustment);
gtk_adjustment_set_value (other_adj, adjustment->value);
gtk_signal_handler_unblock_by_data (GTK_OBJECT (other_adj), adjustment);
}
GtkObject *
gimp_scale_entry_new (GtkTable *table,
gint column,
......@@ -410,6 +421,9 @@ gimp_scale_entry_new (GtkTable *table,
gfloat step_increment,
gfloat page_increment,
guint digits,
gboolean constrain,
gfloat unconstrained_lower,
gfloat unconstrained_upper,
gchar *tooltip,
gchar *private_tip)
{
......@@ -417,6 +431,7 @@ gimp_scale_entry_new (GtkTable *table,
GtkWidget *scale;
GtkWidget *spinbutton;
GtkObject *adjustment;
GtkObject *return_adj;
label = gtk_label_new (text);
gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5);
......@@ -425,9 +440,45 @@ gimp_scale_entry_new (GtkTable *table,
GTK_FILL, GTK_FILL, 0, 0);
gtk_widget_show (label);
spinbutton = gimp_spin_button_new (&adjustment, value, lower, upper,
step_increment, page_increment, 0.0,
1.0, digits);
if (! constrain &&
unconstrained_lower <= lower &&
unconstrained_upper >= upper)
{
GtkObject *constrained_adj;
constrained_adj = gtk_adjustment_new (value, lower, upper,
step_increment, page_increment,
0.0);
spinbutton = gimp_spin_button_new (&adjustment, value,
unconstrained_lower,
unconstrained_upper,
step_increment, page_increment, 0.0,
1.0, digits);
gtk_signal_connect
(GTK_OBJECT (constrained_adj), "value_changed",
GTK_SIGNAL_FUNC (gimp_scale_entry_unconstrained_adjustment_callback),
adjustment);
gtk_signal_connect
(GTK_OBJECT (adjustment), "value_changed",
GTK_SIGNAL_FUNC (gimp_scale_entry_unconstrained_adjustment_callback),
constrained_adj);
return_adj = adjustment;
adjustment = constrained_adj;
}
else
{
spinbutton = gimp_spin_button_new (&adjustment, value, lower, upper,
step_increment, page_increment, 0.0,
1.0, digits);
return_adj = adjustment;
}
if (spinbutton_usize > 0)
gtk_widget_set_usize (spinbutton, spinbutton_usize, -1);
......@@ -438,12 +489,12 @@ gimp_scale_entry_new (GtkTable *table,
gtk_scale_set_draw_value (GTK_SCALE (scale), FALSE);
gtk_table_attach (GTK_TABLE (table), scale,
column + 1, column + 2, row, row + 1,
GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
GTK_FILL | GTK_EXPAND, GTK_FILL, 0, 0);
gtk_widget_show (scale);
gtk_table_attach (GTK_TABLE (table), spinbutton,
column + 2, column + 3, row, row + 1,
GTK_SHRINK, GTK_FILL, 0, 0);
GTK_SHRINK, GTK_SHRINK, 0, 0);
gtk_widget_show (spinbutton);
if (tooltip || private_tip)
......@@ -452,7 +503,7 @@ gimp_scale_entry_new (GtkTable *table,
gimp_help_set_help_data (spinbutton, tooltip, private_tip);
}
return adjustment;
return return_adj;
}
static void
......@@ -474,15 +525,17 @@ gimp_random_seed_toggle_update (GtkWidget *widget,
}
GtkWidget *
gimp_random_seed_new (gint *seed,
gint *use_time,
gint time_true,
gint time_false)
gimp_random_seed_new (gint *seed,
GtkWidget **seed_spinbutton,
gint *use_time,
GtkWidget **time_button,
gint time_true,
gint time_false)
{
GtkWidget *hbox;
GtkWidget *spinbutton;
GtkObject *adj;
GtkWidget *time_button;
GtkWidget *button;
hbox = gtk_hbox_new (FALSE, 4);
......@@ -494,34 +547,40 @@ gimp_random_seed_new (gint *seed,
seed);
gtk_widget_show (spinbutton);
if (seed_spinbutton)
*seed_spinbutton = spinbutton;
gimp_help_set_help_data (spinbutton,
_("If the \"Time\" button is not pressed, "
"use this value for random number generator "
"seed - this allows you to repeat a "
"given \"random\" operation"), NULL);
time_button = gtk_toggle_button_new_with_label (_("Time"));
gtk_misc_set_padding (GTK_MISC (GTK_BIN (time_button)->child), 2, 0);
gtk_signal_connect (GTK_OBJECT (time_button), "toggled",
button = gtk_toggle_button_new_with_label (_("Time"));
gtk_misc_set_padding (GTK_MISC (GTK_BIN (button)->child), 2, 0);
gtk_signal_connect (GTK_OBJECT (button), "toggled",
GTK_SIGNAL_FUNC (gimp_random_seed_toggle_update),
use_time);
gtk_box_pack_end (GTK_BOX (hbox), time_button, FALSE, FALSE, 0);
gtk_widget_show (time_button);
gtk_box_pack_end (GTK_BOX (hbox), button, FALSE, FALSE, 0);
gtk_widget_show (button);
if (time_button)
*time_button = button;
gimp_help_set_help_data (time_button,
gimp_help_set_help_data (button,
_("Seed random number generator from the current "
"time - this guarantees a reasonable "
"randomization"), NULL);
gtk_object_set_data (GTK_OBJECT (time_button), "time_true",
gtk_object_set_data (GTK_OBJECT (button), "time_true",
(gpointer) time_true);
gtk_object_set_data (GTK_OBJECT (time_button), "time_false",
gtk_object_set_data (GTK_OBJECT (button), "time_false",
(gpointer) time_false);
gtk_object_set_data (GTK_OBJECT (time_button), "inverse_sensitive",
gtk_object_set_data (GTK_OBJECT (button), "inverse_sensitive",
spinbutton);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (time_button),
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button),
*use_time == time_true);
return hbox;
......@@ -852,7 +911,7 @@ gimp_table_attach_aligned (GtkTable *table,
gtk_table_attach (table, label,
column, column + 1,
row, row + 1,
GTK_SHRINK | GTK_FILL, GTK_SHRINK | GTK_FILL, 0, 0);
GTK_FILL, GTK_FILL, 0, 0);
gtk_widget_show (label);
}
......@@ -861,19 +920,16 @@ gimp_table_attach_aligned (GtkTable *table,
GtkWidget *alignment;
alignment = gtk_alignment_new (0.0, 0.5, 0.0, 0.0);
gtk_table_attach (table, alignment,
column + 1, column + 1 + colspan,
row, row + 1,
GTK_SHRINK | GTK_FILL, GTK_SHRINK | GTK_FILL, 0, 0);
gtk_widget_show (alignment);
gtk_container_add (GTK_CONTAINER (alignment), widget);
gtk_widget_show (widget);
widget = alignment;
}
else
{
gtk_table_attach_defaults (table, widget,
column + 1, column + 1 + colspan,
row, row + 1);
}
gtk_table_attach (table, widget,
column + 1, column + 1 + colspan,
row, row + 1,
GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
gtk_widget_show (widget);
}
......@@ -112,11 +112,16 @@ GtkObject * gimp_scale_entry_new (GtkTable *table,
gfloat step_increment,
gfloat page_increment,
guint digits,
gboolean constrain,
gfloat unconstrained_lower,
gfloat unconstrained_upper,
gchar *tooltip,
gchar *private_tip);
GtkWidget * gimp_random_seed_new (gint *seed,
GtkWidget **seed_spinbutton,
gint *use_time,
GtkWidget **time_button,
gint time_true,
gint time_false);
......
......@@ -674,6 +674,7 @@ alienmap_dialog (void)
adj = gimp_scale_entry_new (GTK_TABLE (table), 0, 0,
_("Red:"), SCALE_WIDTH, 0,
wvals.redstretch, 0, 128, 1, 8, 2,
TRUE, 0, 0,
_("Change intensity of the red channel"), NULL);
gtk_signal_connect (GTK_OBJECT (adj), "value_changed",
GTK_SIGNAL_FUNC (dialog_scale_update),
......@@ -682,6 +683,7 @@ alienmap_dialog (void)
adj = gimp_scale_entry_new (GTK_TABLE (table), 0, 1,
_("Green:"), SCALE_WIDTH, 0,
wvals.greenstretch, 0, 128, 1, 8, 2,
TRUE, 0, 0,
_("Change intensity of the green channel"), NULL);
gtk_signal_connect (GTK_OBJECT (adj), "value_changed",
GTK_SIGNAL_FUNC (dialog_scale_update),
......@@ -690,6 +692,7 @@ alienmap_dialog (void)
adj = gimp_scale_entry_new (GTK_TABLE (table), 0, 2,
_("Blue:"), SCALE_WIDTH, 0,
wvals.bluestretch, 0, 128, 1, 8, 2,
TRUE, 0, 0,
_("Change intensity of the blue channel"), NULL);
gtk_signal_connect (GTK_OBJECT (adj), "value_changed",
GTK_SIGNAL_FUNC (dialog_scale_update),
......
......@@ -667,6 +667,7 @@ alienmap2_dialog (void)
adj = gimp_scale_entry_new (GTK_TABLE (table), 0, 0,
_("R/H-Frequency:"), SCALE_WIDTH, 0,
wvals.redfrequency, 0, 5.0, 0.1, 1, 2,
TRUE, 0, 0,
_("Change frequency of the red/hue channel"),
NULL);
gtk_signal_connect (GTK_OBJECT (adj), "value_changed",
......@@ -676,6 +677,7 @@ alienmap2_dialog (void)
adj = gimp_scale_entry_new (GTK_TABLE (table), 0, 1,
_("R/H-Phaseshift:"), SCALE_WIDTH, 0,
wvals.redangle, 0, 360.0, 1, 15, 2,
TRUE, 0, 0,
_("Change angle of the red/hue channel"),
NULL);
gtk_signal_connect (GTK_OBJECT (adj), "value_changed",
......@@ -685,6 +687,7 @@ alienmap2_dialog (void)
adj = gimp_scale_entry_new (GTK_TABLE (table), 0, 2,
_("G/S-Frequency:"), SCALE_WIDTH, 0,
wvals.greenfrequency, 0, 5.0, 0.1, 1, 2,
TRUE, 0, 0,
_("Change frequency of the green/saturation "
"channel"), NULL);
gtk_signal_connect (GTK_OBJECT (adj), "value_changed",
......@@ -694,6 +697,7 @@ alienmap2_dialog (void)
adj = gimp_scale_entry_new (GTK_TABLE (table), 0, 3,
_("G/S-Phaseshift:"), SCALE_WIDTH, 0,
wvals.redangle, 0, 360.0, 1, 15, 2,
TRUE, 0, 0,
_("Change angle of the green/saturation channel"),
NULL);
gtk_signal_connect (GTK_OBJECT (adj), "value_changed",
......@@ -703,6 +707,7 @@ alienmap2_dialog (void)
adj = gimp_scale_entry_new (GTK_TABLE (table), 0, 4,
_("B/L-Frequency:"), SCALE_WIDTH, 0,
wvals.bluefrequency, 0, 5.0, 0.1, 1, 2,
TRUE, 0, 0,
_("Change frequency of the blue/luminance "
"channel"), NULL);
gtk_signal_connect (GTK_OBJECT (adj), "value_changed",
......@@ -712,6 +717,7 @@ alienmap2_dialog (void)
adj = gimp_scale_entry_new (GTK_TABLE (table), 0, 5,
_("B/L-Phaseshift:"), SCALE_WIDTH, 0,
wvals.blueangle, 0, 360.0, 1, 15, 2,
TRUE, 0, 0,
_("Change angle of the blue/luminance channel"),
NULL);
gtk_signal_connect (GTK_OBJECT (adj), "value_changed",
......
......@@ -453,6 +453,7 @@ explorer_dialog (void)
gimp_scale_entry_new (GTK_TABLE (table), 0, 0,
_("XMIN:"), SCALE_WIDTH, 100,
wvals.xmin, -3, 3, 0.001, 0.01, 5,
TRUE, 0, 0,
_("Change the first (minimal) x-coordinate "
"delimitation"), NULL);
gtk_signal_connect (GTK_OBJECT (elements->xmin), "value_changed",
......@@ -463,6 +464,7 @@ explorer_dialog (void)
gimp_scale_entry_new (GTK_TABLE (table), 0, 1,
_("XMAX:"), SCALE_WIDTH, 100,
wvals.xmax, -3, 3, 0.001, 0.01, 5,
TRUE, 0, 0,
_("Change the second (maximal) x-coordinate "
"delimitation"), NULL);