summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/debug_menu.c3
-rw-r--r--apps/gui/bitmap/list.c2
-rw-r--r--apps/gui/list.c2
-rw-r--r--apps/gui/list.h8
-rw-r--r--apps/gui/statusbar-skinned.c4
-rw-r--r--apps/gui/statusbar-skinned.h2
-rw-r--r--apps/plugin.h2
-rw-r--r--apps/plugins/lib/printcell_helper.c2
8 files changed, 13 insertions, 12 deletions
diff --git a/apps/debug_menu.c b/apps/debug_menu.c
index f510597ad2..9c911eea4d 100644
--- a/apps/debug_menu.c
+++ b/apps/debug_menu.c
@@ -1247,7 +1247,8 @@ static int disk_callback(int btn, struct gui_synclist *lists)
1247 int *cardnum = (int*)lists->data; 1247 int *cardnum = (int*)lists->data;
1248 unsigned char card_name[6]; 1248 unsigned char card_name[6];
1249 unsigned char pbuf[32]; 1249 unsigned char pbuf[32];
1250 char *title = lists->title; 1250 /* Casting away const is safe; the buffer is defined as non-const. */
1251 char *title = (char *)lists->title;
1251 static const unsigned char i_vmin[] = { 0, 1, 5, 10, 25, 35, 60, 100 }; 1252 static const unsigned char i_vmin[] = { 0, 1, 5, 10, 25, 35, 60, 100 };
1252 static const unsigned char i_vmax[] = { 1, 5, 10, 25, 35, 45, 80, 200 }; 1253 static const unsigned char i_vmax[] = { 1, 5, 10, 25, 35, 45, 80, 200 };
1253 static const unsigned char * const kbit_units[] = { "kBit/s", "MBit/s", "GBit/s" }; 1254 static const unsigned char * const kbit_units[] = { "kBit/s", "MBit/s", "GBit/s" };
diff --git a/apps/gui/bitmap/list.c b/apps/gui/bitmap/list.c
index 53874a8dfa..b2987e9853 100644
--- a/apps/gui/bitmap/list.c
+++ b/apps/gui/bitmap/list.c
@@ -103,7 +103,7 @@ static void _default_listdraw_fn(struct list_putlineinfo_t *list_info)
103 bool show_cursor = list_info->show_cursor; 103 bool show_cursor = list_info->show_cursor;
104 bool have_icons = list_info->have_icons; 104 bool have_icons = list_info->have_icons;
105 struct line_desc *linedes = list_info->linedes; 105 struct line_desc *linedes = list_info->linedes;
106 char *dsp_text = list_info->dsp_text; 106 const char *dsp_text = list_info->dsp_text;
107 107
108 if (is_title) 108 if (is_title)
109 { 109 {
diff --git a/apps/gui/list.c b/apps/gui/list.c
index 29c80574c2..df5df22ca1 100644
--- a/apps/gui/list.c
+++ b/apps/gui/list.c
@@ -490,7 +490,7 @@ void gui_list_screen_scroll_out_of_view(bool enable)
490 * both the title and icon. Use NOICON if there is no icon. 490 * both the title and icon. Use NOICON if there is no icon.
491 */ 491 */
492void gui_synclist_set_title(struct gui_synclist * gui_list, 492void gui_synclist_set_title(struct gui_synclist * gui_list,
493 char * title, enum themable_icons icon) 493 const char * title, enum themable_icons icon)
494{ 494{
495 gui_list->title = title; 495 gui_list->title = title;
496 gui_list->title_icon = icon; 496 gui_list->title_icon = icon;
diff --git a/apps/gui/list.h b/apps/gui/list.h
index 4dc83a1b27..2df33b7541 100644
--- a/apps/gui/list.h
+++ b/apps/gui/list.h
@@ -96,7 +96,7 @@ struct list_putlineinfo_t {
96 struct viewport *vp; 96 struct viewport *vp;
97 struct line_desc *linedes; 97 struct line_desc *linedes;
98 struct gui_synclist * list; 98 struct gui_synclist * list;
99 char *dsp_text; 99 const char *dsp_text;
100 100
101 bool is_selected; 101 bool is_selected;
102 bool is_title; 102 bool is_title;
@@ -185,7 +185,7 @@ struct gui_synclist
185 /* The data that will be passed to the callback function YOU implement */ 185 /* The data that will be passed to the callback function YOU implement */
186 void * data; 186 void * data;
187 /* The optional title, set to NULL for none */ 187 /* The optional title, set to NULL for none */
188 char * title; 188 const char * title;
189 /* Optional title icon */ 189 /* Optional title icon */
190 enum themable_icons title_icon; 190 enum themable_icons title_icon;
191 191
@@ -233,7 +233,7 @@ extern void gui_synclist_select_item(struct gui_synclist * lists,
233extern void gui_synclist_add_item(struct gui_synclist * lists); 233extern void gui_synclist_add_item(struct gui_synclist * lists);
234extern void gui_synclist_del_item(struct gui_synclist * lists); 234extern void gui_synclist_del_item(struct gui_synclist * lists);
235extern void gui_synclist_limit_scroll(struct gui_synclist * lists, bool scroll); 235extern void gui_synclist_limit_scroll(struct gui_synclist * lists, bool scroll);
236extern void gui_synclist_set_title(struct gui_synclist * lists, char * title, 236extern void gui_synclist_set_title(struct gui_synclist * lists, const char * title,
237 enum themable_icons icon); 237 enum themable_icons icon);
238extern void gui_synclist_hide_selection_marker(struct gui_synclist *lists, 238extern void gui_synclist_hide_selection_marker(struct gui_synclist *lists,
239 bool hide); 239 bool hide);
@@ -301,7 +301,7 @@ extern bool list_do_action(int context, int timeout,
301 **/ 301 **/
302 302
303struct simplelist_info { 303struct simplelist_info {
304 char *title; /* title to show on the list */ 304 const char *title; /* title to show on the list */
305 int count; /* number of items in the list, each item is selection_size high */ 305 int count; /* number of items in the list, each item is selection_size high */
306 int selection_size; /* list selection size, usually 1 */ 306 int selection_size; /* list selection size, usually 1 */
307 bool hide_selection; 307 bool hide_selection;
diff --git a/apps/gui/statusbar-skinned.c b/apps/gui/statusbar-skinned.c
index fd695bf6b6..cda3ec29c9 100644
--- a/apps/gui/statusbar-skinned.c
+++ b/apps/gui/statusbar-skinned.c
@@ -49,11 +49,11 @@
49static int update_delay = DEFAULT_UPDATE_DELAY; 49static int update_delay = DEFAULT_UPDATE_DELAY;
50 50
51static bool sbs_has_title[NB_SCREENS]; 51static bool sbs_has_title[NB_SCREENS];
52static char* sbs_title[NB_SCREENS]; 52static const char* sbs_title[NB_SCREENS];
53static enum themable_icons sbs_icon[NB_SCREENS]; 53static enum themable_icons sbs_icon[NB_SCREENS];
54static bool sbs_loaded[NB_SCREENS] = { false }; 54static bool sbs_loaded[NB_SCREENS] = { false };
55 55
56bool sb_set_title_text(char* title, enum themable_icons icon, enum screen_type screen) 56bool sb_set_title_text(const char* title, enum themable_icons icon, enum screen_type screen)
57{ 57{
58 sbs_title[screen] = title; 58 sbs_title[screen] = title;
59 /* Icon_NOICON == -1 which the skin engine wants at position 1, so + 2 */ 59 /* Icon_NOICON == -1 which the skin engine wants at position 1, so + 2 */
diff --git a/apps/gui/statusbar-skinned.h b/apps/gui/statusbar-skinned.h
index 3ed36f1a84..7f4d93e67e 100644
--- a/apps/gui/statusbar-skinned.h
+++ b/apps/gui/statusbar-skinned.h
@@ -39,7 +39,7 @@ struct viewport *sb_skin_get_info_vp(enum screen_type screen);
39void sb_skin_update(enum screen_type screen, bool force); 39void sb_skin_update(enum screen_type screen, bool force);
40 40
41void sb_skin_set_update_delay(int delay); 41void sb_skin_set_update_delay(int delay);
42bool sb_set_title_text(char* title, enum themable_icons icon, enum screen_type screen); 42bool sb_set_title_text(const char* title, enum themable_icons icon, enum screen_type screen);
43void sb_skin_has_title(enum screen_type screen); 43void sb_skin_has_title(enum screen_type screen);
44const char* sb_get_title(enum screen_type screen); 44const char* sb_get_title(enum screen_type screen);
45enum themable_icons sb_get_icon(enum screen_type screen); 45enum themable_icons sb_get_icon(enum screen_type screen);
diff --git a/apps/plugin.h b/apps/plugin.h
index a487f64168..e35909f409 100644
--- a/apps/plugin.h
+++ b/apps/plugin.h
@@ -387,7 +387,7 @@ struct plugin_api {
387 void (*gui_synclist_limit_scroll)(struct gui_synclist * lists, bool scroll); 387 void (*gui_synclist_limit_scroll)(struct gui_synclist * lists, bool scroll);
388 bool (*gui_synclist_do_button)(struct gui_synclist * lists, 388 bool (*gui_synclist_do_button)(struct gui_synclist * lists,
389 int *action, enum list_wrap wrap); 389 int *action, enum list_wrap wrap);
390 void (*gui_synclist_set_title)(struct gui_synclist *lists, char* title, 390 void (*gui_synclist_set_title)(struct gui_synclist *lists, const char* title,
391 enum themable_icons icon); 391 enum themable_icons icon);
392 enum yesno_res (*gui_syncyesno_run)(const struct text_message * main_message, 392 enum yesno_res (*gui_syncyesno_run)(const struct text_message * main_message,
393 const struct text_message * yes_message, 393 const struct text_message * yes_message,
diff --git a/apps/plugins/lib/printcell_helper.c b/apps/plugins/lib/printcell_helper.c
index 328f74e318..f34636585e 100644
--- a/apps/plugins/lib/printcell_helper.c
+++ b/apps/plugins/lib/printcell_helper.c
@@ -234,7 +234,7 @@ static void printcell_listdraw_fn(struct list_putlineinfo_t *list_info)
234 bool show_cursor = list_info->show_cursor; 234 bool show_cursor = list_info->show_cursor;
235 bool have_icons = list_info->have_icons; 235 bool have_icons = list_info->have_icons;
236 struct line_desc *linedes = list_info->linedes; 236 struct line_desc *linedes = list_info->linedes;
237 char *dsp_text = list_info->dsp_text; 237 const char *dsp_text = list_info->dsp_text;
238 struct viewport *vp = list_info->vp; 238 struct viewport *vp = list_info->vp;
239 int line = list_info->line; 239 int line = list_info->line;
240 240