Add page info icon to Amiga frontend

This commit is contained in:
Chris Young 2019-12-08 17:23:36 +00:00
parent 1c466369ef
commit 0154bed8d7
9 changed files with 133 additions and 3 deletions

View File

@ -213,6 +213,12 @@ enum
GID_FORWARD,
GID_THROBBER,
GID_SEARCH_ICON,
GID_PAGEINFO,
GID_PAGEINFO_INSECURE_BM,
GID_PAGEINFO_INTERNAL_BM,
GID_PAGEINFO_LOCAL_BM,
GID_PAGEINFO_SECURE_BM,
GID_PAGEINFO_WARNING_BM,
GID_FAVE,
GID_FAVE_ADD,
GID_FAVE_RMV,
@ -2238,6 +2244,7 @@ static void ami_gui_scroller_update(struct gui_window_2 *gwin)
}
}
/* For future use
static void ami_gui_console_log_clear(struct gui_window *g)
{
if(g->shared->objects[GID_LOG] != NULL) {
@ -2256,6 +2263,7 @@ static void ami_gui_console_log_clear(struct gui_window *g)
TAG_DONE);
}
}
*/
static void ami_gui_console_log_add(struct gui_window *g)
{
@ -4534,6 +4542,7 @@ gui_window_create(struct browser_window *bw,
char closetab[100],closetab_s[100],closetab_g[100];
char addtab[100],addtab_s[100],addtab_g[100];
char fave[100], unfave[100];
char pi_insecure[100], pi_internal[100], pi_local[100], pi_secure[100], pi_warning[100];
char tabthrobber[100];
ULONG refresh_mode = WA_SmartRefresh;
ULONG defer_layout = TRUE;
@ -4755,6 +4764,12 @@ gui_window_create(struct browser_window *bw,
g->shared->helphints[GID_ADDTAB] =
translate_escape_chars(messages_get("HelpToolbarAddTab"));
g->shared->helphints[GID_PAGEINFO_INSECURE_BM] = ami_utf8_easy(messages_get("PageInfoInsecure"));
g->shared->helphints[GID_PAGEINFO_LOCAL_BM] = ami_utf8_easy(messages_get("PageInfoLocal"));
g->shared->helphints[GID_PAGEINFO_SECURE_BM] = ami_utf8_easy(messages_get("PageInfoSecure"));
g->shared->helphints[GID_PAGEINFO_WARNING_BM] = ami_utf8_easy(messages_get("PageInfoWarning"));
g->shared->helphints[GID_PAGEINFO_INTERNAL_BM] = ami_utf8_easy(messages_get("PageInfoInternal"));
ami_get_theme_filename(nav_west, "theme_nav_west", false);
ami_get_theme_filename(nav_west_s, "theme_nav_west_s", false);
ami_get_theme_filename(nav_west_g, "theme_nav_west_g", false);
@ -4779,6 +4794,11 @@ gui_window_create(struct browser_window *bw,
ami_get_theme_filename(tabthrobber, "theme_tab_loading", false);
ami_get_theme_filename(fave, "theme_fave", false);
ami_get_theme_filename(unfave, "theme_unfave", false);
ami_get_theme_filename(pi_insecure, "theme_pageinfo_insecure", false);
ami_get_theme_filename(pi_internal, "theme_pageinfo_internal", false);
ami_get_theme_filename(pi_local, "theme_pageinfo_local", false);
ami_get_theme_filename(pi_secure, "theme_pageinfo_secure", false);
ami_get_theme_filename(pi_warning, "theme_pageinfo_warning", false);
g->shared->objects[GID_FAVE_ADD] = BitMapObj,
BITMAP_SourceFile, fave,
@ -4808,6 +4828,37 @@ gui_window_create(struct browser_window *bw,
BITMAP_Masking, TRUE,
BitMapEnd;
g->shared->objects[GID_PAGEINFO_INSECURE_BM] = BitMapObj,
BITMAP_SourceFile, pi_insecure,
BITMAP_Screen, scrn,
BITMAP_Masking, TRUE,
BitMapEnd;
g->shared->objects[GID_PAGEINFO_INTERNAL_BM] = BitMapObj,
BITMAP_SourceFile, pi_internal,
BITMAP_Screen, scrn,
BITMAP_Masking, TRUE,
BitMapEnd;
g->shared->objects[GID_PAGEINFO_LOCAL_BM] = BitMapObj,
BITMAP_SourceFile, pi_local,
BITMAP_Screen, scrn,
BITMAP_Masking, TRUE,
BitMapEnd;
g->shared->objects[GID_PAGEINFO_SECURE_BM] = BitMapObj,
BITMAP_SourceFile, pi_secure,
BITMAP_Screen, scrn,
BITMAP_Masking, TRUE,
BitMapEnd;
g->shared->objects[GID_PAGEINFO_WARNING_BM] = BitMapObj,
BITMAP_SourceFile, pi_warning,
BITMAP_Screen, scrn,
BITMAP_Masking, TRUE,
BitMapEnd;
if(ClickTabBase->lib_Version < 53)
{
addtabclosegadget = LAYOUT_AddChild;
@ -4966,6 +5017,14 @@ gui_window_create(struct browser_window *bw,
SpaceEnd,
CHILD_WeightedWidth, 0,
CHILD_WeightedHeight, 0,
LAYOUT_AddChild, g->shared->objects[GID_PAGEINFO] = ButtonObj,
GA_ID, GID_PAGEINFO,
GA_RelVerify, TRUE,
GA_ReadOnly, TRUE,
BUTTON_RenderImage, g->shared->objects[GID_PAGEINFO_INTERNAL_BM],
ButtonEnd,
CHILD_WeightedWidth, 0,
CHILD_WeightedHeight, 0,
LAYOUT_AddChild, g->shared->objects[GID_URL] =
#ifdef __amigaos4__
NewObject(urlStringClass, NULL,
@ -5335,6 +5394,11 @@ static void gui_window_destroy(struct gui_window *g)
DisposeObject(g->shared->objects[GID_TABS_FLAG]);
DisposeObject(g->shared->objects[GID_FAVE_ADD]);
DisposeObject(g->shared->objects[GID_FAVE_RMV]);
DisposeObject(g->shared->objects[GID_PAGEINFO_INSECURE_BM]);
DisposeObject(g->shared->objects[GID_PAGEINFO_INTERNAL_BM]);
DisposeObject(g->shared->objects[GID_PAGEINFO_LOCAL_BM]);
DisposeObject(g->shared->objects[GID_PAGEINFO_SECURE_BM]);
DisposeObject(g->shared->objects[GID_PAGEINFO_WARNING_BM]);
ami_gui_opts_websearch_free(g->shared->web_search_list);
if(g->shared->search_bm) DisposeObject(g->shared->search_bm);
@ -6005,6 +6069,53 @@ static void gui_window_new_content(struct gui_window *g)
ami_gui_scroller_update(g->shared);
}
static nserror gui_page_info_change(struct gui_window *gw)
{
int bm_idx;
browser_window_page_info_state pistate;
struct gui_window_2 *gwin = ami_gui_get_gui_window_2(gw);
struct browser_window *bw = ami_gui_get_browser_window(gw);
pistate = browser_window_get_page_info_state(bw);
switch(pistate) {
case PAGE_STATE_INTERNAL:
bm_idx = GID_PAGEINFO_INTERNAL_BM;
break;
case PAGE_STATE_LOCAL:
bm_idx = GID_PAGEINFO_LOCAL_BM;
break;
case PAGE_STATE_INSECURE:
bm_idx = GID_PAGEINFO_INSECURE_BM;
break;
case PAGE_STATE_SECURE_OVERRIDE:
bm_idx = GID_PAGEINFO_WARNING_BM;
break;
case PAGE_STATE_SECURE_ISSUES:
bm_idx = GID_PAGEINFO_WARNING_BM;
break;
case PAGE_STATE_SECURE:
bm_idx = GID_PAGEINFO_SECURE_BM;
break;
default:
bm_idx = GID_PAGEINFO_INTERNAL_BM;
break;
}
RefreshSetGadgetAttrs((struct Gadget *)gwin->objects[GID_PAGEINFO], gwin->win, NULL,
BUTTON_RenderImage, gwin->objects[bm_idx],
GA_HintInfo, gwin->helphints[bm_idx],
TAG_DONE);
return NSERROR_OK;
}
static bool gui_window_drag_start(struct gui_window *g, gui_drag_type type,
const struct rect *rect)
{
@ -6319,6 +6430,10 @@ gui_window_event(struct gui_window *gw, enum gui_window_event event)
gui_window_stop_throbber(gw);
break;
case GW_EVENT_PAGE_INFO_CHANGE:
gui_page_info_change(gw);
break;
default:
break;
}

View File

@ -31,6 +31,11 @@ theme_tab_loading:*TBImages:list_download
theme_search:*TBImages:list_search
theme_fave:*TBImages:list_favouriteadd
theme_unfave:*TBImages:list_favourite
theme_pageinfo_insecure:*TBImages:list_warning
theme_pageinfo_internal:*TBImages:list_info
theme_pageinfo_local:*TBImages:list_info
theme_pageinfo_secure:*TBImages:list_securezone
theme_pageinfo_warning:*TBImages:list_warning
ptr_default:*PROGDIR:Resources/Pointers/Default
ptr_point:*PROGDIR:Resources/Pointers/Point
ptr_caret:*PROGDIR:Resources/Pointers/Caret

View File

@ -44,6 +44,11 @@ theme_tab_loading:
theme_search:search.png
theme_fave:*PROGDIR:Resources/icons/hotlist-add.png
theme_unfave:*PROGDIR:Resources/icons/hotlist-rmv.png
theme_pageinfo_insecure:*PROGDIR:Resources/icons/16x16/actions/page-info-insecure.png
theme_pageinfo_internal:*PROGDIR:Resources/icons/16x16/actions/page-info-internal.png
theme_pageinfo_local:*PROGDIR:Resources/icons/16x16/actions/page-info-local.png
theme_pageinfo_secure:*PROGDIR:Resources/icons/16x16/actions/page-info-secure.png
theme_pageinfo_warning:*PROGDIR:Resources/icons/16x16/actions/page-info-warning.png
ptr_default:*PROGDIR:Resources/Pointers/Default
ptr_point:*PROGDIR:Resources/Pointers/Point
ptr_caret:*PROGDIR:Resources/Pointers/Caret

View File

@ -4084,7 +4084,7 @@ nl.ro.HelpToolbarFav:Dit is het websitesymbool: een kleine logo dat meegeleverd
en.ro.HelpToolbarHot:\Thotlist indicator: if lit, the current address is in the hotlist.|M\Sto add the current address to the hotlist.|M\Ato remove the current address from the hotlist.
de.ro.HelpToolbarHot:\Thotlist indicator: if lit, the current address is in the hotlist.|M\Sto add the current address to the hotlist.|M\Ato remove the current address from the hotlist.
fr.ro.HelpToolbarHot:\Thotlist indicator: if lit, the current address is in the hotlist.|M\Sto add the current address to the hotlist.|M\Ato remove the current address from the hotlist.
it.ro.HelpToolbarHot:\Tindicatore segnalibri: se acceso significa che il corrente indirizzo è presente nei segnalibri.|M\Sper aggiungere il corrente indirizzo ai segnalibri.|M\Aper rimuovere il corrente indirizzo dai segnalibri.
it.ro.HelpToolbarHot:\Tindicatore segnalibri: se acceso significa che il corrente indirizzo \E8 presente nei segnalibri.|M\Sper aggiungere il corrente indirizzo ai segnalibri.|M\Aper rimuovere il corrente indirizzo dai segnalibri.
nl.ro.HelpToolbarHot:Dit is de favorietenindicator: wanneer deze oplicht, staat het webadres al in de favorietenlijst.|MKlik met KIES om het adres aan de favorietenlijst toe te voegen.|MKlik met PASAAN om het adres uit de favorietenlijst te verwijderen.
en.ro.HelpStatus0:\Tstatus bar resizer.|MDrag to alter the size of the status bar.
@ -5168,7 +5168,7 @@ nl.ro.HelpCacheConfig:Diverse bufferinstelligen kunnen in dit venster gewijzigd
en.ro.HelpCacheConfig3:\Tamount of memory to be used for caching content.
de.ro.HelpCacheConfig3:Speichergröße, die verwendet wird um Inhalte zwischenzuspeichern.
fr.ro.HelpCacheConfig3:\Tla quantité de mémoire à utiliser pour le contenu du cache.
it.ro.HelpCacheConfig3:\Tquantità di memoria da usare per il contenuto della cache.
it.ro.HelpCacheConfig3:\Tquantit\E0 di memoria da usare per il contenuto della cache.
nl.ro.HelpCacheConfig3:Dit invoerveld toont de hoeveelheid geheugen die wordt gebruikt om de pagina-inhoud te bufferen.
en.ro.HelpCacheConfig4:\Sreduce the amount of memory.
de.ro.HelpCacheConfig4:Klicken mit AUSWAHL verringert die Größe des Cachespeichers.
@ -5183,7 +5183,7 @@ nl.ro.HelpCacheConfig5:Klik met KIES om de geheugenruimte groter te maken.
en.ro.HelpCacheConfig10:\Tamount of disc space to be used for caching content between sessions.
de.ro.HelpCacheConfig10:\Tamount of disc space to be used for caching content between sessions.
fr.ro.HelpCacheConfig10:\Tamount of disc space to be used for caching content between sessions.
it.ro.HelpCacheConfig10:\Tquantità di spazio su disco da usare per il contenuto della cache tra le sessioni.
it.ro.HelpCacheConfig10:\Tquantit\E0 di spazio su disco da usare per il contenuto della cache tra le sessioni.
nl.ro.HelpCacheConfig10:Dit invoerveld toont de hoeveelheid schijfruimte die wordt gebruikt om de pagina-inhoud tussen sessies te bufferen.
en.ro.HelpCacheConfig11:\Sreduce the amount of memory.
de.ro.HelpCacheConfig11:Klicken mit AUSWAHL verringert die Größe des Cachespeichers.
@ -5788,6 +5788,11 @@ de.ami.HelpToolbarAddTab:Tab hinzufügen.
fr.ami.HelpToolbarAddTab:Add tab\nLMB: Adds a new blank tab
it.ami.HelpToolbarAddTab:Apri una nuova scheda
nl.ami.HelpToolbarAddTab:Tabblad toevoegen\nLMB: Een nieuwe leeg tabblad wordt geopend
en.ami.PageInfoInsecure:Insecure
en.ami.PageInfoLocal:Local
en.ami.PageInfoSecure:Secure
en.ami.PageInfoWarning:Warning
en.ami.PageInfoInternal:Internal
# Configuration tokens

Binary file not shown.

After

Width:  |  Height:  |  Size: 527 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 799 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 456 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 330 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 552 B