mirror of
https://gitlab.gnome.org/GNOME/gimp.git
synced 2025-07-03 17:33:25 +00:00
plug-ins/FractalExplorer/Dialogs.c plug-ins/Lighting/lighting_ui.c
2001-07-29 Sven Neumann <sven@gimp.org> * plug-ins/FractalExplorer/Dialogs.c * plug-ins/Lighting/lighting_ui.c * plug-ins/MapObject/mapobject_ui.c * plug-ins/fits/fits.c * plug-ins/flame/flame.c * plug-ins/ifscompose/ifscompose.c * plug-ins/maze/maze_face.c * plug-ins/mosaic/mosaic.c * plug-ins/rcm/rcm_dialog.c * plug-ins/sgi/sgi.c: removed compiler warnings by adding G_CALLBACK() casts and const declarations.
This commit is contained in:
parent
c1d4e892a4
commit
8ee2ebd0de
12 changed files with 76 additions and 55 deletions
14
ChangeLog
14
ChangeLog
|
@ -1,3 +1,17 @@
|
|||
2001-07-29 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* plug-ins/FractalExplorer/Dialogs.c
|
||||
* plug-ins/Lighting/lighting_ui.c
|
||||
* plug-ins/MapObject/mapobject_ui.c
|
||||
* plug-ins/fits/fits.c
|
||||
* plug-ins/flame/flame.c
|
||||
* plug-ins/ifscompose/ifscompose.c
|
||||
* plug-ins/maze/maze_face.c
|
||||
* plug-ins/mosaic/mosaic.c
|
||||
* plug-ins/rcm/rcm_dialog.c
|
||||
* plug-ins/sgi/sgi.c: removed compiler warnings by adding G_CALLBACK()
|
||||
casts and const declarations.
|
||||
|
||||
2001-07-29 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* plug-ins/common/AlienMap.c
|
||||
|
|
|
@ -553,7 +553,7 @@ explorer_dialog (void)
|
|||
|
||||
toggle_vbox =
|
||||
gimp_radio_group_new2 (FALSE, NULL,
|
||||
explorer_radio_update,
|
||||
G_CALLBACK (explorer_radio_update),
|
||||
&wvals.fractaltype,
|
||||
(gpointer) &wvals.fractaltype,
|
||||
|
||||
|
@ -712,7 +712,7 @@ explorer_dialog (void)
|
|||
|
||||
/* Redmode radio frame */
|
||||
frame = gimp_radio_group_new2 (TRUE, _("Red"),
|
||||
explorer_radio_update,
|
||||
G_CALLBACK (explorer_radio_update),
|
||||
&wvals.redmode, (gpointer) wvals.redmode,
|
||||
|
||||
_("Sine"), (gpointer) SINUS,
|
||||
|
@ -753,7 +753,7 @@ explorer_dialog (void)
|
|||
|
||||
/* Greenmode radio frame */
|
||||
frame = gimp_radio_group_new2 (TRUE, _("Green"),
|
||||
explorer_radio_update,
|
||||
G_CALLBACK (explorer_radio_update),
|
||||
&wvals.greenmode, (gpointer) wvals.greenmode,
|
||||
|
||||
_("Sine"), (gpointer) SINUS,
|
||||
|
@ -794,7 +794,7 @@ explorer_dialog (void)
|
|||
|
||||
/* Bluemode radio frame */
|
||||
frame = gimp_radio_group_new2 (TRUE, _("Blue"),
|
||||
explorer_radio_update,
|
||||
G_CALLBACK (explorer_radio_update),
|
||||
&wvals.bluemode, (gpointer) wvals.bluemode,
|
||||
|
||||
_("Sine"), (gpointer) SINUS,
|
||||
|
@ -1596,14 +1596,14 @@ file_selection_ok (GtkWidget *w,
|
|||
GtkFileSelection *fs,
|
||||
gpointer data)
|
||||
{
|
||||
gchar *filenamebuf;
|
||||
const gchar *filenamebuf;
|
||||
struct stat filestat;
|
||||
gint err;
|
||||
|
||||
filenamebuf = gtk_file_selection_get_filename (GTK_FILE_SELECTION(fs));
|
||||
|
||||
/* Get the name */
|
||||
if (strlen (filenamebuf) == 0)
|
||||
if (!filenamebuf || strlen (filenamebuf) == 0)
|
||||
{
|
||||
g_message (_("Save: No filename given"));
|
||||
return;
|
||||
|
|
|
@ -567,7 +567,8 @@ create_light_page (void)
|
|||
gtk_container_add (GTK_CONTAINER (frame), table);
|
||||
gtk_widget_show (table);
|
||||
|
||||
optionmenu = gimp_option_menu_new2 (FALSE, lightmenu_callback,
|
||||
optionmenu = gimp_option_menu_new2 (FALSE,
|
||||
G_CALLBACK (lightmenu_callback),
|
||||
&mapvals.lightsource.type,
|
||||
(gpointer) mapvals.lightsource.type,
|
||||
|
||||
|
@ -941,7 +942,8 @@ create_bump_page (void)
|
|||
optionmenu, 1, TRUE);
|
||||
|
||||
optionmenu =
|
||||
gimp_option_menu_new2 (FALSE, mapmenu2_callback,
|
||||
gimp_option_menu_new2 (FALSE,
|
||||
G_CALLBACK (mapmenu2_callback),
|
||||
&mapvals.bumpmaptype,
|
||||
(gpointer) mapvals.bumpmaptype,
|
||||
|
||||
|
|
|
@ -560,7 +560,8 @@ create_options_page (void)
|
|||
gtk_widget_show (label);
|
||||
|
||||
optionmenu =
|
||||
gimp_option_menu_new2 (FALSE, mapmenu_callback,
|
||||
gimp_option_menu_new2 (FALSE,
|
||||
G_CALLBACK (mapmenu_callback),
|
||||
&mapvals.maptype,
|
||||
(gpointer) mapvals.maptype,
|
||||
|
||||
|
@ -712,7 +713,8 @@ create_light_page (void)
|
|||
gtk_container_set_border_width (GTK_CONTAINER (table), 4);
|
||||
gtk_container_add (GTK_CONTAINER (frame), table); gtk_widget_show (table);
|
||||
|
||||
optionmenu = gimp_option_menu_new2 (FALSE, lightmenu_callback,
|
||||
optionmenu = gimp_option_menu_new2 (FALSE,
|
||||
G_CALLBACK (lightmenu_callback),
|
||||
&mapvals.lightsource.type,
|
||||
(gpointer) mapvals.lightsource.type,
|
||||
|
||||
|
|
|
@ -652,7 +652,7 @@ mosaic_dialog (void)
|
|||
|
||||
/* tiling primitive */
|
||||
frame = gimp_radio_group_new2 (TRUE, _("Tiling Primitives"),
|
||||
gimp_radio_button_update,
|
||||
G_CALLBACK (gimp_radio_button_update),
|
||||
&mvals.tile_type, (gpointer) mvals.tile_type,
|
||||
|
||||
_("Squares"),
|
||||
|
|
|
@ -1002,7 +1002,7 @@ load_dialog (void)
|
|||
gtk_widget_show (vbox);
|
||||
|
||||
frame = gimp_radio_group_new2 (TRUE, _("BLANK/NaN Pixel Replacement"),
|
||||
gimp_radio_button_update,
|
||||
G_CALLBACK (gimp_radio_button_update),
|
||||
&plvals.replace, (gpointer) plvals.replace,
|
||||
|
||||
_("Black"), (gpointer) 0, NULL,
|
||||
|
@ -1014,7 +1014,7 @@ load_dialog (void)
|
|||
|
||||
frame =
|
||||
gimp_radio_group_new2 (TRUE, _("Pixel Value Scaling"),
|
||||
gimp_radio_button_update,
|
||||
G_CALLBACK (gimp_radio_button_update),
|
||||
&plvals.use_datamin, (gpointer) plvals.use_datamin,
|
||||
|
||||
_("Automatic"), (gpointer) FALSE, NULL,
|
||||
|
@ -1026,7 +1026,7 @@ load_dialog (void)
|
|||
|
||||
frame =
|
||||
gimp_radio_group_new2 (TRUE, _("Image Composing"),
|
||||
gimp_radio_button_update,
|
||||
G_CALLBACK (gimp_radio_button_update),
|
||||
&plvals.compose, (gpointer) plvals.compose,
|
||||
|
||||
_("None"), (gpointer) FALSE, NULL,
|
||||
|
|
|
@ -402,7 +402,7 @@ file_ok_callback (GtkWidget *widget,
|
|||
gpointer data)
|
||||
{
|
||||
GtkFileSelection *fs;
|
||||
gchar *filename;
|
||||
const gchar *filename;
|
||||
struct stat filestat;
|
||||
|
||||
fs = GTK_FILE_SELECTION (data);
|
||||
|
@ -715,7 +715,7 @@ edit_callback (GtkWidget *widget,
|
|||
gtk_widget_show (button);
|
||||
|
||||
optionmenu =
|
||||
gimp_option_menu_new2 (FALSE, menu_cb,
|
||||
gimp_option_menu_new2 (FALSE, G_CALLBACK (menu_cb),
|
||||
&config.variation,
|
||||
(gpointer) VARIATION_SAME,
|
||||
|
||||
|
@ -1137,7 +1137,7 @@ dialog (void)
|
|||
gtk_signal_connect (GTK_OBJECT (menuitem), "activate",
|
||||
GTK_SIGNAL_FUNC (gradient_cb),
|
||||
(gpointer) d);
|
||||
gtk_menu_prepend (GTK_MENU (menu), menuitem);
|
||||
gtk_menu_shell_prepend (GTK_MENU_SHELL (menu), menuitem);
|
||||
if (d == save_drawable)
|
||||
gtk_menu_set_active (GTK_MENU (menu), 0);
|
||||
gtk_widget_show (menuitem);
|
||||
|
@ -1148,7 +1148,7 @@ dialog (void)
|
|||
gtk_signal_connect (GTK_OBJECT (menuitem), "activate",
|
||||
GTK_SIGNAL_FUNC (gradient_cb),
|
||||
(gpointer) GRADIENT_DRAWABLE);
|
||||
gtk_menu_prepend (GTK_MENU (menu), menuitem);
|
||||
gtk_menu_shell_prepend (GTK_MENU_SHELL (menu), menuitem);
|
||||
if (GRADIENT_DRAWABLE == save_drawable)
|
||||
gtk_menu_set_active (GTK_MENU (menu), 0);
|
||||
gtk_widget_show (menuitem);
|
||||
|
|
|
@ -1124,7 +1124,7 @@ design_op_menu_create (GtkWidget *window)
|
|||
gtk_window_add_accel_group(GTK_WINDOW(window),accel_group);
|
||||
|
||||
menu_item = gtk_menu_item_new_with_label(_("Move"));
|
||||
gtk_menu_append(GTK_MENU(ifsDesign->op_menu),menu_item);
|
||||
gtk_menu_shell_append (GTK_MENU_SHELL (ifsDesign->op_menu), menu_item);
|
||||
gtk_widget_show(menu_item);
|
||||
gtk_signal_connect(GTK_OBJECT(menu_item),"activate",
|
||||
(GtkSignalFunc)design_op_update_callback,
|
||||
|
@ -1136,7 +1136,7 @@ design_op_menu_create (GtkWidget *window)
|
|||
GTK_ACCEL_VISIBLE | GTK_ACCEL_LOCKED);
|
||||
|
||||
menu_item = gtk_menu_item_new_with_label(_("Rotate/Scale"));
|
||||
gtk_menu_append(GTK_MENU(ifsDesign->op_menu),menu_item);
|
||||
gtk_menu_shell_append (GTK_MENU_SHELL (ifsDesign->op_menu), menu_item);
|
||||
gtk_widget_show(menu_item);
|
||||
gtk_signal_connect(GTK_OBJECT(menu_item),"activate",
|
||||
(GtkSignalFunc)design_op_update_callback,
|
||||
|
@ -1148,7 +1148,7 @@ design_op_menu_create (GtkWidget *window)
|
|||
GTK_ACCEL_VISIBLE | GTK_ACCEL_LOCKED);
|
||||
|
||||
menu_item = gtk_menu_item_new_with_label(_("Stretch"));
|
||||
gtk_menu_append(GTK_MENU(ifsDesign->op_menu),menu_item);
|
||||
gtk_menu_shell_append (GTK_MENU_SHELL (ifsDesign->op_menu), menu_item);
|
||||
gtk_widget_show(menu_item);
|
||||
gtk_signal_connect(GTK_OBJECT(menu_item),"activate",
|
||||
(GtkSignalFunc)design_op_update_callback,
|
||||
|
@ -1161,11 +1161,11 @@ design_op_menu_create (GtkWidget *window)
|
|||
|
||||
/* A separator */
|
||||
menu_item = gtk_menu_item_new();
|
||||
gtk_menu_append(GTK_MENU(ifsDesign->op_menu),menu_item);
|
||||
gtk_menu_shell_append (GTK_MENU_SHELL (ifsDesign->op_menu), menu_item);
|
||||
gtk_widget_show(menu_item);
|
||||
|
||||
menu_item = gtk_menu_item_new_with_label(_("Select All"));
|
||||
gtk_menu_append(GTK_MENU(ifsDesign->op_menu),menu_item);
|
||||
gtk_menu_shell_append (GTK_MENU_SHELL (ifsDesign->op_menu), menu_item);
|
||||
gtk_widget_show(menu_item);
|
||||
gtk_signal_connect(GTK_OBJECT(menu_item),"activate",
|
||||
(GtkSignalFunc)design_area_select_all_callback,
|
||||
|
@ -1177,7 +1177,7 @@ design_op_menu_create (GtkWidget *window)
|
|||
GTK_ACCEL_VISIBLE | GTK_ACCEL_LOCKED);
|
||||
|
||||
menu_item = gtk_menu_item_new_with_label(_("Recompute Center"));
|
||||
gtk_menu_append(GTK_MENU(ifsDesign->op_menu),menu_item);
|
||||
gtk_menu_shell_append (GTK_MENU_SHELL (ifsDesign->op_menu), menu_item);
|
||||
gtk_widget_show(menu_item);
|
||||
gtk_signal_connect(GTK_OBJECT(menu_item),"activate",
|
||||
(GtkSignalFunc)recompute_center_cb,
|
||||
|
@ -1189,7 +1189,7 @@ design_op_menu_create (GtkWidget *window)
|
|||
GTK_ACCEL_VISIBLE | GTK_ACCEL_LOCKED);
|
||||
|
||||
menu_item = gtk_menu_item_new_with_label(_("Undo"));
|
||||
gtk_menu_append(GTK_MENU(ifsDesign->op_menu),menu_item);
|
||||
gtk_menu_shell_append (GTK_MENU_SHELL (ifsDesign->op_menu), menu_item);
|
||||
gtk_widget_show(menu_item);
|
||||
gtk_signal_connect(GTK_OBJECT(menu_item),"activate",
|
||||
(GtkSignalFunc)undo,
|
||||
|
@ -1201,7 +1201,7 @@ design_op_menu_create (GtkWidget *window)
|
|||
GTK_ACCEL_VISIBLE | GTK_ACCEL_LOCKED);
|
||||
|
||||
menu_item = gtk_menu_item_new_with_label(_("Redo"));
|
||||
gtk_menu_append(GTK_MENU(ifsDesign->op_menu),menu_item);
|
||||
gtk_menu_shell_append (GTK_MENU_SHELL (ifsDesign->op_menu), menu_item);
|
||||
gtk_widget_show(menu_item);
|
||||
gtk_signal_connect(GTK_OBJECT(menu_item),"activate",
|
||||
(GtkSignalFunc)redo,
|
||||
|
|
|
@ -420,9 +420,9 @@ static void
|
|||
div_button_callback (GtkWidget *button,
|
||||
GtkWidget *entry)
|
||||
{
|
||||
guint max, divs;
|
||||
gchar *text;
|
||||
gint direction;
|
||||
const gchar *text;
|
||||
guint max, divs;
|
||||
gint direction;
|
||||
|
||||
direction = GPOINTER_TO_INT (gtk_object_get_data (GTK_OBJECT (button), "direction"));
|
||||
max = *((guint*) gtk_object_get_data (GTK_OBJECT (entry), "max"));
|
||||
|
|
|
@ -652,7 +652,7 @@ mosaic_dialog (void)
|
|||
|
||||
/* tiling primitive */
|
||||
frame = gimp_radio_group_new2 (TRUE, _("Tiling Primitives"),
|
||||
gimp_radio_button_update,
|
||||
G_CALLBACK (gimp_radio_button_update),
|
||||
&mvals.tile_type, (gpointer) mvals.tile_type,
|
||||
|
||||
_("Squares"),
|
||||
|
|
|
@ -80,11 +80,11 @@
|
|||
/* Previews: create one preview */
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
void
|
||||
static void
|
||||
rcm_create_one_preview (GtkWidget **preview,
|
||||
GtkWidget **frame,
|
||||
int previewWidth,
|
||||
int previewHeight)
|
||||
gint previewWidth,
|
||||
gint previewHeight)
|
||||
{
|
||||
*frame = gtk_frame_new(NULL);
|
||||
gtk_frame_set_shadow_type(GTK_FRAME(*frame), GTK_SHADOW_IN);
|
||||
|
@ -102,7 +102,7 @@ rcm_create_one_preview (GtkWidget **preview,
|
|||
/* Previews */
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
GtkWidget*
|
||||
static GtkWidget*
|
||||
rcm_create_previews (void)
|
||||
{
|
||||
GtkWidget *frame, *blabel, *alabel, *bframe, *aframe, *table;
|
||||
|
@ -153,15 +153,15 @@ rcm_create_previews (void)
|
|||
/* Main: Create one pixmap button */
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
void
|
||||
rcm_create_pixmap_button (GtkWidget **label,
|
||||
GtkWidget **xpm_button,
|
||||
GtkWidget **label_box,
|
||||
GtkSignalFunc callback,
|
||||
gpointer data,
|
||||
gchar *text,
|
||||
GtkWidget *parent,
|
||||
gint pos)
|
||||
static void
|
||||
rcm_create_pixmap_button (GtkWidget **label,
|
||||
GtkWidget **xpm_button,
|
||||
GtkWidget **label_box,
|
||||
GCallback callback,
|
||||
gpointer data,
|
||||
const gchar *text,
|
||||
GtkWidget *parent,
|
||||
gint pos)
|
||||
{
|
||||
/* create button */
|
||||
*xpm_button = gtk_button_new();
|
||||
|
@ -190,7 +190,7 @@ rcm_create_pixmap_button (GtkWidget **label,
|
|||
/* Set buttons pixmaps */
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
void
|
||||
static void
|
||||
rcm_set_pixmaps (RcmCircle *circle)
|
||||
{
|
||||
rcm_set_pixmap(&circle->cw_ccw_pixmap, circle->cw_ccw_button->parent, circle->cw_ccw_box, rcm_cw_xpm);
|
||||
|
@ -202,7 +202,7 @@ rcm_set_pixmaps (RcmCircle *circle)
|
|||
/* Main: One circles with values and buttons */
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
RcmCircle*
|
||||
static RcmCircle*
|
||||
rcm_create_one_circle (gint height,
|
||||
gchar *label_content)
|
||||
{
|
||||
|
@ -260,7 +260,8 @@ rcm_create_one_circle (gint height,
|
|||
gtk_widget_show(button_table);
|
||||
|
||||
/** Main: Circle: Buttons **/
|
||||
rcm_create_pixmap_button(&label, &xpm_button, &label_box, rcm_cw_ccw, st,
|
||||
rcm_create_pixmap_button(&label, &xpm_button, &label_box,
|
||||
G_CALLBACK (rcm_cw_ccw), st,
|
||||
(st->angle->cw_ccw>0) ?
|
||||
_("Switch to clockwise") : _("Switch to c/clockwise"),
|
||||
button_table, 0);
|
||||
|
@ -269,13 +270,15 @@ rcm_create_one_circle (gint height,
|
|||
st->cw_ccw_box = label_box;
|
||||
st->cw_ccw_label = label;
|
||||
|
||||
rcm_create_pixmap_button(&label, &xpm_button, &label_box, rcm_a_to_b, st,
|
||||
rcm_create_pixmap_button(&label, &xpm_button, &label_box,
|
||||
G_CALLBACK (rcm_a_to_b), st,
|
||||
_("Change order of arrows"), button_table, 1);
|
||||
st->a_b_pixmap = NULL;
|
||||
st->a_b_box = label_box;
|
||||
st->a_b_button = xpm_button;
|
||||
|
||||
rcm_create_pixmap_button(&label, &xpm_button, &label_box, rcm_360_degrees, st,
|
||||
rcm_create_pixmap_button(&label, &xpm_button, &label_box,
|
||||
G_CALLBACK (rcm_360_degrees), st,
|
||||
_("Select all"), button_table, 2);
|
||||
st->f360_pixmap = NULL;
|
||||
st->f360_box = label_box;
|
||||
|
@ -352,7 +355,7 @@ rcm_create_one_circle (gint height,
|
|||
/* Main */
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
GtkWidget*
|
||||
static GtkWidget*
|
||||
rcm_create_main (void)
|
||||
{
|
||||
GtkWidget *vbox;
|
||||
|
@ -376,7 +379,7 @@ rcm_create_main (void)
|
|||
/* Misc: Gray */
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
RcmGray*
|
||||
static RcmGray*
|
||||
rcm_create_gray (void)
|
||||
{
|
||||
GtkWidget *frame, *preview, *as_or_to_frame;
|
||||
|
@ -574,7 +577,7 @@ rcm_create_gray (void)
|
|||
/* Misc */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
GtkWidget *
|
||||
static GtkWidget *
|
||||
rcm_create_misc (void)
|
||||
{
|
||||
GtkWidget *label, *table;
|
||||
|
@ -660,14 +663,14 @@ rcm_create_misc (void)
|
|||
|
||||
item = gtk_radio_menu_item_new_with_label (preview_group, _("Entire Image"));
|
||||
preview_group = gtk_radio_menu_item_group (GTK_RADIO_MENU_ITEM (item));
|
||||
gtk_menu_append (GTK_MENU (menu), item);
|
||||
gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
|
||||
gtk_widget_show (item);
|
||||
gtk_signal_connect (GTK_OBJECT (item), "activate",
|
||||
(GtkSignalFunc) rcm_entire_image, NULL);
|
||||
|
||||
item = gtk_radio_menu_item_new_with_label (preview_group, _("Selection"));
|
||||
preview_group = gtk_radio_menu_item_group (GTK_RADIO_MENU_ITEM (item));
|
||||
gtk_menu_append (GTK_MENU (menu), item);
|
||||
gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
|
||||
gtk_widget_show (item);
|
||||
gtk_signal_connect (GTK_OBJECT (item), "activate",
|
||||
(GtkSignalFunc) rcm_selection, NULL);
|
||||
|
@ -675,7 +678,7 @@ rcm_create_misc (void)
|
|||
item = gtk_radio_menu_item_new_with_label (preview_group, _("Context"));
|
||||
preview_group = gtk_radio_menu_item_group (GTK_RADIO_MENU_ITEM (item));
|
||||
gtk_widget_show (item);
|
||||
gtk_menu_append (GTK_MENU (menu), item);
|
||||
gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
|
||||
gtk_signal_connect (GTK_OBJECT (item), "activate",
|
||||
(GtkSignalFunc) rcm_selection_in_context, NULL);
|
||||
|
||||
|
|
|
@ -649,7 +649,7 @@ save_dialog (void)
|
|||
NULL);
|
||||
|
||||
frame = gimp_radio_group_new2 (TRUE, _("Compression Type"),
|
||||
gimp_radio_button_update,
|
||||
G_CALLBACK (gimp_radio_button_update),
|
||||
&compression, (gpointer) compression,
|
||||
|
||||
_("No Compression"),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue