Commit d0da9246 authored by Manish Singh's avatar Manish Singh
Browse files

more COMPAT_CRUFT removal

-Yosh
parent be9e926c
Wed Aug 30 01:19:03 PDT 2000 Manish Singh <yosh@gimp.org>
* plug-ins/gap/resize.c
* plug-ins/gdyntext/charmap.c
* plug-ins/gdyntext/charmap_window.c
* plug-ins/gdyntext/message_window.c
* plug-ins/gimpressionist/color.c
* plug-ins/gimpressionist/general.c
* plug-ins/gimpressionist/orientation.c
* plug-ins/gimpressionist/orientmap.c
* plug-ins/gimpressionist/paper.c
* plug-ins/gimpressionist/placement.c
* plug-ins/gimpressionist/presets.c
* plug-ins/gimpressionist/preview.c
* plug-ins/gimpressionist/size.c
* plug-ins/gimpressionist/sizemap.c: more COMPAT_CRUFT removal
2000-08-29 Piers Cornwell <piers.cornwell@bigfoot.com>
 
* plug-ins/Lighting/lighting_ui.c
......
......@@ -116,10 +116,10 @@ resize_widget_new (ResizeType type,
/* the main vbox */
vbox = gtk_vbox_new (FALSE, 1);
gtk_container_border_width (GTK_CONTAINER (vbox), 5);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 5);
gtk_container_add (GTK_CONTAINER (resize->resize_widget), vbox);
gtk_container_border_width (GTK_CONTAINER (table), 2);
gtk_container_set_border_width (GTK_CONTAINER (table), 2);
gtk_box_pack_start (GTK_BOX (vbox), table, TRUE, TRUE, 0);
/* the width label and entry */
......@@ -229,7 +229,7 @@ resize_widget_new (ResizeType type,
/* the constrain toggle button */
constrain = gtk_check_button_new_with_label ( _("Constrain Ratio"));
gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (constrain), private->constrain);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (constrain), private->constrain);
gtk_box_pack_start (GTK_BOX (vbox), constrain, FALSE, FALSE, 0);
gtk_signal_connect (GTK_OBJECT (constrain), "toggled",
(GtkSignalFunc) constrain_update,
......@@ -243,7 +243,7 @@ resize_widget_new (ResizeType type,
gtk_box_pack_start (GTK_BOX (vbox), hbox, TRUE, FALSE, 0);
frame = gtk_frame_new (NULL);
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
gtk_container_border_width (GTK_CONTAINER (frame), 2);
gtk_container_set_border_width (GTK_CONTAINER (frame), 2);
gtk_box_pack_start (GTK_BOX (hbox), frame, TRUE, FALSE, 0);
private->drawing_area = gtk_drawing_area_new ();
gtk_drawing_area_size (GTK_DRAWING_AREA (private->drawing_area),
......
......@@ -111,7 +111,7 @@ static void charmap_init(CharMap *cm)
button = cm->buttons[x + y * cm->width] = gtk_toggle_button_new_with_label(clabel);
gtk_button_set_relief(&GTK_TOGGLE_BUTTON(button)->button, GTK_RELIEF_HALF);
if (i == 32)
gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(button), TRUE);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), TRUE);
gtk_table_attach(GTK_TABLE(table), button, x, x + 1, y, y + 1,
(GtkAttachOptions)GTK_EXPAND | GTK_SHRINK | GTK_FILL,
(GtkAttachOptions)GTK_EXPAND | GTK_SHRINK | GTK_FILL, 0, 0);
......@@ -143,9 +143,9 @@ void on_charmap_char_toggled(GtkWidget *widget, gpointer data)
cm = (CharMap *)data;
for (i = 0; i < 256; i++)
if (cm->buttons[i] != widget && GTK_TOGGLE_BUTTON(cm->buttons[i])->active)
gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(cm->buttons[i]), FALSE);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(cm->buttons[i]), FALSE);
if (!GTK_TOGGLE_BUTTON(widget)->active)
gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(widget), TRUE);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), TRUE);
cm->current_char = GTK_LABEL(GTK_BUTTON(widget)->child)->label[0];
gtk_signal_emit(GTK_OBJECT(data), charmap_signals[CHAR_SELECTED]);
in = FALSE;
......
......@@ -89,7 +89,7 @@ static void charmap_window_init(CharMapWindow *cmw)
cmw->scrolledwindow = gtk_scrolled_window_new(NULL, NULL);
gtk_box_pack_start(GTK_BOX(vbox), cmw->scrolledwindow, TRUE, TRUE, 0);
gtk_container_border_width(GTK_CONTAINER(cmw->scrolledwindow), 2);
gtk_container_set_border_width(GTK_CONTAINER(cmw->scrolledwindow), 2);
gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(cmw->scrolledwindow), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
gtk_widget_show(cmw->scrolledwindow);
......@@ -150,7 +150,7 @@ GtkWidget* charmap_window_new(const gchar *title)
cmw = gtk_type_new(charmap_window_get_type());
gtk_window_set_title(GTK_WINDOW(cmw), title);
gtk_container_border_width(GTK_CONTAINER(cmw), 4);
gtk_container_set_border_width(GTK_CONTAINER(cmw), 4);
gtk_window_set_policy(GTK_WINDOW(cmw), TRUE, TRUE, FALSE);
return GTK_WIDGET(cmw);
......@@ -165,7 +165,7 @@ void on_charmap_char_selected(GtkWidget *widget, gpointer data)
cmw = (CharMapWindow *)data;
lab[0] = CHARMAP(cmw->charmap)->current_char;
lab[1] = 0;
gtk_label_set(GTK_LABEL(cmw->label), lab);
gtk_label_set_text(GTK_LABEL(cmw->label), lab);
}
/* vim: set ts=2 sw=2 tw=79 ai nowrap: */
......@@ -127,7 +127,7 @@ message_window_new (const gchar *title)
mw = gtk_type_new (message_window_get_type());
gtk_window_set_title (GTK_WINDOW(mw), title);
gimp_dialog_set_icon (GTK_WINDOW (mw));
gtk_container_border_width (GTK_CONTAINER(mw), 4);
gtk_container_set_border_width (GTK_CONTAINER(mw), 4);
gtk_window_set_policy (GTK_WINDOW(mw), TRUE, TRUE, FALSE);
return GTK_WIDGET(mw);
......
......@@ -34,9 +34,9 @@ void colorchange(GtkWidget *wg, void *d, int num)
n = num;
for(i = 0; i < NUMCOLORRADIO; i++)
if(i != n)
gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON(colorradio[i]), FALSE);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(colorradio[i]), FALSE);
else
gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON(colorradio[n]), TRUE);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(colorradio[n]), TRUE);
}
}
......@@ -58,7 +58,7 @@ void create_colorpage(GtkNotebook *notebook)
gtk_widget_show_all(menubox);
thispage = gtk_vbox_new(FALSE, 0);
gtk_container_border_width (GTK_CONTAINER (thispage), 5);
gtk_container_set_border_width (GTK_CONTAINER (thispage), 5);
gtk_widget_show(thispage);
box0 = gtk_vbox_new (FALSE, 0);
......@@ -86,22 +86,22 @@ void create_colorpage(GtkNotebook *notebook)
colorradio[0] = tmpw = gtk_radio_button_new_with_label(NULL, _("Average under brush"));
gtk_box_pack_start(GTK_BOX(box3), tmpw, FALSE, FALSE, 0);
gtk_widget_show(tmpw);
gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (tmpw), FALSE);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (tmpw), FALSE);
gtk_signal_connect(GTK_OBJECT(tmpw), "clicked",
(GtkSignalFunc)colorchange, (void *)0);
gtk_tooltips_set_tip(GTK_TOOLTIPS(tooltips), tmpw, _("Color is computed from the average of all pixels under the brush"), NULL);
if(i == 0)
gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (tmpw), TRUE);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (tmpw), TRUE);
colorradio[1] = tmpw = gtk_radio_button_new_with_label(gtk_radio_button_group(GTK_RADIO_BUTTON(tmpw)), _("Center of brush"));
gtk_box_pack_start(GTK_BOX(box3), tmpw, FALSE, FALSE, 0);
gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (tmpw), FALSE);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (tmpw), FALSE);
gtk_widget_show(tmpw);
gtk_signal_connect(GTK_OBJECT(tmpw), "clicked",
(GtkSignalFunc)colorchange, (void *)1);
gtk_tooltips_set_tip(GTK_TOOLTIPS(tooltips), tmpw, _("Samples the color from the pixel in the center of the brush"), NULL);
if(i == 1)
gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (tmpw), TRUE);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (tmpw), TRUE);
box1 = gtk_hbox_new (FALSE, 0);
......
......@@ -48,8 +48,8 @@ void generalbgchange(GtkWidget *wg, void *d, int num)
n = 1;
for(i = 0; i < NUMGENERALBGRADIO; i++)
if(i != n)
gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON(generalbgradio[i]), FALSE);
gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON(generalbgradio[n]), TRUE);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(generalbgradio[i]), FALSE);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(generalbgradio[n]), TRUE);
}
}
......@@ -94,7 +94,7 @@ void selectcolor(void)
return;
}
gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON(generalbgradio[0]), TRUE);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(generalbgradio[0]), TRUE);
window = gtk_color_selection_dialog_new( _("Color Selection Dialog"));
gtk_signal_connect (GTK_OBJECT (window), "destroy",
......@@ -142,7 +142,7 @@ void create_generalpage(GtkNotebook *notebook)
thispage = gtk_vbox_new(FALSE, 0);
gtk_container_border_width (GTK_CONTAINER (thispage), 5);
gtk_container_set_border_width (GTK_CONTAINER (thispage), 5);
gtk_widget_show(thispage);
box1 = gtk_hbox_new (FALSE, 0);
......@@ -187,23 +187,23 @@ void create_generalpage(GtkNotebook *notebook)
generalbgradio[1] = tmpw = gtk_radio_button_new_with_label(NULL, _("Keep original"));
gtk_widget_show(tmpw);
gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (tmpw), FALSE);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (tmpw), FALSE);
gtk_box_pack_start(GTK_BOX(box3), tmpw, FALSE, FALSE, 0);
gtk_signal_connect(GTK_OBJECT(tmpw), "clicked",
(GtkSignalFunc)generalbgchange, (void *)1);
gtk_tooltips_set_tip(GTK_TOOLTIPS(tooltips), tmpw, _("Preserve the original image as a background"), NULL);
if(pcvals.generalbgtype == 1)
gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (tmpw), TRUE);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (tmpw), TRUE);
generalbgradio[2] = tmpw = gtk_radio_button_new_with_label(gtk_radio_button_group(GTK_RADIO_BUTTON(tmpw)), _("From paper"));
gtk_box_pack_start(GTK_BOX(box3), tmpw, FALSE, FALSE, 0);
gtk_widget_show(tmpw);
gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (tmpw), FALSE);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (tmpw), FALSE);
gtk_signal_connect(GTK_OBJECT(tmpw), "clicked",
(GtkSignalFunc)generalbgchange, (void *)2);
gtk_tooltips_set_tip(GTK_TOOLTIPS(tooltips), tmpw, _("Copy the texture of the selected paper as a background"), NULL);
if(pcvals.generalbgtype == 2)
gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (tmpw), TRUE);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (tmpw), TRUE);
box3 = gtk_vbox_new(FALSE,0);
gtk_box_pack_start(GTK_BOX(box2), box3,FALSE,FALSE, 10);
......@@ -217,12 +217,12 @@ void create_generalpage(GtkNotebook *notebook)
generalbgradio[0] = tmpw = gtk_radio_button_new_with_label(gtk_radio_button_group(GTK_RADIO_BUTTON(tmpw)), _("Solid"));
gtk_box_pack_start(GTK_BOX(box4), tmpw, FALSE, FALSE, 0);
gtk_widget_show(tmpw);
gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (tmpw), FALSE);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (tmpw), FALSE);
gtk_signal_connect(GTK_OBJECT(tmpw), "clicked",
(GtkSignalFunc)generalbgchange, (void *)0);
gtk_tooltips_set_tip(GTK_TOOLTIPS(tooltips), tmpw, _("Solid colored background"), NULL);
if(pcvals.generalbgtype == 0)
gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (tmpw), TRUE);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (tmpw), TRUE);
colbutton = tmpw = gtk_button_new();
gtk_box_pack_start(GTK_BOX(box4), tmpw, FALSE, FALSE, 10);
......@@ -240,14 +240,14 @@ void create_generalpage(GtkNotebook *notebook)
generalbgradio[3] = tmpw = gtk_radio_button_new_with_label(gtk_radio_button_group(GTK_RADIO_BUTTON(generalbgradio[0])), _("Transparent"));
gtk_box_pack_start(GTK_BOX(box3), tmpw, FALSE, FALSE, 0);
gtk_widget_show(tmpw);
gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (tmpw), FALSE);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (tmpw), FALSE);
gtk_signal_connect(GTK_OBJECT(tmpw), "clicked",
(GtkSignalFunc)generalbgchange, (void *)3);
gtk_tooltips_set_tip(GTK_TOOLTIPS(tooltips), tmpw, _("Use a transparent background; Only the strokes painted will be visible"), NULL);
if(!img_has_alpha)
gtk_widget_set_sensitive (tmpw, FALSE);
if(pcvals.generalbgtype == 3)
gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (tmpw), TRUE);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (tmpw), TRUE);
box1 = gtk_vbox_new (FALSE, 0);
......@@ -260,19 +260,19 @@ void create_generalpage(GtkNotebook *notebook)
generalpaintedges = tmpw = gtk_check_button_new_with_label( _("Paint edges"));
gtk_box_pack_start (GTK_BOX (box2), tmpw, FALSE, FALSE, 0);
gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(tmpw), FALSE);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(tmpw), FALSE);
gtk_widget_show (tmpw);
gtk_tooltips_set_tip(GTK_TOOLTIPS(tooltips), tmpw, "Selects if to place strokes all the way out to the edges of the image", NULL);
if(pcvals.generalpaintedges)
gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(tmpw), TRUE);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(tmpw), TRUE);
generaltileable = tmpw = gtk_check_button_new_with_label( _("Tileable"));
gtk_box_pack_start (GTK_BOX (box2), tmpw, FALSE, FALSE, 0);
gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(tmpw), FALSE);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(tmpw), FALSE);
gtk_widget_show (tmpw);
gtk_tooltips_set_tip(GTK_TOOLTIPS(tooltips), tmpw, _("Selects if the resulting image should be seamlessly tileable"), NULL);
if(pcvals.generaltileable)
gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(tmpw), TRUE);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(tmpw), TRUE);
box2 = gtk_hbox_new (TRUE, 0);
gtk_box_pack_start(GTK_BOX(box1), box2,FALSE,FALSE,0);
......@@ -280,11 +280,11 @@ void create_generalpage(GtkNotebook *notebook)
generaldropshadow = tmpw = gtk_check_button_new_with_label( _("Drop Shadow"));
gtk_box_pack_start (GTK_BOX (box2), tmpw, FALSE, FALSE, 0);
gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(tmpw), FALSE);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(tmpw), FALSE);
gtk_widget_show (tmpw);
gtk_tooltips_set_tip(GTK_TOOLTIPS(tooltips), tmpw, _("Adds a shadow effect to each brush stroke"), NULL);
if(pcvals.generaldropshadow)
gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(tmpw), TRUE);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(tmpw), TRUE);
generalshadowadjust = gtk_adjustment_new(pcvals.generalshadowdarkness, 0.0, 100.0, 0.1, 0.1, 1.0);
tmpw = gtk_hscale_new(GTK_ADJUSTMENT(generalshadowadjust));
......
......@@ -36,8 +36,8 @@ void orientchange(GtkWidget *wg, void *d, int num)
n = num;
for(i = 0; i < NUMORIENTRADIO; i++)
if(i != n)
gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON(orientradio[i]), FALSE);
gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON(orientradio[n]), TRUE);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(orientradio[i]), FALSE);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(orientradio[n]), TRUE);
}
}
......@@ -59,7 +59,7 @@ void create_orientationpage(GtkNotebook *notebook)
gtk_widget_show_all(menubox);
thispage = gtk_vbox_new(FALSE, 0);
gtk_container_border_width (GTK_CONTAINER (thispage), 5);
gtk_container_set_border_width (GTK_CONTAINER (thispage), 5);
gtk_widget_show(thispage);
box1 = gtk_hbox_new (FALSE, 0);
......@@ -130,43 +130,43 @@ void create_orientationpage(GtkNotebook *notebook)
orientradio[0] = tmpw = gtk_radio_button_new_with_label(NULL, _("Value"));
gtk_box_pack_start(GTK_BOX(box3), tmpw, FALSE, FALSE, 0);
gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (tmpw), FALSE);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (tmpw), FALSE);
gtk_widget_show(tmpw);
gtk_signal_connect(GTK_OBJECT(tmpw), "clicked",
(GtkSignalFunc)orientchange, (void *)0);
gtk_tooltips_set_tip(GTK_TOOLTIPS(tooltips), tmpw, _("Let the value (brightness) of the region determine the direction of the stroke"), NULL);
if(i == 0)
gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (tmpw), TRUE);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (tmpw), TRUE);
orientradio[1] = tmpw = gtk_radio_button_new_with_label(gtk_radio_button_group(GTK_RADIO_BUTTON(tmpw)), _("Radius"));
gtk_box_pack_start(GTK_BOX(box3), tmpw, FALSE, FALSE, 0);
gtk_widget_show(tmpw);
gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (tmpw), FALSE);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (tmpw), FALSE);
gtk_signal_connect(GTK_OBJECT(tmpw), "clicked",
(GtkSignalFunc)orientchange, (void *)1);
gtk_tooltips_set_tip(GTK_TOOLTIPS(tooltips), tmpw, _("The distance from the center of the image determines the direction of the stroke"), NULL);
if(i == 1)
gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (tmpw), TRUE);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (tmpw), TRUE);
orientradio[2] = tmpw = gtk_radio_button_new_with_label(gtk_radio_button_group(GTK_RADIO_BUTTON(tmpw)), _("Random"));
gtk_box_pack_start(GTK_BOX(box3), tmpw, FALSE, FALSE, 0);
gtk_widget_show(tmpw);
gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (tmpw), FALSE);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (tmpw), FALSE);
gtk_signal_connect(GTK_OBJECT(tmpw), "clicked",
(GtkSignalFunc)orientchange, (void *)2);
gtk_tooltips_set_tip(GTK_TOOLTIPS(tooltips), tmpw, _("Selects a random direction of each stroke"), NULL);
if(i == 2)
gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (tmpw), TRUE);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (tmpw), TRUE);
orientradio[3] = tmpw = gtk_radio_button_new_with_label(gtk_radio_button_group(GTK_RADIO_BUTTON(tmpw)), _("Radial"));
gtk_box_pack_start(GTK_BOX(box3), tmpw, FALSE, FALSE, 0);
gtk_widget_show(tmpw);
gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (tmpw), FALSE);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (tmpw), FALSE);
gtk_signal_connect(GTK_OBJECT(tmpw), "clicked",
(GtkSignalFunc)orientchange, (void *)3);
gtk_tooltips_set_tip(GTK_TOOLTIPS(tooltips), tmpw, _("Let the direction from the center determine the direction of the stroke"), NULL);
if(i == 3)
gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (tmpw), TRUE);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (tmpw), TRUE);
box3 = gtk_vbox_new(FALSE,0);
gtk_box_pack_start(GTK_BOX(box2), box3,FALSE,FALSE, 10);
......@@ -176,34 +176,34 @@ void create_orientationpage(GtkNotebook *notebook)
orientradio[4] = tmpw = gtk_radio_button_new_with_label(gtk_radio_button_group(GTK_RADIO_BUTTON(tmpw)), _("Flowing"));
gtk_box_pack_start(GTK_BOX(box3), tmpw, FALSE, FALSE, 0);
gtk_widget_show(tmpw);
gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (tmpw), FALSE);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (tmpw), FALSE);
gtk_signal_connect(GTK_OBJECT(tmpw), "clicked",
(GtkSignalFunc)orientchange, (void *)4);
gtk_tooltips_set_tip(GTK_TOOLTIPS(tooltips), tmpw, _("The strokes follow a \"flowing\" pattern"), NULL);
if(i == 4)
gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (tmpw), TRUE);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (tmpw), TRUE);
orientradio[5] = tmpw = gtk_radio_button_new_with_label(gtk_radio_button_group(GTK_RADIO_BUTTON(tmpw)), _("Hue"));
gtk_box_pack_start(GTK_BOX(box3), tmpw, FALSE, FALSE, 0);
gtk_widget_show(tmpw);
gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (tmpw), FALSE);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (tmpw), FALSE);
gtk_signal_connect(GTK_OBJECT(tmpw), "clicked",
(GtkSignalFunc)orientchange, (void *)5);
gtk_tooltips_set_tip(GTK_TOOLTIPS(tooltips), tmpw, _("The hue of the region determines the direction of the stroke"), NULL);
if(i == 5)
gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (tmpw), TRUE);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (tmpw), TRUE);
orientradio[6] = tmpw = gtk_radio_button_new_with_label(gtk_radio_button_group(GTK_RADIO_BUTTON(tmpw)), _("Adaptive"));
gtk_box_pack_start(GTK_BOX(box3), tmpw, FALSE, FALSE, 0);
gtk_widget_show(tmpw);
gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (tmpw), FALSE);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (tmpw), FALSE);
gtk_signal_connect(GTK_OBJECT(tmpw), "clicked",
(GtkSignalFunc)orientchange, (void *)6);
gtk_tooltips_set_tip(GTK_TOOLTIPS(tooltips), tmpw, _("The direction that matches the original image the closest is selected"), NULL);
if(i == 6)
gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (tmpw), TRUE);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (tmpw), TRUE);
box4 = gtk_hbox_new(FALSE, 0);
......@@ -213,12 +213,12 @@ void create_orientationpage(GtkNotebook *notebook)
orientradio[7] = tmpw = gtk_radio_button_new_with_label(gtk_radio_button_group(GTK_RADIO_BUTTON(tmpw)), _("Manual"));
gtk_box_pack_start(GTK_BOX(box4), tmpw, FALSE, FALSE, 0);
gtk_widget_show(tmpw);
gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (tmpw), FALSE);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (tmpw), FALSE);
gtk_signal_connect(GTK_OBJECT(tmpw), "clicked",
(GtkSignalFunc)orientchange, (void *)7);
gtk_tooltips_set_tip(GTK_TOOLTIPS(tooltips), tmpw, _("Manually specify the stroke orientation"), NULL);
if(i == 7)
gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (tmpw), TRUE);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (tmpw), TRUE);
tmpw = gtk_button_new_with_label( _("Edit..."));
gtk_box_pack_start(GTK_BOX(box4), tmpw, FALSE, FALSE, 0);
......
......@@ -238,9 +238,9 @@ void updatesliders(void)
vector[selectedvector].str);
for(i = 0; i < NUMVECTYPES; i++) {
if(i == vector[selectedvector].type)
gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(vectypes[i]), TRUE);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(vectypes[i]), TRUE);
else
gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(vectypes[i]), FALSE);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(vectypes[i]), FALSE);
}
adjignore = 0;
}
......@@ -425,7 +425,7 @@ void update_orientmap_dialog(void)
gtk_adjustment_set_value(GTK_ADJUSTMENT(strexpadjust), pcvals.orientstrexp);
gtk_adjustment_set_value(GTK_ADJUSTMENT(angoffadjust), pcvals.orientangoff);
gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(orientvoronoi), pcvals.orientvoronoi);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(orientvoronoi), pcvals.orientvoronoi);
updatevectorprev();
updateompreviewprev();
......@@ -438,7 +438,7 @@ void create_orientmap_dialog(void)
GtkWidget *table2;
GtkWidget *hbox;
gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (orientradio[7]), TRUE);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (orientradio[7]), TRUE);
initvectors();
......@@ -460,14 +460,14 @@ void create_orientmap_dialog(void)
gtk_window_set_title(GTK_WINDOW(omwindow), _("Orientation Map Editor"));
gtk_container_border_width (GTK_CONTAINER(omwindow), 5);
gtk_container_set_border_width (GTK_CONTAINER(omwindow), 5);
tmpw = table1 = gtk_table_new(2,5,FALSE);
gtk_widget_show(tmpw);
gtk_container_add(GTK_CONTAINER(omwindow), tmpw);
tmpw2 = tmpw = gtk_frame_new( _("Vectors"));
gtk_container_border_width (GTK_CONTAINER (tmpw), 2);
gtk_container_set_border_width (GTK_CONTAINER (tmpw), 2);
gtk_table_attach(GTK_TABLE(table1), tmpw, 0,1,0,1,GTK_EXPAND,GTK_EXPAND,0,0);
gtk_widget_show(tmpw);
......@@ -500,7 +500,7 @@ void create_orientmap_dialog(void)
gtk_tooltips_set_tip(GTK_TOOLTIPS(tooltips), tmpw, _("Adjust the preview's brightness"), NULL);
tmpw2 = tmpw = gtk_frame_new( _("Preview"));
gtk_container_border_width (GTK_CONTAINER (tmpw), 2);
gtk_container_set_border_width (GTK_CONTAINER (tmpw), 2);
gtk_table_attach(GTK_TABLE(table1), tmpw, 1,2,0,1,GTK_EXPAND,GTK_EXPAND,0,0);
gtk_widget_show(tmpw);
......@@ -510,7 +510,7 @@ void create_orientmap_dialog(void)
gtk_widget_show(tmpw);
hbox = tmpw = gtk_hbox_new(TRUE,0);
gtk_container_border_width (GTK_CONTAINER (tmpw), 2);
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);
......@@ -584,7 +584,7 @@ void create_orientmap_dialog(void)
tmpw = hbox = gtk_hbox_new(TRUE,0);
gtk_table_attach_defaults(GTK_TABLE(table2), tmpw, 1,2,2,3);
gtk_container_border_width (GTK_CONTAINER (tmpw), 2);
gtk_container_set_border_width (GTK_CONTAINER (tmpw), 2);
gtk_widget_show(tmpw);
vectypes[0] = tmpw = gtk_radio_button_new_with_label(NULL, _("Normal"));
......@@ -602,7 +602,7 @@ void create_orientmap_dialog(void)
tmpw = hbox = gtk_hbox_new(TRUE,0);
gtk_table_attach_defaults(GTK_TABLE(table2), tmpw, 1,2,3,4);
gtk_container_border_width (GTK_CONTAINER (tmpw), 2);
gtk_container_set_border_width (GTK_CONTAINER (tmpw), 2);
gtk_widget_show(tmpw);
vectypes[2] = tmpw = gtk_radio_button_new_with_label(gtk_radio_button_group(GTK_RADIO_BUTTON(vectypes[0])), _("Vortex2"));
......@@ -620,7 +620,7 @@ void create_orientmap_dialog(void)
tmpw = hbox = gtk_hbox_new(TRUE,0);
gtk_table_attach_defaults(GTK_TABLE(table1), tmpw, 1,2,1,2);
gtk_container_border_width (GTK_CONTAINER (tmpw), 2);
gtk_container_set_border_width (GTK_CONTAINER (tmpw), 2);
gtk_widget_show(tmpw);
tmpw = gtk_button_new_with_label( _("OK"));
......@@ -680,10 +680,10 @@ void create_orientmap_dialog(void)
orientvoronoi = tmpw = gtk_check_button_new_with_label( _("Voronoi"));
gtk_table_attach_defaults(GTK_TABLE(table2), tmpw, 0,1,2,3);
gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(tmpw), FALSE);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(tmpw), FALSE);
gtk_widget_show (tmpw);
if(pcvals.orientvoronoi)
gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(tmpw), TRUE);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(tmpw), TRUE);
gtk_signal_connect(GTK_OBJECT(tmpw), "clicked",
(GtkSignalFunc)angoffadjmove, NULL);
gtk_tooltips_set_tip(GTK_TOOLTIPS(tooltips), tmpw, _("Voronoi-mode makes only the vector closest to the given point have any influence"), NULL);
......
......@@ -96,7 +96,7 @@ void create_paperpage(GtkNotebook *notebook)
gtk_widget_show_all(menubox);
thispage = gtk_vbox_new(FALSE, 0);
gtk_container_border_width (GTK_CONTAINER (thispage), 5);
gtk_container_set_border_width (GTK_CONTAINER (thispage), 5);
gtk_widget_show(thispage);
box1 = gtk_hbox_new (FALSE, 0);
......@@ -125,7 +125,7 @@ void create_paperpage(GtkNotebook *notebook)
box2 = gtk_vbox_new (FALSE, 0);
gtk_box_pack_start(GTK_BOX(box1), box2,FALSE,FALSE,0);
gtk_widget_show (box2);
gtk_container_border_width (GTK_CONTAINER (box2), 5);
gtk_container_set_border_width (GTK_CONTAINER (box2), 5);
tmpw = gtk_label_new( _("Paper Preview:"));
gtk_box_pack_start(GTK_BOX(box2), tmpw,FALSE,FALSE,0);
......@@ -140,22 +140,22 @@ void create_paperpage(GtkNotebook *notebook)
paperinvert = tmpw = gtk_check_button_new_with_label( _("Invert"));
gtk_box_pack_start (GTK_BOX (box2), tmpw, FALSE, FALSE, 0);
gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(tmpw), FALSE);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(tmpw), FALSE);
gtk_widget_show (tmpw);
gtk_signal_connect (GTK_OBJECT(tmpw), "clicked",
GTK_SIGNAL_FUNC(selectpaper),
list);
gtk_tooltips_set_tip(GTK_TOOLTIPS(tooltips), tmpw, _("Inverts the Papers texture"), NULL);
if(pcvals.paperinvert)
gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(tmpw), TRUE);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(tmpw), TRUE);
paperoverlay = tmpw = gtk_check_button_new_with_label( _("Overlay"));
gtk_box_pack_start (GTK_BOX (box2), tmpw, FALSE, FALSE, 0);
gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(tmpw), FALSE);
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);
if(pcvals.paperoverlay)
gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(tmpw), TRUE);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(tmpw), TRUE);
box1 = gtk_hbox_new (FALSE, 0);
......
......@@ -35,9 +35,9 @@ void placechange(GtkWidget *wg, void *d, int num)
n = num;
for(i = 0; i < NUMPLACERADIO; i++)
if(i != n)
gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON(placeradio[i]), FALSE);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(placeradio[i]), FALSE);
else
gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON(placeradio[n]), TRUE);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(placeradio[n]), TRUE);
}
}
......@@ -59,7 +59,7 @@ void create_placementpage(GtkNotebook *notebook)
gtk_widget_show_all(menubox);
thispage = gtk_vbox_new(FALSE, 0);
gtk_container_border_width (GTK_CONTAINER (thispage), 5);
gtk_container_set_border_width (GTK_CONTAINER (thispage), 5);
gtk_widget_show(thispage);
box0 = gtk_vbox_new (FALSE, 0);
......@@ -86,23 +86,23 @@ void create_placementpage(GtkNotebook *notebook)
placeradio[0] = tmpw = gtk_radio_button_new_with_label(NULL, _("Randomly"));
gtk_box_pack_start(GTK_BOX(box3), tmpw, FALSE, FALSE, 0);
gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (tmpw), FALSE);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (tmpw), FALSE);
gtk_widget_show(tmpw);
gtk_signal_connect(GTK_OBJECT(tmpw), "clicked",
(GtkSignalFunc)placechange, (void *)0);
gtk_tooltips_set_tip(GTK_TOOLTIPS(tooltips), tmpw, _("Place strokes randomly around the image"), NULL);
if(i == 0)
gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (tmpw), TRUE);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (tmpw), TRUE);
placeradio[1] = tmpw = gtk_radio_button_new_with_label(gtk_radio_button_group(GTK_RADIO_BUTTON(tmpw)), _("Evenly distributed"));