mirror of https://github.com/GNOME/gimp.git
app/core/gimpcontext.c app/core/gimpimage.c app/paint-funcs/paint-funcs.c
2006-04-06 Sven Neumann <sven@gimp.org> * app/core/gimpcontext.c * app/core/gimpimage.c * app/paint-funcs/paint-funcs.c * app/widgets/gimpcontrollerkeyboard.c * app/widgets/gimpcontrollerwheel.c * app/widgets/gimpcursor.c * app/widgets/gimpdockable.c * app/widgets/gimpdockbook.c * app/widgets/gimpdockseparator.c * libgimp/gimpbrushselect.c * libgimp/gimpfontselect.c * libgimp/gimpgradientselect.c * libgimp/gimppaletteselect.c * libgimp/gimppatternselect.c * libgimpwidgets/gimpchainbutton.c * libgimpwidgets/gimpcolorscales.c * libgimpwidgets/gimpcolorselect.c * libgimpwidgets/gimppickbutton.c * libgimpwidgets/gimpstock.c: sprinkled some const qualifiers.
This commit is contained in:
parent
6f8f925c69
commit
37da566934
22
ChangeLog
22
ChangeLog
|
@ -1,3 +1,25 @@
|
|||
2006-04-06 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* app/core/gimpcontext.c
|
||||
* app/core/gimpimage.c
|
||||
* app/paint-funcs/paint-funcs.c
|
||||
* app/widgets/gimpcontrollerkeyboard.c
|
||||
* app/widgets/gimpcontrollerwheel.c
|
||||
* app/widgets/gimpcursor.c
|
||||
* app/widgets/gimpdockable.c
|
||||
* app/widgets/gimpdockbook.c
|
||||
* app/widgets/gimpdockseparator.c
|
||||
* libgimp/gimpbrushselect.c
|
||||
* libgimp/gimpfontselect.c
|
||||
* libgimp/gimpgradientselect.c
|
||||
* libgimp/gimppaletteselect.c
|
||||
* libgimp/gimppatternselect.c
|
||||
* libgimpwidgets/gimpchainbutton.c
|
||||
* libgimpwidgets/gimpcolorscales.c
|
||||
* libgimpwidgets/gimpcolorselect.c
|
||||
* libgimpwidgets/gimppickbutton.c
|
||||
* libgimpwidgets/gimpstock.c: sprinkled some const qualifiers.
|
||||
|
||||
2006-04-06 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* app/core/gimpdata.c (gimp_data_error_quark)
|
||||
|
|
|
@ -279,7 +279,7 @@ enum
|
|||
LAST_SIGNAL
|
||||
};
|
||||
|
||||
static gchar *gimp_context_prop_names[] =
|
||||
static const gchar *gimp_context_prop_names[] =
|
||||
{
|
||||
NULL, /* PROP_0 */
|
||||
"gimp",
|
||||
|
|
|
@ -179,7 +179,7 @@ static void gimp_image_channel_color_changed (GimpChannel *channel,
|
|||
GimpImage *image);
|
||||
|
||||
|
||||
static gint valid_combinations[][MAX_CHANNELS + 1] =
|
||||
static const gint valid_combinations[][MAX_CHANNELS + 1] =
|
||||
{
|
||||
/* GIMP_RGB_IMAGE */
|
||||
{ -1, -1, -1, COMBINE_INTEN_INTEN, COMBINE_INTEN_INTEN_A },
|
||||
|
|
|
@ -47,9 +47,10 @@
|
|||
typedef struct _LayerMode LayerMode;
|
||||
struct _LayerMode
|
||||
{
|
||||
guint affect_alpha : 1; /* does the layer mode affect the alpha channel */
|
||||
guint increase_opacity : 1; /* layer mode can increase opacity */
|
||||
guint decrease_opacity : 1; /* layer mode can decrease opacity */
|
||||
const guint affect_alpha : 1; /* does the layer mode affect the
|
||||
alpha channel */
|
||||
const guint increase_opacity : 1; /* layer mode can increase opacity */
|
||||
const guint decrease_opacity : 1; /* layer mode can decrease opacity */
|
||||
};
|
||||
|
||||
static const LayerMode layer_modes[] =
|
||||
|
@ -86,8 +87,10 @@ static const LayerMode layer_modes[] =
|
|||
{ TRUE, TRUE, FALSE, } /* GIMP_ANTI_ERASE_MODE */
|
||||
};
|
||||
|
||||
|
||||
typedef void (* LayerModeFunc) (struct apply_layer_mode_struct *);
|
||||
static LayerModeFunc layer_mode_funcs[] =
|
||||
|
||||
static const LayerModeFunc layer_mode_funcs[] =
|
||||
{
|
||||
layer_normal_mode,
|
||||
layer_dissolve_mode,
|
||||
|
|
|
@ -40,10 +40,10 @@ typedef struct _KeyboardEvent KeyboardEvent;
|
|||
|
||||
struct _KeyboardEvent
|
||||
{
|
||||
guint keyval;
|
||||
GdkModifierType modifiers;
|
||||
const gchar *name;
|
||||
gchar *blurb;
|
||||
const guint keyval;
|
||||
const GdkModifierType modifiers;
|
||||
const gchar *name;
|
||||
gchar *blurb;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -39,10 +39,10 @@ typedef struct _WheelEvent WheelEvent;
|
|||
|
||||
struct _WheelEvent
|
||||
{
|
||||
GdkScrollDirection direction;
|
||||
GdkModifierType modifiers;
|
||||
const gchar *name;
|
||||
gchar *blurb;
|
||||
const GdkScrollDirection direction;
|
||||
const GdkModifierType modifiers;
|
||||
const gchar *name;
|
||||
gchar *blurb;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -140,10 +140,10 @@ typedef struct _GimpCursor GimpCursor;
|
|||
|
||||
struct _GimpCursor
|
||||
{
|
||||
guchar *bits;
|
||||
guchar *mask_bits;
|
||||
gint width, height;
|
||||
gint x_hot, y_hot;
|
||||
const guchar *bits;
|
||||
const guchar *mask_bits;
|
||||
const gint width, height;
|
||||
const gint x_hot, y_hot;
|
||||
const guint8 *pixbuf_data;
|
||||
|
||||
GdkBitmap *bitmap;
|
||||
|
@ -166,7 +166,7 @@ static GimpCursor gimp_cursors[] =
|
|||
cursor_mouse_bits, cursor_mouse_mask_bits,
|
||||
cursor_mouse_width, cursor_mouse_height,
|
||||
cursor_mouse_x_hot, cursor_mouse_y_hot,
|
||||
cursor_mouse,
|
||||
cursor_mouse, NULL, NULL, NULL
|
||||
},
|
||||
{
|
||||
cursor_crosshair_bits, cursor_crosshair_mask_bits,
|
||||
|
|
|
@ -94,7 +94,7 @@ G_DEFINE_TYPE (GimpDockable, gimp_dockable, GTK_TYPE_BIN);
|
|||
|
||||
#define parent_class gimp_dockable_parent_class
|
||||
|
||||
static GtkTargetEntry dialog_target_table[] = { GIMP_TARGET_DIALOG };
|
||||
static const GtkTargetEntry dialog_target_table[] = { GIMP_TARGET_DIALOG };
|
||||
|
||||
|
||||
static void
|
||||
|
|
|
@ -101,10 +101,7 @@ G_DEFINE_TYPE (GimpDockbook, gimp_dockbook, GTK_TYPE_NOTEBOOK);
|
|||
|
||||
static guint dockbook_signals[LAST_SIGNAL] = { 0 };
|
||||
|
||||
static GtkTargetEntry dialog_target_table[] =
|
||||
{
|
||||
GIMP_TARGET_DIALOG
|
||||
};
|
||||
static const GtkTargetEntry dialog_target_table[] = { GIMP_TARGET_DIALOG };
|
||||
|
||||
|
||||
static void
|
||||
|
|
|
@ -67,7 +67,7 @@ G_DEFINE_TYPE (GimpDockSeparator, gimp_dock_separator, GTK_TYPE_EVENT_BOX);
|
|||
|
||||
#define parent_class gimp_dock_separator_parent_class
|
||||
|
||||
static GtkTargetEntry dialog_target_table[] = { GIMP_TARGET_DIALOG };
|
||||
static const GtkTargetEntry dialog_target_table[] = { GIMP_TARGET_DIALOG };
|
||||
|
||||
|
||||
static void
|
||||
|
|
|
@ -69,7 +69,7 @@ gimp_brush_select_new (const gchar *title,
|
|||
GimpRunBrushCallback callback,
|
||||
gpointer data)
|
||||
{
|
||||
static GimpParamDef args[] =
|
||||
static const GimpParamDef args[] =
|
||||
{
|
||||
{ GIMP_PDB_STRING, "str", "String" },
|
||||
{ GIMP_PDB_FLOAT, "opacity", "Opacity" },
|
||||
|
|
|
@ -60,7 +60,7 @@ gimp_font_select_new (const gchar *title,
|
|||
GimpRunFontCallback callback,
|
||||
gpointer data)
|
||||
{
|
||||
static GimpParamDef args[] =
|
||||
static const GimpParamDef args[] =
|
||||
{
|
||||
{ GIMP_PDB_STRING, "str", "String" },
|
||||
{ GIMP_PDB_INT32, "dialog status", "If the dialog was closing "
|
||||
|
|
|
@ -63,7 +63,7 @@ gimp_gradient_select_new (const gchar *title,
|
|||
GimpRunGradientCallback callback,
|
||||
gpointer data)
|
||||
{
|
||||
static GimpParamDef args[] =
|
||||
static const GimpParamDef args[] =
|
||||
{
|
||||
{ GIMP_PDB_STRING, "str", "String" },
|
||||
{ GIMP_PDB_INT32, "grad width", "Gradient width" },
|
||||
|
|
|
@ -60,7 +60,7 @@ gimp_palette_select_new (const gchar *title,
|
|||
GimpRunPaletteCallback callback,
|
||||
gpointer data)
|
||||
{
|
||||
static GimpParamDef args[] =
|
||||
static const GimpParamDef args[] =
|
||||
{
|
||||
{ GIMP_PDB_STRING, "str", "String" },
|
||||
{ GIMP_PDB_INT32, "dialog status", "If the dialog was closing "
|
||||
|
|
|
@ -64,7 +64,7 @@ gimp_pattern_select_new (const gchar *title,
|
|||
GimpRunPatternCallback callback,
|
||||
gpointer data)
|
||||
{
|
||||
static GimpParamDef args[] =
|
||||
static const GimpParamDef args[] =
|
||||
{
|
||||
{ GIMP_PDB_STRING, "str", "String" },
|
||||
{ GIMP_PDB_INT32, "mask width", "Pattern width" },
|
||||
|
|
|
@ -48,7 +48,7 @@ G_DEFINE_TYPE (GimpChainButton, gimp_chain_button, GTK_TYPE_TABLE);
|
|||
|
||||
static guint gimp_chain_button_signals[LAST_SIGNAL] = { 0 };
|
||||
|
||||
static const gchar *gimp_chain_stock_items[] =
|
||||
static const gchar * const gimp_chain_stock_items[] =
|
||||
{
|
||||
GIMP_STOCK_HCHAIN,
|
||||
GIMP_STOCK_HCHAIN_BROKEN,
|
||||
|
|
|
@ -114,9 +114,12 @@ gimp_color_scales_init (GimpColorScales *scales)
|
|||
GSList *group;
|
||||
gint i;
|
||||
|
||||
static gdouble slider_initial_vals[] = { 0, 0, 0, 0, 0, 0, 0 };
|
||||
static gdouble slider_max_vals[] = { 360, 100, 100, 255, 255, 255, 100 };
|
||||
static gdouble slider_incs[] = { 30, 10, 10, 16, 16, 16, 10 };
|
||||
static const gdouble slider_initial_vals[] =
|
||||
{ 0, 0, 0, 0, 0, 0, 0 };
|
||||
static const gdouble slider_max_vals[] =
|
||||
{ 360, 100, 100, 255, 255, 255, 100 };
|
||||
static const gdouble slider_incs[] =
|
||||
{ 30, 10, 10, 16, 16, 16, 10 };
|
||||
|
||||
/* don't needs the toggles for our own operation */
|
||||
selector->toggles_visible = FALSE;
|
||||
|
|
|
@ -197,7 +197,7 @@ G_DEFINE_TYPE (GimpColorSelect, gimp_color_select, GIMP_TYPE_COLOR_SELECTOR);
|
|||
|
||||
#define parent_class gimp_color_select_parent_class
|
||||
|
||||
static ColorSelectFillUpdateProc update_procs[] =
|
||||
static const ColorSelectFillUpdateProc update_procs[] =
|
||||
{
|
||||
color_select_update_hue,
|
||||
color_select_update_saturation,
|
||||
|
|
|
@ -157,7 +157,7 @@ gimp_pick_button_new (void)
|
|||
#define DROPPER_X_HOT 2
|
||||
#define DROPPER_Y_HOT 16
|
||||
|
||||
static guchar dropper_bits[] =
|
||||
static const guchar dropper_bits[] =
|
||||
{
|
||||
0xff, 0x8f, 0x01, 0xff, 0x77, 0x01, 0xff, 0xfb, 0x00, 0xff, 0xf8, 0x00,
|
||||
0x7f, 0xff, 0x00, 0xff, 0x7e, 0x01, 0xff, 0x9d, 0x01, 0xff, 0xd8, 0x01,
|
||||
|
@ -166,7 +166,7 @@ static guchar dropper_bits[] =
|
|||
0xff, 0xff, 0x01
|
||||
};
|
||||
|
||||
static guchar dropper_mask[] =
|
||||
static const guchar dropper_mask[] =
|
||||
{
|
||||
0x00, 0x70, 0x00, 0x00, 0xf8, 0x00, 0x00, 0xfc, 0x01, 0x00, 0xff, 0x01,
|
||||
0x80, 0xff, 0x01, 0x00, 0xff, 0x00, 0x00, 0x7f, 0x00, 0x80, 0x3f, 0x00,
|
||||
|
@ -178,9 +178,9 @@ static guchar dropper_mask[] =
|
|||
static GdkCursor *
|
||||
make_cursor (void)
|
||||
{
|
||||
GdkCursor *cursor;
|
||||
GdkColor bg = { 0, 0xffff, 0xffff, 0xffff };
|
||||
GdkColor fg = { 0, 0x0000, 0x0000, 0x0000 };
|
||||
GdkCursor *cursor;
|
||||
const GdkColor bg = { 0, 0xffff, 0xffff, 0xffff };
|
||||
const GdkColor fg = { 0, 0x0000, 0x0000, 0x0000 };
|
||||
|
||||
GdkPixmap *pixmap =
|
||||
gdk_bitmap_create_from_data (NULL,
|
||||
|
|
|
@ -108,7 +108,7 @@ add_sized_with_same_fallback (GtkIconFactory *factory,
|
|||
}
|
||||
|
||||
|
||||
static GtkStockItem gimp_stock_items[] =
|
||||
static const GtkStockItem gimp_stock_items[] =
|
||||
{
|
||||
{ GIMP_STOCK_ANCHOR, N_("Anchor"), 0, 0, LIBGIMP_DOMAIN },
|
||||
{ GIMP_STOCK_CENTER, N_("C_enter"), 0, 0, LIBGIMP_DOMAIN },
|
||||
|
@ -445,7 +445,7 @@ gimp_stock_button_pixbufs[] =
|
|||
{ GIMP_STOCK_VIDEO, stock_video_24 }
|
||||
};
|
||||
|
||||
static struct
|
||||
static const struct
|
||||
{
|
||||
const gchar *stock_id;
|
||||
gconstpointer inline_data;
|
||||
|
@ -600,7 +600,7 @@ gimp_stock_menu_pixbufs[] =
|
|||
{ GIMP_STOCK_JOIN_BEVEL, stock_join_bevel_16 }
|
||||
};
|
||||
|
||||
static struct
|
||||
static const struct
|
||||
{
|
||||
const gchar *stock_id;
|
||||
gconstpointer inline_data;
|
||||
|
@ -621,7 +621,7 @@ gimp_stock_dnd_pixbufs[] =
|
|||
{ GIMP_STOCK_FLOATING_SELECTION, stock_floating_selection_32 }
|
||||
};
|
||||
|
||||
static struct
|
||||
static const struct
|
||||
{
|
||||
const gchar *stock_id;
|
||||
gconstpointer inline_data;
|
||||
|
@ -652,7 +652,7 @@ gimp_stock_dialog_pixbufs[] =
|
|||
{ GIMP_STOCK_TEXTURE, stock_texture_64 }
|
||||
};
|
||||
|
||||
static struct
|
||||
static const struct
|
||||
{
|
||||
const gchar *stock_id;
|
||||
gconstpointer inline_data_ltr;
|
||||
|
|
Loading…
Reference in New Issue