gimp r25685 - in trunk: . app/core app/tools plug-ins/color-rotate plug-ins/common plug-ins/gfig plug-ins/gimpressionist plug-ins/gradient-flare plug-ins/ifs-compose plug-ins/imagemap



Author: mitch
Date: Sat May 17 13:08:19 2008
New Revision: 25685
URL: http://svn.gnome.org/viewvc/gimp?rev=25685&view=rev

Log:
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.



Modified:
   trunk/ChangeLog
   trunk/app/core/gimpimagefile.c
   trunk/app/tools/gimpaligntool.c
   trunk/app/tools/gimpselectiontool.c
   trunk/app/tools/gimpvectortool.c
   trunk/plug-ins/color-rotate/color-rotate-dialog.c
   trunk/plug-ins/common/noise-rgb.c
   trunk/plug-ins/common/value-propagate.c
   trunk/plug-ins/gfig/gfig-dialog.c
   trunk/plug-ins/gfig/gfig.h
   trunk/plug-ins/gimpressionist/general.c
   trunk/plug-ins/gimpressionist/gimpressionist.h
   trunk/plug-ins/gimpressionist/orientation.c
   trunk/plug-ins/gimpressionist/size.c
   trunk/plug-ins/gimpressionist/utils.c
   trunk/plug-ins/gradient-flare/gradient-flare.c
   trunk/plug-ins/ifs-compose/ifs-compose.c
   trunk/plug-ins/imagemap/imap_main.c
   trunk/plug-ins/imagemap/imap_preferences.c

Modified: trunk/app/core/gimpimagefile.c
==============================================================================
--- trunk/app/core/gimpimagefile.c	(original)
+++ trunk/app/core/gimpimagefile.c	Sat May 17 13:08:19 2008
@@ -525,12 +525,12 @@
       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;
 

Modified: trunk/app/tools/gimpaligntool.c
==============================================================================
--- trunk/app/tools/gimpaligntool.c	(original)
+++ trunk/app/tools/gimpaligntool.c	Sat May 17 13:08:19 2008
@@ -570,8 +570,8 @@
 
   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_tool_push_status (tool, display, status);
 
       if (free_status)
-        g_free (status);
+        g_free ((gchar *) status);
     }
 }
 

Modified: trunk/app/tools/gimpselectiontool.c
==============================================================================
--- trunk/app/tools/gimpselectiontool.c	(original)
+++ trunk/app/tools/gimpselectiontool.c	Sat May 17 13:08:19 2008
@@ -233,7 +233,7 @@
 
   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_tool_push_status (tool, display, status);
 
       if (free_status)
-        g_free (status);
+        g_free ((gchar *) status);
     }
 }
 

Modified: trunk/app/tools/gimpvectortool.c
==============================================================================
--- trunk/app/tools/gimpvectortool.c	(original)
+++ trunk/app/tools/gimpvectortool.c	Sat May 17 13:08:19 2008
@@ -1137,20 +1137,23 @@
 
   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 @@
                                            NULL, NULL, NULL);
           free_status = TRUE;
           break;
+
         case VECTORS_MOVE_ANCHOR:
           if (options->edit_mode != GIMP_VECTOR_MODE_EDIT)
             {
@@ -1170,9 +1174,11 @@
           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 @@
                                            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 @@
                                              _("%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 @@
                                            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 @@
                                            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_tool_push_status (tool, display, status);
 
       if (free_status)
-        g_free (status);
+        g_free ((gchar *) status);
     }
 }
 

Modified: trunk/plug-ins/color-rotate/color-rotate-dialog.c
==============================================================================
--- trunk/plug-ins/color-rotate/color-rotate-dialog.c	(original)
+++ trunk/plug-ins/color-rotate/color-rotate-dialog.c	Sat May 17 13:08:19 2008
@@ -191,8 +191,8 @@
 /* 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;

Modified: trunk/plug-ins/common/noise-rgb.c
==============================================================================
--- trunk/plug-ins/common/noise-rgb.c	(original)
+++ trunk/plug-ins/common/noise-rgb.c	Sat May 17 13:08:19 2008
@@ -380,7 +380,7 @@
 static void
 noisify_add_channel (GtkWidget    *table,
                      gint          channel,
-                     gchar        *name,
+                     const gchar  *name,
                      GimpDrawable *drawable,
                      GtkWidget    *preview)
 {
@@ -407,7 +407,7 @@
 static void
 noisify_add_alpha_channel (GtkWidget    *table,
                            gint          channel,
-                           gchar        *name,
+                           const gchar  *name,
                            GimpDrawable *drawable,
                            GtkWidget    *preview)
 {

Modified: trunk/plug-ins/common/value-propagate.c
==============================================================================
--- trunk/plug-ins/common/value-propagate.c	(original)
+++ trunk/plug-ins/common/value-propagate.c	Sat May 17 13:08:19 2008
@@ -78,7 +78,7 @@
 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 @@
 }
 
 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;
 

Modified: trunk/plug-ins/gfig/gfig-dialog.c
==============================================================================
--- trunk/plug-ins/gfig/gfig-dialog.c	(original)
+++ trunk/plug-ins/gfig/gfig-dialog.c	Sat May 17 13:08:19 2008
@@ -1678,11 +1678,11 @@
 /* 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;

Modified: trunk/plug-ins/gfig/gfig.h
==============================================================================
--- trunk/plug-ins/gfig/gfig.h	(original)
+++ trunk/plug-ins/gfig/gfig.h	Sat May 17 13:08:19 2008
@@ -182,11 +182,11 @@
 
 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);

Modified: trunk/plug-ins/gimpressionist/general.c
==============================================================================
--- trunk/plug-ins/gimpressionist/general.c	(original)
+++ trunk/plug-ins/gimpressionist/general.c	Sat May 17 13:08:19 2008
@@ -114,11 +114,11 @@
 }
 
 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);

Modified: trunk/plug-ins/gimpressionist/gimpressionist.h
==============================================================================
--- trunk/plug-ins/gimpressionist/gimpressionist.h	(original)
+++ trunk/plug-ins/gimpressionist/gimpressionist.h	Sat May 17 13:08:19 2008
@@ -165,7 +165,8 @@
 
 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
                                );

Modified: trunk/plug-ins/gimpressionist/orientation.c
==============================================================================
--- trunk/plug-ins/gimpressionist/orientation.c	(original)
+++ trunk/plug-ins/gimpressionist/orientation.c	Sat May 17 13:08:19 2008
@@ -72,11 +72,11 @@
 
 
 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);

Modified: trunk/plug-ins/gimpressionist/size.c
==============================================================================
--- trunk/plug-ins/gimpressionist/size.c	(original)
+++ trunk/plug-ins/gimpressionist/size.c	Sat May 17 13:08:19 2008
@@ -75,11 +75,11 @@
 }
 
 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);

Modified: trunk/plug-ins/gimpressionist/utils.c
==============================================================================
--- trunk/plug-ins/gimpressionist/utils.c	(original)
+++ trunk/plug-ins/gimpressionist/utils.c	Sat May 17 13:08:19 2008
@@ -394,13 +394,13 @@
  *      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;
 

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	Sat May 17 13:08:19 2008
@@ -714,7 +714,7 @@
 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 @@
 ed_put_gradient_menu (GtkWidget    *table,
                       gint          x,
                       gint          y,
-                      gchar        *caption,
+                      const gchar  *caption,
                       GradientMenu *gm)
 {
   GtkWidget *label;

Modified: trunk/plug-ins/ifs-compose/ifs-compose.c
==============================================================================
--- trunk/plug-ins/ifs-compose/ifs-compose.c	(original)
+++ trunk/plug-ins/ifs-compose/ifs-compose.c	Sat May 17 13:08:19 2008
@@ -226,13 +226,13 @@
 
 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 @@
 #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;

Modified: trunk/plug-ins/imagemap/imap_main.c
==============================================================================
--- trunk/plug-ins/imagemap/imap_main.c	(original)
+++ trunk/plug-ins/imagemap/imap_main.c	Sat May 17 13:08:19 2008
@@ -516,7 +516,7 @@
    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);

Modified: trunk/plug-ins/imagemap/imap_preferences.c
==============================================================================
--- trunk/plug-ins/imagemap/imap_preferences.c	(original)
+++ trunk/plug-ins/imagemap/imap_preferences.c	Sat May 17 13:08:19 2008
@@ -323,7 +323,7 @@
 }
 
 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;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]