Commit 59179c2d authored by Shlomi Fish's avatar Shlomi Fish
Browse files

normalized the identifiers in placement.c.

* plug-ins/gimpressionist/: normalized the identifiers in placement.c.
parent 7c7879b6
2004-07-21 Shlomi Fish <shlomif@iglu.org.il>
* plug-ins/gimpressionist/: normalized the identifiers in
placement.c.
2004-07-21 Michael Natterer <mitch@gimp.org>
* app/actions/context-actions.c: changed names of actions which
......
......@@ -61,7 +61,7 @@ typedef struct
int placetype;
vector_t orientvector[MAXORIENTVECT];
int numorientvector;
int placecenter;
int placement_center;
double brushaspect;
double orientangoff;
double orientstrexp;
......
......@@ -11,22 +11,22 @@
#include "libgimp/stdplugins-intl.h"
#define NUMPLACERADIO 2
#define NUM_PLACE_RADIO 2
static GtkWidget *placeradio[NUMPLACERADIO];
static GtkWidget *placecenter = NULL;
static GtkObject *brushdensityadjust = NULL;
static GtkWidget *placement_radio[NUM_PLACE_RADIO];
static GtkWidget *placement_center = NULL;
static GtkObject *brush_density_adjust = NULL;
void place_restore()
{
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(placeradio[pcvals.placetype]), TRUE);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(placecenter), pcvals.placecenter);
gtk_adjustment_set_value (GTK_ADJUSTMENT(brushdensityadjust), pcvals.brushdensity);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (placement_radio[pcvals.placetype]), TRUE);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (placement_center), pcvals.placement_center);
gtk_adjustment_set_value (GTK_ADJUSTMENT (brush_density_adjust), pcvals.brushdensity);
}
void place_store()
{
pcvals.placecenter = GTK_TOGGLE_BUTTON(placecenter)->active;
pcvals.placement_center = GTK_TOGGLE_BUTTON (placement_center)->active;
}
void create_placementpage(GtkNotebook *notebook)
......@@ -45,31 +45,31 @@ void create_placementpage(GtkNotebook *notebook)
&pcvals.placetype, 0,
_("Randomly"), PLACEMENT_TYPE_RANDOM,
&placeradio[PLACEMENT_TYPE_RANDOM],
&placement_radio[PLACEMENT_TYPE_RANDOM],
_("Evenly distributed"), PLACEMENT_TYPE_EVEN_DIST,
&placeradio[PLACEMENT_TYPE_EVEN_DIST],
&placement_radio[PLACEMENT_TYPE_EVEN_DIST],
NULL);
gimp_help_set_help_data
(placeradio[PLACEMENT_TYPE_RANDOM],
(placement_radio[PLACEMENT_TYPE_RANDOM],
_("Place strokes randomly around the image"), NULL);
gimp_help_set_help_data
(placeradio[PLACEMENT_TYPE_EVEN_DIST],
(placement_radio[PLACEMENT_TYPE_EVEN_DIST],
_("The strokes are evenly distributed across the image"),
NULL);
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
gtk_widget_show (frame);
gtk_toggle_button_set_active
(GTK_TOGGLE_BUTTON (placeradio[pcvals.placetype]), TRUE);
(GTK_TOGGLE_BUTTON (placement_radio[pcvals.placetype]), TRUE);
table = gtk_table_new (1, 3, FALSE);
gtk_table_set_col_spacings (GTK_TABLE(table), 6);
gtk_box_pack_start(GTK_BOX (vbox), table, FALSE, FALSE, 0);
gtk_widget_show (table);
brushdensityadjust =
brush_density_adjust =
gimp_scale_entry_new (GTK_TABLE(table), 0, 0,
_("Stroke _density:"),
100, -1, pcvals.brushdensity,
......@@ -77,16 +77,16 @@ void create_placementpage(GtkNotebook *notebook)
TRUE, 0, 0,
_("The relative density of the brush strokes"),
NULL);
g_signal_connect (brushdensityadjust, "value_changed",
g_signal_connect (brush_density_adjust, "value_changed",
G_CALLBACK (gimp_double_adjustment_update),
&pcvals.brushdensity);
placecenter = tmpw = gtk_check_button_new_with_mnemonic( _("Centerize"));
placement_center = tmpw = gtk_check_button_new_with_mnemonic( _("Centerize"));
gtk_box_pack_start(GTK_BOX (vbox), tmpw, FALSE, FALSE, 0);
gtk_widget_show (tmpw);
gimp_help_set_help_data
(tmpw, _("Focus the brush strokes around the center of the image"), NULL);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(tmpw), pcvals.placecenter);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(tmpw), pcvals.placement_center);
gtk_notebook_append_page_menu (notebook, vbox, label, NULL);
}
......@@ -354,7 +354,7 @@ static void set_values (const gchar *key, const gchar *val)
else if(!strcmp(key, "placetype"))
pcvals.placetype = atoi(val);
else if(!strcmp(key, "placecenter"))
pcvals.placecenter = atoi(val);
pcvals.placement_center = atoi(val);
else if(!strcmp(key, "selectedbrush"))
g_strlcpy (pcvals.selectedbrush, val, sizeof (pcvals.selectedbrush));
......@@ -735,7 +735,7 @@ static void save_preset(void)
fprintf(f, "color=%02x%02x%02x\n", color[0], color[1], color[2]);
fprintf(f, "placetype=%d\n", pcvals.placetype);
fprintf(f, "placecenter=%d\n", pcvals.placecenter);
fprintf(f, "placecenter=%d\n", pcvals.placement_center);
fprintf(f, "numorientvector=%d\n", pcvals.numorientvector);
for(i = 0; i < pcvals.numorientvector; i++)
......
......@@ -661,7 +661,7 @@ void repaint(ppm_t *p, ppm_t *a)
tx = xpos[i-1];
ty = ypos[i-1];
}
if(runningvals.placecenter) {
if(runningvals.placement_center) {
double z = g_rand_double_range (random_generator, 0, 0.75);
tx = tx * (1.0-z) + tmp.width/2 * z;
ty = ty * (1.0-z) + tmp.height/2 * z;
......
Supports Markdown
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