mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-20 04:48:06 +01:00
WPrefs.app: Added const attribute to local string
Now that the WINGs functions are const-correct, it is possible to set the attribute on the strings to help the compiler.
This commit is contained in:
committed by
Carlos R. Mafra
parent
591dc5cd4d
commit
a4395c5764
@@ -6,7 +6,7 @@
|
|||||||
#include "WINGsP.h"
|
#include "WINGsP.h"
|
||||||
|
|
||||||
/* table to map event types to event masks */
|
/* table to map event types to event masks */
|
||||||
static unsigned long eventMasks[] = {
|
static const unsigned long eventMasks[] = {
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
KeyPressMask, /* KeyPress */
|
KeyPressMask, /* KeyPress */
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ typedef struct W_FontPanel {
|
|||||||
#define DEF_WIDTH 320
|
#define DEF_WIDTH 320
|
||||||
#define DEF_HEIGHT (DEF_UPPER_HEIGHT+DEF_LOWER_HEIGHT)
|
#define DEF_HEIGHT (DEF_UPPER_HEIGHT+DEF_LOWER_HEIGHT)
|
||||||
|
|
||||||
static int scalableFontSizes[] = {
|
static const int scalableFontSizes[] = {
|
||||||
8,
|
8,
|
||||||
10,
|
10,
|
||||||
11,
|
11,
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
* expert tab of the window with the corresponding information for effect
|
* expert tab of the window with the corresponding information for effect
|
||||||
*/
|
*/
|
||||||
static const struct {
|
static const struct {
|
||||||
char *label; /* Text displayed to user */
|
const char *label; /* Text displayed to user */
|
||||||
|
|
||||||
int def_state; /* True/False: the default value, if not defined in current config */
|
int def_state; /* True/False: the default value, if not defined in current config */
|
||||||
|
|
||||||
|
|||||||
@@ -67,11 +67,7 @@ typedef struct _Panel {
|
|||||||
*/
|
*/
|
||||||
static const struct {
|
static const struct {
|
||||||
const char *key;
|
const char *key;
|
||||||
/*
|
const char *title;
|
||||||
* Fixme: this string should be 'const', but 'WMAddListItem'
|
|
||||||
* do not allow us to do so
|
|
||||||
*/
|
|
||||||
char *title;
|
|
||||||
} keyOptions[] = {
|
} keyOptions[] = {
|
||||||
{ "RootMenuKey", N_("Open applications menu") },
|
{ "RootMenuKey", N_("Open applications menu") },
|
||||||
{ "WindowListKey", N_("Open window list menu") },
|
{ "WindowListKey", N_("Open window list menu") },
|
||||||
|
|||||||
Reference in New Issue
Block a user