diff options
author | Sven Weidauer <sven@5sw.de> | 2018-02-10 00:20:05 +0100 |
---|---|---|
committer | Sven Weidauer <sven@5sw.de> | 2018-02-10 00:20:05 +0100 |
commit | 885c5ac91823b2f3d94e72028f603274d5cb3a42 (patch) | |
tree | 2caeb4ccc21283be8ad458de502234922f6851c7 /frontends | |
parent | 7b4163e0216538823630113ed7534c319e19c385 (diff) | |
parent | 470dce645bc9cfca1d438f62a8ffe7a6db80a278 (diff) | |
download | netsurf-885c5ac91823b2f3d94e72028f603274d5cb3a42.tar.gz netsurf-885c5ac91823b2f3d94e72028f603274d5cb3a42.tar.bz2 |
Merge remote-tracking branch 'origin/master' into svenw/cocoa
Diffstat (limited to 'frontends')
-rw-r--r-- | frontends/amiga/theme.c | 4 | ||||
-rw-r--r-- | frontends/framebuffer/font_internal.c | 4 | ||||
-rw-r--r-- | frontends/framebuffer/gui.c | 3 | ||||
-rw-r--r-- | frontends/riscos/gui.c | 13 |
4 files changed, 16 insertions, 8 deletions
diff --git a/frontends/amiga/theme.c b/frontends/amiga/theme.c index 5e4be0710..63982c879 100644 --- a/frontends/amiga/theme.c +++ b/frontends/amiga/theme.c @@ -54,7 +54,8 @@ static struct BitMap *throbber = NULL; static struct bitmap *throbber_nsbm = NULL; -static int throbber_frames, throbber_update_interval; +static int throbber_frames = 1; +static int throbber_update_interval; static Object *mouseptrobj[AMI_LASTPOINTER+1]; static struct BitMap *mouseptrbm[AMI_LASTPOINTER+1]; @@ -176,6 +177,7 @@ void ami_theme_throbber_setup(void) ami_get_theme_filename(throbberfile,"theme_throbber",false); throbber_frames=atoi(messages_get("theme_throbber_frames")); + if(throbber_frames == 0) throbber_frames = 1; throbber_update_interval = atoi(messages_get("theme_throbber_delay")); if(throbber_update_interval == 0) throbber_update_interval = 250; diff --git a/frontends/framebuffer/font_internal.c b/frontends/framebuffer/font_internal.c index 3b8a1c43f..ff3471d1d 100644 --- a/frontends/framebuffer/font_internal.c +++ b/frontends/framebuffer/font_internal.c @@ -270,6 +270,7 @@ fb_get_glyph(uint32_t ucs4, enum fb_font_style style, int scale) break; } } + /* Fall through. */ case FB_BOLD: section = fb_bold_section_table[ucs4 / 256]; if (section != 0 || ucs4 / 256 == 0) { @@ -280,6 +281,7 @@ fb_get_glyph(uint32_t ucs4, enum fb_font_style style, int scale) break; } } + /* Fall through. */ case FB_ITALIC: section = fb_italic_section_table[ucs4 / 256]; if (section != 0 || ucs4 / 256 == 0) { @@ -290,6 +292,7 @@ fb_get_glyph(uint32_t ucs4, enum fb_font_style style, int scale) break; } } + /* Fall through. */ case FB_REGULAR: section = fb_regular_section_table[ucs4 / 256]; if (section != 0 || ucs4 / 256 == 0) { @@ -300,6 +303,7 @@ fb_get_glyph(uint32_t ucs4, enum fb_font_style style, int scale) break; } } + /* Fall through. */ default: glyph_data = get_codepoint(ucs4, style & FB_ITALIC); break; diff --git a/frontends/framebuffer/gui.c b/frontends/framebuffer/gui.c index e252f25f3..8bbaedc22 100644 --- a/frontends/framebuffer/gui.c +++ b/frontends/framebuffer/gui.c @@ -951,8 +951,7 @@ fb_browser_window_input(fbtk_widget_t *widget, fbtk_callback_info *cbi) browser_window_key_press(gw->bw, NS_KEY_REDO); break; } - /* Z or Y pressed but not undo or redo; - * Fall through to default handling */ + /* Z or Y pressed but not undo or redo; Fall through */ default: ucs4 = fbtk_keycode_to_ucs4(cbi->event->value.keycode, diff --git a/frontends/riscos/gui.c b/frontends/riscos/gui.c index cfc513f72..be1bc8d9a 100644 --- a/frontends/riscos/gui.c +++ b/frontends/riscos/gui.c @@ -195,6 +195,7 @@ static struct static nsurl *gui_get_resource_url(const char *path) { static const char base_url[] = "file:///NetSurf:/Resources/"; + const char *lang; size_t path_len, length; char *raw; nsurl *url = NULL; @@ -220,8 +221,12 @@ static nsurl *gui_get_resource_url(const char *path) path_len = strlen(path); + lang = ro_gui_default_language(); + /* Find max URL length */ - length = SLEN(base_url) + SLEN("xx/") + path_len + 1; + length = SLEN(base_url) + + strlen(lang) + 1 + /* <lang> + / */ + path_len + 1; /* + NUL */ raw = malloc(length); if (raw != NULL) { @@ -230,13 +235,11 @@ static nsurl *gui_get_resource_url(const char *path) ptr += SLEN(base_url); /* Add language directory to URL, for translated files */ - /* TODO: handle non-en langauages - * handle non-html translated files */ + /* TODO: handle non-html translated files */ if (path_len > SLEN(".html") && strncmp(path + path_len - SLEN(".html"), ".html", SLEN(".html")) == 0) { - memcpy(ptr, "en/", SLEN("en/")); - ptr += SLEN("en/"); + ptr += sprintf(ptr, "%s/", lang); } /* Add filename to URL */ |