Implemented language and font renderer popups.

This commit is contained in:
Ole Loots 2013-01-07 23:45:02 +01:00
parent 0bbccaa935
commit 7920daaa3f
9 changed files with 5137 additions and 783 deletions

View File

@ -165,7 +165,7 @@ void context_popup(struct gui_window * gw, short x, short y)
pop_menu.mn_tree = get_tree(POP_CTX);
pop_menu.mn_menu = 0;
pop_menu.mn_item = POP_CTX_CUT_SEL;
pop_menu.mn_scroll = SCROLL_LISTBOX;
pop_menu.mn_scroll = SCROLL_NO;
pop_menu.mn_keystate = 0;
menu_popup(&pop_menu, x, y, &me_data);

View File

@ -543,7 +543,7 @@ short guiwin_init(void)
{
if(v_vdi_h == -1) {
short dummy;
static short work_in[12] = {1,1,1,1,1,1,1,1,1,1,2,1};
short work_in[12] = {Getrez()+2,1,1,1,1,1,1,1,1,1,2,1};
v_vdi_h=graf_handle(&dummy, &dummy, &dummy, &dummy);
v_opnvwk(work_in, &v_vdi_h, work_out);
}

View File

@ -999,10 +999,11 @@ void gui_options_init_defaults(void)
{
/* Set defaults for absent option strings */
nsoption_setnull_charp(cookie_file, strdup("cookies"));
if (nsoption_charp(cookie_file) == NULL) {
die("Failed initialising string options");
}
nsoption_set_int(min_reflow_period, 350);
}
static void gui_init(int argc, char** argv)

4379
atari/res/netsurf.c Normal file

File diff suppressed because it is too large Load Diff

22
atari/res/netsurf.csc Normal file
View File

@ -0,0 +1,22 @@
static vars=TRUE
short file=FALSE
blank lines=TRUE
object numbers=TRUE
init te_ptext=TRUE
no init function=FALSE
init function=rs_init
exit function=rs_exit
ciconinit function=rs_ciconinit
ciconexit function=rs_ciconexit
optimize images=FALSE
optimize strings=TRUE
optimize icontext=FALSE
optimize substrings=FALSE
optimize emtystrings=TRUE
includes=
ob_spec=long
ub_code=long
ub_parm=long
draw function=mydraw
obfix function=rsrc_obfix
bi_pdata=int

Binary file not shown.

View File

@ -70,30 +70,15 @@
#define LOGIN_BT_LOGIN 5 /* BUTTON in tree LOGIN */
#define LOGIN_BT_ABORT 6 /* BUTTON in tree LOGIN */
#define VERIFY 6 /* form/dial */
#define VERIFY_LBL_HOST 3 /* TEXT in tree VERIFY */
#define VERIFY_BT_ACCEPT 4 /* BUTTON in tree VERIFY */
#define VERIFY_BT_REJECT 5 /* BUTTON in tree VERIFY */
#define VERIFY_BT_NEXT_CERT 7 /* BUTTON in tree VERIFY */
#define VERIFY_BOX_DETAILS 8 /* BOX in tree VERIFY */
#define VERIFY_BOX_H 9 /* BOX in tree VERIFY */
#define VERIFY_BT_SCROLL_R 10 /* BOXCHAR in tree VERIFY */
#define VERIFY_BT_SCROLL_L 11 /* BOXCHAR in tree VERIFY */
#define VERIFY_BOX_MOVER_H 12 /* BOX in tree VERIFY */
#define VERIFY_BT_SCROLL_U 13 /* BOXCHAR in tree VERIFY */
#define VERIFY_BT_SCROLL_D 14 /* BOXCHAR in tree VERIFY */
#define VERIFY_BOX_V 15 /* BOX in tree VERIFY */
#define VERIFY_MOVER_V 16 /* BOX in tree VERIFY */
#define THROBBER 6 /* form/dial */
#define THROBBER 7 /* form/dial */
#define TOOLBAR_HOTLIST 8 /* form/dial */
#define TOOLBAR_HOTLIST 7 /* form/dial */
#define TOOLBAR_HOTLIST_ADD 1 /* CICON in tree TOOLBAR_HOTLIST */
#define TOOLBAR_HOTLIST_CREATE_FOLDER 2 /* CICON in tree TOOLBAR_HOTLIST */
#define TOOLBAR_HOTLIST_DELETE 3 /* CICON in tree TOOLBAR_HOTLIST */
#define TOOLBAR_HOTLIST_EDIT 4 /* CICON in tree TOOLBAR_HOTLIST */
#define SEARCH 9 /* form/dial */
#define SEARCH 8 /* form/dial */
#define SEARCH_TB_SRCH 1 /* FTEXT in tree SEARCH */
#define SEARCH_LBL_SHOWALL 2 /* STRING in tree SEARCH */
#define SEARCH_LBL_CASESENSE 3 /* STRING in tree SEARCH */
@ -103,7 +88,7 @@
#define SEARCH_CB_SHOWALL 7 /* BUTTON in tree SEARCH */
#define SEARCH_CB_FWD 8 /* BUTTON in tree SEARCH */
#define DOWNLOAD 10 /* form/dial */
#define DOWNLOAD 9 /* form/dial */
/* Width ist 400, code depends on that! If you change it, change it in download.c */
#define DOWNLOAD_PROGRESS 1 /* BOX in tree DOWNLOAD */
#define DOWNLOAD_PROGRESS_DONE 2 /* BOX in tree DOWNLOAD */
@ -115,9 +100,9 @@
#define DOWNLOAD_LBL_SPEED 8 /* TEXT in tree DOWNLOAD */
#define DOWNLOAD_CB_CLOSE_RDY 9 /* BOXCHAR in tree DOWNLOAD */
#define ABOUT 11 /* form/dial */
#define ABOUT 10 /* form/dial */
#define POP_CTX 12 /* form/dial */
#define POP_CTX 11 /* form/dial */
#define POP_CTX_CUT_SEL 1 /* TEXT in tree POP_CTX */
#define POP_CTX_COPY_SEL 2 /* TEXT in tree POP_CTX */
#define POP_CTX_PASTE_SEL 3 /* TEXT in tree POP_CTX */
@ -129,56 +114,7 @@
#define POP_CTX_VIEW_SOURCE 10 /* TEXT in tree POP_CTX */
#define POP_CTX_SAVE_LINK_AS 11 /* TEXT in tree POP_CTX */
#define CHOICES 13 /* form/dial */
#define CHOICES_REG_BROWSER 1 /* BUTTON in tree CHOICES */
#define CHOICES_REG_RENDER 2 /* BUTTON in tree CHOICES */
#define CHOICES_REG_STYLE 3 /* BUTTON in tree CHOICES */
#define CHOICES_REG_NETWORK 4 /* BUTTON in tree CHOICES */
#define CHOICES_REG_PATH 5 /* BUTTON in tree CHOICES */
#define CHOICES_REG_CACHE 6 /* BUTTON in tree CHOICES */
#define CHOICES_TAB_STYLE 7 /* BUTTON in tree CHOICES */
#define CHOICES_BT_TOOLBAR_ICONSET 11 /* BUTTON in tree CHOICES */
#define CHOICES_INPUT_TOOLBAR_BGCOLOR 13 /* FTEXT in tree CHOICES */
#define CHOICES_TAB_RENDER 14 /* BUTTON in tree CHOICES */
#define CHOICES_CB_TRANSPARENCY 15 /* BUTTON in tree CHOICES */
#define CHOICES_CB_ENABLE_ANIMATION 17 /* BUTTON in tree CHOICES */
#define CHOICES_CB_INCREMENTAL_REFLOW 18 /* BUTTON in tree CHOICES */
#define CHOICES_EDIT_MIN_REFLOW_PERIOD 20 /* FTEXT in tree CHOICES */
#define CHOICES_DEC_INCREMENTAL_REFLOW 21 /* BOXCHAR in tree CHOICES */
#define CHOICES_INC_INCREMENTAL_REFLOW 22 /* BOXCHAR in tree CHOICES */
#define CHOICES_TAB_PATH 24 /* BUTTON in tree CHOICES */
#define CHOICES_TAB_CACHE 25 /* BUTTON in tree CHOICES */
#define CHOICES_INC_MEM_CACHE 29 /* BOXCHAR in tree CHOICES */
#define CHOICES_DEC_MEM_CACHE 30 /* BOXCHAR in tree CHOICES */
#define CHOICES_STR_MAX_MEM_CACHE 31 /* STRING in tree CHOICES */
#define CHOICES_TAB_BROWSER 32 /* BUTTON in tree CHOICES */
#define CHOICES_CB_HIDE_ADVERTISEMENT 34 /* BUTTON in tree CHOICES */
#define CHOICES_CB_DISABLE_POPUP_WINDOWS 35 /* BUTTON in tree CHOICES */
#define CHOICES_CB_SEND_DO_NOT_TRACK 36 /* BUTTON in tree CHOICES */
#define CHOICES_BT_SEL_LOCALE 38 /* BUTTON in tree CHOICES */
#define CHOICES_BT_GUI_LANG 41 /* BUTTON in tree CHOICES */
#define CHOICES_EDIT_HISTORY_AGE 44 /* FTEXT in tree CHOICES */
#define CHOICES_DEC_HISTORY_AGE 45 /* BOXCHAR in tree CHOICES */
#define CHOICES_INC_HISTORY_AGE 46 /* BOXCHAR in tree CHOICES */
#define CHOICES_CB_SEND_HTTP_REFERRER 50 /* BUTTON in tree CHOICES */
#define CHOICES_EDIT_HOMEPAGE 51 /* FTEXT in tree CHOICES */
#define CHOICES_BT_CLEAR_HISTORY 52 /* BUTTON in tree CHOICES */
#define CHOICES_TAB_NETWORK 53 /* BUTTON in tree CHOICES */
#define CHOICES_CB_USE_PROXY 55 /* BUTTON in tree CHOICES */
#define CHOICES_EDIT_PROXY_HOST 56 /* FTEXT in tree CHOICES */
#define CHOICES_CB_PROXY_AUTH 57 /* BUTTON in tree CHOICES */
#define CHOICES_EDIT_PROXY_USERNAME 58 /* FTEXT in tree CHOICES */
#define CHOICES_EDIT_PROXY_PASSWORD 59 /* FTEXT in tree CHOICES */
#define CHOICES_EDIT_PROXY_PORT 61 /* FTEXT in tree CHOICES */
#define CHOICES_EDIT_MAX_FETCHERS 66 /* FTEXT in tree CHOICES */
#define CHOICES_INC_MAX_FETCHERS 67 /* BOXCHAR in tree CHOICES */
#define CHOICES_DEC_MAX_FETCHERS 68 /* BOXCHAR in tree CHOICES */
#define CHOICES_CB_FG_IMAGES 69 /* BUTTON in tree CHOICES */
#define CHOICES_CB_BG_IMAGES 70 /* BUTTON in tree CHOICES */
#define CHOICES_ABORT 72 /* BUTTON in tree CHOICES */
#define CHOICES_OK 73 /* BUTTON in tree CHOICES */
#define VSCROLLER 14 /* form/dial */
#define VSCROLLER 12 /* form/dial */
#define VSCROLLER_AREA 1 /* BOX in tree VSCROLLER */
#define VSCROLLER_SLIDER_AREA 2 /* BUTTON in tree VSCROLLER */
#define VSCROLLER_SLIDER 3 /* BUTTON in tree VSCROLLER */
@ -187,7 +123,7 @@
#define VSCROLLER_BT_UP 6 /* IBOX in tree VSCROLLER */
#define VSCROLLER_BT_UP_PIC 4 /* CICON in tree VSCROLLER */
#define SETTINGS 15 /* form/dial */
#define SETTINGS 13 /* form/dial */
#define SETTINGS_SAVE 1 /* BUTTON in tree SETTINGS */
#define SETTINGS_ABORT 2 /* BUTTON in tree SETTINGS */
#define SETTINGS_GROUP_BROWSER 3 /* IBOX in tree SETTINGS */
@ -244,9 +180,33 @@
#define SETTINGS_CB_ENABLE_ANIMATION 67 /* BOXCHAR in tree SETTINGS */
#define SETTINGS_CB_BG_IMAGES 102 /* BOXCHAR in tree SETTINGS */
#define SETTINGS_CB_FG_IMAGES 105 /* BOXCHAR in tree SETTINGS */
#define SETTINGS_EDIT_MIN_REFLOW_PERIOD 109 /* FTEXT in tree SETTINGS */
#define SETTINGS_DEC_INCREMENTAL_REFLOW 110 /* BOXCHAR in tree SETTINGS */
#define SETTINGS_INC_INCREMENTAL_REFLOW 111 /* BOXCHAR in tree SETTINGS */
#define SETTINGS_GROUP_RENDERING_00 86 /* IBOX in tree SETTINGS */
#define SETTINGS_EDIT_DOWNLOAD_PATH 90 /* FTEXT in tree SETTINGS */
#define SETTINGS_EDIT_HOTLIST_FILE 91 /* FTEXT in tree SETTINGS */
#define SETTINGS_EDIT_CA_BUNDLE 92 /* FTEXT in tree SETTINGS */
#define SETTINGS_EDIT_CA_CERTS_PATH 93 /* FTEXT in tree SETTINGS */
#define SETTINGS_EDIT_EDITOR 94 /* FTEXT in tree SETTINGS */
#define POP_LANGUAGE 14 /* form/dial */
#define POP_LANGUAGE_CS 1 /* STRING in tree POP_LANGUAGE */
#define POP_LANGUAGE_DE 2 /* STRING in tree POP_LANGUAGE */
#define POP_LANGUAGE_EN 3 /* STRING in tree POP_LANGUAGE */
#define POP_LANGUAGE_EN_GB 4 /* STRING in tree POP_LANGUAGE */
#define POP_LANGUAGE_DE_DE 5 /* STRING in tree POP_LANGUAGE */
#define POP_LANGUAGE_EN_US 6 /* STRING in tree POP_LANGUAGE */
#define POP_LANGUAGE_ES 7 /* STRING in tree POP_LANGUAGE */
#define POP_LANGUAGE_FR 8 /* STRING in tree POP_LANGUAGE */
#define POP_LANGUAGE_IT 9 /* STRING in tree POP_LANGUAGE */
#define POP_LANGUAGE_NL 10 /* STRING in tree POP_LANGUAGE */
#define POP_LANGUAGE_NO 11 /* STRING in tree POP_LANGUAGE */
#define POP_LANGUAGE_PL 12 /* STRING in tree POP_LANGUAGE */
#define POP_LANGUAGE_RU 13 /* STRING in tree POP_LANGUAGE */
#define POP_LANGUAGE_SK 14 /* STRING in tree POP_LANGUAGE */
#define POP_LANGUAGE_SV 15 /* STRING in tree POP_LANGUAGE */
#define POP_FONT_RENDERER 15 /* form/dial */
#define POP_FONT_RENDERER_INTERNAL 1 /* STRING in tree POP_FONT_RENDERER */
#define POP_FONT_RENDERER_FREETYPE 2 /* STRING in tree POP_FONT_RENDERER */

View File

@ -3,7 +3,7 @@ ResourceMaster v3.65
#N 99@32@AZAaza___ _@AZAaza090___ _@@_@
#FoC-Header@rsm2out@C-Header@rsh@@@[C-Header@0@
#R 0@0@2@1@2@1@
#M 20010100@0@7728@630@
#M 20010100@0@7728@631@
#T 0@1@MAINMENU@@62@@
#O 4@32@T_FILE@@
#O 5@32@T_EDIT@@
@ -68,28 +68,13 @@ ResourceMaster v3.65
#O 4@29@TB_PASSWORD@@
#O 5@26@BT_LOGIN@@
#O 6@26@BT_ABORT@@
#T 6@2@VERIFY@@17@@
#O 0@20@@VERT SLIDER SIND HIDDEN!@
#O 3@21@LBL_HOST@@
#O 4@26@BT_ACCEPT@@
#O 5@26@BT_REJECT@@
#O 7@26@BT_NEXT_CERT@@
#O 8@20@BOX_DETAILS@@
#O 9@20@BOX_H@@
#O 10@27@BT_SCROLL_R@@
#O 11@27@BT_SCROLL_L@@
#O 12@20@BOX_MOVER_H@@
#O 13@27@BT_SCROLL_U@@
#O 14@27@BT_SCROLL_D@@
#O 15@20@BOX_V@@
#O 16@20@MOVER_V@@
#T 7@2@THROBBER@@14@@
#T 8@2@TOOLBAR_HOTLIST@@5@@
#T 6@2@THROBBER@@14@@
#T 7@2@TOOLBAR_HOTLIST@@5@@
#O 1@33@ADD@@
#O 2@33@CREATE_FOLDER@@
#O 3@33@DELETE@@
#O 4@33@EDIT@@
#T 9@2@SEARCH@@9@@
#T 8@2@SEARCH@@9@@
#O 1@29@TB_SRCH@@
#O 2@28@LBL_SHOWALL@@
#O 3@28@LBL_CASESENSE@@
@ -98,7 +83,7 @@ ResourceMaster v3.65
#O 6@26@CB_CASESENSE@@
#O 7@26@CB_SHOWALL@@
#O 8@26@CB_FWD@@
#T 10@2@DOWNLOAD@@10@@
#T 9@2@DOWNLOAD@@10@@
#O 1@20@PROGRESS@Width ist 400, code depends on that! If you change it, change it in download.c@
#O 2@20@PROGRESS_DONE@@
#O 3@21@FILENAME@@
@ -108,8 +93,8 @@ ResourceMaster v3.65
#O 7@21@LBL_PERCENT@@
#O 8@21@LBL_SPEED@@
#O 9@27@CB_CLOSE_RDY@@
#T 11@2@ABOUT@@2@@
#T 12@2@POP_CTX@@12@@
#T 10@2@ABOUT@@2@@
#T 11@2@POP_CTX@@12@@
#O 1@21@CUT_SEL@@
#O 2@21@COPY_SEL@@
#O 3@21@PASTE_SEL@@
@ -120,55 +105,7 @@ ResourceMaster v3.65
#O 9@21@SAVE_AS@@
#O 10@21@VIEW_SOURCE@@
#O 11@21@SAVE_LINK_AS@@
#T 13@2@CHOICES@@74@@
#O 1@26@REG_BROWSER@@
#O 2@26@REG_RENDER@@
#O 3@26@REG_STYLE@@
#O 4@26@REG_NETWORK@@
#O 5@26@REG_PATH@@
#O 6@26@REG_CACHE@@
#O 7@26@TAB_STYLE@@
#O 11@26@BT_TOOLBAR_ICONSET@@
#O 13@29@INPUT_TOOLBAR_BGCOLOR@@
#O 14@26@TAB_RENDER@@
#O 15@26@CB_TRANSPARENCY@@
#O 17@26@CB_ENABLE_ANIMATION@@
#O 18@26@CB_INCREMENTAL_REFLOW@@
#O 20@29@EDIT_MIN_REFLOW_PERIOD@@
#O 21@27@DEC_INCREMENTAL_REFLOW@@
#O 22@27@INC_INCREMENTAL_REFLOW@@
#O 24@26@TAB_PATH@@
#O 25@26@TAB_CACHE@@
#O 29@27@INC_MEM_CACHE@@
#O 30@27@DEC_MEM_CACHE@@
#O 31@28@STR_MAX_MEM_CACHE@@
#O 32@26@TAB_BROWSER@@
#O 34@26@CB_HIDE_ADVERTISEMENT@@
#O 35@26@CB_DISABLE_POPUP_WINDOWS@@
#O 36@26@CB_SEND_DO_NOT_TRACK@@
#O 38@26@BT_SEL_LOCALE@@
#O 41@26@BT_GUI_LANG@@
#O 44@29@EDIT_HISTORY_AGE@@
#O 45@27@DEC_HISTORY_AGE@@
#O 46@27@INC_HISTORY_AGE@@
#O 50@26@CB_SEND_HTTP_REFERRER@@
#O 51@29@EDIT_HOMEPAGE@@
#O 52@26@BT_CLEAR_HISTORY@@
#O 53@26@TAB_NETWORK@@
#O 55@26@CB_USE_PROXY@@
#O 56@29@EDIT_PROXY_HOST@@
#O 57@26@CB_PROXY_AUTH@@
#O 58@29@EDIT_PROXY_USERNAME@@
#O 59@29@EDIT_PROXY_PASSWORD@@
#O 61@29@EDIT_PROXY_PORT@@
#O 66@29@EDIT_MAX_FETCHERS@@
#O 67@27@INC_MAX_FETCHERS@@
#O 68@27@DEC_MAX_FETCHERS@@
#O 69@26@CB_FG_IMAGES@@
#O 70@26@CB_BG_IMAGES@@
#O 72@26@ABORT@@
#O 73@26@OK@@
#T 14@2@VSCROLLER@@8@@
#T 12@2@VSCROLLER@@8@@
#O 1@20@AREA@@
#O 2@26@SLIDER_AREA@@
#O 3@26@SLIDER@@
@ -176,7 +113,7 @@ ResourceMaster v3.65
#O 5@33@BT_DOWN_PIC@@
#O 6@25@BT_UP@@
#O 4@33@BT_UP_PIC@@
#T 15@2@SETTINGS@@107@@
#T 13@2@SETTINGS@@112@@
#O 1@26@SAVE@@
#O 2@26@ABORT@@
#O 3@25@GROUP_BROWSER@@
@ -232,10 +169,32 @@ ResourceMaster v3.65
#O 67@27@CB_ENABLE_ANIMATION@@
#O 102@27@CB_BG_IMAGES@@
#O 105@27@CB_FG_IMAGES@@
#O 109@29@EDIT_MIN_REFLOW_PERIOD@@
#O 110@27@DEC_INCREMENTAL_REFLOW@@
#O 111@27@INC_INCREMENTAL_REFLOW@@
#O 86@25@GROUP_RENDERING_00@@
#O 90@29@EDIT_DOWNLOAD_PATH@@
#O 91@29@EDIT_HOTLIST_FILE@@
#O 92@29@EDIT_CA_BUNDLE@@
#O 93@29@EDIT_CA_CERTS_PATH@@
#O 94@29@EDIT_EDITOR@@
#c 20720@
#T 14@2@POP_LANGUAGE@@16@@
#O 1@28@CS@@
#O 2@28@DE@@
#O 3@28@EN@@
#O 4@28@EN_GB@@
#O 5@28@DE_DE@@
#O 6@28@EN_US@@
#O 7@28@ES@@
#O 8@28@FR@@
#O 9@28@IT@@
#O 10@28@NL@@
#O 11@28@NO@@
#O 12@28@PL@@
#O 13@28@RU@@
#O 14@28@SK@@
#O 15@28@SV@@
#T 15@2@POP_FONT_RENDERER@@3@@
#O 1@28@INTERNAL@@
#O 2@28@FREETYPE@@
#c 27110@

File diff suppressed because it is too large Load Diff