=> e455699fca461e7e73d920a9ebfe557c20a67f98
[1mdiff --git a/po/en.po b/po/en.po[m [1mindex 6db26259..22c10e44 100644[m [1m--- a/po/en.po[m [1m+++ b/po/en.po[m [36m@@ -760,6 +760,27 @@[m [mmsgstr "Trust"[m msgid "dlg.cert.fingerprint"[m msgstr "Copy Fingerprint"[m [m [32m+[m[32mmsgid "pageinfo.settings"[m [32m+[m[32mmsgstr "Settings"[m [32m+[m [32m+[m[32mmsgid "heading.sitespec"[m [32m+[m[32mmsgstr "Site-Specific Settings"[m [32m+[m [32m+[m[32mmsgid "sitespec.ansi"[m [32m+[m[32mmsgstr "ANSI escape warnings:"[m [32m+[m [32m+[m[32mmsgid "sitespec.palette"[m [32m+[m[32mmsgstr "Theme palette seed:"[m [32m+[m [32m+[m[32mmsgid "sitespec.accept"[m [32m+[m[32mmsgstr "Save Settings"[m [32m+[m [32m+[m[32mmsgid "keys.pageinfo"[m [32m+[m[32mmsgstr "Show page information"[m [32m+[m [32m+[m[32mmsgid "keys.sitespec"[m [32m+[m[32mmsgstr "Show site-specific settings"[m [32m+[m #, c-format[m msgid "dlg.input.prompt"[m msgstr "Please enter input for %s:"[m [1mdiff --git a/res/lang/cs.bin b/res/lang/cs.bin[m [1mindex f3f2a060..0cf36a2b 100644[m Binary files a/res/lang/cs.bin and b/res/lang/cs.bin differ [1mdiff --git a/res/lang/de.bin b/res/lang/de.bin[m [1mindex 0f918bfb..ea6e1841 100644[m Binary files a/res/lang/de.bin and b/res/lang/de.bin differ [1mdiff --git a/res/lang/en.bin b/res/lang/en.bin[m [1mindex 727258d1..372cef24 100644[m Binary files a/res/lang/en.bin and b/res/lang/en.bin differ [1mdiff --git a/res/lang/eo.bin b/res/lang/eo.bin[m [1mindex f68ac15d..8a9519b6 100644[m Binary files a/res/lang/eo.bin and b/res/lang/eo.bin differ [1mdiff --git a/res/lang/es.bin b/res/lang/es.bin[m [1mindex 1d09138c..3435a8d8 100644[m Binary files a/res/lang/es.bin and b/res/lang/es.bin differ [1mdiff --git a/res/lang/es_MX.bin b/res/lang/es_MX.bin[m [1mindex d3efe8fe..5c527322 100644[m Binary files a/res/lang/es_MX.bin and b/res/lang/es_MX.bin differ [1mdiff --git a/res/lang/fi.bin b/res/lang/fi.bin[m [1mindex 24e2a905..cdbda504 100644[m Binary files a/res/lang/fi.bin and b/res/lang/fi.bin differ [1mdiff --git a/res/lang/fr.bin b/res/lang/fr.bin[m [1mindex c644fab8..3ab07f12 100644[m Binary files a/res/lang/fr.bin and b/res/lang/fr.bin differ [1mdiff --git a/res/lang/gl.bin b/res/lang/gl.bin[m [1mindex e93d1eb7..5f5d467b 100644[m Binary files a/res/lang/gl.bin and b/res/lang/gl.bin differ [1mdiff --git a/res/lang/hu.bin b/res/lang/hu.bin[m [1mindex 5bfe37eb..17486efa 100644[m Binary files a/res/lang/hu.bin and b/res/lang/hu.bin differ [1mdiff --git a/res/lang/ia.bin b/res/lang/ia.bin[m [1mindex 4b0b9bc3..8cae5947 100644[m Binary files a/res/lang/ia.bin and b/res/lang/ia.bin differ [1mdiff --git a/res/lang/ie.bin b/res/lang/ie.bin[m [1mindex b69fd2a4..bd647d76 100644[m Binary files a/res/lang/ie.bin and b/res/lang/ie.bin differ [1mdiff --git a/res/lang/isv.bin b/res/lang/isv.bin[m [1mindex 0cbd0f67..81d30963 100644[m Binary files a/res/lang/isv.bin and b/res/lang/isv.bin differ [1mdiff --git a/res/lang/nl.bin b/res/lang/nl.bin[m [1mindex 82d13774..e860c109 100644[m Binary files a/res/lang/nl.bin and b/res/lang/nl.bin differ [1mdiff --git a/res/lang/pl.bin b/res/lang/pl.bin[m [1mindex 9d13a9e2..b759b1b7 100644[m Binary files a/res/lang/pl.bin and b/res/lang/pl.bin differ [1mdiff --git a/res/lang/ru.bin b/res/lang/ru.bin[m [1mindex 6a09521d..8463fbfe 100644[m Binary files a/res/lang/ru.bin and b/res/lang/ru.bin differ [1mdiff --git a/res/lang/sk.bin b/res/lang/sk.bin[m [1mindex 9532ca17..a0197c5b 100644[m Binary files a/res/lang/sk.bin and b/res/lang/sk.bin differ [1mdiff --git a/res/lang/sr.bin b/res/lang/sr.bin[m [1mindex 58828fea..dc10b8a0 100644[m Binary files a/res/lang/sr.bin and b/res/lang/sr.bin differ [1mdiff --git a/res/lang/tok.bin b/res/lang/tok.bin[m [1mindex 0c4f6123..977454a8 100644[m Binary files a/res/lang/tok.bin and b/res/lang/tok.bin differ [1mdiff --git a/res/lang/tr.bin b/res/lang/tr.bin[m [1mindex f62d0968..c131d0ea 100644[m Binary files a/res/lang/tr.bin and b/res/lang/tr.bin differ [1mdiff --git a/res/lang/uk.bin b/res/lang/uk.bin[m [1mindex bbc10575..8377c0ba 100644[m Binary files a/res/lang/uk.bin and b/res/lang/uk.bin differ [1mdiff --git a/res/lang/zh_Hans.bin b/res/lang/zh_Hans.bin[m [1mindex 3a34d15d..acaaaa77 100644[m Binary files a/res/lang/zh_Hans.bin and b/res/lang/zh_Hans.bin differ [1mdiff --git a/res/lang/zh_Hant.bin b/res/lang/zh_Hant.bin[m [1mindex f0ac2727..cf674d55 100644[m Binary files a/res/lang/zh_Hant.bin and b/res/lang/zh_Hant.bin differ [1mdiff --git a/src/sitespec.c b/src/sitespec.c[m [1mindex 31094981..21edc0a2 100644[m [1m--- a/src/sitespec.c[m [1m+++ b/src/sitespec.c[m [36m@@ -268,6 +268,12 @@[m [mvoid setValueString_SiteSpec(const iString *site, enum iSiteSpecKey key, const i[m set_String(¶ms->titanIdentity, value);[m }[m break;[m [32m+[m[32m case paletteSeed_SiteSpecKey:[m [32m+[m[32m if (!equal_String(¶ms->paletteSeed, value)) {[m [32m+[m[32m needSave = iTrue;[m [32m+[m[32m set_String(¶ms->paletteSeed, value);[m [32m+[m[32m }[m [32m+[m[32m break;[m[41m [m default:[m break;[m }[m [36m@@ -339,6 +345,8 @@[m [mconst iString *valueString_SiteSpec(const iString *site, enum iSiteSpecKey key)[m switch (key) {[m case titanIdentity_SiteSpecKey:[m return ¶ms->titanIdentity;[m [32m+[m[32m case paletteSeed_SiteSpecKey:[m [32m+[m[32m return ¶ms->paletteSeed;[m default:[m return collectNew_String();[m } [m [1mdiff --git a/src/ui/documentwidget.c b/src/ui/documentwidget.c[m [1mindex 7d9ac154..1f3e0e37 100644[m [1m--- a/src/ui/documentwidget.c[m [1m+++ b/src/ui/documentwidget.c[m [36m@@ -4033,6 +4033,12 @@[m [mstatic iBool handleCommand_DocumentWidget_(iDocumentWidget *d, const char *cmd)[m addAction_Widget(dlg, SDLK_SPACE, 0, "message.ok");[m return iTrue;[m }[m [32m+[m[32m else if (equal_Command(cmd, "document.sitespec") && d == document_App()) {[m [32m+[m[32m if (!findWidget_App("sitespec.palette")) {[m [32m+[m[32m makeSiteSpecificSettings_Widget(d->mod.url);[m [32m+[m[32m }[m [32m+[m[32m return iTrue;[m [32m+[m[32m }[m else if (equal_Command(cmd, "server.unexpire") && document_App() == d) {[m const iRangecc host = urlHost_String(d->mod.url);[m const uint16_t port = urlPort_String(d->mod.url);[m [1mdiff --git a/src/ui/keys.c b/src/ui/keys.c[m [1mindex 26a286bc..88efa98b 100644[m [1m--- a/src/ui/keys.c[m [1m+++ b/src/ui/keys.c[m [36m@@ -243,6 +243,8 @@[m [mstatic const struct { int id; iMenuItem bind; int flags; } defaultBindings_[] =[m { 110,{ "${menu.save.downloads}", SDLK_s, KMOD_PRIMARY, "document.save" }, 0 },[m { 120,{ "${keys.upload}", SDLK_u, KMOD_PRIMARY, "document.upload" }, 0 },[m { 121,{ "${keys.upload.edit}", SDLK_e, KMOD_PRIMARY, "document.upload copy:1" }, 0 },[m [32m+[m[32m { 125,{ "${keys.pageinfo}", SDLK_i, KMOD_PRIMARY, "document.info" }, 0 },[m [32m+[m[32m { 126,{ "${keys.sitespec}", ',', KMOD_PRIMARY | KMOD_SHIFT, "document.sitespec" }, 0 },[m { 130,{ "${keys.input.precedingline}", SDLK_v, KMOD_PRIMARY | KMOD_SHIFT, "input.precedingline" }, 0 },[m /* The following cannot currently be changed (built-in duplicates). */[m #if defined (iPlatformApple)[m [1mdiff --git a/src/ui/util.c b/src/ui/util.c[m [1mindex 54715121..5cd8a582 100644[m [1m--- a/src/ui/util.c[m [1m+++ b/src/ui/util.c[m [36m@@ -35,6 +35,7 @@[m [mSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */[m #include "keys.h"[m #include "labelwidget.h"[m #include "root.h"[m [32m+[m[32m#include "sitespec.h"[m #include "text.h"[m #include "touch.h"[m #include "widget.h"[m [36m@@ -3126,7 +3127,7 @@[m [miWidget *makeBookmarkCreation_Widget(const iString *url, const iString *title, i[m [m static iBool handleFeedSettingCommands_(iWidget *dlg, const char *cmd) {[m if (equal_Command(cmd, "cancel")) {[m [31m- setupSheetTransition_Mobile(dlg, iFalse);[m [32m+[m[32m setupSheetTransition_Mobile(dlg, 0);[m destroy_Widget(dlg);[m return iTrue;[m }[m [36m@@ -3233,32 +3234,108 @@[m [miWidget *makeFeedSettings_Widget(uint32_t bookmarkId) {[m return dlg;[m }[m [m [32m+[m[32m/*----------------------------------------------------------------------------------------------*/[m [32m+[m [32m+[m[32mstatic void siteSpecificThemeChanged_(const iWidget *dlg) {[m [32m+[m[32m iDocumentWidget *doc = document_App();[m [32m+[m[32m setThemeSeed_GmDocument((iGmDocument *) document_DocumentWidget(doc),[m [32m+[m[32m urlPaletteSeed_String(url_DocumentWidget(doc)),[m [32m+[m[32m urlThemeSeed_String(url_DocumentWidget(doc)));[m [32m+[m[32m postCommand_App("theme.changed");[m[41m [m [32m+[m[32m}[m [32m+[m [32m+[m[32mstatic const iString *siteSpecificRoot_(const iWidget *dlg) {[m [32m+[m[32m return collect_String(suffix_Command(cstr_String(id_Widget(dlg)), "site"));[m [32m+[m[32m}[m [32m+[m [32m+[m[32mstatic void updateSiteSpecificTheme_(iInputWidget *palSeed, void *context) {[m [32m+[m[32m iWidget *dlg = context;[m [32m+[m[32m const iString *siteRoot = siteSpecificRoot_(dlg);[m [32m+[m[32m setValueString_SiteSpec(siteRoot, paletteSeed_SiteSpecKey, text_InputWidget(palSeed));[m [32m+[m[32m siteSpecificThemeChanged_(dlg);[m [32m+[m[32m /* Allow seeing the new theme. */[m [32m+[m[32m setFlags_Widget(dlg, noFadeBackground_WidgetFlag, iTrue);[m [32m+[m[32m}[m [32m+[m [32m+[m[32mstatic void closeSiteSpecific_(iWidget *dlg) {[m [32m+[m[32m setupSheetTransition_Mobile(dlg, 0);[m [32m+[m[32m delete_String(userData_Object(dlg)); /* saved original palette seed */[m [32m+[m[32m destroy_Widget(dlg);[m [32m+[m[32m}[m [32m+[m [32m+[m[32mstatic iBool siteSpecificSettingsHandler_(iWidget *dlg, const char *cmd) {[m [32m+[m[32m if (equal_Command(cmd, "cancel")) {[m [32m+[m[32m iInputWidget *palSeed = findChild_Widget(dlg, "sitespec.palette");[m [32m+[m[32m setText_InputWidget(palSeed, userData_Object(dlg));[m [32m+[m[32m updateSiteSpecificTheme_(palSeed, dlg);[m [32m+[m[32m closeSiteSpecific_(dlg);[m [32m+[m[32m return iTrue;[m [32m+[m[32m }[m [32m+[m[32m if (startsWith_CStr(cmd, "input.ended id:sitespec.palette")) {[m [32m+[m[32m setFlags_Widget(dlg, noFadeBackground_WidgetFlag, iFalse);[m [32m+[m[32m refresh_Widget(dlg);[m [32m+[m[32m siteSpecificThemeChanged_(dlg);[m [32m+[m[32m return iTrue;[m [32m+[m[32m }[m [32m+[m[32m if (equal_Command(cmd, "sitespec.accept")) {[m [32m+[m[32m const iInputWidget *palSeed = findChild_Widget(dlg, "sitespec.palette");[m [32m+[m[32m const iBool warnAnsi = isSelected_Widget(findChild_Widget(dlg, "sitespec.ansi"));[m [32m+[m[32m const iString *siteRoot = siteSpecificRoot_(dlg);[m [32m+[m[32m int dismissed = value_SiteSpec(siteRoot, dismissWarnings_SiteSpecKey);[m [32m+[m[32m iChangeFlags(dismissed, ansiEscapes_GmDocumentWarning, !warnAnsi);[m [32m+[m[32m setValue_SiteSpec(siteRoot, dismissWarnings_SiteSpecKey, dismissed);[m [32m+[m[32m setValueString_SiteSpec(siteRoot, paletteSeed_SiteSpecKey, text_InputWidget(palSeed));[m [32m+[m[32m siteSpecificThemeChanged_(dlg);[m [32m+[m[32m /* Note: The active DocumentWidget may actually be different than when opening the dialog. */[m [32m+[m[32m closeSiteSpecific_(dlg);[m [32m+[m[32m return iTrue;[m [32m+[m[32m }[m [32m+[m[32m return iFalse;[m [32m+[m[32m}[m [32m+[m iWidget *makeSiteSpecificSettings_Widget(const iString *url) {[m iWidget *dlg;[m const iMenuItem actions[] = {[m [31m- { "${cancel}" }, { "${sitespec.accept}", SDLK_RETURN, KMOD_PRIMARY, "sitespec.accept" }[m [32m+[m[32m { "${cancel}" },[m [32m+[m[32m { "${sitespec.accept}", SDLK_RETURN, KMOD_PRIMARY, "sitespec.accept" }[m };[m if (isUsingPanelLayout_Mobile()) {[m iAssert(iFalse);[m }[m else {[m iWidget *headings, *values;[m [31m- dlg = makeSheet_Widget("sitespec");[m [32m+[m[32m dlg = makeSheet_Widget(format_CStr("sitespec site:%s", cstr_Rangecc(urlRoot_String(url))));[m addDialogTitle_(dlg, "${heading.sitespec}", "heading.sitespec");[m addChild_Widget(dlg, iClob(makeTwoColumns_Widget(&headings, &values)));[m [32m+[m[32m iInputWidget *palSeed = new_InputWidget(0);[m [32m+[m[32m setHint_InputWidget(palSeed, cstr_Block(urlThemeSeed_String(url)));[m [32m+[m[32m addPrefsInputWithHeading_(headings, values, "sitespec.palette", iClob(palSeed));[m addDialogToggle_(headings, values, "${sitespec.ansi}", "sitespec.ansi");[m [31m- iInputWidget *palInput = new_InputWidget(0);[m [31m- addPrefsInputWithHeading_(headings, values, "sitespec.palette", iClob(palInput));[m [31m- as_Widget(palInput)->rect.size.x = 80 * gap_UI;[m [31m- addChild_Widget(dlg, iClob(makeDialogButtons_Widget(actions, iElemCount(actions))));[m [32m+[m[32m addChild_Widget(dlg, iClob(makeDialogButtons_Widget(actions, iElemCount(actions))));[m[41m [m [32m+[m[32m addChild_Widget(get_Root()->widget, iClob(dlg));[m [32m+[m[32m as_Widget(palSeed)->rect.size.x = 60 * gap_UI;[m [32m+[m[32m arrange_Widget(dlg);[m }[m /* Initialize. */ {[m [31m- const iRangecc root = urlRoot_String(url);[m [31m- [m [32m+[m[32m const iString *site = collectNewRange_String(urlRoot_String(url));[m [32m+[m[32m setToggle_Widget(findChild_Widget(dlg, "sitespec.ansi"),[m [32m+[m[32m ~value_SiteSpec(site, dismissWarnings_SiteSpecKey) & ansiEscapes_GmDocumentWarning);[m [32m+[m[32m setText_InputWidget(findChild_Widget(dlg, "sitespec.palette"),[m [32m+[m[32m valueString_SiteSpec(site, paletteSeed_SiteSpecKey));[m [32m+[m[32m /* Keep a copy of the original palette seed for restoring on cancel. */[m [32m+[m[32m setUserData_Object(dlg, copy_String(valueString_SiteSpec(site, paletteSeed_SiteSpecKey)));[m [32m+[m[32m if (!isUsingPanelLayout_Mobile()) {[m [32m+[m[32m setValidator_InputWidget(findChild_Widget(dlg, "sitespec.palette"),[m [32m+[m[32m updateSiteSpecificTheme_, dlg);[m [32m+[m[32m }[m[41m [m }[m [32m+[m[32m setCommandHandler_Widget(dlg, siteSpecificSettingsHandler_);[m [32m+[m[32m setupSheetTransition_Mobile(dlg, incoming_TransitionFlag);[m return dlg;[m }[m [m [32m+[m[32m/*----------------------------------------------------------------------------------------------*/[m [32m+[m iWidget *makeIdentityCreation_Widget(void) {[m const iMenuItem actions[] = { { "${dlg.newident.more}", 0, 0, "ident.showmore" },[m { "---" },[m
text/gemini; charset=utf-8
This content has been proxied by September (ba2dc).