[gnome-builder] gstyle: fix some constness



commit 2715fa191f3133cd890c8fb725996c415e89bcd6
Author: Christian Hergert <chergert redhat com>
Date:   Fri Jun 15 18:14:29 2018 -0700

    gstyle: fix some constness

 src/gstyle/gstyle-color-predefined.h | 10 +++++-----
 src/gstyle/gstyle-color-widget.c     |  4 ++--
 src/gstyle/gstyle-palette.c          |  3 ++-
 3 files changed, 9 insertions(+), 8 deletions(-)
---
diff --git a/src/gstyle/gstyle-color-predefined.h b/src/gstyle/gstyle-color-predefined.h
index dae767986..98754668d 100644
--- a/src/gstyle/gstyle-color-predefined.h
+++ b/src/gstyle/gstyle-color-predefined.h
@@ -24,11 +24,11 @@ G_BEGIN_DECLS
 
 typedef struct
 {
-  gchar  *name;
-  guint8  red;
-  guint8  green;
-  guint8  blue;
-  guint8  index;
+  const gchar *name;
+  guint8       red;
+  guint8       green;
+  guint8       blue;
+  guint8       index;
 } NamedColor;
 
 G_GNUC_UNUSED
diff --git a/src/gstyle/gstyle-color-widget.c b/src/gstyle/gstyle-color-widget.c
index d10475eee..fa0cce383 100644
--- a/src/gstyle/gstyle-color-widget.c
+++ b/src/gstyle/gstyle-color-widget.c
@@ -1501,8 +1501,8 @@ gstyle_color_widget_class_init (GstyleColorWidgetClass *klass)
 
 
 static const GtkTargetEntry dnd_targets [] = {
-  {"GSTYLE_COLOR_WIDGET", GTK_TARGET_SAME_APP, 0},
-  {"application/x-color", 0, 0},
+  { (gchar *)"GSTYLE_COLOR_WIDGET", GTK_TARGET_SAME_APP, 0 },
+  { (gchar *)"application/x-color", 0, 0 },
 };
 
 static void
diff --git a/src/gstyle/gstyle-palette.c b/src/gstyle/gstyle-palette.c
index 05b2b352c..595207e6d 100644
--- a/src/gstyle/gstyle-palette.c
+++ b/src/gstyle/gstyle-palette.c
@@ -870,7 +870,8 @@ gstyle_palette_save_to_xml (GstylePalette  *self,
   gint n_colors;
   gint succes;
 
-  gchar *header = "Copyright © 2016 GNOME Builder Team at irc.gimp.net/#gnome-builder\n" \
+  const gchar *header =
+                  "Copyright © 2016 GNOME Builder Team at irc.gimp.net/#gnome-builder\n"   \
                   "This program is free software: you can redistribute it and/or modify\n" \
                   "it under the terms of the GNU General Public License as published by\n" \
                   "the Free Software Foundation, either version 3 of the License, or\n"    \


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