mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-25 05:27:00 +03:00
Merged ro_gui_set_icon_string_le() into ro_gui_set_icon_string() by adding ro_gui_set_icon_string() and extra to_utf8 parameter.
svn path=/trunk/netsurf/; revision=4910
This commit is contained in:
parent
4be25b2951
commit
be181a5b55
@ -70,18 +70,18 @@ bool ro_gui_options_connection_initialise(wimp_w w)
|
||||
proxy_type = (option_http_proxy ? (option_http_proxy_auth + 1) : 0);
|
||||
ro_gui_set_icon_string(w, CONNECTION_PROXY_FIELD,
|
||||
proxy_type_menu->entries[proxy_type].
|
||||
data.indirected_text.text);
|
||||
data.indirected_text.text, true);
|
||||
ro_gui_set_icon_string(w, CONNECTION_PROXY_HOST,
|
||||
option_http_proxy_host ?
|
||||
option_http_proxy_host : "");
|
||||
option_http_proxy_host : "", true);
|
||||
ro_gui_set_icon_integer(w, CONNECTION_PROXY_PORT,
|
||||
option_http_proxy_port);
|
||||
ro_gui_set_icon_string(w, CONNECTION_PROXY_USERNAME,
|
||||
option_http_proxy_auth_user ?
|
||||
option_http_proxy_auth_user : "");
|
||||
option_http_proxy_auth_user : "", true);
|
||||
ro_gui_set_icon_string(w, CONNECTION_PROXY_PASSWORD,
|
||||
option_http_proxy_auth_pass ?
|
||||
option_http_proxy_auth_pass : "");
|
||||
option_http_proxy_auth_pass : "", true);
|
||||
ro_gui_set_icon_integer(w, CONNECTION_MAX_FETCH_FIELD,
|
||||
option_max_fetchers);
|
||||
ro_gui_set_icon_integer(w, CONNECTION_HOST_FETCH_FIELD,
|
||||
@ -146,7 +146,7 @@ void ro_gui_options_connection_update(wimp_w w, wimp_i i)
|
||||
|
||||
int ro_gui_options_connection_proxy_type(wimp_w w)
|
||||
{
|
||||
char *text;
|
||||
const char *text;
|
||||
int i;
|
||||
|
||||
text = ro_gui_get_icon_string(w, CONNECTION_PROXY_FIELD);
|
||||
@ -161,11 +161,11 @@ void ro_gui_options_connection_default(wimp_pointer *pointer)
|
||||
{
|
||||
ro_gui_set_icon_string(pointer->w, CONNECTION_PROXY_FIELD,
|
||||
proxy_type_menu->entries[0].
|
||||
data.indirected_text.text);
|
||||
ro_gui_set_icon_string(pointer->w, CONNECTION_PROXY_HOST, "");
|
||||
data.indirected_text.text, true);
|
||||
ro_gui_set_icon_string(pointer->w, CONNECTION_PROXY_HOST, "", true);
|
||||
ro_gui_set_icon_integer(pointer->w, CONNECTION_PROXY_PORT, 8080);
|
||||
ro_gui_set_icon_string(pointer->w, CONNECTION_PROXY_USERNAME, "");
|
||||
ro_gui_set_icon_string(pointer->w, CONNECTION_PROXY_PASSWORD, "");
|
||||
ro_gui_set_icon_string(pointer->w, CONNECTION_PROXY_USERNAME, "", true);
|
||||
ro_gui_set_icon_string(pointer->w, CONNECTION_PROXY_PASSWORD, "", true);
|
||||
ro_gui_set_icon_integer(pointer->w, CONNECTION_MAX_FETCH_FIELD, 24);
|
||||
ro_gui_set_icon_integer(pointer->w, CONNECTION_HOST_FETCH_FIELD, 5);
|
||||
ro_gui_set_icon_integer(pointer->w, CONNECTION_CACHE_FETCH_FIELD, 6);
|
||||
|
@ -67,13 +67,13 @@ bool ro_gui_options_fonts_initialise(wimp_w w)
|
||||
/* set the current values */
|
||||
ro_gui_set_icon_decimal(w, FONT_DEFAULT_SIZE, option_font_size, 1);
|
||||
ro_gui_set_icon_decimal(w, FONT_MINIMUM_SIZE, option_font_min_size, 1);
|
||||
ro_gui_set_icon_string(w, FONT_SANS_FIELD, option_font_sans);
|
||||
ro_gui_set_icon_string(w, FONT_SERIF_FIELD, option_font_serif);
|
||||
ro_gui_set_icon_string(w, FONT_MONOSPACE_FIELD, option_font_mono);
|
||||
ro_gui_set_icon_string(w, FONT_CURSIVE_FIELD, option_font_cursive);
|
||||
ro_gui_set_icon_string(w, FONT_FANTASY_FIELD, option_font_fantasy);
|
||||
ro_gui_set_icon_string(w, FONT_SANS_FIELD, option_font_sans, true);
|
||||
ro_gui_set_icon_string(w, FONT_SERIF_FIELD, option_font_serif, true);
|
||||
ro_gui_set_icon_string(w, FONT_MONOSPACE_FIELD, option_font_mono, true);
|
||||
ro_gui_set_icon_string(w, FONT_CURSIVE_FIELD, option_font_cursive, true);
|
||||
ro_gui_set_icon_string(w, FONT_FANTASY_FIELD, option_font_fantasy, true);
|
||||
ro_gui_set_icon_string(w, FONT_DEFAULT_FIELD,
|
||||
css_font_family_name[option_font_default]);
|
||||
css_font_family_name[option_font_default], true);
|
||||
|
||||
if (!ro_gui_options_fonts_init_menu())
|
||||
return false;
|
||||
@ -114,17 +114,17 @@ void ro_gui_options_fonts_default(wimp_pointer *pointer)
|
||||
ro_gui_set_icon_decimal(pointer->w, FONT_DEFAULT_SIZE, 128, 1);
|
||||
ro_gui_set_icon_decimal(pointer->w, FONT_MINIMUM_SIZE, 85, 1);
|
||||
ro_gui_set_icon_string(pointer->w, FONT_SANS_FIELD,
|
||||
nsfont_exists("Homerton") ? "Homerton" : fallback);
|
||||
nsfont_exists("Homerton") ? "Homerton" : fallback, true);
|
||||
ro_gui_set_icon_string(pointer->w, FONT_SERIF_FIELD,
|
||||
nsfont_exists("Trinity") ? "Trinity" : fallback);
|
||||
nsfont_exists("Trinity") ? "Trinity" : fallback, true);
|
||||
ro_gui_set_icon_string(pointer->w, FONT_MONOSPACE_FIELD,
|
||||
nsfont_exists("Corpus") ? "Corpus" : fallback);
|
||||
nsfont_exists("Corpus") ? "Corpus" : fallback, true);
|
||||
ro_gui_set_icon_string(pointer->w, FONT_CURSIVE_FIELD,
|
||||
nsfont_exists("Churchill") ? "Churchill" : fallback);
|
||||
nsfont_exists("Churchill") ? "Churchill" : fallback, true);
|
||||
ro_gui_set_icon_string(pointer->w, FONT_FANTASY_FIELD,
|
||||
nsfont_exists("Sassoon") ? "Sassoon" : fallback);
|
||||
nsfont_exists("Sassoon") ? "Sassoon" : fallback, true);
|
||||
ro_gui_set_icon_string(pointer->w, FONT_DEFAULT_FIELD,
|
||||
css_font_family_name[1]);
|
||||
css_font_family_name[1], true);
|
||||
}
|
||||
|
||||
bool ro_gui_options_fonts_ok(wimp_w w)
|
||||
|
@ -46,7 +46,7 @@ bool ro_gui_options_home_initialise(wimp_w w)
|
||||
|
||||
/* set the current values */
|
||||
ro_gui_set_icon_string(w, HOME_URL_FIELD,
|
||||
option_homepage_url ? option_homepage_url : "");
|
||||
option_homepage_url ? option_homepage_url : "", true);
|
||||
ro_gui_set_icon_selected_state(w, HOME_OPEN_STARTUP,
|
||||
option_open_browser_at_startup);
|
||||
global_history_get_recent(&suggestions);
|
||||
@ -71,7 +71,7 @@ bool ro_gui_options_home_initialise(wimp_w w)
|
||||
void ro_gui_options_home_default(wimp_pointer *pointer)
|
||||
{
|
||||
/* set the default values */
|
||||
ro_gui_set_icon_string(pointer->w, HOME_URL_FIELD, "");
|
||||
ro_gui_set_icon_string(pointer->w, HOME_URL_FIELD, "", true);
|
||||
ro_gui_set_icon_selected_state(pointer->w, HOME_OPEN_STARTUP, false);
|
||||
}
|
||||
|
||||
|
@ -79,11 +79,11 @@ bool ro_gui_options_image_initialise(wimp_w w)
|
||||
if ((unsigned int)option_fg_plot_style == tinct_options[i])
|
||||
ro_gui_set_icon_string(w, IMAGE_FOREGROUND_FIELD,
|
||||
image_quality_menu->entries[i].
|
||||
data.indirected_text.text);
|
||||
data.indirected_text.text, true);
|
||||
if ((unsigned int)option_bg_plot_style == tinct_options[i])
|
||||
ro_gui_set_icon_string(w, IMAGE_BACKGROUND_FIELD,
|
||||
image_quality_menu->entries[i].
|
||||
data.indirected_text.text);
|
||||
data.indirected_text.text, true);
|
||||
}
|
||||
ro_gui_set_icon_decimal(w, IMAGE_SPEED_FIELD, option_minimum_gif_delay, 2);
|
||||
ro_gui_set_icon_selected_state(w, IMAGE_DISABLE_ANIMATION,
|
||||
@ -179,16 +179,16 @@ void ro_gui_options_image_redraw(wimp_draw *redraw)
|
||||
|
||||
void ro_gui_options_image_read(wimp_w w, unsigned int *bg, unsigned int *fg)
|
||||
{
|
||||
char *text;
|
||||
const char *text;
|
||||
int i;
|
||||
|
||||
text = ro_gui_get_icon_string(w, IMAGE_FOREGROUND_FIELD);
|
||||
for (i = 0; (i < 4); i++)
|
||||
for (i = 0; i < 4; i++)
|
||||
if (!strcmp(text, image_quality_menu->entries[i].
|
||||
data.indirected_text.text))
|
||||
*fg = tinct_options[i];
|
||||
text = ro_gui_get_icon_string(w, IMAGE_BACKGROUND_FIELD);
|
||||
for (i = 0; (i < 4); i++)
|
||||
for (i = 0; i < 4; i++)
|
||||
if (!strcmp(text, image_quality_menu->entries[i].
|
||||
data.indirected_text.text))
|
||||
*bg = tinct_options[i];
|
||||
@ -203,10 +203,10 @@ bool ro_gui_options_image_click(wimp_pointer *pointer)
|
||||
case IMAGE_DEFAULT_BUTTON:
|
||||
ro_gui_set_icon_string(pointer->w, IMAGE_FOREGROUND_FIELD,
|
||||
image_quality_menu->entries[3].
|
||||
data.indirected_text.text);
|
||||
data.indirected_text.text, true);
|
||||
ro_gui_set_icon_string(pointer->w, IMAGE_BACKGROUND_FIELD,
|
||||
image_quality_menu->entries[2].
|
||||
data.indirected_text.text);
|
||||
data.indirected_text.text, true);
|
||||
ro_gui_set_icon_decimal(pointer->w, IMAGE_SPEED_FIELD,
|
||||
10, 2);
|
||||
ro_gui_set_icon_selected_state(pointer->w,
|
||||
|
@ -49,10 +49,10 @@ bool ro_gui_options_language_initialise(wimp_w w)
|
||||
/* set the current values */
|
||||
ro_gui_set_icon_string(w, LANGUAGE_INTERFACE_FIELD,
|
||||
ro_gui_options_language_name(option_language ?
|
||||
option_language : "en"));
|
||||
option_language : "en"), true);
|
||||
ro_gui_set_icon_string(w, LANGUAGE_WEB_PAGES_FIELD,
|
||||
ro_gui_options_language_name(option_accept_language ?
|
||||
option_accept_language : "en"));
|
||||
option_accept_language : "en"), true);
|
||||
|
||||
/* initialise all functions for a newly created window */
|
||||
ro_gui_wimp_event_register_menu_gright(w, LANGUAGE_INTERFACE_FIELD,
|
||||
@ -77,10 +77,10 @@ void ro_gui_options_language_default(wimp_pointer *pointer)
|
||||
code = ro_gui_default_language();
|
||||
ro_gui_set_icon_string(pointer->w, LANGUAGE_INTERFACE_FIELD,
|
||||
ro_gui_options_language_name(code ?
|
||||
code : "en"));
|
||||
code : "en"), true);
|
||||
ro_gui_set_icon_string(pointer->w, LANGUAGE_WEB_PAGES_FIELD,
|
||||
ro_gui_options_language_name(code ?
|
||||
code : "en"));
|
||||
code : "en"), true);
|
||||
}
|
||||
|
||||
bool ro_gui_options_language_ok(wimp_w w)
|
||||
|
Loading…
Reference in New Issue
Block a user