gimp r26964 - in trunk: . plug-ins/file-fits plug-ins/gimpressionist plug-ins/gradient-flare plug-ins/ifs-compose plug-ins/imagemap plug-ins/map-object
- From: mitch svn gnome org
- To: svn-commits-list gnome org
- Subject: gimp r26964 - in trunk: . plug-ins/file-fits plug-ins/gimpressionist plug-ins/gradient-flare plug-ins/ifs-compose plug-ins/imagemap plug-ins/map-object
- Date: Wed, 17 Sep 2008 08:34:46 +0000 (UTC)
Author: mitch
Date: Wed Sep 17 08:34:46 2008
New Revision: 26964
URL: http://svn.gnome.org/viewvc/gimp?rev=26964&view=rev
Log:
2008-09-17 Michael Natterer <mitch gimp org>
* plug-ins/file-fits/fits.c
* plug-ins/gimpressionist/gimpressionist.h
* plug-ins/gimpressionist/presets.c
* plug-ins/gimpressionist/utils.c
* plug-ins/gradient-flare/gradient-flare.c
* plug-ins/ifs-compose/ifs-compose-storage.c
* plug-ins/imagemap/imap_default_dialog.[ch]
* plug-ins/imagemap/imap_object.h
* plug-ins/map-object/map-object-ui.c: add const plus some minor
unrelated cleanups.
Modified:
trunk/ChangeLog
trunk/plug-ins/file-fits/fits.c
trunk/plug-ins/gimpressionist/gimpressionist.h
trunk/plug-ins/gimpressionist/presets.c
trunk/plug-ins/gimpressionist/utils.c
trunk/plug-ins/gradient-flare/gradient-flare.c
trunk/plug-ins/ifs-compose/ifs-compose-storage.c
trunk/plug-ins/imagemap/imap_default_dialog.c
trunk/plug-ins/imagemap/imap_default_dialog.h
trunk/plug-ins/imagemap/imap_object.h
trunk/plug-ins/map-object/map-object-ui.c
Modified: trunk/plug-ins/file-fits/fits.c
==============================================================================
--- trunk/plug-ins/file-fits/fits.c (original)
+++ trunk/plug-ins/file-fits/fits.c Wed Sep 17 08:34:46 2008
@@ -710,7 +710,7 @@
{
FITS_HDU_LIST *hdulist;
int print_ctype3 = 0; /* The CTYPE3-card may not be FITS-conforming */
- static char *ctype3_card[] =
+ static const char *ctype3_card[] =
{
NULL, NULL, NULL, /* bpp = 0: no additional card */
"COMMENT Image type within GIMP: GIMP_GRAY_IMAGE",
Modified: trunk/plug-ins/gimpressionist/gimpressionist.h
==============================================================================
--- trunk/plug-ins/gimpressionist/gimpressionist.h (original)
+++ trunk/plug-ins/gimpressionist/gimpressionist.h Wed Sep 17 08:34:46 2008
@@ -136,11 +136,13 @@
void unselectall (GtkWidget *list);
void reselect (GtkWidget *list, char *fname);
-void readdirintolist (char *subdir, GtkWidget *view, char *selected);
-void readdirintolist_extended (char *subdir, GtkWidget *view, char *selected,
+void readdirintolist (const char *subdir, GtkWidget *view, char *selected);
+void readdirintolist_extended (const char *subdir,
+ GtkWidget *view, char *selected,
gboolean with_filename_column,
- gchar *(*get_object_name_cb)
- (gchar *dir, gchar *filename, void *context),
+ gchar *(*get_object_name_cb) (const gchar *dir,
+ gchar *filename,
+ void *context),
void * context);
GtkWidget *create_one_column_list (GtkWidget *parent,
Modified: trunk/plug-ins/gimpressionist/presets.c
==============================================================================
--- trunk/plug-ins/gimpressionist/presets.c (original)
+++ trunk/plug-ins/gimpressionist/presets.c Wed Sep 17 08:34:46 2008
@@ -99,7 +99,7 @@
static char presetdesc[4096] = "";
-static char *factory_defaults = "<Factory defaults>";
+static const char *factory_defaults = "<Factory defaults>";
static gchar *
get_early_line_from_preset (gchar *full_path, const gchar *prefix)
@@ -134,7 +134,9 @@
}
static gchar *
-get_object_name (gchar *dir, gchar *filename, void *context)
+get_object_name (const gchar *dir,
+ gchar *filename,
+ void *context)
{
gchar *ret = NULL, *unprocessed_line = NULL;
gchar *full_path = NULL;
Modified: trunk/plug-ins/gimpressionist/utils.c
==============================================================================
--- trunk/plug-ins/gimpressionist/utils.c (original)
+++ trunk/plug-ins/gimpressionist/utils.c Wed Sep 17 08:34:46 2008
@@ -250,14 +250,14 @@
}
static void
-readdirintolist_real(char *subdir,
- GtkWidget *view,
- char *selected,
- gboolean with_filename_column,
- gchar *(*get_object_name_cb) (gchar *dir,
- gchar *filename,
- void *context),
- void *context)
+readdirintolist_real (const char *subdir,
+ GtkWidget *view,
+ char *selected,
+ gboolean with_filename_column,
+ gchar *(*get_object_name_cb) (const gchar *dir,
+ gchar *filename,
+ void *context),
+ void *context)
{
gchar *fpath;
const gchar *de;
@@ -353,14 +353,14 @@
}
void
-readdirintolist_extended (char *subdir,
+readdirintolist_extended (const char *subdir,
GtkWidget *view,
char *selected,
gboolean with_filename_column,
- gchar *(*get_object_name_cb) (gchar *dir,
- gchar *filename,
- void *context),
- void * context)
+ gchar *(*get_object_name_cb) (const gchar *dir,
+ gchar *filename,
+ void *context),
+ void *context)
{
char *tmpdir;
GList *thispath = parsepath ();
@@ -376,7 +376,9 @@
}
void
-readdirintolist (char *subdir, GtkWidget *view, char *selected)
+readdirintolist (const char *subdir,
+ GtkWidget *view,
+ char *selected)
{
readdirintolist_extended (subdir, view, selected, FALSE, NULL, NULL);
}
Modified: trunk/plug-ins/gradient-flare/gradient-flare.c
==============================================================================
--- trunk/plug-ins/gradient-flare/gradient-flare.c (original)
+++ trunk/plug-ins/gradient-flare/gradient-flare.c Wed Sep 17 08:34:46 2008
@@ -572,11 +572,10 @@
static gint gradient_cache_count = 0;
-static gchar *internal_gradients[] =
+static const gchar *internal_gradients[] =
{
"%white", "%white_grad", "%red_grad", "%blue_grad", "%yellow_grad", "%random"
};
-static int internal_ngradients = G_N_ELEMENTS (internal_gradients);
#ifdef DEBUG
static gint get_values_external_count = 0;
@@ -4712,11 +4711,11 @@
gradient_cache_flush ();
external_gradients = gimp_gradients_get_list (NULL, &external_ngradients);
- *num_gradients = internal_ngradients + external_ngradients;
+ *num_gradients = G_N_ELEMENTS (internal_gradients) + external_ngradients;
gradients = g_new (gchar *, *num_gradients);
n = 0;
- for (i = 0; i < internal_ngradients; i++)
+ for (i = 0; i < G_N_ELEMENTS (internal_gradients); i++)
{
gradients[n++] = g_strdup (internal_gradients[i]);
}
Modified: trunk/plug-ins/ifs-compose/ifs-compose-storage.c
==============================================================================
--- trunk/plug-ins/ifs-compose/ifs-compose-storage.c (original)
+++ trunk/plug-ins/ifs-compose/ifs-compose-storage.c Wed Sep 17 08:34:46 2008
@@ -60,33 +60,33 @@
static struct
{
- gchar *name;
- gint token;
+ const gchar *name;
+ gint token;
} symbols[] = {
- { "iterations", TOKEN_ITERATIONS },
- { "max_memory", TOKEN_MAX_MEMORY },
- { "subdivide", TOKEN_SUBDIVIDE },
- { "radius", TOKEN_RADIUS },
+ { "iterations", TOKEN_ITERATIONS },
+ { "max_memory", TOKEN_MAX_MEMORY },
+ { "subdivide", TOKEN_SUBDIVIDE },
+ { "radius", TOKEN_RADIUS },
{ "aspect_ratio", TOKEN_ASPECT_RATIO },
- { "center_x", TOKEN_CENTER_X },
- { "center_y", TOKEN_CENTER_Y },
- { "element", TOKEN_ELEMENT },
- { "x", TOKEN_X },
- { "y", TOKEN_Y },
- { "theta", TOKEN_THETA },
- { "scale", TOKEN_SCALE },
- { "asym", TOKEN_ASYM },
- { "shear", TOKEN_SHEAR },
- { "flip", TOKEN_FLIP },
- { "red_color", TOKEN_RED_COLOR },
- { "green_color", TOKEN_GREEN_COLOR },
- { "blue_color", TOKEN_BLUE_COLOR },
- { "black_color", TOKEN_BLACK_COLOR },
+ { "center_x", TOKEN_CENTER_X },
+ { "center_y", TOKEN_CENTER_Y },
+ { "element", TOKEN_ELEMENT },
+ { "x", TOKEN_X },
+ { "y", TOKEN_Y },
+ { "theta", TOKEN_THETA },
+ { "scale", TOKEN_SCALE },
+ { "asym", TOKEN_ASYM },
+ { "shear", TOKEN_SHEAR },
+ { "flip", TOKEN_FLIP },
+ { "red_color", TOKEN_RED_COLOR },
+ { "green_color", TOKEN_GREEN_COLOR },
+ { "blue_color", TOKEN_BLUE_COLOR },
+ { "black_color", TOKEN_BLACK_COLOR },
{ "target_color", TOKEN_TARGET_COLOR },
- { "hue_scale", TOKEN_HUE_SCALE },
- { "value_scale", TOKEN_VALUE_SCALE },
+ { "hue_scale", TOKEN_HUE_SCALE },
+ { "value_scale", TOKEN_VALUE_SCALE },
{ "simple_color", TOKEN_SIMPLE_COLOR },
- { "prob", TOKEN_PROB }
+ { "prob", TOKEN_PROB }
};
static GTokenType
Modified: trunk/plug-ins/imagemap/imap_default_dialog.c
==============================================================================
--- trunk/plug-ins/imagemap/imap_default_dialog.c (original)
+++ trunk/plug-ins/imagemap/imap_default_dialog.c Wed Sep 17 08:34:46 2008
@@ -160,7 +160,7 @@
}
void
-default_dialog_set_label(DefaultDialog_t *dialog, gchar *text)
+default_dialog_set_label(DefaultDialog_t *dialog, const gchar *text)
{
GtkWidget *label = gtk_label_new(text);
Modified: trunk/plug-ins/imagemap/imap_default_dialog.h
==============================================================================
--- trunk/plug-ins/imagemap/imap_default_dialog.h (original)
+++ trunk/plug-ins/imagemap/imap_default_dialog.h Wed Sep 17 08:34:46 2008
@@ -53,7 +53,7 @@
void default_dialog_hide_apply_button(DefaultDialog_t *dialog);
void default_dialog_hide_help_button(DefaultDialog_t *dialog);
void default_dialog_set_title(DefaultDialog_t *dialog, const gchar *title);
-void default_dialog_set_label(DefaultDialog_t *dialog, gchar *text);
+void default_dialog_set_label(DefaultDialog_t *dialog, const gchar *text);
GtkWidget *default_dialog_add_table(DefaultDialog_t *dialog, gint rows,
gint cols);
Modified: trunk/plug-ins/imagemap/imap_object.h
==============================================================================
--- trunk/plug-ins/imagemap/imap_object.h (original)
+++ trunk/plug-ins/imagemap/imap_object.h Wed Sep 17 08:34:46 2008
@@ -52,7 +52,7 @@
struct AreaInfoDialog_t;
struct ObjectClass_t {
- gchar *name;
+ const gchar *name;
AreaInfoDialog_t *info_dialog;
GdkPixmap *icon;
GdkBitmap *mask;
Modified: trunk/plug-ins/map-object/map-object-ui.c
==============================================================================
--- trunk/plug-ins/map-object/map-object-ui.c (original)
+++ trunk/plug-ins/map-object/map-object-ui.c Wed Sep 17 08:34:46 2008
@@ -1190,7 +1190,7 @@
GtkObject *adj;
gint i;
- static gchar *labels[] = { N_("_Top:"), N_("_Bottom:") };
+ static const gchar *labels[] = { N_("_Top:"), N_("_Bottom:") };
page = gtk_vbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (page), 12);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]