common/hrz.c common/plugindetails.c common/spheredesigner.c

2003-01-07  Sven Neumann  <sven@gimp.org>

	* common/hrz.c
	* common/plugindetails.c
	* common/spheredesigner.c
	* gimpressionist/orientmap.c
	* gimpressionist/sizemap.c
	* plugin-helper/color_picker.c
	* plugin-helper/iwarp.c
	* winsnap/winsnap.c: ported to GObject signal API.
This commit is contained in:
Sven Neumann 2003-01-07 01:47:04 +00:00 committed by Sven Neumann
parent f6c77ecf91
commit 2079245f48
11 changed files with 341 additions and 304 deletions

View File

@ -1,4 +1,15 @@
2003-01-07 Sven Neumann <neo@wintermute>
2003-01-07 Sven Neumann <sven@gimp.org>
* common/hrz.c
* common/plugindetails.c
* common/spheredesigner.c
* gimpressionist/orientmap.c
* gimpressionist/sizemap.c
* plugin-helper/color_picker.c
* plugin-helper/iwarp.c
* winsnap/winsnap.c: ported to GObject signal API.
2003-01-07 Sven Neumann <sven@gimp.org>
* configure.in
* plug-ins/gfig/Makefile.am

View File

@ -526,9 +526,9 @@ save_dialog (void)
NULL);
gtk_signal_connect (GTK_OBJECT (dlg), "destroy",
GTK_SIGNAL_FUNC (gtk_main_quit),
NULL);
g_signal_connect (dlg, "destroy",
G_CALLBACK (gtk_main_quit),
NULL);
gtk_main ();
gdk_flush ();

View File

@ -1011,9 +1011,9 @@ gimp_plugin_desc (void)
plugindesc->details_showing = FALSE;
gtk_signal_connect (GTK_OBJECT (plugindesc->dlg), "destroy",
GTK_SIGNAL_FUNC (dialog_close_callback),
plugindesc);
g_signal_connect (plugindesc->dlg, "destroy",
G_CALLBACK (dialog_close_callback),
plugindesc);
/* hbox : left=notebook ; right=description */
@ -1042,9 +1042,9 @@ gimp_plugin_desc (void)
clabels[3] = g_strdup (_("Image Types"));
plugindesc->clist = gtk_clist_new_with_titles (4, clabels);
gtk_signal_connect (GTK_OBJECT (plugindesc->clist), "click_column",
GTK_SIGNAL_FUNC (clist_click_column),
NULL);
g_signal_connect (plugindesc->clist, "click_column",
G_CALLBACK (clist_click_column),
NULL);
gtk_clist_column_titles_show (GTK_CLIST (plugindesc->clist));
swindow = gtk_scrolled_window_new (NULL, NULL);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (swindow),
@ -1053,9 +1053,9 @@ gimp_plugin_desc (void)
GTK_SELECTION_BROWSE);
gtk_widget_set_size_request (plugindesc->clist, DBL_LIST_WIDTH, DBL_HEIGHT);
gtk_signal_connect (GTK_OBJECT (plugindesc->clist), "select_row",
GTK_SIGNAL_FUNC (procedure_clist_select_callback),
plugindesc);
g_signal_connect (plugindesc->clist, "select_row",
G_CALLBACK (procedure_clist_select_callback),
plugindesc);
label = gtk_label_new (_("List View"));
gtk_notebook_append_page (GTK_NOTEBOOK (notebook), swindow, label);
@ -1073,9 +1073,9 @@ gimp_plugin_desc (void)
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (swindow),
GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
gtk_widget_set_size_request (plugindesc->ctree, DBL_LIST_WIDTH, DBL_HEIGHT);
gtk_signal_connect (GTK_OBJECT (plugindesc->ctree), "tree_select_row",
GTK_SIGNAL_FUNC (procedure_ctree_select_callback),
plugindesc);
g_signal_connect (plugindesc->ctree, "tree_select_row",
G_CALLBACK (procedure_ctree_select_callback),
plugindesc);
gtk_clist_set_column_auto_resize (GTK_CLIST (plugindesc->ctree), 0, TRUE);
gtk_clist_set_column_auto_resize (GTK_CLIST (plugindesc->ctree), 1, TRUE);
gtk_clist_set_column_auto_resize (GTK_CLIST (plugindesc->ctree), 2, TRUE);
@ -1088,9 +1088,9 @@ gimp_plugin_desc (void)
gtk_widget_show (plugindesc->ctree);
gtk_widget_show (swindow);
gtk_signal_connect_after (GTK_OBJECT (notebook), "switch_page",
GTK_SIGNAL_FUNC (page_select_callback),
plugindesc);
g_signal_connect_after (notebook, "switch_page",
G_CALLBACK (page_select_callback),
plugindesc);
gtk_widget_show (notebook);
@ -1114,9 +1114,9 @@ gimp_plugin_desc (void)
button = gtk_button_new_with_label (_("Details >>"));
gtk_misc_set_padding (GTK_MISC (GTK_BIN (button)->child), 2, 0);
gtk_signal_connect (GTK_OBJECT (button), "clicked",
GTK_SIGNAL_FUNC (details_callback),
plugindesc);
g_signal_connect (button, "clicked",
G_CALLBACK (details_callback),
plugindesc);
gtk_box_pack_start (GTK_BOX (searchhbox), button,
FALSE, FALSE, 0);
gtk_widget_show (button);

View File

@ -1011,9 +1011,9 @@ gimp_plugin_desc (void)
plugindesc->details_showing = FALSE;
gtk_signal_connect (GTK_OBJECT (plugindesc->dlg), "destroy",
GTK_SIGNAL_FUNC (dialog_close_callback),
plugindesc);
g_signal_connect (plugindesc->dlg, "destroy",
G_CALLBACK (dialog_close_callback),
plugindesc);
/* hbox : left=notebook ; right=description */
@ -1042,9 +1042,9 @@ gimp_plugin_desc (void)
clabels[3] = g_strdup (_("Image Types"));
plugindesc->clist = gtk_clist_new_with_titles (4, clabels);
gtk_signal_connect (GTK_OBJECT (plugindesc->clist), "click_column",
GTK_SIGNAL_FUNC (clist_click_column),
NULL);
g_signal_connect (plugindesc->clist, "click_column",
G_CALLBACK (clist_click_column),
NULL);
gtk_clist_column_titles_show (GTK_CLIST (plugindesc->clist));
swindow = gtk_scrolled_window_new (NULL, NULL);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (swindow),
@ -1053,9 +1053,9 @@ gimp_plugin_desc (void)
GTK_SELECTION_BROWSE);
gtk_widget_set_size_request (plugindesc->clist, DBL_LIST_WIDTH, DBL_HEIGHT);
gtk_signal_connect (GTK_OBJECT (plugindesc->clist), "select_row",
GTK_SIGNAL_FUNC (procedure_clist_select_callback),
plugindesc);
g_signal_connect (plugindesc->clist, "select_row",
G_CALLBACK (procedure_clist_select_callback),
plugindesc);
label = gtk_label_new (_("List View"));
gtk_notebook_append_page (GTK_NOTEBOOK (notebook), swindow, label);
@ -1073,9 +1073,9 @@ gimp_plugin_desc (void)
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (swindow),
GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
gtk_widget_set_size_request (plugindesc->ctree, DBL_LIST_WIDTH, DBL_HEIGHT);
gtk_signal_connect (GTK_OBJECT (plugindesc->ctree), "tree_select_row",
GTK_SIGNAL_FUNC (procedure_ctree_select_callback),
plugindesc);
g_signal_connect (plugindesc->ctree, "tree_select_row",
G_CALLBACK (procedure_ctree_select_callback),
plugindesc);
gtk_clist_set_column_auto_resize (GTK_CLIST (plugindesc->ctree), 0, TRUE);
gtk_clist_set_column_auto_resize (GTK_CLIST (plugindesc->ctree), 1, TRUE);
gtk_clist_set_column_auto_resize (GTK_CLIST (plugindesc->ctree), 2, TRUE);
@ -1088,9 +1088,9 @@ gimp_plugin_desc (void)
gtk_widget_show (plugindesc->ctree);
gtk_widget_show (swindow);
gtk_signal_connect_after (GTK_OBJECT (notebook), "switch_page",
GTK_SIGNAL_FUNC (page_select_callback),
plugindesc);
g_signal_connect_after (notebook, "switch_page",
G_CALLBACK (page_select_callback),
plugindesc);
gtk_widget_show (notebook);
@ -1114,9 +1114,9 @@ gimp_plugin_desc (void)
button = gtk_button_new_with_label (_("Details >>"));
gtk_misc_set_padding (GTK_MISC (GTK_BIN (button)->child), 2, 0);
gtk_signal_connect (GTK_OBJECT (button), "clicked",
GTK_SIGNAL_FUNC (details_callback),
plugindesc);
g_signal_connect (button, "clicked",
G_CALLBACK (details_callback),
plugindesc);
gtk_box_pack_start (GTK_BOX (searchhbox), button,
FALSE, FALSE, 0);
gtk_widget_show (button);

View File

@ -22,9 +22,7 @@
#define PLUG_IN_NAME "SphereDesigner"
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <stdio.h>
#include <string.h>
@ -37,6 +35,11 @@
#include <stdlib.h>
#include <string.h>
#ifdef __GNUC__
#warning GTK_DISABLE_DEPRECATED
#endif
#undef GTK_DISABLE_DEPRECATED
#include <gtk/gtk.h>
#include <libgimp/gimp.h>
@ -1163,9 +1166,9 @@ void objnormal(vector *res, common *obj, vector *p)
void calclight(vector *col, vector *point, common *obj)
{
int i, j, o;
gint i, j;
ray r;
double d, b, a;
gdouble d, b, a;
vector lcol;
vector norm;
vector pcol;
@ -1576,7 +1579,7 @@ texture *currenttexture(void)
texture *t;
tmpw = currentitem(texturelist);
if(!tmpw) return NULL;
t = gtk_object_get_data(GTK_OBJECT(tmpw), "texture");
t = g_object_get_data (G_OBJECT(tmpw), "texture");
return t;
}
@ -1648,10 +1651,10 @@ void addtexture(void)
setdefaults(&s.com.texture[n]);
item = gtk_list_item_new_with_label(mklabel(&s.com.texture[n]));
gtk_object_set_data (GTK_OBJECT(item), "texture", &s.com.texture[n]);
gtk_container_add(GTK_CONTAINER(texturelist), item);
gtk_widget_show(item);
item = gtk_list_item_new_with_label (mklabel(&s.com.texture[n]));
g_object_set_data (G_OBJECT (item), "texture", &s.com.texture[n]);
gtk_container_add (GTK_CONTAINER(texturelist), item);
gtk_widget_show (item);
gtk_list_select_child(GTK_LIST(texturelist), item);
@ -1671,7 +1674,7 @@ void duptexture(void)
s.com.texture[n] = *t;
item = gtk_list_item_new_with_label(mklabel(&s.com.texture[n]));
gtk_object_set_data (GTK_OBJECT(item), "texture", &s.com.texture[n]);
g_object_set_data (G_OBJECT(item), "texture", &s.com.texture[n]);
gtk_container_add(GTK_CONTAINER(texturelist), item);
gtk_widget_show(item);
@ -1698,8 +1701,8 @@ void rebuildlist(void)
for(n = 0; n < s.com.numtexture; n++) {
item = gtk_list_item_new_with_label(mklabel(&s.com.texture[n]));
gtk_object_set_data (GTK_OBJECT(item), "texture", &s.com.texture[n]);
gtk_container_add(GTK_CONTAINER(texturelist), item);
g_object_set_data (G_OBJECT(item), "texture", &s.com.texture[n]);
gtk_container_add (GTK_CONTAINER(texturelist), item);
gtk_widget_show(item);
}
restartrender();
@ -1738,7 +1741,7 @@ void deltexture(void)
gtk_widget_destroy(tmpw);
}
void loadit(char *fn)
void loadit(const gchar *fn)
{
FILE *f;
char line[1024];
@ -1768,7 +1771,7 @@ void loadit(char *fn)
void loadpreset_ok(GtkWidget *w, GtkFileSelection *fs)
{
char *fn = gtk_file_selection_get_filename(GTK_FILE_SELECTION (fs));
const gchar *fn = gtk_file_selection_get_filename(GTK_FILE_SELECTION (fs));
gtk_widget_hide(GTK_WIDGET(fs));
gtk_list_clear_items(GTK_LIST(texturelist), 0, -1);
loadit(fn);
@ -1776,7 +1779,7 @@ void loadpreset_ok(GtkWidget *w, GtkFileSelection *fs)
restartrender();
}
void saveit(char *fn)
void saveit(const gchar *fn)
{
gint i;
FILE *f;
@ -1821,7 +1824,7 @@ void saveit(char *fn)
void savepreset_ok(GtkWidget *w, GtkFileSelection *fs)
{
char *fn = gtk_file_selection_get_filename(GTK_FILE_SELECTION (fs));
const char *fn = gtk_file_selection_get_filename(GTK_FILE_SELECTION (fs));
gtk_widget_hide(GTK_WIDGET(fs));
saveit(fn);
}
@ -1847,19 +1850,21 @@ void fileselect(int action)
windows[action] = gtk_file_selection_new( gettext(titles[action]));
gtk_window_set_position (GTK_WINDOW (windows[action]), GTK_WIN_POS_MOUSE);
gtk_signal_connect (GTK_OBJECT (windows[action]), "destroy",
GTK_SIGNAL_FUNC(gtk_widget_destroy),
&windows[action]);
gtk_signal_connect (GTK_OBJECT (windows[action]), "delete_event",
GTK_SIGNAL_FUNC(gtk_widget_hide),
&windows[action]);
g_signal_connect (windows[action], "destroy",
G_CALLBACK (gtk_widget_destroy),
&windows[action]);
g_signal_connect (windows[action], "delete_event",
G_CALLBACK (gtk_widget_hide),
&windows[action]);
gtk_signal_connect (GTK_OBJECT (GTK_FILE_SELECTION (windows[action])->ok_button),
"clicked", GTK_SIGNAL_FUNC(handlers[action]),
windows[action]);
gtk_signal_connect_object(GTK_OBJECT (GTK_FILE_SELECTION (windows[action])->cancel_button),
"clicked", GTK_SIGNAL_FUNC(gtk_widget_destroy),
GTK_OBJECT (windows[action]));
g_signal_connect (GTK_FILE_SELECTION (windows[action])->ok_button,
"clicked",
G_CALLBACK(handlers[action]),
windows[action]);
g_signal_connect_swapped (GTK_FILE_SELECTION (windows[action])->cancel_button,
"clicked",
G_CALLBACK(gtk_widget_destroy),
windows[action]);
gimp_help_connect (windows[action], gimp_standard_help_func,
"filters/spheredesigner.html");
@ -2010,8 +2015,9 @@ void mktexturemenu(GtkWidget *texturemenu_menu)
item = gtk_menu_item_new_with_label ( gettext(t->s));
gtk_widget_show(item);
gtk_menu_append (GTK_MENU (texturemenu_menu), item);
gtk_signal_connect (GTK_OBJECT(item), "activate",
GTK_SIGNAL_FUNC(selecttexture), (void *)t->n);
g_signal_connect (item, "activate",
G_CALLBACK (selecttexture),
(gpointer) t->n);
t++;
}
}
@ -2108,9 +2114,9 @@ void selectcolor1(vector *col)
gtk_color_selection_set_current_alpha (GTK_COLOR_SELECTION(GTK_COLOR_SELECTION_DIALOG (window)->colorsel), TRUE);
gtk_signal_connect (GTK_OBJECT (window), "destroy",
GTK_SIGNAL_FUNC(gtk_widget_destroyed),
&window);
g_signal_connect (window, "destroy",
G_CALLBACK(gtk_widget_destroyed),
&window);
tmpcol[0] = t->color1.x;
tmpcol[1] = t->color1.y;
tmpcol[2] = t->color1.z;
@ -2118,13 +2124,13 @@ void selectcolor1(vector *col)
gtk_color_selection_set_color(GTK_COLOR_SELECTION(GTK_COLOR_SELECTION_DIALOG(window)->colorsel), tmpcol);
gtk_signal_connect(GTK_OBJECT(GTK_COLOR_SELECTION_DIALOG(window)->ok_button),
"clicked",
GTK_SIGNAL_FUNC(selectcolor1_ok), window);
gtk_signal_connect_object(GTK_OBJECT(GTK_COLOR_SELECTION_DIALOG(window)->cancel_button),
"clicked",
GTK_SIGNAL_FUNC(gtk_widget_destroy),
GTK_OBJECT (window));
g_signal_connect (GTK_COLOR_SELECTION_DIALOG (window)->ok_button, "clicked",
G_CALLBACK (selectcolor1_ok),
window);
g_signal_connect_swapped (GTK_COLOR_SELECTION_DIALOG (window)->cancel_button,
"clicked",
G_CALLBACK (gtk_widget_destroy),
window);
gtk_widget_show (window);
}
@ -2146,9 +2152,9 @@ void selectcolor2(vector *col)
gtk_color_selection_set_current_alpha (GTK_COLOR_SELECTION(GTK_COLOR_SELECTION_DIALOG (window)->colorsel), TRUE);
gtk_signal_connect (GTK_OBJECT (window), "destroy",
GTK_SIGNAL_FUNC(gtk_widget_destroyed),
&window);
g_signal_connect (window, "destroy",
G_CALLBACK (gtk_widget_destroyed),
&window);
tmpcol[0] = t->color2.x;
tmpcol[1] = t->color2.y;
tmpcol[2] = t->color2.z;
@ -2156,13 +2162,13 @@ void selectcolor2(vector *col)
gtk_color_selection_set_color(GTK_COLOR_SELECTION(GTK_COLOR_SELECTION_DIALOG(window)->colorsel), tmpcol);
gtk_signal_connect(GTK_OBJECT(GTK_COLOR_SELECTION_DIALOG(window)->ok_button),
"clicked",
GTK_SIGNAL_FUNC(selectcolor2_ok), window);
gtk_signal_connect_object(GTK_OBJECT(GTK_COLOR_SELECTION_DIALOG(window)->cancel_button),
g_signal_connect (GTK_COLOR_SELECTION_DIALOG (window)->ok_button, "clicked",
G_CALLBACK (selectcolor2_ok),
window);
g_signal_connect_swapped (GTK_COLOR_SELECTION_DIALOG (window)->cancel_button,
"clicked",
GTK_SIGNAL_FUNC(gtk_widget_destroy),
GTK_OBJECT (window));
G_CALLBACK (gtk_widget_destroy),
window);
gtk_widget_show (window);
}
@ -2236,13 +2242,13 @@ GtkWidget* makewindow (void)
NULL);
gtk_object_set_data (GTK_OBJECT (window), "window", window);
gtk_object_set_data (GTK_OBJECT (window), "okbutton", okbutton);
gtk_object_set_data (GTK_OBJECT (window), "cancelbutton", cancelbutton);
gtk_object_set_data (GTK_OBJECT (window), "resetbutton", cancelbutton);
g_object_set_data (G_OBJECT (window), "window", window);
g_object_set_data (G_OBJECT (window), "okbutton", okbutton);
g_object_set_data (G_OBJECT (window), "cancelbutton", cancelbutton);
g_object_set_data (G_OBJECT (window), "resetbutton", cancelbutton);
table1 = gtk_table_new (3, 3, FALSE);
gtk_object_set_data (GTK_OBJECT (window), "table1", table1);
g_object_set_data (G_OBJECT (window), "table1", table1);
gtk_widget_show (table1);
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (window)->vbox), table1);
gtk_table_set_row_spacings (GTK_TABLE (table1), 4);
@ -2250,102 +2256,111 @@ GtkWidget* makewindow (void)
gtk_container_set_border_width (GTK_CONTAINER (table1), 6);
frame2 = gtk_frame_new (_("Preview"));
gtk_object_set_data (GTK_OBJECT (window), "frame2", frame2);
g_object_set_data (G_OBJECT (window), "frame2", frame2);
gtk_widget_show (frame2);
gtk_table_attach (GTK_TABLE (table1), frame2, 0, 1, 0, 1,
GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
drawarea = gtk_drawing_area_new ();
gtk_object_set_data (GTK_OBJECT (window), "drawarea", drawarea);
g_object_set_data (G_OBJECT (window), "drawarea", drawarea);
gtk_widget_show (drawarea);
gtk_container_add (GTK_CONTAINER (frame2), drawarea);
gtk_widget_set_size_request (drawarea, PREVIEWSIZE, PREVIEWSIZE);
gtk_signal_connect (GTK_OBJECT (drawarea), "expose_event",
(GtkSignalFunc) expose_event, NULL);
g_signal_connect (drawarea, "expose_event",
G_CALLBACK (expose_event),
NULL);
updatebutton = gtk_button_new_with_label ( _("Update"));
gtk_object_set_data (GTK_OBJECT (window), "updatebutton", updatebutton);
g_object_set_data (G_OBJECT (window), "updatebutton", updatebutton);
gtk_widget_show (updatebutton);
gtk_table_attach (GTK_TABLE (table1), updatebutton, 0, 1, 1, 2,
(GtkAttachOptions) GTK_EXPAND | GTK_FILL, (GtkAttachOptions) GTK_EXPAND | GTK_FILL, 0, 0);
gtk_signal_connect (GTK_OBJECT(updatebutton), "clicked", GTK_SIGNAL_FUNC(restartrender), NULL);
g_signal_connect (updatebutton, "clicked",
G_CALLBACK (restartrender),
NULL);
frame3 = gtk_frame_new ( _("Textures"));
gtk_object_set_data (GTK_OBJECT (window), "frame3", frame3);
g_object_set_data (G_OBJECT (window), "frame3", frame3);
gtk_widget_show (frame3);
gtk_table_attach (GTK_TABLE (table1), frame3, 1, 2, 0, 2,
(GtkAttachOptions) GTK_EXPAND | GTK_FILL, (GtkAttachOptions) GTK_EXPAND | GTK_FILL, 0, 0);
viewport2 = gtk_viewport_new (NULL, NULL);
gtk_object_set_data (GTK_OBJECT (window), "viewport2", viewport2);
g_object_set_data (G_OBJECT (window), "viewport2", viewport2);
gtk_widget_set_size_request (viewport2, 150, -1);
gtk_widget_show (viewport2);
gtk_container_add (GTK_CONTAINER (frame3), viewport2);
texturelist = gtk_list_new ();
gtk_object_set_data (GTK_OBJECT (window), "texturelist", texturelist);
g_object_set_data (G_OBJECT (window), "texturelist", texturelist);
gtk_widget_show (texturelist);
gtk_container_add (GTK_CONTAINER (viewport2), texturelist);
gtk_signal_connect (GTK_OBJECT(texturelist), "selection_changed",
GTK_SIGNAL_FUNC(selectitem), texturelist);
g_signal_connect (texturelist, "selection_changed",
G_CALLBACK (selectitem),
texturelist);
hbox1 = gtk_hbox_new (TRUE, 0);
gtk_object_set_data (GTK_OBJECT (window), "hbox1", hbox1);
g_object_set_data (G_OBJECT (window), "hbox1", hbox1);
gtk_widget_show (hbox1);
gtk_table_attach (GTK_TABLE (table1), hbox1, 1, 2, 2, 3,
(GtkAttachOptions) GTK_EXPAND | GTK_FILL, (GtkAttachOptions) GTK_EXPAND | GTK_FILL, 0, 0);
addbutton = gtk_button_new_with_label ( _("Add"));
gtk_object_set_data (GTK_OBJECT (window), "addbutton", addbutton);
g_object_set_data (G_OBJECT (window), "addbutton", addbutton);
gtk_widget_show (addbutton);
gtk_box_pack_start (GTK_BOX (hbox1), addbutton, TRUE, TRUE, 0);
gtk_signal_connect_object (GTK_OBJECT (addbutton), "clicked",
GTK_SIGNAL_FUNC (addtexture), NULL);
g_signal_connect_swapped (addbutton, "clicked",
G_CALLBACK (addtexture),
NULL);
dupbutton = gtk_button_new_with_label ( _("Dup"));
gtk_object_set_data (GTK_OBJECT (window), "dupbutton", dupbutton);
g_object_set_data (G_OBJECT (window), "dupbutton", dupbutton);
gtk_widget_show (dupbutton);
gtk_box_pack_start (GTK_BOX (hbox1), dupbutton, TRUE, TRUE, 0);
gtk_signal_connect_object (GTK_OBJECT (dupbutton), "clicked",
GTK_SIGNAL_FUNC (duptexture), NULL);
g_signal_connect_swapped (dupbutton, "clicked",
G_CALLBACK (duptexture),
NULL);
delbutton = gtk_button_new_with_label ( _("Del"));
gtk_object_set_data (GTK_OBJECT (window), "delbutton", delbutton);
g_object_set_data (G_OBJECT (window), "delbutton", delbutton);
gtk_widget_show (delbutton);
gtk_box_pack_start (GTK_BOX (hbox1), delbutton, TRUE, TRUE, 0);
gtk_signal_connect_object (GTK_OBJECT (delbutton), "clicked",
GTK_SIGNAL_FUNC (deltexture), NULL);
g_signal_connect_swapped (delbutton, "clicked",
G_CALLBACK (deltexture),
NULL);
hbox1 = gtk_hbox_new (TRUE, 0);
gtk_object_set_data (GTK_OBJECT (window), "hbox1", hbox1);
g_object_set_data (G_OBJECT (window), "hbox1", hbox1);
gtk_widget_show (hbox1);
gtk_table_attach (GTK_TABLE (table1), hbox1, 0, 1, 2, 3,
(GtkAttachOptions) GTK_EXPAND | GTK_FILL, (GtkAttachOptions) GTK_EXPAND | GTK_FILL, 0, 0);
loadbutton = gtk_button_new_with_label ( _("Load"));
gtk_object_set_data (GTK_OBJECT (window), "loadbutton", loadbutton);
g_object_set_data (G_OBJECT (window), "loadbutton", loadbutton);
gtk_widget_show (loadbutton);
gtk_box_pack_start (GTK_BOX (hbox1), loadbutton, TRUE, TRUE, 0);
gtk_signal_connect_object (GTK_OBJECT (loadbutton), "clicked",
GTK_SIGNAL_FUNC (loadpreset), NULL);
g_signal_connect_swapped (loadbutton, "clicked",
G_CALLBACK (loadpreset),
NULL);
savebutton = gtk_button_new_with_label ( _("Save"));
gtk_object_set_data (GTK_OBJECT (window), "savebutton", savebutton);
g_object_set_data (G_OBJECT (window), "savebutton", savebutton);
gtk_widget_show (savebutton);
gtk_box_pack_start (GTK_BOX (hbox1), savebutton, TRUE, TRUE, 0);
gtk_signal_connect_object (GTK_OBJECT (savebutton), "clicked",
GTK_SIGNAL_FUNC (savepreset), NULL);
g_signal_connect_swapped (savebutton, "clicked",
G_CALLBACK (savepreset),
NULL);
frame4 = gtk_frame_new ( _("Texture Properties"));
gtk_object_set_data (GTK_OBJECT (window), "frame4", frame4);
g_object_set_data (G_OBJECT (window), "frame4", frame4);
gtk_widget_show (frame4);
gtk_table_attach (GTK_TABLE (table1), frame4, 2, 3, 0, 3,
(GtkAttachOptions) GTK_EXPAND | GTK_FILL, (GtkAttachOptions) GTK_EXPAND | GTK_FILL, 0, 0);
table2 = gtk_table_new (6, 4, FALSE);
gtk_object_set_data (GTK_OBJECT (window), "table2", table2);
g_object_set_data (G_OBJECT (window), "table2", table2);
gtk_widget_show (table2);
gtk_container_add (GTK_CONTAINER (frame4), table2);
gtk_container_set_border_width (GTK_CONTAINER (table2), 5);
@ -2353,38 +2368,39 @@ GtkWidget* makewindow (void)
gtk_table_set_row_spacings (GTK_TABLE (table2), 2);
label2 = gtk_label_new ( _("Type:"));
gtk_object_set_data (GTK_OBJECT (window), "label2", label2);
g_object_set_data (G_OBJECT (window), "label2", label2);
gtk_widget_show (label2);
gtk_table_attach (GTK_TABLE (table2), label2, 0, 1, 0, 1,
GTK_EXPAND | GTK_FILL, GTK_EXPAND, 0, 0);
gtk_misc_set_alignment (GTK_MISC (label2), 1.0, 0.5);
label3 = gtk_label_new ( _("Texture:"));
gtk_object_set_data (GTK_OBJECT (window), "label3", label3);
g_object_set_data (G_OBJECT (window), "label3", label3);
gtk_widget_show (label3);
gtk_table_attach (GTK_TABLE (table2), label3, 0, 1, 1, 2,
GTK_EXPAND | GTK_FILL, GTK_EXPAND, 0, 0);
gtk_misc_set_alignment (GTK_MISC (label3), 1.0, 0.5);
label4 = gtk_label_new ( _("Colors:"));
gtk_object_set_data (GTK_OBJECT (window), "label4", label4);
g_object_set_data (G_OBJECT (window), "label4", label4);
gtk_widget_show (label4);
gtk_table_attach (GTK_TABLE (table2), label4, 0, 1, 2, 3,
GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
gtk_misc_set_alignment (GTK_MISC (label4), 1.0, 0.5);
hbox3 = gtk_hbox_new (FALSE, 0);
gtk_object_set_data (GTK_OBJECT (window), "hbox3", hbox3);
g_object_set_data (G_OBJECT (window), "hbox3", hbox3);
gtk_widget_show (hbox3);
gtk_table_attach (GTK_TABLE (table2), hbox3, 1, 2, 2, 3,
(GtkAttachOptions) GTK_EXPAND | GTK_FILL, (GtkAttachOptions) GTK_EXPAND | GTK_FILL, 0, 0);
colorbutton1 = gtk_button_new();
gtk_object_set_data (GTK_OBJECT (window), "colorbutton1", colorbutton1);
g_object_set_data (G_OBJECT (window), "colorbutton1", colorbutton1);
gtk_widget_show (colorbutton1);
gtk_box_pack_start (GTK_BOX (hbox3), colorbutton1, TRUE, FALSE, 0);
gtk_signal_connect (GTK_OBJECT (colorbutton1), "clicked",
(GtkSignalFunc)selectcolor1, NULL);
g_signal_connect (G_OBJECT (colorbutton1), "clicked",
G_CALLBACK (selectcolor1),
NULL);
tmpw = gtk_preview_new(GTK_PREVIEW_COLOR);
gtk_preview_size (GTK_PREVIEW (tmpw), COLORBUTTONWIDTH, COLORBUTTONHEIGHT);
gtk_container_add (GTK_CONTAINER (colorbutton1), tmpw);
@ -2392,11 +2408,12 @@ GtkWidget* makewindow (void)
drawcolor1(tmpw);
colorbutton2 = gtk_button_new();
gtk_object_set_data (GTK_OBJECT (window), "colorbutton2", colorbutton2);
g_object_set_data (G_OBJECT (window), "colorbutton2", colorbutton2);
gtk_widget_show (colorbutton2);
gtk_box_pack_start (GTK_BOX (hbox3), colorbutton2, TRUE, FALSE, 0);
gtk_signal_connect (GTK_OBJECT (colorbutton2), "clicked",
(GtkSignalFunc)selectcolor2, NULL);
g_signal_connect (colorbutton2, "clicked",
G_CALLBACK (selectcolor2),
NULL);
tmpw = gtk_preview_new(GTK_PREVIEW_COLOR);
gtk_preview_size (GTK_PREVIEW (tmpw), COLORBUTTONWIDTH, COLORBUTTONHEIGHT);
gtk_container_add (GTK_CONTAINER (colorbutton2), tmpw);
@ -2404,7 +2421,7 @@ GtkWidget* makewindow (void)
drawcolor2(tmpw);
label5 = gtk_label_new ( _("Scale:"));
gtk_object_set_data (GTK_OBJECT (window), "label5", label5);
g_object_set_data (G_OBJECT (window), "label5", label5);
gtk_widget_show (label5);
gtk_table_attach (GTK_TABLE (table2), label5, 0, 1, 3, 4,
GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
@ -2412,16 +2429,17 @@ GtkWidget* makewindow (void)
_scalescale = gtk_hscale_new (GTK_ADJUSTMENT (scalescale = gtk_adjustment_new (1.0, 0.0, 5.1, 0.1, 0.1, 0.1)));
gtk_widget_set_size_request (_scalescale, 100, -1);
gtk_object_set_data (GTK_OBJECT (window), "_scalescale", _scalescale);
g_object_set_data (G_OBJECT (window), "_scalescale", _scalescale);
gtk_widget_show (_scalescale);
gtk_table_attach (GTK_TABLE (table2), _scalescale, 1, 2, 3, 4,
GTK_EXPAND | GTK_FILL, GTK_EXPAND, 0, 0);
gtk_scale_set_digits (GTK_SCALE (_scalescale), 2);
gtk_signal_connect(GTK_OBJECT(scalescale), "value_changed",
(GtkSignalFunc)getscales, NULL);
g_signal_connect (scalescale, "value_changed",
G_CALLBACK (getscales),
NULL);
label5 = gtk_label_new ( _("Turbulence:"));
gtk_object_set_data (GTK_OBJECT (window), "label5", label5);
g_object_set_data (G_OBJECT (window), "label5", label5);
gtk_widget_show (label5);
gtk_table_attach (GTK_TABLE (table2), label5, 0, 1, 4, 5,
GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
@ -2429,16 +2447,17 @@ GtkWidget* makewindow (void)
_turbulencescale = gtk_hscale_new (GTK_ADJUSTMENT (turbulencescale = gtk_adjustment_new (0.0, 0.0, 5.1, 0.1, 0.1, 0.1)));
gtk_widget_set_size_request (_turbulencescale, 100, -1);
gtk_object_set_data (GTK_OBJECT (window), "_turbulencescale", _turbulencescale);
g_object_set_data (G_OBJECT (window), "_turbulencescale", _turbulencescale);
gtk_widget_show (_turbulencescale);
gtk_table_attach (GTK_TABLE (table2), _turbulencescale, 1, 2, 4, 5,
(GtkAttachOptions) GTK_EXPAND | GTK_FILL, (GtkAttachOptions) GTK_EXPAND, 0, 0);
gtk_scale_set_digits (GTK_SCALE (_turbulencescale), 2);
gtk_signal_connect(GTK_OBJECT(turbulencescale), "value_changed",
(GtkSignalFunc)getscales, NULL);
g_signal_connect (turbulencescale, "value_changed",
G_CALLBACK (getscales),
NULL);
label6 = gtk_label_new ( _("Scale X:"));
gtk_object_set_data (GTK_OBJECT (window), "label6", label6);
g_object_set_data (G_OBJECT (window), "label6", label6);
gtk_widget_show (label6);
gtk_table_attach (GTK_TABLE (table2), label6, 2, 3, 0, 1,
GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
@ -2446,16 +2465,16 @@ GtkWidget* makewindow (void)
_scalescale = gtk_hscale_new (GTK_ADJUSTMENT (scalexscale = gtk_adjustment_new (1.0, 0.0, 5.1, 0.1, 0.1, 0.1)));
gtk_widget_set_size_request (_scalescale, 100, -1);
gtk_object_set_data (GTK_OBJECT (window), "_scalescale", _scalescale);
g_object_set_data (G_OBJECT (window), "_scalescale", _scalescale);
gtk_scale_set_digits (GTK_SCALE (_scalescale), 2);
gtk_widget_show (_scalescale);
gtk_table_attach (GTK_TABLE (table2), _scalescale, 3, 4, 0, 1,
GTK_EXPAND | GTK_FILL, GTK_EXPAND, 0, 0);
gtk_signal_connect(GTK_OBJECT(scalexscale), "value_changed",
(GtkSignalFunc)getscales, NULL);
g_signal_connect (scalexscale, "value_changed",
G_CALLBACK (getscales), NULL);
label6 = gtk_label_new ( _("Scale Y:"));
gtk_object_set_data (GTK_OBJECT (window), "label6", label6);
g_object_set_data (G_OBJECT (window), "label6", label6);
gtk_widget_show (label6);
gtk_table_attach (GTK_TABLE (table2), label6, 2, 3, 1, 2,
GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
@ -2463,16 +2482,16 @@ GtkWidget* makewindow (void)
_scalescale = gtk_hscale_new (GTK_ADJUSTMENT (scaleyscale = gtk_adjustment_new (1.0, 0.0, 5.1, 0.1, 0.1, 0.1)));
gtk_widget_set_size_request (_scalescale, 100, -1);
gtk_object_set_data (GTK_OBJECT (window), "_scalescale", _scalescale);
g_object_set_data (G_OBJECT (window), "_scalescale", _scalescale);
gtk_scale_set_digits (GTK_SCALE (_scalescale), 2);
gtk_widget_show (_scalescale);
gtk_table_attach (GTK_TABLE (table2), _scalescale, 3, 4, 1, 2,
GTK_EXPAND | GTK_FILL, GTK_EXPAND, 0, 0);
gtk_signal_connect(GTK_OBJECT(scaleyscale), "value_changed",
(GtkSignalFunc)getscales, NULL);
g_signal_connect (scaleyscale, "value_changed",
G_CALLBACK (getscales), NULL);
label6 = gtk_label_new ( _("Scale Z:"));
gtk_object_set_data (GTK_OBJECT (window), "label6", label6);
g_object_set_data (G_OBJECT (window), "label6", label6);
gtk_widget_show (label6);
gtk_table_attach (GTK_TABLE (table2), label6, 2, 3, 2, 3,
GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
@ -2480,17 +2499,17 @@ GtkWidget* makewindow (void)
_scalescale = gtk_hscale_new (GTK_ADJUSTMENT (scalezscale = gtk_adjustment_new (1.0, 0.0, 5.1, 0.1, 0.1, 0.1)));
gtk_widget_set_size_request (_scalescale, 100, -1);
gtk_object_set_data (GTK_OBJECT (window), "_scalescale", _scalescale);
g_object_set_data (G_OBJECT (window), "_scalescale", _scalescale);
gtk_scale_set_digits (GTK_SCALE (_scalescale), 2);
gtk_widget_show (_scalescale);
gtk_table_attach (GTK_TABLE (table2), _scalescale, 3, 4, 2, 3,
(GtkAttachOptions) GTK_EXPAND | GTK_FILL, (GtkAttachOptions) GTK_EXPAND, 0, 0);
gtk_signal_connect(GTK_OBJECT(scalezscale), "value_changed",
(GtkSignalFunc)getscales, NULL);
g_signal_connect (scalezscale, "value_changed",
G_CALLBACK (getscales), NULL);
label6 = gtk_label_new ( _("Rotate X:"));
gtk_object_set_data (GTK_OBJECT (window), "label6", label6);
g_object_set_data (G_OBJECT (window), "label6", label6);
gtk_widget_show (label6);
gtk_table_attach (GTK_TABLE (table2), label6, 2, 3, 3, 4,
GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
@ -2498,16 +2517,16 @@ GtkWidget* makewindow (void)
_rotscale = gtk_hscale_new (GTK_ADJUSTMENT (rotxscale = gtk_adjustment_new (1.0, 0.0, 360.1, 0.1, 0.1, 0.1)));
gtk_widget_set_size_request (_rotscale, 100, -1);
gtk_object_set_data (GTK_OBJECT (window), "_rotscale", _rotscale);
g_object_set_data (G_OBJECT (window), "_rotscale", _rotscale);
gtk_scale_set_digits (GTK_SCALE (_rotscale), 2);
gtk_widget_show (_rotscale);
gtk_table_attach (GTK_TABLE (table2), _rotscale, 3, 4, 3, 4,
GTK_EXPAND | GTK_FILL, GTK_EXPAND, 0, 0);
gtk_signal_connect(GTK_OBJECT(rotxscale), "value_changed",
(GtkSignalFunc)getscales, NULL);
g_signal_connect (G_OBJECT (rotxscale), "value_changed",
G_CALLBACK (getscales), NULL);
label6 = gtk_label_new ( _("Rotate Y:"));
gtk_object_set_data (GTK_OBJECT (window), "label6", label6);
g_object_set_data (G_OBJECT (window), "label6", label6);
gtk_widget_show (label6);
gtk_table_attach (GTK_TABLE (table2), label6, 2, 3, 4, 5,
GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
@ -2515,16 +2534,16 @@ GtkWidget* makewindow (void)
_rotscale = gtk_hscale_new (GTK_ADJUSTMENT (rotyscale = gtk_adjustment_new (1.0, 0.0, 360.1, 0.1, 0.1, 0.1)));
gtk_widget_set_size_request (_rotscale, 100, -1);
gtk_object_set_data (GTK_OBJECT (window), "_rotscale", _rotscale);
g_object_set_data (G_OBJECT (window), "_rotscale", _rotscale);
gtk_scale_set_digits (GTK_SCALE (_rotscale), 2);
gtk_widget_show (_rotscale);
gtk_table_attach (GTK_TABLE (table2), _rotscale, 3, 4, 4, 5,
(GtkAttachOptions) GTK_EXPAND | GTK_FILL, (GtkAttachOptions) GTK_EXPAND, 0, 0);
gtk_signal_connect(GTK_OBJECT(rotyscale), "value_changed",
(GtkSignalFunc)getscales, NULL);
g_signal_connect (rotyscale, "value_changed",
G_CALLBACK (getscales), NULL);
label6 = gtk_label_new ( _("Rotate Z:"));
gtk_object_set_data (GTK_OBJECT (window), "label6", label6);
g_object_set_data (G_OBJECT (window), "label6", label6);
gtk_widget_show (label6);
gtk_table_attach (GTK_TABLE (table2), label6, 2, 3, 5, 6,
GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
@ -2532,16 +2551,16 @@ GtkWidget* makewindow (void)
_rotscale = gtk_hscale_new (GTK_ADJUSTMENT (rotzscale = gtk_adjustment_new (1.0, 0.0, 360.1, 0.1, 0.1, 0.1)));
gtk_widget_set_size_request (_rotscale, 100, -1);
gtk_object_set_data (GTK_OBJECT (window), "_rotscale", _rotscale);
g_object_set_data (G_OBJECT (window), "_rotscale", _rotscale);
gtk_scale_set_digits (GTK_SCALE (_rotscale), 2);
gtk_widget_show (_rotscale);
gtk_table_attach (GTK_TABLE (table2), _rotscale, 3, 4, 5, 6,
(GtkAttachOptions) GTK_EXPAND | GTK_FILL, (GtkAttachOptions) GTK_EXPAND, 0, 0);
gtk_signal_connect(GTK_OBJECT(rotzscale), "value_changed",
(GtkSignalFunc)getscales, NULL);
g_signal_connect (rotzscale, "value_changed",
G_CALLBACK (getscales), NULL);
label6 = gtk_label_new ( _("Pos X:"));
gtk_object_set_data (GTK_OBJECT (window), "label6", label6);
g_object_set_data (G_OBJECT (window), "label6", label6);
gtk_widget_show (label6);
gtk_table_attach (GTK_TABLE (table2), label6, 5, 6, 0, 1,
GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
@ -2549,16 +2568,16 @@ GtkWidget* makewindow (void)
_scalescale = gtk_hscale_new (GTK_ADJUSTMENT (posxscale = gtk_adjustment_new (0.0, -20.0, 20.1, 0.1, 0.1, 0.1)));
gtk_widget_set_size_request (_scalescale, 100, -1);
gtk_object_set_data (GTK_OBJECT (window), "_scalescale", _scalescale);
g_object_set_data (G_OBJECT (window), "_scalescale", _scalescale);
gtk_scale_set_digits (GTK_SCALE (_scalescale), 2);
gtk_widget_show (_scalescale);
gtk_table_attach (GTK_TABLE (table2), _scalescale, 6, 7, 0, 1,
GTK_EXPAND | GTK_FILL, GTK_EXPAND, 0, 0);
gtk_signal_connect(GTK_OBJECT(posxscale), "value_changed",
(GtkSignalFunc)getscales, NULL);
g_signal_connect (posxscale, "value_changed",
G_CALLBACK (getscales), NULL);
label6 = gtk_label_new ( _("Pos Y:"));
gtk_object_set_data (GTK_OBJECT (window), "label6", label6);
g_object_set_data (G_OBJECT (window), "label6", label6);
gtk_widget_show (label6);
gtk_table_attach (GTK_TABLE (table2), label6, 5, 6, 1, 2,
GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
@ -2566,16 +2585,16 @@ GtkWidget* makewindow (void)
_scalescale = gtk_hscale_new (GTK_ADJUSTMENT (posyscale = gtk_adjustment_new (1.0, -20.0, 20.1, 0.1, 0.1, 0.1)));
gtk_widget_set_size_request (_scalescale, 100, -1);
gtk_object_set_data (GTK_OBJECT (window), "_scalescale", _scalescale);
g_object_set_data (G_OBJECT (window), "_scalescale", _scalescale);
gtk_scale_set_digits (GTK_SCALE (_scalescale), 2);
gtk_widget_show (_scalescale);
gtk_table_attach (GTK_TABLE (table2), _scalescale, 6, 7, 1, 2,
GTK_EXPAND | GTK_FILL, GTK_EXPAND, 0, 0);
gtk_signal_connect(GTK_OBJECT(posyscale), "value_changed",
(GtkSignalFunc)getscales, NULL);
g_signal_connect (posyscale, "value_changed",
G_CALLBACK (getscales), NULL);
label6 = gtk_label_new ( _("Pos Z:"));
gtk_object_set_data (GTK_OBJECT (window), "label6", label6);
g_object_set_data (G_OBJECT (window), "label6", label6);
gtk_widget_show (label6);
gtk_table_attach (GTK_TABLE (table2), label6, 5, 6, 2, 3,
GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
@ -2583,42 +2602,45 @@ GtkWidget* makewindow (void)
_scalescale = gtk_hscale_new (GTK_ADJUSTMENT (poszscale = gtk_adjustment_new (1.0, -20.0, 20.1, 0.1, 0.1, 0.1)));
gtk_widget_set_size_request (_scalescale, 100, -1);
gtk_object_set_data (GTK_OBJECT (window), "_scalescale", _scalescale);
g_object_set_data (G_OBJECT (window), "_scalescale", _scalescale);
gtk_scale_set_digits (GTK_SCALE (_scalescale), 2);
gtk_widget_show (_scalescale);
gtk_table_attach (GTK_TABLE (table2), _scalescale, 6, 7, 2, 3,
(GtkAttachOptions) GTK_EXPAND | GTK_FILL, (GtkAttachOptions) GTK_EXPAND, 0, 0);
gtk_signal_connect(GTK_OBJECT(poszscale), "value_changed",
(GtkSignalFunc)getscales, NULL);
g_signal_connect (poszscale, "value_changed",
G_CALLBACK (getscales), NULL);
typemenu = gtk_option_menu_new ();
gtk_object_set_data (GTK_OBJECT (window), "typemenu", typemenu);
g_object_set_data (G_OBJECT (window), "typemenu", typemenu);
gtk_widget_show (typemenu);
gtk_table_attach (GTK_TABLE (table2), typemenu, 1, 2, 0, 1,
GTK_FILL | GTK_EXPAND, GTK_EXPAND, 0, 0);
typemenu_menu = gtk_menu_new ();
item = gtk_menu_item_new_with_label ( _("Texture"));
gtk_widget_show (item);
gtk_signal_connect (GTK_OBJECT(item), "activate",
GTK_SIGNAL_FUNC(selecttype), NULL);
g_signal_connect (item, "activate",
G_CALLBACK (selecttype),
NULL);
gtk_menu_append (GTK_MENU (typemenu_menu), item);
item = gtk_menu_item_new_with_label ( _("Bump"));
gtk_widget_show (item);
gtk_signal_connect (GTK_OBJECT(item), "activate",
GTK_SIGNAL_FUNC(selecttype), (long *)1);
g_signal_connect (item, "activate",
G_CALLBACK (selecttype),
(long *)1);
gtk_menu_append (GTK_MENU (typemenu_menu), item);
item = gtk_menu_item_new_with_label ( _("Light"));
gtk_widget_show (item);
gtk_signal_connect (GTK_OBJECT(item), "activate",
GTK_SIGNAL_FUNC(selecttype), (long *)2);
g_signal_connect (item, "activate",
G_CALLBACK (selecttype),
(long *)2);
gtk_menu_append (GTK_MENU (typemenu_menu), item);
gtk_option_menu_set_menu (GTK_OPTION_MENU (typemenu), typemenu_menu);
texturemenu = gtk_option_menu_new ();
gtk_object_set_data (GTK_OBJECT (window), "texturemenu", texturemenu);
g_object_set_data (G_OBJECT (window), "texturemenu", texturemenu);
gtk_widget_show (texturemenu);
gtk_table_attach (GTK_TABLE (table2), texturemenu, 1, 2, 1, 2,
GTK_EXPAND | GTK_FILL, GTK_EXPAND, 0, 0);
@ -2629,7 +2651,7 @@ GtkWidget* makewindow (void)
gtk_option_menu_set_menu (GTK_OPTION_MENU (texturemenu), texturemenu_menu);
label7 = gtk_label_new ( _("Amount:"));
gtk_object_set_data (GTK_OBJECT (window), "label7", label7);
g_object_set_data (G_OBJECT (window), "label7", label7);
gtk_widget_show (label7);
gtk_table_attach (GTK_TABLE (table2), label7, 0, 1, 5, 6,
GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
@ -2637,16 +2659,16 @@ GtkWidget* makewindow (void)
_amountscale = gtk_hscale_new (GTK_ADJUSTMENT (amountscale = gtk_adjustment_new (1.0, 0, 1.01, .01, .01, .01)));
gtk_widget_set_size_request (_amountscale, 100, -1);
gtk_object_set_data (GTK_OBJECT (window), "_amountscale", _amountscale);
g_object_set_data (G_OBJECT (window), "_amountscale", _amountscale);
gtk_widget_show (_amountscale);
gtk_table_attach (GTK_TABLE (table2), _amountscale, 1, 2, 5, 6,
GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
gtk_scale_set_digits (GTK_SCALE (_amountscale), 2);
gtk_signal_connect(GTK_OBJECT(amountscale), "value_changed",
(GtkSignalFunc)getscales, NULL);
g_signal_connect (amountscale, "value_changed",
G_CALLBACK (getscales), NULL);
label8 = gtk_label_new ( _("Exp:"));
gtk_object_set_data (GTK_OBJECT (window), "label8", label8);
g_object_set_data (G_OBJECT (window), "label8", label8);
gtk_widget_show (label8);
gtk_table_attach (GTK_TABLE (table2), label8, 0, 1, 6, 7,
GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
@ -2654,16 +2676,16 @@ GtkWidget* makewindow (void)
_expscale = gtk_hscale_new (GTK_ADJUSTMENT (expscale = gtk_adjustment_new (1.0, 0, 1.01, .01, .01, .01)));
gtk_widget_set_size_request (_expscale, 100, -1);
gtk_object_set_data (GTK_OBJECT (window), "_expscale", _expscale);
g_object_set_data (G_OBJECT (window), "_expscale", _expscale);
gtk_widget_show (_expscale);
gtk_table_attach (GTK_TABLE (table2), _expscale, 1, 2, 6, 7,
(GtkAttachOptions) GTK_EXPAND | GTK_FILL, (GtkAttachOptions) GTK_EXPAND | GTK_FILL, 0, 0);
gtk_scale_set_digits (GTK_SCALE (_expscale), 2);
gtk_signal_connect(GTK_OBJECT(expscale), "value_changed",
(GtkSignalFunc)getscales, NULL);
g_signal_connect (expscale, "value_changed",
G_CALLBACK (getscales), NULL);
label1 = gtk_label_new ( _("by Vidar Madsen\nSeptember 1999"));
gtk_object_set_data (GTK_OBJECT (window), "label1", label1);
g_object_set_data (G_OBJECT (window), "label1", label1);
gtk_widget_show (label1);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (window)->action_area), label1,
TRUE, TRUE, 0);

View File

@ -1011,9 +1011,9 @@ gimp_plugin_desc (void)
plugindesc->details_showing = FALSE;
gtk_signal_connect (GTK_OBJECT (plugindesc->dlg), "destroy",
GTK_SIGNAL_FUNC (dialog_close_callback),
plugindesc);
g_signal_connect (plugindesc->dlg, "destroy",
G_CALLBACK (dialog_close_callback),
plugindesc);
/* hbox : left=notebook ; right=description */
@ -1042,9 +1042,9 @@ gimp_plugin_desc (void)
clabels[3] = g_strdup (_("Image Types"));
plugindesc->clist = gtk_clist_new_with_titles (4, clabels);
gtk_signal_connect (GTK_OBJECT (plugindesc->clist), "click_column",
GTK_SIGNAL_FUNC (clist_click_column),
NULL);
g_signal_connect (plugindesc->clist, "click_column",
G_CALLBACK (clist_click_column),
NULL);
gtk_clist_column_titles_show (GTK_CLIST (plugindesc->clist));
swindow = gtk_scrolled_window_new (NULL, NULL);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (swindow),
@ -1053,9 +1053,9 @@ gimp_plugin_desc (void)
GTK_SELECTION_BROWSE);
gtk_widget_set_size_request (plugindesc->clist, DBL_LIST_WIDTH, DBL_HEIGHT);
gtk_signal_connect (GTK_OBJECT (plugindesc->clist), "select_row",
GTK_SIGNAL_FUNC (procedure_clist_select_callback),
plugindesc);
g_signal_connect (plugindesc->clist, "select_row",
G_CALLBACK (procedure_clist_select_callback),
plugindesc);
label = gtk_label_new (_("List View"));
gtk_notebook_append_page (GTK_NOTEBOOK (notebook), swindow, label);
@ -1073,9 +1073,9 @@ gimp_plugin_desc (void)
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (swindow),
GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
gtk_widget_set_size_request (plugindesc->ctree, DBL_LIST_WIDTH, DBL_HEIGHT);
gtk_signal_connect (GTK_OBJECT (plugindesc->ctree), "tree_select_row",
GTK_SIGNAL_FUNC (procedure_ctree_select_callback),
plugindesc);
g_signal_connect (plugindesc->ctree, "tree_select_row",
G_CALLBACK (procedure_ctree_select_callback),
plugindesc);
gtk_clist_set_column_auto_resize (GTK_CLIST (plugindesc->ctree), 0, TRUE);
gtk_clist_set_column_auto_resize (GTK_CLIST (plugindesc->ctree), 1, TRUE);
gtk_clist_set_column_auto_resize (GTK_CLIST (plugindesc->ctree), 2, TRUE);
@ -1088,9 +1088,9 @@ gimp_plugin_desc (void)
gtk_widget_show (plugindesc->ctree);
gtk_widget_show (swindow);
gtk_signal_connect_after (GTK_OBJECT (notebook), "switch_page",
GTK_SIGNAL_FUNC (page_select_callback),
plugindesc);
g_signal_connect_after (notebook, "switch_page",
G_CALLBACK (page_select_callback),
plugindesc);
gtk_widget_show (notebook);
@ -1114,9 +1114,9 @@ gimp_plugin_desc (void)
button = gtk_button_new_with_label (_("Details >>"));
gtk_misc_set_padding (GTK_MISC (GTK_BIN (button)->child), 2, 0);
gtk_signal_connect (GTK_OBJECT (button), "clicked",
GTK_SIGNAL_FUNC (details_callback),
plugindesc);
g_signal_connect (button, "clicked",
G_CALLBACK (details_callback),
plugindesc);
gtk_box_pack_start (GTK_BOX (searchhbox), button,
FALSE, FALSE, 0);
gtk_widget_show (button);

View File

@ -468,27 +468,30 @@ void create_orientmap_dialog(void)
gtk_container_add(GTK_CONTAINER(frame), hbox);
gtk_widget_show(hbox);
ebox = gtk_event_box_new();
gtk_tooltips_set_tip(GTK_TOOLTIPS(tooltips), ebox, _("The vector-field. Left-click to move selected vector, Right-click to point it towards mouse, Middle-click to add a new vector."), NULL);
ebox = gtk_event_box_new ();
gtk_tooltips_set_tip (GTK_TOOLTIPS (tooltips), ebox,
_("The vector-field. "
"Left-click to move selected vector, "
"Right-click to point it towards mouse, "
"Middle-click to add a new vector."), NULL);
gtk_box_pack_start(GTK_BOX(hbox), ebox, FALSE, FALSE, 0);
tmpw = vectorprev = gtk_preview_new(GTK_PREVIEW_COLOR);
gtk_preview_size(GTK_PREVIEW(tmpw), OMWIDTH, OMHEIGHT);
gtk_container_add(GTK_CONTAINER(ebox), tmpw);
gtk_widget_show(tmpw);
gtk_widget_set_events(ebox, GDK_BUTTON_PRESS_MASK);
gtk_signal_connect(GTK_OBJECT(ebox), "button_press_event",
GTK_SIGNAL_FUNC(mapclick), NULL);
gtk_widget_realize(ebox);
gtk_widget_show(ebox);
tmpw = vectorprev = gtk_preview_new (GTK_PREVIEW_COLOR);
gtk_preview_size (GTK_PREVIEW (tmpw), OMWIDTH, OMHEIGHT);
gtk_container_add (GTK_CONTAINER (ebox), tmpw);
gtk_widget_show (tmpw);
gtk_widget_add_events (ebox, GDK_BUTTON_PRESS_MASK);
g_signal_connect (ebox, "button_press_event",
G_CALLBACK (mapclick), NULL);
gtk_widget_show (ebox);
vectprevbrightadjust = gtk_adjustment_new(50.0, 0.0, 100.0, 1.0, 1.0, 1.0);
tmpw = gtk_vscale_new(GTK_ADJUSTMENT(vectprevbrightadjust));
gtk_scale_set_draw_value (GTK_SCALE (tmpw), FALSE);
gtk_box_pack_start(GTK_BOX(hbox), tmpw,FALSE,FALSE,0);
gtk_widget_show(tmpw);
gtk_signal_connect(GTK_OBJECT(vectprevbrightadjust), "value_changed",
(GtkSignalFunc)updatevectorprev, NULL);
g_signal_connect (vectprevbrightadjust, "value_changed",
G_CALLBACK (updatevectorprev), NULL);
gtk_tooltips_set_tip(GTK_TOOLTIPS(tooltips), tmpw,
_("Adjust the preview's brightness"), NULL);

View File

@ -414,10 +414,9 @@ void create_sizemap_dialog(void)
gtk_preview_size(GTK_PREVIEW(tmpw), OMWIDTH, OMHEIGHT);
gtk_container_add(GTK_CONTAINER(tmpw2), tmpw);
gtk_widget_show(tmpw);
gtk_widget_set_events(tmpw2, GDK_BUTTON_PRESS_MASK);
gtk_signal_connect(GTK_OBJECT(tmpw2), "button_press_event",
GTK_SIGNAL_FUNC(smmapclick), NULL);
gtk_widget_realize(tmpw2);
gtk_widget_add_events (tmpw2, GDK_BUTTON_PRESS_MASK);
g_signal_connect(G_OBJECT(tmpw2), "button_press_event",
G_CALLBACK (smmapclick), NULL);
gtk_widget_show(tmpw2);
smvectprevbrightadjust = gtk_adjustment_new(50.0, 0.0, 100.0, 1.0, 1.0, 1.0);
@ -425,8 +424,8 @@ void create_sizemap_dialog(void)
gtk_scale_set_draw_value (GTK_SCALE (tmpw), FALSE);
gtk_box_pack_start(GTK_BOX(hbox), tmpw,FALSE,FALSE,0);
gtk_widget_show(tmpw);
gtk_signal_connect(GTK_OBJECT(smvectprevbrightadjust), "value_changed",
(GtkSignalFunc)updatesmvectorprev, NULL);
g_signal_connect (smvectprevbrightadjust, "value_changed",
G_CALLBACK (updatesmvectorprev), NULL);
gtk_tooltips_set_tip(GTK_TOOLTIPS(tooltips), tmpw, _("Adjust the preview's brightness"), NULL);
tmpw2 = tmpw = gtk_frame_new( _("Preview"));
@ -447,8 +446,8 @@ void create_sizemap_dialog(void)
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);
g_signal_connect (tmpw, "clicked",
G_CALLBACK (smprevclick), NULL);
gtk_tooltips_set_tip(GTK_TOOLTIPS(tooltips), tmpw,
_("Select previous smvector"), NULL);

View File

@ -178,10 +178,11 @@ color_picker_options_new (void)
gtk_check_button_new_with_label (_("Sample Merged"));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (options->sample_merged_w),
options->sample_merged_d);
gtk_box_pack_start (GTK_BOX (vbox), options->sample_merged_w, FALSE, FALSE, 0);
gtk_signal_connect (GTK_OBJECT (options->sample_merged_w), "toggled",
GTK_SIGNAL_FUNC (gimp_toggle_button_update),
&options->sample_merged);
gtk_box_pack_start (GTK_BOX (vbox),
options->sample_merged_w, FALSE, FALSE, 0);
g_signal_connect (options->sample_merged_w, "toggled",
G_CALLBACK (gimp_toggle_button_update),
&options->sample_merged);
gtk_widget_show (options->sample_merged_w);
/* the sample average options */
@ -195,9 +196,9 @@ color_picker_options_new (void)
GTK_SHRINK | GTK_FILL, GTK_SHRINK, 0, 0);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (options->sample_average_w),
options->sample_average_d);
gtk_signal_connect (GTK_OBJECT (options->sample_average_w), "toggled",
GTK_SIGNAL_FUNC (gimp_toggle_button_update),
&options->sample_average);
g_signal_connect (options->sample_average_w, "toggled",
G_CALLBACK (gimp_toggle_button_update),
&options->sample_average);
gtk_widget_show (options->sample_average_w);
label = gtk_label_new (_("Radius:"));
@ -225,9 +226,9 @@ color_picker_options_new (void)
label);
gtk_scale_set_value_pos (GTK_SCALE (scale), GTK_POS_TOP);
gtk_range_set_update_policy (GTK_RANGE (scale), GTK_UPDATE_DELAYED);
gtk_signal_connect (GTK_OBJECT (options->average_radius_w), "value_changed",
GTK_SIGNAL_FUNC (gimp_double_adjustment_update),
&options->average_radius);
g_signal_connect (options->average_radius_w, "value_changed",
G_CALLBACK (gimp_double_adjustment_update),
&options->average_radius);
gtk_widget_show (scale);
gtk_widget_show (table);
@ -236,10 +237,11 @@ color_picker_options_new (void)
gtk_check_button_new_with_label (_("Update Active Color"));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (options->update_active_w),
options->update_active_d);
gtk_box_pack_start (GTK_BOX (vbox), options->update_active_w, FALSE, FALSE, 0);
gtk_signal_connect (GTK_OBJECT (options->update_active_w), "toggled",
GTK_SIGNAL_FUNC (gimp_toggle_button_update),
&options->update_active);
gtk_box_pack_start (GTK_BOX (vbox),
options->update_active_w, FALSE, FALSE, 0);
g_signal_connect (options->update_active_w, "toggled",
G_CALLBACK (gimp_toggle_button_update),
&options->update_active);
gtk_widget_show (options->update_active_w);
return options;

View File

@ -911,9 +911,9 @@ iwarp_animate_dialog (GtkWidget *dlg,
button = gtk_check_button_new_with_label (_("Animate"));
gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), do_animate);
gtk_signal_connect (GTK_OBJECT (button), "toggled",
GTK_SIGNAL_FUNC (gimp_toggle_button_update),
&do_animate);
g_signal_connect (button, "toggled",
G_CALLBACK (gimp_toggle_button_update),
&do_animate);
gtk_widget_show (button);
frame = gtk_frame_new (NULL);
@ -936,24 +936,24 @@ iwarp_animate_dialog (GtkWidget *dlg,
2, MAX_NUM_FRAMES, 1.0, 10.0, 1,
TRUE, 0, 0,
NULL, NULL);
gtk_signal_connect (GTK_OBJECT (scale_data), "value_changed",
GTK_SIGNAL_FUNC (gimp_int_adjustment_update),
&animate_num_frames);
g_signal_connect (scale_data, "value_changed",
G_CALLBACK (gimp_int_adjustment_update),
&animate_num_frames);
button = gtk_check_button_new_with_label (_("Reverse"));
gtk_table_attach (GTK_TABLE (table), button, 0, 3, 1, 2,
GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND, 0, 0);
gtk_signal_connect (GTK_OBJECT (button), "clicked",
GTK_SIGNAL_FUNC (gimp_toggle_button_update),
&do_animate_reverse);
g_signal_connect (button, "clicked",
G_CALLBACK (gimp_toggle_button_update),
&do_animate_reverse);
gtk_widget_show (button);
button = gtk_check_button_new_with_label (_("Ping Pong"));
gtk_table_attach (GTK_TABLE (table), button, 0, 3, 2, 3,
GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND, 0, 0);
gtk_signal_connect (GTK_OBJECT (button), "clicked",
GTK_SIGNAL_FUNC (gimp_toggle_button_update),
&do_animate_ping_pong);
g_signal_connect (button, "clicked",
G_CALLBACK (gimp_toggle_button_update),
&do_animate_ping_pong);
gtk_widget_show (button);
gtk_widget_show (vbox);
@ -993,9 +993,9 @@ iwarp_settings_dialog (GtkWidget *dlg,
5.0, MAX_DEFORM_AREA_RADIUS, 1.0, 10.0, 0,
TRUE, 0, 0,
NULL, NULL);
gtk_signal_connect (GTK_OBJECT (scale_data), "value_changed",
GTK_SIGNAL_FUNC (gimp_int_adjustment_update),
&iwarp_vals.deform_area_radius);
g_signal_connect (scale_data, "value_changed",
G_CALLBACK (gimp_int_adjustment_update),
&iwarp_vals.deform_area_radius);
scale_data = gimp_scale_entry_new (GTK_TABLE (table), 0, 1,
_("Deform Amount:"), SCALE_WIDTH, 0,
@ -1003,9 +1003,9 @@ iwarp_settings_dialog (GtkWidget *dlg,
0.0, 1.0, 0.01, 0.1, 2,
TRUE, 0, 0,
NULL, NULL);
gtk_signal_connect (GTK_OBJECT (scale_data), "value_changed",
GTK_SIGNAL_FUNC (gimp_double_adjustment_update),
&iwarp_vals.deform_amount);
g_signal_connect (scale_data, "value_changed",
G_CALLBACK (gimp_double_adjustment_update),
&iwarp_vals.deform_amount);
frame = gtk_frame_new (_("Deform Mode"));
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
@ -1038,22 +1038,22 @@ iwarp_settings_dialog (GtkWidget *dlg,
for (i = 0; i < 3; i++)
{
gtk_object_ref (GTK_OBJECT (widget[i]));
g_object_ref (widget[i]);
gtk_widget_hide (widget[i]);
gtk_container_remove (GTK_CONTAINER (vbox2), widget[i]);
gtk_box_pack_start (GTK_BOX (vbox3), widget[i],
FALSE, FALSE, 0);
gtk_widget_show (widget[i]);
gtk_object_unref (GTK_OBJECT (widget[i]));
g_object_unref (widget[i]);
}
button = gtk_check_button_new_with_label (_("Bilinear"));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button),
iwarp_vals.do_bilinear);
gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);
gtk_signal_connect (GTK_OBJECT (button), "toggled",
GTK_SIGNAL_FUNC (gimp_toggle_button_update),
&iwarp_vals.do_bilinear);
g_signal_connect (button, "toggled",
G_CALLBACK (gimp_toggle_button_update),
&iwarp_vals.do_bilinear);
gtk_widget_show(button);
frame = gtk_frame_new (NULL);
@ -1069,9 +1069,9 @@ iwarp_settings_dialog (GtkWidget *dlg,
gtk_box_pack_start (GTK_BOX (vbox2), button, FALSE, FALSE, 0);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button),
iwarp_vals.do_supersample);
gtk_signal_connect (GTK_OBJECT (button), "toggled",
GTK_SIGNAL_FUNC (gimp_toggle_button_update),
&iwarp_vals.do_supersample);
g_signal_connect (button, "toggled",
G_CALLBACK (gimp_toggle_button_update),
&iwarp_vals.do_supersample);
gtk_widget_show (button);
table = gtk_table_new (2, 3, FALSE);
@ -1089,9 +1089,9 @@ iwarp_settings_dialog (GtkWidget *dlg,
1.0, 5.0, 1.1, 1.0, 0,
TRUE, 0, 0,
NULL, NULL);
gtk_signal_connect (GTK_OBJECT (scale_data), "value_changed",
GTK_SIGNAL_FUNC (gimp_int_adjustment_update),
&iwarp_vals.max_supersample_depth);
g_signal_connect (scale_data, "value_changed",
G_CALLBACK (gimp_int_adjustment_update),
&iwarp_vals.max_supersample_depth);
scale_data = gimp_scale_entry_new (GTK_TABLE (table), 0, 1,
_("Threshold:"), SCALE_WIDTH, 0,
@ -1099,9 +1099,9 @@ iwarp_settings_dialog (GtkWidget *dlg,
1.0, 10.0, 0.01, 0.1, 2,
TRUE, 0, 0,
NULL, NULL);
gtk_signal_connect (GTK_OBJECT (scale_data), "value_changed",
GTK_SIGNAL_FUNC (gimp_double_adjustment_update),
&iwarp_vals.supersample_threshold);
g_signal_connect (scale_data, "value_changed",
G_CALLBACK (gimp_double_adjustment_update),
&iwarp_vals.supersample_threshold);
gtk_widget_show (vbox);
@ -1138,9 +1138,9 @@ iwarp_dialog (void)
NULL);
gtk_signal_connect (GTK_OBJECT (dlg), "destroy",
GTK_SIGNAL_FUNC (gtk_main_quit),
NULL);
g_signal_connect (dlg, "destroy",
G_CALLBACK (gtk_main_quit),
NULL);
main_hbox = gtk_hbox_new (FALSE, 6);
gtk_container_set_border_width (GTK_CONTAINER (main_hbox), 6);
@ -1175,9 +1175,9 @@ iwarp_dialog (void)
GDK_BUTTON_RELEASE_MASK |
GDK_BUTTON1_MOTION_MASK |
GDK_POINTER_MOTION_HINT_MASK);
gtk_signal_connect (GTK_OBJECT(preview), "event",
GTK_SIGNAL_FUNC (iwarp_motion_callback),
NULL);
g_signal_connect (preview, "event",
G_CALLBACK (iwarp_motion_callback),
NULL);
notebook = gtk_notebook_new ();
gtk_notebook_set_tab_pos (GTK_NOTEBOOK (notebook), GTK_POS_TOP);

View File

@ -895,16 +895,16 @@ snap_dialog(void)
dialog = gtk_dialog_new ();
gtk_window_set_title(GTK_WINDOW(dialog), PLUG_IN_PRINT_NAME);
gtk_window_position(GTK_WINDOW(dialog), GTK_WIN_POS_MOUSE);
gtk_signal_connect(GTK_OBJECT(dialog), "destroy",
(GtkSignalFunc) snap_close_callback,
NULL);
g_signal_connect (dialog, "destroy",
G_CALLBACK (snap_close_callback),
NULL);
/* Action area */
button = gtk_button_new_with_label(_("Grab"));
GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT);
gtk_signal_connect(GTK_OBJECT (button), "clicked",
(GtkSignalFunc) snap_grab_callback,
dialog);
g_signal_connect (button, "clicked",
G_CALLBACK (snap_grab_callback),
dialog);
gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->action_area),
button, TRUE, TRUE, 0);
gtk_widget_grab_default(button);
@ -912,9 +912,9 @@ snap_dialog(void)
button = gtk_button_new_from_stock(GTK_STOCK_CANCEL);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_signal_connect_object (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) gtk_widget_destroy,
GTK_OBJECT(dialog));
g_signal_connect_swapped (button, "clicked",
G_CALLBACK (gtk_widget_destroy),
dialog);
gtk_box_pack_start(GTK_BOX(GTK_DIALOG (dialog)->action_area),
button, TRUE, TRUE, 0);
gtk_widget_show(button);
@ -937,9 +937,9 @@ snap_dialog(void)
radio_group = gtk_radio_button_group ( GTK_RADIO_BUTTON (winsnapintf.single_button) );
gtk_box_pack_start (GTK_BOX (hbox),
winsnapintf.single_button, TRUE, TRUE, 0);
gtk_signal_connect ( GTK_OBJECT (winsnapintf.single_button), "toggled",
(GtkSignalFunc) snap_toggle_update,
&radio_pressed[0]);
g_signal_connect (winsnapintf.single_button, "toggled",
G_CALLBACK (snap_toggle_update),
&radio_pressed[0]);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (winsnapintf.single_button),
radio_pressed[0]);
gtk_widget_show (winsnapintf.single_button);
@ -955,9 +955,9 @@ snap_dialog(void)
gtk_box_pack_end (GTK_BOX (vbox), hbox, TRUE, TRUE, 0);
winsnapintf.decor_button =
gtk_check_button_new_with_label (_("Include decorations"));
gtk_signal_connect (GTK_OBJECT (winsnapintf.decor_button), "toggled",
(GtkSignalFunc) snap_toggle_update,
&decorations);
g_signal_connect (winsnapintf.decor_button, "toggled",
G_CALLBACK (snap_toggle_update),
&decorations);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (winsnapintf.decor_button),
decorations);
gtk_box_pack_end (GTK_BOX (hbox), winsnapintf.decor_button, FALSE, FALSE, 0);
@ -983,9 +983,9 @@ snap_dialog(void)
winsnapintf.root_button = gtk_radio_button_new ( radio_group );
radio_group = gtk_radio_button_group ( GTK_RADIO_BUTTON (winsnapintf.root_button) );
gtk_box_pack_start (GTK_BOX (hbox), winsnapintf.root_button, TRUE, TRUE, 0);
gtk_signal_connect ( GTK_OBJECT (winsnapintf.root_button), "toggled",
(GtkSignalFunc) snap_toggle_update,
&radio_pressed[1]);
g_signal_connect (winsnapintf.root_button, "toggled",
G_CALLBACK (snap_toggle_update),
&radio_pressed[1]);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (winsnapintf.root_button),
radio_pressed[1]);
gtk_widget_show (winsnapintf.root_button);