NetSurf
gui_options.c
Go to the documentation of this file.
1/*
2 * Copyright 2009 - 2024 Chris Young <chris@unsatisfactorysoftware.co.uk>
3 *
4 * This file is part of NetSurf, http://www.netsurf-browser.org/
5 *
6 * NetSurf is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; version 2 of the License.
9 *
10 * NetSurf is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19#include <stdbool.h>
20#include <string.h>
21#include <stdlib.h>
22#include <proto/exec.h>
23#include <proto/graphics.h>
24#include <proto/intuition.h>
25#include <proto/utility.h>
26#ifdef __amigaos4__
27#include <proto/application.h>
28#endif
29#include <libraries/gadtools.h>
30#include <exec/types.h>
31#include <intuition/classusr.h>
32#include <graphics/gfxbase.h>
33
34#include <proto/window.h>
35#include <proto/layout.h>
36#include <proto/button.h>
37#include <proto/clicktab.h>
38#include <proto/label.h>
39#include <proto/string.h>
40#include <proto/checkbox.h>
41#include <proto/radiobutton.h>
42#include <proto/getscreenmode.h>
43#include <proto/getfile.h>
44#include <proto/chooser.h>
45#include <proto/integer.h>
46#include <proto/getfont.h>
47#include <classes/window.h>
48#include <images/label.h>
49#include <gadgets/button.h>
50#include <gadgets/clicktab.h>
51#include <gadgets/string.h>
52#include <gadgets/checkbox.h>
53#include <gadgets/radiobutton.h>
54#include <gadgets/getscreenmode.h>
55#include <gadgets/getfile.h>
56#include <gadgets/chooser.h>
57#include <gadgets/integer.h>
58#include <gadgets/getfont.h>
59#include <reaction/reaction.h>
60#include <reaction/reaction_macros.h>
61
62#include "utils/nsurl.h"
63#include "utils/messages.h"
64#include "utils/nsoption.h"
66#include "desktop/searchweb.h"
67#include "netsurf/window.h"
68
69#include "amiga/file.h"
70#include "amiga/font.h"
71#include "amiga/font_bullet.h"
72#include "amiga/gui.h"
73#include "amiga/gui_menu.h"
74#include "amiga/gui_options.h"
75#include "amiga/help.h"
76#include "amiga/libs.h"
77#include "amiga/nsoption.h"
78#include "amiga/object.h"
79#include "amiga/selectmenu.h"
80#include "amiga/theme.h"
81#include "amiga/utf8.h"
82#include "amiga/plotters.h"
83
84enum
85{
166
167enum
168{
200
201enum
202{
213
214#define OPTS_LAST LAB_OPTS_LAST
215#define OPTS_MAX_TABS 10
216#define OPTS_MAX_SCREEN 4
217#define OPTS_MAX_THEMEPAGE 3
218#define OPTS_MAX_PROXY 5
219#define OPTS_MAX_NATIVEBM 4
220#define OPTS_MAX_DITHER 4
221
222enum {
226};
227
230 struct Window *win;
232#ifndef __amigaos4__
233 struct List clicktablist;
234 struct List screenoptslist;
235 struct List pagethemeoptslist;
236 struct List proxyoptslist;
237 struct List nativebmoptslist;
238 struct List ditheroptslist;
239 struct List fontoptslist;
240#endif
242};
243
244static BOOL ami_gui_opts_event(void *w);
245static void ami_gui_opts_close(void *w);
246
250};
251
252static struct ami_gui_opts_window *gow = NULL;
253
254static CONST_STRPTR tabs[OPTS_MAX_TABS];
257static CONST_STRPTR proxyopts[OPTS_MAX_PROXY];
258static CONST_STRPTR nativebmopts[OPTS_MAX_NATIVEBM];
259static CONST_STRPTR ditheropts[OPTS_MAX_DITHER];
260static CONST_STRPTR fontopts[6];
261static CONST_STRPTR gadlab[OPTS_LAST];
262static struct List *websearch_list;
263
264#ifndef __amigaos4__
265static void ami_gui_opts_array_to_list(struct List *list, const char *array[], int type)
266{
267 int i = 0;
268 struct Node *node;
269
270 NewList(list);
271
272 do {
273 switch(type) {
275 node = AllocClickTabNode(TNA_Text, array[i], TNA_Number, i, TAG_DONE);
276 break;
277 case NSA_LIST_CHOOSER:
278 node = AllocChooserNode(CNA_Text, array[i], TAG_DONE);
279 break;
280 case NSA_LIST_RADIO:
281 /* Note: RBNA_Labels is RBNA_Label in OS4 */
282 node = AllocRadioButtonNode(0, RBNA_Labels, array[i], TAG_DONE);
283 break;
284 default:
285 break;
286 }
287 AddTail(list, node);
288 i++;
289 } while (array[i] != 0);
290}
291
292static void ami_gui_opts_free_list(struct List *list, int type)
293{
294 struct Node *node;
295 struct Node *nnode;
296
297 if(IsListEmpty((struct List *)list)) return;
298 node = GetHead((struct List *)list);
299
300 do {
301 nnode = GetSucc(node);
302 Remove(node);
303 if(node) {
304 switch(type) {
306 FreeClickTabNode(node);
307 break;
308 case NSA_LIST_CHOOSER:
309 FreeChooserNode(node);
310 break;
311 case NSA_LIST_RADIO:
312 FreeRadioButtonNode(node);
313 break;
314 default:
315 break;
316 }
317 }
318 } while((node = nnode));
319}
320#endif
321
323{
324 tabs[0] = (char *)ami_utf8_easy((char *)messages_get("con_general"));
325 tabs[1] = (char *)ami_utf8_easy((char *)messages_get("Display"));
326 tabs[2] = (char *)ami_utf8_easy((char *)messages_get("con_connect"));
327 tabs[3] = (char *)ami_utf8_easy((char *)messages_get("con_rendering"));
328 tabs[4] = (char *)ami_utf8_easy((char *)messages_get("con_fonts"));
329 tabs[5] = (char *)ami_utf8_easy((char *)messages_get("con_cache"));
330 tabs[6] = (char *)ami_utf8_easy((char *)messages_get("Tabs"));
331 tabs[7] = (char *)ami_utf8_easy((char *)messages_get("con_advanced"));
332#ifdef WITH_PDF_EXPORT
333 tabs[8] = (char *)ami_utf8_easy((char *)messages_get("Export"));
334 tabs[9] = NULL;
335#else
336 tabs[8] = NULL;
337#endif
338
339 screenopts[0] = (char *)ami_utf8_easy((char *)messages_get("ScreenOwn"));
340 screenopts[1] = (char *)ami_utf8_easy((char *)messages_get("ScreenWB"));
341 screenopts[2] = (char *)ami_utf8_easy((char *)messages_get("ScreenPublic"));
342 screenopts[3] = NULL;
343
344 pagethemeopts[0] = (char *)ami_utf8_easy((char *)messages_get("Light"));
345 pagethemeopts[1] = (char *)ami_utf8_easy((char *)messages_get("Dark"));
346 pagethemeopts[2] = NULL;
347
348 proxyopts[0] = (char *)ami_utf8_easy((char *)messages_get("ProxyNone"));
349 proxyopts[1] = (char *)ami_utf8_easy((char *)messages_get("ProxyNoAuth"));
350 proxyopts[2] = (char *)ami_utf8_easy((char *)messages_get("ProxyBasic"));
351 proxyopts[3] = (char *)ami_utf8_easy((char *)messages_get("ProxyNTLM"));
352 proxyopts[4] = NULL;
353
354 nativebmopts[0] = (char *)ami_utf8_easy((char *)messages_get("None"));
355 nativebmopts[1] = (char *)ami_utf8_easy((char *)messages_get("Scaled"));
356 nativebmopts[2] = (char *)ami_utf8_easy((char *)messages_get("All"));
357 nativebmopts[3] = NULL;
358
359 ditheropts[0] = (char *)ami_utf8_easy((char *)messages_get("Low"));
360 ditheropts[1] = (char *)ami_utf8_easy((char *)messages_get("Medium"));
361 ditheropts[2] = (char *)ami_utf8_easy((char *)messages_get("High"));
362 ditheropts[3] = NULL;
363
364 gow->websearch_idx = 0;
366
367 gadlab[GID_OPTS_HOMEPAGE] = (char *)ami_utf8_easy((char *)messages_get("HomePageURL"));
368 gadlab[GID_OPTS_HOMEPAGE_DEFAULT] = (char *)ami_utf8_easy((char *)messages_get("HomePageDefault"));
369 gadlab[GID_OPTS_HOMEPAGE_CURRENT] = (char *)ami_utf8_easy((char *)messages_get("HomePageCurrent"));
370 gadlab[GID_OPTS_HOMEPAGE_BLANK] = (char *)ami_utf8_easy((char *)messages_get("HomePageBlank"));
371 gadlab[GID_OPTS_HIDEADS] = (char *)ami_utf8_easy((char *)messages_get("BlockAds"));
372 gadlab[GID_OPTS_FROMLOCALE] = (char *)ami_utf8_easy((char *)messages_get("LocaleLang"));
373 gadlab[GID_OPTS_HISTORY] = (char *)ami_utf8_easy((char *)messages_get("HistoryAge"));
374 gadlab[GID_OPTS_JAVASCRIPT] = (char *)ami_utf8_easy((char *)messages_get("EnableJS"));
375 gadlab[GID_OPTS_ENABLECSS] = (char *)ami_utf8_easy((char *)messages_get("EnableCSS"));
376 gadlab[GID_OPTS_REFERRAL] = (char *)ami_utf8_easy((char *)messages_get("SendReferer"));
377 gadlab[GID_OPTS_DONOTTRACK] = (char *)ami_utf8_easy((char *)messages_get("DoNotTrack"));
378 gadlab[GID_OPTS_FASTSCROLL] = (char *)ami_utf8_easy((char *)messages_get("FastScrolling"));
379 gadlab[GID_OPTS_WIN_SIMPLE] = (char *)ami_utf8_easy((char *)messages_get("SimpleRefresh"));
380 gadlab[GID_OPTS_THEME] = (char *)ami_utf8_easy((char *)messages_get("ThemeGUI"));
381 gadlab[GID_OPTS_THEMEPAGE] = (char *)ami_utf8_easy((char *)messages_get("ThemePage"));
382 gadlab[GID_OPTS_DARK] = (char *)ami_utf8_easy((char *)messages_get("Dark"));
383 gadlab[GID_OPTS_LIGHT] = (char *)ami_utf8_easy((char *)messages_get("Light"));
384 gadlab[GID_OPTS_PTRTRUE] = (char *)ami_utf8_easy((char *)messages_get("TrueColour"));
385 gadlab[GID_OPTS_PTROS] = (char *)ami_utf8_easy((char *)messages_get("OSPointers"));
386 gadlab[GID_OPTS_PROXY] = (char *)ami_utf8_easy((char *)messages_get("ProxyType"));
387 gadlab[GID_OPTS_PROXY_HOST] = (char *)ami_utf8_easy((char *)messages_get("Host"));
388 gadlab[GID_OPTS_PROXY_USER] = (char *)ami_utf8_easy((char *)messages_get("Username"));
389 gadlab[GID_OPTS_PROXY_PASS] = (char *)ami_utf8_easy((char *)messages_get("Password"));
390 gadlab[GID_OPTS_PROXY_BYPASS] = (char *)ami_utf8_easy((char *)messages_get("ProxyBypass"));
391 gadlab[GID_OPTS_FETCHMAX] = (char *)ami_utf8_easy((char *)messages_get("FetchesMax"));
392 gadlab[GID_OPTS_FETCHHOST] = (char *)ami_utf8_easy((char *)messages_get("FetchesHost"));
393 gadlab[GID_OPTS_FETCHCACHE] = (char *)ami_utf8_easy((char *)messages_get("FetchesCached"));
394 gadlab[GID_OPTS_NATIVEBM] = (char *)ami_utf8_easy((char *)messages_get("CacheNative"));
395 gadlab[GID_OPTS_SCALEQ] = (char *)ami_utf8_easy((char *)messages_get("ScaleQuality"));
396 gadlab[GID_OPTS_DITHERQ] = (char *)ami_utf8_easy((char *)messages_get("DitherQuality"));
397 gadlab[GID_OPTS_DPI_Y] = (char *)ami_utf8_easy((char *)messages_get("ResolutionY"));
398 gadlab[GID_OPTS_ANIMDISABLE] = (char *)ami_utf8_easy((char *)messages_get("AnimDisable"));
399 gadlab[GID_OPTS_FONT_SANS] = (char *)ami_utf8_easy((char *)messages_get("FontSans"));
400 gadlab[GID_OPTS_FONT_SERIF] = (char *)ami_utf8_easy((char *)messages_get("FontSerif"));
401 gadlab[GID_OPTS_FONT_MONO] = (char *)ami_utf8_easy((char *)messages_get("FontMono"));
402 gadlab[GID_OPTS_FONT_CURSIVE] = (char *)ami_utf8_easy((char *)messages_get("FontCursive"));
403 gadlab[GID_OPTS_FONT_FANTASY] = (char *)ami_utf8_easy((char *)messages_get("FontFantasy"));
404 gadlab[GID_OPTS_FONT_DEFAULT] = (char *)ami_utf8_easy((char *)messages_get("Default"));
405 gadlab[GID_OPTS_FONT_SIZE] = (char *)ami_utf8_easy((char *)messages_get("Default"));
406 gadlab[GID_OPTS_FONT_MINSIZE] = (char *)ami_utf8_easy((char *)messages_get("Minimum"));
407 gadlab[GID_OPTS_FONT_ANTIALIASING] = (char *)ami_utf8_easy((char *)messages_get("FontAntialiasing"));
408 gadlab[GID_OPTS_FONT_BITMAP] = (char *)ami_utf8_easy((char *)messages_get("FontBitmap"));
409 gadlab[GID_OPTS_CACHE_MEM] = (char *)ami_utf8_easy((char *)messages_get("Size"));
410 gadlab[GID_OPTS_CACHE_DISC] = (char *)ami_utf8_easy((char *)messages_get("Size"));
411 gadlab[GID_OPTS_OVERWRITE] = (char *)ami_utf8_easy((char *)messages_get("ConfirmOverwrite"));
412 gadlab[GID_OPTS_NOTIFY] = (char *)ami_utf8_easy((char *)messages_get("DownloadNotify"));
413 gadlab[GID_OPTS_DLDIR] = (char *)ami_utf8_easy((char *)messages_get("DownloadDir"));
414 gadlab[GID_OPTS_TAB_ACTIVE] = (char *)ami_utf8_easy((char *)messages_get("TabActive"));
415 gadlab[GID_OPTS_TAB_2] = (char *)ami_utf8_easy((char *)messages_get("TabMiddle"));
416 gadlab[GID_OPTS_TAB_LAST] = (char *)ami_utf8_easy((char *)messages_get("TabLast"));
417 gadlab[GID_OPTS_TAB_ALWAYS] = (char *)ami_utf8_easy((char *)messages_get("TabAlways"));
418 gadlab[GID_OPTS_TAB_CLOSE] = (char *)ami_utf8_easy((char *)messages_get("TabClose"));
419 gadlab[GID_OPTS_SEARCH_PROV] = (char *)ami_utf8_easy((char *)messages_get("SearchProvider"));
420 gadlab[GID_OPTS_CLIPBOARD] = (char *)ami_utf8_easy((char *)messages_get("ClipboardUTF8"));
421 gadlab[GID_OPTS_SELECTMENU] = (char *)ami_utf8_easy((char *)messages_get("PopupMenu"));
422 gadlab[GID_OPTS_STARTUP_NO_WIN] = (char *)ami_utf8_easy((char *)messages_get("OptionNoWindow"));
423 gadlab[GID_OPTS_CLOSE_NO_QUIT] = (char *)ami_utf8_easy((char *)messages_get("OptionNoQuit"));
424 gadlab[GID_OPTS_DOCKY] = (char *)ami_utf8_easy((char *)messages_get("OptionDocky"));
425 gadlab[GID_OPTS_MARGIN_TOP] = (char *)ami_utf8_easy((char *)messages_get("Top"));
426 gadlab[GID_OPTS_MARGIN_LEFT] = (char *)ami_utf8_easy((char *)messages_get("Left"));
427 gadlab[GID_OPTS_MARGIN_RIGHT] = (char *)ami_utf8_easy((char *)messages_get("Right"));
428 gadlab[GID_OPTS_MARGIN_BOTTOM] = (char *)ami_utf8_easy((char *)messages_get("Bottom"));
429 gadlab[GID_OPTS_EXPORT_SCALE] = (char *)ami_utf8_easy((char *)messages_get("Scale"));
430 gadlab[GID_OPTS_EXPORT_NOIMAGES] = (char *)ami_utf8_easy((char *)messages_get("SuppressImages"));
431 gadlab[GID_OPTS_EXPORT_NOBKG] = (char *)ami_utf8_easy((char *)messages_get("RemoveBackground"));
432 gadlab[GID_OPTS_EXPORT_LOOSEN] = (char *)ami_utf8_easy((char *)messages_get("FitPage"));
433 gadlab[GID_OPTS_EXPORT_COMPRESS] = (char *)ami_utf8_easy((char *)messages_get("CompressPDF"));
434 gadlab[GID_OPTS_EXPORT_PASSWORD] = (char *)ami_utf8_easy((char *)messages_get("SetPassword"));
435 gadlab[GID_OPTS_SAVE] = (char *)ami_utf8_easy((char *)messages_get("SelSave"));
436 gadlab[GID_OPTS_USE] = (char *)ami_utf8_easy((char *)messages_get("Use"));
437 gadlab[GID_OPTS_CANCEL] = (char *)ami_utf8_easy((char *)messages_get("Cancel"));
438
439 gadlab[LAB_OPTS_WINTITLE] = (char *)ami_utf8_easy((char *)messages_get("Preferences"));
440 gadlab[LAB_OPTS_RESTART] = (char *)ami_utf8_easy((char *)messages_get("NeedRestart"));
441 gadlab[LAB_OPTS_DAYS] = (char *)ami_utf8_easy((char *)messages_get("Days"));
442 gadlab[LAB_OPTS_PT] = (char *)ami_utf8_easy((char *)messages_get("Pt"));
443 gadlab[LAB_OPTS_MM] = (char *)ami_utf8_easy((char *)messages_get("MM"));
444 gadlab[LAB_OPTS_MB] = (char *)ami_utf8_easy((char *)messages_get("MBytes"));
445 gadlab[LAB_OPTS_DPI] = (char *)ami_utf8_easy((char *)messages_get("DPI"));
446
447 gadlab[GRP_OPTS_HOMEPAGE] = (char *)ami_utf8_easy((char *)messages_get("Home"));
448 gadlab[GRP_OPTS_CONTENTBLOCKING] = (char *)ami_utf8_easy((char *)messages_get("ContentBlocking"));
449 gadlab[GRP_OPTS_CONTENTLANGUAGE] = (char *)ami_utf8_easy((char *)messages_get("ContentLanguage"));
450 gadlab[GRP_OPTS_HISTORY] = (char *)ami_utf8_easy((char *)messages_get("History"));
451 gadlab[GRP_OPTS_SCRIPTING] = (char *)ami_utf8_easy((char *)messages_get("Scripting"));
452 gadlab[GRP_OPTS_MISC] = (char *)ami_utf8_easy((char *)messages_get("Miscellaneous"));
453 gadlab[GRP_OPTS_SCREEN] = (char *)ami_utf8_easy((char *)messages_get("Screen"));
454 gadlab[GRP_OPTS_WINDOW] = (char *)ami_utf8_easy((char *)messages_get("Window"));
455 gadlab[GRP_OPTS_THEME] = (char *)ami_utf8_easy((char *)messages_get("Theme"));
456 gadlab[GRP_OPTS_MOUSE] = (char *)ami_utf8_easy((char *)messages_get("MousePointers"));
457 gadlab[GRP_OPTS_PROXY] = (char *)ami_utf8_easy((char *)messages_get("Proxy"));
458 gadlab[GRP_OPTS_FETCHING] = (char *)ami_utf8_easy((char *)messages_get("Fetching"));
459 gadlab[GRP_OPTS_IMAGES] = (char *)ami_utf8_easy((char *)messages_get("Images"));
460 gadlab[GRP_OPTS_ANIMS] = (char *)ami_utf8_easy((char *)messages_get("Animations"));
461 gadlab[GRP_OPTS_DPI] = (char *)ami_utf8_easy((char *)messages_get("Resolution"));
462 gadlab[GRP_OPTS_FONTFACES] = (char *)ami_utf8_easy((char *)messages_get("FontFamilies"));
463 gadlab[GRP_OPTS_FONTSIZE] = (char *)ami_utf8_easy((char *)messages_get("FontSize"));
464 gadlab[GRP_OPTS_MEMCACHE] = (char *)ami_utf8_easy((char *)messages_get("CacheMemory"));
465 gadlab[GRP_OPTS_DISCCACHE] = (char *)ami_utf8_easy((char *)messages_get("CacheDisc"));
466 gadlab[GRP_OPTS_DOWNLOADS] = (char *)ami_utf8_easy((char *)messages_get("Downloads"));
467 gadlab[GRP_OPTS_TABS] = (char *)ami_utf8_easy((char *)messages_get("TabbedBrowsing"));
468 gadlab[GRP_OPTS_SEARCH] = (char *)ami_utf8_easy((char *)messages_get("SearchWeb"));
469 gadlab[GRP_OPTS_CLIPBOARD] = (char *)ami_utf8_easy((char *)messages_get("Clipboard"));
470 gadlab[GRP_OPTS_PRIVACY] = (char *)ami_utf8_easy((char *)messages_get("Privacy"));
471 gadlab[GRP_OPTS_BEHAVIOUR] = (char *)ami_utf8_easy((char *)messages_get("Behaviour"));
472 gadlab[GRP_OPTS_MARGINS] = (char *)ami_utf8_easy((char *)messages_get("Margins"));
473 gadlab[GRP_OPTS_SCALING] = (char *)ami_utf8_easy((char *)messages_get("Scaling"));
474 gadlab[GRP_OPTS_APPEARANCE] = (char *)ami_utf8_easy((char *)messages_get("Appearance"));
475 gadlab[GRP_OPTS_ADVANCED] = (char *)ami_utf8_easy((char *)messages_get("con_advanced"));
476
482 fontopts[5] = NULL;
483
484#ifndef __amigaos4__
492#endif
493}
494
496{
497 int i;
498
499 for(i = 0; i < OPTS_LAST; i++)
500 if(gadlab[i]) free((APTR)gadlab[i]);
501
502 for(i = 0; i < OPTS_MAX_TABS; i++)
503 if(tabs[i]) free((APTR)tabs[i]);
504
505 for(i = 0; i < OPTS_MAX_SCREEN; i++)
506 if(screenopts[i]) free((APTR)screenopts[i]);
507
508 for(i = 0; i < OPTS_MAX_PROXY; i++)
509 if(proxyopts[i]) free((APTR)proxyopts[i]);
510
511 for(i = 0; i < OPTS_MAX_NATIVEBM; i++)
512 if(nativebmopts[i]) free((APTR)nativebmopts[i]);
513
515
516#ifndef __amigaos4__
524#endif
525}
526
528{
529 uint16 screenoptsselected;
530 ULONG screenmodeid = 0;
531 ULONG proxytype = 0;
532 BOOL screenmodedisabled = FALSE, screennamedisabled = FALSE;
533 BOOL proxyhostdisabled = TRUE, proxyauthdisabled = TRUE, proxybypassdisabled = FALSE;
534 BOOL disableanims, acceptlangdisabled = FALSE;
535 BOOL scaleselected = nsoption_bool(scale_quality), scaledisabled = FALSE;
536 BOOL ditherdisable = TRUE;
537 BOOL download_notify_disabled = FALSE, tab_always_show_disabled = FALSE;
538 BOOL ptr_disable = FALSE;
539 char *homepage_url_lc = ami_utf8_easy(nsoption_charp(homepage_url));
540
541 struct TextAttr fontsans, fontserif, fontmono, fontcursive, fontfantasy;
542
543 if(gow && gow->win)
544 {
545 WindowToFront(gow->win);
546 ActivateWindow(gow->win);
547 return;
548 }
549
550#ifdef __amigaos4__
551 if(LIB_IS_AT_LEAST((struct Library *)IntuitionBase, 53, 42)) ptr_disable = TRUE;
552#else
553 ptr_disable = TRUE;
554#endif
555
556 if(nsoption_charp(pubscreen_name))
557 {
558 if(strcmp(nsoption_charp(pubscreen_name),"Workbench") == 0)
559 {
560 screenoptsselected = 1;
561 screennamedisabled = TRUE;
562 screenmodedisabled = TRUE;
563 }
564 else
565 {
566 screenoptsselected = 2;
567 screenmodedisabled = TRUE;
568 }
569 }
570 else
571 {
572 screenoptsselected = 0;
573 screennamedisabled = TRUE;
574 }
575
576 if((nsoption_charp(screen_modeid)) &&
577 (strncmp(nsoption_charp(screen_modeid),"0x",2) == 0))
578 {
579 screenmodeid = strtoul(nsoption_charp(screen_modeid),NULL,0);
580 }
581
583 ditherdisable = FALSE;
584 }
585
586 if(nsoption_bool(http_proxy) == true)
587 {
588 proxytype = nsoption_int(http_proxy_auth) + 1;
589 switch(nsoption_int(http_proxy_auth))
590 {
593 proxyauthdisabled = FALSE;
595 proxyhostdisabled = FALSE;
596 break;
597 }
598 } else {
599 proxybypassdisabled = TRUE;
600 }
601
602 if(nsoption_bool(animate_images))
603 {
604 disableanims = FALSE;
605 }
606 else
607 {
608 disableanims = TRUE;
609 }
610
611 if(nsoption_bool(accept_lang_locale))
612 acceptlangdisabled = TRUE;
613 else
614 acceptlangdisabled = FALSE;
615
616 if(GfxBase->LibNode.lib_Version < 53)
617 {
618 scaledisabled = TRUE;
619 scaleselected = FALSE;
620 }
621#ifdef __amigaos4__
622 if(ApplicationBase->lib_Version < 53)
623#endif
624 {
625 download_notify_disabled = TRUE;
626 nsoption_set_bool(download_notify, FALSE);
627 }
628
629 if(ClickTabBase->lib_Version < 53) {
630 tab_always_show_disabled = TRUE;
631 }
632
633 fontsans.ta_Name = ASPrintf("%s.font", nsoption_charp(font_sans));
634 fontserif.ta_Name = ASPrintf("%s.font", nsoption_charp(font_serif));
635 fontmono.ta_Name = ASPrintf("%s.font", nsoption_charp(font_mono));
636 fontcursive.ta_Name = ASPrintf("%s.font", nsoption_charp(font_cursive));
637 fontfantasy.ta_Name = ASPrintf("%s.font", nsoption_charp(font_fantasy));
638
639 fontsans.ta_Style = 0;
640 fontserif.ta_Style = 0;
641 fontmono.ta_Style = 0;
642 fontcursive.ta_Style = 0;
643 fontfantasy.ta_Style = 0;
644
645 fontsans.ta_YSize = 0;
646 fontserif.ta_YSize = 0;
647 fontmono.ta_YSize = 0;
648 fontcursive.ta_YSize = 0;
649 fontfantasy.ta_YSize = 0;
650
651 fontsans.ta_Flags = 0;
652 fontserif.ta_Flags = 0;
653 fontmono.ta_Flags = 0;
654 fontcursive.ta_Flags = 0;
655 fontfantasy.ta_Flags = 0;
656
657 if(!gow)
658 {
659 gow = calloc(1, sizeof(struct ami_gui_opts_window));
660 if(gow == NULL) return;
661
663
665 WA_ScreenTitle, ami_gui_get_screen_title(),
666 WA_Title, gadlab[LAB_OPTS_WINTITLE],
667 WA_Activate, TRUE,
668 WA_DepthGadget, TRUE,
669 WA_DragBar, TRUE,
670 WA_CloseGadget, TRUE,
671 WA_SizeGadget, FALSE,
672 WA_PubScreen, ami_gui_get_screen(),
673 WINDOW_SharedPort, ami_gui_get_shared_msgport(),
674 WINDOW_UserData,gow,
675 WINDOW_IconifyGadget, FALSE,
676 WINDOW_Position, WPOS_CENTERSCREEN,
677 WA_IDCMP, IDCMP_GADGETUP | IDCMP_CLOSEWINDOW,
678 WINDOW_ParentGroup, gow->objects[GID_OPTS_MAIN] = LayoutVObj,
679 LAYOUT_AddChild, ClickTabObj,
680 GA_RelVerify, TRUE,
681#ifdef __amigaos4__
682 GA_Text, tabs,
683#else
684 CLICKTAB_Labels, &gow->clicktablist,
685#endif
686 CLICKTAB_PageGroup, PageObj,
687 /*
688 ** General
689 */
690 PAGE_Add, LayoutVObj,
691 LAYOUT_AddChild, LayoutVObj,
692 LAYOUT_AddChild, LayoutVObj,
693 LAYOUT_SpaceOuter, TRUE,
694 LAYOUT_BevelStyle, BVS_GROUP,
695 LAYOUT_Label, gadlab[GRP_OPTS_HOMEPAGE],
696 LAYOUT_AddChild, gow->objects[GID_OPTS_HOMEPAGE] = StringObj,
697 GA_ID, GID_OPTS_HOMEPAGE,
698 GA_RelVerify, TRUE,
699 STRINGA_TextVal, homepage_url_lc,
700 STRINGA_BufferPos,0,
701 StringEnd,
702 CHILD_Label, LabelObj,
703 LABEL_Text, gadlab[GID_OPTS_HOMEPAGE],
704 LabelEnd,
705 LAYOUT_AddChild, LayoutHObj,
706 LAYOUT_AddChild, gow->objects[GID_OPTS_HOMEPAGE_DEFAULT] = ButtonObj,
709 GA_RelVerify,TRUE,
710 ButtonEnd,
711 LAYOUT_AddChild, gow->objects[GID_OPTS_HOMEPAGE_CURRENT] = ButtonObj,
714 GA_RelVerify,TRUE,
715 ButtonEnd,
716 LAYOUT_AddChild, gow->objects[GID_OPTS_HOMEPAGE_BLANK] = ButtonObj,
719 GA_RelVerify,TRUE,
720 ButtonEnd,
721 LayoutEnd,
722 LayoutEnd, //homepage
723 CHILD_WeightedHeight, 0,
724 LAYOUT_AddChild, LayoutHObj,
725 LAYOUT_AddChild, LayoutVObj,
726 LAYOUT_SpaceOuter, TRUE,
727 LAYOUT_BevelStyle, BVS_GROUP,
728 LAYOUT_Label, gadlab[GRP_OPTS_CONTENTBLOCKING],
729 LAYOUT_AddChild, gow->objects[GID_OPTS_HIDEADS] = CheckBoxObj,
730 GA_ID, GID_OPTS_HIDEADS,
731 GA_RelVerify, TRUE,
732 GA_Text, gadlab[GID_OPTS_HIDEADS],
733 GA_Selected, nsoption_bool(block_advertisements),
734 CheckBoxEnd,
735 LayoutEnd, // content blocking
736 LAYOUT_AddChild, LayoutVObj,
737 LAYOUT_SpaceOuter, TRUE,
738 LAYOUT_BevelStyle, BVS_GROUP,
739 LAYOUT_Label, gadlab[GRP_OPTS_CONTENTLANGUAGE],
740 LAYOUT_AddChild, gow->objects[GID_OPTS_CONTENTLANG] = StringObj,
742 GA_RelVerify, TRUE,
743 GA_Disabled, acceptlangdisabled,
744 STRINGA_TextVal, nsoption_charp(accept_language),
745 STRINGA_BufferPos,0,
746 StringEnd,
747 LAYOUT_AddChild, gow->objects[GID_OPTS_FROMLOCALE] = CheckBoxObj,
748 GA_ID, GID_OPTS_FROMLOCALE,
749 GA_Text, gadlab[GID_OPTS_FROMLOCALE],
750 GA_RelVerify, TRUE,
751 GA_Selected, nsoption_bool(accept_lang_locale),
752 ButtonEnd,
753 // CHILD_WeightedWidth, 0,
754 LayoutEnd, // content language
755 LayoutEnd, // content
756 LAYOUT_AddChild, LayoutHObj,
757 LAYOUT_AddChild, LayoutVObj,
758 LAYOUT_SpaceOuter, TRUE,
759 LAYOUT_BevelStyle, BVS_GROUP,
760 LAYOUT_Label, gadlab[GRP_OPTS_HISTORY],
761 LAYOUT_AddChild, LayoutHObj,
762 LAYOUT_LabelColumn, PLACETEXT_RIGHT,
763 LAYOUT_AddChild, gow->objects[GID_OPTS_HISTORY] = IntegerObj,
764 GA_ID, GID_OPTS_HISTORY,
765 GA_RelVerify, TRUE,
766 INTEGER_Number, nsoption_int(expire_url),
767 INTEGER_Minimum, 0,
768 INTEGER_Maximum, 366,
769 INTEGER_Arrows, TRUE,
770 IntegerEnd,
771 CHILD_WeightedWidth, 0,
772 CHILD_Label, LabelObj,
773 LABEL_Text, gadlab[LAB_OPTS_DAYS],
774 LabelEnd,
775 LayoutEnd,
776 CHILD_WeightedWidth, 0,
777 CHILD_Label, LabelObj,
778 LABEL_Text, gadlab[GID_OPTS_HISTORY],
779 LabelEnd,
780 LayoutEnd, // history
781 LAYOUT_AddChild, LayoutVObj,
782 LAYOUT_SpaceOuter, TRUE,
783 LAYOUT_BevelStyle, BVS_GROUP,
784 LAYOUT_Label, gadlab[GRP_OPTS_SCRIPTING],
785 LAYOUT_AddChild, gow->objects[GID_OPTS_JAVASCRIPT] = CheckBoxObj,
786 GA_ID, GID_OPTS_JAVASCRIPT,
787 GA_RelVerify, TRUE,
788 GA_Text, gadlab[GID_OPTS_JAVASCRIPT],
789 GA_Selected, nsoption_bool(enable_javascript),
790 CheckBoxEnd,
791 LayoutEnd, // scripting
792 LayoutEnd,
793 CHILD_WeightedHeight, 0,
794 LAYOUT_AddChild, LayoutVObj,
795 LAYOUT_SpaceOuter, TRUE,
796 LAYOUT_BevelStyle, BVS_GROUP,
797 LAYOUT_Label, gadlab[GRP_OPTS_PRIVACY],
798 LAYOUT_AddChild, gow->objects[GID_OPTS_REFERRAL] = CheckBoxObj,
799 GA_ID, GID_OPTS_REFERRAL,
800 GA_RelVerify, TRUE,
801 GA_Text, gadlab[GID_OPTS_REFERRAL],
802 GA_Selected, nsoption_bool(send_referer),
803 CheckBoxEnd,
804 LAYOUT_AddChild, gow->objects[GID_OPTS_DONOTTRACK] = CheckBoxObj,
805 GA_ID, GID_OPTS_DONOTTRACK,
806 GA_RelVerify, TRUE,
807 GA_Text, gadlab[GID_OPTS_DONOTTRACK],
808 GA_Selected, nsoption_bool(do_not_track),
809 CheckBoxEnd,
810 LayoutEnd, // misc
811 CHILD_WeightedHeight, 0,
812 LayoutEnd, // page vgroup
813 CHILD_WeightedHeight, 0,
814 PageEnd, // pageadd
815 /*
816 ** Display
817 */
818 PAGE_Add, LayoutVObj,
819 LAYOUT_AddChild, LayoutVObj,
820 LAYOUT_AddChild, LayoutVObj,
821 LAYOUT_SpaceOuter, TRUE,
822 LAYOUT_BevelStyle, BVS_GROUP,
823 LAYOUT_Label, gadlab[GRP_OPTS_SCREEN],
824 LAYOUT_AddChild, LayoutHObj,
825 LAYOUT_AddChild, gow->objects[GID_OPTS_SCREEN] = RadioButtonObj,
826 GA_ID, GID_OPTS_SCREEN,
827 GA_RelVerify, TRUE,
828#ifdef __amigaos4__
829 GA_Text, screenopts,
830#else
831 RADIOBUTTON_Labels, &gow->screenoptslist,
832#endif
833 RADIOBUTTON_Selected, screenoptsselected,
834 RadioButtonEnd,
835 CHILD_WeightedWidth,0,
836 LAYOUT_AddChild, LayoutVObj,
837 LAYOUT_AddChild, gow->objects[GID_OPTS_SCREENMODE] = GetScreenModeObj,
838 GA_ID, GID_OPTS_SCREENMODE,
839 GA_RelVerify, TRUE,
840 GA_Disabled,screenmodedisabled,
841 GETSCREENMODE_DisplayID,screenmodeid,
842 GETSCREENMODE_MinDepth, 0,
843 GETSCREENMODE_MaxDepth, 32,
845 LAYOUT_AddChild, gow->objects[GID_OPTS_SCREENNAME] = StringObj,
846 GA_ID, GID_OPTS_SCREENNAME,
847 GA_RelVerify, TRUE,
848 GA_Disabled,screennamedisabled,
849 STRINGA_TextVal, nsoption_charp(pubscreen_name),
850 STRINGA_BufferPos,0,
851 StringEnd,
852 LayoutEnd,
853 CHILD_WeightedHeight,0,
854 LayoutEnd,
855 LayoutEnd, // screen
856 CHILD_WeightedHeight,0,
857 LAYOUT_AddChild, LayoutVObj,
858 LAYOUT_SpaceOuter, TRUE,
859 LAYOUT_BevelStyle, BVS_GROUP,
860 LAYOUT_Label, gadlab[GRP_OPTS_WINDOW],
861 LAYOUT_AddChild, gow->objects[GID_OPTS_WIN_SIMPLE] = CheckBoxObj,
862 GA_ID, GID_OPTS_WIN_SIMPLE,
863 GA_RelVerify, TRUE,
864 GA_Text, gadlab[GID_OPTS_WIN_SIMPLE],
865 GA_Selected, nsoption_bool(window_simple_refresh),
866 CheckBoxEnd,
867 LayoutEnd, // window
868 CHILD_WeightedHeight,0,
869 LAYOUT_AddChild, LayoutVObj,
870 LAYOUT_SpaceOuter, TRUE,
871 LAYOUT_BevelStyle, BVS_GROUP,
872 LAYOUT_Label, gadlab[GRP_OPTS_THEME],
873 LAYOUT_AddChild, gow->objects[GID_OPTS_THEME] = GetFileObj,
874 GA_ID, GID_OPTS_THEME,
875 GA_RelVerify, TRUE,
876 GETFILE_Drawer, nsoption_charp(theme),
877 GETFILE_DrawersOnly, TRUE,
878 GETFILE_ReadOnly, TRUE,
879 GETFILE_FullFileExpand, FALSE,
881 CHILD_Label, LabelObj,
882 LABEL_Text, gadlab[GID_OPTS_THEME],
883 LabelEnd,
884 LAYOUT_AddChild, gow->objects[GID_OPTS_THEMEPAGE] = ChooserObj,
885 GA_ID, GID_OPTS_THEMEPAGE,
886 GA_RelVerify, TRUE,
887 CHOOSER_PopUp, TRUE,
888#ifdef __amigaos4__
889 CHOOSER_LabelArray, pagethemeopts,
890#else
891 CHOOSER_Labels, &gow->pagethemeoptslist,
892#endif
893 CHOOSER_Selected, nsoption_bool(prefer_dark_mode),
894 ChooserEnd,
895 CHILD_Label, LabelObj,
896 LABEL_Text, gadlab[GID_OPTS_THEMEPAGE],
897 LabelEnd,
898 LayoutEnd, // theme
899 CHILD_WeightedHeight, 0,
900 LAYOUT_AddChild, LayoutVObj,
901 LAYOUT_SpaceOuter, TRUE,
902 LAYOUT_BevelStyle, BVS_GROUP,
903 LAYOUT_Label, gadlab[GRP_OPTS_MOUSE],
904 LAYOUT_AddChild, gow->objects[GID_OPTS_PTRTRUE] = CheckBoxObj,
905 GA_ID, GID_OPTS_PTRTRUE,
906 GA_RelVerify, TRUE,
907 GA_Text, gadlab[GID_OPTS_PTRTRUE],
908 GA_Selected, nsoption_bool(truecolour_mouse_pointers),
909 GA_Disabled, ptr_disable,
910 CheckBoxEnd,
911 LAYOUT_AddChild, gow->objects[GID_OPTS_PTROS] = CheckBoxObj,
912 GA_ID, GID_OPTS_PTROS,
913 GA_RelVerify, TRUE,
914 GA_Text, gadlab[GID_OPTS_PTROS],
915 GA_Selected, nsoption_bool(os_mouse_pointers),
916 GA_Disabled, ptr_disable,
917 CheckBoxEnd,
918 LayoutEnd, // mouse
919 CHILD_WeightedHeight,0,
920 LAYOUT_AddImage, LabelObj,
921 LABEL_Text, gadlab[LAB_OPTS_RESTART],
922 LabelEnd,
923 LayoutEnd, // page vgroup
924 CHILD_WeightedHeight, 0,
925 PageEnd, // pageadd
926 /*
927 ** Network
928 */
929 PAGE_Add, LayoutVObj,
930 LAYOUT_AddChild, LayoutVObj,
931 LAYOUT_AddChild, LayoutVObj,
932 LAYOUT_SpaceOuter, TRUE,
933 LAYOUT_BevelStyle, BVS_GROUP,
934 LAYOUT_Label, gadlab[GRP_OPTS_PROXY],
935 LAYOUT_AddChild, gow->objects[GID_OPTS_PROXY] = ChooserObj,
936 GA_ID, GID_OPTS_PROXY,
937 GA_RelVerify, TRUE,
938 CHOOSER_PopUp, TRUE,
939#ifdef __amigaos4__
940 CHOOSER_LabelArray, proxyopts,
941#else
942 CHOOSER_Labels, &gow->proxyoptslist,
943#endif
944 CHOOSER_Selected, proxytype,
945 ChooserEnd,
946 CHILD_Label, LabelObj,
947 LABEL_Text, gadlab[GID_OPTS_PROXY],
948 LabelEnd,
949 LAYOUT_AddChild, LayoutHObj,
950 LAYOUT_AddChild, gow->objects[GID_OPTS_PROXY_HOST] = StringObj,
951 GA_ID, GID_OPTS_PROXY_HOST,
952 GA_RelVerify, TRUE,
953 GA_Disabled, proxyhostdisabled,
954 STRINGA_TextVal, nsoption_charp(http_proxy_host),
955 STRINGA_BufferPos,0,
956 StringEnd,
957 LAYOUT_AddChild, gow->objects[GID_OPTS_PROXY_PORT] = IntegerObj,
958 GA_ID, GID_OPTS_PROXY_PORT,
959 GA_RelVerify, TRUE,
960 GA_Disabled, proxyhostdisabled,
961 INTEGER_Number, nsoption_charp(http_proxy_port),
962 INTEGER_Minimum, 1,
963 INTEGER_Maximum, 65535,
964 INTEGER_Arrows, FALSE,
965 IntegerEnd,
966 CHILD_WeightedWidth, 0,
967 CHILD_Label, LabelObj,
968 LABEL_Text, ":",
969 LabelEnd,
970 LayoutEnd, //host:port group
971 CHILD_WeightedHeight, 0,
972 CHILD_Label, LabelObj,
973 LABEL_Text, gadlab[GID_OPTS_PROXY_HOST],
974 LabelEnd,
975 LAYOUT_AddChild, gow->objects[GID_OPTS_PROXY_USER] = StringObj,
976 GA_ID, GID_OPTS_PROXY_USER,
977 GA_RelVerify, TRUE,
978 GA_Disabled, proxyauthdisabled,
979 STRINGA_TextVal, nsoption_charp(http_proxy_auth_user),
980 STRINGA_BufferPos,0,
981 StringEnd,
982 CHILD_Label, LabelObj,
983 LABEL_Text, gadlab[GID_OPTS_PROXY_USER],
984 LabelEnd,
985 LAYOUT_AddChild, gow->objects[GID_OPTS_PROXY_PASS] = StringObj,
986 GA_ID, GID_OPTS_PROXY_PASS,
987 GA_RelVerify, TRUE,
988 GA_Disabled, proxyauthdisabled,
989 STRINGA_TextVal, nsoption_charp(http_proxy_auth_pass),
990 STRINGA_BufferPos,0,
991 StringEnd,
992 CHILD_Label, LabelObj,
993 LABEL_Text, gadlab[GID_OPTS_PROXY_PASS],
994 LabelEnd,
995 LAYOUT_AddChild, gow->objects[GID_OPTS_PROXY_BYPASS] = StringObj,
997 GA_RelVerify, TRUE,
998 GA_Disabled, proxybypassdisabled,
999 STRINGA_TextVal, nsoption_charp(http_proxy_noproxy),
1000 STRINGA_BufferPos, 0,
1001 StringEnd,
1002 CHILD_Label, LabelObj,
1003 LABEL_Text, gadlab[GID_OPTS_PROXY_BYPASS],
1004 LabelEnd,
1005 LayoutEnd, // proxy
1006 CHILD_WeightedHeight, 0,
1007 LAYOUT_AddChild, LayoutVObj,
1008 LAYOUT_SpaceOuter, TRUE,
1009 LAYOUT_BevelStyle, BVS_GROUP,
1010 LAYOUT_Label, gadlab[GRP_OPTS_FETCHING],
1011 LAYOUT_AddChild, gow->objects[GID_OPTS_FETCHMAX] = IntegerObj,
1012 GA_ID, GID_OPTS_FETCHMAX,
1013 GA_RelVerify, TRUE,
1014 INTEGER_Number, nsoption_int(max_fetchers),
1015 INTEGER_Minimum, 1,
1016 INTEGER_Maximum, 99,
1017 INTEGER_Arrows, TRUE,
1018 IntegerEnd,
1019 CHILD_WeightedWidth, 0,
1020 CHILD_Label, LabelObj,
1021 LABEL_Text, gadlab[GID_OPTS_FETCHMAX],
1022 LabelEnd,
1023 LAYOUT_AddChild, gow->objects[GID_OPTS_FETCHHOST] = IntegerObj,
1024 GA_ID, GID_OPTS_FETCHHOST,
1025 GA_RelVerify, TRUE,
1026 INTEGER_Number, nsoption_int(max_fetchers_per_host),
1027 INTEGER_Minimum, 1,
1028 INTEGER_Maximum, 99,
1029 INTEGER_Arrows, TRUE,
1030 IntegerEnd,
1031 CHILD_WeightedWidth, 0,
1032 CHILD_Label, LabelObj,
1033 LABEL_Text, gadlab[GID_OPTS_FETCHHOST],
1034 LabelEnd,
1035 LAYOUT_AddChild, gow->objects[GID_OPTS_FETCHCACHE] = IntegerObj,
1036 GA_ID, GID_OPTS_FETCHCACHE,
1037 GA_RelVerify, TRUE,
1038 INTEGER_Number, nsoption_int(max_cached_fetch_handles),
1039 INTEGER_Minimum, 1,
1040 INTEGER_Maximum, 99,
1041 INTEGER_Arrows, TRUE,
1042 IntegerEnd,
1043 CHILD_WeightedWidth, 0,
1044 CHILD_Label, LabelObj,
1045 LABEL_Text, gadlab[GID_OPTS_FETCHCACHE],
1046 LabelEnd,
1047 LayoutEnd,
1048 CHILD_WeightedHeight, 0,
1049 LayoutEnd, // page vgroup
1050 CHILD_WeightedHeight, 0,
1051 PageEnd, // page object
1052 /*
1053 ** Rendering
1054 */
1055 PAGE_Add, LayoutVObj,
1056 LAYOUT_AddChild, LayoutVObj,
1057 LAYOUT_AddChild, LayoutVObj,
1058 LAYOUT_SpaceOuter, TRUE,
1059 LAYOUT_BevelStyle, BVS_GROUP,
1060 LAYOUT_Label, gadlab[GRP_OPTS_IMAGES],
1061 LAYOUT_AddChild, gow->objects[GID_OPTS_NATIVEBM] = ChooserObj,
1062 GA_ID, GID_OPTS_NATIVEBM,
1063 GA_RelVerify, TRUE,
1064 CHOOSER_PopUp, TRUE,
1065#ifdef __amigaos4__
1066 CHOOSER_LabelArray, nativebmopts,
1067#else
1068 CHOOSER_Labels, &gow->nativebmoptslist,
1069#endif
1070 CHOOSER_Selected, nsoption_int(cache_bitmaps),
1071 ChooserEnd,
1072 CHILD_Label, LabelObj,
1073 LABEL_Text, gadlab[GID_OPTS_NATIVEBM],
1074 LabelEnd,
1075 LAYOUT_AddChild, gow->objects[GID_OPTS_DITHERQ] = ChooserObj,
1076 GA_ID, GID_OPTS_DITHERQ,
1077 GA_RelVerify, TRUE,
1078 GA_Disabled, ditherdisable,
1079 CHOOSER_PopUp, TRUE,
1080#ifdef __amigaos4__
1081 CHOOSER_LabelArray, ditheropts,
1082#else
1083 CHOOSER_Labels, &gow->ditheroptslist,
1084#endif
1085 CHOOSER_Selected, nsoption_int(dither_quality),
1086 ChooserEnd,
1087 CHILD_Label, LabelObj,
1088 LABEL_Text, gadlab[GID_OPTS_DITHERQ],
1089 LabelEnd,
1090 LAYOUT_AddChild, gow->objects[GID_OPTS_SCALEQ] = CheckBoxObj,
1091 GA_ID, GID_OPTS_SCALEQ,
1092 GA_Disabled, scaledisabled,
1093 GA_RelVerify, TRUE,
1094 GA_Text, gadlab[GID_OPTS_SCALEQ],
1095 GA_Selected, scaleselected,
1096 CheckBoxEnd,
1097 LayoutEnd, // images
1098 CHILD_WeightedHeight, 0,
1099 LAYOUT_AddChild, LayoutVObj,
1100 LAYOUT_SpaceOuter, TRUE,
1101 LAYOUT_BevelStyle, BVS_GROUP,
1102 LAYOUT_Label, gadlab[GRP_OPTS_ANIMS],
1103 LAYOUT_AddChild, gow->objects[GID_OPTS_ANIMDISABLE] = CheckBoxObj,
1104 GA_ID, GID_OPTS_ANIMDISABLE,
1105 GA_RelVerify, TRUE,
1106 GA_Text, gadlab[GID_OPTS_ANIMDISABLE],
1107 GA_Selected, disableanims,
1108 CheckBoxEnd,
1109 LayoutEnd, //animations
1110 CHILD_WeightedHeight, 0,
1111 LAYOUT_AddChild, LayoutVObj,
1112 LAYOUT_SpaceOuter, TRUE,
1113 LAYOUT_BevelStyle, BVS_GROUP,
1114 LAYOUT_Label, gadlab[GRP_OPTS_DPI],
1115 LAYOUT_AddChild, LayoutHObj,
1116 LAYOUT_LabelColumn, PLACETEXT_RIGHT,
1117 LAYOUT_AddChild, gow->objects[GID_OPTS_DPI_Y] = IntegerObj,
1118 GA_ID, GID_OPTS_DPI_Y,
1119 GA_RelVerify, TRUE,
1120 INTEGER_Number, nsoption_int(screen_ydpi),
1121 INTEGER_Minimum, 20,
1122 INTEGER_Maximum, 200,
1123 INTEGER_Arrows, TRUE,
1124 GA_Disabled, nsoption_bool(bitmap_fonts),
1125 IntegerEnd,
1126 CHILD_WeightedWidth, 0,
1127 CHILD_Label, LabelObj,
1128 LABEL_Text, gadlab[LAB_OPTS_DPI],
1129 LabelEnd,
1130 LayoutEnd,
1131 CHILD_Label, LabelObj,
1132 LABEL_Text, gadlab[GID_OPTS_DPI_Y],
1133 LabelEnd,
1134 LayoutEnd, //animations
1135 CHILD_WeightedHeight, 0,
1136 LayoutEnd, // page vgroup
1137 CHILD_WeightedHeight, 0,
1138 PageEnd, // page object
1139 /*
1140 ** Fonts
1141 */
1142 PAGE_Add, LayoutVObj,
1143 LAYOUT_AddChild, LayoutVObj,
1144 LAYOUT_AddChild, LayoutVObj,
1145 LAYOUT_SpaceOuter, TRUE,
1146 LAYOUT_BevelStyle, BVS_GROUP,
1147 LAYOUT_Label, gadlab[GRP_OPTS_FONTFACES],
1148 LAYOUT_AddChild, gow->objects[GID_OPTS_FONT_SANS] = GetFontObj,
1149 GA_ID, GID_OPTS_FONT_SANS,
1150 GA_RelVerify, TRUE,
1151 GETFONT_TextAttr, &fontsans,
1152 GETFONT_OTagOnly, TRUE,
1154 GetFontEnd,
1155 CHILD_Label, LabelObj,
1156 LABEL_Text, gadlab[GID_OPTS_FONT_SANS],
1157 LabelEnd,
1158 LAYOUT_AddChild, gow->objects[GID_OPTS_FONT_SERIF] = GetFontObj,
1159 GA_ID, GID_OPTS_FONT_SERIF,
1160 GA_RelVerify, TRUE,
1161 GETFONT_TextAttr, &fontserif,
1162 GETFONT_OTagOnly, TRUE,
1164 GetFontEnd,
1165 CHILD_Label, LabelObj,
1166 LABEL_Text, gadlab[GID_OPTS_FONT_SERIF],
1167 LabelEnd,
1168 LAYOUT_AddChild, gow->objects[GID_OPTS_FONT_MONO] = GetFontObj,
1169 GA_ID, GID_OPTS_FONT_MONO,
1170 GA_RelVerify, TRUE,
1171 GETFONT_TextAttr, &fontmono,
1172 GETFONT_OTagOnly, TRUE,
1174 GETFONT_FixedWidthOnly, TRUE,
1175 GetFontEnd,
1176 CHILD_Label, LabelObj,
1177 LABEL_Text, gadlab[GID_OPTS_FONT_MONO],
1178 LabelEnd,
1179 LAYOUT_AddChild, gow->objects[GID_OPTS_FONT_CURSIVE] = GetFontObj,
1180 GA_ID, GID_OPTS_FONT_CURSIVE,
1181 GA_RelVerify, TRUE,
1182 GETFONT_TextAttr, &fontcursive,
1183 GETFONT_OTagOnly, TRUE,
1185 GetFontEnd,
1186 CHILD_Label, LabelObj,
1187 LABEL_Text, gadlab[GID_OPTS_FONT_CURSIVE],
1188 LabelEnd,
1189 LAYOUT_AddChild, gow->objects[GID_OPTS_FONT_FANTASY] = GetFontObj,
1190 GA_ID, GID_OPTS_FONT_FANTASY,
1191 GA_RelVerify, TRUE,
1192 GETFONT_TextAttr, &fontfantasy,
1193 GETFONT_OTagOnly, TRUE,
1195 GetFontEnd,
1196 CHILD_Label, LabelObj,
1197 LABEL_Text, gadlab[GID_OPTS_FONT_FANTASY],
1198 LabelEnd,
1199 LAYOUT_AddChild, gow->objects[GID_OPTS_FONT_DEFAULT] = ChooserObj,
1200 GA_ID, GID_OPTS_FONT_DEFAULT,
1201 GA_RelVerify, TRUE,
1202 CHOOSER_PopUp, TRUE,
1203#ifdef __amigaos4__
1204 CHOOSER_LabelArray, fontopts,
1205#else
1206 CHOOSER_Labels, &gow->fontoptslist,
1207#endif
1208 CHOOSER_Selected, nsoption_int(font_default) - PLOT_FONT_FAMILY_SANS_SERIF,
1209 ChooserEnd,
1210 CHILD_Label, LabelObj,
1211 LABEL_Text, gadlab[GID_OPTS_FONT_DEFAULT],
1212 LabelEnd,
1213 LayoutEnd, // font faces
1214 CHILD_WeightedHeight, 0,
1215 LAYOUT_AddChild, LayoutHObj,
1216 LAYOUT_AddChild, LayoutVObj,
1217 LAYOUT_SpaceOuter, TRUE,
1218 LAYOUT_BevelStyle, BVS_GROUP,
1219 LAYOUT_Label, gadlab[GRP_OPTS_FONTSIZE],
1220 LAYOUT_AddChild, LayoutHObj,
1221 LAYOUT_LabelColumn, PLACETEXT_RIGHT,
1222 LAYOUT_AddChild, gow->objects[GID_OPTS_FONT_SIZE] = IntegerObj,
1223 GA_ID, GID_OPTS_FONT_SIZE,
1224 GA_RelVerify, TRUE,
1225 INTEGER_Number, nsoption_int(font_size) / 10,
1226 INTEGER_Minimum, 1,
1227 INTEGER_Maximum, 99,
1228 INTEGER_Arrows, TRUE,
1229 IntegerEnd,
1230 CHILD_WeightedWidth, 0,
1231 CHILD_Label, LabelObj,
1232 LABEL_Text, gadlab[LAB_OPTS_PT],
1233 LabelEnd,
1234 LayoutEnd,
1235 CHILD_Label, LabelObj,
1236 LABEL_Text, gadlab[GID_OPTS_FONT_SIZE],
1237 LabelEnd,
1238 LAYOUT_AddChild, LayoutHObj,
1239 LAYOUT_LabelColumn, PLACETEXT_RIGHT,
1240 LAYOUT_AddChild, gow->objects[GID_OPTS_FONT_MINSIZE] = IntegerObj,
1241 GA_ID, GID_OPTS_FONT_MINSIZE,
1242 GA_RelVerify, TRUE,
1243 INTEGER_Number, nsoption_int(font_min_size) / 10,
1244 INTEGER_Minimum, 1,
1245 INTEGER_Maximum, 99,
1246 INTEGER_Arrows, TRUE,
1247 IntegerEnd,
1248 CHILD_WeightedWidth, 0,
1249 CHILD_Label, LabelObj,
1250 LABEL_Text, gadlab[LAB_OPTS_PT],
1251 LabelEnd,
1252 LayoutEnd,
1253 CHILD_Label, LabelObj,
1254 LABEL_Text, gadlab[GID_OPTS_FONT_MINSIZE],
1255 LabelEnd,
1256 LayoutEnd,
1257 LAYOUT_AddChild, LayoutVObj,
1258 LAYOUT_SpaceOuter, TRUE,
1259 LAYOUT_BevelStyle, BVS_GROUP,
1260 LAYOUT_Label, gadlab[GRP_OPTS_MISC],
1263 GA_RelVerify, TRUE,
1265 GA_Selected, nsoption_bool(font_antialiasing),
1266#ifndef __amigaos4__
1267 GA_Disabled, TRUE,
1268#endif
1269 CheckBoxEnd,
1270#ifndef __amigaos4__
1271 LAYOUT_AddChild, gow->objects[GID_OPTS_FONT_BITMAP] = CheckBoxObj,
1272 GA_ID, GID_OPTS_FONT_BITMAP,
1273 GA_RelVerify, TRUE,
1274 GA_Text, gadlab[GID_OPTS_FONT_BITMAP],
1275 GA_Selected, nsoption_bool(bitmap_fonts),
1276 CheckBoxEnd,
1277#endif
1278 LayoutEnd,
1279 LayoutEnd,
1280 CHILD_WeightedHeight, 0,
1281 LayoutEnd, // page vgroup
1282 CHILD_WeightedHeight, 0,
1283 PageEnd, // page object
1284 /*
1285 ** Cache
1286 */
1287 PAGE_Add, LayoutVObj,
1288 LAYOUT_AddChild, LayoutVObj,
1289 LAYOUT_AddChild, LayoutVObj,
1290 LAYOUT_SpaceOuter, TRUE,
1291 LAYOUT_BevelStyle, BVS_GROUP,
1292 LAYOUT_Label, gadlab[GRP_OPTS_MEMCACHE],
1293 LAYOUT_AddChild, LayoutHObj,
1294 LAYOUT_LabelColumn, PLACETEXT_RIGHT,
1295 LAYOUT_AddChild, gow->objects[GID_OPTS_CACHE_MEM] = IntegerObj,
1296 GA_ID, GID_OPTS_CACHE_MEM,
1297 GA_RelVerify, TRUE,
1298 INTEGER_Number, nsoption_int(memory_cache_size) / 1048576,
1299 INTEGER_Minimum, 0,
1300 INTEGER_Maximum, 2048,
1301 INTEGER_Arrows, TRUE,
1302 IntegerEnd,
1303 CHILD_WeightedWidth, 0,
1304 CHILD_Label, LabelObj,
1305 LABEL_Text, gadlab[LAB_OPTS_MB],
1306 LabelEnd,
1307 LayoutEnd,
1308 CHILD_Label, LabelObj,
1309 LABEL_Text, gadlab[GID_OPTS_CACHE_MEM],
1310 LabelEnd,
1311 LayoutEnd, // memory cache
1312 CHILD_WeightedHeight, 0,
1313 LAYOUT_AddChild, LayoutVObj,
1314 LAYOUT_SpaceOuter, TRUE,
1315 LAYOUT_BevelStyle, BVS_GROUP,
1316 LAYOUT_Label, gadlab[GRP_OPTS_DISCCACHE],
1317 LAYOUT_AddChild, LayoutHObj,
1318 LAYOUT_LabelColumn, PLACETEXT_RIGHT,
1319 LAYOUT_AddChild, gow->objects[GID_OPTS_CACHE_DISC] = IntegerObj,
1320 GA_ID, GID_OPTS_CACHE_DISC,
1321 GA_RelVerify, TRUE,
1322 INTEGER_Number, nsoption_uint(disc_cache_size) / 1048576,
1323 INTEGER_Minimum, 0,
1324 INTEGER_Maximum, 4096,
1325 INTEGER_Arrows, TRUE,
1326 IntegerEnd,
1327 CHILD_WeightedWidth, 0,
1328 CHILD_Label, LabelObj,
1329 LABEL_Text, gadlab[LAB_OPTS_MB],
1330 LabelEnd,
1331 LayoutEnd,
1332 CHILD_Label, LabelObj,
1333 LABEL_Text, gadlab[GID_OPTS_CACHE_DISC],
1334 LabelEnd,
1335 LayoutEnd, // disc cache
1336 CHILD_WeightedHeight, 0,
1337 LayoutEnd, // page vgroup
1338 CHILD_WeightedHeight, 0,
1339 PageEnd, // page object
1340 /*
1341 ** Tabs
1342 */
1343 PAGE_Add, LayoutVObj,
1344 LAYOUT_AddChild, LayoutVObj,
1345 LAYOUT_AddChild, LayoutHObj,
1346 LAYOUT_AddChild, LayoutVObj,
1347 LAYOUT_SpaceOuter, TRUE,
1348 LAYOUT_BevelStyle, BVS_GROUP,
1349 LAYOUT_Label, gadlab[GRP_OPTS_TABS],
1350 LAYOUT_AddChild, gow->objects[GID_OPTS_TAB_ACTIVE] = CheckBoxObj,
1351 GA_ID, GID_OPTS_TAB_ACTIVE,
1352 GA_RelVerify, TRUE,
1353 GA_Text, gadlab[GID_OPTS_TAB_ACTIVE],
1354 GA_Selected, !nsoption_bool(new_tab_is_active),
1355 CheckBoxEnd,
1356 LAYOUT_AddChild, gow->objects[GID_OPTS_TAB_LAST] = CheckBoxObj,
1357 GA_ID, GID_OPTS_TAB_LAST,
1358 GA_RelVerify, TRUE,
1359 GA_Text, gadlab[GID_OPTS_TAB_LAST],
1360 GA_Selected, nsoption_bool(new_tab_last),
1361 CheckBoxEnd,
1362 LAYOUT_AddChild, gow->objects[GID_OPTS_TAB_2] = CheckBoxObj,
1363 GA_ID, GID_OPTS_TAB_2,
1364 GA_RelVerify, TRUE,
1365 GA_Text, gadlab[GID_OPTS_TAB_2],
1366 GA_Selected, nsoption_bool(button_2_tab),
1367 CheckBoxEnd,
1368 LAYOUT_AddChild, gow->objects[GID_OPTS_TAB_ALWAYS] = CheckBoxObj,
1369 GA_ID, GID_OPTS_TAB_ALWAYS,
1370 GA_RelVerify, TRUE,
1371 GA_Text, gadlab[GID_OPTS_TAB_ALWAYS],
1372 GA_Selected, nsoption_bool(tab_always_show),
1373 GA_Disabled, tab_always_show_disabled,
1374 CheckBoxEnd,
1375 LAYOUT_AddChild, gow->objects[GID_OPTS_TAB_CLOSE] = CheckBoxObj,
1376 GA_ID, GID_OPTS_TAB_CLOSE,
1377 GA_RelVerify, TRUE,
1378 GA_Text, gadlab[GID_OPTS_TAB_CLOSE],
1379 GA_Selected, nsoption_bool(tab_close_warn),
1380 CheckBoxEnd,
1381 LayoutEnd, // tabbed browsing
1382 LayoutEnd,
1383 LayoutEnd, // page vgroup
1384 CHILD_WeightedHeight, 0,
1385 PageEnd, // page object
1386 /*
1387 ** Advanced
1388 */
1389 PAGE_Add, LayoutVObj,
1390 LAYOUT_AddChild, LayoutVObj,
1391 LAYOUT_AddChild, LayoutVObj,
1392 LAYOUT_SpaceOuter, TRUE,
1393 LAYOUT_BevelStyle, BVS_GROUP,
1394 LAYOUT_Label, gadlab[GRP_OPTS_DOWNLOADS],
1395 LAYOUT_AddChild, LayoutHObj,
1396 LAYOUT_AddChild, gow->objects[GID_OPTS_OVERWRITE] = CheckBoxObj,
1397 GA_ID, GID_OPTS_OVERWRITE,
1398 GA_RelVerify, TRUE,
1399 GA_Disabled, FALSE,
1400 GA_Text, gadlab[GID_OPTS_OVERWRITE],
1401 GA_Selected, nsoption_bool(ask_overwrite),
1402 CheckBoxEnd,
1403 LAYOUT_AddChild, gow->objects[GID_OPTS_NOTIFY] = CheckBoxObj,
1404 GA_ID, GID_OPTS_NOTIFY,
1405 GA_RelVerify, TRUE,
1406 GA_Disabled, download_notify_disabled,
1407 GA_Text, gadlab[GID_OPTS_NOTIFY],
1408 GA_Selected, nsoption_bool(download_notify),
1409#ifndef __amigaos4__
1410 GA_Disabled, TRUE,
1411#endif
1412 CheckBoxEnd,
1413 LayoutEnd,
1414 LAYOUT_AddChild, gow->objects[GID_OPTS_DLDIR] = GetFileObj,
1415 GA_ID, GID_OPTS_DLDIR,
1416 GA_RelVerify, TRUE,
1417 GETFILE_Drawer, nsoption_charp(download_dir),
1418 GETFILE_DrawersOnly, TRUE,
1419 GETFILE_ReadOnly, TRUE,
1420 GETFILE_FullFileExpand, FALSE,
1421 GetFileEnd,
1422 CHILD_Label, LabelObj,
1423 LABEL_Text, gadlab[GID_OPTS_DLDIR],
1424 LabelEnd,
1425 LayoutEnd, // downloads
1426 CHILD_WeightedHeight, 0,
1427 LAYOUT_AddChild, LayoutHObj,
1428 LAYOUT_AddChild, LayoutVObj,
1429 LAYOUT_SpaceOuter, TRUE,
1430 LAYOUT_BevelStyle, BVS_GROUP,
1431 LAYOUT_Label, gadlab[GRP_OPTS_BEHAVIOUR],
1432 LAYOUT_AddChild, gow->objects[GID_OPTS_STARTUP_NO_WIN] = CheckBoxObj,
1434 GA_RelVerify, TRUE,
1436 GA_Selected, nsoption_bool(startup_no_window),
1437 CheckBoxEnd,
1438 LAYOUT_AddChild, gow->objects[GID_OPTS_CLOSE_NO_QUIT] = CheckBoxObj,
1440 GA_RelVerify, TRUE,
1442 GA_Selected, nsoption_bool(close_no_quit),
1443 CheckBoxEnd,
1444 LAYOUT_AddChild, gow->objects[GID_OPTS_DOCKY] = CheckBoxObj,
1445 GA_ID, GID_OPTS_DOCKY,
1446 GA_RelVerify, TRUE,
1447 GA_Text, gadlab[GID_OPTS_DOCKY],
1448 GA_Selected, !nsoption_bool(hide_docky_icon),
1449#ifndef __amigaos4__
1450 GA_Disabled, TRUE,
1451#endif
1452 CheckBoxEnd,
1453 LayoutEnd, // behaviour
1454 CHILD_WeightedHeight, 0,
1455 LayoutEnd, // hgroup
1456 CHILD_WeightedHeight, 0,
1457 LAYOUT_AddChild, LayoutHObj,
1458 LAYOUT_AddChild, LayoutHObj,
1459 LAYOUT_SpaceOuter, TRUE,
1460 LAYOUT_BevelStyle, BVS_GROUP,
1461 LAYOUT_Label, gadlab[GRP_OPTS_CLIPBOARD],
1462 LAYOUT_AddChild, gow->objects[GID_OPTS_CLIPBOARD] = CheckBoxObj,
1463 GA_ID, GID_OPTS_CLIPBOARD,
1464 GA_RelVerify, TRUE,
1465 GA_Text, gadlab[GID_OPTS_CLIPBOARD],
1466 GA_Selected, nsoption_bool(clipboard_write_utf8),
1467 CheckBoxEnd,
1468 LayoutEnd, // clipboard
1469 CHILD_WeightedHeight, 0,
1470 LAYOUT_AddChild, LayoutHObj,
1471 LAYOUT_SpaceOuter, TRUE,
1472 LAYOUT_BevelStyle, BVS_GROUP,
1473 LAYOUT_Label, gadlab[GRP_OPTS_SEARCH],
1474 LAYOUT_AddChild, gow->objects[GID_OPTS_SEARCH_PROV] = ChooserObj,
1475 GA_ID, GID_OPTS_SEARCH_PROV,
1476 GA_RelVerify, TRUE,
1477 CHOOSER_PopUp, TRUE,
1478 CHOOSER_Labels, websearch_list,
1479 CHOOSER_Selected, &gow->websearch_idx,
1480 CHOOSER_MaxLabels, 40,
1481 ChooserEnd,
1482 CHILD_Label, LabelObj,
1483 LABEL_Text, gadlab[GID_OPTS_SEARCH_PROV],
1484 LabelEnd,
1485 LayoutEnd, // search
1486 CHILD_WeightedHeight, 0,
1487 LayoutEnd, // hgroup
1488 CHILD_WeightedHeight, 0,
1489 LAYOUT_AddChild, LayoutHObj,
1490 LAYOUT_BevelStyle, BVS_GROUP,
1491 LAYOUT_Label, gadlab[GRP_OPTS_MISC],
1492 LAYOUT_SpaceOuter, TRUE,
1493 LAYOUT_AddChild, gow->objects[GID_OPTS_FASTSCROLL] = CheckBoxObj,
1494 GA_ID, GID_OPTS_FASTSCROLL,
1495 GA_RelVerify, TRUE,
1496 GA_Text, gadlab[GID_OPTS_FASTSCROLL],
1497 GA_Selected, nsoption_bool(faster_scroll),
1498 CheckBoxEnd,
1499 LAYOUT_AddChild, gow->objects[GID_OPTS_SELECTMENU] = CheckBoxObj,
1500 GA_ID, GID_OPTS_SELECTMENU,
1501 GA_RelVerify, TRUE,
1502 GA_Text, gadlab[GID_OPTS_SELECTMENU],
1503 GA_Selected, !nsoption_bool(core_select_menu),
1504 GA_Disabled, !ami_selectmenu_is_safe(),
1505 CheckBoxEnd,
1506 LAYOUT_AddChild, gow->objects[GID_OPTS_ENABLECSS] = CheckBoxObj,
1507 GA_ID, GID_OPTS_ENABLECSS,
1508 GA_RelVerify, TRUE,
1509 GA_Text, gadlab[GID_OPTS_ENABLECSS],
1510 GA_Selected, nsoption_bool(author_level_css),
1511 CheckBoxEnd,
1512 LayoutEnd, // misc
1513 CHILD_WeightedHeight, 0,
1514
1515 LayoutEnd, // page vgroup
1516 CHILD_WeightedHeight, 0,
1517 PageEnd, // page object
1518 /*
1519 ** Export
1520 */
1521#ifdef WITH_PDF_EXPORT
1522 PAGE_Add, LayoutVObj,
1523 LAYOUT_AddChild, LayoutVObj,
1524 LAYOUT_AddChild, LayoutHObj,
1525 LAYOUT_SpaceOuter, TRUE,
1526 LAYOUT_BevelStyle, BVS_GROUP,
1527 LAYOUT_Label, gadlab[GRP_OPTS_MARGINS],
1528 LAYOUT_AddChild, LayoutHObj,
1529 LAYOUT_LabelColumn, PLACETEXT_RIGHT,
1530 LAYOUT_AddChild, gow->objects[GID_OPTS_MARGIN_TOP] = IntegerObj,
1531 GA_ID, GID_OPTS_MARGIN_TOP,
1532 GA_RelVerify, TRUE,
1533 INTEGER_Number, nsoption_int(margin_top),
1534 INTEGER_Minimum, 0,
1535 INTEGER_Maximum, 99,
1536 INTEGER_Arrows, TRUE,
1537 IntegerEnd,
1538 CHILD_WeightedWidth, 0,
1539 CHILD_Label, LabelObj,
1540 LABEL_Text, gadlab[LAB_OPTS_MM],
1541 LabelEnd,
1542 LayoutEnd,
1543 CHILD_Label, LabelObj,
1544 LABEL_Text, gadlab[GID_OPTS_MARGIN_TOP],
1545 LabelEnd,
1546 LAYOUT_AddChild, LayoutHObj,
1547 LAYOUT_LabelColumn, PLACETEXT_RIGHT,
1548 LAYOUT_AddChild, gow->objects[GID_OPTS_MARGIN_LEFT] = IntegerObj,
1549 GA_ID, GID_OPTS_MARGIN_LEFT,
1550 GA_RelVerify, TRUE,
1551 INTEGER_Number, nsoption_int(margin_left),
1552 INTEGER_Minimum, 0,
1553 INTEGER_Maximum, 99,
1554 INTEGER_Arrows, TRUE,
1555 IntegerEnd,
1556 CHILD_WeightedWidth, 0,
1557 CHILD_Label, LabelObj,
1558 LABEL_Text, gadlab[LAB_OPTS_MM],
1559 LabelEnd,
1560 LayoutEnd,
1561 CHILD_Label, LabelObj,
1562 LABEL_Text, gadlab[GID_OPTS_MARGIN_LEFT],
1563 LabelEnd,
1564 LAYOUT_AddChild, LayoutHObj,
1565 LAYOUT_LabelColumn, PLACETEXT_RIGHT,
1566 LAYOUT_AddChild, gow->objects[GID_OPTS_MARGIN_BOTTOM] = IntegerObj,
1568 GA_RelVerify, TRUE,
1569 INTEGER_Number, nsoption_int(margin_bottom),
1570 INTEGER_Minimum, 0,
1571 INTEGER_Maximum, 99,
1572 INTEGER_Arrows, TRUE,
1573 IntegerEnd,
1574 CHILD_WeightedWidth, 0,
1575 CHILD_Label, LabelObj,
1576 LABEL_Text, gadlab[LAB_OPTS_MM],
1577 LabelEnd,
1578 LayoutEnd,
1579 CHILD_Label, LabelObj,
1580 LABEL_Text, gadlab[GID_OPTS_MARGIN_BOTTOM],
1581 LabelEnd,
1582 LAYOUT_AddChild, LayoutHObj,
1583 LAYOUT_LabelColumn, PLACETEXT_RIGHT,
1584 LAYOUT_AddChild, gow->objects[GID_OPTS_MARGIN_RIGHT] = IntegerObj,
1585 GA_ID, GID_OPTS_MARGIN_RIGHT,
1586 GA_RelVerify, TRUE,
1587 INTEGER_Number, nsoption_int(margin_right),
1588 INTEGER_Minimum, 0,
1589 INTEGER_Maximum, 99,
1590 INTEGER_Arrows, TRUE,
1591 IntegerEnd,
1592 CHILD_WeightedWidth, 0,
1593 CHILD_Label, LabelObj,
1594 LABEL_Text, gadlab[LAB_OPTS_MM],
1595 LabelEnd,
1596 LayoutEnd,
1597 CHILD_Label, LabelObj,
1598 LABEL_Text, gadlab[GID_OPTS_MARGIN_RIGHT],
1599 LabelEnd,
1600 LayoutEnd, // margins
1601 CHILD_WeightedHeight, 0,
1602 LAYOUT_AddChild, LayoutVObj,
1603 LAYOUT_SpaceOuter, TRUE,
1604 LAYOUT_BevelStyle, BVS_GROUP,
1605 LAYOUT_Label, gadlab[GRP_OPTS_SCALING],
1606 LAYOUT_AddChild, LayoutHObj,
1607 LAYOUT_LabelColumn, PLACETEXT_RIGHT,
1608 LAYOUT_AddChild, gow->objects[GID_OPTS_EXPORT_SCALE] = IntegerObj,
1609 GA_ID, GID_OPTS_EXPORT_SCALE,
1610 GA_RelVerify, TRUE,
1611 INTEGER_Number, nsoption_int(export_scale),
1612 INTEGER_Minimum, 0,
1613 INTEGER_Maximum, 100,
1614 INTEGER_Arrows, TRUE,
1615 IntegerEnd,
1616 CHILD_WeightedWidth, 0,
1617 CHILD_Label, LabelObj,
1618 LABEL_Text, "%",
1619 LabelEnd,
1620 LayoutEnd,
1621 CHILD_Label, LabelObj,
1622 LABEL_Text, gadlab[GID_OPTS_EXPORT_SCALE],
1623 LabelEnd,
1624 LayoutEnd, // scaling
1625 CHILD_WeightedHeight, 0,
1626 LAYOUT_AddChild, LayoutVObj,
1627 LAYOUT_SpaceOuter, TRUE,
1628 LAYOUT_BevelStyle, BVS_GROUP,
1629 LAYOUT_Label, gadlab[GRP_OPTS_APPEARANCE],
1630 LAYOUT_AddChild, gow->objects[GID_OPTS_EXPORT_NOIMAGES] = CheckBoxObj,
1632 GA_RelVerify, TRUE,
1634 GA_Selected, nsoption_bool(suppress_images),
1635 CheckBoxEnd,
1636 LAYOUT_AddChild, gow->objects[GID_OPTS_EXPORT_NOBKG] = CheckBoxObj,
1637 GA_ID, GID_OPTS_EXPORT_NOBKG,
1638 GA_RelVerify, TRUE,
1639 GA_Text, gadlab[GID_OPTS_EXPORT_NOBKG],
1640 GA_Selected, nsoption_bool(remove_backgrounds),
1641 CheckBoxEnd,
1642 LAYOUT_AddChild, gow->objects[GID_OPTS_EXPORT_LOOSEN] = CheckBoxObj,
1644 GA_RelVerify, TRUE,
1646 GA_Selected, nsoption_bool(enable_loosening),
1647 CheckBoxEnd,
1648 LayoutEnd, // appearance
1649 CHILD_WeightedHeight, 0,
1650 LAYOUT_AddChild, LayoutVObj,
1651 LAYOUT_SpaceOuter, TRUE,
1652 LAYOUT_BevelStyle, BVS_GROUP,
1653 LAYOUT_Label, gadlab[GRP_OPTS_ADVANCED],
1654 LAYOUT_AddChild, gow->objects[GID_OPTS_EXPORT_COMPRESS] = CheckBoxObj,
1656 GA_RelVerify, TRUE,
1658 GA_Selected, nsoption_bool(enable_PDF_compression),
1659 CheckBoxEnd,
1660 LAYOUT_AddChild, gow->objects[GID_OPTS_EXPORT_PASSWORD] = CheckBoxObj,
1662 GA_RelVerify, TRUE,
1663 GA_Disabled, TRUE,
1665 GA_Selected, nsoption_bool(enable_PDF_password),
1666 CheckBoxEnd,
1667 LayoutEnd, // export
1668 CHILD_WeightedHeight, 0,
1669 LayoutEnd, // page vgroup
1670 CHILD_WeightedHeight, 0,
1671 PageEnd, // page object
1672#endif
1673 End, // pagegroup
1674 ClickTabEnd,
1675 LAYOUT_AddChild, LayoutHObj,
1676 LAYOUT_AddChild, gow->objects[GID_OPTS_SAVE] = ButtonObj,
1677 GA_ID,GID_OPTS_SAVE,
1678 GA_Text,gadlab[GID_OPTS_SAVE],
1679 GA_RelVerify,TRUE,
1680 ButtonEnd,
1681 LAYOUT_AddChild, gow->objects[GID_OPTS_USE] = ButtonObj,
1682 GA_ID,GID_OPTS_USE,
1683 GA_Text,gadlab[GID_OPTS_USE],
1684 GA_RelVerify,TRUE,
1685 ButtonEnd,
1686 LAYOUT_AddChild, gow->objects[GID_OPTS_CANCEL] = ButtonObj,
1687 GA_ID,GID_OPTS_CANCEL,
1688 GA_Text,gadlab[GID_OPTS_CANCEL],
1689 GA_RelVerify,TRUE,
1690 ButtonEnd,
1691 EndGroup, // save/use/cancel
1692 EndGroup, // main
1693 EndWindow;
1694
1695 gow->win = (struct Window *)RA_OpenWindow(gow->objects[OID_MAIN]);
1697 }
1698 ami_utf8_free(homepage_url_lc);
1699}
1700
1701static void ami_gui_opts_use(bool save)
1702{
1703 ULONG data, id = 0;
1704 struct Node *tmp_node = NULL;
1705 struct TextAttr *tattr;
1706 char *dot;
1707 bool rescan_fonts = false;
1708 bool old_tab_always_show;
1709
1711
1712 GetAttr(STRINGA_TextVal,gow->objects[GID_OPTS_HOMEPAGE],(ULONG *)&data);
1713 nsoption_set_charp(homepage_url, (char *)ami_to_utf8_easy((char *)data));
1714
1715 GetAttr(STRINGA_TextVal,gow->objects[GID_OPTS_CONTENTLANG],(ULONG *)&data);
1716 nsoption_set_charp(accept_language, (char *)strdup((char *)data));
1717
1718 GetAttr(GA_Selected, gow->objects[GID_OPTS_FROMLOCALE],(ULONG *)&data);
1719 if (data) {
1720 nsoption_set_bool(accept_lang_locale, true);
1721 } else {
1722 nsoption_set_bool(accept_lang_locale, false);
1723 }
1724
1725 GetAttr(GA_Selected,gow->objects[GID_OPTS_HIDEADS],(ULONG *)&data);
1726 if (data) {
1727 nsoption_set_bool(block_advertisements, true);
1728 } else {
1729 nsoption_set_bool(block_advertisements, false);
1730 }
1731
1732 GetAttr(INTEGER_Number,gow->objects[GID_OPTS_HISTORY],(ULONG *)&nsoption_int(expire_url));
1733
1734 GetAttr(GA_Selected,gow->objects[GID_OPTS_REFERRAL],(ULONG *)&data);
1735 if (data) {
1736 nsoption_set_bool(send_referer, true);
1737 } else {
1738 nsoption_set_bool(send_referer, false);
1739 }
1740
1741 GetAttr(GA_Selected,gow->objects[GID_OPTS_JAVASCRIPT],(ULONG *)&data);
1742 if (data) {
1743 nsoption_set_bool(enable_javascript, true);
1744 } else {
1745 nsoption_set_bool(enable_javascript, false);
1746 }
1747
1748 ami_gui_menu_set_checked(NULL, M_JS, nsoption_bool(enable_javascript));
1749
1750 GetAttr(GA_Selected,gow->objects[GID_OPTS_DONOTTRACK],(ULONG *)&data);
1751 if (data) {
1752 nsoption_set_bool(do_not_track, true);
1753 } else {
1754 nsoption_set_bool(do_not_track, false);
1755 }
1756
1757 GetAttr(GA_Selected,gow->objects[GID_OPTS_ENABLECSS],(ULONG *)&data);
1758 if (data) {
1759 nsoption_set_bool(author_level_css, true);
1760 } else {
1761 nsoption_set_bool(author_level_css, false);
1762 }
1763
1764 ami_gui_menu_set_checked(NULL, M_CSS, nsoption_bool(author_level_css));
1765
1766 GetAttr(GA_Selected,gow->objects[GID_OPTS_FASTSCROLL],(ULONG *)&data);
1767 if (data) {
1768 nsoption_set_bool(faster_scroll, true);
1769 } else {
1770 nsoption_set_bool(faster_scroll, false);
1771 }
1772
1773 GetAttr(RADIOBUTTON_Selected,gow->objects[GID_OPTS_SCREEN],(ULONG *)&data);
1774 switch(data)
1775 {
1776 case 0:
1777 nsoption_set_charp(pubscreen_name, NULL);
1778 break;
1779
1780 case 1:
1781 nsoption_set_charp(pubscreen_name, (char *)strdup("Workbench"));
1782 break;
1783
1784 case 2:
1785 GetAttr(STRINGA_TextVal,gow->objects[GID_OPTS_SCREENNAME],(ULONG *)&data);
1786 nsoption_set_charp(pubscreen_name, (char *)strdup((char *)data));
1787 break;
1788 }
1789
1790 GetAttr(GETSCREENMODE_DisplayID, gow->objects[GID_OPTS_SCREENMODE], (ULONG *)&id);
1791 if(id)
1792 {
1793 char *modeid = malloc(20);
1794 sprintf(modeid,"0x%lx", id);
1795 nsoption_set_charp(screen_modeid, modeid);
1796 }
1797
1798 GetAttr(GA_Selected,gow->objects[GID_OPTS_WIN_SIMPLE],(ULONG *)&data);
1799 if ((data == TRUE) && (nsoption_bool(window_simple_refresh) == false)) {
1800 nsoption_set_bool(window_simple_refresh, true);
1801 nsoption_set_int(screen_compositing, 0);
1802 } else if ((data == FALSE) && (nsoption_bool(window_simple_refresh) == true)) {
1803 nsoption_set_bool(window_simple_refresh, false);
1804 nsoption_set_int(screen_compositing, -1);
1805 }
1806
1807 GetAttr(GETFILE_Drawer,gow->objects[GID_OPTS_THEME],(ULONG *)&data);
1808 nsoption_set_charp(theme, (char *)strdup((char *)data));
1809
1810 GetAttr(CHOOSER_Selected,gow->objects[GID_OPTS_THEMEPAGE],(ULONG *)&data);
1811 if(data) {
1812 nsoption_set_bool(prefer_dark_mode, true);
1813 } else {
1814 nsoption_set_bool(prefer_dark_mode, false);
1815 }
1816
1817 GetAttr(GA_Selected,gow->objects[GID_OPTS_PTRTRUE],(ULONG *)&data);
1818 if (data) {
1819 nsoption_set_bool(truecolour_mouse_pointers, true);
1820 } else {
1821 nsoption_set_bool(truecolour_mouse_pointers, false);
1822 }
1823
1824 GetAttr(GA_Selected,gow->objects[GID_OPTS_PTROS],(ULONG *)&data);
1825 if (data) {
1826 nsoption_set_bool(os_mouse_pointers, true);
1827 } else {
1828 nsoption_set_bool(os_mouse_pointers, false);
1829 }
1830
1831 GetAttr(CHOOSER_Selected,gow->objects[GID_OPTS_PROXY],(ULONG *)&data);
1832 if(data)
1833 {
1834 nsoption_set_bool(http_proxy, true);
1835 nsoption_set_int(http_proxy_auth, data - 1);
1836 }
1837 else
1838 {
1839 nsoption_set_bool(http_proxy, false);
1840 }
1841
1842 GetAttr(STRINGA_TextVal,gow->objects[GID_OPTS_PROXY_HOST],(ULONG *)&data);
1843 nsoption_set_charp(http_proxy_host, (char *)strdup((char *)data));
1844
1845 GetAttr(INTEGER_Number,gow->objects[GID_OPTS_PROXY_PORT],(ULONG *)&nsoption_int(http_proxy_port));
1846
1847 GetAttr(STRINGA_TextVal,gow->objects[GID_OPTS_PROXY_USER],(ULONG *)&data);
1848 nsoption_set_charp(http_proxy_auth_user, (char *)strdup((char *)data));
1849
1850 GetAttr(STRINGA_TextVal,gow->objects[GID_OPTS_PROXY_PASS],(ULONG *)&data);
1851 nsoption_set_charp(http_proxy_auth_pass, (char *)strdup((char *)data));
1852
1853 GetAttr(STRINGA_TextVal,gow->objects[GID_OPTS_PROXY_BYPASS],(ULONG *)&data);
1854 nsoption_set_charp(http_proxy_noproxy, (char *)strdup((char *)data));
1855
1856 GetAttr(INTEGER_Number,gow->objects[GID_OPTS_FETCHMAX],(ULONG *)&nsoption_int(max_fetchers));
1857 GetAttr(INTEGER_Number,gow->objects[GID_OPTS_FETCHHOST],(ULONG *)&nsoption_int(max_fetchers_per_host));
1858 GetAttr(INTEGER_Number,gow->objects[GID_OPTS_FETCHCACHE],(ULONG *)&nsoption_int(max_cached_fetch_handles));
1859
1860 GetAttr(CHOOSER_Selected,gow->objects[GID_OPTS_NATIVEBM],(ULONG *)&nsoption_int(cache_bitmaps));
1861
1862 GetAttr(GA_Selected,gow->objects[GID_OPTS_SCALEQ],(ULONG *)&data);
1863 if (data) {
1864 nsoption_set_bool(scale_quality, true);
1865 } else {
1866 nsoption_set_bool(scale_quality, false);
1867 }
1868
1869 GetAttr(CHOOSER_Selected,gow->objects[GID_OPTS_DITHERQ],(ULONG *)&nsoption_int(dither_quality));
1870
1871 GetAttr(GA_Selected,gow->objects[GID_OPTS_ANIMDISABLE],(ULONG *)&data);
1872 if(data) {
1873 nsoption_set_bool(animate_images, false);
1874 } else {
1875 nsoption_set_bool(animate_images, true);
1876 }
1877
1878 GetAttr(INTEGER_Number,gow->objects[GID_OPTS_DPI_Y],(ULONG *)&nsoption_int(screen_ydpi));
1879 ami_font_setdevicedpi(id); // id set above
1880
1881 GetAttr(GETFONT_TextAttr,gow->objects[GID_OPTS_FONT_SANS],(ULONG *)&data);
1882 tattr = (struct TextAttr *)data;
1883
1884 if((dot = strrchr(tattr->ta_Name,'.'))) *dot = '\0';
1885 nsoption_set_charp(font_sans, (char *)strdup((char *)tattr->ta_Name));
1886
1887 GetAttr(GETFONT_TextAttr,gow->objects[GID_OPTS_FONT_SERIF],(ULONG *)&data);
1888 tattr = (struct TextAttr *)data;
1889
1890 if((dot = strrchr(tattr->ta_Name,'.'))) *dot = '\0';
1891 nsoption_set_charp(font_serif, (char *)strdup((char *)tattr->ta_Name));
1892
1893 GetAttr(GETFONT_TextAttr,gow->objects[GID_OPTS_FONT_MONO],(ULONG *)&data);
1894 tattr = (struct TextAttr *)data;
1895
1896 if((dot = strrchr(tattr->ta_Name,'.'))) *dot = '\0';
1897 nsoption_set_charp(font_mono, (char *)strdup((char *)tattr->ta_Name));
1898
1899 GetAttr(GETFONT_TextAttr,gow->objects[GID_OPTS_FONT_CURSIVE],(ULONG *)&data);
1900 tattr = (struct TextAttr *)data;
1901
1902 if((dot = strrchr(tattr->ta_Name,'.'))) *dot = '\0';
1903 nsoption_set_charp(font_cursive, (char *)strdup((char *)tattr->ta_Name));
1904
1905 GetAttr(GETFONT_TextAttr,gow->objects[GID_OPTS_FONT_FANTASY],(ULONG *)&data);
1906 tattr = (struct TextAttr *)data;
1907
1908 if((dot = strrchr(tattr->ta_Name,'.'))) *dot = '\0';
1909 nsoption_set_charp(font_fantasy, (char *)strdup((char *)tattr->ta_Name));
1910
1911 GetAttr(CHOOSER_Selected,gow->objects[GID_OPTS_FONT_DEFAULT],(ULONG *)&nsoption_int(font_default));
1912 nsoption_set_int(font_default, nsoption_int(font_default) + PLOT_FONT_FAMILY_SANS_SERIF);
1913
1914 GetAttr(INTEGER_Number,gow->objects[GID_OPTS_FONT_SIZE],(ULONG *)&nsoption_int(font_size));
1915 nsoption_set_int(font_size, nsoption_int(font_size) * 10);
1916
1917 GetAttr(INTEGER_Number,gow->objects[GID_OPTS_FONT_MINSIZE],(ULONG *)&nsoption_int(font_min_size));
1918 nsoption_set_int(font_min_size, nsoption_int(font_min_size) * 10);
1919
1920 GetAttr(GA_Selected, gow->objects[GID_OPTS_FONT_ANTIALIASING], (ULONG *)&data);
1921 if(data) {
1922 nsoption_set_bool(font_antialiasing, true);
1923 } else {
1924 nsoption_set_bool(font_antialiasing, false);
1925 }
1926
1927#ifndef __amigaos4__
1928 GetAttr(GA_Selected, gow->objects[GID_OPTS_FONT_BITMAP], (ULONG *)&data);
1929 ami_font_fini();
1930
1931 if((nsoption_bool(bitmap_fonts) == true) && (data == false)) {
1932 nsoption_set_charp(font_sans, (char *)strdup("CGTriumvirate"));
1933 nsoption_set_charp(font_serif, (char *)strdup("CGTimes"));
1934 nsoption_set_charp(font_mono, (char *)strdup("LetterGothic"));
1935 nsoption_set_charp(font_cursive, (char *)strdup("CGTriumvirate"));
1936 nsoption_set_charp(font_fantasy, (char *)strdup("CGTimes"));
1937 }
1938
1939 if(data) {
1940 nsoption_set_bool(bitmap_fonts, true);
1941 } else {
1942 nsoption_set_bool(bitmap_fonts, false);
1943 }
1944 ami_font_init();
1945#endif
1946
1947 GetAttr(INTEGER_Number,gow->objects[GID_OPTS_CACHE_MEM],(ULONG *)&nsoption_int(memory_cache_size));
1948 nsoption_set_int(memory_cache_size, nsoption_int(memory_cache_size) * 1048576);
1949
1950 GetAttr(INTEGER_Number,gow->objects[GID_OPTS_CACHE_DISC],(ULONG *)&nsoption_uint(disc_cache_size));
1951 nsoption_set_uint(disc_cache_size, nsoption_uint(disc_cache_size) * 1048576);
1952
1953 GetAttr(GA_Selected,gow->objects[GID_OPTS_OVERWRITE],(ULONG *)&data);
1954 if (data) {
1955 nsoption_set_bool(ask_overwrite, true);
1956 } else {
1957 nsoption_set_bool(ask_overwrite, false);
1958 }
1959
1960 GetAttr(GA_Selected,gow->objects[GID_OPTS_NOTIFY],(ULONG *)&data);
1961 if (data) {
1962 nsoption_set_bool(download_notify, true);
1963 } else {
1964 nsoption_set_bool(download_notify, false);
1965 }
1966
1967 GetAttr(GETFILE_Drawer,gow->objects[GID_OPTS_DLDIR],(ULONG *)&data);
1968 if((nsoption_charp(download_dir) == NULL) ||
1969 (strcmp((char *)data, nsoption_charp(download_dir)) != 0)) {
1970 nsoption_set_charp(download_dir, (char *)strdup((char *)data));
1973 }
1974
1975 GetAttr(GA_Selected,gow->objects[GID_OPTS_TAB_ACTIVE],(ULONG *)&data);
1976 if (data) {
1977 nsoption_set_bool(new_tab_is_active, false);
1978 } else {
1979 nsoption_set_bool(new_tab_is_active, true);
1980 }
1981
1982 GetAttr(GA_Selected,gow->objects[GID_OPTS_TAB_LAST],(ULONG *)&data);
1983 if (data) {
1984 nsoption_set_bool(new_tab_last, true);
1985 } else {
1986 nsoption_set_bool(new_tab_last, false);
1987 }
1988
1989 GetAttr(GA_Selected,gow->objects[GID_OPTS_TAB_2],(ULONG *)&data);
1990 if (data) {
1991 nsoption_set_bool(button_2_tab, true);
1992 } else {
1993 nsoption_set_bool(button_2_tab, false);
1994 }
1995
1996 GetAttr(GA_Selected,gow->objects[GID_OPTS_TAB_CLOSE],(ULONG *)&data);
1997 if (data) {
1998 nsoption_set_bool(tab_close_warn, true);
1999 } else {
2000 nsoption_set_bool(tab_close_warn, false);
2001 }
2002
2003 GetAttr(GA_Selected,gow->objects[GID_OPTS_TAB_ALWAYS],(ULONG *)&data);
2004 old_tab_always_show = nsoption_bool(tab_always_show);
2005
2006 if (data) {
2007 nsoption_set_bool(tab_always_show, true);
2008 } else {
2009 nsoption_set_bool(tab_always_show, false);
2010 }
2011
2012 if(old_tab_always_show != nsoption_bool(tab_always_show))
2014
2015#ifdef __amigaos4__
2016 GetAttr(CHOOSER_SelectedNode, gow->objects[GID_OPTS_SEARCH_PROV],(ULONG *)&tmp_node);
2017 if(tmp_node != NULL) {
2018 GetChooserNodeAttrs(tmp_node, CNA_Text, (ULONG *)&data, TAG_DONE);
2019 nsoption_set_charp(search_web_provider, (char *)data);
2020 }
2021#else
2022 GetAttr(CHOOSER_Selected, gow->objects[GID_OPTS_SEARCH_PROV],(ULONG *)&gow->websearch_idx);
2023 /* TODO: convert back to string, only required OS<3.2 */
2024#endif
2025
2026 search_web_select_provider(nsoption_charp(search_web_provider));
2027
2028 GetAttr(GA_Selected,gow->objects[GID_OPTS_CLIPBOARD],(ULONG *)&data);
2029 if (data) {
2030 nsoption_set_bool(clipboard_write_utf8, true);
2031 } else {
2032 nsoption_set_bool(clipboard_write_utf8, false);
2033 }
2034
2035 GetAttr(GA_Selected,gow->objects[GID_OPTS_SELECTMENU],(ULONG *)&data);
2036 if (data) {
2037 nsoption_set_bool(core_select_menu, false);
2038 } else {
2039 nsoption_set_bool(core_select_menu, true);
2040 }
2041
2042 GetAttr(GA_Selected,gow->objects[GID_OPTS_STARTUP_NO_WIN],(ULONG *)&data);
2043 if (data) {
2044 nsoption_set_bool(startup_no_window, true);
2045 } else {
2046 nsoption_set_bool(startup_no_window, false);
2047 }
2048
2049 GetAttr(GA_Selected,gow->objects[GID_OPTS_CLOSE_NO_QUIT],(ULONG *)&data);
2050 if (data) {
2051 nsoption_set_bool(close_no_quit, true);
2052 } else {
2053 nsoption_set_bool(close_no_quit, false);
2054 }
2055
2056 GetAttr(GA_Selected,gow->objects[GID_OPTS_DOCKY],(ULONG *)&data);
2057 if (data) {
2058 nsoption_set_bool(hide_docky_icon, false);
2059 } else {
2060 nsoption_set_bool(hide_docky_icon, true);
2061 }
2062
2063#ifdef WITH_PDF_EXPORT
2064 GetAttr(INTEGER_Number,gow->objects[GID_OPTS_MARGIN_TOP],(ULONG *)&nsoption_int(margin_top));
2065
2066 GetAttr(INTEGER_Number,gow->objects[GID_OPTS_MARGIN_LEFT],(ULONG *)&nsoption_int(margin_left));
2067
2068 GetAttr(INTEGER_Number,gow->objects[GID_OPTS_MARGIN_BOTTOM],(ULONG *)&nsoption_int(margin_bottom));
2069
2070 GetAttr(INTEGER_Number,gow->objects[GID_OPTS_MARGIN_RIGHT],(ULONG *)&nsoption_int(margin_right));
2071
2072 GetAttr(INTEGER_Number,gow->objects[GID_OPTS_EXPORT_SCALE],(ULONG *)&nsoption_int(export_scale));
2073
2074 GetAttr(GA_Selected,gow->objects[GID_OPTS_EXPORT_NOIMAGES],(ULONG *)&data);
2075 if (data) {
2076 nsoption_set_bool(suppress_images, true);
2077 } else {
2078 nsoption_set_bool(suppress_images, false);
2079 }
2080
2081 GetAttr(GA_Selected,gow->objects[GID_OPTS_EXPORT_NOBKG],(ULONG *)&data);
2082 if (data) {
2083 nsoption_set_bool(remove_backgrounds, true);
2084 } else {
2085 nsoption_set_bool(remove_backgrounds, false);
2086 }
2087
2088 GetAttr(GA_Selected,gow->objects[GID_OPTS_EXPORT_LOOSEN],(ULONG *)&data);
2089 if (data) {
2090 nsoption_set_bool(enable_loosening, true);
2091 } else {
2092 nsoption_set_bool(enable_loosening, false);
2093 }
2094
2095 GetAttr(GA_Selected,gow->objects[GID_OPTS_EXPORT_COMPRESS],(ULONG *)&data);
2096 if (data) {
2097 nsoption_set_bool(enable_PDF_compression, true);
2098 } else {
2099 nsoption_set_bool(enable_PDF_compression, false);
2100 }
2101
2102 GetAttr(GA_Selected,gow->objects[GID_OPTS_EXPORT_PASSWORD],(ULONG *)&data);
2103 if (data) {
2104 nsoption_set_bool(enable_PDF_password, true);
2105 } else {
2106 nsoption_set_bool(enable_PDF_password, false);
2107 }
2108#endif
2109
2110 if(rescan_fonts == true) {
2112 ami_font_initscanner(true, false);
2113 }
2114
2115 if(save == true) {
2117 ami_font_savescanner(); /* just in case it has changed and been used only */
2118 }
2119
2122}
2123
2124static void ami_gui_opts_close(void *w)
2125{
2126 DisposeObject(gow->objects[OID_MAIN]);
2129 gow = NULL;
2130}
2131
2132static BOOL ami_gui_opts_event(void *w)
2133{
2134 /* return TRUE if window destroyed */
2135 ULONG result,data = 0;
2136 uint16 code;
2137 STRPTR text;
2138
2139 while((result = RA_HandleInput(gow->objects[OID_MAIN],&code)) != WMHI_LASTMSG)
2140 {
2141 switch(result & WMHI_CLASSMASK) // class
2142 {
2143 case WMHI_CLOSEWINDOW:
2145 return TRUE;
2146 break;
2147
2148 case WMHI_GADGETHELP:
2149#ifdef __amigaos4__
2150 /* FIXME: this is firing on OS3.2 without HELP being pressed */
2151 if((result & WMHI_GADGETMASK) == 0) {
2152 /* Pointer not over our window */
2154 } else {
2155 /* TODO: Make this sensitive to the tab the user is currently on */
2157 }
2158#endif
2159 break;
2160
2161 case WMHI_GADGETUP:
2162 switch(result & WMHI_GADGETMASK)
2163 {
2164 case GID_OPTS_SAVE:
2165 ami_gui_opts_use(true);
2167 return TRUE;
2168 break;
2169
2170 case GID_OPTS_USE:
2171 ami_gui_opts_use(false);
2172 // fall through
2173
2174 case GID_OPTS_CANCEL:
2176 return TRUE;
2177 break;
2178
2181 gow->win,NULL,STRINGA_TextVal,NETSURF_HOMEPAGE,
2182 TAG_DONE);
2183 break;
2184
2187 gow->win, NULL, STRINGA_TextVal,
2189 break;
2190
2193 gow->win, NULL, STRINGA_TextVal,
2194 "about:blank", TAG_DONE);
2195 break;
2196
2199 gow->win, NULL, GA_Disabled, code, TAG_DONE);
2200
2201 if(code && (text = ami_locale_langs(NULL)))
2202 {
2204 gow->win, NULL, STRINGA_TextVal, text, TAG_DONE);
2205 FreeVec(text);
2206 }
2207 break;
2208
2209 case GID_OPTS_SCREEN:
2210 GetAttr(RADIOBUTTON_Selected,gow->objects[GID_OPTS_SCREEN],(ULONG *)&data);
2211 switch(data)
2212 {
2213 case 0:
2215 gow->win,NULL, GA_Disabled, FALSE, TAG_DONE);
2217 gow->win,NULL, GA_Disabled, TRUE, TAG_DONE);
2218 break;
2219
2220 case 1:
2222 gow->win,NULL, GA_Disabled, TRUE, TAG_DONE);
2224 gow->win,NULL, GA_Disabled, TRUE, TAG_DONE);
2225 break;
2226
2227 case 2:
2229 gow->win,NULL, GA_Disabled, TRUE, TAG_DONE);
2231 gow->win,NULL, GA_Disabled, FALSE, TAG_DONE);
2232 break;
2233 }
2234 break;
2235
2238 GSM_REQUEST,gow->win);
2239 break;
2240
2241 case GID_OPTS_THEME:
2243 GFILE_REQUEST,gow->win);
2244 break;
2245
2246 case GID_OPTS_PROXY:
2247 GetAttr(CHOOSER_Selected,gow->objects[GID_OPTS_PROXY],(ULONG *)&data);
2248 switch(data)
2249 {
2250 case 0:
2252 gow->win,NULL, GA_Disabled, TRUE, TAG_DONE);
2254 gow->win,NULL, GA_Disabled, TRUE, TAG_DONE);
2255
2257 gow->win,NULL, GA_Disabled, TRUE, TAG_DONE);
2259 gow->win,NULL, GA_Disabled, TRUE, TAG_DONE);
2261 gow->win,NULL, GA_Disabled, TRUE, TAG_DONE);
2262 break;
2263 case 1:
2265 gow->win,NULL, GA_Disabled, FALSE, TAG_DONE);
2267 gow->win,NULL, GA_Disabled, FALSE, TAG_DONE);
2268
2270 gow->win,NULL, GA_Disabled, TRUE, TAG_DONE);
2272 gow->win,NULL, GA_Disabled, TRUE, TAG_DONE);
2274 gow->win,NULL, GA_Disabled, FALSE, TAG_DONE);
2275 break;
2276
2277 case 2:
2278 case 3:
2280 gow->win,NULL, GA_Disabled, FALSE, TAG_DONE);
2282 gow->win,NULL, GA_Disabled, FALSE, TAG_DONE);
2283
2285 gow->win,NULL, GA_Disabled, FALSE, TAG_DONE);
2287 gow->win,NULL, GA_Disabled, FALSE, TAG_DONE);
2289 gow->win,NULL, GA_Disabled, FALSE, TAG_DONE);
2290 break;
2291 }
2292 break;
2293
2295 break;
2296
2297 case GID_OPTS_FONT_SANS:
2299 GFONT_REQUEST,gow->win);
2300 break;
2301
2304 GFONT_REQUEST,gow->win);
2305 break;
2306
2307 case GID_OPTS_FONT_MONO:
2309 GFONT_REQUEST,gow->win);
2310 break;
2311
2314 GFONT_REQUEST,gow->win);
2315 break;
2316
2319 GFONT_REQUEST,gow->win);
2320 break;
2321#ifndef __amigaos4__
2324 gow->win, NULL, GA_Disabled, code, TAG_DONE);
2325 break;
2326#endif
2327 case GID_OPTS_DLDIR:
2329 GFILE_REQUEST,gow->win);
2330 break;
2331 }
2332 break;
2333 }
2334 }
2335 return FALSE;
2336}
2337
2338struct List *ami_gui_opts_websearch(int *idx)
2339{
2340 struct List *list;
2341 struct Node *node;
2342 const char *name;
2343 int iter;
2344 int i = 0;
2345
2346 list = malloc(sizeof(struct List));
2347 NewList(list);
2348
2349 if (nsoption_charp(search_engines_file) == NULL) return list;
2350
2351 for (iter = search_web_iterate_providers(0, &name);
2352 iter != -1;
2353 iter = search_web_iterate_providers(iter, &name)) {
2354 node = AllocChooserNode(CNA_Text, name, TAG_DONE);
2355 AddTail(list, node);
2356 if(idx != NULL) {
2357 if((nsoption_charp(search_web_provider)) && (strcmp(name, nsoption_charp(search_web_provider)) == 0)) {
2358 *idx = i;
2359 }
2360 }
2361 i++;
2362 }
2363
2364 return list;
2365}
2366
2367void ami_gui_opts_websearch_free(struct List *websearchlist)
2368{
2369 struct Node *node;
2370 struct Node *nnode;
2371
2372 if(websearchlist == NULL) return;
2373 if(IsListEmpty(websearchlist)) return;
2374 node = GetHead(websearchlist);
2375
2376 do {
2377 nnode = GetSucc(node);
2378 Remove(node);
2379 FreeChooserNode(node);
2380 } while((node = nnode));
2381
2382 free(websearchlist);
2383}
2384
struct Screen * ami_gui_get_screen(void)
Get a pointer to the screen NetSurf is running on.
Definition: gui.c:404
nserror ami_gui_win_list_add(void *win, int type, const struct ami_win_event_table *table)
Add a window to the NetSurf window list (to enable event processing)
Definition: gui.c:4675
struct gui_window * ami_gui_get_active_gw(void)
Get a pointer to the gui_window which NetSurf considers to be the current/active one.
Definition: gui.c:399
STRPTR ami_gui_get_screen_title(void)
Get the string for NetSurf's screen titlebar.
Definition: gui.c:975
STRPTR ami_locale_langs(int *codeset)
Definition: gui.c:703
void ami_gui_win_list_remove(void *win)
Remove a window from the NetSurf window list.
Definition: gui.c:4689
struct browser_window * ami_gui_get_browser_window(struct gui_window *gw)
Get browser window from gui_window.
Definition: gui.c:420
void ami_gui_tabs_toggle_all(void)
Definition: gui.c:4303
struct MsgPort * ami_gui_get_shared_msgport(void)
Get shared message port.
void ami_help_open(ULONG node, struct Screen *screen)
Definition: help.c:50
@ AMI_HELP_PREFS
Definition: help.h:27
@ AMI_HELP_MAIN
Definition: help.h:25
bool ami_plot_screen_is_palettemapped(void)
Definition: plotters.c:610
void ami_update_pointer(struct Window *win, gui_pointer_shape shape)
Definition: theme.c:221
STATIC char result[100]
Definition: arexx.c:77
Browser window creation and manipulation interface.
struct nsurl * browser_window_access_url(const struct browser_window *bw)
Access a browser window's URL.
nserror search_web_select_provider(const char *selection)
Change the currently selected web search provider.
Definition: searchweb.c:397
ssize_t search_web_iterate_providers(ssize_t iter, const char **name)
Iterate the search providers, returning their names.
Definition: searchweb.c:506
const char * type
Definition: filetype.cpp:44
void ami_font_finiscanner(void)
Definition: font_bullet.c:912
void ami_font_initscanner(bool force, bool save)
Definition: font_bullet.c:907
void ami_font_savescanner(void)
Definition: font_bullet.c:917
void ami_file_req_free(void)
Definition: file.c:300
void ami_file_req_init(void)
Definition: file.c:281
void ami_font_init(void)
Definition: font.c:113
void ami_font_setdevicedpi(int id)
Definition: font.c:48
void ami_font_fini(void)
Definition: font.c:122
nserror ami_nsoption_write(void)
Definition: nsoption.c:34
@ AMINS_GUIOPTSWINDOW
Definition: object.h:34
void ami_utf8_free(char *ptr)
Definition: utf8.c:104
char * ami_to_utf8_easy(const char *string)
Definition: utf8.c:119
char * ami_utf8_easy(const char *string)
Definition: utf8.c:109
static char * download_dir
Current download directory.
Definition: download.c:144
void ami_gui_menu_set_check_toggled(void)
Sets that an item linked to a toggle menu item has been changed.
Definition: gui_menu.c:808
void ami_gui_menu_set_checked(struct Menu *menu, int item, bool check)
Set checked state of a menu item almost generic, but not quite.
Definition: gui_menu.c:644
@ M_JS
Definition: gui_menu.h:80
@ M_CSS
Definition: gui_menu.h:81
@ GID_OPTS_HOMEPAGE
Definition: gui_options.c:88
@ GID_OPTS_FROMLOCALE
Definition: gui_options.c:94
@ GID_OPTS_DOCKY
Definition: gui_options.c:150
@ GID_OPTS_FONT_CURSIVE
Definition: gui_options.c:128
@ GID_OPTS_CONTENTLANG
Definition: gui_options.c:93
@ GID_OPTS_FONT_FANTASY
Definition: gui_options.c:129
@ GID_OPTS_PROXY_BYPASS
Definition: gui_options.c:116
@ GID_OPTS_MARGIN_BOTTOM
Definition: gui_options.c:153
@ GID_OPTS_SCREENNAME
Definition: gui_options.c:103
@ GID_OPTS_HISTORY
Definition: gui_options.c:95
@ GID_OPTS_NOTIFY
Definition: gui_options.c:138
@ GID_OPTS_SELECTMENU
Definition: gui_options.c:147
@ GID_OPTS_TAB_ALWAYS
Definition: gui_options.c:143
@ GID_OPTS_OVERWRITE
Definition: gui_options.c:137
@ GID_OPTS_SCREENMODE
Definition: gui_options.c:102
@ GID_OPTS_TAB_CLOSE
Definition: gui_options.c:144
@ GID_OPTS_MARGIN_TOP
Definition: gui_options.c:151
@ GID_OPTS_FONT_MINSIZE
Definition: gui_options.c:132
@ GID_OPTS_PROXY
Definition: gui_options.c:111
@ GID_OPTS_STARTUP_NO_WIN
Definition: gui_options.c:148
@ GID_OPTS_FONT_SANS
Definition: gui_options.c:125
@ OID_MAIN
Definition: gui_options.c:86
@ GID_OPTS_PTROS
Definition: gui_options.c:110
@ GID_OPTS_PROXY_PORT
Definition: gui_options.c:113
@ GID_OPTS_FETCHHOST
Definition: gui_options.c:118
@ GID_OPTS_FETCHCACHE
Definition: gui_options.c:119
@ GID_OPTS_THEMEPAGE
Definition: gui_options.c:106
@ GID_OPTS_FONT_ANTIALIASING
Definition: gui_options.c:133
@ GID_OPTS_LIGHT
Definition: gui_options.c:108
@ GID_OPTS_HOMEPAGE_CURRENT
Definition: gui_options.c:90
@ GID_OPTS_FETCHMAX
Definition: gui_options.c:117
@ GID_OPTS_DLDIR
Definition: gui_options.c:139
@ GID_OPTS_NATIVEBM
Definition: gui_options.c:120
@ GID_OPTS_SEARCH_PROV
Definition: gui_options.c:145
@ GID_OPTS_EXPORT_LOOSEN
Definition: gui_options.c:158
@ GID_OPTS_DPI_Y
Definition: gui_options.c:124
@ GID_OPTS_MARGIN_LEFT
Definition: gui_options.c:152
@ GID_OPTS_REFERRAL
Definition: gui_options.c:98
@ GID_OPTS_HIDEADS
Definition: gui_options.c:92
@ GID_OPTS_HOMEPAGE_DEFAULT
Definition: gui_options.c:89
@ GID_OPTS_EXPORT_PASSWORD
Definition: gui_options.c:160
@ GID_OPTS_FONT_DEFAULT
Definition: gui_options.c:130
@ GID_OPTS_TAB_2
Definition: gui_options.c:141
@ GID_OPTS_DITHERQ
Definition: gui_options.c:122
@ GID_OPTS_SCALEQ
Definition: gui_options.c:121
@ GID_OPTS_JAVASCRIPT
Definition: gui_options.c:96
@ GID_OPTS_EXPORT_NOIMAGES
Definition: gui_options.c:156
@ GID_OPTS_SAVE
Definition: gui_options.c:161
@ GID_OPTS_ENABLECSS
Definition: gui_options.c:97
@ GID_OPTS_FONT_SERIF
Definition: gui_options.c:126
@ GID_OPTS_TAB_ACTIVE
Definition: gui_options.c:140
@ GID_OPTS_CLIPBOARD
Definition: gui_options.c:146
@ GID_OPTS_ANIMDISABLE
Definition: gui_options.c:123
@ GID_OPTS_EXPORT_SCALE
Definition: gui_options.c:155
@ GID_OPTS_EXPORT_COMPRESS
Definition: gui_options.c:159
@ GID_OPTS_DARK
Definition: gui_options.c:107
@ GID_OPTS_EXPORT_NOBKG
Definition: gui_options.c:157
@ GID_OPTS_TAB_LAST
Definition: gui_options.c:142
@ GID_OPTS_FONT_BITMAP
Definition: gui_options.c:134
@ GID_OPTS_SCREEN
Definition: gui_options.c:101
@ GID_OPTS_PROXY_HOST
Definition: gui_options.c:112
@ GID_OPTS_CACHE_MEM
Definition: gui_options.c:135
@ GID_OPTS_USE
Definition: gui_options.c:162
@ GID_OPTS_CANCEL
Definition: gui_options.c:163
@ GID_OPTS_CACHE_DISC
Definition: gui_options.c:136
@ GID_OPTS_WIN_SIMPLE
Definition: gui_options.c:104
@ GID_OPTS_DONOTTRACK
Definition: gui_options.c:99
@ GID_OPTS_PTRTRUE
Definition: gui_options.c:109
@ GID_OPTS_FASTSCROLL
Definition: gui_options.c:100
@ GID_OPTS_MAIN
Definition: gui_options.c:87
@ GID_OPTS_THEME
Definition: gui_options.c:105
@ GID_OPTS_CLOSE_NO_QUIT
Definition: gui_options.c:149
@ GID_OPTS_FONT_SIZE
Definition: gui_options.c:131
@ GID_OPTS_PROXY_PASS
Definition: gui_options.c:115
@ GID_OPTS_HOMEPAGE_BLANK
Definition: gui_options.c:91
@ GID_OPTS_PROXY_USER
Definition: gui_options.c:114
@ GID_OPTS_FONT_MONO
Definition: gui_options.c:127
@ GID_OPTS_MARGIN_RIGHT
Definition: gui_options.c:154
@ GID_OPTS_LAST
Definition: gui_options.c:164
static CONST_STRPTR ditheropts[OPTS_MAX_DITHER]
Definition: gui_options.c:259
@ GRP_OPTS_IMAGES
Definition: gui_options.c:182
@ GRP_OPTS_SCRIPTING
Definition: gui_options.c:173
@ GRP_OPTS_SCALING
Definition: gui_options.c:195
@ GRP_OPTS_FETCHING
Definition: gui_options.c:181
@ GRP_OPTS_LAST
Definition: gui_options.c:198
@ GRP_OPTS_SEARCH
Definition: gui_options.c:191
@ GRP_OPTS_TABS
Definition: gui_options.c:190
@ GRP_OPTS_MARGINS
Definition: gui_options.c:194
@ GRP_OPTS_MEMCACHE
Definition: gui_options.c:187
@ GRP_OPTS_THEME
Definition: gui_options.c:178
@ GRP_OPTS_DPI
Definition: gui_options.c:184
@ GRP_OPTS_APPEARANCE
Definition: gui_options.c:196
@ GRP_OPTS_BEHAVIOUR
Definition: gui_options.c:193
@ GRP_OPTS_PROXY
Definition: gui_options.c:180
@ GRP_OPTS_WINDOW
Definition: gui_options.c:177
@ GRP_OPTS_CLIPBOARD
Definition: gui_options.c:192
@ GRP_OPTS_ADVANCED
Definition: gui_options.c:197
@ GRP_OPTS_MOUSE
Definition: gui_options.c:179
@ GRP_OPTS_CONTENTBLOCKING
Definition: gui_options.c:170
@ GRP_OPTS_SCREEN
Definition: gui_options.c:176
@ GRP_OPTS_DISCCACHE
Definition: gui_options.c:188
@ GRP_OPTS_PRIVACY
Definition: gui_options.c:174
@ GRP_OPTS_CONTENTLANGUAGE
Definition: gui_options.c:171
@ GRP_OPTS_HISTORY
Definition: gui_options.c:172
@ GRP_OPTS_FONTFACES
Definition: gui_options.c:185
@ GRP_OPTS_DOWNLOADS
Definition: gui_options.c:189
@ GRP_OPTS_ANIMS
Definition: gui_options.c:183
@ GRP_OPTS_FONTSIZE
Definition: gui_options.c:186
@ GRP_OPTS_HOMEPAGE
Definition: gui_options.c:169
@ GRP_OPTS_MISC
Definition: gui_options.c:175
#define OPTS_MAX_DITHER
Definition: gui_options.c:220
#define OPTS_LAST
Definition: gui_options.c:214
static CONST_STRPTR proxyopts[OPTS_MAX_PROXY]
Definition: gui_options.c:257
static void ami_gui_opts_array_to_list(struct List *list, const char *array[], int type)
Definition: gui_options.c:265
static CONST_STRPTR tabs[OPTS_MAX_TABS]
Definition: gui_options.c:254
static void ami_gui_opts_close(void *w)
Definition: gui_options.c:2124
#define OPTS_MAX_THEMEPAGE
Definition: gui_options.c:217
static STRPTR screenopts[OPTS_MAX_SCREEN]
Definition: gui_options.c:255
static struct ami_gui_opts_window * gow
Definition: gui_options.c:252
static void ami_gui_opts_free(struct ami_gui_opts_window *gow)
Definition: gui_options.c:495
#define OPTS_MAX_TABS
Definition: gui_options.c:215
void ami_gui_opts_websearch_free(struct List *websearchlist)
Definition: gui_options.c:2367
static void ami_gui_opts_use(bool save)
Definition: gui_options.c:1701
#define OPTS_MAX_SCREEN
Definition: gui_options.c:216
static BOOL ami_gui_opts_event(void *w)
Definition: gui_options.c:2132
static void ami_gui_opts_setup(struct ami_gui_opts_window *gow)
Definition: gui_options.c:322
static CONST_STRPTR nativebmopts[OPTS_MAX_NATIVEBM]
Definition: gui_options.c:258
@ NSA_LIST_CLICKTAB
Definition: gui_options.c:223
@ NSA_LIST_CHOOSER
Definition: gui_options.c:224
@ NSA_LIST_RADIO
Definition: gui_options.c:225
static CONST_STRPTR pagethemeopts[OPTS_MAX_THEMEPAGE]
Definition: gui_options.c:256
@ LAB_OPTS_WINTITLE
Definition: gui_options.c:203
@ LAB_OPTS_MM
Definition: gui_options.c:209
@ LAB_OPTS_DAYS
Definition: gui_options.c:205
@ LAB_OPTS_SECS
Definition: gui_options.c:206
@ LAB_OPTS_RESTART
Definition: gui_options.c:204
@ LAB_OPTS_DPI
Definition: gui_options.c:210
@ LAB_OPTS_LAST
Definition: gui_options.c:211
@ LAB_OPTS_PT
Definition: gui_options.c:207
@ LAB_OPTS_MB
Definition: gui_options.c:208
static const struct ami_win_event_table ami_guiopts_table
Definition: gui_options.c:247
static CONST_STRPTR gadlab[OPTS_LAST]
Definition: gui_options.c:261
static void ami_gui_opts_free_list(struct List *list, int type)
Definition: gui_options.c:292
static struct List * websearch_list
Definition: gui_options.c:262
#define OPTS_MAX_NATIVEBM
Definition: gui_options.c:219
struct List * ami_gui_opts_websearch(int *idx)
Definition: gui_options.c:2338
static CONST_STRPTR fontopts[6]
Definition: gui_options.c:260
void ami_gui_opts_open(void)
Definition: gui_options.c:527
#define OPTS_MAX_PROXY
Definition: gui_options.c:218
@ GUI_POINTER_WAIT
Definition: mouse.h:127
@ GUI_POINTER_DEFAULT
Definition: mouse.h:113
Interface to platform-specific graphical user interface window operations.
#define LayoutHObj
Definition: libs.h:64
#define CheckBoxObj
Definition: libs.h:55
#define IntegerObj
Definition: libs.h:62
#define PageObj
Definition: libs.h:70
#define GetFileObj
Definition: libs.h:59
#define LabelObj
Definition: libs.h:63
#define WindowObj
Definition: libs.h:77
#define GetFontObj
Definition: libs.h:60
#define ChooserObj
Definition: libs.h:56
#define LayoutVObj
Definition: libs.h:65
#define GetScreenModeObj
Definition: libs.h:61
#define ButtonObj
Definition: libs.h:54
#define RadioButtonObj
Definition: libs.h:72
#define StringObj
Definition: libs.h:76
#define ClickTabObj
Definition: libs.h:57
const char * messages_get(const char *key)
Fast lookup of a message by key from the standard Messages hash.
Definition: messages.c:241
Localised message support (interface).
NetSurf URL handling (interface).
const char * nsurl_access(const nsurl *url)
Access a NetSurf URL object as a string.
char * ASPrintf(const char *fmt,...)
Definition: os3support.c:139
struct Node * GetHead(struct List *list)
Definition: os3support.c:364
ULONG RefreshSetGadgetAttrs(struct Gadget *g, struct Window *w, struct Requester *r, Tag tag1,...)
Definition: os3support.c:429
struct Node * GetSucc(struct Node *node)
Definition: os3support.c:381
#define GetFileEnd
Definition: os3support.h:134
#define LIB_IS_AT_LEAST(B, V, R)
Definition: os3support.h:55
#define GetFontEnd
Definition: os3support.h:135
#define IDoMethod
Definition: os3support.h:169
#define GETFONT_OTagOnly
Definition: os3support.h:73
#define GETFONT_ScalableOnly
Definition: os3support.h:74
uint16_t uint16
Definition: os3support.h:182
#define GetScreenModeEnd
Definition: os3support.h:136
@ PLOT_FONT_FAMILY_SANS_SERIF
Definition: plot_style.h:89
core web search facilities interface.
BOOL ami_selectmenu_is_safe()
Opens popupmenu.library to check the version.
Definition: selectmenu.c:194
Interface to utility string handling.
Object * objects[GID_OPTS_LAST]
Definition: gui_options.c:231
struct List proxyoptslist
Definition: gui_options.c:236
struct List nativebmoptslist
Definition: gui_options.c:237
struct List pagethemeoptslist
Definition: gui_options.c:235
struct Window * win
Definition: gui_options.c:230
struct List clicktablist
Definition: gui_options.c:233
struct List ditheroptslist
Definition: gui_options.c:238
struct ami_generic_window w
Definition: gui_options.c:229
struct List fontoptslist
Definition: gui_options.c:239
struct List screenoptslist
Definition: gui_options.c:234
Definition: theme.h:64
Option reading and saving interface.
#define nsoption_charp(OPTION)
Get the value of a string option.
Definition: nsoption.h:331
#define nsoption_int(OPTION)
Get the value of an integer option.
Definition: nsoption.h:313
#define nsoption_set_int(OPTION, VALUE)
set an integer option in the default table
Definition: nsoption.h:348
#define nsoption_set_bool(OPTION, VALUE)
set a boolean option in the default table
Definition: nsoption.h:344
#define nsoption_set_charp(OPTION, VALUE)
set string option in default table
Definition: nsoption.h:372
#define nsoption_uint(OPTION)
Get the value of an unsigned integer option.
Definition: nsoption.h:322
@ OPTION_HTTP_PROXY_AUTH_NONE
Definition: nsoption.h:86
@ OPTION_HTTP_PROXY_AUTH_NTLM
Definition: nsoption.h:88
@ OPTION_HTTP_PROXY_AUTH_BASIC
Definition: nsoption.h:87
#define nsoption_bool(OPTION)
Get the value of a boolean option.
Definition: nsoption.h:304
#define nsoption_set_uint(OPTION, VALUE)
set an unsigned integer option in the default table
Definition: nsoption.h:351
static nserror text(const struct redraw_context *ctx, const struct plot_font_style *fstyle, int x, int y, const char *text, size_t length)
Text plotting.
Definition: plot.c:978