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 char *label = NULL;
1708 bool rescan_fonts = false;
1709 bool old_tab_always_show;
1710
1712
1713 GetAttr(STRINGA_TextVal,gow->objects[GID_OPTS_HOMEPAGE],(ULONG *)&data);
1714 nsoption_set_charp(homepage_url, (char *)ami_to_utf8_easy((char *)data));
1715
1716 GetAttr(STRINGA_TextVal,gow->objects[GID_OPTS_CONTENTLANG],(ULONG *)&data);
1717 nsoption_set_charp(accept_language, (char *)strdup((char *)data));
1718
1719 GetAttr(GA_Selected, gow->objects[GID_OPTS_FROMLOCALE],(ULONG *)&data);
1720 if (data) {
1721 nsoption_set_bool(accept_lang_locale, true);
1722 } else {
1723 nsoption_set_bool(accept_lang_locale, false);
1724 }
1725
1726 GetAttr(GA_Selected,gow->objects[GID_OPTS_HIDEADS],(ULONG *)&data);
1727 if (data) {
1728 nsoption_set_bool(block_advertisements, true);
1729 } else {
1730 nsoption_set_bool(block_advertisements, false);
1731 }
1732
1733 GetAttr(INTEGER_Number,gow->objects[GID_OPTS_HISTORY],(ULONG *)&nsoption_int(expire_url));
1734
1735 GetAttr(GA_Selected,gow->objects[GID_OPTS_REFERRAL],(ULONG *)&data);
1736 if (data) {
1737 nsoption_set_bool(send_referer, true);
1738 } else {
1739 nsoption_set_bool(send_referer, false);
1740 }
1741
1742 GetAttr(GA_Selected,gow->objects[GID_OPTS_JAVASCRIPT],(ULONG *)&data);
1743 if (data) {
1744 nsoption_set_bool(enable_javascript, true);
1745 } else {
1746 nsoption_set_bool(enable_javascript, false);
1747 }
1748
1749 ami_gui_menu_set_checked(NULL, M_JS, nsoption_bool(enable_javascript));
1750
1751 GetAttr(GA_Selected,gow->objects[GID_OPTS_DONOTTRACK],(ULONG *)&data);
1752 if (data) {
1753 nsoption_set_bool(do_not_track, true);
1754 } else {
1755 nsoption_set_bool(do_not_track, false);
1756 }
1757
1758 GetAttr(GA_Selected,gow->objects[GID_OPTS_ENABLECSS],(ULONG *)&data);
1759 if (data) {
1760 nsoption_set_bool(author_level_css, true);
1761 } else {
1762 nsoption_set_bool(author_level_css, false);
1763 }
1764
1765 ami_gui_menu_set_checked(NULL, M_CSS, nsoption_bool(author_level_css));
1766
1767 GetAttr(GA_Selected,gow->objects[GID_OPTS_FASTSCROLL],(ULONG *)&data);
1768 if (data) {
1769 nsoption_set_bool(faster_scroll, true);
1770 } else {
1771 nsoption_set_bool(faster_scroll, false);
1772 }
1773
1774 GetAttr(RADIOBUTTON_Selected,gow->objects[GID_OPTS_SCREEN],(ULONG *)&data);
1775 switch(data)
1776 {
1777 case 0:
1778 nsoption_set_charp(pubscreen_name, NULL);
1779 break;
1780
1781 case 1:
1782 nsoption_set_charp(pubscreen_name, (char *)strdup("Workbench"));
1783 break;
1784
1785 case 2:
1786 GetAttr(STRINGA_TextVal,gow->objects[GID_OPTS_SCREENNAME],(ULONG *)&data);
1787 nsoption_set_charp(pubscreen_name, (char *)strdup((char *)data));
1788 break;
1789 }
1790
1791 GetAttr(GETSCREENMODE_DisplayID, gow->objects[GID_OPTS_SCREENMODE], (ULONG *)&id);
1792 if(id)
1793 {
1794 char *modeid = malloc(20);
1795 sprintf(modeid,"0x%lx", id);
1796 nsoption_set_charp(screen_modeid, modeid);
1797 }
1798
1799 GetAttr(GA_Selected,gow->objects[GID_OPTS_WIN_SIMPLE],(ULONG *)&data);
1800 if ((data == TRUE) && (nsoption_bool(window_simple_refresh) == false)) {
1801 nsoption_set_bool(window_simple_refresh, true);
1802 nsoption_set_int(screen_compositing, 0);
1803 } else if ((data == FALSE) && (nsoption_bool(window_simple_refresh) == true)) {
1804 nsoption_set_bool(window_simple_refresh, false);
1805 nsoption_set_int(screen_compositing, -1);
1806 }
1807
1808 GetAttr(GETFILE_Drawer,gow->objects[GID_OPTS_THEME],(ULONG *)&data);
1809 nsoption_set_charp(theme, (char *)strdup((char *)data));
1810
1811 GetAttr(CHOOSER_Selected,gow->objects[GID_OPTS_THEMEPAGE],(ULONG *)&data);
1812 if(data) {
1813 nsoption_set_bool(prefer_dark_mode, true);
1814 } else {
1815 nsoption_set_bool(prefer_dark_mode, false);
1816 }
1817
1818 GetAttr(GA_Selected,gow->objects[GID_OPTS_PTRTRUE],(ULONG *)&data);
1819 if (data) {
1820 nsoption_set_bool(truecolour_mouse_pointers, true);
1821 } else {
1822 nsoption_set_bool(truecolour_mouse_pointers, false);
1823 }
1824
1825 GetAttr(GA_Selected,gow->objects[GID_OPTS_PTROS],(ULONG *)&data);
1826 if (data) {
1827 nsoption_set_bool(os_mouse_pointers, true);
1828 } else {
1829 nsoption_set_bool(os_mouse_pointers, false);
1830 }
1831
1832 GetAttr(CHOOSER_Selected,gow->objects[GID_OPTS_PROXY],(ULONG *)&data);
1833 if(data)
1834 {
1835 nsoption_set_bool(http_proxy, true);
1836 nsoption_set_int(http_proxy_auth, data - 1);
1837 }
1838 else
1839 {
1840 nsoption_set_bool(http_proxy, false);
1841 }
1842
1843 GetAttr(STRINGA_TextVal,gow->objects[GID_OPTS_PROXY_HOST],(ULONG *)&data);
1844 nsoption_set_charp(http_proxy_host, (char *)strdup((char *)data));
1845
1846 GetAttr(INTEGER_Number,gow->objects[GID_OPTS_PROXY_PORT],(ULONG *)&nsoption_int(http_proxy_port));
1847
1848 GetAttr(STRINGA_TextVal,gow->objects[GID_OPTS_PROXY_USER],(ULONG *)&data);
1849 nsoption_set_charp(http_proxy_auth_user, (char *)strdup((char *)data));
1850
1851 GetAttr(STRINGA_TextVal,gow->objects[GID_OPTS_PROXY_PASS],(ULONG *)&data);
1852 nsoption_set_charp(http_proxy_auth_pass, (char *)strdup((char *)data));
1853
1854 GetAttr(STRINGA_TextVal,gow->objects[GID_OPTS_PROXY_BYPASS],(ULONG *)&data);
1855 nsoption_set_charp(http_proxy_noproxy, (char *)strdup((char *)data));
1856
1857 GetAttr(INTEGER_Number,gow->objects[GID_OPTS_FETCHMAX],(ULONG *)&nsoption_int(max_fetchers));
1858 GetAttr(INTEGER_Number,gow->objects[GID_OPTS_FETCHHOST],(ULONG *)&nsoption_int(max_fetchers_per_host));
1859 GetAttr(INTEGER_Number,gow->objects[GID_OPTS_FETCHCACHE],(ULONG *)&nsoption_int(max_cached_fetch_handles));
1860
1861 GetAttr(CHOOSER_Selected,gow->objects[GID_OPTS_NATIVEBM],(ULONG *)&nsoption_int(cache_bitmaps));
1862
1863 GetAttr(GA_Selected,gow->objects[GID_OPTS_SCALEQ],(ULONG *)&data);
1864 if (data) {
1865 nsoption_set_bool(scale_quality, true);
1866 } else {
1867 nsoption_set_bool(scale_quality, false);
1868 }
1869
1870 GetAttr(CHOOSER_Selected,gow->objects[GID_OPTS_DITHERQ],(ULONG *)&nsoption_int(dither_quality));
1871
1872 GetAttr(GA_Selected,gow->objects[GID_OPTS_ANIMDISABLE],(ULONG *)&data);
1873 if(data) {
1874 nsoption_set_bool(animate_images, false);
1875 } else {
1876 nsoption_set_bool(animate_images, true);
1877 }
1878
1879 GetAttr(INTEGER_Number,gow->objects[GID_OPTS_DPI_Y],(ULONG *)&nsoption_int(screen_ydpi));
1880 ami_font_setdevicedpi(id); // id set above
1881
1882 GetAttr(GETFONT_TextAttr,gow->objects[GID_OPTS_FONT_SANS],(ULONG *)&data);
1883 tattr = (struct TextAttr *)data;
1884
1885 if((dot = strrchr(tattr->ta_Name,'.'))) *dot = '\0';
1886 nsoption_set_charp(font_sans, (char *)strdup((char *)tattr->ta_Name));
1887
1888 GetAttr(GETFONT_TextAttr,gow->objects[GID_OPTS_FONT_SERIF],(ULONG *)&data);
1889 tattr = (struct TextAttr *)data;
1890
1891 if((dot = strrchr(tattr->ta_Name,'.'))) *dot = '\0';
1892 nsoption_set_charp(font_serif, (char *)strdup((char *)tattr->ta_Name));
1893
1894 GetAttr(GETFONT_TextAttr,gow->objects[GID_OPTS_FONT_MONO],(ULONG *)&data);
1895 tattr = (struct TextAttr *)data;
1896
1897 if((dot = strrchr(tattr->ta_Name,'.'))) *dot = '\0';
1898 nsoption_set_charp(font_mono, (char *)strdup((char *)tattr->ta_Name));
1899
1900 GetAttr(GETFONT_TextAttr,gow->objects[GID_OPTS_FONT_CURSIVE],(ULONG *)&data);
1901 tattr = (struct TextAttr *)data;
1902
1903 if((dot = strrchr(tattr->ta_Name,'.'))) *dot = '\0';
1904 nsoption_set_charp(font_cursive, (char *)strdup((char *)tattr->ta_Name));
1905
1906 GetAttr(GETFONT_TextAttr,gow->objects[GID_OPTS_FONT_FANTASY],(ULONG *)&data);
1907 tattr = (struct TextAttr *)data;
1908
1909 if((dot = strrchr(tattr->ta_Name,'.'))) *dot = '\0';
1910 nsoption_set_charp(font_fantasy, (char *)strdup((char *)tattr->ta_Name));
1911
1912 GetAttr(CHOOSER_Selected,gow->objects[GID_OPTS_FONT_DEFAULT],(ULONG *)&nsoption_int(font_default));
1913 nsoption_set_int(font_default, nsoption_int(font_default) + PLOT_FONT_FAMILY_SANS_SERIF);
1914
1915 GetAttr(INTEGER_Number,gow->objects[GID_OPTS_FONT_SIZE],(ULONG *)&nsoption_int(font_size));
1916 nsoption_set_int(font_size, nsoption_int(font_size) * 10);
1917
1918 GetAttr(INTEGER_Number,gow->objects[GID_OPTS_FONT_MINSIZE],(ULONG *)&nsoption_int(font_min_size));
1919 nsoption_set_int(font_min_size, nsoption_int(font_min_size) * 10);
1920
1921 GetAttr(GA_Selected, gow->objects[GID_OPTS_FONT_ANTIALIASING], (ULONG *)&data);
1922 if(data) {
1923 nsoption_set_bool(font_antialiasing, true);
1924 } else {
1925 nsoption_set_bool(font_antialiasing, false);
1926 }
1927
1928#ifndef __amigaos4__
1929 GetAttr(GA_Selected, gow->objects[GID_OPTS_FONT_BITMAP], (ULONG *)&data);
1930 ami_font_fini();
1931
1932 if((nsoption_bool(bitmap_fonts) == true) && (data == false)) {
1933 nsoption_set_charp(font_sans, (char *)strdup("CGTriumvirate"));
1934 nsoption_set_charp(font_serif, (char *)strdup("CGTimes"));
1935 nsoption_set_charp(font_mono, (char *)strdup("LetterGothic"));
1936 nsoption_set_charp(font_cursive, (char *)strdup("CGTriumvirate"));
1937 nsoption_set_charp(font_fantasy, (char *)strdup("CGTimes"));
1938 }
1939
1940 if(data) {
1941 nsoption_set_bool(bitmap_fonts, true);
1942 } else {
1943 nsoption_set_bool(bitmap_fonts, false);
1944 }
1945 ami_font_init();
1946#endif
1947
1948 GetAttr(INTEGER_Number,gow->objects[GID_OPTS_CACHE_MEM],(ULONG *)&nsoption_int(memory_cache_size));
1949 nsoption_set_int(memory_cache_size, nsoption_int(memory_cache_size) * 1048576);
1950
1951 GetAttr(INTEGER_Number,gow->objects[GID_OPTS_CACHE_DISC],(ULONG *)&nsoption_uint(disc_cache_size));
1952 nsoption_set_uint(disc_cache_size, nsoption_uint(disc_cache_size) * 1048576);
1953
1954 GetAttr(GA_Selected,gow->objects[GID_OPTS_OVERWRITE],(ULONG *)&data);
1955 if (data) {
1956 nsoption_set_bool(ask_overwrite, true);
1957 } else {
1958 nsoption_set_bool(ask_overwrite, false);
1959 }
1960
1961 GetAttr(GA_Selected,gow->objects[GID_OPTS_NOTIFY],(ULONG *)&data);
1962 if (data) {
1963 nsoption_set_bool(download_notify, true);
1964 } else {
1965 nsoption_set_bool(download_notify, false);
1966 }
1967
1968 GetAttr(GETFILE_Drawer,gow->objects[GID_OPTS_DLDIR],(ULONG *)&data);
1969 if((nsoption_charp(download_dir) == NULL) ||
1970 (strcmp((char *)data, nsoption_charp(download_dir)) != 0)) {
1971 nsoption_set_charp(download_dir, (char *)strdup((char *)data));
1974 }
1975
1976 GetAttr(GA_Selected,gow->objects[GID_OPTS_TAB_ACTIVE],(ULONG *)&data);
1977 if (data) {
1978 nsoption_set_bool(new_tab_is_active, false);
1979 } else {
1980 nsoption_set_bool(new_tab_is_active, true);
1981 }
1982
1983 GetAttr(GA_Selected,gow->objects[GID_OPTS_TAB_LAST],(ULONG *)&data);
1984 if (data) {
1985 nsoption_set_bool(new_tab_last, true);
1986 } else {
1987 nsoption_set_bool(new_tab_last, false);
1988 }
1989
1990 GetAttr(GA_Selected,gow->objects[GID_OPTS_TAB_2],(ULONG *)&data);
1991 if (data) {
1992 nsoption_set_bool(button_2_tab, true);
1993 } else {
1994 nsoption_set_bool(button_2_tab, false);
1995 }
1996
1997 GetAttr(GA_Selected,gow->objects[GID_OPTS_TAB_CLOSE],(ULONG *)&data);
1998 if (data) {
1999 nsoption_set_bool(tab_close_warn, true);
2000 } else {
2001 nsoption_set_bool(tab_close_warn, false);
2002 }
2003
2004 GetAttr(GA_Selected,gow->objects[GID_OPTS_TAB_ALWAYS],(ULONG *)&data);
2005 old_tab_always_show = nsoption_bool(tab_always_show);
2006
2007 if (data) {
2008 nsoption_set_bool(tab_always_show, true);
2009 } else {
2010 nsoption_set_bool(tab_always_show, false);
2011 }
2012
2013 if(old_tab_always_show != nsoption_bool(tab_always_show))
2015
2016#ifdef __amigaos4__
2017 GetAttr(CHOOSER_SelectedNode, gow->objects[GID_OPTS_SEARCH_PROV],(ULONG *)&tmp_node);
2018 if(tmp_node != NULL) {
2019 GetChooserNodeAttrs(tmp_node, CNA_Text, (ULONG *)&label, TAG_DONE);
2020 nsoption_set_charp(search_web_provider, strdup((char *)label));
2021 }
2022#else
2023 GetAttr(CHOOSER_Selected, gow->objects[GID_OPTS_SEARCH_PROV],(ULONG *)&gow->websearch_idx);
2024 /* TODO: convert back to string, only required OS<3.2 */
2025#endif
2026
2027 search_web_select_provider(nsoption_charp(search_web_provider));
2028
2029 GetAttr(GA_Selected,gow->objects[GID_OPTS_CLIPBOARD],(ULONG *)&data);
2030 if (data) {
2031 nsoption_set_bool(clipboard_write_utf8, true);
2032 } else {
2033 nsoption_set_bool(clipboard_write_utf8, false);
2034 }
2035
2036 GetAttr(GA_Selected,gow->objects[GID_OPTS_SELECTMENU],(ULONG *)&data);
2037 if (data) {
2038 nsoption_set_bool(core_select_menu, false);
2039 } else {
2040 nsoption_set_bool(core_select_menu, true);
2041 }
2042
2043 GetAttr(GA_Selected,gow->objects[GID_OPTS_STARTUP_NO_WIN],(ULONG *)&data);
2044 if (data) {
2045 nsoption_set_bool(startup_no_window, true);
2046 } else {
2047 nsoption_set_bool(startup_no_window, false);
2048 }
2049
2050 GetAttr(GA_Selected,gow->objects[GID_OPTS_CLOSE_NO_QUIT],(ULONG *)&data);
2051 if (data) {
2052 nsoption_set_bool(close_no_quit, true);
2053 } else {
2054 nsoption_set_bool(close_no_quit, false);
2055 }
2056
2057 GetAttr(GA_Selected,gow->objects[GID_OPTS_DOCKY],(ULONG *)&data);
2058 if (data) {
2059 nsoption_set_bool(hide_docky_icon, false);
2060 } else {
2061 nsoption_set_bool(hide_docky_icon, true);
2062 }
2063
2064#ifdef WITH_PDF_EXPORT
2065 GetAttr(INTEGER_Number,gow->objects[GID_OPTS_MARGIN_TOP],(ULONG *)&nsoption_int(margin_top));
2066
2067 GetAttr(INTEGER_Number,gow->objects[GID_OPTS_MARGIN_LEFT],(ULONG *)&nsoption_int(margin_left));
2068
2069 GetAttr(INTEGER_Number,gow->objects[GID_OPTS_MARGIN_BOTTOM],(ULONG *)&nsoption_int(margin_bottom));
2070
2071 GetAttr(INTEGER_Number,gow->objects[GID_OPTS_MARGIN_RIGHT],(ULONG *)&nsoption_int(margin_right));
2072
2073 GetAttr(INTEGER_Number,gow->objects[GID_OPTS_EXPORT_SCALE],(ULONG *)&nsoption_int(export_scale));
2074
2075 GetAttr(GA_Selected,gow->objects[GID_OPTS_EXPORT_NOIMAGES],(ULONG *)&data);
2076 if (data) {
2077 nsoption_set_bool(suppress_images, true);
2078 } else {
2079 nsoption_set_bool(suppress_images, false);
2080 }
2081
2082 GetAttr(GA_Selected,gow->objects[GID_OPTS_EXPORT_NOBKG],(ULONG *)&data);
2083 if (data) {
2084 nsoption_set_bool(remove_backgrounds, true);
2085 } else {
2086 nsoption_set_bool(remove_backgrounds, false);
2087 }
2088
2089 GetAttr(GA_Selected,gow->objects[GID_OPTS_EXPORT_LOOSEN],(ULONG *)&data);
2090 if (data) {
2091 nsoption_set_bool(enable_loosening, true);
2092 } else {
2093 nsoption_set_bool(enable_loosening, false);
2094 }
2095
2096 GetAttr(GA_Selected,gow->objects[GID_OPTS_EXPORT_COMPRESS],(ULONG *)&data);
2097 if (data) {
2098 nsoption_set_bool(enable_PDF_compression, true);
2099 } else {
2100 nsoption_set_bool(enable_PDF_compression, false);
2101 }
2102
2103 GetAttr(GA_Selected,gow->objects[GID_OPTS_EXPORT_PASSWORD],(ULONG *)&data);
2104 if (data) {
2105 nsoption_set_bool(enable_PDF_password, true);
2106 } else {
2107 nsoption_set_bool(enable_PDF_password, false);
2108 }
2109#endif
2110
2111 if(rescan_fonts == true) {
2113 ami_font_initscanner(true, false);
2114 }
2115
2116 if(save == true) {
2118 ami_font_savescanner(); /* just in case it has changed and been used only */
2119 }
2120
2123}
2124
2125static void ami_gui_opts_close(void *w)
2126{
2127 DisposeObject(gow->objects[OID_MAIN]);
2130 gow = NULL;
2131}
2132
2133static BOOL ami_gui_opts_event(void *w)
2134{
2135 /* return TRUE if window destroyed */
2136 ULONG result,data = 0;
2137 uint16 code;
2138 STRPTR text;
2139
2140 while((result = RA_HandleInput(gow->objects[OID_MAIN],&code)) != WMHI_LASTMSG)
2141 {
2142 switch(result & WMHI_CLASSMASK) // class
2143 {
2144 case WMHI_CLOSEWINDOW:
2146 return TRUE;
2147 break;
2148
2149 case WMHI_GADGETHELP:
2150#ifdef __amigaos4__
2151 /* FIXME: this is firing on OS3.2 without HELP being pressed */
2152 if((result & WMHI_GADGETMASK) == 0) {
2153 /* Pointer not over our window */
2155 } else {
2156 /* TODO: Make this sensitive to the tab the user is currently on */
2158 }
2159#endif
2160 break;
2161
2162 case WMHI_GADGETUP:
2163 switch(result & WMHI_GADGETMASK)
2164 {
2165 case GID_OPTS_SAVE:
2166 ami_gui_opts_use(true);
2168 return TRUE;
2169 break;
2170
2171 case GID_OPTS_USE:
2172 ami_gui_opts_use(false);
2173 // fall through
2174
2175 case GID_OPTS_CANCEL:
2177 return TRUE;
2178 break;
2179
2182 gow->win,NULL,STRINGA_TextVal,NETSURF_HOMEPAGE,
2183 TAG_DONE);
2184 break;
2185
2188 gow->win, NULL, STRINGA_TextVal,
2190 break;
2191
2194 gow->win, NULL, STRINGA_TextVal,
2195 "about:blank", TAG_DONE);
2196 break;
2197
2200 gow->win, NULL, GA_Disabled, code, TAG_DONE);
2201
2202 if(code && (text = ami_locale_langs(NULL)))
2203 {
2205 gow->win, NULL, STRINGA_TextVal, text, TAG_DONE);
2206 FreeVec(text);
2207 }
2208 break;
2209
2210 case GID_OPTS_SCREEN:
2211 GetAttr(RADIOBUTTON_Selected,gow->objects[GID_OPTS_SCREEN],(ULONG *)&data);
2212 switch(data)
2213 {
2214 case 0:
2216 gow->win,NULL, GA_Disabled, FALSE, TAG_DONE);
2218 gow->win,NULL, GA_Disabled, TRUE, TAG_DONE);
2219 break;
2220
2221 case 1:
2223 gow->win,NULL, GA_Disabled, TRUE, TAG_DONE);
2225 gow->win,NULL, GA_Disabled, TRUE, TAG_DONE);
2226 break;
2227
2228 case 2:
2230 gow->win,NULL, GA_Disabled, TRUE, TAG_DONE);
2232 gow->win,NULL, GA_Disabled, FALSE, TAG_DONE);
2233 break;
2234 }
2235 break;
2236
2239 GSM_REQUEST,gow->win);
2240 break;
2241
2242 case GID_OPTS_THEME:
2244 GFILE_REQUEST,gow->win);
2245 break;
2246
2247 case GID_OPTS_PROXY:
2248 GetAttr(CHOOSER_Selected,gow->objects[GID_OPTS_PROXY],(ULONG *)&data);
2249 switch(data)
2250 {
2251 case 0:
2253 gow->win,NULL, GA_Disabled, TRUE, TAG_DONE);
2255 gow->win,NULL, GA_Disabled, TRUE, TAG_DONE);
2256
2258 gow->win,NULL, GA_Disabled, TRUE, TAG_DONE);
2260 gow->win,NULL, GA_Disabled, TRUE, TAG_DONE);
2262 gow->win,NULL, GA_Disabled, TRUE, TAG_DONE);
2263 break;
2264 case 1:
2266 gow->win,NULL, GA_Disabled, FALSE, TAG_DONE);
2268 gow->win,NULL, GA_Disabled, FALSE, TAG_DONE);
2269
2271 gow->win,NULL, GA_Disabled, TRUE, TAG_DONE);
2273 gow->win,NULL, GA_Disabled, TRUE, TAG_DONE);
2275 gow->win,NULL, GA_Disabled, FALSE, TAG_DONE);
2276 break;
2277
2278 case 2:
2279 case 3:
2281 gow->win,NULL, GA_Disabled, FALSE, TAG_DONE);
2283 gow->win,NULL, GA_Disabled, FALSE, TAG_DONE);
2284
2286 gow->win,NULL, GA_Disabled, FALSE, TAG_DONE);
2288 gow->win,NULL, GA_Disabled, FALSE, TAG_DONE);
2290 gow->win,NULL, GA_Disabled, FALSE, TAG_DONE);
2291 break;
2292 }
2293 break;
2294
2296 break;
2297
2298 case GID_OPTS_FONT_SANS:
2300 GFONT_REQUEST,gow->win);
2301 break;
2302
2305 GFONT_REQUEST,gow->win);
2306 break;
2307
2308 case GID_OPTS_FONT_MONO:
2310 GFONT_REQUEST,gow->win);
2311 break;
2312
2315 GFONT_REQUEST,gow->win);
2316 break;
2317
2320 GFONT_REQUEST,gow->win);
2321 break;
2322#ifndef __amigaos4__
2325 gow->win, NULL, GA_Disabled, code, TAG_DONE);
2326 break;
2327#endif
2328 case GID_OPTS_DLDIR:
2330 GFILE_REQUEST,gow->win);
2331 break;
2332 }
2333 break;
2334 }
2335 }
2336 return FALSE;
2337}
2338
2339struct List *ami_gui_opts_websearch(int *idx)
2340{
2341 struct List *list;
2342 struct Node *node;
2343 const char *name;
2344 int iter;
2345 int i = 0;
2346
2347 list = malloc(sizeof(struct List));
2348 NewList(list);
2349
2350 if (nsoption_charp(search_engines_file) == NULL) return list;
2351
2352 for (iter = search_web_iterate_providers(0, &name);
2353 iter != -1;
2354 iter = search_web_iterate_providers(iter, &name)) {
2355 node = AllocChooserNode(CNA_Text, name, TAG_DONE);
2356 AddTail(list, node);
2357 if(idx != NULL) {
2358 if((nsoption_charp(search_web_provider)) && (strcmp(name, nsoption_charp(search_web_provider)) == 0)) {
2359 *idx = i;
2360 }
2361 }
2362 i++;
2363 }
2364
2365 return list;
2366}
2367
2368void ami_gui_opts_websearch_free(struct List *websearchlist)
2369{
2370 struct Node *node;
2371 struct Node *nnode;
2372
2373 if(websearchlist == NULL) return;
2374 if(IsListEmpty(websearchlist)) return;
2375 node = GetHead(websearchlist);
2376
2377 do {
2378 nnode = GetSucc(node);
2379 Remove(node);
2380 FreeChooserNode(node);
2381 } while((node = nnode));
2382
2383 free(websearchlist);
2384}
2385
struct Screen * ami_gui_get_screen(void)
Get a pointer to the screen NetSurf is running on.
Definition: gui.c:405
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:4685
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:400
STRPTR ami_gui_get_screen_title(void)
Get the string for NetSurf's screen titlebar.
Definition: gui.c:976
STRPTR ami_locale_langs(int *codeset)
Definition: gui.c:704
void ami_gui_win_list_remove(void *win)
Remove a window from the NetSurf window list.
Definition: gui.c:4699
struct browser_window * ami_gui_get_browser_window(struct gui_window *gw)
Get browser window from gui_window.
Definition: gui.c:421
void ami_gui_tabs_toggle_all(void)
Definition: gui.c:4313
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:2125
#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:2368
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:2133
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:2339
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