Commit f8243352 authored by Maurits Rijk's avatar Maurits Rijk
Browse files

More changes to fix #81963

parent 3e223aa0
2002-12-10 Maurits Rijk <lpeek.mrijk@consunet.nl>
* plug-ins/gimpressionist/brush.c
* plug-ins/gimpressionist/gimpressionist.c
* plug-ins/gimpressionist/paper.c
* plug-ins/gimpressionist/presets.c
* plug-ins/gimpressionist/sizemap.c
* plug-ins/gimpressionist/orientmap.c: more changes to make
gimpressionist look like a standard GIMP plug-in (#81963) plus lots
of code clean-up.
2002-12-08 Michael Natterer <mitch@gimp.org>
 
* plug-ins/script-fu/siod-wrapper.c (marshall_proc_db_call): fixed
......
......@@ -428,14 +428,14 @@ void create_brushpage(GtkNotebook *notebook)
if (!standalone) {
GtkWidget *emptyitem;
tmpw = gtk_label_new( _("Select:"));
gtk_box_pack_start(GTK_BOX(box2), tmpw,FALSE,FALSE,0);
gtk_widget_show (tmpw);
box3 = gtk_hbox_new(FALSE,0);
gtk_box_pack_start(GTK_BOX(box2),box3, FALSE, FALSE, 0);
gtk_widget_show(box3);
tmpw = gtk_label_new( _("Select:"));
gtk_box_pack_start(GTK_BOX(box3), tmpw,FALSE,FALSE,0);
gtk_widget_show (tmpw);
brushemptyitem = emptyitem = gtk_menu_item_new_with_label( _("(None)"));
g_signal_connect (G_OBJECT(emptyitem), "activate",
G_CALLBACK(dummybrushdmenuselect),
......
......@@ -421,7 +421,7 @@ static int create_dialog(void)
GTK_WIN_POS_MOUSE,
FALSE, TRUE, FALSE,
_("_About..."), showabout,
_("A_bout..."), showabout,
NULL, NULL, NULL, FALSE, FALSE,
GTK_STOCK_CANCEL, dialog_cancel_callback,
......
This diff is collapsed.
......@@ -130,21 +130,22 @@ void create_paperpage(GtkNotebook *notebook)
gtk_box_pack_start(GTK_BOX (box2), tmpw, FALSE, FALSE, 5);
gtk_widget_show(tmpw);
/* updatepaperprev(NULL); */
paperinvert = tmpw = gtk_check_button_new_with_label( _("Invert"));
paperinvert = tmpw = gtk_check_button_new_with_mnemonic( _("_Invert"));
gtk_box_pack_start (GTK_BOX (box2), tmpw, FALSE, FALSE, 0);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(tmpw), FALSE);
gtk_widget_show (tmpw);
g_signal_connect (G_OBJECT(tmpw), "clicked", G_CALLBACK(selectpaper), list);
gtk_tooltips_set_tip(GTK_TOOLTIPS(tooltips), tmpw, _("Inverts the Papers texture"), NULL);
gtk_tooltips_set_tip(GTK_TOOLTIPS(tooltips), tmpw,
_("Inverts the Papers texture"), NULL);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(tmpw), pcvals.paperinvert);
paperoverlay = tmpw = gtk_check_button_new_with_label( _("Overlay"));
paperoverlay = tmpw = gtk_check_button_new_with_mnemonic( _("O_verlay"));
gtk_box_pack_start (GTK_BOX (box2), tmpw, FALSE, FALSE, 0);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(tmpw), FALSE);
gtk_widget_show (tmpw);
gtk_tooltips_set_tip(GTK_TOOLTIPS(tooltips), tmpw, _("Applies the paper as it is (without embossing it)"), NULL);
gtk_tooltips_set_tip(GTK_TOOLTIPS(tooltips), tmpw,
_("Applies the paper as it is (without embossing it)"),
NULL);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(tmpw), pcvals.paperoverlay);
box1 = gtk_hbox_new (FALSE, 0);
......
......@@ -31,11 +31,11 @@ GtkWidget *presetlist = NULL;
GtkWidget *presetdesctext = NULL;
GtkWidget *presetdesclabel = NULL;
char presetdesc[4096] = "";
static char presetdesc[4096] = "";
char *factory_defaults = "<Factory defaults>";
static char *factory_defaults = "<Factory defaults>";
void presetsrefresh(void)
static void presetsrefresh(void)
{
GtkWidget *list = presetlist;
GtkWidget *tmpw;
......@@ -52,7 +52,7 @@ void presetsrefresh(void)
#define PRESETMAGIC "Preset"
int loadoldpreset(char *fname)
static int loadoldpreset(char *fname)
{
FILE *f;
int len;
......@@ -158,7 +158,7 @@ static void parsedesc(char *str, char *d)
*d = '\0';
}
void setval(char *key, char *val)
static void setval(char *key, char *val)
{
if(!strcmp(key, "desc"))
parsedesc(val, presetdesc);
......@@ -263,7 +263,7 @@ void setval(char *key, char *val)
pcvals.colornoise = g_ascii_strtod (val, NULL);
}
int loadpreset(char *fn)
static int loadpreset(char *fn)
{
char line[1024] = "";
FILE *f;
......@@ -278,7 +278,7 @@ int loadpreset(char *fn)
fclose(f);
return loadoldpreset(fn);
}
memcpy(&pcvals, &defaultpcvals, sizeof(pcvals));
pcvals = defaultpcvals;
while(!feof(f)) {
char *tmps;
if(!fgets(line,1024,f)) break;
......@@ -293,7 +293,7 @@ int loadpreset(char *fn)
return 0;
}
void applypreset(void)
static void applypreset(void)
{
GList *h = GTK_LIST(presetlist)->selection;
GtkWidget *tmpw = h->data;
......@@ -319,7 +319,7 @@ void applypreset(void)
restorevals();
}
void deletepreset(void)
static void deletepreset(void)
{
GList *h = GTK_LIST(presetlist)->selection;
GtkWidget *tmpw = h->data;
......@@ -335,9 +335,9 @@ void deletepreset(void)
presetsrefresh();
}
void savepreset(GtkWidget *wg, GtkWidget *p);
static void savepreset(GtkWidget *wg, GtkWidget *p);
void presetdesccallback(GtkWidget *widget, gpointer data)
static void presetdesccallback(GtkWidget *widget, gpointer data)
{
guchar *s;
char *d, *str;
......@@ -353,32 +353,40 @@ void presetdesccallback(GtkWidget *widget, gpointer data)
g_free(str);
}
void oksavepreset(GtkWidget *wg, GtkWidget *p)
static void oksavepreset(GtkWidget *wg, GtkWidget *p)
{
if(wg) gtk_widget_destroy(wg);
gtk_widget_destroy(wg);
savepreset(NULL,NULL);
}
void create_savepreset(void)
static void create_savepreset(void)
{
static GtkWidget *window = NULL;
GtkWidget *button;
GtkWidget *box, *label;
GtkWidget *text;
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_signal_connect_object (GTK_OBJECT (window), "delete_event",
GTK_SIGNAL_FUNC (gtk_widget_destroy),
GTK_OBJECT(window));
gtk_signal_connect_object(GTK_OBJECT(window), "destroy",
GTK_SIGNAL_FUNC (gtk_widget_destroy),
GTK_OBJECT(window));
window =
gimp_dialog_new (_("Save Current"), "gimpressionist",
gimp_standard_help_func, "filters/gimpressionst.html",
GTK_WIN_POS_MOUSE,
FALSE, TRUE, FALSE,
GTK_STOCK_CANCEL, gtk_widget_destroy,
NULL, 1, NULL, FALSE, FALSE,
GTK_STOCK_OK, oksavepreset,
NULL, 1, NULL, TRUE, FALSE,
gtk_container_set_border_width (GTK_CONTAINER (window), 5);
NULL);
box = gtk_vbox_new(FALSE,5);
g_signal_connect (G_OBJECT(window), "destroy",
G_CALLBACK(gtk_widget_destroy), NULL);
g_signal_connect (G_OBJECT(window), "delete_event",
G_CALLBACK(gtk_widget_destroy), NULL);
box = gtk_vbox_new(FALSE, 5);
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (window)->vbox), box);
gtk_widget_show (box);
label = gtk_label_new( _("Description:"));
gtk_box_pack_start(GTK_BOX(box),label,FALSE,FALSE,0);
......@@ -398,26 +406,7 @@ void create_savepreset(void)
gtk_signal_connect (GTK_OBJECT (text), "changed",
(GtkSignalFunc) presetdesccallback,
NULL);
button = gtk_button_new_from_stock ( GTK_STOCK_OK);
gtk_signal_connect_object (GTK_OBJECT (button), "clicked",
GTK_SIGNAL_FUNC (oksavepreset),
GTK_OBJECT(window));
gtk_box_pack_start(GTK_BOX(box),button,FALSE,FALSE,0);
gtk_widget_show (button);
button = gtk_button_new_from_stock ( GTK_STOCK_CANCEL);
gtk_signal_connect_object (GTK_OBJECT (button), "clicked",
GTK_SIGNAL_FUNC (gtk_widget_destroy),
GTK_OBJECT(window));
gtk_box_pack_start(GTK_BOX(box),button,FALSE,FALSE,0);
gtk_widget_show (button);
gtk_container_add (GTK_CONTAINER (window), box);
gtk_widget_show (box);
gtk_widget_show (window);
}
......@@ -624,10 +613,11 @@ void create_presetpage(GtkNotebook *notebook)
presetsavebutton = tmpw = gtk_button_new_with_label( _("Save current"));
gtk_box_pack_start(GTK_BOX(box1), tmpw,FALSE,FALSE,5);
gtk_widget_show (tmpw);
gtk_signal_connect (GTK_OBJECT(tmpw), "clicked",
GTK_SIGNAL_FUNC(create_savepreset),
NULL);
gtk_tooltips_set_tip(GTK_TOOLTIPS(tooltips), tmpw, _("Save the current settings to the specified file"), NULL);
g_signal_connect (G_OBJECT(tmpw), "clicked", G_CALLBACK(create_savepreset),
NULL);
gtk_tooltips_set_tip(GTK_TOOLTIPS(tooltips), tmpw,
_("Save the current settings to the specified file"),
NULL);
box1 = gtk_hbox_new (FALSE, 0);
gtk_box_pack_start(GTK_BOX(thispage), box1, TRUE, TRUE, 0);
......@@ -660,31 +650,28 @@ void create_presetpage(GtkNotebook *notebook)
box2 = gtk_vbox_new (FALSE, 0);
gtk_box_pack_start(GTK_BOX(box1), box2,FALSE,FALSE,5);
gtk_widget_show (box2);
/* gtk_container_set_border_width (GTK_CONTAINER (box2), 5); */
tmpw = gtk_button_new_with_label( _("Apply"));
gtk_box_pack_start(GTK_BOX(box2), tmpw,FALSE,FALSE,0);
tmpw = gtk_button_new_from_stock (GTK_STOCK_APPLY);
gtk_box_pack_start(GTK_BOX(box2), tmpw, FALSE, FALSE, 0);
gtk_widget_show (tmpw);
gtk_signal_connect (GTK_OBJECT(tmpw), "clicked",
GTK_SIGNAL_FUNC(applypreset),
NULL);
gtk_tooltips_set_tip(GTK_TOOLTIPS(tooltips), tmpw, _("Reads the selected Preset into memory"), NULL);
g_signal_connect (G_OBJECT(tmpw), "clicked", G_CALLBACK(applypreset), NULL);
gtk_tooltips_set_tip(GTK_TOOLTIPS(tooltips), tmpw,
_("Reads the selected Preset into memory"), NULL);
tmpw = gtk_button_new_with_label( _("Delete"));
tmpw = gtk_button_new_from_stock (GTK_STOCK_DELETE);
gtk_box_pack_start(GTK_BOX(box2), tmpw, FALSE, FALSE,0);
gtk_widget_show (tmpw);
gtk_signal_connect (GTK_OBJECT(tmpw), "clicked",
GTK_SIGNAL_FUNC(deletepreset),
NULL);
gtk_tooltips_set_tip(GTK_TOOLTIPS(tooltips), tmpw, _("Deletes the selected Preset"), NULL);
g_signal_connect (G_OBJECT(tmpw), "clicked", G_CALLBACK(deletepreset), NULL);
gtk_tooltips_set_tip(GTK_TOOLTIPS(tooltips), tmpw,
_("Deletes the selected Preset"), NULL);
tmpw = gtk_button_new_with_label( _("Refresh"));
tmpw = gtk_button_new_from_stock (GTK_STOCK_REFRESH);
gtk_box_pack_start(GTK_BOX(box2), tmpw, FALSE, FALSE,0);
gtk_widget_show (tmpw);
gtk_signal_connect (GTK_OBJECT(tmpw), "clicked",
GTK_SIGNAL_FUNC(presetsrefresh),
NULL);
gtk_tooltips_set_tip(GTK_TOOLTIPS(tooltips), tmpw, _("Reread the folder of Presets"), NULL);
g_signal_connect (G_OBJECT(tmpw), "clicked", G_CALLBACK(presetsrefresh),
NULL);
gtk_tooltips_set_tip(GTK_TOOLTIPS(tooltips), tmpw,
_("Reread the folder of Presets"), NULL);
presetdesclabel = tmpw = gtk_label_new( _("(Desc)"));
gtk_box_pack_start(GTK_BOX(box2), tmpw, FALSE, FALSE,0);
......
......@@ -22,8 +22,12 @@
GtkWidget *smwindow = NULL;
GtkWidget *smvectorprev = NULL;
GtkWidget *smpreviewprev = NULL;
static GtkWidget *smvectorprev;
static GtkWidget *smpreviewprev;
static GtkWidget *prev_button;
static GtkWidget *next_button;
static GtkWidget *add_button;
static GtkWidget *kill_button;
GtkObject *smvectprevbrightadjust = NULL;
......@@ -35,10 +39,8 @@ GtkWidget *sizevoronoi = NULL;
#define OMWIDTH 150
#define OMHEIGHT 150
char sbuffer[OMWIDTH*OMHEIGHT];
smvector_t smvector[MAXSIZEVECT];
int numsmvect = 0;
static smvector_t smvector[MAXSIZEVECT];
static int numsmvect = 0;
double dist(double x, double y, double dx, double dy);
......@@ -95,9 +97,7 @@ double getsiz(double x, double y, int from)
ssum += 1.0/dst;
}
sum = sum / ssum / 100.0;
if(sum < 0.0) sum = 0.0;
else if(sum > 1.0) sum = 1.0;
return sum;
return CLAMP(sum, 0.0, 1.0);
}
void updatesmpreviewprev(void)
......@@ -126,7 +126,7 @@ void updatesmpreviewprev(void)
gtk_widget_draw(smpreviewprev,NULL);
}
int selectedsmvector = 0;
static gint selectedsmvector = 0;
void updatesmvectorprev(void)
{
......@@ -140,8 +140,10 @@ void updatesmvectorprev(void)
guchar red[3] = {255,0,0};
guchar white[3] = {255,255,255};
if(smvectprevbrightadjust) val = 1.0 - GTK_ADJUSTMENT(smvectprevbrightadjust)->value / 100.0;
else val = 0.5;
if (smvectprevbrightadjust)
val = 1.0 - GTK_ADJUSTMENT(smvectprevbrightadjust)->value / 100.0;
else
val = 0.5;
if(!ok || (val != lastval)) {
if(!infile.col)
......@@ -171,6 +173,10 @@ void updatesmvectorprev(void)
gtk_preview_draw_row(GTK_PREVIEW(smvectorprev), &sbuffer.col[y*sbuffer.width*3], 0, y, OMWIDTH);
gtk_widget_draw(smvectorprev,NULL);
gtk_widget_set_sensitive (prev_button, (numsmvect > 1));
gtk_widget_set_sensitive (next_button, (numsmvect > 1));
gtk_widget_set_sensitive (add_button, (numsmvect < MAXORIENTVECT));
gtk_widget_set_sensitive (kill_button, (numsmvect > 1));
}
static gboolean smadjignore = FALSE;
......@@ -203,7 +209,6 @@ void smnextclick(GtkWidget *w, gpointer data)
static void smaddclick(GtkWidget *w, gpointer data)
{
if (numsmvect + 1 == MAXSIZEVECT) return;
smvector[numsmvect].x = 0.5;
smvector[numsmvect].y = 0.5;
smvector[numsmvect].siz = 50.0;
......@@ -219,8 +224,6 @@ static void smdeleteclick(GtkWidget *w, gpointer data)
{
int i;
if (numsmvect == 1) return;
for (i = selectedsmvector; i < numsmvect-1; i++)
{
smvector[i] = smvector[i+1];
......@@ -290,13 +293,7 @@ static void smstrexpsmadjmove(GtkWidget *w, gpointer data)
}
}
static void smcancelclick(GtkWidget *w, GtkWidget *win)
{
if (win)
gtk_widget_hide(win);
}
static void smokclick(GtkWidget *w, GtkWidget *win)
static void smapplyclick(GtkWidget *w, GtkWidget *win)
{
int i;
for (i = 0; i < numsmvect; i++)
......@@ -306,8 +303,12 @@ static void smokclick(GtkWidget *w, GtkWidget *win)
pcvals.numsizevector = numsmvect;
pcvals.sizestrexp = GTK_ADJUSTMENT(smstrexpadjust)->value;
pcvals.sizevoronoi = GTK_TOGGLE_BUTTON(sizevoronoi)->active;
if(win)
gtk_widget_hide(win);
}
static void smokclick(GtkWidget *w, GtkWidget *win)
{
smapplyclick(NULL, NULL);
gtk_widget_hide(w);
}
void initsmvectors(void)
......@@ -369,22 +370,32 @@ void create_sizemap_dialog(void)
return;
}
smwindow = gtk_window_new (GTK_WINDOW_TOPLEVEL);
smwindow =
gimp_dialog_new (_("Size Map Editor"), "gimpressionist",
gimp_standard_help_func, "filters/gimpressionst.html",
GTK_WIN_POS_MOUSE,
FALSE, TRUE, FALSE,
GTK_STOCK_CANCEL, gtk_widget_hide,
NULL, 1, NULL, FALSE, FALSE,
gtk_signal_connect (GTK_OBJECT(smwindow), "destroy",
GTK_SIGNAL_FUNC(gtk_widget_destroyed),
&smwindow);
gtk_signal_connect (GTK_OBJECT(smwindow), "delete_event",
GTK_SIGNAL_FUNC(gtk_widget_hide_on_delete),
&smwindow);
GTK_STOCK_APPLY, smapplyclick,
NULL, NULL, NULL, FALSE, FALSE,
gtk_window_set_title(GTK_WINDOW(smwindow), _("Size Map Editor"));
GTK_STOCK_OK, smokclick,
NULL, 1, NULL, TRUE, FALSE,
gtk_container_set_border_width (GTK_CONTAINER(smwindow), 5);
NULL);
tmpw = table1 = gtk_table_new(2,5,FALSE);
gtk_widget_show(tmpw);
gtk_container_add(GTK_CONTAINER(smwindow), tmpw);
g_signal_connect (G_OBJECT(smwindow), "destroy",
G_CALLBACK(gtk_widget_destroyed), &smwindow);
g_signal_connect (G_OBJECT(smwindow), "delete_event",
G_CALLBACK(gtk_widget_hide_on_delete), &smwindow);
table1 = gtk_table_new(2, 5, FALSE);
gtk_container_set_border_width (GTK_CONTAINER (table1), 6);
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (smwindow)->vbox), table1);
gtk_widget_show(table1);
tmpw2 = tmpw = gtk_frame_new( _("Smvectors"));
gtk_container_set_border_width (GTK_CONTAINER (tmpw), 2);
......@@ -429,129 +440,88 @@ void create_sizemap_dialog(void)
gtk_container_add(GTK_CONTAINER(tmpw2), tmpw);
gtk_widget_show(tmpw);
hbox = tmpw = gtk_hbox_new(TRUE,0);
gtk_container_set_border_width (GTK_CONTAINER (tmpw), 2);
gtk_table_attach_defaults(GTK_TABLE(table1), tmpw, 0,1,1,2);
gtk_widget_show(tmpw);
hbox = gtk_hbox_new(TRUE,0);
gtk_container_set_border_width (GTK_CONTAINER (hbox), 2);
gtk_table_attach_defaults(GTK_TABLE(table1), hbox, 0, 1, 1, 2);
gtk_widget_show(hbox);
tmpw = gtk_button_new_with_label("<<");
prev_button = tmpw = gtk_button_new_with_mnemonic("_<<");
gtk_box_pack_start(GTK_BOX(hbox),tmpw,FALSE,TRUE,0);
gtk_widget_show(tmpw);
gtk_signal_connect (GTK_OBJECT(tmpw), "clicked",
GTK_SIGNAL_FUNC(smprevclick), NULL);
gtk_tooltips_set_tip(GTK_TOOLTIPS(tooltips), tmpw, _("Select previous smvector"), NULL);
tmpw = gtk_button_new_with_label(">>");
gtk_box_pack_start(GTK_BOX(hbox),tmpw,FALSE,TRUE,0);
gtk_widget_show(tmpw);
gtk_signal_connect (GTK_OBJECT(tmpw), "clicked",
GTK_SIGNAL_FUNC(smnextclick), NULL);
gtk_tooltips_set_tip(GTK_TOOLTIPS(tooltips), tmpw, _("Select next smvector"), NULL);
tmpw = gtk_button_new_with_label( _("Add"));
gtk_box_pack_start(GTK_BOX(hbox),tmpw,FALSE,TRUE,0);
gtk_widget_show(tmpw);
gtk_signal_connect (GTK_OBJECT(tmpw), "clicked",
GTK_SIGNAL_FUNC(smaddclick), NULL);
gtk_tooltips_set_tip(GTK_TOOLTIPS(tooltips), tmpw, _("Add new smvector"), NULL);
tmpw = gtk_button_new_with_label( _("Kill"));
gtk_box_pack_start(GTK_BOX(hbox),tmpw,FALSE,TRUE,0);
gtk_widget_show(tmpw);
gtk_signal_connect (GTK_OBJECT(tmpw), "clicked",
GTK_SIGNAL_FUNC(smdeleteclick), NULL);
gtk_tooltips_set_tip(GTK_TOOLTIPS(tooltips), tmpw, _("Delete selected smvector"), NULL);
gtk_tooltips_set_tip(GTK_TOOLTIPS(tooltips), tmpw,
_("Select previous smvector"), NULL);
tmpw = table2 = gtk_table_new(2,2,FALSE);
gtk_widget_show(tmpw);
gtk_table_attach_defaults(GTK_TABLE(table1), tmpw, 0,1,2,3);
gtk_widget_show(tmpw);
tmpw = gtk_label_new( _("Size:"));
gtk_widget_show(tmpw);
gtk_table_attach_defaults(GTK_TABLE(table2), tmpw, 0,1,0,1);
sizadjust = gtk_adjustment_new(50.0, 0.0, 101.0, 1.0, 1.0, 1.0);
tmpw = gtk_hscale_new(GTK_ADJUSTMENT(sizadjust));
gtk_scale_set_draw_value (GTK_SCALE (tmpw), TRUE);
gtk_scale_set_digits(GTK_SCALE (tmpw), 1);
gtk_table_attach_defaults(GTK_TABLE(table2), tmpw, 1,2,0,1);
gtk_widget_show(tmpw);
gtk_signal_connect(GTK_OBJECT(sizadjust), "value_changed",
(GtkSignalFunc)angsmadjmove, NULL);
gtk_tooltips_set_tip(GTK_TOOLTIPS(tooltips), tmpw, _("Change the angle of the selected smvector"), NULL);
tmpw = gtk_label_new( _("Strength:"));
gtk_widget_show(tmpw);
gtk_table_attach_defaults(GTK_TABLE(table2), tmpw, 0,1,1,2);
smstradjust = gtk_adjustment_new(1.0, 0.1, 6.0, 0.1, 1.0, 1.0);
tmpw = gtk_hscale_new(GTK_ADJUSTMENT(smstradjust));
gtk_scale_set_draw_value (GTK_SCALE (tmpw), TRUE);
gtk_scale_set_digits(GTK_SCALE (tmpw), 1);
gtk_table_attach_defaults(GTK_TABLE(table2), tmpw, 1,2,1,2);
gtk_widget_show(tmpw);
gtk_signal_connect(GTK_OBJECT(smstradjust), "value_changed",
(GtkSignalFunc)strsmadjmove, NULL);
gtk_tooltips_set_tip(GTK_TOOLTIPS(tooltips), tmpw, _("Change the strength of the selected smvector"), NULL);
tmpw = hbox = gtk_hbox_new(TRUE,0);
gtk_table_attach_defaults(GTK_TABLE(table1), tmpw, 1,2,1,2);
gtk_container_set_border_width (GTK_CONTAINER (tmpw), 2);
gtk_widget_show(tmpw);
tmpw = gtk_button_new_from_stock( GTK_STOCK_OK);
next_button = tmpw = gtk_button_new_with_mnemonic("_>>");
gtk_box_pack_start(GTK_BOX(hbox),tmpw,FALSE,TRUE,0);
gtk_widget_show(tmpw);
gtk_signal_connect (GTK_OBJECT(tmpw), "clicked",
GTK_SIGNAL_FUNC(smokclick), smwindow);
gtk_tooltips_set_tip(GTK_TOOLTIPS(tooltips), tmpw, _("Apply and exit the editor"), NULL);
g_signal_connect (G_OBJECT(tmpw), "clicked",
G_CALLBACK(smnextclick), NULL);
gtk_tooltips_set_tip(GTK_TOOLTIPS(tooltips), tmpw,
_("Select next smvector"), NULL);
tmpw = gtk_button_new_with_label( _("Apply"));
add_button = tmpw = gtk_button_new_with_mnemonic( _("A_dd"));
gtk_box_pack_start(GTK_BOX(hbox),tmpw,FALSE,TRUE,0);
gtk_widget_show(tmpw);
gtk_signal_connect (GTK_OBJECT(tmpw), "clicked",
GTK_SIGNAL_FUNC(smokclick), NULL);
gtk_tooltips_set_tip(GTK_TOOLTIPS(tooltips), tmpw, _("Apply, but stay inside the editor"), NULL);
g_signal_connect (G_OBJECT(tmpw), "clicked",
G_CALLBACK(smaddclick), NULL);
gtk_tooltips_set_tip(GTK_TOOLTIPS(tooltips), tmpw,
_("Add new smvector"), NULL);
tmpw = gtk_button_new_from_stock( GTK_STOCK_CANCEL);
kill_button = tmpw = gtk_button_new_with_mnemonic( _("_Kill"));
gtk_box_pack_start(GTK_BOX(hbox),tmpw,FALSE,TRUE,0);
gtk_widget_show(tmpw);
gtk_signal_connect (GTK_OBJECT(tmpw), "clicked",
GTK_SIGNAL_FUNC(smcancelclick), smwindow);
gtk_tooltips_set_tip(GTK_TOOLTIPS(tooltips), tmpw, _("Cancel all changes and exit"), NULL);
tmpw = table2 = gtk_table_new(2,2,FALSE);
gtk_widget_show(tmpw);
gtk_table_attach_defaults(GTK_TABLE(table1), tmpw, 1,2,2,3);
gtk_widget_show(tmpw);
tmpw = gtk_label_new( _("Strength exp.:"));
gtk_widget_show(tmpw);
gtk_table_attach_defaults(GTK_TABLE(table2), tmpw, 0,1,0,1);
smstrexpadjust = gtk_adjustment_new(pcvals.sizestrexp, 0.1, 11.0, 0.1, 0.1, 0.1);
tmpw = gtk_hscale_new(GTK_ADJUSTMENT(smstrexpadjust));
gtk_scale_set_draw_value (GTK_SCALE (tmpw), TRUE);
gtk_scale_set_digits(GTK_SCALE (tmpw), 1);
gtk_table_attach_defaults(GTK_TABLE(table2), tmpw, 1,2,0,1);
gtk_widget_show(tmpw);
gtk_signal_connect(GTK_OBJECT(smstrexpadjust), "value_changed",
(GtkSignalFunc)smstrexpsmadjmove, NULL);
gtk_tooltips_set_tip(GTK_TOOLTIPS(tooltips), tmpw, _("Change the exponent of the strength"), NULL);
sizevoronoi = tmpw = gtk_check_button_new_with_label( _("Voronoi"));
gtk_table_attach_defaults(GTK_TABLE(table2), tmpw, 0,1,2,3);
g_signal_connect (G_OBJECT(tmpw), "clicked",
G_CALLBACK(smdeleteclick), NULL);