2003-11-14 Manish Singh <yosh@gimp.org> * libgimpwidgets/gimpwidgets.[ch]: implementedgimp_int_option_menu_new and gimp_int_radio_group_new, which are the same as gimp_option_menu_new2 and gimp_radio_group_new2, but they take integers as values to map instead of gpointers, which avoids casts in pretty much all uses of it in the tree. * app/gui/image-commands.c * app/gui/offset-dialog.c * app/widgets/gimppropwidgets.c * app/widgets/gimpwidgets-constructors.c * libgimpwidgets/gimpmemsizeentry.c * modules/cdisplay_colorblind.c * plug-ins/FractalExplorer/Dialogs.c * plug-ins/Lighting/lighting_ui.c * plug-ins/MapObject/mapobject_ui.c * plug-ins/common/AlienMap.c * plug-ins/common/AlienMap2.c * plug-ins/common/CML_explorer.c * plug-ins/common/align_layers.c * plug-ins/common/blinds.c * plug-ins/common/borderaverage.c * plug-ins/common/bumpmap.c * plug-ins/common/curve_bend.c * plug-ins/common/deinterlace.c * plug-ins/common/edge.c * plug-ins/common/emboss.c * plug-ins/common/fractaltrace.c * plug-ins/common/gif.c * plug-ins/common/hot.c * plug-ins/common/iwarp.c * plug-ins/common/jigsaw.c * plug-ins/common/jpeg.c * plug-ins/common/lic.c * plug-ins/common/mail.c * plug-ins/common/max_rgb.c * plug-ins/common/mblur.c * plug-ins/common/mng.c * plug-ins/common/mosaic.c * plug-ins/common/nlfilt.c * plug-ins/common/papertile.c * plug-ins/common/pnm.c * plug-ins/common/ps.c * plug-ins/common/psp.c * plug-ins/common/ripple.c * plug-ins/common/shift.c * plug-ins/common/sinus.c * plug-ins/common/sparkle.c * plug-ins/common/struc.c * plug-ins/common/sunras.c * plug-ins/common/tiff.c * plug-ins/common/waves.c * plug-ins/common/wind.c * plug-ins/fits/fits.c * plug-ins/flame/flame.c * plug-ins/gfig/gfig.c * plug-ins/gimpressionist/color.c * plug-ins/gimpressionist/orientmap.c * plug-ins/gimpressionist/placement.c * plug-ins/maze/maze_face.c * plug-ins/sgi/sgi.c: Use gimp_int_option_menu_new and gimp_int_radio_group_new. * plug-ins/common/CML_explorer.c: make function_graph_new take a gpointer *data instead of a gpointer data, and properly pass an int through it. * plug-ins/common/mng.c: mark menu strings for translation. * plug-ins/rcm/rcm.c: remove initialization for Success member in RcmParams, since it's gone now.
110 lines
4.4 KiB
C
110 lines
4.4 KiB
C
/* The GIMP -- an image manipulation program
|
|
* Copyright (C) 1995-1999 Spencer Kimball and Peter Mattis
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program; if not, write to the Free Software
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
*/
|
|
|
|
#include "config.h"
|
|
|
|
#include <gtk/gtk.h>
|
|
|
|
#include "libgimpwidgets/gimpwidgets.h"
|
|
|
|
#include "widgets-types.h"
|
|
|
|
#include "gimpwidgets-constructors.h"
|
|
|
|
#include "gimp-intl.h"
|
|
|
|
|
|
GtkWidget *
|
|
gimp_paint_mode_menu_new (GtkSignalFunc callback,
|
|
gpointer data,
|
|
gboolean with_behind_mode,
|
|
GimpLayerModeEffects initial)
|
|
{
|
|
GtkWidget *menu;
|
|
|
|
if (with_behind_mode)
|
|
{
|
|
menu = gimp_int_option_menu_new
|
|
(FALSE, callback, data, initial,
|
|
|
|
_("Normal"), GIMP_NORMAL_MODE, NULL,
|
|
_("Dissolve"), GIMP_DISSOLVE_MODE, NULL,
|
|
_("Behind"), GIMP_BEHIND_MODE, NULL,
|
|
_("Color Erase"), GIMP_COLOR_ERASE_MODE, NULL,
|
|
"---", 0, NULL,
|
|
_("Multiply"), GIMP_MULTIPLY_MODE, NULL,
|
|
_("Divide"), GIMP_DIVIDE_MODE, NULL,
|
|
_("Screen"), GIMP_SCREEN_MODE, NULL,
|
|
_("Overlay"), GIMP_OVERLAY_MODE, NULL,
|
|
"---", 0, NULL,
|
|
_("Dodge"), GIMP_DODGE_MODE, NULL,
|
|
_("Burn"), GIMP_BURN_MODE, NULL,
|
|
_("Hard Light"), GIMP_HARDLIGHT_MODE, NULL,
|
|
_("Soft Light"), GIMP_SOFTLIGHT_MODE, NULL,
|
|
_("Grain Extract"), GIMP_GRAIN_EXTRACT_MODE, NULL,
|
|
_("Grain Merge"), GIMP_GRAIN_MERGE_MODE, NULL,
|
|
"---", 0, NULL,
|
|
_("Difference"), GIMP_DIFFERENCE_MODE, NULL,
|
|
_("Addition"), GIMP_ADDITION_MODE, NULL,
|
|
_("Subtract"), GIMP_SUBTRACT_MODE, NULL,
|
|
_("Darken Only"), GIMP_DARKEN_ONLY_MODE, NULL,
|
|
_("Lighten Only"), GIMP_LIGHTEN_ONLY_MODE, NULL,
|
|
"---", 0, NULL,
|
|
_("Hue"), GIMP_HUE_MODE, NULL,
|
|
_("Saturation"), GIMP_SATURATION_MODE, NULL,
|
|
_("Color"), GIMP_COLOR_MODE, NULL,
|
|
_("Value"), GIMP_VALUE_MODE, NULL,
|
|
|
|
NULL);
|
|
}
|
|
else
|
|
{
|
|
menu = gimp_int_option_menu_new
|
|
(FALSE, callback, data, initial,
|
|
|
|
_("Normal"), GIMP_NORMAL_MODE, NULL,
|
|
_("Dissolve"), GIMP_DISSOLVE_MODE, NULL,
|
|
"---", 0, NULL,
|
|
_("Multiply"), GIMP_MULTIPLY_MODE, NULL,
|
|
_("Divide"), GIMP_DIVIDE_MODE, NULL,
|
|
_("Screen"), GIMP_SCREEN_MODE, NULL,
|
|
_("Overlay"), GIMP_OVERLAY_MODE, NULL,
|
|
"---", 0, NULL,
|
|
_("Dodge"), GIMP_DODGE_MODE, NULL,
|
|
_("Burn"), GIMP_BURN_MODE, NULL,
|
|
_("Hard Light"), GIMP_HARDLIGHT_MODE, NULL,
|
|
_("Soft Light"), GIMP_SOFTLIGHT_MODE, NULL,
|
|
_("Grain Extract"), GIMP_GRAIN_EXTRACT_MODE, NULL,
|
|
_("Grain Merge"), GIMP_GRAIN_MERGE_MODE, NULL,
|
|
"---", 0, NULL,
|
|
_("Difference"), GIMP_DIFFERENCE_MODE, NULL,
|
|
_("Addition"), GIMP_ADDITION_MODE, NULL,
|
|
_("Subtract"), GIMP_SUBTRACT_MODE, NULL,
|
|
_("Darken Only"), GIMP_DARKEN_ONLY_MODE, NULL,
|
|
_("Lighten Only"), GIMP_LIGHTEN_ONLY_MODE, NULL,
|
|
"---", 0, NULL,
|
|
_("Hue"), GIMP_HUE_MODE, NULL,
|
|
_("Saturation"), GIMP_SATURATION_MODE, NULL,
|
|
_("Color"), GIMP_COLOR_MODE, NULL,
|
|
_("Value"), GIMP_VALUE_MODE, NULL,
|
|
|
|
NULL);
|
|
}
|
|
|
|
return menu;
|
|
}
|