app/core/gimpimagefile.c app/tools/gimpaligntool.c

2008-05-17  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpimagefile.c
	* app/tools/gimpaligntool.c
	* app/tools/gimpselectiontool.c
	* app/tools/gimpvectortool.c
	* plug-ins/color-rotate/color-rotate-dialog.c
	* plug-ins/common/noise-rgb.c
	* plug-ins/common/value-propagate.c
	* plug-ins/gfig/gfig-dialog.c
	* plug-ins/gfig/gfig.h
	* plug-ins/gimpressionist/general.c
	* plug-ins/gimpressionist/gimpressionist.h
	* plug-ins/gimpressionist/orientation.c
	* plug-ins/gimpressionist/size.c
	* plug-ins/gimpressionist/utils.c
	* plug-ins/gradient-flare/gradient-flare.c
	* plug-ins/ifs-compose/ifs-compose.c
	* plug-ins/imagemap/imap_main.c
	* plug-ins/imagemap/imap_preferences.c: in latest GLib _() returns
	"const gchar*" as it should. Add const qualifiers to local utility
	functions and some explicit casts to fix the warnings caused by
	this.


svn path=/trunk/; revision=25685
This commit is contained in:
Michael Natterer 2008-05-17 13:08:19 +00:00 committed by Michael Natterer
parent fe395446aa
commit e801795022
19 changed files with 110 additions and 70 deletions

View File

@ -1,3 +1,27 @@
2008-05-17 Michael Natterer <mitch@gimp.org>
* app/core/gimpimagefile.c
* app/tools/gimpaligntool.c
* app/tools/gimpselectiontool.c
* app/tools/gimpvectortool.c
* plug-ins/color-rotate/color-rotate-dialog.c
* plug-ins/common/noise-rgb.c
* plug-ins/common/value-propagate.c
* plug-ins/gfig/gfig-dialog.c
* plug-ins/gfig/gfig.h
* plug-ins/gimpressionist/general.c
* plug-ins/gimpressionist/gimpressionist.h
* plug-ins/gimpressionist/orientation.c
* plug-ins/gimpressionist/size.c
* plug-ins/gimpressionist/utils.c
* plug-ins/gradient-flare/gradient-flare.c
* plug-ins/ifs-compose/ifs-compose.c
* plug-ins/imagemap/imap_main.c
* plug-ins/imagemap/imap_preferences.c: in latest GLib _() returns
"const gchar*" as it should. Add const qualifiers to local utility
functions and some explicit casts to fix the warnings caused by
this.
2008-05-17 Michael Natterer <mitch@gimp.org>
* app/actions/windows-actions.c: add tooltips to the menu items of

View File

@ -525,12 +525,12 @@ gimp_imagefile_get_desc_string (GimpImagefile *imagefile)
break;
case GIMP_THUMB_STATE_FOLDER:
imagefile->description = _("Folder");
imagefile->description = (gchar *) _("Folder");
imagefile->static_desc = TRUE;
break;
case GIMP_THUMB_STATE_SPECIAL:
imagefile->description = _("Special File");
imagefile->description = (gchar *) _("Special File");
imagefile->static_desc = TRUE;
break;

View File

@ -570,8 +570,8 @@ gimp_align_tool_status_update (GimpTool *tool,
if (proximity)
{
gchar *status = NULL;
gboolean free_status = FALSE;
const gchar *status = NULL;
gboolean free_status = FALSE;
if (! align_tool->selected_objects)
{
@ -634,7 +634,7 @@ gimp_align_tool_status_update (GimpTool *tool,
gimp_tool_push_status (tool, display, status);
if (free_status)
g_free (status);
g_free ((gchar *) status);
}
}

View File

@ -233,7 +233,7 @@ gimp_selection_tool_oper_update (GimpTool *tool,
if (proximity)
{
gchar *status = NULL;
const gchar *status = NULL;
gboolean free_status = FALSE;
GdkModifierType modifiers = (GDK_SHIFT_MASK | GDK_CONTROL_MASK);
@ -316,7 +316,7 @@ gimp_selection_tool_oper_update (GimpTool *tool,
gimp_tool_push_status (tool, display, status);
if (free_status)
g_free (status);
g_free ((gchar *) status);
}
}

View File

@ -1137,20 +1137,23 @@ gimp_vector_tool_status_update (GimpTool *tool,
if (proximity)
{
gchar *status = NULL;
gboolean free_status = FALSE;
const gchar *status = NULL;
gboolean free_status = FALSE;
switch (vector_tool->function)
{
case VECTORS_SELECT_VECTOR:
status = _("Click to pick path to edit");
break;
case VECTORS_CREATE_VECTOR:
status = _("Click to create a new path");
break;
case VECTORS_CREATE_STROKE:
status = _("Click to create a new component of the path");
break;
case VECTORS_ADD_ANCHOR:
status = gimp_suggest_modifiers (_("Click or Click-Drag to create "
"a new anchor"),
@ -1158,6 +1161,7 @@ gimp_vector_tool_status_update (GimpTool *tool,
NULL, NULL, NULL);
free_status = TRUE;
break;
case VECTORS_MOVE_ANCHOR:
if (options->edit_mode != GIMP_VECTOR_MODE_EDIT)
{
@ -1170,9 +1174,11 @@ gimp_vector_tool_status_update (GimpTool *tool,
else
status = _("Click-Drag to move the anchor around");
break;
case VECTORS_MOVE_ANCHORSET:
status = _("Click-Drag to move the anchors around");
break;
case VECTORS_MOVE_HANDLE:
status = gimp_suggest_modifiers (_("Click-Drag to move the handle "
"around"),
@ -1180,6 +1186,7 @@ gimp_vector_tool_status_update (GimpTool *tool,
NULL, NULL, NULL);
free_status = TRUE;
break;
case VECTORS_MOVE_CURVE:
if (GIMP_VECTOR_TOOL_GET_OPTIONS (tool)->polygonal)
status = gimp_suggest_modifiers (_("Click-Drag to move the "
@ -1193,6 +1200,7 @@ gimp_vector_tool_status_update (GimpTool *tool,
_("%s: symmetrical"), NULL, NULL);
free_status = TRUE;
break;
case VECTORS_MOVE_STROKE:
status = gimp_suggest_modifiers (_("Click-Drag to move the "
"component around"),
@ -1200,9 +1208,11 @@ gimp_vector_tool_status_update (GimpTool *tool,
NULL, NULL, NULL);
free_status = TRUE;
break;
case VECTORS_MOVE_VECTORS:
status = _("Click-Drag to move the path around");
break;
case VECTORS_INSERT_ANCHOR:
status = gimp_suggest_modifiers (_("Click-Drag to insert an anchor "
"on the path"),
@ -1210,19 +1220,24 @@ gimp_vector_tool_status_update (GimpTool *tool,
NULL, NULL, NULL);
free_status = TRUE;
break;
case VECTORS_DELETE_ANCHOR:
status = _("Click to delete this anchor");
break;
case VECTORS_CONNECT_STROKES:
status = _("Click to connect this anchor "
"with the selected endpoint");
break;
case VECTORS_DELETE_SEGMENT:
status = _("Click to open up the path");
break;
case VECTORS_CONVERT_EDGE:
status = _("Click to make this node angular");
break;
case VECTORS_FINISHED:
status = NULL;
break;
@ -1232,7 +1247,7 @@ gimp_vector_tool_status_update (GimpTool *tool,
gimp_tool_push_status (tool, display, status);
if (free_status)
g_free (status);
g_free ((gchar *) status);
}
}

View File

@ -191,8 +191,8 @@ rcm_create_previews (void)
/* Main: One circles with values and buttons */
static RcmCircle*
rcm_create_one_circle (gint height,
gchar *label_content)
rcm_create_one_circle (gint height,
const gchar *label_content)
{
GtkWidget *frame, *button_table, *legend_table;
GtkWidget *label, *button, *entry;

View File

@ -380,7 +380,7 @@ noisify (GimpPreview *preview)
static void
noisify_add_channel (GtkWidget *table,
gint channel,
gchar *name,
const gchar *name,
GimpDrawable *drawable,
GtkWidget *preview)
{
@ -407,7 +407,7 @@ noisify_add_channel (GtkWidget *table,
static void
noisify_add_alpha_channel (GtkWidget *table,
gint channel,
gchar *name,
const gchar *name,
GimpDrawable *drawable,
GtkWidget *preview)
{

View File

@ -78,7 +78,7 @@ static void prepare_row (GimpPixelRgn *pixel_rgn,
static void vpropagate_toggle_button_update (GtkWidget *widget,
gpointer data);
static GtkWidget * gtk_table_add_toggle (GtkWidget *table,
gchar *name,
const gchar *name,
gint x1,
gint x2,
gint y,
@ -1246,13 +1246,13 @@ vpropagate_toggle_button_update (GtkWidget *widget,
}
static GtkWidget *
gtk_table_add_toggle (GtkWidget *table,
gchar *name,
gint x1,
gint x2,
gint y,
GCallback update,
gint *value)
gtk_table_add_toggle (GtkWidget *table,
const gchar *name,
gint x1,
gint x2,
gint y,
GCallback update,
gint *value)
{
GtkWidget *toggle;

View File

@ -1678,11 +1678,11 @@ select_button_clicked_eq (void)
/* Special case for now - options on poly/star/spiral button */
GtkWidget *
num_sides_widget (gchar *d_title,
gint *num_sides,
gint *which_way,
gint adj_min,
gint adj_max)
num_sides_widget (const gchar *d_title,
gint *num_sides,
gint *which_way,
gint adj_min,
gint adj_max)
{
GtkWidget *table;
GtkObject *size_data;

View File

@ -182,11 +182,11 @@ void draw_sqr (GdkPoint *p,
void list_button_update (GFigObj *obj);
GtkWidget *num_sides_widget (gchar *d_title,
gint *num_sides,
gint *which_way,
gint adj_min,
gint adj_max);
GtkWidget *num_sides_widget (const gchar *d_title,
gint *num_sides,
gint *which_way,
gint adj_min,
gint adj_max);
void setup_undo (void);
void draw_grid_clear (void);

View File

@ -114,11 +114,11 @@ select_color (GtkWidget *widget, gpointer data)
}
static GtkWidget *
create_general_button (GtkWidget *box,
int idx,
gchar *label,
gchar *help_string,
GSList **radio_group)
create_general_button (GtkWidget *box,
int idx,
const gchar *label,
const gchar *help_string,
GSList **radio_group)
{
return create_radio_button (box, idx, general_bg_callback, label,
help_string, radio_group, general_bg_radio);

View File

@ -165,7 +165,8 @@ void restore_default_values (void);
GtkWidget *create_radio_button (GtkWidget *box, int orient_type,
void (*callback)(GtkWidget *wg, void *d),
gchar *label, gchar *help_string,
const gchar *label,
const gchar *help_string,
GSList **radio_group,
GtkWidget **buttons_array
);

View File

@ -72,11 +72,11 @@ create_orientmap_dialog_helper (GtkWidget *widget)
static void
create_orientradio_button (GtkWidget *box,
int orient_type,
gchar *label,
gchar *help_string,
GSList **radio_group)
create_orientradio_button (GtkWidget *box,
int orient_type,
const gchar *label,
const gchar *help_string,
GSList **radio_group)
{
create_radio_button (box, orient_type, orientation_store, label,
help_string, radio_group, orient_radio);

View File

@ -75,11 +75,11 @@ create_sizemap_dialog_helper (GtkWidget *widget)
}
static void
create_size_radio_button (GtkWidget *box,
int orient_type,
gchar *label,
gchar *help_string,
GSList **radio_group)
create_size_radio_button (GtkWidget *box,
int orient_type,
const gchar *label,
const gchar *help_string,
GSList **radio_group)
{
create_radio_button (box, orient_type, size_store, label,
help_string, radio_group, sizeradio);

View File

@ -394,13 +394,13 @@ readdirintolist (char *subdir, GtkWidget *view, char *selected)
* to create a new group.
* */
GtkWidget *
create_radio_button (GtkWidget *box,
int orient_type,
void (*callback) (GtkWidget *wg, void *d),
gchar *label,
gchar *help_string,
GSList **radio_group,
GtkWidget **buttons_array)
create_radio_button (GtkWidget *box,
int orient_type,
void (*callback) (GtkWidget *wg, void *d),
const gchar *label,
const gchar *help_string,
GSList **radio_group,
GtkWidget **buttons_array)
{
GtkWidget *tmpw;

View File

@ -714,7 +714,7 @@ static void ed_make_page_sflare (GFlareEditor *ed,
static void ed_put_gradient_menu (GtkWidget *table,
gint x,
gint y,
gchar *caption,
const gchar *caption,
GradientMenu *gm);
static void ed_mode_menu_callback (GtkWidget *widget,
gpointer data);
@ -3974,7 +3974,7 @@ static void
ed_put_gradient_menu (GtkWidget *table,
gint x,
gint y,
gchar *caption,
const gchar *caption,
GradientMenu *gm)
{
GtkWidget *label;

View File

@ -226,13 +226,13 @@ static void recompute_center_cb (GtkWidget *widget,
static void ifs_compose (GimpDrawable *drawable);
static ColorMap *color_map_create (gchar *name,
GimpRGB *orig_color,
GimpRGB *data,
gboolean fixed_point);
static void color_map_color_changed_cb (GtkWidget *widget,
ColorMap *color_map);
static void color_map_update (ColorMap *color_map);
static ColorMap *color_map_create (const gchar *name,
GimpRGB *orig_color,
GimpRGB *data,
gboolean fixed_point);
static void color_map_color_changed_cb (GtkWidget *widget,
ColorMap *color_map);
static void color_map_update (ColorMap *color_map);
/* interface functions */
static void simple_color_toggled (GtkWidget *widget, gpointer data);
@ -1980,10 +1980,10 @@ val_changed_update (void)
#define COLOR_SAMPLE_SIZE 30
static ColorMap *
color_map_create (gchar *name,
GimpRGB *orig_color,
GimpRGB *data,
gboolean fixed_point)
color_map_create (const gchar *name,
GimpRGB *orig_color,
GimpRGB *data,
gboolean fixed_point)
{
GtkWidget *frame;
GtkWidget *arrow;

View File

@ -516,7 +516,7 @@ main_set_title(const char *filename)
char *title, *p;
g_strreplace(&_filename, filename);
p = (filename) ? g_filename_display_basename (filename) : _("<Untitled>");
p = filename ? g_filename_display_basename (filename) : (gchar *) _("<Untitled>");
title = g_strdup_printf("%s - Image Map", p);
if (filename)
g_free (p);

View File

@ -323,7 +323,7 @@ set_button_colors(PreferencesDialog_t *dialog, ColorSelData_t *colors)
}
static GtkWidget*
create_tab(GtkWidget *notebook, gchar *label, gint rows, gint cols)
create_tab(GtkWidget *notebook, const gchar *label, gint rows, gint cols)
{
GtkWidget *table;
GtkWidget *vbox;