WPrefs: Added a few missing const attributes
authorChristophe CURIS <christophe.curis@free.fr>
Sat, 23 Nov 2013 17:14:05 +0000 (23 18:14 +0100)
committerCarlos R. Mafra <crmafra@gmail.com>
Mon, 30 Dec 2013 18:11:06 +0000 (30 18:11 +0000)
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
WPrefs.app/FontSimple.c
WPrefs.app/WindowHandling.c

index ebcbaf2..a124a98 100644 (file)
@@ -91,9 +91,9 @@ typedef struct _Panel {
 
 #define ICON_FILE      "fonts"
 
-static struct {
-       char *option;
-       char *label;
+static const struct {
+       const char *option;
+       const char *label;
 } fontOptions[] = {
        {
        "WindowTitleFont", N_("Window Title")}, {
@@ -104,7 +104,7 @@ static struct {
        "LargeDisplayFont", N_("Desktop Caption")}, {
 NULL, NULL},};
 
-static char *standardSizes[] = {
+static const char *standardSizes[] = {
        "6",
        "8",
        "9",
@@ -128,9 +128,9 @@ static char *standardSizes[] = {
        NULL
 };
 
-static struct {
+static const struct {
        int weight;
-       char *name;
+       const char *name;
 } fontWeights[] = {
        {
        FC_WEIGHT_THIN, "Thin"}, {
@@ -146,9 +146,9 @@ static struct {
        0, NULL}
 };
 
-static struct {
+static const struct {
        int slant;
-       char *name;
+       const char *name;
 } fontSlants[] = {
        {
        FC_SLANT_ROMAN, ""},    /*"Roman"}, */
@@ -158,9 +158,9 @@ static struct {
        0, NULL}
 };
 
-static struct {
+static const struct {
        int width;
-       char *name;
+       const char *name;
 } fontWidths[] = {
        {
        FC_WIDTH_ULTRACONDENSED, "UltraCondensed"}, {
@@ -371,7 +371,7 @@ static void selectedFamily(WMWidget * w, void *data)
                WMClearList(panel->styleL);
                for (i = 0; i < family->stylen; i++) {
                        int j;
-                       char *weight = "", *slant = "", *width = "";
+                       const char *weight = "", *slant = "", *width = "";
                        WMListItem *item;
 
                        for (j = 0; fontWeights[j].name; j++)
index 4d514d9..c261067 100644 (file)
@@ -77,7 +77,7 @@ typedef struct _Panel {
 
 #define THUMB_SIZE     16
 
-static char *placements[] = {
+static const char *placements[] = {
        "auto",
        "random",
        "manual",