gimp/app/core/core-enums.c

1307 lines
48 KiB
C
Raw Normal View History

/* Generated data (by gimp-mkenums) */
#include "config.h"
#include <glib-object.h>
#include "libgimpbase/gimpbase.h"
#include "core-enums.h"
#include "gimp-intl.h"
/* enumerations from "./core-enums.h" */
GType
gimp_container_policy_get_type (void)
{
static const GEnumValue values[] =
{
{ GIMP_CONTAINER_POLICY_STRONG, "GIMP_CONTAINER_POLICY_STRONG", "strong" },
{ GIMP_CONTAINER_POLICY_WEAK, "GIMP_CONTAINER_POLICY_WEAK", "weak" },
{ 0, NULL, NULL }
};
static const GimpEnumDesc descs[] =
{
{ GIMP_CONTAINER_POLICY_STRONG, "GIMP_CONTAINER_POLICY_STRONG", NULL },
{ GIMP_CONTAINER_POLICY_WEAK, "GIMP_CONTAINER_POLICY_WEAK", NULL },
{ 0, NULL, NULL }
};
static GType type = 0;
if (G_UNLIKELY (! type))
{
type = g_enum_register_static ("GimpContainerPolicy", values);
gimp_type_set_translation_context (type, "container-policy");
gimp_enum_set_value_descriptions (type, descs);
}
return type;
}
GType
gimp_convert_dither_type_get_type (void)
{
static const GEnumValue values[] =
{
{ GIMP_NO_DITHER, "GIMP_NO_DITHER", "no-dither" },
{ GIMP_FS_DITHER, "GIMP_FS_DITHER", "fs-dither" },
{ GIMP_FSLOWBLEED_DITHER, "GIMP_FSLOWBLEED_DITHER", "fslowbleed-dither" },
{ GIMP_FIXED_DITHER, "GIMP_FIXED_DITHER", "fixed-dither" },
{ 0, NULL, NULL }
};
static const GimpEnumDesc descs[] =
{
{ GIMP_NO_DITHER, NC_("convert-dither-type", "None"), NULL },
{ GIMP_FS_DITHER, NC_("convert-dither-type", "Floyd-Steinberg (normal)"), NULL },
{ GIMP_FSLOWBLEED_DITHER, NC_("convert-dither-type", "Floyd-Steinberg (reduced color bleeding)"), NULL },
{ GIMP_FIXED_DITHER, NC_("convert-dither-type", "Positioned"), NULL },
{ 0, NULL, NULL }
};
static GType type = 0;
if (G_UNLIKELY (! type))
{
type = g_enum_register_static ("GimpConvertDitherType", values);
gimp_type_set_translation_context (type, "convert-dither-type");
gimp_enum_set_value_descriptions (type, descs);
}
return type;
}
GType
gimp_convert_palette_type_get_type (void)
{
static const GEnumValue values[] =
{
{ GIMP_MAKE_PALETTE, "GIMP_MAKE_PALETTE", "make-palette" },
{ GIMP_WEB_PALETTE, "GIMP_WEB_PALETTE", "web-palette" },
{ GIMP_MONO_PALETTE, "GIMP_MONO_PALETTE", "mono-palette" },
{ GIMP_CUSTOM_PALETTE, "GIMP_CUSTOM_PALETTE", "custom-palette" },
{ 0, NULL, NULL }
};
static const GimpEnumDesc descs[] =
{
{ GIMP_MAKE_PALETTE, NC_("convert-palette-type", "Generate optimum palette"), NULL },
{ GIMP_WEB_PALETTE, NC_("convert-palette-type", "Use web-optimized palette"), NULL },
{ GIMP_MONO_PALETTE, NC_("convert-palette-type", "Use black and white (1-bit) palette"), NULL },
{ GIMP_CUSTOM_PALETTE, NC_("convert-palette-type", "Use custom palette"), NULL },
{ 0, NULL, NULL }
};
static GType type = 0;
if (G_UNLIKELY (! type))
{
type = g_enum_register_static ("GimpConvertPaletteType", values);
gimp_type_set_translation_context (type, "convert-palette-type");
gimp_enum_set_value_descriptions (type, descs);
}
return type;
}
GType
gimp_gravity_type_get_type (void)
{
static const GEnumValue values[] =
{
{ GIMP_GRAVITY_NONE, "GIMP_GRAVITY_NONE", "none" },
{ GIMP_GRAVITY_NORTH_WEST, "GIMP_GRAVITY_NORTH_WEST", "north-west" },
{ GIMP_GRAVITY_NORTH, "GIMP_GRAVITY_NORTH", "north" },
{ GIMP_GRAVITY_NORTH_EAST, "GIMP_GRAVITY_NORTH_EAST", "north-east" },
{ GIMP_GRAVITY_WEST, "GIMP_GRAVITY_WEST", "west" },
{ GIMP_GRAVITY_CENTER, "GIMP_GRAVITY_CENTER", "center" },
{ GIMP_GRAVITY_EAST, "GIMP_GRAVITY_EAST", "east" },
{ GIMP_GRAVITY_SOUTH_WEST, "GIMP_GRAVITY_SOUTH_WEST", "south-west" },
{ GIMP_GRAVITY_SOUTH, "GIMP_GRAVITY_SOUTH", "south" },
{ GIMP_GRAVITY_SOUTH_EAST, "GIMP_GRAVITY_SOUTH_EAST", "south-east" },
{ 0, NULL, NULL }
};
static const GimpEnumDesc descs[] =
{
{ GIMP_GRAVITY_NONE, "GIMP_GRAVITY_NONE", NULL },
{ GIMP_GRAVITY_NORTH_WEST, "GIMP_GRAVITY_NORTH_WEST", NULL },
{ GIMP_GRAVITY_NORTH, "GIMP_GRAVITY_NORTH", NULL },
{ GIMP_GRAVITY_NORTH_EAST, "GIMP_GRAVITY_NORTH_EAST", NULL },
{ GIMP_GRAVITY_WEST, "GIMP_GRAVITY_WEST", NULL },
{ GIMP_GRAVITY_CENTER, "GIMP_GRAVITY_CENTER", NULL },
{ GIMP_GRAVITY_EAST, "GIMP_GRAVITY_EAST", NULL },
{ GIMP_GRAVITY_SOUTH_WEST, "GIMP_GRAVITY_SOUTH_WEST", NULL },
{ GIMP_GRAVITY_SOUTH, "GIMP_GRAVITY_SOUTH", NULL },
{ GIMP_GRAVITY_SOUTH_EAST, "GIMP_GRAVITY_SOUTH_EAST", NULL },
{ 0, NULL, NULL }
};
static GType type = 0;
if (G_UNLIKELY (! type))
{
type = g_enum_register_static ("GimpGravityType", values);
gimp_type_set_translation_context (type, "gravity-type");
gimp_enum_set_value_descriptions (type, descs);
}
return type;
}
GType
gimp_alignment_type_get_type (void)
{
static const GEnumValue values[] =
{
{ GIMP_ALIGN_LEFT, "GIMP_ALIGN_LEFT", "align-left" },
{ GIMP_ALIGN_HCENTER, "GIMP_ALIGN_HCENTER", "align-hcenter" },
{ GIMP_ALIGN_RIGHT, "GIMP_ALIGN_RIGHT", "align-right" },
{ GIMP_ALIGN_TOP, "GIMP_ALIGN_TOP", "align-top" },
{ GIMP_ALIGN_VCENTER, "GIMP_ALIGN_VCENTER", "align-vcenter" },
{ GIMP_ALIGN_BOTTOM, "GIMP_ALIGN_BOTTOM", "align-bottom" },
{ GIMP_ARRANGE_LEFT, "GIMP_ARRANGE_LEFT", "arrange-left" },
{ GIMP_ARRANGE_HCENTER, "GIMP_ARRANGE_HCENTER", "arrange-hcenter" },
{ GIMP_ARRANGE_RIGHT, "GIMP_ARRANGE_RIGHT", "arrange-right" },
{ GIMP_ARRANGE_TOP, "GIMP_ARRANGE_TOP", "arrange-top" },
{ GIMP_ARRANGE_VCENTER, "GIMP_ARRANGE_VCENTER", "arrange-vcenter" },
{ GIMP_ARRANGE_BOTTOM, "GIMP_ARRANGE_BOTTOM", "arrange-bottom" },
{ 0, NULL, NULL }
};
static const GimpEnumDesc descs[] =
{
{ GIMP_ALIGN_LEFT, "GIMP_ALIGN_LEFT", NULL },
{ GIMP_ALIGN_HCENTER, "GIMP_ALIGN_HCENTER", NULL },
{ GIMP_ALIGN_RIGHT, "GIMP_ALIGN_RIGHT", NULL },
{ GIMP_ALIGN_TOP, "GIMP_ALIGN_TOP", NULL },
{ GIMP_ALIGN_VCENTER, "GIMP_ALIGN_VCENTER", NULL },
{ GIMP_ALIGN_BOTTOM, "GIMP_ALIGN_BOTTOM", NULL },
{ GIMP_ARRANGE_LEFT, "GIMP_ARRANGE_LEFT", NULL },
{ GIMP_ARRANGE_HCENTER, "GIMP_ARRANGE_HCENTER", NULL },
{ GIMP_ARRANGE_RIGHT, "GIMP_ARRANGE_RIGHT", NULL },
{ GIMP_ARRANGE_TOP, "GIMP_ARRANGE_TOP", NULL },
{ GIMP_ARRANGE_VCENTER, "GIMP_ARRANGE_VCENTER", NULL },
{ GIMP_ARRANGE_BOTTOM, "GIMP_ARRANGE_BOTTOM", NULL },
{ 0, NULL, NULL }
};
static GType type = 0;
if (G_UNLIKELY (! type))
{
type = g_enum_register_static ("GimpAlignmentType", values);
gimp_type_set_translation_context (type, "alignment-type");
gimp_enum_set_value_descriptions (type, descs);
}
return type;
}
GType
gimp_align_reference_type_get_type (void)
{
static const GEnumValue values[] =
{
{ GIMP_ALIGN_REFERENCE_FIRST, "GIMP_ALIGN_REFERENCE_FIRST", "first" },
{ GIMP_ALIGN_REFERENCE_IMAGE, "GIMP_ALIGN_REFERENCE_IMAGE", "image" },
{ GIMP_ALIGN_REFERENCE_SELECTION, "GIMP_ALIGN_REFERENCE_SELECTION", "selection" },
{ GIMP_ALIGN_REFERENCE_ACTIVE_LAYER, "GIMP_ALIGN_REFERENCE_ACTIVE_LAYER", "active-layer" },
{ GIMP_ALIGN_REFERENCE_ACTIVE_CHANNEL, "GIMP_ALIGN_REFERENCE_ACTIVE_CHANNEL", "active-channel" },
{ GIMP_ALIGN_REFERENCE_ACTIVE_PATH, "GIMP_ALIGN_REFERENCE_ACTIVE_PATH", "active-path" },
{ 0, NULL, NULL }
};
static const GimpEnumDesc descs[] =
{
{ GIMP_ALIGN_REFERENCE_FIRST, NC_("align-reference-type", "First item"), NULL },
{ GIMP_ALIGN_REFERENCE_IMAGE, NC_("align-reference-type", "Image"), NULL },
{ GIMP_ALIGN_REFERENCE_SELECTION, NC_("align-reference-type", "Selection"), NULL },
{ GIMP_ALIGN_REFERENCE_ACTIVE_LAYER, NC_("align-reference-type", "Active layer"), NULL },
{ GIMP_ALIGN_REFERENCE_ACTIVE_CHANNEL, NC_("align-reference-type", "Active channel"), NULL },
{ GIMP_ALIGN_REFERENCE_ACTIVE_PATH, NC_("align-reference-type", "Active path"), NULL },
{ 0, NULL, NULL }
};
static GType type = 0;
if (G_UNLIKELY (! type))
{
type = g_enum_register_static ("GimpAlignReferenceType", values);
gimp_type_set_translation_context (type, "align-reference-type");
gimp_enum_set_value_descriptions (type, descs);
}
return type;
}
GType
gimp_fill_type_get_type (void)
{
static const GEnumValue values[] =
{
{ GIMP_FOREGROUND_FILL, "GIMP_FOREGROUND_FILL", "foreground-fill" },
{ GIMP_BACKGROUND_FILL, "GIMP_BACKGROUND_FILL", "background-fill" },
{ GIMP_WHITE_FILL, "GIMP_WHITE_FILL", "white-fill" },
{ GIMP_TRANSPARENT_FILL, "GIMP_TRANSPARENT_FILL", "transparent-fill" },
{ GIMP_PATTERN_FILL, "GIMP_PATTERN_FILL", "pattern-fill" },
{ GIMP_NO_FILL, "GIMP_NO_FILL", "no-fill" },
{ 0, NULL, NULL }
};
static const GimpEnumDesc descs[] =
{
{ GIMP_FOREGROUND_FILL, NC_("fill-type", "Foreground color"), NULL },
{ GIMP_BACKGROUND_FILL, NC_("fill-type", "Background color"), NULL },
{ GIMP_WHITE_FILL, NC_("fill-type", "White"), NULL },
{ GIMP_TRANSPARENT_FILL, NC_("fill-type", "Transparency"), NULL },
{ GIMP_PATTERN_FILL, NC_("fill-type", "Pattern"), NULL },
{ GIMP_NO_FILL, NC_("fill-type", "None"), NULL },
{ 0, NULL, NULL }
};
static GType type = 0;
if (G_UNLIKELY (! type))
{
type = g_enum_register_static ("GimpFillType", values);
gimp_type_set_translation_context (type, "fill-type");
gimp_enum_set_value_descriptions (type, descs);
}
return type;
}
GType
gimp_fill_style_get_type (void)
{
static const GEnumValue values[] =
{
{ GIMP_FILL_STYLE_SOLID, "GIMP_FILL_STYLE_SOLID", "solid" },
{ GIMP_FILL_STYLE_PATTERN, "GIMP_FILL_STYLE_PATTERN", "pattern" },
{ 0, NULL, NULL }
};
static const GimpEnumDesc descs[] =
{
{ GIMP_FILL_STYLE_SOLID, NC_("fill-style", "Solid color"), NULL },
{ GIMP_FILL_STYLE_PATTERN, NC_("fill-style", "Pattern"), NULL },
{ 0, NULL, NULL }
};
static GType type = 0;
if (G_UNLIKELY (! type))
{
type = g_enum_register_static ("GimpFillStyle", values);
gimp_type_set_translation_context (type, "fill-style");
gimp_enum_set_value_descriptions (type, descs);
}
return type;
}
GType
gimp_stroke_method_get_type (void)
{
static const GEnumValue values[] =
{
{ GIMP_STROKE_METHOD_LIBART, "GIMP_STROKE_METHOD_LIBART", "libart" },
{ GIMP_STROKE_METHOD_PAINT_CORE, "GIMP_STROKE_METHOD_PAINT_CORE", "paint-core" },
{ 0, NULL, NULL }
};
static const GimpEnumDesc descs[] =
{
{ GIMP_STROKE_METHOD_LIBART, NC_("stroke-method", "Stroke line"), NULL },
{ GIMP_STROKE_METHOD_PAINT_CORE, NC_("stroke-method", "Stroke with a paint tool"), NULL },
{ 0, NULL, NULL }
};
static GType type = 0;
if (G_UNLIKELY (! type))
{
type = g_enum_register_static ("GimpStrokeMethod", values);
gimp_type_set_translation_context (type, "stroke-method");
gimp_enum_set_value_descriptions (type, descs);
}
return type;
}
GType
gimp_join_style_get_type (void)
{
static const GEnumValue values[] =
{
{ GIMP_JOIN_MITER, "GIMP_JOIN_MITER", "miter" },
{ GIMP_JOIN_ROUND, "GIMP_JOIN_ROUND", "round" },
{ GIMP_JOIN_BEVEL, "GIMP_JOIN_BEVEL", "bevel" },
{ 0, NULL, NULL }
};
static const GimpEnumDesc descs[] =
{
{ GIMP_JOIN_MITER, NC_("join-style", "Miter"), NULL },
{ GIMP_JOIN_ROUND, NC_("join-style", "Round"), NULL },
{ GIMP_JOIN_BEVEL, NC_("join-style", "Bevel"), NULL },
{ 0, NULL, NULL }
};
static GType type = 0;
if (G_UNLIKELY (! type))
{
type = g_enum_register_static ("GimpJoinStyle", values);
gimp_type_set_translation_context (type, "join-style");
gimp_enum_set_value_descriptions (type, descs);
}
return type;
}
GType
gimp_cap_style_get_type (void)
{
static const GEnumValue values[] =
{
{ GIMP_CAP_BUTT, "GIMP_CAP_BUTT", "butt" },
{ GIMP_CAP_ROUND, "GIMP_CAP_ROUND", "round" },
{ GIMP_CAP_SQUARE, "GIMP_CAP_SQUARE", "square" },
{ 0, NULL, NULL }
};
static const GimpEnumDesc descs[] =
{
{ GIMP_CAP_BUTT, NC_("cap-style", "Butt"), NULL },
{ GIMP_CAP_ROUND, NC_("cap-style", "Round"), NULL },
{ GIMP_CAP_SQUARE, NC_("cap-style", "Square"), NULL },
{ 0, NULL, NULL }
};
static GType type = 0;
Added a per image configurable grid. This fixes bug #65198 * app/core/Makefile.am * app/core/core-types.h: * app/core/gimpgrid.[ch]: added new class GimpGrid. * app/core/core-enums.[ch]: added new enum GimpGridType. * app/core/gimpimage-guides.[ch]: removed the gimp_image_snap_*() functions... * app/core/gimpimage-snap.[ch]: ...and added them here since they are no longer guide specific. * app/core/gimpimage-undo-push.[ch]: added gimp_image_undo_push_image_grid() * app/display/gimpdisplayshell-handlers.c: * app/core/gimpimage.[ch]: added grid member to _GimpImage. Added new signal "grid_changed", added gimp_image_grid_changed(), gimp_image_get_grid() and gimp_image_set_grid(). * app/display/gimpdisplayshell-appearance.[ch]: added gimp_display_shell_set_show_grid(), gimp_display_shell_get_show_grid(), gimp_display_shell_set_snap_to_grid() and gimp_display_shell_get_snap_to_grid(). * app/display/gimpdisplayshell-callbacks.c: added call to gimp_display_shell_draw_grid() * app/display/gimpdisplayshell.[ch]: added grid member to _GimpDisplayShellVisibility, added snap_to_grid and grid_dialog members to _GimpDisplayShell, added gimp_display_shell_draw_grid(), modified gimp_display_shell_snap_coords() to use the new gimp_image_snap_*() functions. * app/gui/image-menu.c: added grid entries to image_menu_entries[]. * app/gui/view-commands.[ch]: added view_configure_grid_cmd_callback(), view_toggle_grid_cmd_callback() and view_snap_to_grid_cmd_callback(). * app/gui/Makefile.am * app/gui/grid-dialog.[ch]: added a grid dialog.
2003-06-24 03:34:48 +08:00
if (G_UNLIKELY (! type))
{
type = g_enum_register_static ("GimpCapStyle", values);
gimp_type_set_translation_context (type, "cap-style");
gimp_enum_set_value_descriptions (type, descs);
}
Added a per image configurable grid. This fixes bug #65198 * app/core/Makefile.am * app/core/core-types.h: * app/core/gimpgrid.[ch]: added new class GimpGrid. * app/core/core-enums.[ch]: added new enum GimpGridType. * app/core/gimpimage-guides.[ch]: removed the gimp_image_snap_*() functions... * app/core/gimpimage-snap.[ch]: ...and added them here since they are no longer guide specific. * app/core/gimpimage-undo-push.[ch]: added gimp_image_undo_push_image_grid() * app/display/gimpdisplayshell-handlers.c: * app/core/gimpimage.[ch]: added grid member to _GimpImage. Added new signal "grid_changed", added gimp_image_grid_changed(), gimp_image_get_grid() and gimp_image_set_grid(). * app/display/gimpdisplayshell-appearance.[ch]: added gimp_display_shell_set_show_grid(), gimp_display_shell_get_show_grid(), gimp_display_shell_set_snap_to_grid() and gimp_display_shell_get_snap_to_grid(). * app/display/gimpdisplayshell-callbacks.c: added call to gimp_display_shell_draw_grid() * app/display/gimpdisplayshell.[ch]: added grid member to _GimpDisplayShellVisibility, added snap_to_grid and grid_dialog members to _GimpDisplayShell, added gimp_display_shell_draw_grid(), modified gimp_display_shell_snap_coords() to use the new gimp_image_snap_*() functions. * app/gui/image-menu.c: added grid entries to image_menu_entries[]. * app/gui/view-commands.[ch]: added view_configure_grid_cmd_callback(), view_toggle_grid_cmd_callback() and view_snap_to_grid_cmd_callback(). * app/gui/Makefile.am * app/gui/grid-dialog.[ch]: added a grid dialog.
2003-06-24 03:34:48 +08:00
return type;
}
GType
gimp_dash_preset_get_type (void)
{
static const GEnumValue values[] =
{
{ GIMP_DASH_CUSTOM, "GIMP_DASH_CUSTOM", "custom" },
{ GIMP_DASH_LINE, "GIMP_DASH_LINE", "line" },
{ GIMP_DASH_LONG_DASH, "GIMP_DASH_LONG_DASH", "long-dash" },
{ GIMP_DASH_MEDIUM_DASH, "GIMP_DASH_MEDIUM_DASH", "medium-dash" },
{ GIMP_DASH_SHORT_DASH, "GIMP_DASH_SHORT_DASH", "short-dash" },
{ GIMP_DASH_SPARSE_DOTS, "GIMP_DASH_SPARSE_DOTS", "sparse-dots" },
{ GIMP_DASH_NORMAL_DOTS, "GIMP_DASH_NORMAL_DOTS", "normal-dots" },
{ GIMP_DASH_DENSE_DOTS, "GIMP_DASH_DENSE_DOTS", "dense-dots" },
{ GIMP_DASH_STIPPLES, "GIMP_DASH_STIPPLES", "stipples" },
{ GIMP_DASH_DASH_DOT, "GIMP_DASH_DASH_DOT", "dash-dot" },
{ GIMP_DASH_DASH_DOT_DOT, "GIMP_DASH_DASH_DOT_DOT", "dash-dot-dot" },
{ 0, NULL, NULL }
};
static const GimpEnumDesc descs[] =
{
{ GIMP_DASH_CUSTOM, NC_("dash-preset", "Custom"), NULL },
{ GIMP_DASH_LINE, NC_("dash-preset", "Line"), NULL },
{ GIMP_DASH_LONG_DASH, NC_("dash-preset", "Long dashes"), NULL },
{ GIMP_DASH_MEDIUM_DASH, NC_("dash-preset", "Medium dashes"), NULL },
{ GIMP_DASH_SHORT_DASH, NC_("dash-preset", "Short dashes"), NULL },
{ GIMP_DASH_SPARSE_DOTS, NC_("dash-preset", "Sparse dots"), NULL },
{ GIMP_DASH_NORMAL_DOTS, NC_("dash-preset", "Normal dots"), NULL },
{ GIMP_DASH_DENSE_DOTS, NC_("dash-preset", "Dense dots"), NULL },
{ GIMP_DASH_STIPPLES, NC_("dash-preset", "Stipples"), NULL },
{ GIMP_DASH_DASH_DOT, NC_("dash-preset", "Dash, dot"), NULL },
{ GIMP_DASH_DASH_DOT_DOT, NC_("dash-preset", "Dash, dot, dot"), NULL },
{ 0, NULL, NULL }
};
static GType type = 0;
if (G_UNLIKELY (! type))
{
type = g_enum_register_static ("GimpDashPreset", values);
gimp_type_set_translation_context (type, "dash-preset");
gimp_enum_set_value_descriptions (type, descs);
}
return type;
}
GType
gimp_brush_generated_shape_get_type (void)
{
static const GEnumValue values[] =
{
{ GIMP_BRUSH_GENERATED_CIRCLE, "GIMP_BRUSH_GENERATED_CIRCLE", "circle" },
{ GIMP_BRUSH_GENERATED_SQUARE, "GIMP_BRUSH_GENERATED_SQUARE", "square" },
{ GIMP_BRUSH_GENERATED_DIAMOND, "GIMP_BRUSH_GENERATED_DIAMOND", "diamond" },
{ 0, NULL, NULL }
};
static const GimpEnumDesc descs[] =
{
{ GIMP_BRUSH_GENERATED_CIRCLE, NC_("brush-generated-shape", "Circle"), NULL },
{ GIMP_BRUSH_GENERATED_SQUARE, NC_("brush-generated-shape", "Square"), NULL },
{ GIMP_BRUSH_GENERATED_DIAMOND, NC_("brush-generated-shape", "Diamond"), NULL },
{ 0, NULL, NULL }
};
static GType type = 0;
if (G_UNLIKELY (! type))
{
type = g_enum_register_static ("GimpBrushGeneratedShape", values);
gimp_type_set_translation_context (type, "brush-generated-shape");
gimp_enum_set_value_descriptions (type, descs);
}
return type;
}
GType
gimp_orientation_type_get_type (void)
{
static const GEnumValue values[] =
{
{ GIMP_ORIENTATION_HORIZONTAL, "GIMP_ORIENTATION_HORIZONTAL", "horizontal" },
{ GIMP_ORIENTATION_VERTICAL, "GIMP_ORIENTATION_VERTICAL", "vertical" },
{ GIMP_ORIENTATION_UNKNOWN, "GIMP_ORIENTATION_UNKNOWN", "unknown" },
{ 0, NULL, NULL }
};
static const GimpEnumDesc descs[] =
{
{ GIMP_ORIENTATION_HORIZONTAL, NC_("orientation-type", "Horizontal"), NULL },
{ GIMP_ORIENTATION_VERTICAL, NC_("orientation-type", "Vertical"), NULL },
{ GIMP_ORIENTATION_UNKNOWN, NC_("orientation-type", "Unknown"), NULL },
{ 0, NULL, NULL }
};
static GType type = 0;
if (G_UNLIKELY (! type))
{
type = g_enum_register_static ("GimpOrientationType", values);
gimp_type_set_translation_context (type, "orientation-type");
gimp_enum_set_value_descriptions (type, descs);
}
return type;
}
GType
gimp_item_set_get_type (void)
{
static const GEnumValue values[] =
{
{ GIMP_ITEM_SET_NONE, "GIMP_ITEM_SET_NONE", "none" },
{ GIMP_ITEM_SET_ALL, "GIMP_ITEM_SET_ALL", "all" },
{ GIMP_ITEM_SET_IMAGE_SIZED, "GIMP_ITEM_SET_IMAGE_SIZED", "image-sized" },
{ GIMP_ITEM_SET_VISIBLE, "GIMP_ITEM_SET_VISIBLE", "visible" },
{ GIMP_ITEM_SET_LINKED, "GIMP_ITEM_SET_LINKED", "linked" },
{ 0, NULL, NULL }
};
static const GimpEnumDesc descs[] =
{
{ GIMP_ITEM_SET_NONE, NC_("item-set", "None"), NULL },
{ GIMP_ITEM_SET_ALL, NC_("item-set", "All layers"), NULL },
{ GIMP_ITEM_SET_IMAGE_SIZED, NC_("item-set", "Image-sized layers"), NULL },
{ GIMP_ITEM_SET_VISIBLE, NC_("item-set", "All visible layers"), NULL },
{ GIMP_ITEM_SET_LINKED, NC_("item-set", "All linked layers"), NULL },
{ 0, NULL, NULL }
};
static GType type = 0;
if (G_UNLIKELY (! type))
{
type = g_enum_register_static ("GimpItemSet", values);
gimp_type_set_translation_context (type, "item-set");
gimp_enum_set_value_descriptions (type, descs);
}
return type;
}
GType
gimp_rotation_type_get_type (void)
{
static const GEnumValue values[] =
{
{ GIMP_ROTATE_90, "GIMP_ROTATE_90", "90" },
{ GIMP_ROTATE_180, "GIMP_ROTATE_180", "180" },
{ GIMP_ROTATE_270, "GIMP_ROTATE_270", "270" },
{ 0, NULL, NULL }
};
static const GimpEnumDesc descs[] =
{
{ GIMP_ROTATE_90, "GIMP_ROTATE_90", NULL },
{ GIMP_ROTATE_180, "GIMP_ROTATE_180", NULL },
{ GIMP_ROTATE_270, "GIMP_ROTATE_270", NULL },
{ 0, NULL, NULL }
};
static GType type = 0;
if (G_UNLIKELY (! type))
{
type = g_enum_register_static ("GimpRotationType", values);
gimp_type_set_translation_context (type, "rotation-type");
gimp_enum_set_value_descriptions (type, descs);
}
return type;
}
GType
gimp_view_size_get_type (void)
{
static const GEnumValue values[] =
{
{ GIMP_VIEW_SIZE_TINY, "GIMP_VIEW_SIZE_TINY", "tiny" },
{ GIMP_VIEW_SIZE_EXTRA_SMALL, "GIMP_VIEW_SIZE_EXTRA_SMALL", "extra-small" },
{ GIMP_VIEW_SIZE_SMALL, "GIMP_VIEW_SIZE_SMALL", "small" },
{ GIMP_VIEW_SIZE_MEDIUM, "GIMP_VIEW_SIZE_MEDIUM", "medium" },
{ GIMP_VIEW_SIZE_LARGE, "GIMP_VIEW_SIZE_LARGE", "large" },
{ GIMP_VIEW_SIZE_EXTRA_LARGE, "GIMP_VIEW_SIZE_EXTRA_LARGE", "extra-large" },
{ GIMP_VIEW_SIZE_HUGE, "GIMP_VIEW_SIZE_HUGE", "huge" },
{ GIMP_VIEW_SIZE_ENORMOUS, "GIMP_VIEW_SIZE_ENORMOUS", "enormous" },
{ GIMP_VIEW_SIZE_GIGANTIC, "GIMP_VIEW_SIZE_GIGANTIC", "gigantic" },
{ 0, NULL, NULL }
};
static const GimpEnumDesc descs[] =
{
{ GIMP_VIEW_SIZE_TINY, NC_("view-size", "Tiny"), NULL },
{ GIMP_VIEW_SIZE_EXTRA_SMALL, NC_("view-size", "Very small"), NULL },
{ GIMP_VIEW_SIZE_SMALL, NC_("view-size", "Small"), NULL },
{ GIMP_VIEW_SIZE_MEDIUM, NC_("view-size", "Medium"), NULL },
{ GIMP_VIEW_SIZE_LARGE, NC_("view-size", "Large"), NULL },
{ GIMP_VIEW_SIZE_EXTRA_LARGE, NC_("view-size", "Very large"), NULL },
{ GIMP_VIEW_SIZE_HUGE, NC_("view-size", "Huge"), NULL },
{ GIMP_VIEW_SIZE_ENORMOUS, NC_("view-size", "Enormous"), NULL },
{ GIMP_VIEW_SIZE_GIGANTIC, NC_("view-size", "Gigantic"), NULL },
{ 0, NULL, NULL }
};
static GType type = 0;
if (G_UNLIKELY (! type))
{
type = g_enum_register_static ("GimpViewSize", values);
gimp_type_set_translation_context (type, "view-size");
gimp_enum_set_value_descriptions (type, descs);
}
return type;
}
GType
gimp_view_type_get_type (void)
{
static const GEnumValue values[] =
{
{ GIMP_VIEW_TYPE_LIST, "GIMP_VIEW_TYPE_LIST", "list" },
{ GIMP_VIEW_TYPE_GRID, "GIMP_VIEW_TYPE_GRID", "grid" },
{ 0, NULL, NULL }
};
static const GimpEnumDesc descs[] =
{
{ GIMP_VIEW_TYPE_LIST, NC_("view-type", "View as list"), NULL },
{ GIMP_VIEW_TYPE_GRID, NC_("view-type", "View as grid"), NULL },
{ 0, NULL, NULL }
};
static GType type = 0;
if (G_UNLIKELY (! type))
{
type = g_enum_register_static ("GimpViewType", values);
gimp_type_set_translation_context (type, "view-type");
gimp_enum_set_value_descriptions (type, descs);
}
return type;
}
GType
gimp_selection_control_get_type (void)
{
static const GEnumValue values[] =
{
{ GIMP_SELECTION_OFF, "GIMP_SELECTION_OFF", "off" },
{ GIMP_SELECTION_LAYER_OFF, "GIMP_SELECTION_LAYER_OFF", "layer-off" },
{ GIMP_SELECTION_LAYER_ON, "GIMP_SELECTION_LAYER_ON", "layer-on" },
{ GIMP_SELECTION_ON, "GIMP_SELECTION_ON", "on" },
{ GIMP_SELECTION_PAUSE, "GIMP_SELECTION_PAUSE", "pause" },
{ GIMP_SELECTION_RESUME, "GIMP_SELECTION_RESUME", "resume" },
{ 0, NULL, NULL }
};
static const GimpEnumDesc descs[] =
{
{ GIMP_SELECTION_OFF, "GIMP_SELECTION_OFF", NULL },
{ GIMP_SELECTION_LAYER_OFF, "GIMP_SELECTION_LAYER_OFF", NULL },
{ GIMP_SELECTION_LAYER_ON, "GIMP_SELECTION_LAYER_ON", NULL },
{ GIMP_SELECTION_ON, "GIMP_SELECTION_ON", NULL },
{ GIMP_SELECTION_PAUSE, "GIMP_SELECTION_PAUSE", NULL },
{ GIMP_SELECTION_RESUME, "GIMP_SELECTION_RESUME", NULL },
{ 0, NULL, NULL }
};
static GType type = 0;
if (G_UNLIKELY (! type))
{
type = g_enum_register_static ("GimpSelectionControl", values);
gimp_type_set_translation_context (type, "selection-control");
gimp_enum_set_value_descriptions (type, descs);
}
return type;
}
GType
gimp_thumbnail_size_get_type (void)
{
static const GEnumValue values[] =
{
{ GIMP_THUMBNAIL_SIZE_NONE, "GIMP_THUMBNAIL_SIZE_NONE", "none" },
{ GIMP_THUMBNAIL_SIZE_NORMAL, "GIMP_THUMBNAIL_SIZE_NORMAL", "normal" },
{ GIMP_THUMBNAIL_SIZE_LARGE, "GIMP_THUMBNAIL_SIZE_LARGE", "large" },
{ 0, NULL, NULL }
};
static const GimpEnumDesc descs[] =
{
{ GIMP_THUMBNAIL_SIZE_NONE, NC_("thumbnail-size", "No thumbnails"), NULL },
{ GIMP_THUMBNAIL_SIZE_NORMAL, NC_("thumbnail-size", "Normal (128x128)"), NULL },
{ GIMP_THUMBNAIL_SIZE_LARGE, NC_("thumbnail-size", "Large (256x256)"), NULL },
{ 0, NULL, NULL }
};
static GType type = 0;
if (G_UNLIKELY (! type))
{
type = g_enum_register_static ("GimpThumbnailSize", values);
gimp_type_set_translation_context (type, "thumbnail-size");
gimp_enum_set_value_descriptions (type, descs);
}
return type;
}
2003-02-13 01:11:34 +08:00
GType
gimp_undo_mode_get_type (void)
{
static const GEnumValue values[] =
{
{ GIMP_UNDO_MODE_UNDO, "GIMP_UNDO_MODE_UNDO", "undo" },
{ GIMP_UNDO_MODE_REDO, "GIMP_UNDO_MODE_REDO", "redo" },
{ 0, NULL, NULL }
};
2003-02-13 01:11:34 +08:00
static const GimpEnumDesc descs[] =
{
{ GIMP_UNDO_MODE_UNDO, "GIMP_UNDO_MODE_UNDO", NULL },
{ GIMP_UNDO_MODE_REDO, "GIMP_UNDO_MODE_REDO", NULL },
{ 0, NULL, NULL }
};
static GType type = 0;
2003-02-13 01:11:34 +08:00
if (G_UNLIKELY (! type))
{
type = g_enum_register_static ("GimpUndoMode", values);
gimp_type_set_translation_context (type, "undo-mode");
gimp_enum_set_value_descriptions (type, descs);
}
2003-02-13 01:11:34 +08:00
return type;
}
Reimplemented the undo history: 2003-02-20 Michael Natterer <mitch@gimp.org> Reimplemented the undo history: * app/Makefile.am * app/undo_history.[ch]: removed. Changes/cleanups to the undo system to enable/simplify the new undo history implementation: * app/core/core-types.h: removed enum undo_event_t. Removed the GimpImage parameter from GimpUndoPopFunc and GimpUndoFreeFunc because GimpUndo has a GimpImage pointer now (see below). * app/core/core-enums.[ch]: added enum GimpUndoEvent. Added an enum value for REDO_EXPIRED. * app/core/gimpimage.[ch]: added a GimpUndo pointer to the "undo_event" signal which needs to be passed for all events except UNDO_FREE. * app/display/gimpdisplayshell-handlers.c: changed accordingly. * app/core/gimpundo.[ch]: added a GimpImage pointer to the GimpUndo struct. Removed GimpImage parameters all over the place. Added preview stuff. The preview creation needs to be triggered explicitly using gimp_undo_create_preview() because the GimpUndo can't know when it's possible to create the preview. * app/core/gimpimage-undo-push.c * app/paint/gimppaintcore-undo.c * app/tools/gimptransformtool-undo.c: changed accordingly, cleanup. * app/core/gimpundostack.[ch]: ditto. Return the freed undo from gimp_undo_stack_free_bottom(). Removed unused container signal handlers. * app/core/gimpimage-undo.c: free the redo stack the same way old undos are freed (from bottom up). Emit "undo_event" with event == REDO_EXPIRED for each removed redo. * app/core/gimpmarshal.list: added new marshallers. New undo history implementation: * app/widgets/Makefile.am * app/widgets/widgets-types.h * app/widgets/gimpundoeditor.[ch] * app/widgets/gimpundopreview.[ch]: new widgets for the undo step previews and the history itself. * app/widgets/gimppreview-utils.c: added GimpUndoPreview to the list of possible preview types. * app/gui/dialogs-constructors.[ch] * app/gui/dialogs-menu.c * app/gui/dialogs.c * app/gui/image-menu.c * app/gui/toolbox-menu.c: removed the old and added the new undo history to the dialog factory and the various dialog menus. * app/widgets/gimpdnd.[ch]: don't warn if a GType has no corresponding DND type. Instead, return FALSE from the function that failed. * app/widgets/gimppreview.c: check the return value of gimpdnd functions. Not only add drag sources but also remove them when no longer needed. * app/widgets/gimpselectioneditor.h: removed unneeded inclusion of "gui/gui-types.h".
2003-02-20 20:47:42 +08:00
GType
gimp_undo_event_get_type (void)
{
static const GEnumValue values[] =
{
{ GIMP_UNDO_EVENT_UNDO_PUSHED, "GIMP_UNDO_EVENT_UNDO_PUSHED", "undo-pushed" },
{ GIMP_UNDO_EVENT_UNDO_EXPIRED, "GIMP_UNDO_EVENT_UNDO_EXPIRED", "undo-expired" },
{ GIMP_UNDO_EVENT_REDO_EXPIRED, "GIMP_UNDO_EVENT_REDO_EXPIRED", "redo-expired" },
{ GIMP_UNDO_EVENT_UNDO, "GIMP_UNDO_EVENT_UNDO", "undo" },
{ GIMP_UNDO_EVENT_REDO, "GIMP_UNDO_EVENT_REDO", "redo" },
{ GIMP_UNDO_EVENT_UNDO_FREE, "GIMP_UNDO_EVENT_UNDO_FREE", "undo-free" },
{ GIMP_UNDO_EVENT_UNDO_FREEZE, "GIMP_UNDO_EVENT_UNDO_FREEZE", "undo-freeze" },
{ GIMP_UNDO_EVENT_UNDO_THAW, "GIMP_UNDO_EVENT_UNDO_THAW", "undo-thaw" },
{ 0, NULL, NULL }
};
static const GimpEnumDesc descs[] =
{
{ GIMP_UNDO_EVENT_UNDO_PUSHED, "GIMP_UNDO_EVENT_UNDO_PUSHED", NULL },
{ GIMP_UNDO_EVENT_UNDO_EXPIRED, "GIMP_UNDO_EVENT_UNDO_EXPIRED", NULL },
{ GIMP_UNDO_EVENT_REDO_EXPIRED, "GIMP_UNDO_EVENT_REDO_EXPIRED", NULL },
{ GIMP_UNDO_EVENT_UNDO, "GIMP_UNDO_EVENT_UNDO", NULL },
{ GIMP_UNDO_EVENT_REDO, "GIMP_UNDO_EVENT_REDO", NULL },
{ GIMP_UNDO_EVENT_UNDO_FREE, "GIMP_UNDO_EVENT_UNDO_FREE", NULL },
{ GIMP_UNDO_EVENT_UNDO_FREEZE, "GIMP_UNDO_EVENT_UNDO_FREEZE", NULL },
{ GIMP_UNDO_EVENT_UNDO_THAW, "GIMP_UNDO_EVENT_UNDO_THAW", NULL },
{ 0, NULL, NULL }
};
static GType type = 0;
if (G_UNLIKELY (! type))
{
type = g_enum_register_static ("GimpUndoEvent", values);
gimp_type_set_translation_context (type, "undo-event");
gimp_enum_set_value_descriptions (type, descs);
}
return type;
Reimplemented the undo history: 2003-02-20 Michael Natterer <mitch@gimp.org> Reimplemented the undo history: * app/Makefile.am * app/undo_history.[ch]: removed. Changes/cleanups to the undo system to enable/simplify the new undo history implementation: * app/core/core-types.h: removed enum undo_event_t. Removed the GimpImage parameter from GimpUndoPopFunc and GimpUndoFreeFunc because GimpUndo has a GimpImage pointer now (see below). * app/core/core-enums.[ch]: added enum GimpUndoEvent. Added an enum value for REDO_EXPIRED. * app/core/gimpimage.[ch]: added a GimpUndo pointer to the "undo_event" signal which needs to be passed for all events except UNDO_FREE. * app/display/gimpdisplayshell-handlers.c: changed accordingly. * app/core/gimpundo.[ch]: added a GimpImage pointer to the GimpUndo struct. Removed GimpImage parameters all over the place. Added preview stuff. The preview creation needs to be triggered explicitly using gimp_undo_create_preview() because the GimpUndo can't know when it's possible to create the preview. * app/core/gimpimage-undo-push.c * app/paint/gimppaintcore-undo.c * app/tools/gimptransformtool-undo.c: changed accordingly, cleanup. * app/core/gimpundostack.[ch]: ditto. Return the freed undo from gimp_undo_stack_free_bottom(). Removed unused container signal handlers. * app/core/gimpimage-undo.c: free the redo stack the same way old undos are freed (from bottom up). Emit "undo_event" with event == REDO_EXPIRED for each removed redo. * app/core/gimpmarshal.list: added new marshallers. New undo history implementation: * app/widgets/Makefile.am * app/widgets/widgets-types.h * app/widgets/gimpundoeditor.[ch] * app/widgets/gimpundopreview.[ch]: new widgets for the undo step previews and the history itself. * app/widgets/gimppreview-utils.c: added GimpUndoPreview to the list of possible preview types. * app/gui/dialogs-constructors.[ch] * app/gui/dialogs-menu.c * app/gui/dialogs.c * app/gui/image-menu.c * app/gui/toolbox-menu.c: removed the old and added the new undo history to the dialog factory and the various dialog menus. * app/widgets/gimpdnd.[ch]: don't warn if a GType has no corresponding DND type. Instead, return FALSE from the function that failed. * app/widgets/gimppreview.c: check the return value of gimpdnd functions. Not only add drag sources but also remove them when no longer needed. * app/widgets/gimpselectioneditor.h: removed unneeded inclusion of "gui/gui-types.h".
2003-02-20 20:47:42 +08:00
}
2003-02-13 01:11:34 +08:00
GType
gimp_undo_type_get_type (void)
{
static const GEnumValue values[] =
{
{ GIMP_UNDO_GROUP_NONE, "GIMP_UNDO_GROUP_NONE", "group-none" },
{ GIMP_UNDO_GROUP_IMAGE_SCALE, "GIMP_UNDO_GROUP_IMAGE_SCALE", "group-image-scale" },
{ GIMP_UNDO_GROUP_IMAGE_RESIZE, "GIMP_UNDO_GROUP_IMAGE_RESIZE", "group-image-resize" },
{ GIMP_UNDO_GROUP_IMAGE_FLIP, "GIMP_UNDO_GROUP_IMAGE_FLIP", "group-image-flip" },
{ GIMP_UNDO_GROUP_IMAGE_ROTATE, "GIMP_UNDO_GROUP_IMAGE_ROTATE", "group-image-rotate" },
{ GIMP_UNDO_GROUP_IMAGE_CROP, "GIMP_UNDO_GROUP_IMAGE_CROP", "group-image-crop" },
{ GIMP_UNDO_GROUP_IMAGE_CONVERT, "GIMP_UNDO_GROUP_IMAGE_CONVERT", "group-image-convert" },
{ GIMP_UNDO_GROUP_IMAGE_ITEM_REMOVE, "GIMP_UNDO_GROUP_IMAGE_ITEM_REMOVE", "group-image-item-remove" },
{ GIMP_UNDO_GROUP_IMAGE_LAYERS_MERGE, "GIMP_UNDO_GROUP_IMAGE_LAYERS_MERGE", "group-image-layers-merge" },
{ GIMP_UNDO_GROUP_IMAGE_VECTORS_MERGE, "GIMP_UNDO_GROUP_IMAGE_VECTORS_MERGE", "group-image-vectors-merge" },
{ GIMP_UNDO_GROUP_IMAGE_QUICK_MASK, "GIMP_UNDO_GROUP_IMAGE_QUICK_MASK", "group-image-quick-mask" },
{ GIMP_UNDO_GROUP_IMAGE_GRID, "GIMP_UNDO_GROUP_IMAGE_GRID", "group-image-grid" },
{ GIMP_UNDO_GROUP_GUIDE, "GIMP_UNDO_GROUP_GUIDE", "group-guide" },
{ GIMP_UNDO_GROUP_SAMPLE_POINT, "GIMP_UNDO_GROUP_SAMPLE_POINT", "group-sample-point" },
{ GIMP_UNDO_GROUP_DRAWABLE, "GIMP_UNDO_GROUP_DRAWABLE", "group-drawable" },
{ GIMP_UNDO_GROUP_DRAWABLE_MOD, "GIMP_UNDO_GROUP_DRAWABLE_MOD", "group-drawable-mod" },
{ GIMP_UNDO_GROUP_MASK, "GIMP_UNDO_GROUP_MASK", "group-mask" },
{ GIMP_UNDO_GROUP_ITEM_VISIBILITY, "GIMP_UNDO_GROUP_ITEM_VISIBILITY", "group-item-visibility" },
{ GIMP_UNDO_GROUP_ITEM_LINKED, "GIMP_UNDO_GROUP_ITEM_LINKED", "group-item-linked" },
{ GIMP_UNDO_GROUP_ITEM_PROPERTIES, "GIMP_UNDO_GROUP_ITEM_PROPERTIES", "group-item-properties" },
{ GIMP_UNDO_GROUP_ITEM_DISPLACE, "GIMP_UNDO_GROUP_ITEM_DISPLACE", "group-item-displace" },
{ GIMP_UNDO_GROUP_ITEM_SCALE, "GIMP_UNDO_GROUP_ITEM_SCALE", "group-item-scale" },
{ GIMP_UNDO_GROUP_ITEM_RESIZE, "GIMP_UNDO_GROUP_ITEM_RESIZE", "group-item-resize" },
{ GIMP_UNDO_GROUP_LAYER_ADD, "GIMP_UNDO_GROUP_LAYER_ADD", "group-layer-add" },
{ GIMP_UNDO_GROUP_LAYER_ADD_MASK, "GIMP_UNDO_GROUP_LAYER_ADD_MASK", "group-layer-add-mask" },
{ GIMP_UNDO_GROUP_LAYER_APPLY_MASK, "GIMP_UNDO_GROUP_LAYER_APPLY_MASK", "group-layer-apply-mask" },
{ GIMP_UNDO_GROUP_FS_TO_LAYER, "GIMP_UNDO_GROUP_FS_TO_LAYER", "group-fs-to-layer" },
{ GIMP_UNDO_GROUP_FS_FLOAT, "GIMP_UNDO_GROUP_FS_FLOAT", "group-fs-float" },
{ GIMP_UNDO_GROUP_FS_ANCHOR, "GIMP_UNDO_GROUP_FS_ANCHOR", "group-fs-anchor" },
{ GIMP_UNDO_GROUP_EDIT_PASTE, "GIMP_UNDO_GROUP_EDIT_PASTE", "group-edit-paste" },
{ GIMP_UNDO_GROUP_EDIT_CUT, "GIMP_UNDO_GROUP_EDIT_CUT", "group-edit-cut" },
{ GIMP_UNDO_GROUP_TEXT, "GIMP_UNDO_GROUP_TEXT", "group-text" },
{ GIMP_UNDO_GROUP_TRANSFORM, "GIMP_UNDO_GROUP_TRANSFORM", "group-transform" },
{ GIMP_UNDO_GROUP_PAINT, "GIMP_UNDO_GROUP_PAINT", "group-paint" },
{ GIMP_UNDO_GROUP_PARASITE_ATTACH, "GIMP_UNDO_GROUP_PARASITE_ATTACH", "group-parasite-attach" },
{ GIMP_UNDO_GROUP_PARASITE_REMOVE, "GIMP_UNDO_GROUP_PARASITE_REMOVE", "group-parasite-remove" },
{ GIMP_UNDO_GROUP_VECTORS_IMPORT, "GIMP_UNDO_GROUP_VECTORS_IMPORT", "group-vectors-import" },
{ GIMP_UNDO_GROUP_MISC, "GIMP_UNDO_GROUP_MISC", "group-misc" },
{ GIMP_UNDO_IMAGE_TYPE, "GIMP_UNDO_IMAGE_TYPE", "image-type" },
{ GIMP_UNDO_IMAGE_SIZE, "GIMP_UNDO_IMAGE_SIZE", "image-size" },
{ GIMP_UNDO_IMAGE_RESOLUTION, "GIMP_UNDO_IMAGE_RESOLUTION", "image-resolution" },
{ GIMP_UNDO_IMAGE_GRID, "GIMP_UNDO_IMAGE_GRID", "image-grid" },
{ GIMP_UNDO_IMAGE_COLORMAP, "GIMP_UNDO_IMAGE_COLORMAP", "image-colormap" },
{ GIMP_UNDO_GUIDE, "GIMP_UNDO_GUIDE", "guide" },
{ GIMP_UNDO_SAMPLE_POINT, "GIMP_UNDO_SAMPLE_POINT", "sample-point" },
{ GIMP_UNDO_DRAWABLE, "GIMP_UNDO_DRAWABLE", "drawable" },
{ GIMP_UNDO_DRAWABLE_MOD, "GIMP_UNDO_DRAWABLE_MOD", "drawable-mod" },
{ GIMP_UNDO_MASK, "GIMP_UNDO_MASK", "mask" },
{ GIMP_UNDO_ITEM_RENAME, "GIMP_UNDO_ITEM_RENAME", "item-rename" },
{ GIMP_UNDO_ITEM_DISPLACE, "GIMP_UNDO_ITEM_DISPLACE", "item-displace" },
{ GIMP_UNDO_ITEM_VISIBILITY, "GIMP_UNDO_ITEM_VISIBILITY", "item-visibility" },
{ GIMP_UNDO_ITEM_LINKED, "GIMP_UNDO_ITEM_LINKED", "item-linked" },
{ GIMP_UNDO_LAYER_ADD, "GIMP_UNDO_LAYER_ADD", "layer-add" },
{ GIMP_UNDO_LAYER_REMOVE, "GIMP_UNDO_LAYER_REMOVE", "layer-remove" },
{ GIMP_UNDO_LAYER_REPOSITION, "GIMP_UNDO_LAYER_REPOSITION", "layer-reposition" },
{ GIMP_UNDO_LAYER_MODE, "GIMP_UNDO_LAYER_MODE", "layer-mode" },
{ GIMP_UNDO_LAYER_OPACITY, "GIMP_UNDO_LAYER_OPACITY", "layer-opacity" },
app/actions/layers-actions.c app/actions/layers-commands.[ch] 2005-07-10 Michael Natterer <mitch@gimp.org> * app/actions/layers-actions.c * app/actions/layers-commands.[ch] * app/core/core-enums.[ch] * app/core/gimpimage-undo-push.[ch] * app/core/gimplayer-floating-sel.c * app/core/gimplayer.[ch] * app/text/gimptextlayer-xcf.c * app/widgets/gimphelp-ids.h * app/widgets/gimplayertreeview.[ch] * app/xcf/xcf-load.c * app/xcf/xcf-private.h * app/xcf/xcf-save.c * tools/pdbgen/pdb/layer.pdb * menus/image-menu.xml.in * libgimp/gimp.def: did a global s/preserve_trans/lock_alpha/ in preparation for more layer locking flags. * app/pdb/procedural_db.c * libgimp/gimplayer.[ch]: added compat stuff for preserve_trans. * app/pdb/layer_cmds.c * libgimp/gimplayer_pdb.[ch]: regenerated. * plug-ins/common/colortoalpha.c * plug-ins/common/iwarp.c * plug-ins/common/psd.c * plug-ins/common/psd_save.c * plug-ins/common/psp.c * plug-ins/common/rotate.c * plug-ins/common/threshold_alpha.c * plug-ins/common/vpropagate.c * plug-ins/script-fu/scripts/3d-outline.scm * plug-ins/script-fu/scripts/alien-glow-bar.scm * plug-ins/script-fu/scripts/alien-glow-bullet.scm * plug-ins/script-fu/scripts/alien-glow-logo.scm * plug-ins/script-fu/scripts/basic1-logo.scm * plug-ins/script-fu/scripts/basic2-logo.scm * plug-ins/script-fu/scripts/beveled-pattern-button.scm * plug-ins/script-fu/scripts/blend-anim.scm * plug-ins/script-fu/scripts/blended-logo.scm * plug-ins/script-fu/scripts/bovinated-logo.scm * plug-ins/script-fu/scripts/burn-in-anim.scm * plug-ins/script-fu/scripts/carved-logo.scm * plug-ins/script-fu/scripts/chalk.scm * plug-ins/script-fu/scripts/chip-away.scm * plug-ins/script-fu/scripts/comic-logo.scm * plug-ins/script-fu/scripts/coolmetal-logo.scm * plug-ins/script-fu/scripts/crystal-logo.scm * plug-ins/script-fu/scripts/drop-shadow.scm * plug-ins/script-fu/scripts/gimp-headers.scm * plug-ins/script-fu/scripts/gimp-labels.scm * plug-ins/script-fu/scripts/glowing-logo.scm * plug-ins/script-fu/scripts/gradient-bevel-logo.scm * plug-ins/script-fu/scripts/image-structure.scm * plug-ins/script-fu/scripts/neon-logo.scm * plug-ins/script-fu/scripts/perspective-shadow.scm * plug-ins/script-fu/scripts/starburst-logo.scm * plug-ins/script-fu/scripts/starscape-logo.scm * plug-ins/script-fu/scripts/textured-logo.scm * plug-ins/script-fu/scripts/title-header.scm * plug-ins/script-fu/scripts/waves-anim.scm * plug-ins/xjt/xjt.c: changed accordingly.
2005-07-11 05:17:22 +08:00
{ GIMP_UNDO_LAYER_LOCK_ALPHA, "GIMP_UNDO_LAYER_LOCK_ALPHA", "layer-lock-alpha" },
{ GIMP_UNDO_TEXT_LAYER, "GIMP_UNDO_TEXT_LAYER", "text-layer" },
{ GIMP_UNDO_TEXT_LAYER_MODIFIED, "GIMP_UNDO_TEXT_LAYER_MODIFIED", "text-layer-modified" },
{ GIMP_UNDO_LAYER_MASK_ADD, "GIMP_UNDO_LAYER_MASK_ADD", "layer-mask-add" },
{ GIMP_UNDO_LAYER_MASK_REMOVE, "GIMP_UNDO_LAYER_MASK_REMOVE", "layer-mask-remove" },
{ GIMP_UNDO_LAYER_MASK_APPLY, "GIMP_UNDO_LAYER_MASK_APPLY", "layer-mask-apply" },
{ GIMP_UNDO_LAYER_MASK_SHOW, "GIMP_UNDO_LAYER_MASK_SHOW", "layer-mask-show" },
{ GIMP_UNDO_CHANNEL_ADD, "GIMP_UNDO_CHANNEL_ADD", "channel-add" },
{ GIMP_UNDO_CHANNEL_REMOVE, "GIMP_UNDO_CHANNEL_REMOVE", "channel-remove" },
{ GIMP_UNDO_CHANNEL_REPOSITION, "GIMP_UNDO_CHANNEL_REPOSITION", "channel-reposition" },
{ GIMP_UNDO_CHANNEL_COLOR, "GIMP_UNDO_CHANNEL_COLOR", "channel-color" },
{ GIMP_UNDO_VECTORS_ADD, "GIMP_UNDO_VECTORS_ADD", "vectors-add" },
{ GIMP_UNDO_VECTORS_REMOVE, "GIMP_UNDO_VECTORS_REMOVE", "vectors-remove" },
{ GIMP_UNDO_VECTORS_MOD, "GIMP_UNDO_VECTORS_MOD", "vectors-mod" },
{ GIMP_UNDO_VECTORS_REPOSITION, "GIMP_UNDO_VECTORS_REPOSITION", "vectors-reposition" },
{ GIMP_UNDO_FS_TO_LAYER, "GIMP_UNDO_FS_TO_LAYER", "fs-to-layer" },
{ GIMP_UNDO_TRANSFORM, "GIMP_UNDO_TRANSFORM", "transform" },
{ GIMP_UNDO_PAINT, "GIMP_UNDO_PAINT", "paint" },
{ GIMP_UNDO_INK, "GIMP_UNDO_INK", "ink" },
{ GIMP_UNDO_FOREGROUND_SELECT, "GIMP_UNDO_FOREGROUND_SELECT", "foreground-select" },
{ GIMP_UNDO_PARASITE_ATTACH, "GIMP_UNDO_PARASITE_ATTACH", "parasite-attach" },
{ GIMP_UNDO_PARASITE_REMOVE, "GIMP_UNDO_PARASITE_REMOVE", "parasite-remove" },
{ GIMP_UNDO_CANT, "GIMP_UNDO_CANT", "cant" },
{ 0, NULL, NULL }
};
static const GimpEnumDesc descs[] =
{
{ GIMP_UNDO_GROUP_NONE, NC_("undo-type", "<<invalid>>"), NULL },
{ GIMP_UNDO_GROUP_IMAGE_SCALE, NC_("undo-type", "Scale image"), NULL },
{ GIMP_UNDO_GROUP_IMAGE_RESIZE, NC_("undo-type", "Resize image"), NULL },
{ GIMP_UNDO_GROUP_IMAGE_FLIP, NC_("undo-type", "Flip image"), NULL },
{ GIMP_UNDO_GROUP_IMAGE_ROTATE, NC_("undo-type", "Rotate image"), NULL },
{ GIMP_UNDO_GROUP_IMAGE_CROP, NC_("undo-type", "Crop image"), NULL },
{ GIMP_UNDO_GROUP_IMAGE_CONVERT, NC_("undo-type", "Convert image"), NULL },
{ GIMP_UNDO_GROUP_IMAGE_ITEM_REMOVE, NC_("undo-type", "Remove item"), NULL },
{ GIMP_UNDO_GROUP_IMAGE_LAYERS_MERGE, NC_("undo-type", "Merge layers"), NULL },
{ GIMP_UNDO_GROUP_IMAGE_VECTORS_MERGE, NC_("undo-type", "Merge paths"), NULL },
{ GIMP_UNDO_GROUP_IMAGE_QUICK_MASK, NC_("undo-type", "Quick Mask"), NULL },
{ GIMP_UNDO_GROUP_IMAGE_GRID, NC_("undo-type", "Grid"), NULL },
{ GIMP_UNDO_GROUP_GUIDE, NC_("undo-type", "Guide"), NULL },
{ GIMP_UNDO_GROUP_SAMPLE_POINT, NC_("undo-type", "Sample Point"), NULL },
{ GIMP_UNDO_GROUP_DRAWABLE, NC_("undo-type", "Layer/Channel"), NULL },
{ GIMP_UNDO_GROUP_DRAWABLE_MOD, NC_("undo-type", "Layer/Channel modification"), NULL },
{ GIMP_UNDO_GROUP_MASK, NC_("undo-type", "Selection mask"), NULL },
{ GIMP_UNDO_GROUP_ITEM_VISIBILITY, NC_("undo-type", "Item visibility"), NULL },
{ GIMP_UNDO_GROUP_ITEM_LINKED, NC_("undo-type", "Link/Unlink item"), NULL },
{ GIMP_UNDO_GROUP_ITEM_PROPERTIES, NC_("undo-type", "Item properties"), NULL },
{ GIMP_UNDO_GROUP_ITEM_DISPLACE, NC_("undo-type", "Move item"), NULL },
{ GIMP_UNDO_GROUP_ITEM_SCALE, NC_("undo-type", "Scale item"), NULL },
{ GIMP_UNDO_GROUP_ITEM_RESIZE, NC_("undo-type", "Resize item"), NULL },
{ GIMP_UNDO_GROUP_LAYER_ADD, NC_("undo-type", "Add layer"), NULL },
{ GIMP_UNDO_GROUP_LAYER_ADD_MASK, NC_("undo-type", "Add layer mask"), NULL },
{ GIMP_UNDO_GROUP_LAYER_APPLY_MASK, NC_("undo-type", "Apply layer mask"), NULL },
{ GIMP_UNDO_GROUP_FS_TO_LAYER, NC_("undo-type", "Floating selection to layer"), NULL },
{ GIMP_UNDO_GROUP_FS_FLOAT, NC_("undo-type", "Float selection"), NULL },
{ GIMP_UNDO_GROUP_FS_ANCHOR, NC_("undo-type", "Anchor floating selection"), NULL },
{ GIMP_UNDO_GROUP_EDIT_PASTE, NC_("undo-type", "Paste"), NULL },
{ GIMP_UNDO_GROUP_EDIT_CUT, NC_("undo-type", "Cut"), NULL },
{ GIMP_UNDO_GROUP_TEXT, NC_("undo-type", "Text"), NULL },
{ GIMP_UNDO_GROUP_TRANSFORM, NC_("undo-type", "Transform"), NULL },
{ GIMP_UNDO_GROUP_PAINT, NC_("undo-type", "Paint"), NULL },
{ GIMP_UNDO_GROUP_PARASITE_ATTACH, NC_("undo-type", "Attach parasite"), NULL },
{ GIMP_UNDO_GROUP_PARASITE_REMOVE, NC_("undo-type", "Remove parasite"), NULL },
{ GIMP_UNDO_GROUP_VECTORS_IMPORT, NC_("undo-type", "Import paths"), NULL },
{ GIMP_UNDO_GROUP_MISC, NC_("undo-type", "Plug-In"), NULL },
{ GIMP_UNDO_IMAGE_TYPE, NC_("undo-type", "Image type"), NULL },
{ GIMP_UNDO_IMAGE_SIZE, NC_("undo-type", "Image size"), NULL },
{ GIMP_UNDO_IMAGE_RESOLUTION, NC_("undo-type", "Image resolution change"), NULL },
{ GIMP_UNDO_IMAGE_GRID, NC_("undo-type", "Grid"), NULL },
{ GIMP_UNDO_IMAGE_COLORMAP, NC_("undo-type", "Change indexed palette"), NULL },
{ GIMP_UNDO_GUIDE, NC_("undo-type", "Guide"), NULL },
{ GIMP_UNDO_SAMPLE_POINT, NC_("undo-type", "Sample Point"), NULL },
{ GIMP_UNDO_DRAWABLE, NC_("undo-type", "Layer/Channel"), NULL },
{ GIMP_UNDO_DRAWABLE_MOD, NC_("undo-type", "Layer/Channel modification"), NULL },
{ GIMP_UNDO_MASK, NC_("undo-type", "Selection mask"), NULL },
{ GIMP_UNDO_ITEM_RENAME, NC_("undo-type", "Rename item"), NULL },
{ GIMP_UNDO_ITEM_DISPLACE, NC_("undo-type", "Move item"), NULL },
{ GIMP_UNDO_ITEM_VISIBILITY, NC_("undo-type", "Item visibility"), NULL },
{ GIMP_UNDO_ITEM_LINKED, NC_("undo-type", "Link/Unlink item"), NULL },
{ GIMP_UNDO_LAYER_ADD, NC_("undo-type", "New layer"), NULL },
{ GIMP_UNDO_LAYER_REMOVE, NC_("undo-type", "Delete layer"), NULL },
{ GIMP_UNDO_LAYER_REPOSITION, NC_("undo-type", "Reposition layer"), NULL },
{ GIMP_UNDO_LAYER_MODE, NC_("undo-type", "Set layer mode"), NULL },
{ GIMP_UNDO_LAYER_OPACITY, NC_("undo-type", "Set layer opacity"), NULL },
{ GIMP_UNDO_LAYER_LOCK_ALPHA, NC_("undo-type", "Lock/Unlock alpha channel"), NULL },
{ GIMP_UNDO_TEXT_LAYER, NC_("undo-type", "Text layer"), NULL },
{ GIMP_UNDO_TEXT_LAYER_MODIFIED, NC_("undo-type", "Text layer modification"), NULL },
{ GIMP_UNDO_LAYER_MASK_ADD, NC_("undo-type", "Add layer mask"), NULL },
{ GIMP_UNDO_LAYER_MASK_REMOVE, NC_("undo-type", "Delete layer mask"), NULL },
{ GIMP_UNDO_LAYER_MASK_APPLY, NC_("undo-type", "Apply layer mask"), NULL },
{ GIMP_UNDO_LAYER_MASK_SHOW, NC_("undo-type", "Show layer mask"), NULL },
{ GIMP_UNDO_CHANNEL_ADD, NC_("undo-type", "New channel"), NULL },
{ GIMP_UNDO_CHANNEL_REMOVE, NC_("undo-type", "Delete channel"), NULL },
{ GIMP_UNDO_CHANNEL_REPOSITION, NC_("undo-type", "Reposition channel"), NULL },
{ GIMP_UNDO_CHANNEL_COLOR, NC_("undo-type", "Channel color"), NULL },
{ GIMP_UNDO_VECTORS_ADD, NC_("undo-type", "New path"), NULL },
{ GIMP_UNDO_VECTORS_REMOVE, NC_("undo-type", "Delete path"), NULL },
{ GIMP_UNDO_VECTORS_MOD, NC_("undo-type", "Path modification"), NULL },
{ GIMP_UNDO_VECTORS_REPOSITION, NC_("undo-type", "Reposition path"), NULL },
{ GIMP_UNDO_FS_TO_LAYER, NC_("undo-type", "Floating selection to layer"), NULL },
{ GIMP_UNDO_TRANSFORM, NC_("undo-type", "Transform"), NULL },
{ GIMP_UNDO_PAINT, NC_("undo-type", "Paint"), NULL },
{ GIMP_UNDO_INK, NC_("undo-type", "Ink"), NULL },
{ GIMP_UNDO_FOREGROUND_SELECT, NC_("undo-type", "Select foreground"), NULL },
{ GIMP_UNDO_PARASITE_ATTACH, NC_("undo-type", "Attach parasite"), NULL },
{ GIMP_UNDO_PARASITE_REMOVE, NC_("undo-type", "Remove parasite"), NULL },
{ GIMP_UNDO_CANT, NC_("undo-type", "Not undoable"), NULL },
{ 0, NULL, NULL }
};
static GType type = 0;
if (G_UNLIKELY (! type))
{
type = g_enum_register_static ("GimpUndoType", values);
gimp_type_set_translation_context (type, "undo-type");
gimp_enum_set_value_descriptions (type, descs);
}
return type;
}
2003-02-13 01:11:34 +08:00
GType
gimp_dirty_mask_get_type (void)
{
static const GFlagsValue values[] =
{
{ GIMP_DIRTY_NONE, "GIMP_DIRTY_NONE", "none" },
{ GIMP_DIRTY_IMAGE, "GIMP_DIRTY_IMAGE", "image" },
Replaced the concept of having a boolean indicating if an undo step 2004-07-29 Michael Natterer <mitch@gimp.org> Replaced the concept of having a boolean indicating if an undo step dirties the image by a bitfield indicating which parts of the image are dirtied: * app/core/core-enums.[ch]: reordered two values in enum GimpUndoType, added GIMP_DIRTY_IMAGE_SIZE to enum GimpDirtyMask. The values of GimpDirtyMask are still questionable and will probably change... * app/core/gimpimage.[ch]: removed signal "undo_start" and added a GimpDirtyMask parameter to the "dirty" and "clean" signals. * app/core/gimpimage-undo.[ch] (gimp_image_undo_push): replaced "gboolean dirties_image" by "GimpDirtyMask dirty_mask" and pass it to gimp_image_dirty(). (gimp_image_undo_group_start): added *ugly* code which tries to figure GimpDirtyMask from the group's GimpUndoType and store it in the GimpUndoGroup. Call gimp_image_dirty() instead of the removed gimp_image_undo_start(). This means the undo group now dirties the image just like one of its undo steps, but that's no problem since undoing cleans it in the same way. * app/core/gimpundo.[ch]: s/dirties_image/dirty_mask/g (gimp_undo_pop): emit clean/dirty signals *before* performing the actual undo step so listeners can detach from the image before it is changed by undo. * app/core/gimpimage-undo-push.c (gimp_image_undo_push_*): pass a GimpDirtyMask instead of TRUE/FALSE to gimp_image_undo_push(). * app/core/gimpimagemap.[ch]: removed "gboolean interactive" because it makes no sense to use GimpImageMap noninteractively. Don't freeze()/thaw() undo while the image_map is active which fixes many ways of trashing the image's undo state but probably introduces new ways of doing evil things. * app/display/gimpdisplay-foreach.c * app/display/gimpdisplayshell-handlers.c: changed according to the GimpImage::clean()/dirty() signal changes. Small fixes in the quit dialog's dirty image container. * app/tools/gimptoolcontrol.[ch]: added member and API to set/get the dirty_mask. * app/tools/gimpcroptool.c * app/tools/gimpimagemaptool.c * app/tools/gimpiscissorstool.c * app/tools/gimptexttool.c * app/tools/gimptransformtool.c: whenever setting "preserve" to FALSE, also set a "dirty_mask" which specifies on which image changes the tool wants to be canceled. * app/tools/tool_manager.c: removed "undo_start" connection and connect to both "dirty" *and* "clean" to check if the active_tool needs to be canceled. Cancel the tool only if the dirty_mask passed in the signal has common bits with the tool's dirty_mask. Fixes bug #109561 and probably opens some new ones...
2004-07-29 22:16:21 +08:00
{ GIMP_DIRTY_IMAGE_SIZE, "GIMP_DIRTY_IMAGE_SIZE", "image-size" },
{ GIMP_DIRTY_IMAGE_META, "GIMP_DIRTY_IMAGE_META", "image-meta" },
{ GIMP_DIRTY_IMAGE_STRUCTURE, "GIMP_DIRTY_IMAGE_STRUCTURE", "image-structure" },
{ GIMP_DIRTY_ITEM, "GIMP_DIRTY_ITEM", "item" },
{ GIMP_DIRTY_ITEM_META, "GIMP_DIRTY_ITEM_META", "item-meta" },
{ GIMP_DIRTY_DRAWABLE, "GIMP_DIRTY_DRAWABLE", "drawable" },
{ GIMP_DIRTY_VECTORS, "GIMP_DIRTY_VECTORS", "vectors" },
{ GIMP_DIRTY_SELECTION, "GIMP_DIRTY_SELECTION", "selection" },
{ GIMP_DIRTY_ALL, "GIMP_DIRTY_ALL", "all" },
{ 0, NULL, NULL }
};
static const GimpFlagsDesc descs[] =
{
{ GIMP_DIRTY_NONE, "GIMP_DIRTY_NONE", NULL },
{ GIMP_DIRTY_IMAGE, "GIMP_DIRTY_IMAGE", NULL },
{ GIMP_DIRTY_IMAGE_SIZE, "GIMP_DIRTY_IMAGE_SIZE", NULL },
{ GIMP_DIRTY_IMAGE_META, "GIMP_DIRTY_IMAGE_META", NULL },
{ GIMP_DIRTY_IMAGE_STRUCTURE, "GIMP_DIRTY_IMAGE_STRUCTURE", NULL },
{ GIMP_DIRTY_ITEM, "GIMP_DIRTY_ITEM", NULL },
{ GIMP_DIRTY_ITEM_META, "GIMP_DIRTY_ITEM_META", NULL },
{ GIMP_DIRTY_DRAWABLE, "GIMP_DIRTY_DRAWABLE", NULL },
{ GIMP_DIRTY_VECTORS, "GIMP_DIRTY_VECTORS", NULL },
{ GIMP_DIRTY_SELECTION, "GIMP_DIRTY_SELECTION", NULL },
{ GIMP_DIRTY_ALL, "GIMP_DIRTY_ALL", NULL },
{ 0, NULL, NULL }
};
static GType type = 0;
if (G_UNLIKELY (! type))
{
type = g_flags_register_static ("GimpDirtyMask", values);
gimp_type_set_translation_context (type, "dirty-mask");
gimp_flags_set_value_descriptions (type, descs);
}
return type;
2003-02-13 01:11:34 +08:00
}
GType
gimp_offset_type_get_type (void)
{
static const GEnumValue values[] =
{
{ GIMP_OFFSET_BACKGROUND, "GIMP_OFFSET_BACKGROUND", "background" },
{ GIMP_OFFSET_TRANSPARENT, "GIMP_OFFSET_TRANSPARENT", "transparent" },
{ 0, NULL, NULL }
};
static const GimpEnumDesc descs[] =
{
{ GIMP_OFFSET_BACKGROUND, "GIMP_OFFSET_BACKGROUND", NULL },
{ GIMP_OFFSET_TRANSPARENT, "GIMP_OFFSET_TRANSPARENT", NULL },
{ 0, NULL, NULL }
};
static GType type = 0;
if (G_UNLIKELY (! type))
{
type = g_enum_register_static ("GimpOffsetType", values);
gimp_type_set_translation_context (type, "offset-type");
gimp_enum_set_value_descriptions (type, descs);
}
return type;
}
Changed GimpViewable preview rendering to have a context to get 2006-08-29 Michael Natterer <mitch@gimp.org> Changed GimpViewable preview rendering to have a context to get FG/BG/whatever from. Use the context to enable dynamic FG/BG colors in gradients. Fixes bug #127676 and bug #352214. Addresses bug #128367 (doesn't fix it because there's no loading/saving and no GUI yet). * app/core/core-enums.[ch]: added enum GimpGradientColor to enable specifying gradient colors in terms of foreground and background. * app/core/gimpgradient.[ch]: added color_type members to the GimpGradientSegment struct and honor them in gimp_gradient_get_color_at(). Added GimpContext parameters to all functions which finally call get_color_at(). * app/core/gimp-gradients.c: use the new method to implement the builtin gradients. * app/core/gimpviewable.[ch]: added GimpContext parameters to all get_preview() and get_pixbuf() functions. * app/core/gimpbrush.c * app/core/gimpbuffer.c * app/core/gimpdrawable-preview.[ch] * app/core/gimpgradient.c * app/core/gimpimage-preview.[ch] * app/core/gimpimagefile.c * app/core/gimppalette.c * app/core/gimppattern.c * app/core/gimpundo.[ch] * app/text/gimpfont.c * app/vectors/gimpvectors-preview.[ch]: changed ::get_preview() and ::get_pixbuf() implementations accordingly. * app/core/gimpdrawable-blend.c * app/core/gimppalette-import.[ch] * app/dialogs/dialogs-constructors.c * app/dialogs/palette-import-dialog.c * app/dialogs/resize-dialog.c * app/display/gimpdisplayshell-layer-select.c * app/display/gimpdisplayshell.c * app/display/gimpnavigationeditor.c * app/paint/gimppaintoptions.c * app/tools/gimpeditselectiontool.c * app/tools/gimptexttool.c * app/actions/gradient-editor-commands.c * app/widgets/gimpaction.c * app/widgets/gimpbrusheditor.[ch] * app/widgets/gimpbufferview.c * app/widgets/gimpcellrendererviewable.c * app/widgets/gimpchanneltreeview.c * app/widgets/gimpclipboard.c * app/widgets/gimpcoloreditor.c * app/widgets/gimpcomponenteditor.c * app/widgets/gimpcontainerbox.c * app/widgets/gimpcontainercombobox.c * app/widgets/gimpcontainereditor.c * app/widgets/gimpcontainerentry.c * app/widgets/gimpcontainergridview.c * app/widgets/gimpcontainertreeview.[ch] * app/widgets/gimpdataeditor.[ch] * app/widgets/gimpdevicestatus.c * app/widgets/gimpdnd.[ch] * app/widgets/gimpdrawabletreeview.c * app/widgets/gimpfiledialog.c * app/widgets/gimpgradienteditor.[ch] * app/widgets/gimpgradientselect.c * app/widgets/gimpitemtreeview.c * app/widgets/gimplayertreeview.c * app/widgets/gimppaletteeditor.[ch] * app/widgets/gimppropwidgets.[ch] * app/widgets/gimpselectioneditor.c * app/widgets/gimpthumbbox.[ch] * app/widgets/gimptoolbox-image-area.c * app/widgets/gimptoolbox-indicator-area.c * app/widgets/gimptooloptionseditor.c * app/widgets/gimpundoeditor.c * app/widgets/gimpvectorstreeview.c * app/widgets/gimpview-popup.[ch] * app/widgets/gimpview.[ch] * app/widgets/gimpviewablebutton.c * app/widgets/gimpviewabledialog.c * app/widgets/gimpviewrenderer.[ch] * app/widgets/gimpviewrenderer-frame.c * app/widgets/gimpviewrendererbrush.c * app/widgets/gimpviewrendererbuffer.c * app/widgets/gimpviewrendererdrawable.c * app/widgets/gimpviewrenderergradient.c * app/widgets/gimpviewrendererimage.c * tools/pdbgen/pdb/drawable.pdb * tools/pdbgen/pdb/gradient.pdb * tools/pdbgen/pdb/gradients.pdb * tools/pdbgen/pdb/image.pdb: added tons of GimpContext members and parameters, implement GimpDocked::set_context() in many widgets. Pass these locally remembered contexts to GimpViewable functions. Did some minor cleanups on the way. There are still some minor FIXMEs around where the code uses a NULL context (which is allowed by the APIs) * app/pdb/drawable_cmds.c * app/pdb/gradient_cmds.c * app/pdb/gradients_cmds.c * app/pdb/image_cmds.c: regenerated.
2006-08-30 05:44:51 +08:00
GType
gimp_gradient_color_get_type (void)
{
static const GEnumValue values[] =
{
{ GIMP_GRADIENT_COLOR_FIXED, "GIMP_GRADIENT_COLOR_FIXED", "fixed" },
{ GIMP_GRADIENT_COLOR_FOREGROUND, "GIMP_GRADIENT_COLOR_FOREGROUND", "foreground" },
{ GIMP_GRADIENT_COLOR_FOREGROUND_TRANSPARENT, "GIMP_GRADIENT_COLOR_FOREGROUND_TRANSPARENT", "foreground-transparent" },
{ GIMP_GRADIENT_COLOR_BACKGROUND, "GIMP_GRADIENT_COLOR_BACKGROUND", "background" },
{ GIMP_GRADIENT_COLOR_BACKGROUND_TRANSPARENT, "GIMP_GRADIENT_COLOR_BACKGROUND_TRANSPARENT", "background-transparent" },
{ 0, NULL, NULL }
};
static const GimpEnumDesc descs[] =
{
{ GIMP_GRADIENT_COLOR_FIXED, "GIMP_GRADIENT_COLOR_FIXED", NULL },
{ GIMP_GRADIENT_COLOR_FOREGROUND, "GIMP_GRADIENT_COLOR_FOREGROUND", NULL },
{ GIMP_GRADIENT_COLOR_FOREGROUND_TRANSPARENT, "GIMP_GRADIENT_COLOR_FOREGROUND_TRANSPARENT", NULL },
{ GIMP_GRADIENT_COLOR_BACKGROUND, "GIMP_GRADIENT_COLOR_BACKGROUND", NULL },
{ GIMP_GRADIENT_COLOR_BACKGROUND_TRANSPARENT, "GIMP_GRADIENT_COLOR_BACKGROUND_TRANSPARENT", NULL },
{ 0, NULL, NULL }
};
static GType type = 0;
if (G_UNLIKELY (! type))
Changed GimpViewable preview rendering to have a context to get 2006-08-29 Michael Natterer <mitch@gimp.org> Changed GimpViewable preview rendering to have a context to get FG/BG/whatever from. Use the context to enable dynamic FG/BG colors in gradients. Fixes bug #127676 and bug #352214. Addresses bug #128367 (doesn't fix it because there's no loading/saving and no GUI yet). * app/core/core-enums.[ch]: added enum GimpGradientColor to enable specifying gradient colors in terms of foreground and background. * app/core/gimpgradient.[ch]: added color_type members to the GimpGradientSegment struct and honor them in gimp_gradient_get_color_at(). Added GimpContext parameters to all functions which finally call get_color_at(). * app/core/gimp-gradients.c: use the new method to implement the builtin gradients. * app/core/gimpviewable.[ch]: added GimpContext parameters to all get_preview() and get_pixbuf() functions. * app/core/gimpbrush.c * app/core/gimpbuffer.c * app/core/gimpdrawable-preview.[ch] * app/core/gimpgradient.c * app/core/gimpimage-preview.[ch] * app/core/gimpimagefile.c * app/core/gimppalette.c * app/core/gimppattern.c * app/core/gimpundo.[ch] * app/text/gimpfont.c * app/vectors/gimpvectors-preview.[ch]: changed ::get_preview() and ::get_pixbuf() implementations accordingly. * app/core/gimpdrawable-blend.c * app/core/gimppalette-import.[ch] * app/dialogs/dialogs-constructors.c * app/dialogs/palette-import-dialog.c * app/dialogs/resize-dialog.c * app/display/gimpdisplayshell-layer-select.c * app/display/gimpdisplayshell.c * app/display/gimpnavigationeditor.c * app/paint/gimppaintoptions.c * app/tools/gimpeditselectiontool.c * app/tools/gimptexttool.c * app/actions/gradient-editor-commands.c * app/widgets/gimpaction.c * app/widgets/gimpbrusheditor.[ch] * app/widgets/gimpbufferview.c * app/widgets/gimpcellrendererviewable.c * app/widgets/gimpchanneltreeview.c * app/widgets/gimpclipboard.c * app/widgets/gimpcoloreditor.c * app/widgets/gimpcomponenteditor.c * app/widgets/gimpcontainerbox.c * app/widgets/gimpcontainercombobox.c * app/widgets/gimpcontainereditor.c * app/widgets/gimpcontainerentry.c * app/widgets/gimpcontainergridview.c * app/widgets/gimpcontainertreeview.[ch] * app/widgets/gimpdataeditor.[ch] * app/widgets/gimpdevicestatus.c * app/widgets/gimpdnd.[ch] * app/widgets/gimpdrawabletreeview.c * app/widgets/gimpfiledialog.c * app/widgets/gimpgradienteditor.[ch] * app/widgets/gimpgradientselect.c * app/widgets/gimpitemtreeview.c * app/widgets/gimplayertreeview.c * app/widgets/gimppaletteeditor.[ch] * app/widgets/gimppropwidgets.[ch] * app/widgets/gimpselectioneditor.c * app/widgets/gimpthumbbox.[ch] * app/widgets/gimptoolbox-image-area.c * app/widgets/gimptoolbox-indicator-area.c * app/widgets/gimptooloptionseditor.c * app/widgets/gimpundoeditor.c * app/widgets/gimpvectorstreeview.c * app/widgets/gimpview-popup.[ch] * app/widgets/gimpview.[ch] * app/widgets/gimpviewablebutton.c * app/widgets/gimpviewabledialog.c * app/widgets/gimpviewrenderer.[ch] * app/widgets/gimpviewrenderer-frame.c * app/widgets/gimpviewrendererbrush.c * app/widgets/gimpviewrendererbuffer.c * app/widgets/gimpviewrendererdrawable.c * app/widgets/gimpviewrenderergradient.c * app/widgets/gimpviewrendererimage.c * tools/pdbgen/pdb/drawable.pdb * tools/pdbgen/pdb/gradient.pdb * tools/pdbgen/pdb/gradients.pdb * tools/pdbgen/pdb/image.pdb: added tons of GimpContext members and parameters, implement GimpDocked::set_context() in many widgets. Pass these locally remembered contexts to GimpViewable functions. Did some minor cleanups on the way. There are still some minor FIXMEs around where the code uses a NULL context (which is allowed by the APIs) * app/pdb/drawable_cmds.c * app/pdb/gradient_cmds.c * app/pdb/gradients_cmds.c * app/pdb/image_cmds.c: regenerated.
2006-08-30 05:44:51 +08:00
{
type = g_enum_register_static ("GimpGradientColor", values);
gimp_type_set_translation_context (type, "gradient-color");
Changed GimpViewable preview rendering to have a context to get 2006-08-29 Michael Natterer <mitch@gimp.org> Changed GimpViewable preview rendering to have a context to get FG/BG/whatever from. Use the context to enable dynamic FG/BG colors in gradients. Fixes bug #127676 and bug #352214. Addresses bug #128367 (doesn't fix it because there's no loading/saving and no GUI yet). * app/core/core-enums.[ch]: added enum GimpGradientColor to enable specifying gradient colors in terms of foreground and background. * app/core/gimpgradient.[ch]: added color_type members to the GimpGradientSegment struct and honor them in gimp_gradient_get_color_at(). Added GimpContext parameters to all functions which finally call get_color_at(). * app/core/gimp-gradients.c: use the new method to implement the builtin gradients. * app/core/gimpviewable.[ch]: added GimpContext parameters to all get_preview() and get_pixbuf() functions. * app/core/gimpbrush.c * app/core/gimpbuffer.c * app/core/gimpdrawable-preview.[ch] * app/core/gimpgradient.c * app/core/gimpimage-preview.[ch] * app/core/gimpimagefile.c * app/core/gimppalette.c * app/core/gimppattern.c * app/core/gimpundo.[ch] * app/text/gimpfont.c * app/vectors/gimpvectors-preview.[ch]: changed ::get_preview() and ::get_pixbuf() implementations accordingly. * app/core/gimpdrawable-blend.c * app/core/gimppalette-import.[ch] * app/dialogs/dialogs-constructors.c * app/dialogs/palette-import-dialog.c * app/dialogs/resize-dialog.c * app/display/gimpdisplayshell-layer-select.c * app/display/gimpdisplayshell.c * app/display/gimpnavigationeditor.c * app/paint/gimppaintoptions.c * app/tools/gimpeditselectiontool.c * app/tools/gimptexttool.c * app/actions/gradient-editor-commands.c * app/widgets/gimpaction.c * app/widgets/gimpbrusheditor.[ch] * app/widgets/gimpbufferview.c * app/widgets/gimpcellrendererviewable.c * app/widgets/gimpchanneltreeview.c * app/widgets/gimpclipboard.c * app/widgets/gimpcoloreditor.c * app/widgets/gimpcomponenteditor.c * app/widgets/gimpcontainerbox.c * app/widgets/gimpcontainercombobox.c * app/widgets/gimpcontainereditor.c * app/widgets/gimpcontainerentry.c * app/widgets/gimpcontainergridview.c * app/widgets/gimpcontainertreeview.[ch] * app/widgets/gimpdataeditor.[ch] * app/widgets/gimpdevicestatus.c * app/widgets/gimpdnd.[ch] * app/widgets/gimpdrawabletreeview.c * app/widgets/gimpfiledialog.c * app/widgets/gimpgradienteditor.[ch] * app/widgets/gimpgradientselect.c * app/widgets/gimpitemtreeview.c * app/widgets/gimplayertreeview.c * app/widgets/gimppaletteeditor.[ch] * app/widgets/gimppropwidgets.[ch] * app/widgets/gimpselectioneditor.c * app/widgets/gimpthumbbox.[ch] * app/widgets/gimptoolbox-image-area.c * app/widgets/gimptoolbox-indicator-area.c * app/widgets/gimptooloptionseditor.c * app/widgets/gimpundoeditor.c * app/widgets/gimpvectorstreeview.c * app/widgets/gimpview-popup.[ch] * app/widgets/gimpview.[ch] * app/widgets/gimpviewablebutton.c * app/widgets/gimpviewabledialog.c * app/widgets/gimpviewrenderer.[ch] * app/widgets/gimpviewrenderer-frame.c * app/widgets/gimpviewrendererbrush.c * app/widgets/gimpviewrendererbuffer.c * app/widgets/gimpviewrendererdrawable.c * app/widgets/gimpviewrenderergradient.c * app/widgets/gimpviewrendererimage.c * tools/pdbgen/pdb/drawable.pdb * tools/pdbgen/pdb/gradient.pdb * tools/pdbgen/pdb/gradients.pdb * tools/pdbgen/pdb/image.pdb: added tons of GimpContext members and parameters, implement GimpDocked::set_context() in many widgets. Pass these locally remembered contexts to GimpViewable functions. Did some minor cleanups on the way. There are still some minor FIXMEs around where the code uses a NULL context (which is allowed by the APIs) * app/pdb/drawable_cmds.c * app/pdb/gradient_cmds.c * app/pdb/gradients_cmds.c * app/pdb/image_cmds.c: regenerated.
2006-08-30 05:44:51 +08:00
gimp_enum_set_value_descriptions (type, descs);
}
return type;
}
GType
gimp_gradient_segment_type_get_type (void)
{
static const GEnumValue values[] =
{
{ GIMP_GRADIENT_SEGMENT_LINEAR, "GIMP_GRADIENT_SEGMENT_LINEAR", "linear" },
{ GIMP_GRADIENT_SEGMENT_CURVED, "GIMP_GRADIENT_SEGMENT_CURVED", "curved" },
{ GIMP_GRADIENT_SEGMENT_SINE, "GIMP_GRADIENT_SEGMENT_SINE", "sine" },
{ GIMP_GRADIENT_SEGMENT_SPHERE_INCREASING, "GIMP_GRADIENT_SEGMENT_SPHERE_INCREASING", "sphere-increasing" },
{ GIMP_GRADIENT_SEGMENT_SPHERE_DECREASING, "GIMP_GRADIENT_SEGMENT_SPHERE_DECREASING", "sphere-decreasing" },
{ 0, NULL, NULL }
};
static const GimpEnumDesc descs[] =
{
{ GIMP_GRADIENT_SEGMENT_LINEAR, "GIMP_GRADIENT_SEGMENT_LINEAR", NULL },
{ GIMP_GRADIENT_SEGMENT_CURVED, "GIMP_GRADIENT_SEGMENT_CURVED", NULL },
{ GIMP_GRADIENT_SEGMENT_SINE, "GIMP_GRADIENT_SEGMENT_SINE", NULL },
{ GIMP_GRADIENT_SEGMENT_SPHERE_INCREASING, "GIMP_GRADIENT_SEGMENT_SPHERE_INCREASING", NULL },
{ GIMP_GRADIENT_SEGMENT_SPHERE_DECREASING, "GIMP_GRADIENT_SEGMENT_SPHERE_DECREASING", NULL },
{ 0, NULL, NULL }
};
static GType type = 0;
if (G_UNLIKELY (! type))
{
type = g_enum_register_static ("GimpGradientSegmentType", values);
gimp_type_set_translation_context (type, "gradient-segment-type");
gimp_enum_set_value_descriptions (type, descs);
}
return type;
}
GType
gimp_gradient_segment_color_get_type (void)
{
static const GEnumValue values[] =
{
{ GIMP_GRADIENT_SEGMENT_RGB, "GIMP_GRADIENT_SEGMENT_RGB", "rgb" },
{ GIMP_GRADIENT_SEGMENT_HSV_CCW, "GIMP_GRADIENT_SEGMENT_HSV_CCW", "hsv-ccw" },
{ GIMP_GRADIENT_SEGMENT_HSV_CW, "GIMP_GRADIENT_SEGMENT_HSV_CW", "hsv-cw" },
{ 0, NULL, NULL }
};
static const GimpEnumDesc descs[] =
{
{ GIMP_GRADIENT_SEGMENT_RGB, "GIMP_GRADIENT_SEGMENT_RGB", NULL },
{ GIMP_GRADIENT_SEGMENT_HSV_CCW, "GIMP_GRADIENT_SEGMENT_HSV_CCW", NULL },
{ GIMP_GRADIENT_SEGMENT_HSV_CW, "GIMP_GRADIENT_SEGMENT_HSV_CW", NULL },
{ 0, NULL, NULL }
};
static GType type = 0;
if (G_UNLIKELY (! type))
{
type = g_enum_register_static ("GimpGradientSegmentColor", values);
gimp_type_set_translation_context (type, "gradient-segment-color");
gimp_enum_set_value_descriptions (type, descs);
}
return type;
}
GType
gimp_mask_apply_mode_get_type (void)
{
static const GEnumValue values[] =
{
{ GIMP_MASK_APPLY, "GIMP_MASK_APPLY", "apply" },
{ GIMP_MASK_DISCARD, "GIMP_MASK_DISCARD", "discard" },
{ 0, NULL, NULL }
};
static const GimpEnumDesc descs[] =
{
{ GIMP_MASK_APPLY, "GIMP_MASK_APPLY", NULL },
{ GIMP_MASK_DISCARD, "GIMP_MASK_DISCARD", NULL },
{ 0, NULL, NULL }
};
static GType type = 0;
if (G_UNLIKELY (! type))
{
type = g_enum_register_static ("GimpMaskApplyMode", values);
gimp_type_set_translation_context (type, "mask-apply-mode");
gimp_enum_set_value_descriptions (type, descs);
}
return type;
}
GType
gimp_merge_type_get_type (void)
{
static const GEnumValue values[] =
{
{ GIMP_EXPAND_AS_NECESSARY, "GIMP_EXPAND_AS_NECESSARY", "expand-as-necessary" },
{ GIMP_CLIP_TO_IMAGE, "GIMP_CLIP_TO_IMAGE", "clip-to-image" },
{ GIMP_CLIP_TO_BOTTOM_LAYER, "GIMP_CLIP_TO_BOTTOM_LAYER", "clip-to-bottom-layer" },
{ GIMP_FLATTEN_IMAGE, "GIMP_FLATTEN_IMAGE", "flatten-image" },
{ 0, NULL, NULL }
};
static const GimpEnumDesc descs[] =
{
{ GIMP_EXPAND_AS_NECESSARY, "GIMP_EXPAND_AS_NECESSARY", NULL },
{ GIMP_CLIP_TO_IMAGE, "GIMP_CLIP_TO_IMAGE", NULL },
{ GIMP_CLIP_TO_BOTTOM_LAYER, "GIMP_CLIP_TO_BOTTOM_LAYER", NULL },
{ GIMP_FLATTEN_IMAGE, "GIMP_FLATTEN_IMAGE", NULL },
{ 0, NULL, NULL }
};
static GType type = 0;
if (G_UNLIKELY (! type))
{
type = g_enum_register_static ("GimpMergeType", values);
gimp_type_set_translation_context (type, "merge-type");
gimp_enum_set_value_descriptions (type, descs);
}
return type;
}
GType
gimp_select_criterion_get_type (void)
{
static const GEnumValue values[] =
{
{ GIMP_SELECT_CRITERION_COMPOSITE, "GIMP_SELECT_CRITERION_COMPOSITE", "composite" },
{ GIMP_SELECT_CRITERION_R, "GIMP_SELECT_CRITERION_R", "r" },
{ GIMP_SELECT_CRITERION_G, "GIMP_SELECT_CRITERION_G", "g" },
{ GIMP_SELECT_CRITERION_B, "GIMP_SELECT_CRITERION_B", "b" },
{ GIMP_SELECT_CRITERION_H, "GIMP_SELECT_CRITERION_H", "h" },
{ GIMP_SELECT_CRITERION_S, "GIMP_SELECT_CRITERION_S", "s" },
{ GIMP_SELECT_CRITERION_V, "GIMP_SELECT_CRITERION_V", "v" },
{ 0, NULL, NULL }
};
static const GimpEnumDesc descs[] =
{
{ GIMP_SELECT_CRITERION_COMPOSITE, NC_("select-criterion", "Composite"), NULL },
{ GIMP_SELECT_CRITERION_R, NC_("select-criterion", "Red"), NULL },
{ GIMP_SELECT_CRITERION_G, NC_("select-criterion", "Green"), NULL },
{ GIMP_SELECT_CRITERION_B, NC_("select-criterion", "Blue"), NULL },
{ GIMP_SELECT_CRITERION_H, NC_("select-criterion", "Hue"), NULL },
{ GIMP_SELECT_CRITERION_S, NC_("select-criterion", "Saturation"), NULL },
{ GIMP_SELECT_CRITERION_V, NC_("select-criterion", "Value"), NULL },
{ 0, NULL, NULL }
};
static GType type = 0;
if (G_UNLIKELY (! type))
{
type = g_enum_register_static ("GimpSelectCriterion", values);
gimp_type_set_translation_context (type, "select-criterion");
gimp_enum_set_value_descriptions (type, descs);
}
return type;
}
Added message severities and make sure all messages are routed through a 2006-10-09 Michael Natterer <mitch@gimp.org> Added message severities and make sure all messages are routed through a central function, so redirecting to the error console or stderr work again: * app/core/core-enums.[ch]: added enum GimpMessageSeverity { INFO, WARNING, ERROR }. * app/core/gimp.[ch] (gimp_message) (gimp_message_valist): added severity parameter. Changed "GimpProgress *progress" parameter to "GObject *handler", where "handler" can be either a GimpProgress, a GtkWidget or NULL. * app/core/gimp-gui.[ch] (gimp_show_message): ditto. Honor --console-messages again. Always dispatch to the GUI message handler first if it exists. * app/gui/gui-message.[ch]: pass severity parameters around. (gui_message_error_dialog): if "handler" is a progress, dispatch the message to it first. If it is a widget (and *not* a progress), use a GtkMessageDialog on top of that widget's toplevel. Fall back to the usual GimpErrorDialog otherwise. * app/core/gimpprogress.[ch] (gimp_progress_message): added severity parameter. Also added boolean return value to the virtual function so it can decide to fail if it can't handle the message. * app/display/gimpdisplay.c: implement GimpProgress::message() and redirect the message to GimpDisplayShell. * app/display/gimpdisplayshell-progress.c: implement GimpProgress::message() and redirect the message to GimpStatusbar if it is not an error and if the status bar is visible. * app/display/gimpstatusbar.[ch]: implement GimpProgress::message(), but fail on messages that contain a newline. Show the right icons for the message severities (work in progress). * app/display/gimpdisplayshell.[ch]: removed gimp_display_shell_message() and its _valist() variant. * app/widgets/gimperrorconsole.[ch]: show the right icons for the message severities. * app/widgets/gimpthumbbox.c (gimp_thumb_box_progress_message): return TRUE to swallow all messages. * app/widgets/gimpwidgets-utils.[ch]: removed gimp_show_message_dialog(). Added gimp_get_message_stock_id(). * app/errors.c * app/actions/edit-commands.c * app/actions/error-console-commands.c * app/actions/file-commands.c * app/actions/select-commands.c * app/actions/text-editor-commands.c * app/actions/vectors-commands.c * app/core/gimpimage-convert.c * app/core/gimpimagefile.c * app/dialogs/convert-dialog.c * app/dialogs/file-open-dialog.c * app/dialogs/file-open-location-dialog.c * app/dialogs/file-save-dialog.c * app/dialogs/palette-import-dialog.c * app/dialogs/stroke-dialog.c * app/display/gimpdisplayshell-dnd.c * app/pdb/gimppdb.c * app/plug-in/gimpplugin.c * app/tools/gimpimagemaptool.c * app/tools/gimptool.c * app/tools/gimpvectortool.c * app/widgets/gimpactionview.c * app/widgets/gimpcontrollerlist.c * app/widgets/gimppdbdialog.c * app/widgets/gimpvectorstreeview.c * app/xcf/xcf-load.c * app/xcf/xcf-save.c * app/xcf/xcf.c * tools/pdbgen/pdb/brush.pdb * tools/pdbgen/pdb/gradient.pdb * tools/pdbgen/pdb/image.pdb * tools/pdbgen/pdb/message.pdb * tools/pdbgen/pdb/palette.pdb: added severity parameter to gimp_message() calls. Convert all calls to gimp_show_message_dialog() and gimp_display_shell_message() to gimp_message(). Also converted some more g_message() calls. * app/pdb/brush_cmds.c * app/pdb/gradient_cmds.c * app/pdb/image_cmds.c * app/pdb/message_cmds.c * app/pdb/palette_cmds.c: regenerated.
2006-10-09 16:17:22 +08:00
GType
gimp_message_severity_get_type (void)
{
static const GEnumValue values[] =
{
{ GIMP_MESSAGE_INFO, "GIMP_MESSAGE_INFO", "info" },
{ GIMP_MESSAGE_WARNING, "GIMP_MESSAGE_WARNING", "warning" },
{ GIMP_MESSAGE_ERROR, "GIMP_MESSAGE_ERROR", "error" },
{ 0, NULL, NULL }
};
static const GimpEnumDesc descs[] =
{
{ GIMP_MESSAGE_INFO, NC_("message-severity", "Message"), NULL },
{ GIMP_MESSAGE_WARNING, NC_("message-severity", "Warning"), NULL },
{ GIMP_MESSAGE_ERROR, NC_("message-severity", "Error"), NULL },
Added message severities and make sure all messages are routed through a 2006-10-09 Michael Natterer <mitch@gimp.org> Added message severities and make sure all messages are routed through a central function, so redirecting to the error console or stderr work again: * app/core/core-enums.[ch]: added enum GimpMessageSeverity { INFO, WARNING, ERROR }. * app/core/gimp.[ch] (gimp_message) (gimp_message_valist): added severity parameter. Changed "GimpProgress *progress" parameter to "GObject *handler", where "handler" can be either a GimpProgress, a GtkWidget or NULL. * app/core/gimp-gui.[ch] (gimp_show_message): ditto. Honor --console-messages again. Always dispatch to the GUI message handler first if it exists. * app/gui/gui-message.[ch]: pass severity parameters around. (gui_message_error_dialog): if "handler" is a progress, dispatch the message to it first. If it is a widget (and *not* a progress), use a GtkMessageDialog on top of that widget's toplevel. Fall back to the usual GimpErrorDialog otherwise. * app/core/gimpprogress.[ch] (gimp_progress_message): added severity parameter. Also added boolean return value to the virtual function so it can decide to fail if it can't handle the message. * app/display/gimpdisplay.c: implement GimpProgress::message() and redirect the message to GimpDisplayShell. * app/display/gimpdisplayshell-progress.c: implement GimpProgress::message() and redirect the message to GimpStatusbar if it is not an error and if the status bar is visible. * app/display/gimpstatusbar.[ch]: implement GimpProgress::message(), but fail on messages that contain a newline. Show the right icons for the message severities (work in progress). * app/display/gimpdisplayshell.[ch]: removed gimp_display_shell_message() and its _valist() variant. * app/widgets/gimperrorconsole.[ch]: show the right icons for the message severities. * app/widgets/gimpthumbbox.c (gimp_thumb_box_progress_message): return TRUE to swallow all messages. * app/widgets/gimpwidgets-utils.[ch]: removed gimp_show_message_dialog(). Added gimp_get_message_stock_id(). * app/errors.c * app/actions/edit-commands.c * app/actions/error-console-commands.c * app/actions/file-commands.c * app/actions/select-commands.c * app/actions/text-editor-commands.c * app/actions/vectors-commands.c * app/core/gimpimage-convert.c * app/core/gimpimagefile.c * app/dialogs/convert-dialog.c * app/dialogs/file-open-dialog.c * app/dialogs/file-open-location-dialog.c * app/dialogs/file-save-dialog.c * app/dialogs/palette-import-dialog.c * app/dialogs/stroke-dialog.c * app/display/gimpdisplayshell-dnd.c * app/pdb/gimppdb.c * app/plug-in/gimpplugin.c * app/tools/gimpimagemaptool.c * app/tools/gimptool.c * app/tools/gimpvectortool.c * app/widgets/gimpactionview.c * app/widgets/gimpcontrollerlist.c * app/widgets/gimppdbdialog.c * app/widgets/gimpvectorstreeview.c * app/xcf/xcf-load.c * app/xcf/xcf-save.c * app/xcf/xcf.c * tools/pdbgen/pdb/brush.pdb * tools/pdbgen/pdb/gradient.pdb * tools/pdbgen/pdb/image.pdb * tools/pdbgen/pdb/message.pdb * tools/pdbgen/pdb/palette.pdb: added severity parameter to gimp_message() calls. Convert all calls to gimp_show_message_dialog() and gimp_display_shell_message() to gimp_message(). Also converted some more g_message() calls. * app/pdb/brush_cmds.c * app/pdb/gradient_cmds.c * app/pdb/image_cmds.c * app/pdb/message_cmds.c * app/pdb/palette_cmds.c: regenerated.
2006-10-09 16:17:22 +08:00
{ 0, NULL, NULL }
};
static GType type = 0;
if (G_UNLIKELY (! type))
Added message severities and make sure all messages are routed through a 2006-10-09 Michael Natterer <mitch@gimp.org> Added message severities and make sure all messages are routed through a central function, so redirecting to the error console or stderr work again: * app/core/core-enums.[ch]: added enum GimpMessageSeverity { INFO, WARNING, ERROR }. * app/core/gimp.[ch] (gimp_message) (gimp_message_valist): added severity parameter. Changed "GimpProgress *progress" parameter to "GObject *handler", where "handler" can be either a GimpProgress, a GtkWidget or NULL. * app/core/gimp-gui.[ch] (gimp_show_message): ditto. Honor --console-messages again. Always dispatch to the GUI message handler first if it exists. * app/gui/gui-message.[ch]: pass severity parameters around. (gui_message_error_dialog): if "handler" is a progress, dispatch the message to it first. If it is a widget (and *not* a progress), use a GtkMessageDialog on top of that widget's toplevel. Fall back to the usual GimpErrorDialog otherwise. * app/core/gimpprogress.[ch] (gimp_progress_message): added severity parameter. Also added boolean return value to the virtual function so it can decide to fail if it can't handle the message. * app/display/gimpdisplay.c: implement GimpProgress::message() and redirect the message to GimpDisplayShell. * app/display/gimpdisplayshell-progress.c: implement GimpProgress::message() and redirect the message to GimpStatusbar if it is not an error and if the status bar is visible. * app/display/gimpstatusbar.[ch]: implement GimpProgress::message(), but fail on messages that contain a newline. Show the right icons for the message severities (work in progress). * app/display/gimpdisplayshell.[ch]: removed gimp_display_shell_message() and its _valist() variant. * app/widgets/gimperrorconsole.[ch]: show the right icons for the message severities. * app/widgets/gimpthumbbox.c (gimp_thumb_box_progress_message): return TRUE to swallow all messages. * app/widgets/gimpwidgets-utils.[ch]: removed gimp_show_message_dialog(). Added gimp_get_message_stock_id(). * app/errors.c * app/actions/edit-commands.c * app/actions/error-console-commands.c * app/actions/file-commands.c * app/actions/select-commands.c * app/actions/text-editor-commands.c * app/actions/vectors-commands.c * app/core/gimpimage-convert.c * app/core/gimpimagefile.c * app/dialogs/convert-dialog.c * app/dialogs/file-open-dialog.c * app/dialogs/file-open-location-dialog.c * app/dialogs/file-save-dialog.c * app/dialogs/palette-import-dialog.c * app/dialogs/stroke-dialog.c * app/display/gimpdisplayshell-dnd.c * app/pdb/gimppdb.c * app/plug-in/gimpplugin.c * app/tools/gimpimagemaptool.c * app/tools/gimptool.c * app/tools/gimpvectortool.c * app/widgets/gimpactionview.c * app/widgets/gimpcontrollerlist.c * app/widgets/gimppdbdialog.c * app/widgets/gimpvectorstreeview.c * app/xcf/xcf-load.c * app/xcf/xcf-save.c * app/xcf/xcf.c * tools/pdbgen/pdb/brush.pdb * tools/pdbgen/pdb/gradient.pdb * tools/pdbgen/pdb/image.pdb * tools/pdbgen/pdb/message.pdb * tools/pdbgen/pdb/palette.pdb: added severity parameter to gimp_message() calls. Convert all calls to gimp_show_message_dialog() and gimp_display_shell_message() to gimp_message(). Also converted some more g_message() calls. * app/pdb/brush_cmds.c * app/pdb/gradient_cmds.c * app/pdb/image_cmds.c * app/pdb/message_cmds.c * app/pdb/palette_cmds.c: regenerated.
2006-10-09 16:17:22 +08:00
{
type = g_enum_register_static ("GimpMessageSeverity", values);
gimp_type_set_translation_context (type, "message-severity");
Added message severities and make sure all messages are routed through a 2006-10-09 Michael Natterer <mitch@gimp.org> Added message severities and make sure all messages are routed through a central function, so redirecting to the error console or stderr work again: * app/core/core-enums.[ch]: added enum GimpMessageSeverity { INFO, WARNING, ERROR }. * app/core/gimp.[ch] (gimp_message) (gimp_message_valist): added severity parameter. Changed "GimpProgress *progress" parameter to "GObject *handler", where "handler" can be either a GimpProgress, a GtkWidget or NULL. * app/core/gimp-gui.[ch] (gimp_show_message): ditto. Honor --console-messages again. Always dispatch to the GUI message handler first if it exists. * app/gui/gui-message.[ch]: pass severity parameters around. (gui_message_error_dialog): if "handler" is a progress, dispatch the message to it first. If it is a widget (and *not* a progress), use a GtkMessageDialog on top of that widget's toplevel. Fall back to the usual GimpErrorDialog otherwise. * app/core/gimpprogress.[ch] (gimp_progress_message): added severity parameter. Also added boolean return value to the virtual function so it can decide to fail if it can't handle the message. * app/display/gimpdisplay.c: implement GimpProgress::message() and redirect the message to GimpDisplayShell. * app/display/gimpdisplayshell-progress.c: implement GimpProgress::message() and redirect the message to GimpStatusbar if it is not an error and if the status bar is visible. * app/display/gimpstatusbar.[ch]: implement GimpProgress::message(), but fail on messages that contain a newline. Show the right icons for the message severities (work in progress). * app/display/gimpdisplayshell.[ch]: removed gimp_display_shell_message() and its _valist() variant. * app/widgets/gimperrorconsole.[ch]: show the right icons for the message severities. * app/widgets/gimpthumbbox.c (gimp_thumb_box_progress_message): return TRUE to swallow all messages. * app/widgets/gimpwidgets-utils.[ch]: removed gimp_show_message_dialog(). Added gimp_get_message_stock_id(). * app/errors.c * app/actions/edit-commands.c * app/actions/error-console-commands.c * app/actions/file-commands.c * app/actions/select-commands.c * app/actions/text-editor-commands.c * app/actions/vectors-commands.c * app/core/gimpimage-convert.c * app/core/gimpimagefile.c * app/dialogs/convert-dialog.c * app/dialogs/file-open-dialog.c * app/dialogs/file-open-location-dialog.c * app/dialogs/file-save-dialog.c * app/dialogs/palette-import-dialog.c * app/dialogs/stroke-dialog.c * app/display/gimpdisplayshell-dnd.c * app/pdb/gimppdb.c * app/plug-in/gimpplugin.c * app/tools/gimpimagemaptool.c * app/tools/gimptool.c * app/tools/gimpvectortool.c * app/widgets/gimpactionview.c * app/widgets/gimpcontrollerlist.c * app/widgets/gimppdbdialog.c * app/widgets/gimpvectorstreeview.c * app/xcf/xcf-load.c * app/xcf/xcf-save.c * app/xcf/xcf.c * tools/pdbgen/pdb/brush.pdb * tools/pdbgen/pdb/gradient.pdb * tools/pdbgen/pdb/image.pdb * tools/pdbgen/pdb/message.pdb * tools/pdbgen/pdb/palette.pdb: added severity parameter to gimp_message() calls. Convert all calls to gimp_show_message_dialog() and gimp_display_shell_message() to gimp_message(). Also converted some more g_message() calls. * app/pdb/brush_cmds.c * app/pdb/gradient_cmds.c * app/pdb/image_cmds.c * app/pdb/message_cmds.c * app/pdb/palette_cmds.c: regenerated.
2006-10-09 16:17:22 +08:00
gimp_enum_set_value_descriptions (type, descs);
}
return type;
}
GType
gimp_color_profile_policy_get_type (void)
{
static const GEnumValue values[] =
{
{ GIMP_COLOR_PROFILE_POLICY_ASK, "GIMP_COLOR_PROFILE_POLICY_ASK", "ask" },
{ GIMP_COLOR_PROFILE_POLICY_KEEP, "GIMP_COLOR_PROFILE_POLICY_KEEP", "keep" },
{ GIMP_COLOR_PROFILE_POLICY_CONVERT, "GIMP_COLOR_PROFILE_POLICY_CONVERT", "convert" },
{ 0, NULL, NULL }
};
static const GimpEnumDesc descs[] =
{
{ GIMP_COLOR_PROFILE_POLICY_ASK, NC_("color-profile-policy", "Ask what to do"), NULL },
{ GIMP_COLOR_PROFILE_POLICY_KEEP, NC_("color-profile-policy", "Keep embedded profile"), NULL },
{ GIMP_COLOR_PROFILE_POLICY_CONVERT, NC_("color-profile-policy", "Convert to RGB workspace"), NULL },
{ 0, NULL, NULL }
};
static GType type = 0;
if (G_UNLIKELY (! type))
{
type = g_enum_register_static ("GimpColorProfilePolicy", values);
gimp_type_set_translation_context (type, "color-profile-policy");
gimp_enum_set_value_descriptions (type, descs);
}
return type;
}
2003-02-13 01:11:34 +08:00
/* Generated data ends here */