diff --git a/src/bfu/hierbox.c b/src/bfu/hierbox.c index 40416d36e..618830def 100644 --- a/src/bfu/hierbox.c +++ b/src/bfu/hierbox.c @@ -318,7 +318,7 @@ hierbox_browser(struct hierbox_browser *browser, struct session *ses) add_dlg_listbox(dlg, listbox_data); for (button = 0; button < browser->buttons_size; button++) { - struct hierbox_browser_button *but = &browser->buttons[button]; + const struct hierbox_browser_button *but = &browser->buttons[button]; /* Skip buttons that should not be displayed in anonymous mode */ if (anonymous && !but->anonymous) { diff --git a/src/bfu/hierbox.h b/src/bfu/hierbox.h index b98300de9..b4a354b95 100644 --- a/src/bfu/hierbox.h +++ b/src/bfu/hierbox.h @@ -18,7 +18,7 @@ struct hierbox_browser_button { struct hierbox_browser { unsigned char *title; void (*expansion_callback)(void); - struct hierbox_browser_button *buttons; + const struct hierbox_browser_button *buttons; size_t buttons_size; struct list_head boxes; diff --git a/src/bookmarks/dialogs.c b/src/bookmarks/dialogs.c index ed17ecc78..a7e3cea96 100644 --- a/src/bookmarks/dialogs.c +++ b/src/bookmarks/dialogs.c @@ -482,7 +482,7 @@ push_move_button(struct dialog_data *dlg_data, /**** MANAGEMENT *****************************************************/ -static struct hierbox_browser_button bookmark_buttons[] = { +static const struct hierbox_browser_button bookmark_buttons[] = { /* [gettext_accelerator_context(.bookmark_buttons)] */ { N_("~Goto"), push_hierbox_goto_button, 1 }, { N_("~Edit"), push_edit_button, 0 }, @@ -498,7 +498,7 @@ static struct hierbox_browser_button bookmark_buttons[] = { { N_("Clear"), push_hierbox_clear_button, 0 }, /* TODO: Would this be useful? --jonas */ - { N_("Save"), push_save_button }, + { N_("Save"), push_save_button, 0 }, #endif }; diff --git a/src/cache/dialogs.c b/src/cache/dialogs.c index 5a2dc985d..839d6ba2a 100644 --- a/src/cache/dialogs.c +++ b/src/cache/dialogs.c @@ -224,7 +224,7 @@ static struct listbox_ops cache_entry_listbox_ops = { &cache_messages, }; -static struct hierbox_browser_button cache_buttons[] = { +static const struct hierbox_browser_button cache_buttons[] = { /* [gettext_accelerator_context(.cache_buttons)] */ { N_("~Info"), push_hierbox_info_button, 1 }, { N_("~Goto"), push_hierbox_goto_button, 1 }, diff --git a/src/config/dialogs.c b/src/config/dialogs.c index fffecabe4..cff11a7fc 100644 --- a/src/config/dialogs.c +++ b/src/config/dialogs.c @@ -492,7 +492,7 @@ push_save_button(struct dialog_data *dlg_data, } -static struct hierbox_browser_button option_buttons[] = { +static const struct hierbox_browser_button option_buttons[] = { /* [gettext_accelerator_context(.option_buttons)] */ { N_("~Info"), push_hierbox_info_button, 1 }, { N_("~Edit"), push_edit_button, 0 }, @@ -921,7 +921,7 @@ push_kbdbind_save_button(struct dialog_data *dlg_data, static INIT_LIST_HEAD(keybinding_dialog_list); -static struct hierbox_browser_button keybinding_buttons[] = { +static const struct hierbox_browser_button keybinding_buttons[] = { /* [gettext_accelerator_context(.keybinding_buttons)] */ { N_("~Add"), push_kbdbind_add_button, 0 }, { N_("~Delete"), push_hierbox_delete_button, 0 }, diff --git a/src/cookies/dialogs.c b/src/cookies/dialogs.c index d80407b06..b859bc9d4 100644 --- a/src/cookies/dialogs.c +++ b/src/cookies/dialogs.c @@ -471,7 +471,7 @@ push_save_button(struct dialog_data *dlg_data, struct widget_data *button) return EVENT_PROCESSED; } -static struct hierbox_browser_button cookie_buttons[] = { +static const struct hierbox_browser_button cookie_buttons[] = { /* [gettext_accelerator_context(.cookie_buttons)] */ { N_("~Info"), push_hierbox_info_button, 1 }, { N_("~Add"), push_add_button, 1 }, diff --git a/src/dialogs/download.c b/src/dialogs/download.c index a9369962e..931169f0e 100644 --- a/src/dialogs/download.c +++ b/src/dialogs/download.c @@ -487,7 +487,7 @@ push_info_button(struct dialog_data *dlg_data, struct widget_data *button) * - Open button that can be used to set file_download->prog. * - Toggle notify button */ -static struct hierbox_browser_button download_buttons[] = { +static const struct hierbox_browser_button download_buttons[] = { /* [gettext_accelerator_context(.download_buttons)] */ { N_("~Info"), push_info_button }, { N_("~Abort"), push_hierbox_delete_button }, diff --git a/src/formhist/dialogs.c b/src/formhist/dialogs.c index 9eb5fec5c..2727e7032 100644 --- a/src/formhist/dialogs.c +++ b/src/formhist/dialogs.c @@ -204,7 +204,7 @@ push_save_button(struct dialog_data *dlg_data, struct widget_data *button) return EVENT_PROCESSED; } -static struct hierbox_browser_button formhist_buttons[] = { +static const struct hierbox_browser_button formhist_buttons[] = { /* [gettext_accelerator_context(.formhist_buttons)] */ { N_("~Login"), push_login_button, 1 }, { N_("~Info"), push_hierbox_info_button, 1 }, diff --git a/src/globhist/dialogs.c b/src/globhist/dialogs.c index 9d93f5d5d..896263dea 100644 --- a/src/globhist/dialogs.c +++ b/src/globhist/dialogs.c @@ -219,7 +219,7 @@ push_bookmark_button(struct dialog_data *dlg_data, /* The global history manager: */ -static struct hierbox_browser_button globhist_buttons[] = { +static const struct hierbox_browser_button globhist_buttons[] = { /* [gettext_accelerator_context(.globhist_buttons)] */ { N_("~Goto"), push_hierbox_goto_button, 1 }, { N_("~Info"), push_hierbox_info_button, 1 }, @@ -232,7 +232,7 @@ static struct hierbox_browser_button globhist_buttons[] = { { N_("C~lear"), push_hierbox_clear_button, 0 }, #if 0 /* TODO: Would this be useful? --jonas */ - { N_("Save"), push_save_button }, + { N_("Save"), push_save_button, 0 }, #endif }; diff --git a/src/protocol/auth/dialogs.c b/src/protocol/auth/dialogs.c index 0722df16f..ce39da6b5 100644 --- a/src/protocol/auth/dialogs.c +++ b/src/protocol/auth/dialogs.c @@ -256,7 +256,7 @@ static struct listbox_ops auth_listbox_ops = { &http_auth_messages, }; -static struct hierbox_browser_button auth_buttons[] = { +static const struct hierbox_browser_button auth_buttons[] = { /* [gettext_accelerator_context(.auth_buttons)] */ { N_("~Goto"), push_hierbox_goto_button, 1 }, { N_("~Info"), push_hierbox_info_button, 1 },