From f4942e1b4da6dc1334dcdb4f2daae670bfa1f813 Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Wed, 1 Dec 2021 13:55:11 +0200 Subject: Added switching to the identity toolbar menu One can now use the identity toolbar menu to switch between client certificates that have been used on the current site. The five latest ones are remembered. --- po/en.po | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'po') diff --git a/po/en.po b/po/en.po index 066c4eca..9a154c5c 100644 --- a/po/en.po +++ b/po/en.po @@ -321,6 +321,10 @@ msgstr "Show History" msgid "menu.show.identities" msgstr "Show Identities" +# Active identity toolbar menu. +msgid "menu.hide.identities" +msgstr "Hide Identities" +"" # Used in the View menu on macOS. Shows sidebar and switches sidebar tab. msgid "menu.show.outline" msgstr "Show Page Outline" @@ -629,6 +633,11 @@ msgstr "Stop Using Everywhere" msgid "ident.export" msgstr "Export" +# The %s represents the name of an identity. +#, c-format +msgid "ident.switch" +msgstr "Switch to %s" + msgid "heading.ident.use" msgstr "IDENTITY USAGE" -- cgit v1.2.3 From 8269c38f074cb991e79430bd2ae9fe892d412635 Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Thu, 2 Dec 2021 14:48:56 +0200 Subject: Mobile: Button group style; upload dialog tweaks Use checkmarks for selections in button groups. --- po/en.po | 6 ++++++ res/lang/cs.bin | Bin 30962 -> 31054 bytes res/lang/de.bin | Bin 29969 -> 30061 bytes res/lang/en.bin | Bin 26066 -> 26158 bytes res/lang/eo.bin | Bin 25020 -> 25112 bytes res/lang/es.bin | Bin 29793 -> 29885 bytes res/lang/es_MX.bin | Bin 27125 -> 27217 bytes res/lang/fi.bin | Bin 29626 -> 29718 bytes res/lang/fr.bin | Bin 30773 -> 30865 bytes res/lang/gl.bin | Bin 28978 -> 29070 bytes res/lang/hu.bin | Bin 30798 -> 30890 bytes res/lang/ia.bin | Bin 28125 -> 28217 bytes res/lang/ie.bin | Bin 28713 -> 28805 bytes res/lang/isv.bin | Bin 24786 -> 24878 bytes res/lang/pl.bin | Bin 29401 -> 29493 bytes res/lang/ru.bin | Bin 44161 -> 44253 bytes res/lang/sk.bin | Bin 25122 -> 25214 bytes res/lang/sr.bin | Bin 43587 -> 43679 bytes res/lang/tok.bin | Bin 26835 -> 26927 bytes res/lang/tr.bin | Bin 29019 -> 29111 bytes res/lang/uk.bin | Bin 43506 -> 43598 bytes res/lang/zh_Hans.bin | Bin 25020 -> 25112 bytes res/lang/zh_Hant.bin | Bin 25218 -> 25310 bytes src/ui/inputwidget.c | 23 +++++++++++++++++++++-- src/ui/labelwidget.c | 51 ++++++++++++++++++++++++++++++++++---------------- src/ui/labelwidget.h | 1 + src/ui/mobile.c | 20 +++++++++++++++++++- src/ui/uploadwidget.c | 6 +++--- 28 files changed, 85 insertions(+), 22 deletions(-) (limited to 'po') diff --git a/po/en.po b/po/en.po index 9a154c5c..6675f78b 100644 --- a/po/en.po +++ b/po/en.po @@ -987,6 +987,9 @@ msgstr "UPLOAD WITH TITAN" msgid "upload.id" msgstr "Identity:" +msgid "heading.upload.id" +msgstr "Identification" + msgid "dlg.upload.id.none" msgstr "None" @@ -1020,6 +1023,9 @@ msgstr "Token:" msgid "hint.upload.token" msgstr "see server's instructions" +msgid "hint.upload.token.long" +msgstr "token — see server's instructions" + msgid "dlg.upload.send" msgstr "Upload" diff --git a/res/lang/cs.bin b/res/lang/cs.bin index d3e06c73..8f8b3a6f 100644 Binary files a/res/lang/cs.bin and b/res/lang/cs.bin differ diff --git a/res/lang/de.bin b/res/lang/de.bin index b9d155a7..2df7f11f 100644 Binary files a/res/lang/de.bin and b/res/lang/de.bin differ diff --git a/res/lang/en.bin b/res/lang/en.bin index 5bb8299a..0b2edc4b 100644 Binary files a/res/lang/en.bin and b/res/lang/en.bin differ diff --git a/res/lang/eo.bin b/res/lang/eo.bin index ff1ddb01..6c0dc697 100644 Binary files a/res/lang/eo.bin and b/res/lang/eo.bin differ diff --git a/res/lang/es.bin b/res/lang/es.bin index ba9b2343..5d04443c 100644 Binary files a/res/lang/es.bin and b/res/lang/es.bin differ diff --git a/res/lang/es_MX.bin b/res/lang/es_MX.bin index f4ddcc72..37438b3a 100644 Binary files a/res/lang/es_MX.bin and b/res/lang/es_MX.bin differ diff --git a/res/lang/fi.bin b/res/lang/fi.bin index f73891d6..53449c30 100644 Binary files a/res/lang/fi.bin and b/res/lang/fi.bin differ diff --git a/res/lang/fr.bin b/res/lang/fr.bin index 0851f535..2ccda4da 100644 Binary files a/res/lang/fr.bin and b/res/lang/fr.bin differ diff --git a/res/lang/gl.bin b/res/lang/gl.bin index 80215589..9f37b384 100644 Binary files a/res/lang/gl.bin and b/res/lang/gl.bin differ diff --git a/res/lang/hu.bin b/res/lang/hu.bin index 7d7ed94e..4de98a70 100644 Binary files a/res/lang/hu.bin and b/res/lang/hu.bin differ diff --git a/res/lang/ia.bin b/res/lang/ia.bin index 572015c2..1a512597 100644 Binary files a/res/lang/ia.bin and b/res/lang/ia.bin differ diff --git a/res/lang/ie.bin b/res/lang/ie.bin index bb485f4e..3324bb69 100644 Binary files a/res/lang/ie.bin and b/res/lang/ie.bin differ diff --git a/res/lang/isv.bin b/res/lang/isv.bin index f90a1e7d..58673ac5 100644 Binary files a/res/lang/isv.bin and b/res/lang/isv.bin differ diff --git a/res/lang/pl.bin b/res/lang/pl.bin index 753e595b..0aaa2fbd 100644 Binary files a/res/lang/pl.bin and b/res/lang/pl.bin differ diff --git a/res/lang/ru.bin b/res/lang/ru.bin index edcebb14..82c43ffc 100644 Binary files a/res/lang/ru.bin and b/res/lang/ru.bin differ diff --git a/res/lang/sk.bin b/res/lang/sk.bin index b843a383..db1bd9e7 100644 Binary files a/res/lang/sk.bin and b/res/lang/sk.bin differ diff --git a/res/lang/sr.bin b/res/lang/sr.bin index 1ef302d9..7f058106 100644 Binary files a/res/lang/sr.bin and b/res/lang/sr.bin differ diff --git a/res/lang/tok.bin b/res/lang/tok.bin index 6e3c7af7..206fe02c 100644 Binary files a/res/lang/tok.bin and b/res/lang/tok.bin differ diff --git a/res/lang/tr.bin b/res/lang/tr.bin index 71b9382f..430ab02c 100644 Binary files a/res/lang/tr.bin and b/res/lang/tr.bin differ diff --git a/res/lang/uk.bin b/res/lang/uk.bin index f7040f2f..49d58f42 100644 Binary files a/res/lang/uk.bin and b/res/lang/uk.bin differ diff --git a/res/lang/zh_Hans.bin b/res/lang/zh_Hans.bin index 3ccab576..ec375dcd 100644 Binary files a/res/lang/zh_Hans.bin and b/res/lang/zh_Hans.bin differ diff --git a/res/lang/zh_Hant.bin b/res/lang/zh_Hant.bin index 39393417..dd63c0eb 100644 Binary files a/res/lang/zh_Hant.bin and b/res/lang/zh_Hant.bin differ diff --git a/src/ui/inputwidget.c b/src/ui/inputwidget.c index a1fb8cb5..bd9b63b5 100644 --- a/src/ui/inputwidget.c +++ b/src/ui/inputwidget.c @@ -2343,10 +2343,29 @@ static void draw_InputWidget_(const iInputWidget *d) { /* If buffered, just draw the buffered copy. */ if (d->buffered && !isFocused) { /* Most input widgets will use this, since only one is focused at a time. */ - draw_TextBuf(d->buffered, addY_I2(drawPos, visLineOffsetY), white_ColorId); + if (flags_Widget(w) & alignRight_WidgetFlag) { + draw_TextBuf( + d->buffered, + addY_I2(init_I2(right_Rect(contentBounds) - d->buffered->size.x, drawPos.y), + visLineOffsetY), + white_ColorId); + } + else { + draw_TextBuf(d->buffered, addY_I2(drawPos, visLineOffsetY), white_ColorId); + } } else if (isHint) { - drawRange_Text(d->font, drawPos, uiAnnotation_ColorId, range_String(&d->hint)); + if (flags_Widget(w) & alignRight_WidgetFlag) { + drawAlign_Text(d->font, + init_I2(right_Rect(contentBounds), drawPos.y), + uiAnnotation_ColorId, + right_Alignment, + "%s", + cstr_String(&d->hint)); + } + else { + drawRange_Text(d->font, drawPos, uiAnnotation_ColorId, range_String(&d->hint)); + } } else { iAssert(~d->inFlags & isSensitive_InputWidgetFlag || size_Range(&visLines) == 1); diff --git a/src/ui/labelwidget.c b/src/ui/labelwidget.c index f6ddfd43..9ef62262 100644 --- a/src/ui/labelwidget.c +++ b/src/ui/labelwidget.c @@ -44,14 +44,15 @@ struct Impl_LabelWidget { iString command; iClick click; struct { - uint8_t alignVisual : 1; /* align according to visible bounds, not font metrics */ - uint8_t noAutoMinHeight : 1; /* minimum height is not set automatically */ - uint8_t drawAsOutline : 1; /* draw as outline, filled with background color */ - uint8_t noTopFrame : 1; - uint8_t wrap : 1; - uint8_t allCaps : 1; - uint8_t removeTrailingColon : 1; - uint8_t chevron : 1; + uint16_t alignVisual : 1; /* align according to visible bounds, not font metrics */ + uint16_t noAutoMinHeight : 1; /* minimum height is not set automatically */ + uint16_t drawAsOutline : 1; /* draw as outline, filled with background color */ + uint16_t noTopFrame : 1; + uint16_t wrap : 1; + uint16_t allCaps : 1; + uint16_t removeTrailingColon : 1; + uint16_t chevron : 1; + uint16_t checkMark : 1; } flags; }; @@ -204,6 +205,9 @@ static void getColors_LabelWidget_(const iLabelWidget *d, int *bg, int *fg, int *bg = isButton && ~flags & noBackground_WidgetFlag ? (d->widget.bgColor != none_ColorId ? d->widget.bgColor : uiBackground_ColorId) : none_ColorId; + if (d->flags.checkMark) { + *bg = none_ColorId; + } *fg = uiText_ColorId; *frame1 = isButton ? uiEmboss1_ColorId : d->widget.frameColor; *frame2 = isButton ? uiEmboss2_ColorId : *frame1; @@ -215,13 +219,15 @@ static void getColors_LabelWidget_(const iLabelWidget *d, int *bg, int *fg, int *meta = uiTextDisabled_ColorId; } if (isSel) { - *bg = uiBackgroundSelected_ColorId; + if (!d->flags.checkMark) { + *bg = uiBackgroundSelected_ColorId; // if (!isKeyRoot) { // *bg = uiEmbossSelected1_ColorId; //uiBackgroundUnfocusedSelection_ColorId; // } - if (!isKeyRoot) { - *bg = isDark_ColorTheme(colorTheme_App()) ? uiBackgroundUnfocusedSelection_ColorId - : uiMarked_ColorId ; + if (!isKeyRoot) { + *bg = isDark_ColorTheme(colorTheme_App()) ? uiBackgroundUnfocusedSelection_ColorId + : uiMarked_ColorId; + } } *fg = uiTextSelected_ColorId; if (isButton) { @@ -429,14 +435,23 @@ static void draw_LabelWidget_(const iLabelWidget *d) { "%s", cstr_String(&d->label)); } - if (d->flags.chevron) { + if (d->flags.chevron || (flags & selected_WidgetFlag && d->flags.checkMark)) { const iRect chRect = rect; const int chSize = lineHeight_Text(d->font); + int offset = 0; + if (d->flags.chevron) { + offset = -iconPad; + } + else { + offset = -10 * gap_UI; + } drawCentered_Text(d->font, - (iRect){ addX_I2(topRight_Rect(chRect), -iconPad), + (iRect){ addX_I2(topRight_Rect(chRect), offset), init_I2(chSize, height_Rect(chRect)) }, - iTrue, iconColor, rightAngle_Icon); - } + iTrue, + iconColor, + d->flags.chevron ? rightAngle_Icon : check_Icon); + } unsetClip_Paint(&p); drawChildren_Widget(w); } @@ -580,6 +595,10 @@ void setChevron_LabelWidget(iLabelWidget *d, iBool chevron) { d->flags.chevron = chevron; } +void setCheckMark_LabelWidget(iLabelWidget *d, iBool checkMark) { + d->flags.checkMark = checkMark; +} + void setWrap_LabelWidget(iLabelWidget *d, iBool wrap) { d->flags.wrap = wrap; } diff --git a/src/ui/labelwidget.h b/src/ui/labelwidget.h index 6542ae12..6f1b7902 100644 --- a/src/ui/labelwidget.h +++ b/src/ui/labelwidget.h @@ -33,6 +33,7 @@ void setAlignVisually_LabelWidget(iLabelWidget *, iBool alignVisual); void setNoAutoMinHeight_LabelWidget (iLabelWidget *, iBool noAutoMinHeight); void setNoTopFrame_LabelWidget (iLabelWidget *, iBool noTopFrame); void setChevron_LabelWidget (iLabelWidget *, iBool chevron); +void setCheckMark_LabelWidget (iLabelWidget *, iBool checkMark); void setWrap_LabelWidget (iLabelWidget *, iBool wrap); void setOutline_LabelWidget (iLabelWidget *, iBool drawAsOutline); void setAllCaps_LabelWidget (iLabelWidget *, iBool allCaps); diff --git a/src/ui/mobile.c b/src/ui/mobile.c index 7b34d389..c7b75d3f 100644 --- a/src/ui/mobile.c +++ b/src/ui/mobile.c @@ -511,6 +511,7 @@ void makePanelItem_Mobile(iWidget *panel, const iMenuItem *item) { setId_Widget(as_Widget(drop), id); widget = makeValuePaddingWithHeading_(heading = makeHeading_Widget(label), as_Widget(drop)); setCommandHandler_Widget(widget, dropdownHeadingHandler_); + widget->padding[2] = gap_UI; setUserData_Object(widget, drop); } else if (equal_Command(spec, "radio") || equal_Command(spec, "buttons")) { @@ -534,7 +535,20 @@ void makePanelItem_Mobile(iWidget *panel, const iMenuItem *item) { resizeWidthOfChildren_WidgetFlag, iTrue); setId_Widget(widget, id); + iBool isFirst = iTrue; for (const iMenuItem *radioItem = item->data; radioItem->label; radioItem++) { + if (!isHorizontal && !isFirst) { + /* The separator is padded from the left so we need two. */ + iWidget *sep = new_Widget(); + iWidget *sep2 = new_Widget(); + addChildFlags_Widget(sep, iClob(sep2), 0); + setFlags_Widget(sep, arrangeHeight_WidgetFlag | resizeWidthOfChildren_WidgetFlag, iTrue); + setBackgroundColor_Widget(sep2, uiSeparator_ColorId); + setFixedSize_Widget(sep2, init_I2(-1, gap_UI / 4)); + setPadding_Widget(sep, 5 * gap_UI, 0, 0, 0); + addChildFlags_Widget(widget, iClob(sep), 0); + } + isFirst = iFalse; const char * radId = cstr_Rangecc(range_Command(radioItem->label, "id")); int64_t flags = noBackground_WidgetFlag | frameless_WidgetFlag; if (!isHorizontal) { @@ -554,10 +568,13 @@ void makePanelItem_Mobile(iWidget *panel, const iMenuItem *item) { button = (iLabelWidget *) makeToggle_Widget(radId); setTextCStr_LabelWidget(button, format_CStr("${%s}", radId)); setFlags_Widget(as_Widget(button), fixedWidth_WidgetFlag, iFalse); - updateSize_LabelWidget(button); } setId_Widget(as_Widget(button), radId); setFont_LabelWidget(button, isHorizontal ? uiLabelMedium_FontId : uiLabelBig_FontId); + setCheckMark_LabelWidget(button, !isHorizontal); + setPadding_Widget(as_Widget(button), gap_UI, 1 * gap_UI, 0, 1 * gap_UI); + updateSize_LabelWidget(button); + setPadding_Widget(widget, 0, 0, 0, 0); addChildFlags_Widget(widget, iClob(button), flags); } } @@ -575,6 +592,7 @@ void makePanelItem_Mobile(iWidget *panel, const iMenuItem *item) { setFlags_Widget(widget, expand_WidgetFlag, iTrue); } else { + setFlags_Widget(as_Widget(input), alignRight_WidgetFlag, iTrue); setContentPadding_InputWidget(input, 3 * gap_UI, 0); if (hasLabel_Command(spec, "unit")) { iWidget *unit = addChildFlags_Widget( diff --git a/src/ui/uploadwidget.c b/src/ui/uploadwidget.c index bad00071..c22bfe86 100644 --- a/src/ui/uploadwidget.c +++ b/src/ui/uploadwidget.c @@ -185,9 +185,9 @@ void init_UploadWidget(iUploadWidget *d) { { "label id:upload.info" }, { "panel id:dlg.upload.text icon:0x1f5b9 noscroll:1", 0, 0, (const void *) textItems }, { "panel id:dlg.upload.file icon:0x1f4c1", 0, 0, (const void *) fileItems }, - { "padding" }, - { "dropdown id:upload.id icon:0x1f464", 0, 0, constData_Array(makeIdentityItems_UploadWidget_(d)) }, - { "input id:upload.token hint:hint.upload.token icon:0x1f511" }, + { "heading text:${heading.upload.id}" }, + { "dropdown id:upload.id icon:0x1f464 text:", 0, 0, constData_Array(makeIdentityItems_UploadWidget_(d)) }, + { "input id:upload.token hint:hint.upload.token.long icon:0x1f516 text:" }, { NULL } }, actions, iElemCount(actions)); d->info = findChild_Widget(w, "upload.info"); -- cgit v1.2.3 From 50c5abbbeab07e3ccd67da5caafe7325467f1396 Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Thu, 2 Dec 2021 15:25:22 +0200 Subject: Avoid capitalizing headings in .po files All-caps should be applied at runtime when appropriate. --- po/en.po | 24 ++++++++++++------------ res/lang/en.bin | Bin 26158 -> 26158 bytes res/lang/eo.bin | Bin 25112 -> 25112 bytes res/lang/es_MX.bin | Bin 27217 -> 27217 bytes res/lang/ia.bin | Bin 28217 -> 28217 bytes res/lang/isv.bin | Bin 24878 -> 24878 bytes res/lang/pl.bin | Bin 29493 -> 29493 bytes res/lang/sk.bin | Bin 25214 -> 25214 bytes res/lang/zh_Hans.bin | Bin 25112 -> 25112 bytes res/lang/zh_Hant.bin | Bin 25310 -> 25310 bytes src/ui/certlistwidget.c | 1 + src/ui/mobile.c | 15 ++++++++++++++- src/ui/root.c | 5 +++-- src/ui/util.c | 13 ++++++++----- 14 files changed, 38 insertions(+), 20 deletions(-) (limited to 'po') diff --git a/po/en.po b/po/en.po index 6675f78b..c6fa98be 100644 --- a/po/en.po +++ b/po/en.po @@ -982,7 +982,7 @@ msgid "menu.page.upload" msgstr "Upload Page with Titan…" msgid "heading.upload" -msgstr "UPLOAD WITH TITAN" +msgstr "Upload with Titan" msgid "upload.id" msgstr "Identity:" @@ -1239,7 +1239,7 @@ msgid "dlg.bookmark.icon" msgstr "Icon:" msgid "heading.bookmark.tags" -msgstr "SPECIAL TAGS" +msgstr "Special Tags" msgid "heading.addfolder" msgstr "ADD FOLDER" @@ -1254,14 +1254,14 @@ msgid "dlg.addfolder" msgstr "Add Folder" msgid "heading.prefs" -msgstr "PREFERENCES" +msgstr "Preferences" # used on mobile msgid "heading.settings" -msgstr "SETTINGS" +msgstr "Settings" msgid "heading.prefs.certs" -msgstr "CERTIFICATES" +msgstr "Certificates" # tab button msgid "heading.prefs.colors" @@ -1287,25 +1287,25 @@ msgid "heading.prefs.network" msgstr "Network" msgid "heading.prefs.paragraph" -msgstr "PARAGRAPH" +msgstr "Paragraph" msgid "heading.prefs.uitheme" -msgstr "UI COLORS" +msgstr "UI Colors" msgid "heading.prefs.pagecontent" -msgstr "PAGE COLORS" +msgstr "Page Colors" msgid "heading.prefs.proxies" -msgstr "PROXIES" +msgstr "Proxies" msgid "heading.prefs.scrolling" -msgstr "SCROLLING" +msgstr "Scrolling" msgid "heading.prefs.sizing" -msgstr "SIZING" +msgstr "Sizing" msgid "heading.prefs.widelayout" -msgstr "WIDE LAYOUT" +msgstr "Wide Layout" # tab button msgid "heading.prefs.style" diff --git a/res/lang/en.bin b/res/lang/en.bin index 0b2edc4b..0129d019 100644 Binary files a/res/lang/en.bin and b/res/lang/en.bin differ diff --git a/res/lang/eo.bin b/res/lang/eo.bin index 6c0dc697..4acb5f16 100644 Binary files a/res/lang/eo.bin and b/res/lang/eo.bin differ diff --git a/res/lang/es_MX.bin b/res/lang/es_MX.bin index 37438b3a..3fcecd44 100644 Binary files a/res/lang/es_MX.bin and b/res/lang/es_MX.bin differ diff --git a/res/lang/ia.bin b/res/lang/ia.bin index 1a512597..f9e134fc 100644 Binary files a/res/lang/ia.bin and b/res/lang/ia.bin differ diff --git a/res/lang/isv.bin b/res/lang/isv.bin index 58673ac5..6b98e1f8 100644 Binary files a/res/lang/isv.bin and b/res/lang/isv.bin differ diff --git a/res/lang/pl.bin b/res/lang/pl.bin index 0aaa2fbd..33ed890b 100644 Binary files a/res/lang/pl.bin and b/res/lang/pl.bin differ diff --git a/res/lang/sk.bin b/res/lang/sk.bin index db1bd9e7..6dbeb129 100644 Binary files a/res/lang/sk.bin and b/res/lang/sk.bin differ diff --git a/res/lang/zh_Hans.bin b/res/lang/zh_Hans.bin index ec375dcd..cfa284be 100644 Binary files a/res/lang/zh_Hans.bin and b/res/lang/zh_Hans.bin differ diff --git a/res/lang/zh_Hant.bin b/res/lang/zh_Hant.bin index dd63c0eb..f0f6fe97 100644 Binary files a/res/lang/zh_Hant.bin and b/res/lang/zh_Hant.bin differ diff --git a/src/ui/certlistwidget.c b/src/ui/certlistwidget.c index 4d939ae2..c67203e3 100644 --- a/src/ui/certlistwidget.c +++ b/src/ui/certlistwidget.c @@ -388,6 +388,7 @@ void init_CertListWidget(iCertListWidget *d) { init_ListWidget(&d->list); setId_Widget(w, "certlist"); setBackgroundColor_Widget(w, none_ColorId); + setItemHeight_ListWidget(&d->list, 3.5f * lineHeight_Text(default_FontId)); d->itemFonts[0] = uiContent_FontId; d->itemFonts[1] = uiContentBold_FontId; #if defined (iPlatformMobile) diff --git a/src/ui/mobile.c b/src/ui/mobile.c index c7b75d3f..9e4fef84 100644 --- a/src/ui/mobile.c +++ b/src/ui/mobile.c @@ -23,6 +23,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "mobile.h" #include "app.h" +#include "certlistwidget.h" #include "command.h" #include "defs.h" #include "inputwidget.h" @@ -196,6 +197,8 @@ static iBool topPanelHandler_(iWidget *topPanel, const char *cmd) { setText_LabelWidget(detailTitle, text_LabelWidget((iLabelWidget *) findTitleLabel_(panel))); setFlags_Widget(button, selected_WidgetFlag, iTrue); postCommand_Widget(topPanel, "panel.changed arg:%d", panelIndex); + //printTree_Widget(findDetailStack_(topPanel)); +// updateVisible_ListWidget(findChild_Widget(findDetailStack_(topPanel), "certlist")); return iTrue; } if (equal_Command(cmd, "swipe.back")) { @@ -482,7 +485,7 @@ void makePanelItem_Mobile(iWidget *panel, const iMenuItem *item) { collapse_WidgetFlag); setFont_LabelWidget(title, uiLabelLargeBold_FontId); setTextColor_LabelWidget(title, uiHeading_ColorId); - setAllCaps_LabelWidget(title, iTrue); +// setAllCaps_LabelWidget(title, iTrue); setId_Widget(as_Widget(title), id); } else if (equal_Command(spec, "heading")) { @@ -609,6 +612,16 @@ void makePanelItem_Mobile(iWidget *panel, const iMenuItem *item) { setUserData_Object(widget, input); } } + else if (equal_Command(spec, "certlist")) { + iCertListWidget *certList = new_CertListWidget(); + iListWidget *list = (iListWidget *) certList; + setBackgroundColor_Widget(as_Widget(list), uiBackgroundSidebar_ColorId); + widget = as_Widget(certList); + updateItems_CertListWidget(certList); + invalidate_ListWidget(list); + setFixedSize_Widget(widget, + init_I2(-1, numItems_ListWidget(list) * itemHeight_ListWidget(list))); + } else if (equal_Command(spec, "button")) { widget = as_Widget(heading = makePanelButton_(label, item->command)); setFlags_Widget(widget, selected_WidgetFlag, argLabel_Command(spec, "selected") != 0); diff --git a/src/ui/root.c b/src/ui/root.c index 5ed6b529..b7a2e5c8 100644 --- a/src/ui/root.c +++ b/src/ui/root.c @@ -339,14 +339,15 @@ static iBool handleRootCommands_(iWidget *root, const char *cmd) { /* Current identity. */ const iString *docUrl = url_DocumentWidget(document_App()); const iGmIdentity *ident = identityForUrl_GmCerts(certs_App(), docUrl); - const iString *fp = collect_String(hexEncode_Block(&ident->fingerprint)); + const iString *fp = ident ? collect_String(hexEncode_Block(&ident->fingerprint)) : NULL; pushBackN_Array(&items, (iMenuItem[]){ { format_CStr("///" uiHeading_ColorEscape "%s", ident ? cstr_String(name_GmIdentity(ident)) : "${menu.identity.notactive}") }, { "---" } }, 2); - /* Alternate identities. */ { + /* Alternate identities. */ + if (ident) { const iString *site = collectNewRange_String(urlRoot_String(docUrl)); iBool haveAlts = iFalse; iConstForEach(StringArray, i, strings_SiteSpec(site, usedIdentities_SiteSpecKey)) { diff --git a/src/ui/util.c b/src/ui/util.c index 04483e8d..91b67e06 100644 --- a/src/ui/util.c +++ b/src/ui/util.c @@ -1995,9 +1995,11 @@ iWidget *appendTwoColumnTabPage_Widget(iWidget *tabs, const char *title, int sho } static void makeTwoColumnHeading_(const char *title, iWidget *headings, iWidget *values) { - addChildFlags_Widget(headings, - iClob(makeHeading_Widget(format_CStr(uiHeading_ColorEscape "%s", title))), - ignoreForParentWidth_WidgetFlag); + setFont_LabelWidget(addChildFlags_Widget(headings, + iClob(makeHeading_Widget( + format_CStr(uiHeading_ColorEscape "%s", title))), + ignoreForParentWidth_WidgetFlag), + uiLabelBold_FontId); addChild_Widget(values, iClob(makeHeading_Widget(""))); } @@ -2431,6 +2433,7 @@ iWidget *makePreferences_Widget(void) { }; const iMenuItem identityPanelItems[] = { { "title id:sidebar.identities" }, + { "certlist" }, { NULL } }; iString *aboutText = collectNew_String(); { @@ -2471,9 +2474,9 @@ iWidget *makePreferences_Widget(void) { return dlg; } iWidget *dlg = makeSheet_Widget("prefs"); - addChildFlags_Widget(dlg, + setAllCaps_LabelWidget(addChildFlags_Widget(dlg, iClob(new_LabelWidget(uiHeading_ColorEscape "${heading.prefs}", NULL)), - frameless_WidgetFlag); + frameless_WidgetFlag), iTrue); iWidget *tabs = makeTabs_Widget(dlg); setBackgroundColor_Widget(findChild_Widget(tabs, "tabs.buttons"), uiBackgroundSidebar_ColorId); setId_Widget(tabs, "prefs.tabs"); -- cgit v1.2.3 From 6e917280380316eba77b1dfa983daf488510e70f Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Fri, 3 Dec 2021 07:46:16 +0200 Subject: Mobile: Manage Identities via Settings --- po/en.po | 5 ++- res/lang/cs.bin | Bin 31054 -> 31087 bytes res/lang/de.bin | Bin 30061 -> 30094 bytes res/lang/en.bin | Bin 26158 -> 26191 bytes res/lang/eo.bin | Bin 25112 -> 25145 bytes res/lang/es.bin | Bin 29885 -> 29918 bytes res/lang/es_MX.bin | Bin 27217 -> 27250 bytes res/lang/fi.bin | Bin 29718 -> 29751 bytes res/lang/fr.bin | Bin 30865 -> 30898 bytes res/lang/gl.bin | Bin 29070 -> 29103 bytes res/lang/hu.bin | Bin 30890 -> 30923 bytes res/lang/ia.bin | Bin 28217 -> 28250 bytes res/lang/ie.bin | Bin 28805 -> 28838 bytes res/lang/isv.bin | Bin 24878 -> 24911 bytes res/lang/pl.bin | Bin 29493 -> 29526 bytes res/lang/ru.bin | Bin 44253 -> 44286 bytes res/lang/sk.bin | Bin 25214 -> 25247 bytes res/lang/sr.bin | Bin 43679 -> 43712 bytes res/lang/tok.bin | Bin 26927 -> 26960 bytes res/lang/tr.bin | Bin 29111 -> 29144 bytes res/lang/uk.bin | Bin 43598 -> 43631 bytes res/lang/zh_Hans.bin | Bin 25112 -> 25145 bytes res/lang/zh_Hant.bin | Bin 25310 -> 25343 bytes src/app.c | 8 +++++ src/ui/labelwidget.c | 17 ++++++---- src/ui/labelwidget.h | 1 + src/ui/mobile.c | 11 ++++--- src/ui/mobile.h | 1 + src/ui/root.c | 88 +++++++++++++++++++++++++++++++++++-------------- src/ui/sidebarwidget.c | 20 ++++++----- src/ui/uploadwidget.c | 7 +++- src/ui/util.c | 9 +++++ src/ui/util.h | 3 +- src/ui/widget.c | 10 +++--- 34 files changed, 129 insertions(+), 51 deletions(-) (limited to 'po') diff --git a/po/en.po b/po/en.po index c6fa98be..4e013941 100644 --- a/po/en.po +++ b/po/en.po @@ -395,6 +395,9 @@ msgstr "New Identity…" msgid "menu.identity.import" msgstr "Import…" +msgid "menu.identities" +msgstr "Manage Identities" + msgid "menu.identity.notactive" msgstr "No Active Identity" @@ -988,7 +991,7 @@ msgid "upload.id" msgstr "Identity:" msgid "heading.upload.id" -msgstr "Identification" +msgstr "Authorization" msgid "dlg.upload.id.none" msgstr "None" diff --git a/res/lang/cs.bin b/res/lang/cs.bin index 8f8b3a6f..7c08bcfe 100644 Binary files a/res/lang/cs.bin and b/res/lang/cs.bin differ diff --git a/res/lang/de.bin b/res/lang/de.bin index 2df7f11f..e3f45a34 100644 Binary files a/res/lang/de.bin and b/res/lang/de.bin differ diff --git a/res/lang/en.bin b/res/lang/en.bin index 0129d019..0c65ffd3 100644 Binary files a/res/lang/en.bin and b/res/lang/en.bin differ diff --git a/res/lang/eo.bin b/res/lang/eo.bin index 4acb5f16..9edecafe 100644 Binary files a/res/lang/eo.bin and b/res/lang/eo.bin differ diff --git a/res/lang/es.bin b/res/lang/es.bin index 5d04443c..9e7d0585 100644 Binary files a/res/lang/es.bin and b/res/lang/es.bin differ diff --git a/res/lang/es_MX.bin b/res/lang/es_MX.bin index 3fcecd44..1dd95a4e 100644 Binary files a/res/lang/es_MX.bin and b/res/lang/es_MX.bin differ diff --git a/res/lang/fi.bin b/res/lang/fi.bin index 53449c30..1d5e4624 100644 Binary files a/res/lang/fi.bin and b/res/lang/fi.bin differ diff --git a/res/lang/fr.bin b/res/lang/fr.bin index 2ccda4da..c0202489 100644 Binary files a/res/lang/fr.bin and b/res/lang/fr.bin differ diff --git a/res/lang/gl.bin b/res/lang/gl.bin index 9f37b384..34d16341 100644 Binary files a/res/lang/gl.bin and b/res/lang/gl.bin differ diff --git a/res/lang/hu.bin b/res/lang/hu.bin index 4de98a70..2ab5484b 100644 Binary files a/res/lang/hu.bin and b/res/lang/hu.bin differ diff --git a/res/lang/ia.bin b/res/lang/ia.bin index f9e134fc..c43aec10 100644 Binary files a/res/lang/ia.bin and b/res/lang/ia.bin differ diff --git a/res/lang/ie.bin b/res/lang/ie.bin index 3324bb69..8a1d71e4 100644 Binary files a/res/lang/ie.bin and b/res/lang/ie.bin differ diff --git a/res/lang/isv.bin b/res/lang/isv.bin index 6b98e1f8..e9978815 100644 Binary files a/res/lang/isv.bin and b/res/lang/isv.bin differ diff --git a/res/lang/pl.bin b/res/lang/pl.bin index 33ed890b..b6de49f1 100644 Binary files a/res/lang/pl.bin and b/res/lang/pl.bin differ diff --git a/res/lang/ru.bin b/res/lang/ru.bin index 82c43ffc..7f153025 100644 Binary files a/res/lang/ru.bin and b/res/lang/ru.bin differ diff --git a/res/lang/sk.bin b/res/lang/sk.bin index 6dbeb129..35fdb2b1 100644 Binary files a/res/lang/sk.bin and b/res/lang/sk.bin differ diff --git a/res/lang/sr.bin b/res/lang/sr.bin index 7f058106..bd9ca450 100644 Binary files a/res/lang/sr.bin and b/res/lang/sr.bin differ diff --git a/res/lang/tok.bin b/res/lang/tok.bin index 206fe02c..cb34ada6 100644 Binary files a/res/lang/tok.bin and b/res/lang/tok.bin differ diff --git a/res/lang/tr.bin b/res/lang/tr.bin index 430ab02c..99dc6431 100644 Binary files a/res/lang/tr.bin and b/res/lang/tr.bin differ diff --git a/res/lang/uk.bin b/res/lang/uk.bin index 49d58f42..edcafb7e 100644 Binary files a/res/lang/uk.bin and b/res/lang/uk.bin differ diff --git a/res/lang/zh_Hans.bin b/res/lang/zh_Hans.bin index cfa284be..488cc64f 100644 Binary files a/res/lang/zh_Hans.bin and b/res/lang/zh_Hans.bin differ diff --git a/res/lang/zh_Hant.bin b/res/lang/zh_Hant.bin index f0f6fe97..edab200b 100644 Binary files a/res/lang/zh_Hant.bin and b/res/lang/zh_Hant.bin differ diff --git a/src/app.c b/src/app.c index 540c46d8..5b2e88bf 100644 --- a/src/app.c +++ b/src/app.c @@ -2667,6 +2667,9 @@ iBool handleCommand_App(const char *cmd) { if (!urlArg) { return iTrue; /* invalid command */ } + if (findWidget_App("prefs")) { + postCommand_App("prefs.dismiss"); + } iString *url = collectNewCStr_String(urlArg); const iBool noProxy = argLabel_Command(cmd, "noproxy") != 0; const iBool fromSidebar = argLabel_Command(cmd, "fromsidebar") != 0; @@ -2979,6 +2982,11 @@ iBool handleCommand_App(const char *cmd) { showTabPage_Widget(tabs, tabPage_Widget(tabs, d->prefs.dialogTab)); } setCommandHandler_Widget(dlg, handlePrefsCommands_); + if (argLabel_Command(cmd, "idents") && deviceType_App() != desktop_AppDeviceType) { + iWidget *idPanel = panel_Mobile(dlg, 2); + iWidget *button = findUserData_Widget(findChild_Widget(dlg, "panel.top"), idPanel); + postCommand_Widget(button, "panel.open"); + } } else if (equal_Command(cmd, "navigate.home")) { /* Look for bookmarks tagged "homepage". */ diff --git a/src/ui/labelwidget.c b/src/ui/labelwidget.c index 947d5daa..d00733e1 100644 --- a/src/ui/labelwidget.c +++ b/src/ui/labelwidget.c @@ -36,6 +36,7 @@ struct Impl_LabelWidget { iWidget widget; iString srcLabel; iString label; + iInt2 labelOffset; int font; int key; int kmods; @@ -362,10 +363,6 @@ static void draw_LabelWidget_(const iLabelWidget *d) { } setClip_Paint(&p, rect); const int iconPad = iconPadding_LabelWidget_(d); -// const int iconColor = isCaution ? uiTextCaution_ColorId -// : flags & (disabled_WidgetFlag | pressed_WidgetFlag) ? fg -// : isHover ? uiIconHover_ColorId -// : uiIcon_ColorId; if (d->icon && d->icon != 0x20) { /* no need to draw an empty icon */ iString str; initUnicodeN_String(&str, &d->icon, 1); @@ -427,8 +424,11 @@ static void draw_LabelWidget_(const iLabelWidget *d) { else { drawCenteredOutline_Text( d->font, - adjusted_Rect(bounds, init_I2(iconPad * (flags & tight_WidgetFlag ? 1.0f : 1.5f), 0), - init_I2(-iconPad * (flags & tight_WidgetFlag ? 0.5f : 1.0f), 0)), + moved_Rect( + adjusted_Rect(bounds, + init_I2(iconPad * (flags & tight_WidgetFlag ? 1.0f : 1.5f), 0), + init_I2(-iconPad * (flags & tight_WidgetFlag ? 0.5f : 1.0f), 0)), + d->labelOffset), d->flags.alignVisual, d->flags.drawAsOutline ? fg : none_ColorId, d->flags.drawAsOutline ? d->widget.bgColor : fg, @@ -523,6 +523,7 @@ void init_LabelWidget(iLabelWidget *d, const char *label, const char *cmd) { d->font = uiLabel_FontId; d->forceFg = none_ColorId; d->icon = 0; + d->labelOffset = zero_I2(); initCStr_String(&d->srcLabel, label); initCopy_String(&d->label, &d->srcLabel); replaceVariables_LabelWidget_(d); @@ -623,6 +624,10 @@ void setRemoveTrailingColon_LabelWidget(iLabelWidget *d, iBool removeTrailingCol } } +void setTextOffset_LabelWidget(iLabelWidget *d, iInt2 offset) { + d->labelOffset = offset; +} + void updateText_LabelWidget(iLabelWidget *d, const iString *text) { set_String(&d->label, text); set_String(&d->srcLabel, text); diff --git a/src/ui/labelwidget.h b/src/ui/labelwidget.h index 6f1b7902..4f605d6b 100644 --- a/src/ui/labelwidget.h +++ b/src/ui/labelwidget.h @@ -38,6 +38,7 @@ void setWrap_LabelWidget (iLabelWidget *, iBool wrap); void setOutline_LabelWidget (iLabelWidget *, iBool drawAsOutline); void setAllCaps_LabelWidget (iLabelWidget *, iBool allCaps); void setRemoveTrailingColon_LabelWidget (iLabelWidget *, iBool removeTrailingColon); +void setTextOffset_LabelWidget (iLabelWidget *, iInt2 offset); void setFont_LabelWidget (iLabelWidget *, int fontId); void setTextColor_LabelWidget (iLabelWidget *, int color); void setText_LabelWidget (iLabelWidget *, const iString *text); /* resizes widget */ diff --git a/src/ui/mobile.c b/src/ui/mobile.c index 5382cbce..ab282a86 100644 --- a/src/ui/mobile.c +++ b/src/ui/mobile.c @@ -180,13 +180,16 @@ size_t currentPanelIndex_Mobile(const iWidget *panels) { return iInvalidPos; } +iWidget *panel_Mobile(const iWidget *panels, size_t index) { + return child_Widget(findChild_Widget(panels, "detailstack"), index); +} + static iBool topPanelHandler_(iWidget *topPanel, const char *cmd) { const iBool isPortrait = !isSideBySideLayout_(); if (equal_Command(cmd, "panel.open")) { - iWidget *button = pointer_Command(cmd); + /* This command is sent by the button that opens the panel. */ + iWidget *button = pointer_Command(cmd); iWidget *panel = userData_Object(button); -// openMenu_Widget(panel, innerToWindow_Widget(panel, zero_I2())); -// setFlags_Widget(panel, hidden_WidgetFlag, iFalse); unselectAllPanelButtons_(topPanel); int panelIndex = -1; size_t childIndex = 0; @@ -208,8 +211,6 @@ static iBool topPanelHandler_(iWidget *topPanel, const char *cmd) { setText_LabelWidget(detailTitle, text_LabelWidget((iLabelWidget *) findTitleLabel_(panel))); setFlags_Widget(button, selected_WidgetFlag, iTrue); postCommand_Widget(topPanel, "panel.changed arg:%d", panelIndex); - //printTree_Widget(findDetailStack_(topPanel)); -// updateVisible_ListWidget(findChild_Widget(findDetailStack_(topPanel), "certlist")); updateCertListHeight_(findDetailStack_(topPanel)); return iTrue; } diff --git a/src/ui/mobile.h b/src/ui/mobile.h index 9d7ac8e4..06955945 100644 --- a/src/ui/mobile.h +++ b/src/ui/mobile.h @@ -39,6 +39,7 @@ void initPanels_Mobile (iWidget *panels, iWidget *parentWidget, const iMenuItem *itemsNullTerminated, const iMenuItem *actions, size_t numActions); +iWidget * panel_Mobile (const iWidget *panels, size_t index); size_t currentPanelIndex_Mobile (const iWidget *panels); enum iTransitionFlags { diff --git a/src/ui/root.c b/src/ui/root.c index b7a2e5c8..5df4b36f 100644 --- a/src/ui/root.c +++ b/src/ui/root.c @@ -333,19 +333,28 @@ static iBool handleRootCommands_(iWidget *root, const char *cmd) { } else if (equal_Command(cmd, "identmenu.open")) { iWidget *toolBar = findWidget_Root("toolbar"); - iWidget *button = findWidget_Root(toolBar ? "toolbar.ident" : "navbar.ident"); + iWidget *button = findWidget_Root(toolBar && isPortraitPhone_App() ? "toolbar.ident" : "navbar.ident"); iArray items; init_Array(&items, sizeof(iMenuItem)); /* Current identity. */ const iString *docUrl = url_DocumentWidget(document_App()); const iGmIdentity *ident = identityForUrl_GmCerts(certs_App(), docUrl); const iString *fp = ident ? collect_String(hexEncode_Block(&ident->fingerprint)) : NULL; - pushBackN_Array(&items, - (iMenuItem[]){ { format_CStr("///" uiHeading_ColorEscape "%s", - ident ? cstr_String(name_GmIdentity(ident)) - : "${menu.identity.notactive}") }, - { "---" } }, - 2); + iString *str = NULL; + if (ident) { + str = copy_String(name_GmIdentity(ident)); + if (!isEmpty_String(&ident->notes)) { + appendFormat_String(str, "\n%s%s", escape_Color(uiAnnotation_ColorId), + cstr_String(&ident->notes)); + } + } + pushBackN_Array( + &items, + (iMenuItem[]){ { format_CStr("///" uiHeading_ColorEscape "%s", + str ? cstr_String(str) : "${menu.identity.notactive}") }, + { "---" } }, + 2); + delete_String(str); /* Alternate identities. */ if (ident) { const iString *site = collectNewRange_String(urlRoot_String(docUrl)); @@ -385,8 +394,8 @@ static iBool handleRootCommands_(iWidget *root, const char *cmd) { : leftHalf_Icon " ${menu.show.identities}", 0, 0, - deviceType_App() == phone_AppDeviceType ? "toolbar.showident" - : "sidebar.mode arg:3 toggle:1" }); + //deviceType_App() == phone_AppDeviceType ? "toolbar.showident" + "sidebar.mode arg:3 toggle:1" }); } else { pushBack_Array(&items, &(iMenuItem){ gear_Icon " ${menu.identities}", 0, 0, @@ -517,9 +526,21 @@ static void updateNavBarIdentity_(iWidget *navBar) { iLabelWidget *toolName = findWidget_App("toolbar.name"); if (toolName) { setOutline_LabelWidget(toolButton, ident == NULL); - updateTextCStr_LabelWidget(toolName, subjectName ? cstr_String(subjectName) : ""); + /* Fit the name in the widget. */ + if (subjectName) { + const char *endPos; + tryAdvanceNoWrap_Text(uiLabelTiny_FontId, range_String(subjectName), width_Widget(toolName), + &endPos); + updateText_LabelWidget( + toolName, + collectNewRange_String((iRangecc){ constBegin_String(subjectName), endPos })); + } + else { + updateTextCStr_LabelWidget(toolName, ""); + } setFont_LabelWidget(toolButton, subjectName ? uiLabelMedium_FontId : uiLabelLarge_FontId); - arrange_Widget(parent_Widget(toolButton)); + setTextOffset_LabelWidget(toolButton, init_I2(0, subjectName ? -1.5f * gap_UI : 0)); + arrange_Widget(parent_Widget(toolButton)); } } @@ -604,11 +625,13 @@ void updateToolbarColors_Root(iRoot *d) { tmBannerBackground_ColorId; setBackgroundColor_Widget(toolBar, bg); iForEach(ObjectList, i, children_Widget(toolBar)) { - iLabelWidget *btn = i.object; +// iLabelWidget *btn = i.object; setTextColor_LabelWidget(i.object, isSidebarVisible ? uiTextDim_ColorId : tmBannerIcon_ColorId); setBackgroundColor_Widget(i.object, bg); /* using noBackground, but ident has outline */ } + setTextColor_LabelWidget(findChild_Widget(toolBar, "toolbar.name"), + isSidebarVisible ? uiTextDim_ColorId : tmBannerIcon_ColorId); } #else iUnused(d); @@ -1014,8 +1037,13 @@ static iBool handleToolBarCommands_(iWidget *toolBar, const char *cmd) { return iTrue; } else if (equal_Command(cmd, "toolbar.showident")) { - /* TODO: Clean this up. */ iWidget *sidebar = findWidget_App("sidebar"); + if (isVisible_Widget(sidebar)) { + postCommandf_App("sidebar.toggle"); + } + postCommand_App("preferences idents:1"); +#if 0 + /* TODO: Clean this up. */ iWidget *sidebar2 = findWidget_App("sidebar2"); //dismissSidebar_(sidebar, "toolbar.view"); if (isVisible_Widget(sidebar)) { @@ -1036,6 +1064,7 @@ static iBool handleToolBarCommands_(iWidget *toolBar, const char *cmd) { setVisualOffset_Widget(sidebar2, offset, 0, 0); setVisualOffset_Widget(sidebar2, 0, 400, easeOut_AnimFlag | softer_AnimFlag); } +#endif return iTrue; } else if (equal_Command(cmd, "sidebar.mode.changed")) { @@ -1099,15 +1128,16 @@ void updateMetrics_Root(iRoot *d) { const iWidget *toolBar = findChild_Widget(d->widget, "toolbar"); const iWidget *viewButton = findChild_Widget(d->widget, "toolbar.view"); const iWidget *idButton = findChild_Widget(toolBar, "toolbar.ident"); - const int font = uiLabelTiny_FontId; - setFont_LabelWidget(idName, font); - setPos_Widget(as_Widget(idName), +// const int font = uiLabelTiny_FontId; + setFixedSize_Widget(as_Widget(idName), init_I2(-1, 2 * gap_UI + lineHeight_Text(uiLabelTiny_FontId))); +// setFont_LabelWidget(idName, font); + /*setPos_Widget(as_Widget(idName), windowToLocal_Widget(as_Widget(idName), init_I2(left_Rect(bounds_Widget(idButton)), bottom_Rect(bounds_Widget(viewButton)) - lineHeight_Text(font) - gap_UI / 2))); setFixedSize_Widget(as_Widget(idName), init_I2(width_Widget(idButton), - lineHeight_Text(font))); + lineHeight_Text(font)));*/ } } postRefresh_App(); @@ -1413,15 +1443,17 @@ void createUserInterface_Root(iRoot *d) { iWidget *content = findChild_Widget(root, "tabs.content"); iSidebarWidget *sidebar1 = new_SidebarWidget(left_SidebarSide); addChildPos_Widget(content, iClob(sidebar1), front_WidgetAddPos); - iSidebarWidget *sidebar2 = new_SidebarWidget(right_SidebarSide); if (deviceType_App() != phone_AppDeviceType) { + iSidebarWidget *sidebar2 = new_SidebarWidget(right_SidebarSide); addChildPos_Widget(content, iClob(sidebar2), back_WidgetAddPos); } +#if 0 else { /* The identities sidebar is always in the main area. */ addChild_Widget(findChild_Widget(root, "stack"), iClob(sidebar2)); setFlags_Widget(as_Widget(sidebar2), hidden_WidgetFlag, iTrue); } +#endif } /* Lookup results. */ { iLookupWidget *lookup = new_LookupWidget(); @@ -1481,23 +1513,29 @@ void createUserInterface_Root(iRoot *d) { iClob(newLargeIcon_LabelWidget(forwardArrow_Icon, "navigate.forward")), frameless_WidgetFlag), "toolbar.forward"); - setId_Widget(addChildFlags_Widget(toolBar, - iClob(newLargeIcon_LabelWidget("\U0001f464", "identmenu.open")), - frameless_WidgetFlag), + iWidget *identButton; + setId_Widget(identButton = addChildFlags_Widget( + toolBar, + iClob(newLargeIcon_LabelWidget("\U0001f464", "identmenu.open")), + frameless_WidgetFlag | fixedHeight_WidgetFlag), "toolbar.ident"); setId_Widget(addChildFlags_Widget(toolBar, iClob(newLargeIcon_LabelWidget(book_Icon, "toolbar.showview arg:-1")), frameless_WidgetFlag | commandOnClick_WidgetFlag), "toolbar.view"); - setId_Widget(addChildFlags_Widget(toolBar, - iClob(new_LabelWidget("", "toolbar.showident")), + iLabelWidget *idName; + setId_Widget(addChildFlags_Widget(identButton, + iClob(idName = new_LabelWidget("", NULL)), frameless_WidgetFlag | noBackground_WidgetFlag | - fixedPosition_WidgetFlag | + moveToParentBottomEdge_WidgetFlag | + resizeToParentWidth_WidgetFlag + /*fixedPosition_WidgetFlag | fixedSize_WidgetFlag | ignoreForParentWidth_WidgetFlag | - ignoreForParentHeight_WidgetFlag), + ignoreForParentHeight_WidgetFlag*/), "toolbar.name"); + setFont_LabelWidget(idName, uiLabelTiny_FontId); iLabelWidget *menuButton = makeMenuButton_LabelWidget(menu_Icon, phoneNavMenuItems_, iElemCount(phoneNavMenuItems_)); setFont_LabelWidget(menuButton, uiLabelLarge_FontId); diff --git a/src/ui/sidebarwidget.c b/src/ui/sidebarwidget.c index 674e2b7c..9b94f4d9 100644 --- a/src/ui/sidebarwidget.c +++ b/src/ui/sidebarwidget.c @@ -608,8 +608,10 @@ iBool setMode_SidebarWidget(iSidebarWidget *d, enum iSidebarMode mode) { } void setClosedFolders_SidebarWidget(iSidebarWidget *d, const iIntSet *closedFolders) { - delete_IntSet(d->closedFolders); - d->closedFolders = copy_IntSet(closedFolders); + if (d) { + delete_IntSet(d->closedFolders); + d->closedFolders = copy_IntSet(closedFolders); + } } enum iSidebarMode mode_SidebarWidget(const iSidebarWidget *d) { @@ -625,7 +627,7 @@ float width_SidebarWidget(const iSidebarWidget *d) { } const iIntSet *closedFolders_SidebarWidget(const iSidebarWidget *d) { - return d->closedFolders; + return d ? d->closedFolders : collect_IntSet(new_IntSet()); } static const char *normalModeLabels_[max_SidebarMode] = { @@ -710,7 +712,8 @@ void init_SidebarWidget(iSidebarWidget *d, enum iSidebarSide side) { setId_Widget(buttons, "buttons"); setDrawBufferEnabled_Widget(buttons, iTrue); for (int i = 0; i < max_SidebarMode; i++) { - if (deviceType_App() == phone_AppDeviceType && i == identities_SidebarMode) { + if (i == identities_SidebarMode && deviceType_App() != desktop_AppDeviceType) { + /* On mobile, identities are managed via Settings. */ continue; } d->modeButtons[i] = addChildFlags_Widget( @@ -911,6 +914,7 @@ static void checkModeButtonLayout_SidebarWidget_(iSidebarWidget *d) { } void setWidth_SidebarWidget(iSidebarWidget *d, float widthAsGaps) { + if (!d) return; iWidget *w = as_Widget(d); const iBool isFixedWidth = deviceType_App() == phone_AppDeviceType; int width = widthAsGaps * gap_UI; /* in pixels */ @@ -1148,10 +1152,10 @@ static iBool processEvent_SidebarWidget_(iSidebarWidget *d, const SDL_Event *ev) } } } - else if (deviceType_App() == tablet_AppDeviceType && equal_Command(cmd, "toolbar.showident")) { - postCommandf_App("sidebar.mode arg:%d toggle:1", identities_SidebarMode); - return iTrue; - } +// else if (deviceType_App() == tablet_AppDeviceType && equal_Command(cmd, "toolbar.showident")) { +// postCommandf_App("sidebar.mode arg:%d toggle:1", identities_SidebarMode); +// return iTrue; +// } else if (isPortraitPhone_App() && isVisible_Widget(w) && d->side == left_SidebarSide && equal_Command(cmd, "swipe.forward")) { postCommand_App("sidebar.toggle"); diff --git a/src/ui/uploadwidget.c b/src/ui/uploadwidget.c index c22bfe86..89376633 100644 --- a/src/ui/uploadwidget.c +++ b/src/ui/uploadwidget.c @@ -123,9 +123,14 @@ static const iArray *makeIdentityItems_UploadWidget_(const iUploadWidget *d) { pushBack_Array(items, &(iMenuItem){ "---" }); iConstForEach(PtrArray, i, listIdentities_GmCerts(certs_App(), NULL, NULL)) { const iGmIdentity *id = i.ptr; + iString *str = collect_String(copy_String(name_GmIdentity(id))); + if (!isEmpty_String(&id->notes)) { + appendFormat_String( + str, "\n%s%s", escape_Color(uiAnnotation_ColorId), cstr_String(&id->notes)); + } pushBack_Array( items, - &(iMenuItem){ cstr_String(name_GmIdentity(id)), 0, 0, + &(iMenuItem){ cstr_String(str), 0, 0, format_CStr("upload.setid fp:%s", cstrCollect_String(hexEncode_Block(&id->fingerprint))) }); } diff --git a/src/ui/util.c b/src/ui/util.c index 61d3e9bb..de838769 100644 --- a/src/ui/util.c +++ b/src/ui/util.c @@ -1215,6 +1215,15 @@ iLabelWidget *findMenuItem_Widget(iWidget *menu, const char *command) { return NULL; } +iWidget *findUserData_Widget(iWidget *d, void *userData) { + iForEach(ObjectList, i, children_Widget(d)) { + if (userData_Object(i.object) == userData) { + return i.object; + } + } + return NULL; +} + void setMenuItemDisabled_Widget(iWidget *menu, const char *command, iBool disable) { if (flags_Widget(menu) & nativeMenu_WidgetFlag) { setDisabled_NativeMenuItem(findNativeMenuItem_Widget(menu, command), disable); diff --git a/src/ui/util.h b/src/ui/util.h index 81fb1cbd..7ee94f1d 100644 --- a/src/ui/util.h +++ b/src/ui/util.h @@ -249,7 +249,8 @@ void setMenuItemDisabled_Widget (iWidget *menu, const char *comm void setMenuItemDisabledByIndex_Widget(iWidget *menu, size_t index, iBool disable); void setMenuItemLabel_Widget (iWidget *menu, const char *command, const char *newLabel); void setMenuItemLabelByIndex_Widget (iWidget *menu, size_t index, const char *newLabel); -void setNativeMenuItems_Widget (iWidget *, const iMenuItem *items, size_t n); +void setNativeMenuItems_Widget (iWidget *menu, const iMenuItem *items, size_t n); +iWidget * findUserData_Widget (iWidget *, void *userData); int checkContextMenu_Widget (iWidget *, const SDL_Event *ev); /* see macro below */ diff --git a/src/ui/widget.c b/src/ui/widget.c index 254c2590..210fe899 100644 --- a/src/ui/widget.c +++ b/src/ui/widget.c @@ -271,10 +271,12 @@ void setMinSize_Widget(iWidget *d, iInt2 minSize) { } void setPadding_Widget(iWidget *d, int left, int top, int right, int bottom) { - d->padding[0] = left; - d->padding[1] = top; - d->padding[2] = right; - d->padding[3] = bottom; + if (d) { + d->padding[0] = left; + d->padding[1] = top; + d->padding[2] = right; + d->padding[3] = bottom; + } } iWidget *root_Widget(const iWidget *d) { -- cgit v1.2.3 From ad86fbe2cffa2bea07d004782e711932c5c91a79 Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Fri, 3 Dec 2021 10:41:15 +0200 Subject: Improving identity use The URL checks for determining which identity was in use were a bit too page-specific. Now the URL prefix usage is applied more consistently. The identity toolbar menu is now more useful in that it allows both switching identities and stopping the use of the current identity. --- po/en.po | 2 +- res/lang/cs.bin | Bin 31087 -> 31081 bytes res/lang/de.bin | Bin 30094 -> 30088 bytes res/lang/en.bin | Bin 26191 -> 26185 bytes res/lang/eo.bin | Bin 25145 -> 25139 bytes res/lang/es.bin | Bin 29918 -> 29912 bytes res/lang/es_MX.bin | Bin 27250 -> 27244 bytes res/lang/fi.bin | Bin 29751 -> 29745 bytes res/lang/fr.bin | Bin 30898 -> 30892 bytes res/lang/gl.bin | Bin 29103 -> 29097 bytes res/lang/hu.bin | Bin 30923 -> 30917 bytes res/lang/ia.bin | Bin 28250 -> 28244 bytes res/lang/ie.bin | Bin 28838 -> 28832 bytes res/lang/isv.bin | Bin 24911 -> 24905 bytes res/lang/pl.bin | Bin 29526 -> 29520 bytes res/lang/ru.bin | Bin 44286 -> 44280 bytes res/lang/sk.bin | Bin 25247 -> 25241 bytes res/lang/sr.bin | Bin 43712 -> 43706 bytes res/lang/tok.bin | Bin 26960 -> 26954 bytes res/lang/tr.bin | Bin 29144 -> 29138 bytes res/lang/uk.bin | Bin 43631 -> 43625 bytes res/lang/zh_Hans.bin | Bin 25145 -> 25139 bytes res/lang/zh_Hant.bin | Bin 25343 -> 25337 bytes src/app.c | 4 ++- src/gmcerts.c | 16 +++++++++- src/ui/certlistwidget.c | 13 ++++---- src/ui/documentwidget.c | 9 ++++-- src/ui/root.c | 78 ++++++++++++++++++++++++++---------------------- src/ui/sidebarwidget.c | 59 +++++++++++++++++++----------------- 29 files changed, 108 insertions(+), 73 deletions(-) (limited to 'po') diff --git a/po/en.po b/po/en.po index 4e013941..6b604d61 100644 --- a/po/en.po +++ b/po/en.po @@ -639,7 +639,7 @@ msgstr "Export" # The %s represents the name of an identity. #, c-format msgid "ident.switch" -msgstr "Switch to %s" +msgstr "Use %s" msgid "heading.ident.use" msgstr "IDENTITY USAGE" diff --git a/res/lang/cs.bin b/res/lang/cs.bin index 7c08bcfe..cf37c7de 100644 Binary files a/res/lang/cs.bin and b/res/lang/cs.bin differ diff --git a/res/lang/de.bin b/res/lang/de.bin index e3f45a34..a9d497d7 100644 Binary files a/res/lang/de.bin and b/res/lang/de.bin differ diff --git a/res/lang/en.bin b/res/lang/en.bin index 0c65ffd3..5e24ab94 100644 Binary files a/res/lang/en.bin and b/res/lang/en.bin differ diff --git a/res/lang/eo.bin b/res/lang/eo.bin index 9edecafe..789c01c2 100644 Binary files a/res/lang/eo.bin and b/res/lang/eo.bin differ diff --git a/res/lang/es.bin b/res/lang/es.bin index 9e7d0585..7ca8e297 100644 Binary files a/res/lang/es.bin and b/res/lang/es.bin differ diff --git a/res/lang/es_MX.bin b/res/lang/es_MX.bin index 1dd95a4e..43a5bb77 100644 Binary files a/res/lang/es_MX.bin and b/res/lang/es_MX.bin differ diff --git a/res/lang/fi.bin b/res/lang/fi.bin index 1d5e4624..5a0ec586 100644 Binary files a/res/lang/fi.bin and b/res/lang/fi.bin differ diff --git a/res/lang/fr.bin b/res/lang/fr.bin index c0202489..329cae2b 100644 Binary files a/res/lang/fr.bin and b/res/lang/fr.bin differ diff --git a/res/lang/gl.bin b/res/lang/gl.bin index 34d16341..527de83b 100644 Binary files a/res/lang/gl.bin and b/res/lang/gl.bin differ diff --git a/res/lang/hu.bin b/res/lang/hu.bin index 2ab5484b..82257541 100644 Binary files a/res/lang/hu.bin and b/res/lang/hu.bin differ diff --git a/res/lang/ia.bin b/res/lang/ia.bin index c43aec10..5f1d7ab2 100644 Binary files a/res/lang/ia.bin and b/res/lang/ia.bin differ diff --git a/res/lang/ie.bin b/res/lang/ie.bin index 8a1d71e4..0d866d47 100644 Binary files a/res/lang/ie.bin and b/res/lang/ie.bin differ diff --git a/res/lang/isv.bin b/res/lang/isv.bin index e9978815..d30dcf4f 100644 Binary files a/res/lang/isv.bin and b/res/lang/isv.bin differ diff --git a/res/lang/pl.bin b/res/lang/pl.bin index b6de49f1..e9fd8460 100644 Binary files a/res/lang/pl.bin and b/res/lang/pl.bin differ diff --git a/res/lang/ru.bin b/res/lang/ru.bin index 7f153025..f8a69f51 100644 Binary files a/res/lang/ru.bin and b/res/lang/ru.bin differ diff --git a/res/lang/sk.bin b/res/lang/sk.bin index 35fdb2b1..9d0e9f04 100644 Binary files a/res/lang/sk.bin and b/res/lang/sk.bin differ diff --git a/res/lang/sr.bin b/res/lang/sr.bin index bd9ca450..bbaba1e9 100644 Binary files a/res/lang/sr.bin and b/res/lang/sr.bin differ diff --git a/res/lang/tok.bin b/res/lang/tok.bin index cb34ada6..517194d1 100644 Binary files a/res/lang/tok.bin and b/res/lang/tok.bin differ diff --git a/res/lang/tr.bin b/res/lang/tr.bin index 99dc6431..e0aef190 100644 Binary files a/res/lang/tr.bin and b/res/lang/tr.bin differ diff --git a/res/lang/uk.bin b/res/lang/uk.bin index edcafb7e..0c261c00 100644 Binary files a/res/lang/uk.bin and b/res/lang/uk.bin differ diff --git a/res/lang/zh_Hans.bin b/res/lang/zh_Hans.bin index 488cc64f..d31b280b 100644 Binary files a/res/lang/zh_Hans.bin and b/res/lang/zh_Hans.bin differ diff --git a/res/lang/zh_Hant.bin b/res/lang/zh_Hant.bin index edab200b..e06f4339 100644 Binary files a/res/lang/zh_Hant.bin and b/res/lang/zh_Hant.bin differ diff --git a/src/app.c b/src/app.c index 5b2e88bf..587efd00 100644 --- a/src/app.c +++ b/src/app.c @@ -3142,6 +3142,7 @@ iBool handleCommand_App(const char *cmd) { d->certs, findIdentity_GmCerts(d->certs, collect_Block(hexDecode_Rangecc(range_Command(cmd, "ident")))), url); + postCommand_App("navigate.reload"); postCommand_App("idents.changed"); return iTrue; } @@ -3154,6 +3155,7 @@ iBool handleCommand_App(const char *cmd) { else { setUse_GmIdentity(ident, collect_String(suffix_Command(cmd, "url")), iFalse); } + postCommand_App("navigate.reload"); postCommand_App("idents.changed"); return iTrue; } @@ -3164,7 +3166,7 @@ iBool handleCommand_App(const char *cmd) { const iGmIdentity *cur = identityForUrl_GmCerts(d->certs, docUrl); iGmIdentity *dst = findIdentity_GmCerts( d->certs, collect_Block(hexDecode_Rangecc(range_Command(cmd, "fp")))); - if (cur && dst && cur != dst) { + if (dst && cur != dst) { iString *useUrl = copy_String(findUse_GmIdentity(cur, docUrl)); if (isEmpty_String(useUrl)) { useUrl = copy_String(docUrl); diff --git a/src/gmcerts.c b/src/gmcerts.c index 345c36e0..ed4759be 100644 --- a/src/gmcerts.c +++ b/src/gmcerts.c @@ -146,6 +146,7 @@ iBool isUsed_GmIdentity(const iGmIdentity *d) { } iBool isUsedOn_GmIdentity(const iGmIdentity *d, const iString *url) { +#if 0 size_t pos = iInvalidPos; locate_StringSet(d->useUrls, url, &pos); if (pos < size_StringSet(d->useUrls)) { @@ -159,6 +160,12 @@ iBool isUsedOn_GmIdentity(const iGmIdentity *d, const iString *url) { return iTrue; } } +#endif + iConstForEach(StringSet, i, d->useUrls) { + if (startsWithCase_String(url, cstr_String(i.value))) { + return iTrue; + } + } return iFalse; } @@ -193,7 +200,13 @@ void setUse_GmIdentity(iGmIdentity *d, const iString *url, iBool use) { iAssert(wasInserted); } else { - remove_StringSet(d->useUrls, url); + iForEach(Array, i, &d->useUrls->strings.values) { + iString *used = i.value; + if (startsWithCase_String(url, cstr_String(used))) { + deinit_String(used); + remove_ArrayIterator(&i); + } + } } } @@ -202,6 +215,7 @@ void clearUse_GmIdentity(iGmIdentity *d) { } const iString *findUse_GmIdentity(const iGmIdentity *d, const iString *url) { + if (!d) return NULL; iConstForEach(StringSet, using, d->useUrls) { if (startsWith_String(url, cstr_String(using.value))) { return using.value; diff --git a/src/ui/certlistwidget.c b/src/ui/certlistwidget.c index c67203e3..7c140c19 100644 --- a/src/ui/certlistwidget.c +++ b/src/ui/certlistwidget.c @@ -113,7 +113,7 @@ static void updateContextMenu_CertListWidget_(iCertListWidget *d) { iBool usedOnCurrentPage = iFalse; iConstForEach(StringSet, i, ident->useUrls) { const iString *url = i.value; - usedOnCurrentPage |= equalCase_String(docUrl, url); + usedOnCurrentPage |= startsWithCase_String(docUrl, cstr_String(url)); iRangecc urlStr = range_String(url); if (startsWith_Rangecc(urlStr, "gemini://")) { urlStr.start += 9; /* omit the default scheme */ @@ -128,6 +128,9 @@ static void updateContextMenu_CertListWidget_(iCertListWidget *d) { if (!usedOnCurrentPage) { remove_Array(items, 1); } + else { + remove_Array(items, 0); + } } destroy_Widget(d->menu); d->menu = makeMenu_Widget(as_Widget(d), data_Array(items), size_Array(items)); @@ -166,8 +169,8 @@ static iBool processEvent_CertListWidget_(iCertListWidget *d, const SDL_Event *e return iTrue; } else if (isCommand_Widget(w, ev, "ident.use")) { - iGmIdentity * ident = menuIdentity_CertListWidget_(d); - const iString *tabUrl = url_DocumentWidget(document_App()); + iGmIdentity *ident = menuIdentity_CertListWidget_(d); + const iString *tabUrl = urlQueryStripped_String(url_DocumentWidget(document_App())); if (ident) { if (argLabel_Command(cmd, "clear")) { clearUse_GmIdentity(ident); @@ -388,7 +391,6 @@ void init_CertListWidget(iCertListWidget *d) { init_ListWidget(&d->list); setId_Widget(w, "certlist"); setBackgroundColor_Widget(w, none_ColorId); - setItemHeight_ListWidget(&d->list, 3.5f * lineHeight_Text(default_FontId)); d->itemFonts[0] = uiContent_FontId; d->itemFonts[1] = uiContentBold_FontId; #if defined (iPlatformMobile) @@ -397,6 +399,7 @@ void init_CertListWidget(iCertListWidget *d) { d->itemFonts[1] = uiLabelBigBold_FontId; } #endif + updateItemHeight_CertListWidget(d); d->menu = NULL; d->contextItem = NULL; d->contextIndex = iInvalidPos; @@ -443,7 +446,7 @@ iBool updateItems_CertListWidget(iCertListWidget *d) { cstr_String(&ident->notes)); } item->listItem.isSelected = isActive; - if (isUsedOnDomain_GmIdentity(ident, tabHost)) { + if (!isActive && isUsedOnDomain_GmIdentity(ident, tabHost)) { item->indent = 1; /* will be highlighted */ } addItem_ListWidget(&d->list, item); diff --git a/src/ui/documentwidget.c b/src/ui/documentwidget.c index 3fb8498b..95286566 100644 --- a/src/ui/documentwidget.c +++ b/src/ui/documentwidget.c @@ -1289,8 +1289,13 @@ static void showErrorPage_DocumentWidget_(iDocumentWidget *d, enum iGmStatusCode if (category_GmStatusCode(code) == categoryClientCertificate_GmStatus) { makeFooterButtons_DocumentWidget_( d, - (iMenuItem[]){ { leftHalf_Icon " ${menu.show.identities}", '4', KMOD_PRIMARY, "sidebar.mode arg:3 show:1" }, - { person_Icon " ${menu.identity.new}", newIdentity_KeyShortcut, "ident.new" } }, + (iMenuItem[]){ + { leftHalf_Icon " ${menu.show.identities}", + '4', + KMOD_PRIMARY, + deviceType_App() == desktop_AppDeviceType ? "sidebar.mode arg:3 show:1" + : "preferences idents:1" }, + { person_Icon " ${menu.identity.new}", newIdentity_KeyShortcut, "ident.new" } }, 2); } /* Make a new document for the error page.*/ diff --git a/src/ui/root.c b/src/ui/root.c index 5df4b36f..f722df94 100644 --- a/src/ui/root.c +++ b/src/ui/root.c @@ -344,41 +344,47 @@ static iBool handleRootCommands_(iWidget *root, const char *cmd) { if (ident) { str = copy_String(name_GmIdentity(ident)); if (!isEmpty_String(&ident->notes)) { - appendFormat_String(str, "\n%s%s", escape_Color(uiAnnotation_ColorId), - cstr_String(&ident->notes)); + appendFormat_String(str, "\n\x1b[0m" uiHeading_ColorEscape "%s", cstr_String(&ident->notes)); } } - pushBackN_Array( + pushBack_Array( &items, - (iMenuItem[]){ { format_CStr("///" uiHeading_ColorEscape "%s", - str ? cstr_String(str) : "${menu.identity.notactive}") }, - { "---" } }, - 2); + &(iMenuItem){ format_CStr("```" uiHeading_ColorEscape "\x1b[1m%s", + str ? cstr_String(str) : "${menu.identity.notactive}") }); + if (ident && isUsedOn_GmIdentity(ident, docUrl)) { + pushBack_Array(&items, + &(iMenuItem){ close_Icon " ${ident.stopuse}", + 0, + 0, + format_CStr("ident.signout ident:%s url:%s", + cstr_String(fp), + cstr_String(docUrl)) }); + } + pushBack_Array(&items, &(iMenuItem){ "---" }); delete_String(str); /* Alternate identities. */ - if (ident) { - const iString *site = collectNewRange_String(urlRoot_String(docUrl)); - iBool haveAlts = iFalse; - iConstForEach(StringArray, i, strings_SiteSpec(site, usedIdentities_SiteSpecKey)) { - if (!equal_String(i.value, fp)) { - const iBlock *otherFp = collect_Block(hexDecode_Rangecc(range_String(i.value))); - const iGmIdentity *other = findIdentity_GmCerts(certs_App(), otherFp); - if (other) { - pushBack_Array( - &items, - &(iMenuItem){ - format_CStr(translateCStr_Lang("\U0001f816 ${ident.switch}"), - cstr_String(name_GmIdentity(other))), - 0, - 0, - format_CStr("ident.switch fp:%s", cstr_String(i.value)) }); - haveAlts = iTrue; - } + const iString *site = collectNewRange_String(urlRoot_String(docUrl)); + iBool haveAlts = iFalse; + iConstForEach(StringArray, i, strings_SiteSpec(site, usedIdentities_SiteSpecKey)) { + if (!fp || !equal_String(i.value, fp)) { + const iBlock *otherFp = collect_Block(hexDecode_Rangecc(range_String(i.value))); + const iGmIdentity *other = findIdentity_GmCerts(certs_App(), otherFp); + if (other && other != ident) { + pushBack_Array( + &items, + &(iMenuItem){ + format_CStr(translateCStr_Lang("\U0001f816 ${ident.switch}"), + format_CStr("\x1b[1m%s", + cstr_String(name_GmIdentity(other)))), + 0, + 0, + format_CStr("ident.switch fp:%s", cstr_String(i.value)) }); + haveAlts = iTrue; } } - if (haveAlts) { - pushBack_Array(&items, &(iMenuItem){ "---" }); - } + } + if (haveAlts) { + pushBack_Array(&items, &(iMenuItem){ "---" }); } iSidebarWidget *sidebar = findWidget_App("sidebar"); pushBackN_Array( @@ -388,14 +394,14 @@ static iBool handleRootCommands_(iWidget *root, const char *cmd) { { "${menu.identity.import}", SDLK_i, KMOD_PRIMARY | KMOD_SHIFT, "ident.import" }, { "---" } }, 3); if (deviceType_App() == desktop_AppDeviceType) { - pushBack_Array(&items, &(iMenuItem) - { isVisible_Widget(sidebar) && mode_SidebarWidget(sidebar) == identities_SidebarMode - ? leftHalf_Icon " ${menu.hide.identities}" - : leftHalf_Icon " ${menu.show.identities}", - 0, - 0, - //deviceType_App() == phone_AppDeviceType ? "toolbar.showident" - "sidebar.mode arg:3 toggle:1" }); + pushBack_Array(&items, + &(iMenuItem){ isVisible_Widget(sidebar) && mode_SidebarWidget(sidebar) == + identities_SidebarMode + ? leftHalf_Icon " ${menu.hide.identities}" + : leftHalf_Icon " ${menu.show.identities}", + 0, + 0, + "sidebar.mode arg:3 toggle:1" }); } else { pushBack_Array(&items, &(iMenuItem){ gear_Icon " ${menu.identities}", 0, 0, diff --git a/src/ui/sidebarwidget.c b/src/ui/sidebarwidget.c index 9b94f4d9..13fc33b1 100644 --- a/src/ui/sidebarwidget.c +++ b/src/ui/sidebarwidget.c @@ -591,6 +591,9 @@ iBool setMode_SidebarWidget(iSidebarWidget *d, enum iSidebarMode mode) { if (d->mode == mode) { return iFalse; } + if (mode == identities_SidebarMode && deviceType_App() != desktop_AppDeviceType) { + return iFalse; /* Identities are in Settings. */ + } if (d->mode >= 0 && d->mode < max_SidebarMode) { d->modeScroll[d->mode] = scrollPos_ListWidget(list_SidebarWidget_(d)); /* saved for later */ } @@ -705,33 +708,34 @@ void init_SidebarWidget(iSidebarWidget *d, enum iSidebarSide side) { d->certList = NULL; d->actions = NULL; d->closedFolders = new_IntSet(); - /* On a phone, the right sidebar is used exclusively for Identities. */ + /* On a phone, the right sidebar is not used. */ const iBool isPhone = deviceType_App() == phone_AppDeviceType; - if (!isPhone || d->side == left_SidebarSide) { - iWidget *buttons = new_Widget(); - setId_Widget(buttons, "buttons"); - setDrawBufferEnabled_Widget(buttons, iTrue); - for (int i = 0; i < max_SidebarMode; i++) { - if (i == identities_SidebarMode && deviceType_App() != desktop_AppDeviceType) { - /* On mobile, identities are managed via Settings. */ - continue; - } - d->modeButtons[i] = addChildFlags_Widget( - buttons, - iClob(new_LabelWidget( - tightModeLabels_[i], - format_CStr("%s.mode arg:%d", cstr_String(id_Widget(w)), i))), - frameless_WidgetFlag | noBackground_WidgetFlag); - } - setButtonFont_SidebarWidget(d, isPhone ? uiLabelBig_FontId : uiLabel_FontId); - addChildFlags_Widget(vdiv, - iClob(buttons), - arrangeHorizontal_WidgetFlag | - resizeWidthOfChildren_WidgetFlag | - arrangeHeight_WidgetFlag | resizeToParentWidth_WidgetFlag); // | -// drawBackgroundToHorizontalSafeArea_WidgetFlag); - setBackgroundColor_Widget(buttons, uiBackgroundSidebar_ColorId); + //if (!isPhone || d->side == left_SidebarSide) { + iWidget *buttons = new_Widget(); + setId_Widget(buttons, "buttons"); + setDrawBufferEnabled_Widget(buttons, iTrue); + for (int i = 0; i < max_SidebarMode; i++) { + if (i == identities_SidebarMode && deviceType_App() != desktop_AppDeviceType) { + /* On mobile, identities are managed via Settings. */ + continue; + } + d->modeButtons[i] = addChildFlags_Widget( + buttons, + iClob(new_LabelWidget( + tightModeLabels_[i], + format_CStr("%s.mode arg:%d", cstr_String(id_Widget(w)), i))), + frameless_WidgetFlag | noBackground_WidgetFlag); } + setButtonFont_SidebarWidget(d, isPhone ? uiLabelBig_FontId : uiLabel_FontId); + addChildFlags_Widget(vdiv, + iClob(buttons), + arrangeHorizontal_WidgetFlag | + resizeWidthOfChildren_WidgetFlag | + arrangeHeight_WidgetFlag | resizeToParentWidth_WidgetFlag); // | +// drawBackgroundToHorizontalSafeArea_WidgetFlag); + setBackgroundColor_Widget(buttons, uiBackgroundSidebar_ColorId); +// } +#if 0 else { iLabelWidget *heading = new_LabelWidget(person_Icon " ${sidebar.identities}", NULL); checkIcon_LabelWidget(heading); @@ -742,6 +746,7 @@ void init_SidebarWidget(iSidebarWidget *d, enum iSidebarSide side) { drawBackgroundToHorizontalSafeArea_WidgetFlag), uiLabelLargeBold_FontId); } +#endif iWidget *content = new_Widget(); setFlags_Widget(content, resizeChildren_WidgetFlag, iTrue); iWidget *listAndActions = makeVDiv_Widget(); @@ -771,8 +776,8 @@ void init_SidebarWidget(iSidebarWidget *d, enum iSidebarSide side) { addChildFlags_Widget(content, iClob(d->blank), resizeChildren_WidgetFlag); addChildFlags_Widget(vdiv, iClob(content), expand_WidgetFlag); setMode_SidebarWidget(d, - deviceType_App() == phone_AppDeviceType && d->side == right_SidebarSide ? - identities_SidebarMode : bookmarks_SidebarMode); + /*deviceType_App() == phone_AppDeviceType && d->side == right_SidebarSide ? + identities_SidebarMode :*/ bookmarks_SidebarMode); d->resizer = addChildFlags_Widget(w, iClob(new_Widget()), -- cgit v1.2.3 From 723fcbf263bd2f5ff6c259a47091ebf685b50723 Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Sat, 4 Dec 2021 07:40:56 +0200 Subject: Mobile: Sidebar is now a vertically sliding panel Switched the phone sidebar to use the iOS half/full-height sliding sheet design. This is better for finger reachability and for retaining access to the current page. --- po/en.po | 3 + res/lang/cs.bin | Bin 31081 -> 31100 bytes res/lang/de.bin | Bin 30088 -> 30107 bytes res/lang/en.bin | Bin 26185 -> 26204 bytes res/lang/eo.bin | Bin 25139 -> 25158 bytes res/lang/es.bin | Bin 29912 -> 29931 bytes res/lang/es_MX.bin | Bin 27244 -> 27263 bytes res/lang/fi.bin | Bin 29745 -> 29764 bytes res/lang/fr.bin | Bin 30892 -> 30911 bytes res/lang/gl.bin | Bin 29097 -> 29116 bytes res/lang/hu.bin | Bin 30917 -> 30936 bytes res/lang/ia.bin | Bin 28244 -> 28263 bytes res/lang/ie.bin | Bin 28832 -> 28851 bytes res/lang/isv.bin | Bin 24905 -> 24924 bytes res/lang/pl.bin | Bin 29520 -> 29539 bytes res/lang/ru.bin | Bin 44280 -> 44299 bytes res/lang/sk.bin | Bin 25241 -> 25260 bytes res/lang/sr.bin | Bin 43706 -> 43725 bytes res/lang/tok.bin | Bin 26954 -> 26973 bytes res/lang/tr.bin | Bin 29138 -> 29157 bytes res/lang/uk.bin | Bin 43625 -> 43644 bytes res/lang/zh_Hans.bin | Bin 25139 -> 25158 bytes res/lang/zh_Hant.bin | Bin 25337 -> 25356 bytes src/ui/documentwidget.c | 6 +- src/ui/listwidget.c | 35 ++++++- src/ui/listwidget.h | 8 ++ src/ui/root.c | 106 ++++++++----------- src/ui/sidebarwidget.c | 271 ++++++++++++++++++++++++++++++++++++++---------- src/ui/sidebarwidget.h | 1 + src/ui/touch.c | 37 +++++-- src/ui/touch.h | 1 + src/ui/widget.c | 1 + src/ui/widget.h | 5 + 33 files changed, 343 insertions(+), 131 deletions(-) (limited to 'po') diff --git a/po/en.po b/po/en.po index 6b604d61..6996d28c 100644 --- a/po/en.po +++ b/po/en.po @@ -401,6 +401,9 @@ msgstr "Manage Identities" msgid "menu.identity.notactive" msgstr "No Active Identity" +msgid "sidebar.close" +msgstr "Done" + msgid "sidebar.bookmarks" msgstr "Bookmarks" diff --git a/res/lang/cs.bin b/res/lang/cs.bin index cf37c7de..a8981bd4 100644 Binary files a/res/lang/cs.bin and b/res/lang/cs.bin differ diff --git a/res/lang/de.bin b/res/lang/de.bin index a9d497d7..6d17ff3b 100644 Binary files a/res/lang/de.bin and b/res/lang/de.bin differ diff --git a/res/lang/en.bin b/res/lang/en.bin index 5e24ab94..4749f358 100644 Binary files a/res/lang/en.bin and b/res/lang/en.bin differ diff --git a/res/lang/eo.bin b/res/lang/eo.bin index 789c01c2..b3e06797 100644 Binary files a/res/lang/eo.bin and b/res/lang/eo.bin differ diff --git a/res/lang/es.bin b/res/lang/es.bin index 7ca8e297..2265ddf1 100644 Binary files a/res/lang/es.bin and b/res/lang/es.bin differ diff --git a/res/lang/es_MX.bin b/res/lang/es_MX.bin index 43a5bb77..810bc543 100644 Binary files a/res/lang/es_MX.bin and b/res/lang/es_MX.bin differ diff --git a/res/lang/fi.bin b/res/lang/fi.bin index 5a0ec586..ccc61bd4 100644 Binary files a/res/lang/fi.bin and b/res/lang/fi.bin differ diff --git a/res/lang/fr.bin b/res/lang/fr.bin index 329cae2b..355073bd 100644 Binary files a/res/lang/fr.bin and b/res/lang/fr.bin differ diff --git a/res/lang/gl.bin b/res/lang/gl.bin index 527de83b..30c5fb5f 100644 Binary files a/res/lang/gl.bin and b/res/lang/gl.bin differ diff --git a/res/lang/hu.bin b/res/lang/hu.bin index 82257541..90f32f47 100644 Binary files a/res/lang/hu.bin and b/res/lang/hu.bin differ diff --git a/res/lang/ia.bin b/res/lang/ia.bin index 5f1d7ab2..a9672e07 100644 Binary files a/res/lang/ia.bin and b/res/lang/ia.bin differ diff --git a/res/lang/ie.bin b/res/lang/ie.bin index 0d866d47..058ab7ff 100644 Binary files a/res/lang/ie.bin and b/res/lang/ie.bin differ diff --git a/res/lang/isv.bin b/res/lang/isv.bin index d30dcf4f..ccf1f206 100644 Binary files a/res/lang/isv.bin and b/res/lang/isv.bin differ diff --git a/res/lang/pl.bin b/res/lang/pl.bin index e9fd8460..d49b1fdd 100644 Binary files a/res/lang/pl.bin and b/res/lang/pl.bin differ diff --git a/res/lang/ru.bin b/res/lang/ru.bin index f8a69f51..cb2baebc 100644 Binary files a/res/lang/ru.bin and b/res/lang/ru.bin differ diff --git a/res/lang/sk.bin b/res/lang/sk.bin index 9d0e9f04..50ee11ce 100644 Binary files a/res/lang/sk.bin and b/res/lang/sk.bin differ diff --git a/res/lang/sr.bin b/res/lang/sr.bin index bbaba1e9..d27c1c48 100644 Binary files a/res/lang/sr.bin and b/res/lang/sr.bin differ diff --git a/res/lang/tok.bin b/res/lang/tok.bin index 517194d1..89e9526c 100644 Binary files a/res/lang/tok.bin and b/res/lang/tok.bin differ diff --git a/res/lang/tr.bin b/res/lang/tr.bin index e0aef190..ef7f8f61 100644 Binary files a/res/lang/tr.bin and b/res/lang/tr.bin differ diff --git a/res/lang/uk.bin b/res/lang/uk.bin index 0c261c00..cff8fb7d 100644 Binary files a/res/lang/uk.bin and b/res/lang/uk.bin differ diff --git a/res/lang/zh_Hans.bin b/res/lang/zh_Hans.bin index d31b280b..e8dafce4 100644 Binary files a/res/lang/zh_Hans.bin and b/res/lang/zh_Hans.bin differ diff --git a/res/lang/zh_Hant.bin b/res/lang/zh_Hant.bin index e06f4339..898bbddc 100644 Binary files a/res/lang/zh_Hant.bin and b/res/lang/zh_Hant.bin differ diff --git a/src/ui/documentwidget.c b/src/ui/documentwidget.c index 95286566..0ef80690 100644 --- a/src/ui/documentwidget.c +++ b/src/ui/documentwidget.c @@ -2620,9 +2620,9 @@ static iBool handleSwipe_DocumentWidget_(iDocumentWidget *d, const char *cmd) { /* The temporary "swipeIn" will display the previous page until the finger is lifted. */ iDocumentWidget *swipeIn = findChild_Widget(swipeParent, "swipein"); if (!swipeIn) { - const iBool sidebarSwipe = (isPortraitPhone_App() && + const iBool sidebarSwipe = iFalse; /* && (isPortraitPhone_App() && d->flags & openedFromSidebar_DocumentWidgetFlag && - !isVisible_Widget(findWidget_App("sidebar"))); + !isVisible_Widget(findWidget_App("sidebar"))); */ swipeIn = new_DocumentWidget(); setId_Widget(as_Widget(swipeIn), "swipein"); setFlags_Widget(as_Widget(swipeIn), @@ -3235,6 +3235,7 @@ static iBool handleCommand_DocumentWidget_(iDocumentWidget *d, const char *cmd) return iTrue; } else if (equal_Command(cmd, "navigate.back") && document_App() == d) { +#if 0 if (isPortraitPhone_App()) { if (d->flags & openedFromSidebar_DocumentWidgetFlag && !isVisible_Widget(findWidget_App("sidebar"))) { @@ -3247,6 +3248,7 @@ static iBool handleCommand_DocumentWidget_(iDocumentWidget *d, const char *cmd) } d->flags &= ~openedFromSidebar_DocumentWidgetFlag; } +#endif if (d->request) { postCommandf_Root(w->root, "document.request.cancelled doc:%p url:%s", d, cstr_String(d->mod.url)); diff --git a/src/ui/listwidget.c b/src/ui/listwidget.c index 82e4e451..d12afc4c 100644 --- a/src/ui/listwidget.c +++ b/src/ui/listwidget.c @@ -81,6 +81,7 @@ void init_ListWidget(iListWidget *d) { setThumb_ScrollWidget(d->scroll, 0, 0); init_SmoothScroll(&d->scrollY, w, scrollBegan_ListWidget_); d->itemHeight = 0; + d->scrollMode = normal_ScrollMode; d->noHoverWhileScrolling = iFalse; init_PtrArray(&d->items); d->hoverItem = iInvalidPos; @@ -187,6 +188,10 @@ void setScrollPos_ListWidget(iListWidget *d, int pos) { refresh_Widget(as_Widget(d)); } +void setScrollMode_ListWidget(iListWidget *d, enum iScrollMode mode) { + d->scrollMode = mode; +} + void scrollOffset_ListWidget(iListWidget *d, int offset) { moveSpan_SmoothScroll(&d->scrollY, offset, 0); } @@ -366,12 +371,28 @@ static iBool endDrag_ListWidget_(iListWidget *d, iInt2 endPos) { return iTrue; } +static iBool isScrollDisabled_ListWidget_(const iListWidget *d, const SDL_Event *ev) { + int dir = 0; + if (ev->type == SDL_MOUSEWHEEL) { + dir = iSign(ev->wheel.y); + } + switch (d->scrollMode) { + case disabledAtTopBothDirections_ScrollMode: + return scrollPos_ListWidget(d) <= 0; + case disabledAtTopUpwards_ScrollMode: + return scrollPos_ListWidget(d) <= 0 && dir > 0; + default: + break; + } + return iFalse; +} + static iBool processEvent_ListWidget_(iListWidget *d, const SDL_Event *ev) { iWidget *w = as_Widget(d); if (isMetricsChange_UserEvent(ev)) { invalidate_ListWidget(d); } - else if (processEvent_SmoothScroll(&d->scrollY, ev)) { + else if (!isScrollDisabled_ListWidget_(d, ev) && processEvent_SmoothScroll(&d->scrollY, ev)) { return iTrue; } else if (isCommand_SDLEvent(ev)) { @@ -420,6 +441,18 @@ static iBool processEvent_ListWidget_(iListWidget *d, const SDL_Event *ev) { } } if (ev->type == SDL_MOUSEWHEEL && isHover_Widget(w)) { + if (isScrollDisabled_ListWidget_(d, ev)) { + if (ev->wheel.which == SDL_TOUCH_MOUSEID) { + /* TODO: Could generalize this selection of the scrollable parent. */ + extern iWidgetClass Class_SidebarWidget; + iWidget *sidebar = findParentClass_Widget(w, &Class_SidebarWidget); + if (sidebar) { + transferAffinity_Touch(w, sidebar); + d->noHoverWhileScrolling = iTrue; + } + } + return iFalse; + } int amount = -ev->wheel.y; if (isPerPixel_MouseWheelEvent(&ev->wheel)) { stop_Anim(&d->scrollY.pos); diff --git a/src/ui/listwidget.h b/src/ui/listwidget.h index 7e6624a0..081109e8 100644 --- a/src/ui/listwidget.h +++ b/src/ui/listwidget.h @@ -51,6 +51,12 @@ iDeclareObjectConstruction(ListWidget) iDeclareType(VisBuf) +enum iScrollMode { + normal_ScrollMode, + disabledAtTopBothDirections_ScrollMode, + disabledAtTopUpwards_ScrollMode, +}; + struct Impl_ListWidget { iWidget widget; iScrollWidget *scroll; @@ -63,6 +69,7 @@ struct Impl_ListWidget { iClick click; iIntSet invalidItems; iVisBuf *visBuf; + enum iScrollMode scrollMode; iBool noHoverWhileScrolling; }; @@ -82,6 +89,7 @@ int itemHeight_ListWidget (const iListWidget *); int scrollPos_ListWidget (const iListWidget *); void setScrollPos_ListWidget (iListWidget *, int pos); +void setScrollMode_ListWidget (iListWidget *, enum iScrollMode mode); void scrollToItem_ListWidget (iListWidget *, size_t index, uint32_t span); void scrollOffset_ListWidget (iListWidget *, int offset); void scrollOffsetSpan_ListWidget (iListWidget *, int offset, uint32_t span); diff --git a/src/ui/root.c b/src/ui/root.c index f722df94..65fc11d1 100644 --- a/src/ui/root.c +++ b/src/ui/root.c @@ -487,11 +487,23 @@ static iBool handleRootCommands_(iWidget *root, const char *cmd) { else if (deviceType_App() == phone_AppDeviceType && equal_Command(cmd, "window.resized")) { /* Place the sidebar next to or under doctabs depending on orientation. */ iSidebarWidget *sidebar = findChild_Widget(root, "sidebar"); - iSidebarWidget *sidebar2 = findChild_Widget(root, "sidebar2"); removeChild_Widget(parent_Widget(sidebar), sidebar); - // setBackgroundColor_Widget(findChild_Widget(as_Widget(sidebar), "buttons"), - // isPortrait_App() ? uiBackgroundUnfocusedSelection_ColorId - // : uiBackgroundSidebar_ColorId); + if (isLandscape_App()) { + addChildPos_Widget(findChild_Widget(root, "tabs.content"), iClob(sidebar), front_WidgetAddPos); + setWidth_SidebarWidget(sidebar, 73.0f); + setFlags_Widget(as_Widget(sidebar), fixedHeight_WidgetFlag, iFalse); + } + else { + addChild_Widget(root, iClob(sidebar)); + setWidth_SidebarWidget(sidebar, (float) width_Widget(root) / (float) gap_UI); + const int midHeight = height_Widget(root) / 2;// + lineHeight_Text(uiLabelLarge_FontId); + setMidHeight_SidebarWidget(sidebar, midHeight); + setFixedSize_Widget(as_Widget(sidebar), init_I2(-1, midHeight)); + setPos_Widget(as_Widget(sidebar), init_I2(0, height_Widget(root) - midHeight)); + } +#if 0 + iSidebarWidget *sidebar = findChild_Widget(root, "sidebar"); + iSidebarWidget *sidebar2 = findChild_Widget(root, "sidebar2"); setFlags_Widget(findChild_Widget(as_Widget(sidebar), "buttons"), borderTop_WidgetFlag, isPortrait_App()); @@ -507,6 +519,7 @@ static iBool handleRootCommands_(iWidget *root, const char *cmd) { setWidth_SidebarWidget(sidebar, (float) width_Widget(root) / (float) gap_UI); setWidth_SidebarWidget(sidebar2, (float) width_Widget(root) / (float) gap_UI); } +#endif return iFalse; } else if (handleCommand_App(cmd)) { @@ -609,14 +622,14 @@ void updatePadding_Root(iRoot *d) { } } #endif - if (toolBar) { +// if (toolBar) { /* TODO: get this from toolBar height, but it's buggy for some reason */ - const int sidebarBottomPad = isPortrait_App() ? 11 * gap_UI + bottom : 0; - setPadding_Widget(findChild_Widget(d->widget, "sidebar"), 0, 0, 0, sidebarBottomPad); - setPadding_Widget(findChild_Widget(d->widget, "sidebar2"), 0, 0, 0, sidebarBottomPad); +// const int sidebarBottomPad = isPortrait_App() ? 11 * gap_UI + bottom : 0; +// setPadding_Widget(findChild_Widget(d->widget, "sidebar"), 0, 0, 0, sidebarBottomPad); + //setPadding_Widget(findChild_Widget(d->widget, "sidebar2"), 0, 0, 0, sidebarBottomPad); /* TODO: There seems to be unrelated layout glitch in the sidebar where its children are not arranged correctly until it's hidden and reshown. */ - } +// } /* Note that `handleNavBarCommands_` also adjusts padding and spacing. */ } @@ -1015,30 +1028,17 @@ static iBool handleToolBarCommands_(iWidget *toolBar, const char *cmd) { } else if (equal_Command(cmd, "toolbar.showview")) { /* TODO: Clean this up. */ - iWidget *sidebar = findWidget_App("sidebar"); - iWidget *sidebar2 = findWidget_App("sidebar2"); - dismissSidebar_(sidebar2, "toolbar.ident"); - const iBool isVisible = isVisible_Widget(sidebar); - // setFlags_Widget(findChild_Widget(toolBar, "toolbar.view"), noBackground_WidgetFlag, - // isVisible); +// iWidget *sidebar = findWidget_App("sidebar"); +// iWidget *sidebar2 = findWidget_App("sidebar2"); +// dismissSidebar_(sidebar2, "toolbar.ident"); +// const iBool isVisible = isVisible_Widget(sidebar); /* If a sidebar hasn't been shown yet, it's height is zero. */ - const int viewHeight = size_Root(get_Root()).y; +// const int viewHeight = size_Root(get_Root()).y; if (arg_Command(cmd) >= 0) { postCommandf_App("sidebar.mode arg:%d show:1", arg_Command(cmd)); -// if (!isVisible) { -// setVisualOffset_Widget(sidebar, viewHeight, 0, 0); -// setVisualOffset_Widget(sidebar, 0, 400, easeOut_AnimFlag | softer_AnimFlag); -// } } else { postCommandf_App("sidebar.toggle"); -// if (isVisible) { -// setVisualOffset_Widget(sidebar, height_Widget(sidebar), 250, easeIn_AnimFlag); -// } -// else { -// setVisualOffset_Widget(sidebar, viewHeight, 0, 0); -// setVisualOffset_Widget(sidebar, 0, 400, easeOut_AnimFlag | softer_AnimFlag); -// } } return iTrue; } @@ -1110,41 +1110,22 @@ void updateMetrics_Root(iRoot *d) { setFixedSize_Widget(appClose, appMin->rect.size); setFixedSize_Widget(appIcon, init_I2(appIconSize_Root(), appMin->rect.size.y)); } - iWidget *navBar = findChild_Widget(d->widget, "navbar"); -// iWidget *lock = findChild_Widget(navBar, "navbar.lock"); - iWidget *url = findChild_Widget(d->widget, "url"); - iWidget *rightEmbed = findChild_Widget(navBar, "url.rightembed"); - iWidget *embedPad = findChild_Widget(navBar, "url.embedpad"); - iWidget *urlButtons = findChild_Widget(navBar, "url.buttons"); + iWidget *navBar = findChild_Widget(d->widget, "navbar"); + iWidget *url = findChild_Widget(d->widget, "url"); + iWidget *rightEmbed = findChild_Widget(navBar, "url.rightembed"); + iWidget *embedPad = findChild_Widget(navBar, "url.embedpad"); + iWidget *urlButtons = findChild_Widget(navBar, "url.buttons"); + iLabelWidget *idName = findChild_Widget(d->widget, "toolbar.name"); setPadding_Widget(as_Widget(url), 0, gap_UI, 0, gap_UI); navBar->rect.size.y = 0; /* recalculate height based on children (FIXME: shouldn't be needed) */ -// updateSize_LabelWidget((iLabelWidget *) lock); -// updateSize_LabelWidget((iLabelWidget *) findChild_Widget(navBar, "reload")); -// arrange_Widget(urlButtons); setFixedSize_Widget(embedPad, init_I2(width_Widget(urlButtons) + gap_UI / 2, 1)); -// setContentPadding_InputWidget((iInputWidget *) url, width_Widget(lock) * 0.75, -// width_Widget(lock) * 0.75); rightEmbed->rect.pos.y = gap_UI; updatePadding_Root(d); arrange_Widget(d->widget); updateUrlInputContentPadding_(navBar); - /* Position the toolbar identity name label manually. */ { - iLabelWidget *idName = findChild_Widget(d->widget, "toolbar.name"); - if (idName) { - const iWidget *toolBar = findChild_Widget(d->widget, "toolbar"); - const iWidget *viewButton = findChild_Widget(d->widget, "toolbar.view"); - const iWidget *idButton = findChild_Widget(toolBar, "toolbar.ident"); -// const int font = uiLabelTiny_FontId; - setFixedSize_Widget(as_Widget(idName), init_I2(-1, 2 * gap_UI + lineHeight_Text(uiLabelTiny_FontId))); -// setFont_LabelWidget(idName, font); - /*setPos_Widget(as_Widget(idName), - windowToLocal_Widget(as_Widget(idName), - init_I2(left_Rect(bounds_Widget(idButton)), - bottom_Rect(bounds_Widget(viewButton)) - - lineHeight_Text(font) - gap_UI / 2))); - setFixedSize_Widget(as_Widget(idName), init_I2(width_Widget(idButton), - lineHeight_Text(font)));*/ - } + if (idName) { + setFixedSize_Widget(as_Widget(idName), + init_I2(-1, 2 * gap_UI + lineHeight_Text(uiLabelTiny_FontId))); } postRefresh_App(); } @@ -1168,11 +1149,9 @@ void createUserInterface_Root(iRoot *d) { setFlags_Widget( root, resizeChildren_WidgetFlag | fixedSize_WidgetFlag | focusRoot_WidgetFlag, iTrue); setCommandHandler_Widget(root, handleRootCommands_); - iWidget *div = makeVDiv_Widget(); setId_Widget(div, "navdiv"); addChild_Widget(root, iClob(div)); - #if defined (LAGRANGE_ENABLE_CUSTOM_FRAME) /* Window title bar. */ if (prefs_App()->customFrame) { @@ -1446,20 +1425,19 @@ void createUserInterface_Root(iRoot *d) { "newtab"); } /* Sidebars. */ { - iWidget *content = findChild_Widget(root, "tabs.content"); iSidebarWidget *sidebar1 = new_SidebarWidget(left_SidebarSide); - addChildPos_Widget(content, iClob(sidebar1), front_WidgetAddPos); if (deviceType_App() != phone_AppDeviceType) { + /* Sidebars are next to the tab content. */ + iWidget *content = findChild_Widget(root, "tabs.content"); + addChildPos_Widget(content, iClob(sidebar1), front_WidgetAddPos); iSidebarWidget *sidebar2 = new_SidebarWidget(right_SidebarSide); addChildPos_Widget(content, iClob(sidebar2), back_WidgetAddPos); } -#if 0 else { - /* The identities sidebar is always in the main area. */ - addChild_Widget(findChild_Widget(root, "stack"), iClob(sidebar2)); - setFlags_Widget(as_Widget(sidebar2), hidden_WidgetFlag, iTrue); + /* Sidebar is a slide-over. */ + addChild_Widget(/*findChild_Widget(root, "stack")*/ root, iClob(sidebar1)); + setFlags_Widget(as_Widget(sidebar1), hidden_WidgetFlag, iTrue); } -#endif } /* Lookup results. */ { iLookupWidget *lookup = new_LookupWidget(); diff --git a/src/ui/sidebarwidget.c b/src/ui/sidebarwidget.c index 13fc33b1..401c5d25 100644 --- a/src/ui/sidebarwidget.c +++ b/src/ui/sidebarwidget.c @@ -39,6 +39,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "paint.h" #include "root.h" #include "scrollwidget.h" +#include "touch.h" #include "util.h" #include "visited.h" @@ -99,13 +100,15 @@ struct Impl_SidebarWidget { iListWidget * list; iCertListWidget * certList; iWidget * actions; /* below the list, area for buttons */ + int midHeight; /* on portrait phone, the height for the middle state */ + iBool isBeingDraggedVertically; /* on portrait phone, sidebar can be dragged up/down */ int modeScroll[max_SidebarMode]; iLabelWidget * modeButtons[max_SidebarMode]; int maxButtonLabelWidth; float widthAsGaps; int buttonFont; int itemFonts[2]; - size_t numUnreadEntries; + size_t numUnreadEntries; iWidget * resizer; iWidget * menu; /* context menu for an item */ iWidget * modeMenu; /* context menu for the sidebar mode (no item) */ @@ -194,9 +197,9 @@ static iLabelWidget *addActionButton_SidebarWidget_(iSidebarWidget *d, const cha //(deviceType_App() != desktop_AppDeviceType ? // extraPadding_WidgetFlag : 0) | flags); - setFont_LabelWidget(btn, deviceType_App() == phone_AppDeviceType && d->side == right_SidebarSide - ? uiLabelBig_FontId - : d->buttonFont); + setFont_LabelWidget(btn, /*deviceType_App() == phone_AppDeviceType && d->side == right_SidebarSide + ? uiLabelBig_FontId : */ + d->buttonFont); checkIcon_LabelWidget(btn); return btn; } @@ -211,7 +214,12 @@ static iBool isBookmarkFolded_SidebarWidget_(const iSidebarWidget *d, const iBoo return iFalse; } +static iBool isSlidingSheet_SidebarWidget_(const iSidebarWidget *d) { + return isPortraitPhone_App();// && scrollPos_ListWidget(d->list) <= 0; +} + static void updateItemsWithFlags_SidebarWidget_(iSidebarWidget *d, iBool keepActions) { + const iBool isMobile = (deviceType_App() != desktop_AppDeviceType); clear_ListWidget(d->list); releaseChildren_Widget(d->blank); if (!keepActions) { @@ -299,9 +307,10 @@ static void updateItemsWithFlags_SidebarWidget_(iSidebarWidget *d, iBool keepAct } /* Actions. */ if (!keepActions) { - addActionButton_SidebarWidget_( - d, check_Icon " ${sidebar.action.feeds.markallread}", "feeds.markallread", expand_WidgetFlag | - tight_WidgetFlag); + addActionButton_SidebarWidget_(d, + check_Icon " ${sidebar.action.feeds.markallread}", + "feeds.markallread", + expand_WidgetFlag | tight_WidgetFlag); updateSize_LabelWidget(addChildFlags_Widget(d->actions, iClob(new_LabelWidget("${sidebar.action.show}", NULL)), frameless_WidgetFlag | tight_WidgetFlag)); @@ -617,6 +626,10 @@ void setClosedFolders_SidebarWidget(iSidebarWidget *d, const iIntSet *closedFold } } +void setMidHeight_SidebarWidget(iSidebarWidget *d, int midHeight) { + d->midHeight = midHeight; +} + enum iSidebarMode mode_SidebarWidget(const iSidebarWidget *d) { return d ? d->mode : 0; } @@ -686,6 +699,8 @@ void init_SidebarWidget(iSidebarWidget *d, enum iSidebarSide side) { d->side = side; d->mode = -1; d->feedsMode = all_FeedsMode; + d->midHeight = 0; + d->isBeingDraggedVertically = iFalse; d->numUnreadEntries = 0; d->buttonFont = uiLabel_FontId; /* wiil be changed later */ d->itemFonts[0] = uiContent_FontId; @@ -703,15 +718,24 @@ void init_SidebarWidget(iSidebarWidget *d, enum iSidebarSide side) { iWidget *vdiv = makeVDiv_Widget(); addChildFlags_Widget(w, vdiv, resizeToParentWidth_WidgetFlag | resizeToParentHeight_WidgetFlag); iZap(d->modeButtons); - d->resizer = NULL; - d->list = NULL; - d->certList = NULL; - d->actions = NULL; + d->resizer = NULL; + d->list = NULL; + d->certList = NULL; + d->actions = NULL; d->closedFolders = new_IntSet(); /* On a phone, the right sidebar is not used. */ - const iBool isPhone = deviceType_App() == phone_AppDeviceType; - //if (!isPhone || d->side == left_SidebarSide) { - iWidget *buttons = new_Widget(); + const iBool isPhone = (deviceType_App() == phone_AppDeviceType); + if (isPhone) { + iLabelWidget *closeButton = + addChildFlags_Widget(vdiv, + iClob(new_LabelWidget("${sidebar.close}", "sidebar.toggle")), + collapse_WidgetFlag | alignRight_WidgetFlag | + extraPadding_WidgetFlag | frameless_WidgetFlag); + as_Widget(closeButton)->flags2 |= slidingSheetDraggable_WidgetFlag2; /* phone */ + setId_Widget(as_Widget(closeButton), "sidebar.close"); + setFont_LabelWidget(closeButton, uiLabelBigBold_FontId); + } + iWidget *buttons = new_Widget(); setId_Widget(buttons, "buttons"); setDrawBufferEnabled_Widget(buttons, iTrue); for (int i = 0; i < max_SidebarMode; i++) { @@ -725,28 +749,14 @@ void init_SidebarWidget(iSidebarWidget *d, enum iSidebarSide side) { tightModeLabels_[i], format_CStr("%s.mode arg:%d", cstr_String(id_Widget(w)), i))), frameless_WidgetFlag | noBackground_WidgetFlag); + as_Widget(d->modeButtons[i])->flags2 |= slidingSheetDraggable_WidgetFlag2; /* phone */ } setButtonFont_SidebarWidget(d, isPhone ? uiLabelBig_FontId : uiLabel_FontId); addChildFlags_Widget(vdiv, iClob(buttons), - arrangeHorizontal_WidgetFlag | - resizeWidthOfChildren_WidgetFlag | - arrangeHeight_WidgetFlag | resizeToParentWidth_WidgetFlag); // | -// drawBackgroundToHorizontalSafeArea_WidgetFlag); + arrangeHorizontal_WidgetFlag | resizeWidthOfChildren_WidgetFlag | + arrangeHeight_WidgetFlag | resizeToParentWidth_WidgetFlag); setBackgroundColor_Widget(buttons, uiBackgroundSidebar_ColorId); -// } -#if 0 - else { - iLabelWidget *heading = new_LabelWidget(person_Icon " ${sidebar.identities}", NULL); - checkIcon_LabelWidget(heading); - setBackgroundColor_Widget(as_Widget(heading), uiBackgroundSidebar_ColorId); - setTextColor_LabelWidget(heading, uiTextSelected_ColorId); - setFont_LabelWidget(addChildFlags_Widget(vdiv, iClob(heading), borderTop_WidgetFlag | - alignLeft_WidgetFlag | frameless_WidgetFlag | - drawBackgroundToHorizontalSafeArea_WidgetFlag), - uiLabelLargeBold_FontId); - } -#endif iWidget *content = new_Widget(); setFlags_Widget(content, resizeChildren_WidgetFlag, iTrue); iWidget *listAndActions = makeVDiv_Widget(); @@ -756,15 +766,17 @@ void init_SidebarWidget(iSidebarWidget *d, enum iSidebarSide side) { d->list = new_ListWidget(); setPadding_Widget(as_Widget(d->list), 0, gap_UI, 0, gap_UI); addChild_Widget(listArea, iClob(d->list)); - d->certList = new_CertListWidget(); - setPadding_Widget(as_Widget(d->certList), 0, gap_UI, 0, gap_UI); - addChild_Widget(listArea, iClob(d->certList)); + if (!isPhone) { + d->certList = new_CertListWidget(); + setPadding_Widget(as_Widget(d->certList), 0, gap_UI, 0, gap_UI); + addChild_Widget(listArea, iClob(d->certList)); + } addChildFlags_Widget(listAndActions, iClob(listArea), expand_WidgetFlag); // | drawBackgroundToHorizontalSafeArea_WidgetFlag); setId_Widget(addChildPosFlags_Widget(listAndActions, iClob(d->actions = new_Widget()), - isPhone ? front_WidgetAddPos : back_WidgetAddPos, + /*isPhone ? front_WidgetAddPos :*/ back_WidgetAddPos, arrangeHorizontal_WidgetFlag | arrangeHeight_WidgetFlag | resizeWidthOfChildren_WidgetFlag), // | // drawBackgroundToHorizontalSafeArea_WidgetFlag), @@ -891,7 +903,7 @@ static void checkModeButtonLayout_SidebarWidget_(iSidebarWidget *d) { // updateMetrics_SidebarWidget_(d); updateItemHeight_SidebarWidget_(d); } - setButtonFont_SidebarWidget(d, isPortrait_App() ? uiLabelBig_FontId : uiLabel_FontId); + setButtonFont_SidebarWidget(d, isPortrait_App() ? uiLabelMedium_FontId : uiLabel_FontId); } const iBool isTight = (width_Rect(bounds_Widget(as_Widget(d->modeButtons[0]))) < d->maxButtonLabelWidth); @@ -982,6 +994,52 @@ iBool handleBookmarkEditorCommands_SidebarWidget_(iWidget *editor, const char *c return iFalse; } +static void animateSlidingSheetHeight_SidebarWidget_(iAny *sidebar) { + iWidget *d = sidebar; + const int oldSize = d->rect.size.y; + const int newSize = bottom_Rect(safeRect_Root(d->root)) - top_Rect(bounds_Widget(d)); + if (oldSize != newSize) { + d->rect.size.y = newSize; + arrange_Widget(d); + } +// printf("[%p] %u: %d animating %d\n", d, window_Widget(d)->frameTime, +// (flags_Widget(sidebar) & visualOffset_WidgetFlag) != 0, +// newSize); + if (!isFinished_Anim(&d->visualOffset)) { + addTicker_App(animateSlidingSheetHeight_SidebarWidget_, sidebar); + } +} + +enum iSlidingSheetPos { + top_SlidingSheetPos, + middle_SlidingSheetPos, + bottom_SlidingSheetPos, +}; + +static void setSlidingSheetPos_SidebarWidget_(iSidebarWidget *d, enum iSlidingSheetPos slide) { + iWidget *w = as_Widget(d); + const int pos = w->rect.pos.y; + const iRect safeRect = safeRect_Root(w->root); + if (slide == top_SlidingSheetPos) { + w->rect.pos.y = top_Rect(safeRect); + w->rect.size.y = height_Rect(safeRect); + setVisualOffset_Widget(w, pos - w->rect.pos.y, 0, 0); + setVisualOffset_Widget(w, 0, 200, easeOut_AnimFlag | softer_AnimFlag); + setScrollMode_ListWidget(d->list, disabledAtTopUpwards_ScrollMode); + } + else if (slide == bottom_SlidingSheetPos) { + postCommand_Widget(w, "sidebar.toggle"); + } + else { + w->rect.size.y = d->midHeight; + w->rect.pos.y = height_Rect(safeRect) - w->rect.size.y; + setVisualOffset_Widget(w, pos - w->rect.pos.y, 0, 0); + setVisualOffset_Widget(w, 0, 200, easeOut_AnimFlag | softer_AnimFlag); + setScrollMode_ListWidget(d->list, disabledAtTopBothDirections_ScrollMode); + } + animateSlidingSheetHeight_SidebarWidget_(d); +} + static iBool handleSidebarCommand_SidebarWidget_(iSidebarWidget *d, const char *cmd) { iWidget *w = as_Widget(d); if (equal_Command(cmd, "width")) { @@ -1011,35 +1069,58 @@ static iBool handleSidebarCommand_SidebarWidget_(iSidebarWidget *d, const char * argLabel_Command(cmd, "noanim") == 0 && (d->side == left_SidebarSide || deviceType_App() != phone_AppDeviceType); int visX = 0; + int visY = 0; if (isVisible_Widget(w)) { visX = left_Rect(bounds_Widget(w)) - left_Rect(w->root->widget->rect); + visY = top_Rect(bounds_Widget(w)) - top_Rect(w->root->widget->rect); } - setFlags_Widget(w, hidden_WidgetFlag, isVisible_Widget(w)); + const iBool isHiding = isVisible_Widget(w); + setFlags_Widget(w, hidden_WidgetFlag, isHiding); /* Safe area inset for mobile. */ const int safePad = (d->side == left_SidebarSide ? left_Rect(safeRect_Root(w->root)) : 0); - if (isVisible_Widget(w)) { - setFlags_Widget(w, keepOnTop_WidgetFlag, iFalse); - w->rect.size.x = d->widthAsGaps * gap_UI; - invalidate_ListWidget(d->list); - if (isAnimated) { + const int animFlags = easeOut_AnimFlag | softer_AnimFlag; + if (!isPortraitPhone_App()) { + if (!isHiding) { + setFlags_Widget(w, keepOnTop_WidgetFlag, iFalse); + w->rect.size.x = d->widthAsGaps * gap_UI; + invalidate_ListWidget(d->list); + if (isAnimated) { + setFlags_Widget(w, horizontalOffset_WidgetFlag, iTrue); + setVisualOffset_Widget( + w, (d->side == left_SidebarSide ? -1 : 1) * (w->rect.size.x + safePad), 0, 0); + setVisualOffset_Widget(w, 0, 300, animFlags); + } + } + else if (isAnimated) { setFlags_Widget(w, horizontalOffset_WidgetFlag, iTrue); - setVisualOffset_Widget( - w, (d->side == left_SidebarSide ? -1 : 1) * (w->rect.size.x + safePad), 0, 0); - setVisualOffset_Widget(w, 0, 300, easeOut_AnimFlag | softer_AnimFlag); + if (d->side == right_SidebarSide) { + setVisualOffset_Widget(w, visX, 0, 0); + setVisualOffset_Widget( + w, visX + w->rect.size.x + safePad, 300, animFlags); + } + else { + setFlags_Widget(w, keepOnTop_WidgetFlag, iTrue); + setVisualOffset_Widget( + w, -w->rect.size.x - safePad, 300, animFlags); + } } + setScrollMode_ListWidget(d->list, normal_ScrollMode); } - else if (isAnimated) { - setFlags_Widget(w, horizontalOffset_WidgetFlag, iTrue); - if (d->side == right_SidebarSide) { - setVisualOffset_Widget(w, visX, 0, 0); - setVisualOffset_Widget( - w, visX + w->rect.size.x + safePad, 300, easeOut_AnimFlag | softer_AnimFlag); + else { + /* Portrait phone sidebar works differently: it slides up from the bottom. */ + setFlags_Widget(w, horizontalOffset_WidgetFlag, iFalse); + if (!isHiding) { + invalidate_ListWidget(d->list); + w->rect.pos.y = height_Rect(safeRect_Root(w->root)) - d->midHeight; + setVisualOffset_Widget(w, bottom_Rect(rect_Root(w->root)) - w->rect.pos.y, 0, 0); + setVisualOffset_Widget(w, 0, 300, animFlags); + animateSlidingSheetHeight_SidebarWidget_(d); + setScrollMode_ListWidget(d->list, disabledAtTopBothDirections_ScrollMode); } else { - setFlags_Widget(w, keepOnTop_WidgetFlag, iTrue); - setVisualOffset_Widget( - w, -w->rect.size.x - safePad, 300, easeOut_AnimFlag | softer_AnimFlag); + setVisualOffset_Widget(w, bottom_Rect(rect_Root(w->root)) - w->rect.pos.y, 300, animFlags); } + showToolbar_Root(w->root, isHiding); } updateToolbarColors_Root(w->root); arrange_Widget(w->parent); @@ -1097,13 +1178,32 @@ static size_t numBookmarks_(const iPtrArray *bmList) { return num; } +static iRangei SlidingSheetMiddleRegion_SidebarWidget_(const iSidebarWidget *d) { + const iWidget *w = constAs_Widget(d); + const iRect safeRect = safeRect_Root(w->root); + const int midY = bottom_Rect(safeRect) - d->midHeight; + const int topHalf = (top_Rect(safeRect) + midY) / 2; + const int bottomHalf = (bottom_Rect(safeRect) + midY * 2) / 3; + return (iRangei){ topHalf, bottomHalf }; +} + +static void gotoNearestSlidingSheetPos_SidebarWidget_(iSidebarWidget *d) { + const iRangei midRegion = SlidingSheetMiddleRegion_SidebarWidget_(d); + const int pos = top_Rect(d->widget.rect); + setSlidingSheetPos_SidebarWidget_(d, pos < midRegion.start + ? top_SlidingSheetPos + : pos > midRegion.end ? bottom_SlidingSheetPos + : middle_SlidingSheetPos); +} + static iBool processEvent_SidebarWidget_(iSidebarWidget *d, const SDL_Event *ev) { iWidget *w = as_Widget(d); /* Handle commands. */ if (isResize_UserEvent(ev)) { checkModeButtonLayout_SidebarWidget_(d); - if (deviceType_App() == phone_AppDeviceType && d->side == left_SidebarSide) { - setFlags_Widget(w, rightEdgeDraggable_WidgetFlag, isPortrait_App()); + if (deviceType_App() == phone_AppDeviceType) { // && d->side == left_SidebarSide) { +// setFlags_Widget(w, rightEdgeDraggable_WidgetFlag, isPortrait_App()); + setFlags_Widget(findChild_Widget(w, "sidebar.close"), hidden_WidgetFlag, isLandscape_App()); /* In landscape, visibility of the toolbar is controlled separately. */ if (isVisible_Widget(w)) { postCommand_Widget(w, "sidebar.toggle"); @@ -1117,6 +1217,10 @@ static iBool processEvent_SidebarWidget_(iSidebarWidget *d, const SDL_Event *ev) setFlags_Widget(as_Widget(d->list), drawBackgroundToHorizontalSafeArea_WidgetFlag, isLandscape_App()); + setFlags_Widget(w, + drawBackgroundToBottom_WidgetFlag, + isPortrait_App()); + setBackgroundColor_Widget(w, isPortrait_App() ? uiBackgroundSidebar_ColorId : none_ColorId); return iFalse; } } @@ -1572,6 +1676,61 @@ static iBool processEvent_SidebarWidget_(iSidebarWidget *d, const SDL_Event *ev) return iTrue; } } + if (isSlidingSheet_SidebarWidget_(d)) { + if (ev->type == SDL_MOUSEWHEEL) { + enum iWidgetTouchMode touchMode = widgetMode_Touch(w); + if (touchMode == momentum_WidgetTouchMode) { + /* We don't do momentum. */ + float swipe = stopWidgetMomentum_Touch(w); +// printf("swipe: %f\n", swipe); + const iRangei midRegion = SlidingSheetMiddleRegion_SidebarWidget_(d); + const int pos = top_Rect(w->rect); + if (swipe < 500) { + gotoNearestSlidingSheetPos_SidebarWidget_(d); + } + else if (swipe > 6500 && ev->wheel.y > 0) { + /* Fast swipe down will dismiss. */ + setSlidingSheetPos_SidebarWidget_(d, bottom_SlidingSheetPos); + } + else if (ev->wheel.y < 0) { + setSlidingSheetPos_SidebarWidget_(d, top_SlidingSheetPos); + } + else if (pos < (midRegion.start + midRegion.end) / 2) { + setSlidingSheetPos_SidebarWidget_(d, middle_SlidingSheetPos); + } + else { + setSlidingSheetPos_SidebarWidget_(d, bottom_SlidingSheetPos); + } + } + else if (touchMode == touch_WidgetTouchMode) { + /* Move with the finger. */ + adjustEdges_Rect(&w->rect, ev->wheel.y, 0, 0, 0); + /* Upon reaching the top, scrolling is switched back to the list. */ + const iRect rootRect = safeRect_Root(w->root); + const int top = top_Rect(rootRect); + if (w->rect.pos.y < top) { + setScrollMode_ListWidget(d->list, disabledAtTopUpwards_ScrollMode); + setScrollPos_ListWidget(d->list, top - w->rect.pos.y); + transferAffinity_Touch(w, as_Widget(d->list)); + w->rect.pos.y = top; + w->rect.size.y = height_Rect(rootRect); + } + else { + setScrollMode_ListWidget(d->list, disabledAtTopBothDirections_ScrollMode); + } + arrange_Widget(w); + refresh_Widget(w); + } + else { + return iFalse; + } + return iTrue; + } + if (ev->type == SDL_USEREVENT && ev->user.code == widgetTouchEnds_UserEventCode) { + gotoNearestSlidingSheetPos_SidebarWidget_(d); + return iTrue; + } + } if (ev->type == SDL_MOUSEBUTTONDOWN && contains_Widget(as_Widget(d->list), init_I2(ev->button.x, ev->button.y))) { if (hoverItem_ListWidget(d->list) || isVisible_Widget(d->menu)) { diff --git a/src/ui/sidebarwidget.h b/src/ui/sidebarwidget.h index 81c6681f..2a930a60 100644 --- a/src/ui/sidebarwidget.h +++ b/src/ui/sidebarwidget.h @@ -54,6 +54,7 @@ iBool setMode_SidebarWidget (iSidebarWidget *, enum iSidebar void setWidth_SidebarWidget (iSidebarWidget *, float widthAsGaps); iBool setButtonFont_SidebarWidget (iSidebarWidget *, int font); void setClosedFolders_SidebarWidget (iSidebarWidget *, const iIntSet *closedFolders); +void setMidHeight_SidebarWidget (iSidebarWidget *, int midHeight); /* phone layout */ enum iSidebarMode mode_SidebarWidget (const iSidebarWidget *); enum iFeedsMode feedsMode_SidebarWidget (const iSidebarWidget *); diff --git a/src/ui/touch.c b/src/ui/touch.c index 195d1dff..aee5a383 100644 --- a/src/ui/touch.c +++ b/src/ui/touch.c @@ -589,9 +589,18 @@ iBool processEvent_Touch(const SDL_Event *ev) { divvf_F3(&touch->accum, 6); divfv_I2(&pixels, 6); /* Allow scrolling a scrollable widget. */ - iWidget *flow = findOverflowScrollable_Widget(touch->affinity); - if (flow) { - touch->affinity = flow; + if (touch->affinity && touch->affinity->flags2 & slidingSheetDraggable_WidgetFlag2) { + extern iWidgetClass Class_SidebarWidget; /* The only type of sliding sheet for now. */ + iWidget *slider = findParentClass_Widget(touch->affinity, &Class_SidebarWidget); + if (slider) { + touch->affinity = slider; + } + } + else { + iWidget *flow = findOverflowScrollable_Widget(touch->affinity); + if (flow) { + touch->affinity = flow; + } } } else { @@ -617,11 +626,13 @@ iBool processEvent_Touch(const SDL_Event *ev) { if (touch->axis == y_TouchAxis) { pixels.x = 0; } -// printf("%p (%s) py: %i wy: %f acc: %f edge: %d\n", -// touch->affinity, -// class_Widget(touch->affinity)->name, -// pixels.y, y_F3(amount), y_F3(touch->accum), -// touch->edge); +#if 0 + printf("%p (%s) py: %i wy: %f acc: %f edge: %d\n", + touch->affinity, + class_Widget(touch->affinity)->name, + pixels.y, y_F3(amount), y_F3(touch->accum), + touch->edge); +#endif if (pixels.x || pixels.y) { //setFocus_Widget(NULL); dispatchMotion_Touch_(touch->startPos /*pos[0]*/, 0); @@ -801,6 +812,16 @@ void widgetDestroyed_Touch(iWidget *widget) { } } +void transferAffinity_Touch(iWidget *src, iWidget *dst) { + iTouchState *d = touchState_(); + iForEach(Array, i, d->touches) { + iTouch *touch = i.value; + if (touch->affinity == src) { + touch->affinity = dst; + } + } +} + iInt2 latestPosition_Touch(void) { return touchState_()->currentTouchPos; } diff --git a/src/ui/touch.h b/src/ui/touch.h index e048224a..c9c76d86 100644 --- a/src/ui/touch.h +++ b/src/ui/touch.h @@ -39,6 +39,7 @@ void update_Touch (void); float stopWidgetMomentum_Touch (const iWidget *widget); enum iWidgetTouchMode widgetMode_Touch (const iWidget *widget); void widgetDestroyed_Touch (iWidget *widget); +void transferAffinity_Touch (iWidget *src, iWidget *dst); iInt2 latestPosition_Touch (void); /* valid during processing of current event */ iBool isHovering_Touch (void); /* stationary touch or a long-press drag ongoing */ diff --git a/src/ui/widget.c b/src/ui/widget.c index 210fe899..0d20cca9 100644 --- a/src/ui/widget.c +++ b/src/ui/widget.c @@ -124,6 +124,7 @@ void init_Widget(iWidget *d) { init_String(&d->id); d->root = get_Root(); /* never changes after this */ d->flags = 0; + d->flags2 = 0; d->rect = zero_Rect(); d->minSize = zero_I2(); d->sizeRef = NULL; diff --git a/src/ui/widget.h b/src/ui/widget.h index 4025f5c5..35be1bcb 100644 --- a/src/ui/widget.h +++ b/src/ui/widget.h @@ -123,6 +123,10 @@ enum iWidgetFlag { #define refChildrenOffset_WidgetFlag iBit64(63) /* visual offset determined by the offset of referenced children */ #define nativeMenu_WidgetFlag iBit64(64) +enum iWidgetFlag2 { + slidingSheetDraggable_WidgetFlag2 = iBit(1), +}; + enum iWidgetAddPos { back_WidgetAddPos, front_WidgetAddPos, @@ -139,6 +143,7 @@ struct Impl_Widget { iObject object; iString id; int64_t flags; + int flags2; iRect rect; iInt2 minSize; iWidget * sizeRef; -- cgit v1.2.3 From 8d255fca904c55fb8c15631c6845c8a87f1a0c6a Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Sat, 4 Dec 2021 09:49:16 +0200 Subject: Mobile: Sidebar actions for Feeds, History --- po/en.po | 3 + src/ui/sidebarwidget.c | 164 ++++++++++++++++++++++++++++++++++--------------- 2 files changed, 117 insertions(+), 50 deletions(-) (limited to 'po') diff --git a/po/en.po b/po/en.po index 6996d28c..08683659 100644 --- a/po/en.po +++ b/po/en.po @@ -438,6 +438,9 @@ msgstr "New…" msgid "sidebar.action.ident.import" msgstr "Import…" +msgid "sidebar.action.history.clear" +msgstr "Clear" + # Usage: "(count) Unread" in the sidebar tab title, referring to feed entries. msgid "sidebar.unread" msgid_plural "sidebar.unread.n" diff --git a/src/ui/sidebarwidget.c b/src/ui/sidebarwidget.c index 401c5d25..48802ddf 100644 --- a/src/ui/sidebarwidget.c +++ b/src/ui/sidebarwidget.c @@ -90,6 +90,22 @@ iDefineObjectConstruction(SidebarItem) /*----------------------------------------------------------------------------------------------*/ +static const char *normalModeLabels_[max_SidebarMode] = { + book_Icon " ${sidebar.bookmarks}", + star_Icon " ${sidebar.feeds}", + clock_Icon " ${sidebar.history}", + person_Icon " ${sidebar.identities}", + page_Icon " ${sidebar.outline}", +}; + +static const char *tightModeLabels_[max_SidebarMode] = { + book_Icon, + star_Icon, + clock_Icon, + person_Icon, + page_Icon, +}; + struct Impl_SidebarWidget { iWidget widget; enum iSidebarSide side; @@ -197,10 +213,14 @@ static iLabelWidget *addActionButton_SidebarWidget_(iSidebarWidget *d, const cha //(deviceType_App() != desktop_AppDeviceType ? // extraPadding_WidgetFlag : 0) | flags); - setFont_LabelWidget(btn, /*deviceType_App() == phone_AppDeviceType && d->side == right_SidebarSide + setFont_LabelWidget(btn, deviceType_App() == desktop_AppDeviceType ? /*deviceType_App() == phone_AppDeviceType && d->side == right_SidebarSide ? uiLabelBig_FontId : */ - d->buttonFont); + d->buttonFont : uiLabelBig_FontId); checkIcon_LabelWidget(btn); + if (deviceType_App() != desktop_AppDeviceType) { + setFlags_Widget(as_Widget(btn), frameless_WidgetFlag, iTrue); + setBackgroundColor_Widget(as_Widget(btn), uiBackground_ColorId); + } return btn; } @@ -306,36 +326,57 @@ static void updateItemsWithFlags_SidebarWidget_(iSidebarWidget *d, iBool keepAct } } /* Actions. */ - if (!keepActions) { - addActionButton_SidebarWidget_(d, - check_Icon " ${sidebar.action.feeds.markallread}", - "feeds.markallread", - expand_WidgetFlag | tight_WidgetFlag); - updateSize_LabelWidget(addChildFlags_Widget(d->actions, - iClob(new_LabelWidget("${sidebar.action.show}", NULL)), - frameless_WidgetFlag | tight_WidgetFlag)); - const iMenuItem items[] = { - { page_Icon " ${sidebar.action.feeds.showall}", SDLK_u, KMOD_SHIFT, "feeds.mode arg:0" }, - { circle_Icon " ${sidebar.action.feeds.showunread}", SDLK_u, 0, "feeds.mode arg:1" }, - }; - iWidget *dropButton = addChild_Widget( - d->actions, - iClob(makeMenuButton_LabelWidget(items[d->feedsMode].label, items, 2))); - setId_Widget(dropButton, "feeds.modebutton"); - checkIcon_LabelWidget((iLabelWidget *) dropButton); - setFixedSize_Widget( - dropButton, - init_I2(iMaxi(20 * gap_UI, - measure_Text(default_FontId, - translateCStr_Lang( - items[findWidestLabel_MenuItem(items, 2)].label)) - .advance.x + - 13 * gap_UI), - -1)); + if (!isMobile) { + if (!keepActions) { + addActionButton_SidebarWidget_(d, + check_Icon " ${sidebar.action.feeds.markallread}", + "feeds.markallread", + expand_WidgetFlag | tight_WidgetFlag); + updateSize_LabelWidget(addChildFlags_Widget(d->actions, + iClob(new_LabelWidget("${sidebar.action.show}", NULL)), + frameless_WidgetFlag | tight_WidgetFlag)); + const iMenuItem items[] = { + { page_Icon " ${sidebar.action.feeds.showall}", SDLK_u, KMOD_SHIFT, "feeds.mode arg:0" }, + { circle_Icon " ${sidebar.action.feeds.showunread}", SDLK_u, 0, "feeds.mode arg:1" }, + }; + iWidget *dropButton = addChild_Widget( + d->actions, + iClob(makeMenuButton_LabelWidget(items[d->feedsMode].label, items, 2))); + setId_Widget(dropButton, "feeds.modebutton"); + checkIcon_LabelWidget((iLabelWidget *) dropButton); + setFixedSize_Widget( + dropButton, + init_I2(iMaxi(20 * gap_UI, + measure_Text(default_FontId, + translateCStr_Lang( + items[findWidestLabel_MenuItem(items, 2)].label)) + .advance.x + + 13 * gap_UI), + -1)); + } + else { + updateDropdownSelection_LabelWidget(findChild_Widget(d->actions, "feeds.modebutton"), + format_CStr(" arg:%d", d->feedsMode)); + } } else { - updateDropdownSelection_LabelWidget(findChild_Widget(d->actions, "feeds.modebutton"), - format_CStr(" arg:%d", d->feedsMode)); + if (!keepActions) { + iLabelWidget *readAll = addActionButton_SidebarWidget_(d, + check_Icon, + "feeds.markallread confirm:1", + 0); + setTextColor_LabelWidget(readAll, uiTextCaution_ColorId); + addActionButton_SidebarWidget_(d, + page_Icon, + "feeds.mode arg:0", + 0); + addActionButton_SidebarWidget_(d, + circle_Icon, + "feeds.mode arg:1", + 0); + } + setOutline_LabelWidget(child_Widget(d->actions, 1), d->feedsMode != all_FeedsMode); + setOutline_LabelWidget(child_Widget(d->actions, 2), d->feedsMode != unread_FeedsMode); } d->menu = makeMenu_Widget( as_Widget(d), @@ -500,6 +541,12 @@ static void updateItemsWithFlags_SidebarWidget_(iSidebarWidget *d, iBool keepAct (iMenuItem[]){ { delete_Icon " " uiTextCaution_ColorEscape "${history.clear}", 0, 0, "history.clear confirm:1" }, }, 1); + if (isMobile) { + addChildFlags_Widget(d->actions, iClob(new_Widget()), expand_WidgetFlag); + iLabelWidget *btn = addActionButton_SidebarWidget_(d, "${sidebar.action.history.clear}", + "history.clear confirm:1", 0); + setFont_LabelWidget(btn, uiLabelBigBold_FontId); + } break; } case identities_SidebarMode: { @@ -616,6 +663,15 @@ iBool setMode_SidebarWidget(iSidebarWidget *d, enum iSidebarMode mode) { updateItemHeight_SidebarWidget_(d); /* Restore previous scroll position. */ setScrollPos_ListWidget(list_SidebarWidget_(d), d->modeScroll[mode]); + /* Title of the mobile sliding sheet. */ + iLabelWidget *sheetTitle = findChild_Widget(&d->widget, "sidebar.title"); + if (sheetTitle) { + iString title; + initCStr_String(&title, normalModeLabels_[d->mode]); + removeIconPrefix_String(&title); + setText_LabelWidget(sheetTitle, &title); + deinit_String(&title); + } return iTrue; } @@ -646,22 +702,6 @@ const iIntSet *closedFolders_SidebarWidget(const iSidebarWidget *d) { return d ? d->closedFolders : collect_IntSet(new_IntSet()); } -static const char *normalModeLabels_[max_SidebarMode] = { - book_Icon " ${sidebar.bookmarks}", - star_Icon " ${sidebar.feeds}", - clock_Icon " ${sidebar.history}", - person_Icon " ${sidebar.identities}", - page_Icon " ${sidebar.outline}", -}; - -static const char *tightModeLabels_[max_SidebarMode] = { - book_Icon, - star_Icon, - clock_Icon, - person_Icon, - page_Icon, -}; - const char *icon_SidebarMode(enum iSidebarMode mode) { return tightModeLabels_[mode]; } @@ -726,13 +766,21 @@ void init_SidebarWidget(iSidebarWidget *d, enum iSidebarSide side) { /* On a phone, the right sidebar is not used. */ const iBool isPhone = (deviceType_App() == phone_AppDeviceType); if (isPhone) { - iLabelWidget *closeButton = + iLabelWidget *sheetTitle = addChildFlags_Widget(vdiv, - iClob(new_LabelWidget("${sidebar.close}", "sidebar.toggle")), - collapse_WidgetFlag | alignRight_WidgetFlag | + iClob(new_LabelWidget("", NULL)), + collapse_WidgetFlag | extraPadding_WidgetFlag | frameless_WidgetFlag); + setBackgroundColor_Widget(as_Widget(sheetTitle), uiBackground_ColorId); + iLabelWidget *closeButton = addChildFlags_Widget(as_Widget(sheetTitle), + iClob(new_LabelWidget(uiTextAction_ColorEscape "${sidebar.close}", "sidebar.toggle")), + extraPadding_WidgetFlag | frameless_WidgetFlag | + alignRight_WidgetFlag | moveToParentRightEdge_WidgetFlag); + as_Widget(sheetTitle)->flags2 |= slidingSheetDraggable_WidgetFlag2; /* phone */ as_Widget(closeButton)->flags2 |= slidingSheetDraggable_WidgetFlag2; /* phone */ + setId_Widget(as_Widget(sheetTitle), "sidebar.title"); setId_Widget(as_Widget(closeButton), "sidebar.close"); + setFont_LabelWidget(sheetTitle, uiLabelBig_FontId); setFont_LabelWidget(closeButton, uiLabelBigBold_FontId); } iWidget *buttons = new_Widget(); @@ -781,7 +829,14 @@ void init_SidebarWidget(iSidebarWidget *d, enum iSidebarSide side) { resizeWidthOfChildren_WidgetFlag), // | // drawBackgroundToHorizontalSafeArea_WidgetFlag), "actions"); - setBackgroundColor_Widget(d->actions, uiBackgroundSidebar_ColorId); + if (deviceType_App() != desktop_AppDeviceType) { + setFlags_Widget(findChild_Widget(w, "sidebar.title"), borderTop_WidgetFlag, iTrue); + setFlags_Widget(d->actions, drawBackgroundToBottom_WidgetFlag, iTrue); + setBackgroundColor_Widget(d->actions, uiBackground_ColorId); + } + else { + setBackgroundColor_Widget(d->actions, uiBackgroundSidebar_ColorId); + } d->contextItem = NULL; d->contextIndex = iInvalidPos; d->blank = new_Widget(); @@ -1488,6 +1543,15 @@ static iBool processEvent_SidebarWidget_(iSidebarWidget *d, const SDL_Event *ev) return iTrue; } else if (equal_Command(cmd, "feeds.markallread") && d->mode == feeds_SidebarMode) { + if (argLabel_Command(cmd, "confirm")) { + /* This is used on mobile. */ + iWidget *menu = makeMenu_Widget(w->root->widget, (iMenuItem[]){ + check_Icon " " uiTextCaution_ColorEscape "${feeds.markallread}", 0, 0, + "feeds.markallread" + }, 1); + openMenu_Widget(menu, topLeft_Rect(bounds_Widget(d->actions))); + return iTrue; + } iConstForEach(PtrArray, i, listEntries_Feeds()) { const iFeedEntry *entry = i.ptr; const iString *url = url_FeedEntry(entry); -- cgit v1.2.3 From d3fd40c8ef38ba5eeaeaa474166a66ca36f2edf7 Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Sat, 4 Dec 2021 12:23:59 +0200 Subject: SidebarWidget: Mobile bookmark editing mode ListWidget can use drag handles on items. --- po/en.po | 6 ++++++ src/ui/listwidget.c | 29 ++++++++++++++++++++++++++--- src/ui/listwidget.h | 2 ++ src/ui/mobile.c | 3 +++ src/ui/sidebarwidget.c | 50 ++++++++++++++++++++++++++++++++++++++++++++++---- 5 files changed, 83 insertions(+), 7 deletions(-) (limited to 'po') diff --git a/po/en.po b/po/en.po index 08683659..0ac1dd2e 100644 --- a/po/en.po +++ b/po/en.po @@ -419,6 +419,12 @@ msgstr "Identities" msgid "sidebar.outline" msgstr "Outline" +msgid "sidebar.action.bookmarks.newfolder" +msgstr "New Folder" + +msgid "sidebar.action.bookmarks.edit" +msgstr "Edit" + # This label should be fairly short so it fits in a button in the sidebar. msgid "sidebar.action.feeds.markallread" msgstr "Read All" diff --git a/src/ui/listwidget.c b/src/ui/listwidget.c index d12afc4c..ccc5b104 100644 --- a/src/ui/listwidget.c +++ b/src/ui/listwidget.c @@ -87,6 +87,7 @@ void init_ListWidget(iListWidget *d) { d->hoverItem = iInvalidPos; d->dragItem = iInvalidPos; d->dragOrigin = zero_I2(); + d->dragHandleWidth = 0; init_Click(&d->click, d, SDL_BUTTON_LEFT); init_IntSet(&d->invalidItems); d->visBuf = new_VisBuf(); @@ -192,6 +193,13 @@ void setScrollMode_ListWidget(iListWidget *d, enum iScrollMode mode) { d->scrollMode = mode; } +void setDragHandleWidth_ListWidget(iListWidget *d, int dragHandleWidth) { + d->dragHandleWidth = dragHandleWidth; + if (dragHandleWidth == 0) { + setFlags_Widget(as_Widget(d), touchDrag_WidgetFlag, iFalse); /* mobile drag handles */ + } +} + void scrollOffset_ListWidget(iListWidget *d, int offset) { moveSpan_SmoothScroll(&d->scrollY, offset, 0); } @@ -353,6 +361,7 @@ static iBool endDrag_ListWidget_(iListWidget *d, iInt2 endPos) { if (d->dragItem == iInvalidPos) { return iFalse; } + setFlags_Widget(as_Widget(d), touchDrag_WidgetFlag, iFalse); /* mobile drag handles */ stop_Anim(&d->scrollY.pos); enum iDragDestination dstKind; const size_t index = resolveDragDestination_ListWidget_(d, endPos, &dstKind); @@ -441,6 +450,17 @@ static iBool processEvent_ListWidget_(iListWidget *d, const SDL_Event *ev) { } } if (ev->type == SDL_MOUSEWHEEL && isHover_Widget(w)) { + if (d->dragHandleWidth) { + if (d->dragItem == iInvalidPos) { + const iInt2 wpos = coord_MouseWheelEvent(&ev->wheel); + if (contains_Widget(w, wpos) && + wpos.x >= right_Rect(boundsWithoutVisualOffset_Widget(w)) - d->dragHandleWidth) { + setFlags_Widget(w, touchDrag_WidgetFlag, iTrue); + printf("[%p] touch drag started\n", d); + return iTrue; + } + } + } if (isScrollDisabled_ListWidget_(d, ev)) { if (ev->wheel.which == SDL_TOUCH_MOUSEID) { /* TODO: Could generalize this selection of the scrollable parent. */ @@ -498,7 +518,9 @@ static iBool processEvent_ListWidget_(iListWidget *d, const SDL_Event *ev) { return iTrue; } redrawHoverItem_ListWidget_(d); - if (contains_Rect(itemRect_ListWidget(d, d->hoverItem), pos_Click(&d->click)) && + if (contains_Rect(adjusted_Rect(itemRect_ListWidget(d, d->hoverItem), + zero_I2(), init_I2(-d->dragHandleWidth, 0)), + pos_Click(&d->click)) && d->hoverItem != iInvalidPos) { postCommand_Widget(w, "list.clicked arg:%zu item:%p", d->hoverItem, constHoverItem_ListWidget(d)); @@ -598,8 +620,9 @@ static void draw_ListWidget_(const iListWidget *d) { } setClip_Paint(&p, bounds_Widget(w)); draw_VisBuf(d->visBuf, addY_I2(topLeft_Rect(bounds), -scrollY), ySpan_Rect(bounds)); - const iInt2 mousePos = mouseCoord_Window(get_Window(), 0); - if (d->dragItem != iInvalidPos && contains_Rect(bounds, mousePos)) { + const iBool isMobile = (deviceType_App() != desktop_AppDeviceType); + const iInt2 mousePos = mouseCoord_Window(get_Window(), isMobile ? SDL_TOUCH_MOUSEID : 0); + if (d->dragItem != iInvalidPos && (isMobile || contains_Rect(bounds, mousePos))) { iInt2 pos = add_I2(mousePos, d->dragOrigin); const iListItem *item = constAt_PtrArray(&d->items, d->dragItem); const iRect itemRect = { init_I2(left_Rect(bounds), pos.y), diff --git a/src/ui/listwidget.h b/src/ui/listwidget.h index 081109e8..c5d412dd 100644 --- a/src/ui/listwidget.h +++ b/src/ui/listwidget.h @@ -66,6 +66,7 @@ struct Impl_ListWidget { size_t hoverItem; size_t dragItem; iInt2 dragOrigin; /* offset from mouse to drag item's top-left corner */ + int dragHandleWidth; iClick click; iIntSet invalidItems; iVisBuf *visBuf; @@ -90,6 +91,7 @@ int scrollPos_ListWidget (const iListWidget *); void setScrollPos_ListWidget (iListWidget *, int pos); void setScrollMode_ListWidget (iListWidget *, enum iScrollMode mode); +void setDragHandleWidth_ListWidget(iListWidget *, int dragHandleWidth); void scrollToItem_ListWidget (iListWidget *, size_t index, uint32_t span); void scrollOffset_ListWidget (iListWidget *, int offset); void scrollOffsetSpan_ListWidget (iListWidget *, int offset, uint32_t span); diff --git a/src/ui/mobile.c b/src/ui/mobile.c index ab282a86..633b33b8 100644 --- a/src/ui/mobile.c +++ b/src/ui/mobile.c @@ -243,6 +243,9 @@ static iBool topPanelHandler_(iWidget *topPanel, const char *cmd) { else if (findWidget_App("upload")) { postCommand_App("upload.cancel"); } + else if (findWidget_App("bmed.sidebar")) { + postCommand_App("bmed.cancel"); + } else if (findWidget_App("ident")) { postCommand_Widget(topPanel, "ident.cancel"); } diff --git a/src/ui/sidebarwidget.c b/src/ui/sidebarwidget.c index 48802ddf..b7e3b19a 100644 --- a/src/ui/sidebarwidget.c +++ b/src/ui/sidebarwidget.c @@ -117,7 +117,7 @@ struct Impl_SidebarWidget { iCertListWidget * certList; iWidget * actions; /* below the list, area for buttons */ int midHeight; /* on portrait phone, the height for the middle state */ - iBool isBeingDraggedVertically; /* on portrait phone, sidebar can be dragged up/down */ + iBool isEditing; /* mobile edit mode */ int modeScroll[max_SidebarMode]; iLabelWidget * modeButtons[max_SidebarMode]; int maxButtonLabelWidth; @@ -235,7 +235,18 @@ static iBool isBookmarkFolded_SidebarWidget_(const iSidebarWidget *d, const iBoo } static iBool isSlidingSheet_SidebarWidget_(const iSidebarWidget *d) { - return isPortraitPhone_App();// && scrollPos_ListWidget(d->list) <= 0; + return isPortraitPhone_App(); +} + +static void setMobileEditMode_SidebarWidget_(iSidebarWidget *d, iBool editing) { + iWidget *w = as_Widget(d); + d->isEditing = editing; + setFlags_Widget(findChild_Widget(w, "sidebar.close"), hidden_WidgetFlag, editing); + setFlags_Widget(child_Widget(d->actions, 0), hidden_WidgetFlag, !editing); + setTextCStr_LabelWidget(child_Widget(as_Widget(d->actions), 2), + editing ? "${sidebar.close}" : "${sidebar.action.bookmarks.edit}"); + setDragHandleWidth_ListWidget(d->list, editing ? itemHeight_ListWidget(d->list) * 3 / 2 : 0); + arrange_Widget(d->actions); } static void updateItemsWithFlags_SidebarWidget_(iSidebarWidget *d, iBool keepActions) { @@ -482,6 +493,14 @@ static void updateItemsWithFlags_SidebarWidget_(iSidebarWidget *d, iBool keepAct { "---", 0, 0, NULL }, { reload_Icon " ${bookmarks.reload}", 0, 0, "bookmarks.reload.remote" } }, 6); + if (isMobile) { + addActionButton_SidebarWidget_(d, "${sidebar.action.bookmarks.newfolder}", + "bookmarks.addfolder", !d->isEditing ? hidden_WidgetFlag : 0); + addChildFlags_Widget(d->actions, iClob(new_Widget()), expand_WidgetFlag); + iLabelWidget *btn = addActionButton_SidebarWidget_(d, + d->isEditing ? "${sidebar.close}" : "${sidebar.action.bookmarks.edit}", + "sidebar.bookmarks.edit", 0); + } break; } case history_SidebarMode: { @@ -545,7 +564,6 @@ static void updateItemsWithFlags_SidebarWidget_(iSidebarWidget *d, iBool keepAct addChildFlags_Widget(d->actions, iClob(new_Widget()), expand_WidgetFlag); iLabelWidget *btn = addActionButton_SidebarWidget_(d, "${sidebar.action.history.clear}", "history.clear confirm:1", 0); - setFont_LabelWidget(btn, uiLabelBigBold_FontId); } break; } @@ -740,7 +758,7 @@ void init_SidebarWidget(iSidebarWidget *d, enum iSidebarSide side) { d->mode = -1; d->feedsMode = all_FeedsMode; d->midHeight = 0; - d->isBeingDraggedVertically = iFalse; + d->isEditing = iFalse; d->numUnreadEntries = 0; d->buttonFont = uiLabel_FontId; /* wiil be changed later */ d->itemFonts[0] = uiContent_FontId; @@ -918,6 +936,12 @@ static void itemClicked_SidebarWidget_(iSidebarWidget *d, iSidebarItem *item, si break; } case bookmarks_SidebarMode: + if (d->isEditing) { + d->contextItem = item; + d->contextIndex = itemIndex; + postCommand_Widget(d, "bookmark.edit"); + break; + } if (isEmpty_String(&item->url)) /* a folder */ { if (contains_IntSet(d->closedFolders, item->id)) { remove_IntSet(d->closedFolders, item->id); @@ -1174,6 +1198,9 @@ static iBool handleSidebarCommand_SidebarWidget_(iSidebarWidget *d, const char * } else { setVisualOffset_Widget(w, bottom_Rect(rect_Root(w->root)) - w->rect.pos.y, 300, animFlags); + if (d->isEditing) { + setMobileEditMode_SidebarWidget_(d, iFalse); + } } showToolbar_Root(w->root, isHiding); } @@ -1189,6 +1216,10 @@ static iBool handleSidebarCommand_SidebarWidget_(iSidebarWidget *d, const char * refresh_Widget(w->parent); return iTrue; } + else if (equal_Command(cmd, "bookmarks.edit")) { + setMobileEditMode_SidebarWidget_(d, !d->isEditing); + invalidate_ListWidget(d->list); + } return iFalse; } @@ -1853,6 +1884,7 @@ static void draw_SidebarItem_(const iSidebarItem *d, iPaint *p, iRect itemRect, &Class_SidebarWidget); const iBool isMenuVisible = isVisible_Widget(sidebar->menu); const iBool isDragging = constDragItem_ListWidget(list) == d; + const iBool isEditing = sidebar->isEditing; /* only on mobile */ const iBool isPressing = isMouseDown_ListWidget(list) && !isDragging; const iBool isHover = (!isMenuVisible && @@ -2006,6 +2038,16 @@ static void draw_SidebarItem_(const iSidebarItem *d, iPaint *p, iRect itemRect, drawRange_Text(font, textPos, fg, range_String(&d->label)); const int metaFont = uiLabel_FontId; const int metaIconWidth = 4.5f * gap_UI; + if (isEditing) { + iRect dragRect = { + addX_I2(topRight_Rect(itemRect), -itemHeight * 3 / 2), + init_I2(itemHeight * 3 / 2, itemHeight) + }; + fillRect_Paint(p, dragRect, bg); + drawVLine_Paint(p, topLeft_Rect(dragRect), height_Rect(dragRect), uiSeparator_ColorId); + drawCentered_Text(uiContent_FontId, dragRect, iTrue, uiAnnotation_ColorId, menu_Icon); + adjustEdges_Rect(&itemRect, 0, -width_Rect(dragRect), 0, 0); + } const iInt2 metaPos = init_I2(right_Rect(itemRect) - length_String(&d->meta) * -- cgit v1.2.3 From 39dfbe85259d2e67b355a6a840ce47e06474202c Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Tue, 7 Dec 2021 14:00:40 +0200 Subject: SidebarWidget: Edit mode vs. folders; "No Unread Entries" --- po/en.po | 3 +++ src/ui/sidebarwidget.c | 30 +++++++++++++++++++----------- 2 files changed, 22 insertions(+), 11 deletions(-) (limited to 'po') diff --git a/po/en.po b/po/en.po index 0ac1dd2e..8e690649 100644 --- a/po/en.po +++ b/po/en.po @@ -686,6 +686,9 @@ msgstr "Delete Identity and Files" msgid "sidebar.empty.idents" msgstr "No Identities" +msgid "sidebar.empty.unread" +msgstr "No Unread Entries" + # The %s format characters are used to highlight the word "Help" and must be used in the translation in same way as here. #, c-format msgid "ident.gotohelp" diff --git a/src/ui/sidebarwidget.c b/src/ui/sidebarwidget.c index 249bf373..c5596b9f 100644 --- a/src/ui/sidebarwidget.c +++ b/src/ui/sidebarwidget.c @@ -299,12 +299,12 @@ static void updateItemsWithFlags_SidebarWidget_(iSidebarWidget *d, iBool keepAct if (secondsSince_Time(&now, &entry->discovered) > maxAge_Visited) { break; /* the rest are even older */ } - isEmpty = iFalse; const iBool isOpen = equal_String(docUrl, &entry->url); const iBool isUnread = isUnread_FeedEntry(entry); if (d->feedsMode == unread_FeedsMode && !isUnread && !isOpen) { continue; } + isEmpty = iFalse; /* Insert date separators. */ { iDate entryDate; init_Date(&entryDate, &entry->posted); @@ -600,9 +600,18 @@ static void updateItemsWithFlags_SidebarWidget_(iSidebarWidget *d, iBool keepAct if (isEmpty) { if (d->mode == feeds_SidebarMode) { iWidget *div = makeVDiv_Widget(); - setPadding_Widget(div, 3 * gap_UI, 0, 3 * gap_UI, 2 * gap_UI); + //setPadding_Widget(div, 3 * gap_UI, 0, 3 * gap_UI, 2 * gap_UI); + arrange_Widget(d->actions); + setPadding_Widget(div, 0, 0, 0, height_Widget(d->actions)); addChildFlags_Widget(div, iClob(new_Widget()), expand_WidgetFlag); /* pad */ - addChild_Widget(div, iClob(new_LabelWidget("${menu.feeds.refresh}", "feeds.refresh"))); + if (d->feedsMode == all_FeedsMode) { + addChild_Widget(div, iClob(new_LabelWidget("${menu.feeds.refresh}", "feeds.refresh"))); + } + else { + iLabelWidget *msg = addChildFlags_Widget(div, iClob(new_LabelWidget("${sidebar.empty.unread}", NULL)), + frameless_WidgetFlag); + setFont_LabelWidget(msg, uiLabelLarge_FontId); + } addChildFlags_Widget(div, iClob(new_Widget()), expand_WidgetFlag); /* pad */ addChild_Widget(d->blank, iClob(div)); } @@ -963,12 +972,6 @@ static void itemClicked_SidebarWidget_(iSidebarWidget *d, iSidebarItem *item, si break; } case bookmarks_SidebarMode: - if (d->isEditing) { - d->contextItem = item; - d->contextIndex = itemIndex; - postCommand_Widget(d, "bookmark.edit"); - break; - } if (isEmpty_String(&item->url)) /* a folder */ { if (contains_IntSet(d->closedFolders, item->id)) { remove_IntSet(d->closedFolders, item->id); @@ -981,6 +984,12 @@ static void itemClicked_SidebarWidget_(iSidebarWidget *d, iSidebarItem *item, si updateItems_SidebarWidget_(d); break; } + if (d->isEditing) { + d->contextItem = item; + d->contextIndex = itemIndex; + postCommand_Widget(d, "bookmark.edit"); + break; + } /* fall through */ case history_SidebarMode: { if (!isEmpty_String(&item->url)) { @@ -1298,8 +1307,7 @@ static iBool processEvent_SidebarWidget_(iSidebarWidget *d, const SDL_Event *ev) /* Handle commands. */ if (isResize_UserEvent(ev)) { checkModeButtonLayout_SidebarWidget_(d); - if (deviceType_App() == phone_AppDeviceType) { // && d->side == left_SidebarSide) { -// setFlags_Widget(w, rightEdgeDraggable_WidgetFlag, isPortrait_App()); + if (deviceType_App() == phone_AppDeviceType) { setPadding_Widget(d->actions, 0, 0, 0, 0); setFlags_Widget(findChild_Widget(w, "sidebar.title"), hidden_WidgetFlag, isLandscape_App()); setFlags_Widget(findChild_Widget(w, "sidebar.close"), hidden_WidgetFlag, isLandscape_App()); -- cgit v1.2.3 From a265ab290cc9bce2f0c305a3eaf9d743380b967b Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Thu, 9 Dec 2021 15:06:02 +0200 Subject: iOS: Fixes and new edit menu for UploadWidget The sizing and behavior of the input field on the plain text upload page is much improved. --- po/en.po | 9 +++++ src/ios.h | 7 ++-- src/ios.m | 37 +++++++++++++++++++-- src/ui/inputwidget.c | 25 +++++++++----- src/ui/labelwidget.c | 4 +++ src/ui/uploadwidget.c | 92 +++++++++++++++++++++++++++++++++++++++------------ src/ui/util.c | 1 + 7 files changed, 139 insertions(+), 36 deletions(-) (limited to 'po') diff --git a/po/en.po b/po/en.po index 8e690649..89a05939 100644 --- a/po/en.po +++ b/po/en.po @@ -1017,6 +1017,15 @@ msgstr "Default" msgid "heading.upload.text" msgstr "Text" +msgid "menu.upload.export" +msgstr "Export Text" + +msgid "menu.upload.delete" +msgstr "Delete All" + +msgid "menu.upload.delete.confirm" +msgstr "Really Delete All (No Undo)" + msgid "hint.upload.text" msgstr "enter text to upload" diff --git a/src/ios.h b/src/ios.h index 6c5ec8d5..fbe7c2eb 100644 --- a/src/ios.h +++ b/src/ios.h @@ -38,6 +38,7 @@ void playHapticEffect_iOS (enum iHapticEffect effect); void exportDownloadedFile_iOS(const iString *path); void pickFileForOpening_iOS (void); void pickFile_iOS (const char *command); /* ` path:%s` will be appended */ +void openTextActivityView_iOS(const iString *text); iBool isPhone_iOS (void); void safeAreaInsets_iOS (float *left, float *top, float *right, float *bottom); @@ -79,9 +80,11 @@ iDeclareType(SystemTextInput) iDeclareTypeConstructionArgs(SystemTextInput, iRect rect, int flags) void setRect_SystemTextInput (iSystemTextInput *, iRect rect); -void setText_SystemTextInput (iSystemTextInput *, const iString *text); +void setText_SystemTextInput (iSystemTextInput *, const iString *text, iBool allowUndo); void setFont_SystemTextInput (iSystemTextInput *, int fontId); -void setTextChangedFunc_SystemTextInput (iSystemTextInput *, void (*textChangedFunc)(iSystemTextInput *, void *), void *); +void setTextChangedFunc_SystemTextInput + (iSystemTextInput *, void (*textChangedFunc)(iSystemTextInput *, void *), void *); +void selectAll_SystemTextInput(iSystemTextInput *); const iString * text_SystemTextInput (const iSystemTextInput *); int preferredHeight_SystemTextInput (const iSystemTextInput *); diff --git a/src/ios.m b/src/ios.m index 2705a350..b6fbdec0 100644 --- a/src/ios.m +++ b/src/ios.m @@ -536,6 +536,15 @@ void pickFile_iOS(const char *command) { [viewController_(get_Window()) presentViewController:picker animated:YES completion:nil]; } +void openTextActivityView_iOS(const iString *text) { + UIActivityViewController *actView = + [[UIActivityViewController alloc] + initWithActivityItems:@[ + [NSString stringWithUTF8String:cstr_String(text)]] + applicationActivities:nil]; + [viewController_(get_Window()) presentViewController:actView animated:YES completion:nil]; +} + /*----------------------------------------------------------------------------------------------*/ enum iAVFAudioPlayerState { @@ -784,7 +793,16 @@ void deinit_SystemTextInput(iSystemTextInput *d) { } } -void setText_SystemTextInput(iSystemTextInput *d, const iString *text) { +void selectAll_SystemTextInput(iSystemTextInput *d) { + if (d->field) { + [REF_d_field selectAll:nil]; + } + if (d->view) { + [REF_d_view selectAll:nil]; + } +} + +void setText_SystemTextInput(iSystemTextInput *d, const iString *text, iBool allowUndo) { NSString *str = [NSString stringWithUTF8String:cstr_String(text)]; if (d->field) { [REF_d_field setText:str]; @@ -793,9 +811,22 @@ void setText_SystemTextInput(iSystemTextInput *d, const iString *text) { } } else { - [REF_d_view setText:str]; + UITextView *view = REF_d_view; +// if (allowUndo) { +// [view selectAll:nil]; +// if ([view shouldChangeTextInRange:[view selectedTextRange] replacementText:@""]) { +// [[view textStorage] beginEditing]; +// [[view textStorage] replaceCharactersInRange:[view selectedRange] withString:@""]; +// [[view textStorage] endEditing]; +// } +// } +// else { + // TODO: How to implement `allowUndo`, given that UITextView does not exist when unfocused? + // Maybe keep the UITextStorage (if it has the undo?)? + [view setText:str]; +// } if (d->flags & selectAll_SystemTextInputFlags) { - [REF_d_view selectAll:nil]; + [view selectAll:nil]; } } } diff --git a/src/ui/inputwidget.c b/src/ui/inputwidget.c index 3be6a383..22f983eb 100644 --- a/src/ui/inputwidget.c +++ b/src/ui/inputwidget.c @@ -715,7 +715,8 @@ static void updateAllLinesAndResizeHeight_InputWidget_(iInputWidget *d) { const int height = measure_WrapText(&wt, d->font).bounds.size.y; /* We use this to store the number wrapped lines for determining widget height. */ d->visWrapLines.start = 0; - d->visWrapLines.end = iMin(d->maxWrapLines, height / lineHeight_Text(d->font)); + d->visWrapLines.end = iMax(d->minWrapLines, + iMin(d->maxWrapLines, height / lineHeight_Text(d->font))); updateMetrics_InputWidget_(d); } @@ -733,8 +734,10 @@ static int contentHeight_InputWidget_(const iInputWidget *d) { if (d->buffered && ~d->inFlags & needUpdateBuffer_InputWidgetFlag) { return iClamp(d->buffered->size.y, minHeight, maxHeight); } -#endif + return minHeight; +#else return (int) size_Range(&d->visWrapLines) * lineHeight; +#endif } static void updateTextInputRect_InputWidget_(const iInputWidget *d) { @@ -1111,7 +1114,7 @@ void setText_InputWidget(iInputWidget *d, const iString *text) { #else set_String(&d->text, nfcText); if (d->sysCtrl) { - setText_SystemTextInput(d->sysCtrl, nfcText); + setText_SystemTextInput(d->sysCtrl, nfcText, iTrue); } else { updateAllLinesAndResizeHeight_InputWidget_(d); /* need to know the new height */ @@ -1134,7 +1137,11 @@ void setTextCStr_InputWidget(iInputWidget *d, const char *cstr) { } void selectAll_InputWidget(iInputWidget *d) { -#if !LAGRANGE_USE_SYSTEM_TEXT_INPUT +#if LAGRANGE_USE_SYSTEM_TEXT_INPUT + if (d->sysCtrl) { + selectAll_SystemTextInput(d->sysCtrl); + } +#else d->mark = (iRanges){ 0, lastLine_InputWidget_(d)->range.end }; refresh_Widget(as_Widget(d)); #endif @@ -1177,7 +1184,7 @@ void begin_InputWidget(iInputWidget *d) { (isAllowedToInsertNewline_InputWidget_(d) ? insertNewlines_SystemTextInputFlag : 0) | (d->inFlags & selectAllOnFocus_InputWidgetFlag ? selectAll_SystemTextInputFlags : 0)); setFont_SystemTextInput(d->sysCtrl, d->font); - setText_SystemTextInput(d->sysCtrl, &d->oldText); + setText_SystemTextInput(d->sysCtrl, &d->oldText, iFalse); setTextChangedFunc_SystemTextInput(d->sysCtrl, systemInputChanged_InputWidget_, d); iConnect(Root, w->root, visualOffsetsChanged, d, updateAfterVisualOffsetChange_InputWidget_); updateTextInputRect_InputWidget_(d); @@ -2157,10 +2164,6 @@ static iBool processEvent_InputWidget_(iInputWidget *d, const SDL_Event *ev) { } return iTrue; } - else if (isCommand_UserEvent(ev, "input.selectall") && isEditing_InputWidget_(d)) { - selectAll_InputWidget(d); - return iTrue; - } else if (isCommand_UserEvent(ev, "text.insert")) { pushUndo_InputWidget_(d); deleteMarked_InputWidget_(d); @@ -2169,6 +2172,10 @@ static iBool processEvent_InputWidget_(iInputWidget *d, const SDL_Event *ev) { return iTrue; } #endif + else if (isCommand_UserEvent(ev, "input.selectall") && isEditing_InputWidget_(d)) { + selectAll_InputWidget(d); + return iTrue; + } else if (isCommand_UserEvent(ev, "theme.changed")) { if (d->buffered) { d->inFlags |= needUpdateBuffer_InputWidgetFlag; diff --git a/src/ui/labelwidget.c b/src/ui/labelwidget.c index 9e0d37e4..5ad43b0e 100644 --- a/src/ui/labelwidget.c +++ b/src/ui/labelwidget.c @@ -134,6 +134,10 @@ static iBool processEvent_LabelWidget_(iLabelWidget *d, const SDL_Event *ev) { refresh_Widget(d); return iFalse; } + else if (isCommand_Widget(w, ev, "trigger")) { + trigger_LabelWidget_(d); + return iTrue; + } if (!isEmpty_String(&d->command)) { #if 0 && defined (iPlatformAppleMobile) /* Touch allows activating any button on release. */ diff --git a/src/ui/uploadwidget.c b/src/ui/uploadwidget.c index e11970ec..58106dcb 100644 --- a/src/ui/uploadwidget.c +++ b/src/ui/uploadwidget.c @@ -92,17 +92,19 @@ static void updateProgress_UploadWidget_(iGmRequest *request, size_t current, si static void updateInputMaxHeight_UploadWidget_(iUploadWidget *d) { iWidget *w = as_Widget(d); /* Calculate how many lines fits vertically in the view. */ - const iInt2 inputPos = topLeft_Rect(bounds_Widget(as_Widget(d->input))); - const int footerHeight = isUsingPanelLayout_Mobile() ? 0 : - (height_Widget(d->token) + - height_Widget(findChild_Widget(w, "dialogbuttons")) + - 12 * gap_UI); - const int avail = bottom_Rect(safeRect_Root(w->root)) - footerHeight - - get_MainWindow()->keyboardHeight; - setLineLimits_InputWidget(d->input, - minLines_InputWidget(d->input), - iMaxi(minLines_InputWidget(d->input), - (avail - inputPos.y) / lineHeight_Text(font_InputWidget(d->input)))); + const iInt2 inputPos = topLeft_Rect(bounds_Widget(as_Widget(d->input))); + int footerHeight = 0; + if (!isUsingPanelLayout_Mobile()) { + footerHeight = (height_Widget(d->token) + + height_Widget(findChild_Widget(w, "dialogbuttons")) + + 12 * gap_UI); + } + const int avail = bottom_Rect(visibleRect_Root(w->root)) - footerHeight - inputPos.y; + /* On desktop, retain the previously set minLines value. */ + int minLines = isUsingPanelLayout_Mobile() ? 1 : minLines_InputWidget(d->input); + int maxLines = iMaxi(minLines, avail / lineHeight_Text(font_InputWidget(d->input))); + /* On mobile, the height is fixed to the available space. */ + setLineLimits_InputWidget(d->input, isUsingPanelLayout_Mobile() ? maxLines : minLines, maxLines); } static const iGmIdentity *titanIdentityForUrl_(const iString *url) { @@ -208,11 +210,7 @@ void init_UploadWidget(iUploadWidget *d) { enableUploadButton_UploadWidget_(d, iFalse); } iWidget *title = findChild_Widget(w, "heading.upload.text"); - iLabelWidget *menu = makeMenuButton_LabelWidget(midEllipsis_Icon, (iMenuItem[]){ - { export_Icon " ${upload.text.export}", 0, 0, "upload.text.export" }, - { "---" }, - { delete_Icon " " uiTextCaution_ColorEscape "${menu.delete}", 0, 0, "upload.text.delete" } - }, 3); + iLabelWidget *menu = new_LabelWidget(midEllipsis_Icon, "upload.editmenu.open"); setTextColor_LabelWidget(menu, uiTextAction_ColorId); setFont_LabelWidget(menu, uiLabelBigBold_FontId); addChildFlags_Widget(title, iClob(menu), frameless_WidgetFlag | moveToParentRightEdge_WidgetFlag); @@ -428,12 +426,19 @@ static iBool processEvent_UploadWidget_(iUploadWidget *d, const SDL_Event *ev) { } else if (equal_Command(cmd, "panel.changed")) { showOrHideUploadButton_UploadWidget_(d); - setFocus_Widget(NULL); + if (currentPanelIndex_Mobile(w) == 0) { + setFocus_Widget(as_Widget(d->input)); + } + else { + setFocus_Widget(NULL); + } + refresh_Widget(d->input); return iFalse; } #if defined (iPlatformAppleMobile) else if (deviceType_App() != desktop_AppDeviceType && equal_Command(cmd, "menu.opened")) { setFocus_Widget(NULL); /* overlaid text fields! */ + refresh_Widget(d->input); return iFalse; } #endif @@ -474,6 +479,44 @@ static iBool processEvent_UploadWidget_(iUploadWidget *d, const SDL_Event *ev) { updateIdentityDropdown_UploadWidget_(d); return iTrue; } + if (isCommand_Widget(w, ev, "upload.editmenu.open")) { + setFocus_Widget(NULL); + refresh_Widget(as_Widget(d->input)); + iWidget *editMenu = makeMenu_Widget(root_Widget(w), (iMenuItem[]){ + { select_Icon " ${menu.selectall}", 0, 0, "upload.text.selectall" }, + { export_Icon " ${menu.upload.export}", 0, 0, "upload.text.export" }, + { "---" }, + { delete_Icon " " uiTextCaution_ColorEscape "${menu.upload.delete}", 0, 0, "upload.text.delete" } + }, 4); + openMenu_Widget(editMenu, topLeft_Rect(bounds_Widget(as_Widget(d->input)))); + return iTrue; + } + if (isCommand_UserEvent(ev, "upload.text.export")) { +#if defined (iPlatformAppleMobile) + openTextActivityView_iOS(text_InputWidget(d->input)); +#endif + return iTrue; + } + if (isCommand_UserEvent(ev, "upload.text.delete")) { + if (argLabel_Command(command_UserEvent(ev), "confirmed")) { + setTextCStr_InputWidget(d->input, ""); + setFocus_Widget(as_Widget(d->input)); + } + else { + iWidget *confirm = makeMenu_Widget(root_Widget(w), (iMenuItem[]){ + { delete_Icon " " uiTextCaution_ColorEscape "${menu.upload.delete.confirm}", 0, 0, + "upload.text.delete confirmed:1" } + }, 1); + openMenu_Widget(confirm, zero_I2()); + } + return iTrue; + } + if (isCommand_UserEvent(ev, "upload.text.selectall")) { + setFocus_Widget(as_Widget(d->input)); + refresh_Widget(as_Widget(d->input)); + postCommand_Widget(d->input, "input.selectall"); + return iTrue; + } if (isCommand_Widget(w, ev, "upload.accept")) { iBool isText; iWidget *tabs = findChild_Widget(w, "upload.tabs"); @@ -569,11 +612,16 @@ static iBool processEvent_UploadWidget_(iUploadWidget *d, const SDL_Event *ev) { destroy_Widget(w); return iTrue; } - else if (!isUsingPanelLayout_Mobile() && isCommand_Widget(w, ev, "input.resized")) { - resizeToLargestPage_Widget(findChild_Widget(w, "upload.tabs")); - arrange_Widget(w); - refresh_Widget(w); - return iTrue; + else if (isCommand_Widget(w, ev, "input.resized")) { + if (!isUsingPanelLayout_Mobile()) { + resizeToLargestPage_Widget(findChild_Widget(w, "upload.tabs")); + arrange_Widget(w); + refresh_Widget(w); + return iTrue; + } + else { + refresh_Widget(as_Widget(d->input)); + } } else if (isCommand_Widget(w, ev, "upload.pickfile")) { #if defined (iPlatformAppleMobile) diff --git a/src/ui/util.c b/src/ui/util.c index 73fafe84..daefc279 100644 --- a/src/ui/util.c +++ b/src/ui/util.c @@ -671,6 +671,7 @@ static iBool isCommandIgnoredByMenus_(const char *cmd) { equal_Command(cmd, "window.reload.update") || equal_Command(cmd, "window.mouse.exited") || equal_Command(cmd, "window.mouse.entered") || + equal_Command(cmd, "input.backup") || (equal_Command(cmd, "mouse.clicked") && !arg_Command(cmd)); /* button released */ } -- cgit v1.2.3 From 812b770e2f63fa2864b88de6d7a0dbe37abf026a Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Thu, 9 Dec 2021 18:45:29 +0200 Subject: Mobile: UploadWidget allows editing URL path --- po/en.po | 3 +++ src/ios.m | 2 +- src/ui/uploadwidget.c | 32 +++++++++++++++++++++++++------- 3 files changed, 29 insertions(+), 8 deletions(-) (limited to 'po') diff --git a/po/en.po b/po/en.po index 89a05939..43857d12 100644 --- a/po/en.po +++ b/po/en.po @@ -1047,6 +1047,9 @@ msgstr "MIME type:" msgid "upload.token" msgstr "Token:" +msgid "hint.upload.path" +msgstr "URL path" + msgid "hint.upload.token" msgstr "see server's instructions" diff --git a/src/ios.m b/src/ios.m index b6fbdec0..43d7ec69 100644 --- a/src/ios.m +++ b/src/ios.m @@ -850,7 +850,7 @@ void setFont_SystemTextInput(iSystemTextInput *d, int fontId) { // for (NSString *name in [UIFont fontNamesForFamilyName:@"Iosevka Term"]) { // printf("fontname: %s\n", [name cStringUsingEncoding:NSUTF8StringEncoding]); // } - font = [UIFont fontWithName:@"Iosevka-Term-Extended" size:height * 0.8f]; + font = [UIFont fontWithName:@"Iosevka-Term-Extended" size:height * 0.82f]; } else { // font = [UIFont systemFontOfSize:0.65f * height]; diff --git a/src/ui/uploadwidget.c b/src/ui/uploadwidget.c index 58106dcb..9e86741e 100644 --- a/src/ui/uploadwidget.c +++ b/src/ui/uploadwidget.c @@ -56,6 +56,7 @@ struct Impl_UploadWidget { iDocumentWidget *viewer; iGmRequest * request; iLabelWidget * info; + iInputWidget * path; iInputWidget * mime; iInputWidget * token; iLabelWidget * ident; @@ -192,14 +193,17 @@ void init_UploadWidget(iUploadWidget *d) { initPanels_Mobile(w, NULL, (iMenuItem[]){ { "title id:heading.upload" }, { "label id:upload.info" }, - { "panel id:dlg.upload.text icon:0x1f5b9 noscroll:1", 0, 0, (const void *) textItems }, - { "panel id:dlg.upload.file icon:0x1f4c1", 0, 0, (const void *) fileItems }, + { "input id:upload.path hint:hint.upload.path noheading:1 url:1 text:" }, { "heading text:${heading.upload.id}" }, { "dropdown id:upload.id icon:0x1f464 text:", 0, 0, constData_Array(makeIdentityItems_UploadWidget_(d)) }, { "input id:upload.token hint:hint.upload.token.long icon:0x1f516 text:" }, + { "padding" }, + { "panel id:dlg.upload.text icon:0x1f5b9 noscroll:1", 0, 0, (const void *) textItems }, + { "panel id:dlg.upload.file icon:0x1f4c1", 0, 0, (const void *) fileItems }, { NULL } }, actions, iElemCount(actions)); d->info = findChild_Widget(w, "upload.info"); + d->path = findChild_Widget(w, "upload.path"); d->input = findChild_Widget(w, "upload.text"); d->filePathLabel = findChild_Widget(w, "upload.filepathlabel"); d->fileSizeLabel = findChild_Widget(w, "upload.filesizelabel"); @@ -360,7 +364,10 @@ static void setUrlPort_UploadWidget_(iUploadWidget *d, const iString *url, uint1 appendRange_String(&d->url, (iRangecc){ parts.scheme.end, parts.host.end }); appendFormat_String(&d->url, ":%u", overridePort ? overridePort : titanPortForUrl_(url)); appendRange_String(&d->url, (iRangecc){ parts.path.start, constEnd_String(url) }); - setText_LabelWidget(d->info, &d->url); + const iRangecc siteRoot = urlRoot_String(&d->url); + setTextCStr_LabelWidget(d->info, cstr_Rangecc((iRangecc){ constBegin_String(&d->url), siteRoot.end })); + /* From root onwards, the URL is editable. */ + setTextCStr_InputWidget(d->path, cstr_Rangecc((iRangecc){ siteRoot.end, constEnd_String(&d->url) })); arrange_Widget(as_Widget(d)); } @@ -417,6 +424,18 @@ static void showOrHideUploadButton_UploadWidget_(iUploadWidget *d) { } } +static const iString *requestUrl_UploadWidget_(const iUploadWidget *d) { + const iRangecc siteRoot = urlRoot_String(&d->url); + iString *reqUrl = collectNew_String(); + setRange_String(reqUrl, (iRangecc){ constBegin_String(&d->url), siteRoot.end }); + const iString *path = text_InputWidget(d->path); + if (!startsWith_String(path, "/")) { + appendCStr_String(reqUrl, "/"); + } + append_String(reqUrl, path); + return reqUrl; +} + static iBool processEvent_UploadWidget_(iUploadWidget *d, const SDL_Event *ev) { iWidget *w = as_Widget(d); const char *cmd = command_UserEvent(ev); @@ -503,11 +522,10 @@ static iBool processEvent_UploadWidget_(iUploadWidget *d, const SDL_Event *ev) { setFocus_Widget(as_Widget(d->input)); } else { - iWidget *confirm = makeMenu_Widget(root_Widget(w), (iMenuItem[]){ + openMenu_Widget(makeMenu_Widget(root_Widget(w), (iMenuItem[]){ { delete_Icon " " uiTextCaution_ColorEscape "${menu.upload.delete.confirm}", 0, 0, "upload.text.delete confirmed:1" } - }, 1); - openMenu_Widget(confirm, zero_I2()); + }, 1), zero_I2()); } return iTrue; } @@ -537,7 +555,7 @@ static iBool processEvent_UploadWidget_(iUploadWidget *d, const SDL_Event *ev) { d->request = new_GmRequest(certs_App()); setSendProgressFunc_GmRequest(d->request, updateProgress_UploadWidget_); setUserData_Object(d->request, d); - setUrl_GmRequest(d->request, &d->url); + setUrl_GmRequest(d->request, requestUrl_UploadWidget_(d)); const iString *site = collectNewRange_String(urlRoot_String(&d->url)); switch (d->idMode) { case none_UploadIdentity: -- cgit v1.2.3 From 76259953925d42568c9ac80d6bb7732f1a9475be Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Fri, 10 Dec 2021 06:40:21 +0200 Subject: Mobile: UploadWidget styling --- po/en.po | 8 ++++++++ src/ui/mobile.c | 3 +++ src/ui/uploadwidget.c | 6 ++++-- 3 files changed, 15 insertions(+), 2 deletions(-) (limited to 'po') diff --git a/po/en.po b/po/en.po index 43857d12..33c86382 100644 --- a/po/en.po +++ b/po/en.po @@ -1047,6 +1047,14 @@ msgstr "MIME type:" msgid "upload.token" msgstr "Token:" +# Mobile subheading in the Upload dialog. +msgid "upload.url" +msgstr "URL" + +# Mobile subheading: buttons for entering uploaded data. +msgid "upload.content" +msgstr "Content" + msgid "hint.upload.path" msgstr "URL path" diff --git a/src/ui/mobile.c b/src/ui/mobile.c index 5a787e7b..64a5a7cc 100644 --- a/src/ui/mobile.c +++ b/src/ui/mobile.c @@ -653,6 +653,9 @@ void makePanelItem_Mobile(iWidget *panel, const iMenuItem *item) { fixedHeight_WidgetFlag | (!argLabel_Command(spec, "frame") ? frameless_WidgetFlag : 0), iTrue); + if (argLabel_Command(spec, "font")) { + setFont_LabelWidget(lab, argLabel_Command(spec, "font")); + } } else if (equal_Command(spec, "padding")) { float height = 1.5f; diff --git a/src/ui/uploadwidget.c b/src/ui/uploadwidget.c index fc5cc190..28a35668 100644 --- a/src/ui/uploadwidget.c +++ b/src/ui/uploadwidget.c @@ -192,12 +192,14 @@ void init_UploadWidget(iUploadWidget *d) { }; initPanels_Mobile(w, NULL, (iMenuItem[]){ { "title id:heading.upload" }, - { "label id:upload.info" }, + { "heading id:upload.url" }, + { format_CStr("label id:upload.info font:%d", + deviceType_App() == phone_AppDeviceType ? uiLabelBig_FontId : uiLabelMedium_FontId) }, { "input id:upload.path hint:hint.upload.path noheading:1 url:1 text:" }, { "heading text:${heading.upload.id}" }, { "dropdown id:upload.id icon:0x1f464 text:", 0, 0, constData_Array(makeIdentityItems_UploadWidget_(d)) }, { "input id:upload.token hint:hint.upload.token.long icon:0x1f516 text:" }, - { "padding" }, + { "heading id:upload.content" }, { "panel id:dlg.upload.text icon:0x1f5b9 noscroll:1", 0, 0, (const void *) textItems }, { "panel id:dlg.upload.file icon:0x1f4c1", 0, 0, (const void *) fileItems }, { NULL } -- cgit v1.2.3 From 01c298520d7b6d9ad268d59a6d2a0b99c5cded78 Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Wed, 15 Dec 2021 18:56:31 +0200 Subject: Preferences: Option for cursor blinking --- po/en.po | 3 +++ src/app.c | 16 ++++++++-------- src/prefs.c | 1 + src/prefs.h | 1 + src/ui/inputwidget.c | 24 +++++++++++++++++------- src/ui/util.c | 9 +++++---- 6 files changed, 35 insertions(+), 19 deletions(-) (limited to 'po') diff --git a/po/en.po b/po/en.po index 33c86382..3fc5423d 100644 --- a/po/en.po +++ b/po/en.po @@ -1441,6 +1441,9 @@ msgstr "UI scale factor:" msgid "prefs.customframe" msgstr "Custom window frame:" +msgid "prefs.blink" +msgstr "Blinking cursor:" + msgid "prefs.returnkey" msgstr "Return key behavior:" diff --git a/src/app.c b/src/app.c index 828f5097..e807f09d 100644 --- a/src/app.c +++ b/src/app.c @@ -258,6 +258,7 @@ static iString *serializePrefs_App_(const iApp *d) { { "prefs.bookmarks.addbottom", &d->prefs.addBookmarksToBottom }, { "prefs.archive.openindex", &d->prefs.openArchiveIndexPages }, { "prefs.font.warnmissing", &d->prefs.warnAboutMissingGlyphs }, + { "prefs.blink", &d->prefs.blinkingCursor }, }; iForIndices(i, boolPrefs) { appendFormat_String(str, "%s.changed arg:%d\n", boolPrefs[i].id, *boolPrefs[i].value); @@ -2600,6 +2601,10 @@ iBool handleCommand_App(const char *cmd) { d->prefs.uiAnimations = arg_Command(cmd) != 0; return iTrue; } + else if (equal_Command(cmd, "prefs.blink.changed")) { + d->prefs.blinkingCursor = arg_Command(cmd) != 0; + return iTrue; + } else if (equal_Command(cmd, "prefs.time.24h.changed")) { d->prefs.time24h = arg_Command(cmd) != 0; return iTrue; @@ -2911,6 +2916,8 @@ iBool handleCommand_App(const char *cmd) { iWidget *dlg = makePreferences_Widget(); updatePrefsThemeButtons_(dlg); setText_InputWidget(findChild_Widget(dlg, "prefs.downloads"), &d->prefs.strings[downloadDir_PrefsString]); + /* TODO: Use a common table in Prefs to do this more conviently. + Also see `serializePrefs_App_()`. */ setToggle_Widget(findChild_Widget(dlg, "prefs.hoverlink"), d->prefs.hoverLink); setToggle_Widget(findChild_Widget(dlg, "prefs.smoothscroll"), d->prefs.smoothScrolling); setToggle_Widget(findChild_Widget(dlg, "prefs.imageloadscroll"), d->prefs.loadImageInsteadOfScrolling); @@ -2921,7 +2928,7 @@ iBool handleCommand_App(const char *cmd) { setToggle_Widget(findChild_Widget(dlg, "prefs.ostheme"), d->prefs.useSystemTheme); setToggle_Widget(findChild_Widget(dlg, "prefs.customframe"), d->prefs.customFrame); setToggle_Widget(findChild_Widget(dlg, "prefs.animate"), d->prefs.uiAnimations); -// setText_InputWidget(findChild_Widget(dlg, "prefs.userfont"), &d->prefs.symbolFontPath); + setToggle_Widget(findChild_Widget(dlg, "prefs.blink"), d->prefs.blinkingCursor); updatePrefsPinSplitButtons_(dlg, d->prefs.pinSplit); updateScrollSpeedButtons_(dlg, mouse_ScrollType, d->prefs.smoothScrollSpeed[mouse_ScrollType]); updateScrollSpeedButtons_(dlg, keyboard_ScrollType, d->prefs.smoothScrollSpeed[keyboard_ScrollType]); @@ -2933,13 +2940,6 @@ iBool handleCommand_App(const char *cmd) { setToggle_Widget(findChild_Widget(dlg, "prefs.retainwindow"), d->prefs.retainWindowSize); setText_InputWidget(findChild_Widget(dlg, "prefs.uiscale"), collectNewFormat_String("%g", uiScale_Window(as_Window(d->window)))); -// setFlags_Widget(findChild_Widget(dlg, format_CStr("prefs.font.%d", d->prefs.font)), -// selected_WidgetFlag, -// iTrue); -// setFlags_Widget( -// findChild_Widget(dlg, format_CStr("prefs.headingfont.%d", d->prefs.headingFont)), -// selected_WidgetFlag, -// iTrue); setFlags_Widget(findChild_Widget(dlg, "prefs.mono.gemini"), selected_WidgetFlag, d->prefs.monospaceGemini); diff --git a/src/prefs.c b/src/prefs.c index 10df9ade..5d85f195 100644 --- a/src/prefs.c +++ b/src/prefs.c @@ -42,6 +42,7 @@ void init_Prefs(iPrefs *d) { d->zoomPercent = 100; d->sideIcon = iTrue; d->hideToolbarOnScroll = iTrue; + d->blinkingCursor = iTrue; d->pinSplit = 1; d->time24h = iTrue; d->returnKey = default_ReturnKeyBehavior; diff --git a/src/prefs.h b/src/prefs.h index c9abfc8e..f22953c5 100644 --- a/src/prefs.h +++ b/src/prefs.h @@ -72,6 +72,7 @@ struct Impl_Prefs { iBool uiAnimations; float uiScale; iBool hideToolbarOnScroll; + iBool blinkingCursor; /* Document presentation */ int zoomPercent; iBool sideIcon; diff --git a/src/ui/inputwidget.c b/src/ui/inputwidget.c index 49cc0a1e..b910f905 100644 --- a/src/ui/inputwidget.c +++ b/src/ui/inputwidget.c @@ -588,7 +588,7 @@ static void updateVisible_InputWidget_(iInputWidget *d) { } d->visWrapLines.start += delta; d->visWrapLines.end += delta; - iAssert(contains_Range(&d->visWrapLines, cursorY)); +// iAssert(contains_Range(&d->visWrapLines, cursorY)); if (!isFocused_Widget(d) && d->maxWrapLines == 1) { d->visWrapLines.start = 0; d->visWrapLines.end = 1; @@ -711,7 +711,10 @@ static uint32_t cursorTimer_(uint32_t interval, void *w) { return interval; } -static void startOrStopCursorTimer_InputWidget_(iInputWidget *d, iBool doStart) { +static void startOrStopCursorTimer_InputWidget_(iInputWidget *d, int doStart) { + if (!prefs_App()->blinkingCursor && doStart == 1) { + doStart = iFalse; + } if (doStart && !d->timer) { d->timer = SDL_AddTimer(refreshInterval_InputWidget_, cursorTimer_, d); } @@ -2167,6 +2170,12 @@ static iBool processEvent_InputWidget_(iInputWidget *d, const SDL_Event *ev) { return iFalse; } #if !LAGRANGE_USE_SYSTEM_TEXT_INPUT + else if (isCommand_UserEvent(ev, "prefs.blink.changed")) { + if (isEditing_InputWidget_(d) && arg_Command(command_UserEvent(ev))) { + startOrStopCursorTimer_InputWidget_(d, 2); + } + return iFalse; + } else if (isEditing_InputWidget_(d) && (isCommand_UserEvent(ev, "window.focus.lost") || isCommand_UserEvent(ev, "window.focus.gained"))) { startOrStopCursorTimer_InputWidget_(d, isCommand_UserEvent(ev, "window.focus.gained")); @@ -2613,10 +2622,10 @@ static void draw_InputWidget_(const iInputWidget *d) { return; } const iRect contentBounds = contentBounds_InputWidget_(d); - iInt2 drawPos = topLeft_Rect(contentBounds); - const int fg = isHint ? uiAnnotation_ColorId - : isFocused /*&& !isEmpty_Array(&d->lines)*/ ? uiInputTextFocused_ColorId - : uiInputText_ColorId; + iInt2 drawPos = topLeft_Rect(contentBounds); + const int fg = isHint ? uiAnnotation_ColorId + : isFocused ? uiInputTextFocused_ColorId + : uiInputText_ColorId; #if !LAGRANGE_USE_SYSTEM_TEXT_INPUT setClip_Paint(&p, adjusted_Rect(bounds, @@ -2685,7 +2694,8 @@ static void draw_InputWidget_(const iInputWidget *d) { wrapText.context = NULL; } /* Draw the insertion point. */ - if (isFocused && d->cursorVis && contains_Range(&visLines, d->cursor.y) && + if (isFocused && (d->cursorVis || !prefs_App()->blinkingCursor) && + contains_Range(&visLines, d->cursor.y) && (deviceType_App() == desktop_AppDeviceType || isEmpty_Range(&d->mark))) { iInt2 curSize; iRangecc cursorChar = iNullRange; diff --git a/src/ui/util.c b/src/ui/util.c index db24b6fc..a46c7f80 100644 --- a/src/ui/util.c +++ b/src/ui/util.c @@ -2629,9 +2629,8 @@ iWidget *makePreferences_Widget(void) { } /* User Interface. */ { appendTwoColumnTabPage_Widget(tabs, "${heading.prefs.interface}", '2', &headings, &values); -#if defined (LAGRANGE_ENABLE_CUSTOM_FRAME) - addDialogToggle_(headings, values, "${prefs.customframe}", "prefs.customframe"); -#endif + addDialogToggle_(headings, values, "${prefs.animate}", "prefs.animate"); + addDialogToggle_(headings, values, "${prefs.blink}", "prefs.blink"); addChild_Widget(headings, iClob(makeHeading_Widget("${prefs.returnkey}"))); /* Return key behaviors. */ { iLabelWidget *returnKey = makeMenuButton_LabelWidget( @@ -2645,7 +2644,9 @@ iWidget *makePreferences_Widget(void) { setId_Widget(addChildFlags_Widget(values, iClob(returnKey), alignLeft_WidgetFlag), "prefs.returnkey"); } - addDialogToggle_(headings, values, "${prefs.animate}", "prefs.animate"); +#if defined (LAGRANGE_ENABLE_CUSTOM_FRAME) + addDialogToggle_(headings, values, "${prefs.customframe}", "prefs.customframe"); +#endif makeTwoColumnHeading_("${heading.prefs.scrolling}", headings, values); addDialogToggle_(headings, values, "${prefs.smoothscroll}", "prefs.smoothscroll"); /* Scroll speeds. */ { -- cgit v1.2.3 From a5a59eb664cdfb5fe37fb7d8c82d11c7008cbac7 Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Thu, 16 Dec 2021 11:09:35 +0200 Subject: DocumentWidget: Paste preceding line Added a special actions menu in the input prompt to allow the user to paste the line preceding the latest clicked link from the originating document. One use case for this is user-editable lines. --- po/en.po | 4 ++ res/lang/cs.bin | Bin 31435 -> 31510 bytes res/lang/de.bin | Bin 30442 -> 30517 bytes res/lang/en.bin | Bin 26539 -> 26614 bytes res/lang/eo.bin | Bin 25493 -> 25568 bytes res/lang/es.bin | Bin 30266 -> 30341 bytes res/lang/es_MX.bin | Bin 27598 -> 27673 bytes res/lang/fi.bin | Bin 30099 -> 30174 bytes res/lang/fr.bin | Bin 31246 -> 31321 bytes res/lang/gl.bin | Bin 29451 -> 29526 bytes res/lang/hu.bin | Bin 31271 -> 31346 bytes res/lang/ia.bin | Bin 28598 -> 28673 bytes res/lang/ie.bin | Bin 29186 -> 29261 bytes res/lang/isv.bin | Bin 25259 -> 25334 bytes res/lang/pl.bin | Bin 29874 -> 29949 bytes res/lang/ru.bin | Bin 44634 -> 44709 bytes res/lang/sk.bin | Bin 25595 -> 25670 bytes res/lang/sr.bin | Bin 44060 -> 44135 bytes res/lang/tok.bin | Bin 27308 -> 27383 bytes res/lang/tr.bin | Bin 29492 -> 29567 bytes res/lang/uk.bin | Bin 43979 -> 44054 bytes res/lang/zh_Hans.bin | Bin 25493 -> 25568 bytes res/lang/zh_Hant.bin | Bin 25691 -> 25766 bytes src/app.c | 21 +++++++++-- src/ui/documentwidget.c | 98 +++++++++++++++++++++++++++++++++++++----------- src/ui/documentwidget.h | 1 + src/ui/inputwidget.c | 10 +++-- src/ui/inputwidget.h | 1 + src/ui/mobile.c | 12 +++--- src/ui/root.c | 2 +- src/ui/util.c | 12 ++++-- src/ui/window.c | 6 ++- src/ui/window.h | 1 + 33 files changed, 128 insertions(+), 40 deletions(-) (limited to 'po') diff --git a/po/en.po b/po/en.po index 3fc5423d..481545cf 100644 --- a/po/en.po +++ b/po/en.po @@ -760,6 +760,10 @@ msgstr "Line break" msgid "dlg.input.send" msgstr "Send" +# Paste the line preceding the clicked link into the input prompt. +msgid "menu.input.precedingline" +msgstr "Paste Preceding Line" + msgid "heading.save" msgstr "FILE SAVED" diff --git a/res/lang/cs.bin b/res/lang/cs.bin index 3a5b5820..97197051 100644 Binary files a/res/lang/cs.bin and b/res/lang/cs.bin differ diff --git a/res/lang/de.bin b/res/lang/de.bin index 57a6c945..d2dceda6 100644 Binary files a/res/lang/de.bin and b/res/lang/de.bin differ diff --git a/res/lang/en.bin b/res/lang/en.bin index 6c921d9b..28c11997 100644 Binary files a/res/lang/en.bin and b/res/lang/en.bin differ diff --git a/res/lang/eo.bin b/res/lang/eo.bin index b0ad3a58..d148e2f0 100644 Binary files a/res/lang/eo.bin and b/res/lang/eo.bin differ diff --git a/res/lang/es.bin b/res/lang/es.bin index 61a5b870..92037aea 100644 Binary files a/res/lang/es.bin and b/res/lang/es.bin differ diff --git a/res/lang/es_MX.bin b/res/lang/es_MX.bin index 6658bbcb..7b7e1219 100644 Binary files a/res/lang/es_MX.bin and b/res/lang/es_MX.bin differ diff --git a/res/lang/fi.bin b/res/lang/fi.bin index 287de822..243e9740 100644 Binary files a/res/lang/fi.bin and b/res/lang/fi.bin differ diff --git a/res/lang/fr.bin b/res/lang/fr.bin index 495a1b30..507cbb4c 100644 Binary files a/res/lang/fr.bin and b/res/lang/fr.bin differ diff --git a/res/lang/gl.bin b/res/lang/gl.bin index efafd3a1..447ed72d 100644 Binary files a/res/lang/gl.bin and b/res/lang/gl.bin differ diff --git a/res/lang/hu.bin b/res/lang/hu.bin index e0095569..c2a085ec 100644 Binary files a/res/lang/hu.bin and b/res/lang/hu.bin differ diff --git a/res/lang/ia.bin b/res/lang/ia.bin index fb4f482c..5305304c 100644 Binary files a/res/lang/ia.bin and b/res/lang/ia.bin differ diff --git a/res/lang/ie.bin b/res/lang/ie.bin index d397cdea..69ac42d4 100644 Binary files a/res/lang/ie.bin and b/res/lang/ie.bin differ diff --git a/res/lang/isv.bin b/res/lang/isv.bin index 012e624f..56ed525c 100644 Binary files a/res/lang/isv.bin and b/res/lang/isv.bin differ diff --git a/res/lang/pl.bin b/res/lang/pl.bin index 60b5d77c..1ad99e5d 100644 Binary files a/res/lang/pl.bin and b/res/lang/pl.bin differ diff --git a/res/lang/ru.bin b/res/lang/ru.bin index 8cda6497..03092acf 100644 Binary files a/res/lang/ru.bin and b/res/lang/ru.bin differ diff --git a/res/lang/sk.bin b/res/lang/sk.bin index 9a5355d9..bf13f594 100644 Binary files a/res/lang/sk.bin and b/res/lang/sk.bin differ diff --git a/res/lang/sr.bin b/res/lang/sr.bin index 7d5183e5..823818e2 100644 Binary files a/res/lang/sr.bin and b/res/lang/sr.bin differ diff --git a/res/lang/tok.bin b/res/lang/tok.bin index e21e8201..50743783 100644 Binary files a/res/lang/tok.bin and b/res/lang/tok.bin differ diff --git a/res/lang/tr.bin b/res/lang/tr.bin index 9dd4764e..543739cd 100644 Binary files a/res/lang/tr.bin and b/res/lang/tr.bin differ diff --git a/res/lang/uk.bin b/res/lang/uk.bin index a48258b6..f866f86f 100644 Binary files a/res/lang/uk.bin and b/res/lang/uk.bin differ diff --git a/res/lang/zh_Hans.bin b/res/lang/zh_Hans.bin index 1ad2db27..179d87db 100644 Binary files a/res/lang/zh_Hans.bin and b/res/lang/zh_Hans.bin differ diff --git a/res/lang/zh_Hant.bin b/res/lang/zh_Hant.bin index f4263b3b..aad28410 100644 Binary files a/res/lang/zh_Hant.bin and b/res/lang/zh_Hant.bin differ diff --git a/src/app.c b/src/app.c index e807f09d..accdd991 100644 --- a/src/app.c +++ b/src/app.c @@ -356,7 +356,7 @@ static void loadPrefs_App_(iApp *d) { setUiScale_Window(get_Window(), argf_Command(cmd)); } else if (equal_Command(cmd, "uilang")) { - const char *id = cstr_Rangecc(range_Command(cmd, "id")); + const char *id = cstr_Command(cmd, "id"); setCStr_String(&d->prefs.strings[uiLanguage_PrefsString], id); setCurrent_Lang(id); } @@ -2190,6 +2190,7 @@ iBool handleCommand_App(const char *cmd) { return iTrue; } else if (equal_Command(cmd, "fontpack.suggest.classic")) { + /* TODO: Don't use this when system fonts are accessible. */ if (!isInstalled_Fonts("classic-set") && !isInstalled_Fonts("cjk")) { makeQuestion_Widget( uiHeading_ColorEscape "${heading.fontpack.classic}", @@ -2243,6 +2244,9 @@ iBool handleCommand_App(const char *cmd) { (argLabel_Command(cmd, "axis") ? vertical_WindowSplit : 0) | (arg_Command(cmd) << 1); const char *url = suffixPtr_Command(cmd, "url"); setCStr_String(d->window->pendingSplitUrl, url ? url : ""); + if (hasLabel_Command(cmd, "origin")) { + set_String(d->window->pendingSplitOrigin, string_Command(cmd, "origin")); + } postRefresh_App(); return iTrue; } @@ -2732,12 +2736,21 @@ iBool handleCommand_App(const char *cmd) { openInDefaultBrowser_App(url); return iTrue; } + iDocumentWidget *doc = document_Command(cmd); + iDocumentWidget *origin = doc; + if (hasLabel_Command(cmd, "origin")) { + iDocumentWidget *cmdOrig = findWidget_App(cstr_Command(cmd, "origin")); + if (cmdOrig) { + origin = cmdOrig; + } + } const int newTab = argLabel_Command(cmd, "newtab"); if (newTab & otherRoot_OpenTabFlag && numRoots_Window(get_Window()) == 1) { /* Need to split first. */ const iInt2 winSize = get_Window()->size; - postCommandf_App("ui.split arg:3 axis:%d newtab:%d url:%s", + postCommandf_App("ui.split arg:3 axis:%d origin:%s newtab:%d url:%s", (float) winSize.x / (float) winSize.y < 0.7f ? 1 : 0, + cstr_String(id_Widget(as_Widget(origin))), newTab & ~otherRoot_OpenTabFlag, cstr_String(url)); return iTrue; @@ -2749,7 +2762,6 @@ iBool handleCommand_App(const char *cmd) { setKeyRoot_Window(as_Window(d->window), root); setCurrent_Root(root); /* need to change for widget creation */ } - iDocumentWidget *doc = document_Command(cmd); if (newTab & (new_OpenTabFlag | newBackground_OpenTabFlag)) { doc = newTab_App(NULL, (newTab & new_OpenTabFlag) != 0); /* `newtab:2` to open in background */ } @@ -2766,13 +2778,14 @@ iBool handleCommand_App(const char *cmd) { } setInitialScroll_DocumentWidget(doc, argfLabel_Command(cmd, "scroll")); setRedirectCount_DocumentWidget(doc, redirectCount); + setOrigin_DocumentWidget(doc, origin); showCollapsed_Widget(findWidget_App("document.progress"), iFalse); if (prefs_App()->decodeUserVisibleURLs) { urlDecodePath_String(url); } else { urlEncodePath_String(url); - } + } setUrlFlags_DocumentWidget(doc, url, (isHistory ? useCachedContentIfAvailable_DocumentWidgetSetUrlFlag : 0) | (fromSidebar ? openedFromSidebar_DocumentWidgetSetUrlFlag : 0)); diff --git a/src/ui/documentwidget.c b/src/ui/documentwidget.c index 384c51b5..50df05f5 100644 --- a/src/ui/documentwidget.c +++ b/src/ui/documentwidget.c @@ -264,6 +264,7 @@ struct Impl_DocumentWidget { int pinchZoomPosted; float swipeSpeed; /* points/sec */ iString pendingGotoHeading; + iString linePrecedingLink; /* Network request: */ enum iRequestState state; @@ -391,6 +392,7 @@ void init_DocumentWidget(iDocumentWidget *d) { d->grabbedPlayer = NULL; d->mediaTimer = 0; init_String(&d->pendingGotoHeading); + init_String(&d->linePrecedingLink); init_Click(&d->click, d, SDL_BUTTON_LEFT); addChild_Widget(w, iClob(d->scroll = new_ScrollWidget())); d->menu = NULL; /* created when clicking */ @@ -437,6 +439,7 @@ void deinit_DocumentWidget(iDocumentWidget *d) { iRelease(d->media); iRelease(d->request); delete_Gempub(d->sourceGempub); + deinit_String(&d->linePrecedingLink); deinit_String(&d->pendingGotoHeading); deinit_Block(&d->sourceContent); deinit_String(&d->sourceMime); @@ -1893,7 +1896,7 @@ static void addBannerWarnings_DocumentWidget_(iDocumentWidget *d) { static void updateFromCachedResponse_DocumentWidget_(iDocumentWidget *d, float normScrollY, const iGmResponse *resp, iGmDocument *cachedDoc) { - iAssert(width_Widget(d) > 0); /* must be laid out by now */ +// iAssert(width_Widget(d) > 0); /* must be laid out by now */ setLinkNumberMode_DocumentWidget_(d, iFalse); clear_ObjectList(d->media); delete_Gempub(d->sourceGempub); @@ -1918,9 +1921,6 @@ static void updateFromCachedResponse_DocumentWidget_(iDocumentWidget *d, float n setWidth_GmDocument(d->doc, documentWidth_DocumentWidget_(d), width_Widget(d)); } updateDocument_DocumentWidget_(d, resp, cachedDoc, iTrue); -// if (!cachedDoc) { -// setCachedDocument_History(d->mod.history, d->doc, iFalse); -// } clear_Banner(d->banner); updateBanner_DocumentWidget_(d); addBannerWarnings_DocumentWidget_(d); @@ -2242,6 +2242,16 @@ static void checkResponse_DocumentWidget_(iDocumentWidget *d) { if (lineBreak && deviceType_App() != desktop_AppDeviceType) { addChildPos_Widget(buttons, iClob(lineBreak), front_WidgetAddPos); } + /* Menu for additional actions, past entries. */ { + iMenuItem items[] = { { "${menu.input.precedingline}", + SDLK_v, + KMOD_PRIMARY | KMOD_SHIFT, + format_CStr("!valueinput.set ptr:%p text:%s", + buttons, + cstr_String(&d->linePrecedingLink)) } }; + iLabelWidget *menu = makeMenuButton_LabelWidget(midEllipsis_Icon, items, 1); + addChildPos_Widget(buttons, iClob(menu), front_WidgetAddPos); + } setValidator_InputWidget(findChild_Widget(dlg, "input"), inputQueryValidator_, d); setSensitiveContent_InputWidget(findChild_Widget(dlg, "input"), statusCode == sensitiveInput_GmStatusCode); @@ -3836,6 +3846,30 @@ static void beginMarkingSelection_DocumentWidget_(iDocumentWidget *d, iInt2 pos) refresh_Widget(as_Widget(d)); } +static void linkWasTriggered_DocumentWidget_(iDocumentWidget *d, iGmLinkId id) { + iRangecc loc = linkUrlRange_GmDocument(d->doc, id); + if (!loc.start) { + clear_String(&d->linePrecedingLink); + return; + } + const char *start = range_String(source_GmDocument(d->doc)).start; + /* Find the preceding line. This is offered as a prefill option for a possible input query. */ + while (loc.start > start && *loc.start != '\n') { + loc.start--; + } + loc.end = loc.start; /* End of the preceding line. */ + if (loc.start > start) { + loc.start--; + } + while (loc.start > start && *loc.start != '\n') { + loc.start--; + } + if (*loc.start == '\n') { + loc.start++; /* Start of the preceding line. */ + } + setRange_String(&d->linePrecedingLink, loc); +} + static iBool processEvent_DocumentWidget_(iDocumentWidget *d, const SDL_Event *ev) { iWidget *w = as_Widget(d); if (isMetricsChange_UserEvent(ev)) { @@ -3878,6 +3912,7 @@ static iBool processEvent_DocumentWidget_(iDocumentWidget *d, const SDL_Event *e : (d->flags & newTabViaHomeKeys_DocumentWidgetFlag ? 1 : 0)), cstr_String(absoluteUrl_String( d->mod.url, linkUrl_GmDocument(d->doc, run->linkId)))); + linkWasTriggered_DocumentWidget_(d, run->linkId); } setLinkNumberMode_DocumentWidget_(d, iFalse); invalidateVisibleLinks_DocumentWidget_(d); @@ -3995,6 +4030,7 @@ static iBool processEvent_DocumentWidget_(iDocumentWidget *d, const SDL_Event *e return iTrue; } if (ev->button.button == SDL_BUTTON_MIDDLE && d->hoverLink) { + linkWasTriggered_DocumentWidget_(d, d->hoverLink->linkId); postCommandf_Root(w->root, "open newtab:%d url:%s", (isPinned_DocumentWidget_(d) ? otherRoot_OpenTabFlag : 0) | (modState_Keys() & KMOD_SHIFT ? new_OpenTabFlag : newBackground_OpenTabFlag), @@ -4015,6 +4051,7 @@ static iBool processEvent_DocumentWidget_(iDocumentWidget *d, const SDL_Event *e init_Array(&items, sizeof(iMenuItem)); if (d->contextLink) { /* Context menu for a link. */ + linkWasTriggered_DocumentWidget_(d, d->contextLink->linkId); /* perhaps will be triggered */ const iString *linkUrl = linkUrl_GmDocument(d->doc, d->contextLink->linkId); // const int linkFlags = linkFlags_GmDocument(d->doc, d->contextLink->linkId); const iRangecc scheme = urlScheme_String(linkUrl); @@ -4034,23 +4071,30 @@ static iBool processEvent_DocumentWidget_(iDocumentWidget *d, const SDL_Event *e /* Regular links that we can open. */ pushBackN_Array( &items, - (iMenuItem[]){ - { openTab_Icon " ${link.newtab}", - 0, - 0, - format_CStr("!open newtab:1 url:%s", cstr_String(linkUrl)) }, - { openTabBg_Icon " ${link.newtab.background}", - 0, - 0, - format_CStr("!open newtab:2 url:%s", cstr_String(linkUrl)) }, - { "${link.side}", - 0, - 0, - format_CStr("!open newtab:4 url:%s", cstr_String(linkUrl)) }, - { "${link.side.newtab}", - 0, - 0, - format_CStr("!open newtab:5 url:%s", cstr_String(linkUrl)) } }, + (iMenuItem[]){ { openTab_Icon " ${link.newtab}", + 0, + 0, + format_CStr("!open newtab:1 origin:%s url:%s", + cstr_String(id_Widget(w)), + cstr_String(linkUrl)) }, + { openTabBg_Icon " ${link.newtab.background}", + 0, + 0, + format_CStr("!open newtab:2 origin:%s url:%s", + cstr_String(id_Widget(w)), + cstr_String(linkUrl)) }, + { "${link.side}", + 0, + 0, + format_CStr("!open newtab:4 origin:%s url:%s", + cstr_String(id_Widget(w)), + cstr_String(linkUrl)) }, + { "${link.side.newtab}", + 0, + 0, + format_CStr("!open newtab:5 origin:%s url:%s", + cstr_String(id_Widget(w)), + cstr_String(linkUrl)) } }, 4); if (deviceType_App() == phone_AppDeviceType) { removeN_Array(&items, size_Array(&items) - 2, iInvalidSize); @@ -4072,7 +4116,9 @@ static iBool processEvent_DocumentWidget_(iDocumentWidget *d, const SDL_Event *e { isGemini ? "${link.noproxy}" : openExt_Icon " ${link.browser}", 0, 0, - format_CStr("!open noproxy:1 url:%s", cstr_String(linkUrl)) } }, + format_CStr("!open origin:%s noproxy:1 url:%s", + cstr_String(id_Widget(w)), + cstr_String(linkUrl)) } }, 2); } iString *linkLabel = collectNewRange_String( @@ -4414,6 +4460,7 @@ static iBool processEvent_DocumentWidget_(iDocumentWidget *d, const SDL_Event *e if (isPinned_DocumentWidget_(d)) { tabMode ^= otherRoot_OpenTabFlag; } + linkWasTriggered_DocumentWidget_(d, linkId); postCommandf_Root(w->root, "open newtab:%d url:%s", tabMode, cstr_String(absoluteUrl_String( @@ -5495,6 +5542,13 @@ iDocumentWidget *duplicate_DocumentWidget(const iDocumentWidget *orig) { return d; } +void setOrigin_DocumentWidget(iDocumentWidget *d, const iDocumentWidget *other) { + if (d != other) { + /* TODO: Could remember the other's ID? */ + set_String(&d->linePrecedingLink, &other->linePrecedingLink); + } +} + void setUrl_DocumentWidget(iDocumentWidget *d, const iString *url) { setUrlFlags_DocumentWidget(d, url, 0); } diff --git a/src/ui/documentwidget.h b/src/ui/documentwidget.h index c97fa0ba..1405f19d 100644 --- a/src/ui/documentwidget.h +++ b/src/ui/documentwidget.h @@ -53,6 +53,7 @@ enum iDocumentWidgetSetUrlFlags { openedFromSidebar_DocumentWidgetSetUrlFlag = iBit(2), }; +void setOrigin_DocumentWidget (iDocumentWidget *, const iDocumentWidget *other); void setUrl_DocumentWidget (iDocumentWidget *, const iString *url); void setUrlFlags_DocumentWidget (iDocumentWidget *, const iString *url, int setUrlFlags); void setUrlAndSource_DocumentWidget (iDocumentWidget *, const iString *url, const iString *mime, const iBlock *source); diff --git a/src/ui/inputwidget.c b/src/ui/inputwidget.c index b910f905..b94e0c27 100644 --- a/src/ui/inputwidget.c +++ b/src/ui/inputwidget.c @@ -1163,6 +1163,12 @@ void selectAll_InputWidget(iInputWidget *d) { #endif } +void validate_InputWidget(iInputWidget *d) { + if (d->validator) { + d->validator(d, d->validatorContext); /* this may change the contents */ + } +} + iLocalDef iBool isEditing_InputWidget_(const iInputWidget *d) { return (flags_Widget(constAs_Widget(d)) & selected_WidgetFlag) != 0; } @@ -1653,9 +1659,7 @@ void setEatEscape_InputWidget(iInputWidget *d, iBool eatEscape) { } static void contentsWereChanged_InputWidget_(iInputWidget *d) { - if (d->validator) { - d->validator(d, d->validatorContext); /* this may change the contents */ - } + validate_InputWidget(d); if (d->inFlags & notifyEdits_InputWidgetFlag) { postCommand_Widget(d, "input.edited id:%s", cstr_String(id_Widget(constAs_Widget(d)))); } diff --git a/src/ui/inputwidget.h b/src/ui/inputwidget.h index f70c81af..5a61ec22 100644 --- a/src/ui/inputwidget.h +++ b/src/ui/inputwidget.h @@ -57,6 +57,7 @@ void setBackupFileName_InputWidget (iInputWidget *, const char *fileName); void begin_InputWidget (iInputWidget *); void end_InputWidget (iInputWidget *, iBool accept); void selectAll_InputWidget (iInputWidget *); +void validate_InputWidget (iInputWidget *); void setSelectAllOnFocus_InputWidget (iInputWidget *, iBool selectAllOnFocus); void setSensitiveContent_InputWidget (iInputWidget *, iBool isSensitive); diff --git a/src/ui/mobile.c b/src/ui/mobile.c index bf3eb425..df2a661a 100644 --- a/src/ui/mobile.c +++ b/src/ui/mobile.c @@ -499,7 +499,7 @@ void makePanelItem_Mobile(iWidget *panel, const iMenuItem *item) { iLabelWidget *heading = NULL; iWidget * value = NULL; const char * spec = item->label; - const char * id = cstr_Rangecc(range_Command(spec, "id")); + const char * id = cstr_Command(spec, "id"); const char * label = hasLabel_Command(spec, "text") ? suffixPtr_Command(spec, "text") : format_CStr("${%s}", id); @@ -580,7 +580,7 @@ void makePanelItem_Mobile(iWidget *panel, const iMenuItem *item) { addChildFlags_Widget(widget, iClob(sep), 0); } isFirst = iFalse; - const char * radId = cstr_Rangecc(range_Command(radioItem->label, "id")); + const char * radId = cstr_Command(radioItem->label, "id"); int64_t flags = noBackground_WidgetFlag | frameless_WidgetFlag; if (!isHorizontal) { flags |= alignLeft_WidgetFlag; @@ -590,7 +590,7 @@ void makePanelItem_Mobile(iWidget *panel, const iMenuItem *item) { const char *radLabel = hasLabel_Command(radioItem->label, "label") ? format_CStr("${%s}", - cstr_Rangecc(range_Command(radioItem->label, "label"))) + cstr_Command(radioItem->label, "label")) : suffixPtr_Command(radioItem->label, "text"); button = new_LabelWidget(radLabel, radioItem->command); flags |= radio_WidgetFlag; @@ -613,7 +613,7 @@ void makePanelItem_Mobile(iWidget *panel, const iMenuItem *item) { else if (equal_Command(spec, "input")) { iInputWidget *input = new_InputWidget(argU32Label_Command(spec, "maxlen")); if (hasLabel_Command(spec, "hint")) { - setHint_InputWidget(input, cstr_Lang(cstr_Rangecc(range_Command(spec, "hint")))); + setHint_InputWidget(input, cstr_Lang(cstr_Command(spec, "hint"))); } setId_Widget(as_Widget(input), id); setUrlContent_InputWidget(input, argLabel_Command(spec, "url")); @@ -630,7 +630,7 @@ void makePanelItem_Mobile(iWidget *panel, const iMenuItem *item) { iWidget *unit = addChildFlags_Widget( as_Widget(input), iClob(new_LabelWidget( - format_CStr("${%s}", cstr_Rangecc(range_Command(spec, "unit"))), NULL)), + format_CStr("${%s}", cstr_Command(spec, "unit")), NULL)), frameless_WidgetFlag | moveToParentRightEdge_WidgetFlag | resizeToParentHeight_WidgetFlag); setContentPadding_InputWidget(input, -1, width_Widget(unit) - 4 * gap_UI); @@ -800,7 +800,7 @@ void initPanels_Mobile(iWidget *panels, iWidget *parentWidget, const iMenuItem *item = &itemsNullTerminated[i]; if (equal_Command(item->label, "panel")) { haveDetailPanels = iTrue; - const char *id = cstr_Rangecc(range_Command(item->label, "id")); + const char *id = cstr_Command(item->label, "id"); const iString *label = hasLabel_Command(item->label, "text") ? collect_String(suffix_Command(item->label, "text")) : collectNewFormat_String("${%s}", id); diff --git a/src/ui/root.c b/src/ui/root.c index 04586bac..780dc6e7 100644 --- a/src/ui/root.c +++ b/src/ui/root.c @@ -441,7 +441,7 @@ static iBool handleRootCommands_(iWidget *root, const char *cmd) { return iFalse; } else if (equal_Command(cmd, "focus.set")) { - setFocus_Widget(findWidget_App(cstr_Rangecc(range_Command(cmd, "id")))); + setFocus_Widget(findWidget_App(cstr_Command(cmd, "id"))); return iTrue; } else if (equal_Command(cmd, "input.resized")) { diff --git a/src/ui/util.c b/src/ui/util.c index a46c7f80..58e49230 100644 --- a/src/ui/util.c +++ b/src/ui/util.c @@ -1392,7 +1392,7 @@ static iBool tabSwitcher_(iWidget *tabs, const char *cmd) { if (equal_Command(cmd, "tabs.switch")) { iWidget *target = pointerLabel_Command(cmd, "page"); if (!target) { - target = findChild_Widget(tabs, cstr_Rangecc(range_Command(cmd, "id"))); + target = findChild_Widget(tabs, cstr_Command(cmd, "id")); } if (!target) return iFalse; unfocusFocusInsideTabPage_(currentTabPage_Widget(tabs)); @@ -1720,6 +1720,12 @@ iBool valueInputHandler_(iWidget *dlg, const char *cmd) { } return iFalse; } + else if (equal_Command(cmd, "valueinput.set")) { + iInputWidget *input = findChild_Widget(dlg, "input"); + setTextCStr_InputWidget(input, suffixPtr_Command(cmd, "text")); + validate_InputWidget(input); + return iTrue; + } else if (equal_Command(cmd, "valueinput.cancel")) { postCommandf_App("valueinput.cancelled id:%s", cstr_String(id_Widget(dlg))); setId_Widget(dlg, ""); /* no further commands to emit */ @@ -3317,7 +3323,7 @@ static const iMenuItem languages[] = { static iBool translationHandler_(iWidget *dlg, const char *cmd) { iUnused(dlg); if (equal_Command(cmd, "xlt.lang")) { - const iMenuItem *langItem = &languages[languageIndex_CStr(cstr_Rangecc(range_Command(cmd, "id")))]; + const iMenuItem *langItem = &languages[languageIndex_CStr(cstr_Command(cmd, "id"))]; iWidget *widget = pointer_Command(cmd); iLabelWidget *drop; if (flags_Widget(widget) & nativeMenu_WidgetFlag) { @@ -3337,7 +3343,7 @@ const char *languageId_String(const iString *menuItemLabel) { iForIndices(i, languages) { if (!languages[i].label) break; if (!cmp_String(menuItemLabel, translateCStr_Lang(languages[i].label))) { - return cstr_Rangecc(range_Command(languages[i].command, "id")); + return cstr_Command(languages[i].command, "id"); } } return ""; diff --git a/src/ui/window.c b/src/ui/window.c index a4929f51..0e13a57f 100644 --- a/src/ui/window.c +++ b/src/ui/window.c @@ -552,6 +552,7 @@ void init_MainWindow(iMainWindow *d, iRect rect) { d->splitMode = 0; d->pendingSplitMode = 0; d->pendingSplitUrl = new_String(); + d->pendingSplitOrigin = new_String(); d->place.initialPos = rect.pos; d->place.normalRect = rect; d->place.lastNotifiedSize = zero_I2(); @@ -634,6 +635,7 @@ void deinit_MainWindow(iMainWindow *d) { if (theMainWindow_ == d) { theMainWindow_ = NULL; } + delete_String(d->pendingSplitOrigin); delete_String(d->pendingSplitUrl); deinit_Window(&d->base); } @@ -1528,9 +1530,11 @@ void setSplitMode_MainWindow(iMainWindow *d, int splitFlags) { } } if (!isEmpty_String(d->pendingSplitUrl)) { - postCommandf_Root(w->roots[newRootIndex], "open url:%s", + postCommandf_Root(w->roots[newRootIndex], "open origin:%s url:%s", + cstr_String(d->pendingSplitOrigin), cstr_String(d->pendingSplitUrl)); clear_String(d->pendingSplitUrl); + clear_String(d->pendingSplitOrigin); } else if (~splitFlags & noEvents_WindowSplit) { iWidget *docTabs0 = findChild_Widget(w->roots[newRootIndex ^ 1]->widget, "doctabs"); diff --git a/src/ui/window.h b/src/ui/window.h index 6c921f09..ae111f4c 100644 --- a/src/ui/window.h +++ b/src/ui/window.h @@ -114,6 +114,7 @@ struct Impl_MainWindow { int splitMode; int pendingSplitMode; iString * pendingSplitUrl; /* URL to open in a newly opened split */ + iString * pendingSplitOrigin; /* tab from where split was initiated, if any */ SDL_Texture * appIcon; int keyboardHeight; /* mobile software keyboards */ }; -- cgit v1.2.3 From c4df3339fb9d554075a044425b17fa34fe0c43c1 Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Mon, 20 Dec 2021 06:35:23 +0200 Subject: LinkInfo: More concise presentation Bold hostname, including scheme if not `gemini`. Info is now on a single wrapped line. --- po/en.po | 6 ++-- res/lang/en.bin | Bin 26614 -> 26603 bytes res/lang/eo.bin | Bin 25568 -> 25567 bytes res/lang/isv.bin | Bin 25334 -> 25324 bytes res/lang/sk.bin | Bin 25670 -> 25660 bytes src/ui/linkinfo.c | 104 ++++++++++++++++++++++++++---------------------------- 6 files changed, 54 insertions(+), 56 deletions(-) (limited to 'po') diff --git a/po/en.po b/po/en.po index 481545cf..04b6ac19 100644 --- a/po/en.po +++ b/po/en.po @@ -3,7 +3,7 @@ msgstr "Preformatted text without a caption" # Link download progress message. msgid "doc.fetching" -msgstr "Fetching" +msgstr "Loading" #, c-format msgid "doc.archive" @@ -933,10 +933,10 @@ msgid "dlg.certimport.nokey" msgstr "No Private Key" msgid "link.hint.audio" -msgstr "Play Audio" +msgstr "Audio" msgid "link.hint.image" -msgstr "View Image" +msgstr "Image" msgid "bookmark.title.blank" msgstr "Blank Page" diff --git a/res/lang/en.bin b/res/lang/en.bin index 28c11997..942dfdc2 100644 Binary files a/res/lang/en.bin and b/res/lang/en.bin differ diff --git a/res/lang/eo.bin b/res/lang/eo.bin index d148e2f0..513c3a0b 100644 Binary files a/res/lang/eo.bin and b/res/lang/eo.bin differ diff --git a/res/lang/isv.bin b/res/lang/isv.bin index 56ed525c..26c23dc5 100644 Binary files a/res/lang/isv.bin and b/res/lang/isv.bin differ diff --git a/res/lang/sk.bin b/res/lang/sk.bin index bf13f594..4d91e8a6 100644 Binary files a/res/lang/sk.bin and b/res/lang/sk.bin differ diff --git a/src/ui/linkinfo.c b/src/ui/linkinfo.c index cb1404fc..fb608d41 100644 --- a/src/ui/linkinfo.c +++ b/src/ui/linkinfo.c @@ -51,10 +51,11 @@ iInt2 size_LinkInfo(const iLinkInfo *d) { return add_I2(d->buf->size, init_I2(2 * hPad_LinkInfo_, 2 * vPad_LinkInfo_)); } -iBool update_LinkInfo(iLinkInfo *d, const iGmDocument *doc, iGmLinkId linkId, int maxWidth) { +iBool update_LinkInfo(iLinkInfo *d, const iGmDocument *doc, iGmLinkId linkId, int maxWidth) { if (!d) { return iFalse; } + const iBool isAnimated = prefs_App()->uiAnimations; if (d->linkId != linkId || d->maxWidth != maxWidth) { d->linkId = linkId; d->maxWidth = maxWidth; @@ -62,79 +63,81 @@ iBool update_LinkInfo(iLinkInfo *d, const iGmDocument *doc, iGmLinkId linkId, in if (linkId) { /* Measure and draw. */ if (targetValue_Anim(&d->opacity) < 1) { - setValue_Anim(&d->opacity, 1, 75); + setValue_Anim(&d->opacity, 1, isAnimated ? 75 : 0); } const int avail = iMax(minWidth_LinkInfo_, maxWidth) - 2 * hPad_LinkInfo_; const iString *url = linkUrl_GmDocument(doc, linkId); iUrl parts; init_Url(&parts, url); - const int flags = linkFlags_GmDocument(doc, linkId); - const enum iGmLinkScheme scheme = scheme_GmLinkFlag(flags); - const iBool showHost = (flags & humanReadable_GmLinkFlag && - (!isEmpty_Range(&parts.host) || - scheme == mailto_GmLinkScheme)); - const iBool showImage = (flags & imageFileExtension_GmLinkFlag) != 0; - const iBool showAudio = (flags & audioFileExtension_GmLinkFlag) != 0; -// int fg = linkColor_GmDocument(doc, linkId, textHover_GmLinkPart); + const int flags = linkFlags_GmDocument(doc, linkId); + const enum iGmLinkScheme scheme = scheme_GmLinkFlag(flags); + const iBool isImage = (flags & imageFileExtension_GmLinkFlag) != 0; + const iBool isAudio = (flags & audioFileExtension_GmLinkFlag) != 0; + // int fg = linkColor_GmDocument(doc, linkId, + // textHover_GmLinkPart); iString str; init_String(&str); - if ((showHost || - (flags & (imageFileExtension_GmLinkFlag | audioFileExtension_GmLinkFlag))) && - scheme != mailto_GmLinkScheme) { + /* Most important info first: the identity that will be used. */ + const iGmIdentity *ident = identityForUrl_GmCerts(certs_App(), url); + if (ident) { + appendFormat_String(&str, person_Icon " %s", + //escape_Color(tmBannerItemTitle_ColorId), + cstr_String(name_GmIdentity(ident))); + } + /* Possibly inlined content. */ + if (isImage || isAudio) { if (!isEmpty_String(&str)) { appendCStr_String(&str, "\n"); } - if (showHost && scheme != gemini_GmLinkScheme) { - append_String( - &str, collect_String(upper_String(collectNewRange_String(parts.scheme)))); - appendCStr_String(&str, " \u2014 "); - } - if (showHost) { - appendFormat_String(&str, "\x1b[1m%s\x1b[0m", cstr_Rangecc(parts.host)); - } - if (showImage || showAudio) { - appendFormat_String( - &str, - "%s%s", - showHost ? " \u2014" : "", - format_CStr(showImage ? photo_Icon " %s " : "\U0001f3b5 %s", - cstr_Lang(showImage ? "link.hint.image" : "link.hint.audio"))); - } + appendCStr_String( + &str, + format_CStr(isImage ? photo_Icon " %s " : "\U0001f3b5 %s", + cstr_Lang(isImage ? "link.hint.image" : "link.hint.audio"))); + } + if (!isEmpty_String(&str)) { + appendCStr_String(&str, " \u2014 "); + } + /* Indicate non-Gemini schemes. */ + if (scheme == mailto_GmLinkScheme) { + appendCStr_String(&str, envelope_Icon " "); + append_String(&str, url); + } + else if (scheme != gemini_GmLinkScheme && !isEmpty_Range(&parts.host)) { + appendCStr_String(&str, globe_Icon " \x1b[1m"); + appendRange_String(&str, (iRangecc){ constBegin_String(url), + parts.host.end }); + appendCStr_String(&str, "\x1b[0m"); + appendRange_String(&str, (iRangecc){ parts.path.start, constEnd_String(url) }); } + else if (scheme != gemini_GmLinkScheme) { + appendCStr_String(&str, globe_Icon " "); + append_String(&str, url); + } + else { + appendCStr_String(&str, "\x1b[1m"); + appendRange_String(&str, parts.host); + appendCStr_String(&str, "\x1b[0m"); + appendRange_String(&str, (iRangecc){ parts.path.start, constEnd_String(url) }); + } + /* Date of last visit. */ if (flags & visited_GmLinkFlag) { iDate date; init_Date(&date, linkTime_GmDocument(doc, linkId)); if (!isEmpty_String(&str)) { appendCStr_String(&str, " \u2014 "); } -// appendCStr_String(&str, escape_Color(tmQuoteIcon_ColorId)); iString *dateStr = format_Date(&date, "%b %d"); append_String(&str, dateStr); delete_String(dateStr); } - /* Identity that will be used. */ - const iGmIdentity *ident = identityForUrl_GmCerts(certs_App(), url); - if (ident) { - if (!isEmpty_String(&str)) { - appendCStr_String(&str, " \u2014 "); - } - appendFormat_String(&str, person_Icon " %s", - //escape_Color(tmBannerItemTitle_ColorId), - cstr_String(name_GmIdentity(ident))); - } - /* Show scheme and host. */ - if (!isEmpty_String(&str)) { - appendCStr_String(&str, "\n"); - } - appendRange_String(&str, range_String(url)); - /* Draw the text. */ + /* Draw to a buffer, wrapped. */ iWrapText wt = { .text = range_String(&str), .maxWidth = avail, .mode = word_WrapTextMode }; d->buf = new_TextBuf(&wt, uiLabel_FontId, tmQuote_ColorId); deinit_String(&str); } else { if (targetValue_Anim(&d->opacity) > 0) { - setValue_Anim(&d->opacity, 0, 150); + setValue_Anim(&d->opacity, 0, isAnimated ? 150 : 0); } } return iTrue; @@ -144,13 +147,8 @@ iBool update_LinkInfo(iLinkInfo *d, const iGmDocument *doc, iGmLinkId linkId, in void invalidate_LinkInfo(iLinkInfo *d) { if (targetValue_Anim(&d->opacity) > 0) { - setValue_Anim(&d->opacity, 0, 150); + setValue_Anim(&d->opacity, 0, prefs_App()->uiAnimations ? 150 : 0); } - - // if (d->buf) { -// delete_TextBuf(d->buf); -// d->buf = NULL; -// } } void draw_LinkInfo(const iLinkInfo *d, iInt2 topLeft) { -- cgit v1.2.3 From 4481447226cf7b85231656d1798d5995c35933bb Mon Sep 17 00:00:00 2001 From: Emir Date: Sun, 26 Dec 2021 13:40:05 +0000 Subject: Translated using Weblate (Turkish) Currently translated at 100.0% (617 of 617 strings) Translation: Lagrange/User Interface Translate-URL: http://weblate.skyjake.fi/projects/lagrange/ui/tr/ --- po/tr.po | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'po') diff --git a/po/tr.po b/po/tr.po index c5fbbd0b..f317eb7d 100644 --- a/po/tr.po +++ b/po/tr.po @@ -1,7 +1,7 @@ msgid "" msgstr "" "Report-Msgid-Bugs-To: jaakko.keranen@iki.fi\n" -"PO-Revision-Date: 2021-12-04 10:50+0000\n" +"PO-Revision-Date: 2021-12-27 13:50+0000\n" "Last-Translator: Emir \n" "Language-Team: Turkish \n" "Language: tr\n" @@ -1596,8 +1596,8 @@ msgstr "KB" #, c-format msgid "page.timestamp" msgstr "" -"Alınma tarihi ve zamanı: %I.%M %p,\n" -"%d %b %Y" +"Alındı: %d %b %Y,\n" +"%I.%M %p" msgid "feeds.entry.markread" msgstr "Okundu olarak imle" -- cgit v1.2.3 From 336b9d7272ed8b1a9dccee27dec20e3377ee0c74 Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Tue, 28 Dec 2021 07:52:25 +0200 Subject: Viewing unsupported files in another app After receiving content of unsupported type, show a footer action button to open it in another app. IssueID #135 --- CMakeLists.txt | 1 + po/en.po | 3 ++ res/lang/cs.bin | Bin 31510 -> 31549 bytes res/lang/de.bin | Bin 30517 -> 30556 bytes res/lang/en.bin | Bin 26603 -> 26642 bytes res/lang/eo.bin | Bin 25567 -> 25606 bytes res/lang/es.bin | Bin 30341 -> 30380 bytes res/lang/es_MX.bin | Bin 27673 -> 27712 bytes res/lang/fi.bin | Bin 30174 -> 30213 bytes res/lang/fr.bin | Bin 31321 -> 31360 bytes res/lang/gl.bin | Bin 29526 -> 29565 bytes res/lang/hu.bin | Bin 31346 -> 31385 bytes res/lang/ia.bin | Bin 28673 -> 28712 bytes res/lang/ie.bin | Bin 29261 -> 29300 bytes res/lang/isv.bin | Bin 25324 -> 25363 bytes res/lang/pl.bin | Bin 29949 -> 29988 bytes res/lang/ru.bin | Bin 44709 -> 44748 bytes res/lang/sk.bin | Bin 25660 -> 25699 bytes res/lang/sr.bin | Bin 44135 -> 44174 bytes res/lang/tok.bin | Bin 27383 -> 27422 bytes res/lang/tr.bin | Bin 29567 -> 29606 bytes res/lang/uk.bin | Bin 44054 -> 44093 bytes res/lang/zh_Hans.bin | Bin 25568 -> 25607 bytes res/lang/zh_Hant.bin | Bin 25766 -> 25805 bytes src/app.c | 19 ++++++++----- src/app.h | 1 + src/ui/documentwidget.c | 74 +++++++++++++++++++++++++++++++++--------------- 27 files changed, 68 insertions(+), 30 deletions(-) (limited to 'po') diff --git a/CMakeLists.txt b/CMakeLists.txt index 94b70ea0..37afe9d2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -330,6 +330,7 @@ target_include_directories (app PUBLIC target_compile_options (app PUBLIC -Werror=implicit-function-declaration -Werror=incompatible-pointer-types + -Wno-deprecated-declarations ${SDL2_CFLAGS} -DSTB_VORBIS_NO_STDIO=1 -DSTB_VORBIS_NO_INTEGER_CONVERSION=1 diff --git a/po/en.po b/po/en.po index 04b6ac19..61d7d3f7 100644 --- a/po/en.po +++ b/po/en.po @@ -196,6 +196,9 @@ msgstr "Find on Page" msgid "macos.menu.find" msgstr "Find" +msgid "menu.open.external" +msgstr "Open in Another App" + # Used on iOS. "Files" refers to Apple's iOS app where you can pick an iCloud folder. msgid "menu.save.files" msgstr "Save to Files" diff --git a/res/lang/cs.bin b/res/lang/cs.bin index 97197051..ec75dc3a 100644 Binary files a/res/lang/cs.bin and b/res/lang/cs.bin differ diff --git a/res/lang/de.bin b/res/lang/de.bin index d2dceda6..96fd003f 100644 Binary files a/res/lang/de.bin and b/res/lang/de.bin differ diff --git a/res/lang/en.bin b/res/lang/en.bin index 942dfdc2..26e3c36a 100644 Binary files a/res/lang/en.bin and b/res/lang/en.bin differ diff --git a/res/lang/eo.bin b/res/lang/eo.bin index 513c3a0b..2df0e6b8 100644 Binary files a/res/lang/eo.bin and b/res/lang/eo.bin differ diff --git a/res/lang/es.bin b/res/lang/es.bin index 92037aea..be919a78 100644 Binary files a/res/lang/es.bin and b/res/lang/es.bin differ diff --git a/res/lang/es_MX.bin b/res/lang/es_MX.bin index 7b7e1219..d88b3386 100644 Binary files a/res/lang/es_MX.bin and b/res/lang/es_MX.bin differ diff --git a/res/lang/fi.bin b/res/lang/fi.bin index 243e9740..5dba618c 100644 Binary files a/res/lang/fi.bin and b/res/lang/fi.bin differ diff --git a/res/lang/fr.bin b/res/lang/fr.bin index 507cbb4c..830bbc72 100644 Binary files a/res/lang/fr.bin and b/res/lang/fr.bin differ diff --git a/res/lang/gl.bin b/res/lang/gl.bin index 447ed72d..4df0c57c 100644 Binary files a/res/lang/gl.bin and b/res/lang/gl.bin differ diff --git a/res/lang/hu.bin b/res/lang/hu.bin index c2a085ec..f4c826c8 100644 Binary files a/res/lang/hu.bin and b/res/lang/hu.bin differ diff --git a/res/lang/ia.bin b/res/lang/ia.bin index 5305304c..6a18bd7d 100644 Binary files a/res/lang/ia.bin and b/res/lang/ia.bin differ diff --git a/res/lang/ie.bin b/res/lang/ie.bin index 69ac42d4..84cc2cd7 100644 Binary files a/res/lang/ie.bin and b/res/lang/ie.bin differ diff --git a/res/lang/isv.bin b/res/lang/isv.bin index 26c23dc5..1a31a1f7 100644 Binary files a/res/lang/isv.bin and b/res/lang/isv.bin differ diff --git a/res/lang/pl.bin b/res/lang/pl.bin index 1ad99e5d..a003ce03 100644 Binary files a/res/lang/pl.bin and b/res/lang/pl.bin differ diff --git a/res/lang/ru.bin b/res/lang/ru.bin index 03092acf..807e032d 100644 Binary files a/res/lang/ru.bin and b/res/lang/ru.bin differ diff --git a/res/lang/sk.bin b/res/lang/sk.bin index 4d91e8a6..33c83c09 100644 Binary files a/res/lang/sk.bin and b/res/lang/sk.bin differ diff --git a/res/lang/sr.bin b/res/lang/sr.bin index 823818e2..7c4c8de1 100644 Binary files a/res/lang/sr.bin and b/res/lang/sr.bin differ diff --git a/res/lang/tok.bin b/res/lang/tok.bin index 50743783..601b07f3 100644 Binary files a/res/lang/tok.bin and b/res/lang/tok.bin differ diff --git a/res/lang/tr.bin b/res/lang/tr.bin index 543739cd..8cbaa556 100644 Binary files a/res/lang/tr.bin and b/res/lang/tr.bin differ diff --git a/res/lang/uk.bin b/res/lang/uk.bin index f866f86f..48adc59b 100644 Binary files a/res/lang/uk.bin and b/res/lang/uk.bin differ diff --git a/res/lang/zh_Hans.bin b/res/lang/zh_Hans.bin index 179d87db..759e618a 100644 Binary files a/res/lang/zh_Hans.bin and b/res/lang/zh_Hans.bin differ diff --git a/res/lang/zh_Hant.bin b/res/lang/zh_Hant.bin index aad28410..2bfc817b 100644 Binary files a/res/lang/zh_Hant.bin and b/res/lang/zh_Hant.bin differ diff --git a/src/app.c b/src/app.c index b04b6388..b0b36783 100644 --- a/src/app.c +++ b/src/app.c @@ -1021,7 +1021,7 @@ const iString *downloadDir_App(void) { return collect_String(cleaned_Path(&app_.prefs.strings[downloadDir_PrefsString])); } -const iString *downloadPathForUrl_App(const iString *url, const iString *mime) { +const iString *fileNameForUrl_App(const iString *url, const iString *mime) { /* Figure out a file name from the URL. */ iUrl parts; init_Url(&parts, url); @@ -1047,22 +1047,27 @@ const iString *downloadPathForUrl_App(const iString *url, const iString *mime) { } } if (startsWith_String(name, "~")) { - /* This would be interpreted as a reference to a home directory. */ + /* This might be interpreted as a reference to a home directory. */ remove_Block(&name->chars, 0, 1); } - iString *savePath = concat_Path(downloadDir_App(), name); - if (lastIndexOfCStr_String(savePath, ".") == iInvalidPos) { + if (lastIndexOfCStr_String(name, ".") == iInvalidPos) { + /* TODO: Needs the inverse of `mediaTypeFromFileExtension_String()`. */ /* No extension specified in URL. */ if (startsWith_String(mime, "text/gemini")) { - appendCStr_String(savePath, ".gmi"); + appendCStr_String(name, ".gmi"); } else if (startsWith_String(mime, "text/")) { - appendCStr_String(savePath, ".txt"); + appendCStr_String(name, ".txt"); } else if (startsWith_String(mime, "image/")) { - appendCStr_String(savePath, cstr_String(mime) + 6); + appendCStr_String(name, cstr_String(mime) + 6); } } + return name; +} + +const iString *downloadPathForUrl_App(const iString *url, const iString *mime) { + iString *savePath = concat_Path(downloadDir_App(), fileNameForUrl_App(url, mime)); if (fileExists_FileInfo(savePath)) { /* Make it unique. */ iDate now; diff --git a/src/app.h b/src/app.h index 50d3ac6b..0c336e65 100644 --- a/src/app.h +++ b/src/app.h @@ -110,6 +110,7 @@ enum iColorTheme colorTheme_App (void); const iString * schemeProxy_App (iRangecc scheme); iBool willUseProxy_App (const iRangecc scheme); const iString * searchQueryUrl_App (const iString *queryStringUnescaped); +const iString * fileNameForUrl_App (const iString *url, const iString *mime); const iString * downloadPathForUrl_App(const iString *url, const iString *mime); typedef void (*iTickerFunc)(iAny *); diff --git a/src/ui/documentwidget.c b/src/ui/documentwidget.c index 04257a1c..3771dd6c 100644 --- a/src/ui/documentwidget.c +++ b/src/ui/documentwidget.c @@ -2260,6 +2260,11 @@ static void showErrorPage_DocumentWidget_(iDocumentWidget *d, enum iGmStatusCode 0, format_CStr("document.setmediatype mime:%s", mtype) }); } + pushBack_Array(&items, + &(iMenuItem){ export_Icon " ${menu.open.external}", + SDLK_RETURN, + KMOD_PRIMARY, + "document.save extview:1" }); pushBack_Array( &items, &(iMenuItem){ translateCStr_Lang(download_Icon " " saveToDownloads_Label), @@ -3337,9 +3342,8 @@ static iBool fetchNextUnfetchedImage_DocumentWidget_(iDocumentWidget *d) { return iFalse; } -static const iString *saveToDownloads_(const iString *url, const iString *mime, const iBlock *content, - iBool showDialog) { - const iString *savePath = downloadPathForUrl_App(url, mime); +static iBool saveToFile_(const iString *savePath, const iBlock *content, iBool showDialog) { + iBool ok = iFalse; /* Write the file. */ { iFile *f = new_File(savePath); if (open_File(f, writeOnly_FileMode)) { @@ -3351,21 +3355,21 @@ static const iString *saveToDownloads_(const iString *url, const iString *mime, exportDownloadedFile_iOS(savePath); #else if (showDialog) { - const iMenuItem items[2] = { - { "${dlg.save.opendownload}", 0, 0, - format_CStr("!open url:%s", cstrCollect_String(makeFileUrl_String(savePath))) }, - { "${dlg.message.ok}", 0, 0, "message.ok" }, - }; - makeMessage_Widget(uiHeading_ColorEscape "${heading.save}", - format_CStr("%s\n${dlg.save.size} %.3f %s", - cstr_String(path_File(f)), - isMega ? size / 1.0e6f : (size / 1.0e3f), - isMega ? "${mb}" : "${kb}"), - items, - iElemCount(items)); + const iMenuItem items[2] = { + { "${dlg.save.opendownload}", 0, 0, + format_CStr("!open url:%s", cstrCollect_String(makeFileUrl_String(savePath))) }, + { "${dlg.message.ok}", 0, 0, "message.ok" }, + }; + makeMessage_Widget(uiHeading_ColorEscape "${heading.save}", + format_CStr("%s\n${dlg.save.size} %.3f %s", + cstr_String(path_File(f)), + isMega ? size / 1.0e6f : (size / 1.0e3f), + isMega ? "${mb}" : "${kb}"), + items, + iElemCount(items)); } #endif - return savePath; + ok = iTrue; } else { makeSimpleMessage_Widget(uiTextCaution_ColorEscape "${heading.save.error}", @@ -3373,7 +3377,16 @@ static const iString *saveToDownloads_(const iString *url, const iString *mime, } iRelease(f); } - return collectNew_String(); + return ok; +} + +static const iString *saveToDownloads_(const iString *url, const iString *mime, const iBlock *content, + iBool showDialog) { + const iString *savePath = downloadPathForUrl_App(url, mime); + if (!saveToFile_(savePath, content, showDialog)) { + return collectNew_String(); + } + return savePath; } static void addAllLinks_(void *context, const iGmRun *run) { @@ -4111,12 +4124,27 @@ static iBool handleCommand_DocumentWidget_(iDocumentWidget *d, const char *cmd) "${dlg.save.incomplete}"); } else if (!isEmpty_Block(&d->sourceContent)) { - const iBool doOpen = argLabel_Command(cmd, "open"); - const iString *savePath = saveToDownloads_(d->mod.url, &d->sourceMime, - &d->sourceContent, !doOpen); - if (!isEmpty_String(savePath) && doOpen) { - postCommandf_Root( - w->root, "!open url:%s", cstrCollect_String(makeFileUrl_String(savePath))); + if (argLabel_Command(cmd, "extview")) { + iString *tmpPath = collectNewCStr_String(tmpnam(NULL)); + const iRangecc tmpDir = dirName_Path(tmpPath); + set_String( + tmpPath, + collect_String(concat_Path(collectNewRange_String(tmpDir), + fileNameForUrl_App(d->mod.url, &d->sourceMime)))); + if (saveToFile_(tmpPath, &d->sourceContent, iFalse)) { + /* TODO: Remember this temporary path and delete it when quitting the app. */ + postCommandf_Root(w->root, "!open default:1 url:%s", + cstrCollect_String(makeFileUrl_String(tmpPath))); + } + } + else { + const iBool doOpen = argLabel_Command(cmd, "open"); + const iString *savePath = saveToDownloads_(d->mod.url, &d->sourceMime, + &d->sourceContent, !doOpen); + if (!isEmpty_String(savePath) && doOpen) { + postCommandf_Root( + w->root, "!open url:%s", cstrCollect_String(makeFileUrl_String(savePath))); + } } } return iTrue; -- cgit v1.2.3 From e8f06bd0985ce2c9ac5ef02525672a426d559d18 Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Wed, 29 Dec 2021 07:18:29 +0200 Subject: Inline download context menu; macOS: Show in Finder The inline downloads UI finally has some interactivity: left-clicking on a finished download opens it in the default viewer app, and right-clicking shows a context menu with relevant actions. --- po/en.po | 4 +++ res/lang/cs.bin | Bin 31549 -> 31582 bytes res/lang/de.bin | Bin 30556 -> 30589 bytes res/lang/en.bin | Bin 26642 -> 26675 bytes res/lang/eo.bin | Bin 25606 -> 25639 bytes res/lang/es.bin | Bin 30380 -> 30413 bytes res/lang/es_MX.bin | Bin 27712 -> 27745 bytes res/lang/fi.bin | Bin 30213 -> 30246 bytes res/lang/fr.bin | Bin 31360 -> 31393 bytes res/lang/gl.bin | Bin 29565 -> 29598 bytes res/lang/hu.bin | Bin 31385 -> 31418 bytes res/lang/ia.bin | Bin 28712 -> 28745 bytes res/lang/ie.bin | Bin 29300 -> 29333 bytes res/lang/isv.bin | Bin 25363 -> 25396 bytes res/lang/pl.bin | Bin 29988 -> 30021 bytes res/lang/ru.bin | Bin 44748 -> 44781 bytes res/lang/sk.bin | Bin 25699 -> 25732 bytes res/lang/sr.bin | Bin 44174 -> 44207 bytes res/lang/tok.bin | Bin 27422 -> 27455 bytes res/lang/tr.bin | Bin 29606 -> 29639 bytes res/lang/uk.bin | Bin 44093 -> 44126 bytes res/lang/zh_Hans.bin | Bin 25607 -> 25640 bytes res/lang/zh_Hant.bin | Bin 25805 -> 25838 bytes src/app.c | 68 ++++++++++++++++++++++++++++++------------------ src/app.h | 1 + src/gmcerts.c | 2 +- src/ui/certlistwidget.c | 10 ++++--- src/ui/documentwidget.c | 66 ++++++++++++++++++++++++++++++++-------------- src/ui/linkinfo.c | 2 +- src/ui/mediaui.c | 38 +++++++++++++++++++++++++++ 30 files changed, 142 insertions(+), 49 deletions(-) (limited to 'po') diff --git a/po/en.po b/po/en.po index 61d7d3f7..49f78eb8 100644 --- a/po/en.po +++ b/po/en.po @@ -854,6 +854,10 @@ msgstr "Bookmark Link…" msgid "link.download" msgstr "Download Linked File" +# Shows where a local file is using the Finder. +msgid "menu.reveal.macos" +msgstr "Show in Finder" + msgid "link.file.delete" msgstr "Delete File" diff --git a/res/lang/cs.bin b/res/lang/cs.bin index ec75dc3a..1c30a0a9 100644 Binary files a/res/lang/cs.bin and b/res/lang/cs.bin differ diff --git a/res/lang/de.bin b/res/lang/de.bin index 96fd003f..bf05a72e 100644 Binary files a/res/lang/de.bin and b/res/lang/de.bin differ diff --git a/res/lang/en.bin b/res/lang/en.bin index 26e3c36a..bd858ade 100644 Binary files a/res/lang/en.bin and b/res/lang/en.bin differ diff --git a/res/lang/eo.bin b/res/lang/eo.bin index 2df0e6b8..cc829562 100644 Binary files a/res/lang/eo.bin and b/res/lang/eo.bin differ diff --git a/res/lang/es.bin b/res/lang/es.bin index be919a78..f62291f1 100644 Binary files a/res/lang/es.bin and b/res/lang/es.bin differ diff --git a/res/lang/es_MX.bin b/res/lang/es_MX.bin index d88b3386..f6f88d6c 100644 Binary files a/res/lang/es_MX.bin and b/res/lang/es_MX.bin differ diff --git a/res/lang/fi.bin b/res/lang/fi.bin index 5dba618c..e69245be 100644 Binary files a/res/lang/fi.bin and b/res/lang/fi.bin differ diff --git a/res/lang/fr.bin b/res/lang/fr.bin index 830bbc72..7be665e5 100644 Binary files a/res/lang/fr.bin and b/res/lang/fr.bin differ diff --git a/res/lang/gl.bin b/res/lang/gl.bin index 4df0c57c..8c1fdf24 100644 Binary files a/res/lang/gl.bin and b/res/lang/gl.bin differ diff --git a/res/lang/hu.bin b/res/lang/hu.bin index f4c826c8..b06c8676 100644 Binary files a/res/lang/hu.bin and b/res/lang/hu.bin differ diff --git a/res/lang/ia.bin b/res/lang/ia.bin index 6a18bd7d..4c3b403d 100644 Binary files a/res/lang/ia.bin and b/res/lang/ia.bin differ diff --git a/res/lang/ie.bin b/res/lang/ie.bin index 84cc2cd7..5e431c29 100644 Binary files a/res/lang/ie.bin and b/res/lang/ie.bin differ diff --git a/res/lang/isv.bin b/res/lang/isv.bin index 1a31a1f7..54cc6774 100644 Binary files a/res/lang/isv.bin and b/res/lang/isv.bin differ diff --git a/res/lang/pl.bin b/res/lang/pl.bin index a003ce03..cf6a6b23 100644 Binary files a/res/lang/pl.bin and b/res/lang/pl.bin differ diff --git a/res/lang/ru.bin b/res/lang/ru.bin index 807e032d..87c82a7d 100644 Binary files a/res/lang/ru.bin and b/res/lang/ru.bin differ diff --git a/res/lang/sk.bin b/res/lang/sk.bin index 33c83c09..3ac6e18c 100644 Binary files a/res/lang/sk.bin and b/res/lang/sk.bin differ diff --git a/res/lang/sr.bin b/res/lang/sr.bin index 7c4c8de1..5c66460d 100644 Binary files a/res/lang/sr.bin and b/res/lang/sr.bin differ diff --git a/res/lang/tok.bin b/res/lang/tok.bin index 601b07f3..19b6d9df 100644 Binary files a/res/lang/tok.bin and b/res/lang/tok.bin differ diff --git a/res/lang/tr.bin b/res/lang/tr.bin index 8cbaa556..9a8babc9 100644 Binary files a/res/lang/tr.bin and b/res/lang/tr.bin differ diff --git a/res/lang/uk.bin b/res/lang/uk.bin index 48adc59b..ebcb11be 100644 Binary files a/res/lang/uk.bin and b/res/lang/uk.bin differ diff --git a/res/lang/zh_Hans.bin b/res/lang/zh_Hans.bin index 759e618a..ab4b338a 100644 Binary files a/res/lang/zh_Hans.bin and b/res/lang/zh_Hans.bin differ diff --git a/res/lang/zh_Hant.bin b/res/lang/zh_Hant.bin index 2bfc817b..f166156f 100644 Binary files a/res/lang/zh_Hant.bin and b/res/lang/zh_Hant.bin differ diff --git a/src/app.c b/src/app.c index b0b36783..e5f9a41c 100644 --- a/src/app.c +++ b/src/app.c @@ -55,6 +55,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include #include #include +#include #include #include #include @@ -119,6 +120,7 @@ static const int idleThreshold_App_ = 1000; /* ms */ struct Impl_App { iCommandLine args; iString * execPath; + iStringSet * tempFilesPendingDeletion; iMimeHooks * mimehooks; iGmCerts * certs; iVisited * visited; @@ -735,6 +737,7 @@ static void init_App_(iApp *d, int argc, char **argv) { #endif d->isDarkSystemTheme = iTrue; /* will be updated by system later on, if supported */ d->isSuspended = iFalse; + d->tempFilesPendingDeletion = new_StringSet(); init_CommandLine(&d->args, argc, argv); /* Where was the app started from? We ask SDL first because the command line alone cannot be relied on (behavior differs depending on OS). */ { @@ -1005,8 +1008,13 @@ static void deinit_App(iApp *d) { #endif deinit_SortedArray(&d->tickers); deinit_Periodic(&d->periodic); - deinit_Lang(); + deinit_Lang(); iRecycle(); + /* Delete all temporary files created while running. */ + iConstForEach(StringSet, tmp, d->tempFilesPendingDeletion) { + remove(cstr_String(tmp.value)); + } + iRelease(d->tempFilesPendingDeletion); } const iString *execPath_App(void) { @@ -1082,6 +1090,17 @@ const iString *downloadPathForUrl_App(const iString *url, const iString *mime) { return collect_String(savePath); } +const iString *temporaryPathForUrl_App(const iString *url, const iString *mime) { + iApp *d = &app_; + iString *tmpPath = collectNewCStr_String(tmpnam(NULL)); + const iRangecc tmpDir = dirName_Path(tmpPath); + set_String( + tmpPath, + collect_String(concat_Path(collectNewRange_String(tmpDir), fileNameForUrl_App(url, mime)))); + insert_StringSet(d->tempFilesPendingDeletion, tmpPath); /* deleted in `deinit_App` */ + return tmpPath; +} + const iString *debugInfo_App(void) { extern char **environ; /* The environment variables. */ iApp *d = &app_; @@ -2687,7 +2706,9 @@ iBool handleCommand_App(const char *cmd) { } #endif else if (equal_Command(cmd, "downloads.open")) { - postCommandf_App("open url:%s", cstrCollect_String(makeFileUrl_String(downloadDir_App()))); + postCommandf_App("open newtab:%d url:%s", + argLabel_Command(cmd, "newtab"), + cstrCollect_String(makeFileUrl_String(downloadDir_App()))); return iTrue; } else if (equal_Command(cmd, "ca.file")) { @@ -2718,6 +2739,19 @@ iBool handleCommand_App(const char *cmd) { } return iTrue; } + else if (equal_Command(cmd, "reveal")) { + const iString *path = NULL; + if (hasLabel_Command(cmd, "path")) { + path = suffix_Command(cmd, "path"); + } + else if (hasLabel_Command(cmd, "url")) { + path = collect_String(localFilePathFromUrl_String(suffix_Command(cmd, "url"))); + } + if (path) { + revealPath_App(path); + } + return iTrue; + } else if (equal_Command(cmd, "open")) { const char *urlArg = suffixPtr_Command(cmd, "url"); if (!urlArg) { @@ -2726,9 +2760,8 @@ iBool handleCommand_App(const char *cmd) { if (findWidget_App("prefs")) { postCommand_App("prefs.dismiss"); } - iString *url = collectNewCStr_String(urlArg); - const iBool noProxy = argLabel_Command(cmd, "noproxy") != 0; - const iBool fromSidebar = argLabel_Command(cmd, "fromsidebar") != 0; + iString *url = collectNewCStr_String(urlArg); + const iBool noProxy = argLabel_Command(cmd, "noproxy") != 0; iUrl parts; init_Url(&parts, url); if (equal_Rangecc(parts.scheme, "about") && equal_Rangecc(parts.path, "command") && @@ -3354,26 +3387,11 @@ void openInDefaultBrowser_App(const iString *url) { void revealPath_App(const iString *path) { #if defined (iPlatformAppleDesktop) - const char *scriptPath = concatPath_CStr(dataDir_App_(), "revealfile.scpt"); - iFile *f = newCStr_File(scriptPath); - if (open_File(f, writeOnly_FileMode | text_FileMode)) { - /* AppleScript to select a specific file. */ - write_File(f, collect_Block(newCStr_Block("on run argv\n" - " tell application \"Finder\"\n" - " activate\n" - " reveal POSIX file (item 1 of argv) as text\n" - " end tell\n" - "end run\n"))); - close_File(f); - iProcess *proc = new_Process(); - setArguments_Process( - proc, - iClob(newStringsCStr_StringList( - "/usr/bin/osascript", scriptPath, cstr_String(path), NULL))); - start_Process(proc); - iRelease(proc); - } - iRelease(f); + iProcess *proc = new_Process(); + setArguments_Process( + proc, iClob(newStringsCStr_StringList("/usr/bin/open", "-R", cstr_String(path), NULL))); + start_Process(proc); + iRelease(proc); #elif defined (iPlatformLinux) || defined (iPlatformHaiku) iFileInfo *inf = iClob(new_FileInfo(path)); iRangecc target; diff --git a/src/app.h b/src/app.h index 0c336e65..d15e1f21 100644 --- a/src/app.h +++ b/src/app.h @@ -111,6 +111,7 @@ const iString * schemeProxy_App (iRangecc scheme); iBool willUseProxy_App (const iRangecc scheme); const iString * searchQueryUrl_App (const iString *queryStringUnescaped); const iString * fileNameForUrl_App (const iString *url, const iString *mime); +const iString * temporaryPathForUrl_App(const iString *url, const iString *mime); /* deleted before quitting */ const iString * downloadPathForUrl_App(const iString *url, const iString *mime); typedef void (*iTickerFunc)(iAny *); diff --git a/src/gmcerts.c b/src/gmcerts.c index 8f7bf181..7b05103b 100644 --- a/src/gmcerts.c +++ b/src/gmcerts.c @@ -654,7 +654,7 @@ void importIdentity_GmCerts(iGmCerts *d, iTlsCertificate *cert, const iString *n } static const char *certPath_GmCerts_(const iGmCerts *d, const iGmIdentity *identity) { - if (!(identity->flags & (temporary_GmIdentityFlag | imported_GmIdentityFlag))) { + if (!(identity->flags & temporary_GmIdentityFlag)) { const char *finger = cstrCollect_String(hexEncode_Block(&identity->fingerprint)); return concatPath_CStr(cstr_String(&d->saveDir), format_CStr("idents/%s", finger)); } diff --git a/src/ui/certlistwidget.c b/src/ui/certlistwidget.c index 31d8bac6..5a1c481b 100644 --- a/src/ui/certlistwidget.c +++ b/src/ui/certlistwidget.c @@ -97,17 +97,21 @@ static void updateContextMenu_CertListWidget_(iCertListWidget *d) { pushBack_Array(items, &(iMenuItem){ format_CStr("```%s", cstr_String(docUrl)) }); firstIndex = 1; } - pushBackN_Array(items, (iMenuItem[]){ + const iMenuItem ctxItems[] = { { person_Icon " ${ident.use}", 0, 0, "ident.use arg:1" }, { close_Icon " ${ident.stopuse}", 0, 0, "ident.use arg:0" }, { close_Icon " ${ident.stopuse.all}", 0, 0, "ident.use arg:0 clear:1" }, { "---", 0, 0, NULL }, { edit_Icon " ${menu.edit.notes}", 0, 0, "ident.edit" }, { "${ident.fingerprint}", 0, 0, "ident.fingerprint" }, +#if defined (iPlatformAppleDesktop) + { magnifyingGlass_Icon " ${menu.reveal.macos}", 0, 0, "ident.reveal" }, +#endif { export_Icon " ${ident.export}", 0, 0, "ident.export" }, { "---", 0, 0, NULL }, { delete_Icon " " uiTextCaution_ColorEscape "${ident.delete}", 0, 0, "ident.delete confirm:1" }, - }, 9); + }; + pushBackN_Array(items, ctxItems, iElemCount(ctxItems)); /* Used URLs. */ const iGmIdentity *ident = menuIdentity_CertListWidget_(d); if (ident) { @@ -244,7 +248,7 @@ static iBool processEvent_CertListWidget_(iCertListWidget *d, const SDL_Event *e if (ident) { const iString *crtPath = certificatePath_GmCerts(certs_App(), ident); if (crtPath) { - revealPath_App(crtPath); + postCommandf_App("reveal path:%s", cstr_String(crtPath)); } } return iTrue; diff --git a/src/ui/documentwidget.c b/src/ui/documentwidget.c index 3771dd6c..9e5e6ea3 100644 --- a/src/ui/documentwidget.c +++ b/src/ui/documentwidget.c @@ -4125,16 +4125,16 @@ static iBool handleCommand_DocumentWidget_(iDocumentWidget *d, const char *cmd) } else if (!isEmpty_Block(&d->sourceContent)) { if (argLabel_Command(cmd, "extview")) { - iString *tmpPath = collectNewCStr_String(tmpnam(NULL)); - const iRangecc tmpDir = dirName_Path(tmpPath); - set_String( - tmpPath, - collect_String(concat_Path(collectNewRange_String(tmpDir), - fileNameForUrl_App(d->mod.url, &d->sourceMime)))); - if (saveToFile_(tmpPath, &d->sourceContent, iFalse)) { - /* TODO: Remember this temporary path and delete it when quitting the app. */ - postCommandf_Root(w->root, "!open default:1 url:%s", - cstrCollect_String(makeFileUrl_String(tmpPath))); + if (equalCase_Rangecc(urlScheme_String(d->mod.url), "file")) { + /* Already a file so just open it directly. */ + postCommandf_Root(w->root, "!open default:1 url:%s", cstr_String(d->mod.url)); + } + else { + const iString *tmpPath = temporaryPathForUrl_App(d->mod.url, &d->sourceMime); + if (saveToFile_(tmpPath, &d->sourceContent, iFalse)) { + postCommandf_Root(w->root, "!open default:1 url:%s", + cstrCollect_String(makeFileUrl_String(tmpPath))); + } } } else { @@ -4484,11 +4484,6 @@ static iBool processMediaEvents_DocumentWidget_(iDocumentWidget *d, const SDL_Ev ev->type != SDL_MOUSEMOTION) { return iFalse; } - if (ev->type == SDL_MOUSEBUTTONDOWN || ev->type == SDL_MOUSEBUTTONUP) { - if (ev->button.button != SDL_BUTTON_LEFT) { - return iFalse; - } - } if (d->grabbedPlayer) { /* Updated in the drag. */ return iFalse; @@ -4496,9 +4491,23 @@ static iBool processMediaEvents_DocumentWidget_(iDocumentWidget *d, const SDL_Ev const iInt2 mouse = init_I2(ev->button.x, ev->button.y); iConstForEach(PtrArray, i, &d->view.visibleMedia) { const iGmRun *run = i.ptr; + if (run->mediaType == download_MediaType) { + iDownloadUI ui; + init_DownloadUI(&ui, media_GmDocument(d->view.doc), mediaId_GmRun(run).id, + runRect_DocumentView_(&d->view, run)); + if (processEvent_DownloadUI(&ui, ev)) { + return iTrue; + } + continue; + } if (run->mediaType != audio_MediaType) { continue; } + if (ev->type == SDL_MOUSEBUTTONDOWN || ev->type == SDL_MOUSEBUTTONUP) { + if (ev->button.button != SDL_BUTTON_LEFT) { + return iFalse; + } + } /* TODO: move this to mediaui.c */ const iRect rect = runRect_DocumentView_(&d->view, run); iPlayer * plr = audioPlayer_Media(media_GmDocument(d->view.doc), mediaId_GmRun(run)); @@ -4842,6 +4851,9 @@ static iBool processEvent_DocumentWidget_(iDocumentWidget *d, const SDL_Event *e iChangeFlags(d->flags, noHoverWhileScrolling_DocumentWidgetFlag, iFalse); return iTrue; } + if (processMediaEvents_DocumentWidget_(d, ev)) { + return iTrue; + } if (ev->type == SDL_MOUSEBUTTONDOWN) { if (ev->button.button == SDL_BUTTON_X1) { postCommand_Root(w->root, "navigate.back"); @@ -4923,6 +4935,23 @@ static iBool processEvent_DocumentWidget_(iDocumentWidget *d, const SDL_Event *e if (deviceType_App() == phone_AppDeviceType) { removeN_Array(&items, size_Array(&items) - 2, iInvalidSize); } + if (equalCase_Rangecc(scheme, "file")) { + pushBack_Array(&items, &(iMenuItem){ "---" }); + pushBack_Array(&items, + &(iMenuItem){ export_Icon " ${menu.open.external}", + 0, + 0, + format_CStr("!open default:1 url:%s", + cstr_String(linkUrl)) }); +#if defined (iPlatformAppleDesktop) + pushBack_Array(&items, + &(iMenuItem){ "${menu.reveal.macos}", + 0, + 0, + format_CStr("!reveal url:%s", + cstr_String(linkUrl)) }); +#endif + } } else if (!willUseProxy_App(scheme)) { pushBack_Array( @@ -4959,7 +4988,8 @@ static iBool processEvent_DocumentWidget_(iDocumentWidget *d, const SDL_Event *e cstr_String(linkUrl)) }, }, 3); - if (isNative && d->contextLink->mediaType != download_MediaType) { + if (isNative && d->contextLink->mediaType != download_MediaType && + !equalCase_Rangecc(scheme, "file")) { pushBackN_Array(&items, (iMenuItem[]){ { "---" }, { download_Icon " ${link.download}", 0, 0, "document.downloadlink" }, @@ -4979,6 +5009,7 @@ static iBool processEvent_DocumentWidget_(iDocumentWidget *d, const SDL_Event *e } if (equalCase_Rangecc(scheme, "file")) { /* Local files may be deleted. */ + pushBack_Array(&items, &(iMenuItem){ "---" }); pushBack_Array( &items, &(iMenuItem){ delete_Icon " " uiTextCaution_ColorEscape @@ -5052,9 +5083,6 @@ static iBool processEvent_DocumentWidget_(iDocumentWidget *d, const SDL_Event *e processContextMenuEvent_Widget(d->menu, ev, {}); } } - if (processMediaEvents_DocumentWidget_(d, ev)) { - return iTrue; - } if (processEvent_Banner(d->banner, ev)) { return iTrue; } diff --git a/src/ui/linkinfo.c b/src/ui/linkinfo.c index cb48c7ea..5102f9b3 100644 --- a/src/ui/linkinfo.c +++ b/src/ui/linkinfo.c @@ -92,7 +92,7 @@ void infoText_LinkInfo(const iGmDocument *doc, iGmLinkId linkId, iString *text_o appendRange_String(text_out, (iRangecc){ parts.path.start, constEnd_String(url) }); } else if (scheme != gemini_GmLinkScheme) { - appendCStr_String(text_out, globe_Icon " "); + appendCStr_String(text_out, scheme == file_GmLinkScheme ? "" : globe_Icon " "); append_String(text_out, url); } else { diff --git a/src/ui/mediaui.c b/src/ui/mediaui.c index 1c828194..2aec568f 100644 --- a/src/ui/mediaui.c +++ b/src/ui/mediaui.c @@ -238,6 +238,44 @@ void init_DownloadUI(iDownloadUI *d, const iMedia *media, uint16_t mediaId, iRec /*----------------------------------------------------------------------------------------------*/ iBool processEvent_DownloadUI(iDownloadUI *d, const SDL_Event *ev) { + if (ev->type == SDL_MOUSEBUTTONDOWN || ev->type == SDL_MOUSEBUTTONUP) { + const iInt2 mouse = init_I2(ev->button.x, ev->button.y); + if (!contains_Rect(d->bounds, mouse)) { + return iFalse; + } + float bytesPerSecond; + const iString *path; + iBool isFinished; + downloadStats_Media(d->media, (iMediaId){ download_MediaType, d->mediaId }, + &path, &bytesPerSecond, &isFinished); + if (isFinished) { + if (ev->button.button == SDL_BUTTON_RIGHT && ev->type == SDL_MOUSEBUTTONDOWN) { + const iMenuItem items[] = { + /* Items related to the file */ + { openTab_Icon " ${menu.opentab}", + 0, + 0, + format_CStr("!open newtab:1 url:%s", + cstrCollect_String(makeFileUrl_String(path))) }, +#if defined (iPlatformAppleDesktop) + { "${menu.reveal.macos}", + 0, + 0, + format_CStr("!reveal path:%s", cstr_String(path)) }, +#endif + { "---" }, + /* Generic items */ + { "${menu.downloads}", 0, 0, "downloads.open newtab:1" }, + }; + openMenu_Widget(makeMenu_Widget(get_Root()->widget, items, iElemCount(items)), + mouse); + return iTrue; + } + else if (ev->button.button == SDL_BUTTON_LEFT && ev->type == SDL_MOUSEBUTTONUP) { + postCommandf_App("open default:1 url:%s", cstrCollect_String(makeFileUrl_String(path))); + } + } + } return iFalse; } -- cgit v1.2.3 From c5f9a431f3b42c3a34578f5406b5e39a9eec9cd0 Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Wed, 29 Dec 2021 19:43:48 +0200 Subject: iOS: Sharing file content and selected text --- po/en.po | 3 +++ res/lang/cs.bin | Bin 31582 -> 31599 bytes res/lang/de.bin | Bin 30589 -> 30606 bytes res/lang/en.bin | Bin 26675 -> 26692 bytes res/lang/eo.bin | Bin 25639 -> 25656 bytes res/lang/es.bin | Bin 30413 -> 30430 bytes res/lang/es_MX.bin | Bin 27745 -> 27762 bytes res/lang/fi.bin | Bin 30246 -> 30263 bytes res/lang/fr.bin | Bin 31393 -> 31410 bytes res/lang/gl.bin | Bin 29598 -> 29615 bytes res/lang/hu.bin | Bin 31418 -> 31435 bytes res/lang/ia.bin | Bin 28745 -> 28762 bytes res/lang/ie.bin | Bin 29333 -> 29350 bytes res/lang/isv.bin | Bin 25396 -> 25413 bytes res/lang/pl.bin | Bin 30021 -> 30038 bytes res/lang/ru.bin | Bin 44781 -> 44798 bytes res/lang/sk.bin | Bin 25732 -> 25749 bytes res/lang/sr.bin | Bin 44207 -> 44224 bytes res/lang/tok.bin | Bin 27455 -> 27472 bytes res/lang/tr.bin | Bin 29639 -> 29656 bytes res/lang/uk.bin | Bin 44126 -> 44143 bytes res/lang/zh_Hans.bin | Bin 25640 -> 25657 bytes res/lang/zh_Hant.bin | Bin 25838 -> 25855 bytes src/app.c | 28 +++++++++++++++++++--------- src/gmrequest.c | 2 ++ src/ios.h | 1 + src/ios.m | 15 ++++++++++++--- src/ui/documentwidget.c | 12 +++++++++++- src/ui/mediaui.c | 6 ++++++ 29 files changed, 54 insertions(+), 13 deletions(-) (limited to 'po') diff --git a/po/en.po b/po/en.po index 49f78eb8..425243cc 100644 --- a/po/en.po +++ b/po/en.po @@ -858,6 +858,9 @@ msgstr "Download Linked File" msgid "menu.reveal.macos" msgstr "Show in Finder" +msgid "menu.share" +msgstr "Share" + msgid "link.file.delete" msgstr "Delete File" diff --git a/res/lang/cs.bin b/res/lang/cs.bin index 1c30a0a9..47a5496f 100644 Binary files a/res/lang/cs.bin and b/res/lang/cs.bin differ diff --git a/res/lang/de.bin b/res/lang/de.bin index bf05a72e..b0967918 100644 Binary files a/res/lang/de.bin and b/res/lang/de.bin differ diff --git a/res/lang/en.bin b/res/lang/en.bin index bd858ade..a918af83 100644 Binary files a/res/lang/en.bin and b/res/lang/en.bin differ diff --git a/res/lang/eo.bin b/res/lang/eo.bin index cc829562..5f5a056a 100644 Binary files a/res/lang/eo.bin and b/res/lang/eo.bin differ diff --git a/res/lang/es.bin b/res/lang/es.bin index f62291f1..91c1a9e6 100644 Binary files a/res/lang/es.bin and b/res/lang/es.bin differ diff --git a/res/lang/es_MX.bin b/res/lang/es_MX.bin index f6f88d6c..baf7e294 100644 Binary files a/res/lang/es_MX.bin and b/res/lang/es_MX.bin differ diff --git a/res/lang/fi.bin b/res/lang/fi.bin index e69245be..67ed5398 100644 Binary files a/res/lang/fi.bin and b/res/lang/fi.bin differ diff --git a/res/lang/fr.bin b/res/lang/fr.bin index 7be665e5..b4ecf798 100644 Binary files a/res/lang/fr.bin and b/res/lang/fr.bin differ diff --git a/res/lang/gl.bin b/res/lang/gl.bin index 8c1fdf24..005feca3 100644 Binary files a/res/lang/gl.bin and b/res/lang/gl.bin differ diff --git a/res/lang/hu.bin b/res/lang/hu.bin index b06c8676..4f9b6d8b 100644 Binary files a/res/lang/hu.bin and b/res/lang/hu.bin differ diff --git a/res/lang/ia.bin b/res/lang/ia.bin index 4c3b403d..d29bcee8 100644 Binary files a/res/lang/ia.bin and b/res/lang/ia.bin differ diff --git a/res/lang/ie.bin b/res/lang/ie.bin index 5e431c29..b648a56c 100644 Binary files a/res/lang/ie.bin and b/res/lang/ie.bin differ diff --git a/res/lang/isv.bin b/res/lang/isv.bin index 54cc6774..32b2cb39 100644 Binary files a/res/lang/isv.bin and b/res/lang/isv.bin differ diff --git a/res/lang/pl.bin b/res/lang/pl.bin index cf6a6b23..20fa1621 100644 Binary files a/res/lang/pl.bin and b/res/lang/pl.bin differ diff --git a/res/lang/ru.bin b/res/lang/ru.bin index 87c82a7d..6c2be568 100644 Binary files a/res/lang/ru.bin and b/res/lang/ru.bin differ diff --git a/res/lang/sk.bin b/res/lang/sk.bin index 3ac6e18c..0604ebab 100644 Binary files a/res/lang/sk.bin and b/res/lang/sk.bin differ diff --git a/res/lang/sr.bin b/res/lang/sr.bin index 5c66460d..38b56ffa 100644 Binary files a/res/lang/sr.bin and b/res/lang/sr.bin differ diff --git a/res/lang/tok.bin b/res/lang/tok.bin index 19b6d9df..c8097f29 100644 Binary files a/res/lang/tok.bin and b/res/lang/tok.bin differ diff --git a/res/lang/tr.bin b/res/lang/tr.bin index 9a8babc9..587774cc 100644 Binary files a/res/lang/tr.bin and b/res/lang/tr.bin differ diff --git a/res/lang/uk.bin b/res/lang/uk.bin index ebcb11be..18707608 100644 Binary files a/res/lang/uk.bin and b/res/lang/uk.bin differ diff --git a/res/lang/zh_Hans.bin b/res/lang/zh_Hans.bin index ab4b338a..39024cdc 100644 Binary files a/res/lang/zh_Hans.bin and b/res/lang/zh_Hans.bin differ diff --git a/res/lang/zh_Hant.bin b/res/lang/zh_Hant.bin index f166156f..59c4dcea 100644 Binary files a/res/lang/zh_Hant.bin and b/res/lang/zh_Hant.bin differ diff --git a/src/app.c b/src/app.c index e5f9a41c..bdc3a733 100644 --- a/src/app.c +++ b/src/app.c @@ -3364,25 +3364,32 @@ void openInDefaultBrowser_App(const iString *url) { return; } #endif -#if !defined (iPlatformAppleMobile) +#if defined (iPlatformAppleMobile) + if (equalCase_Rangecc(urlScheme_String(url), "file")) { + revealPath_App(collect_String(localFilePathFromUrl_String(url))); + } + return; +#endif iProcess *proc = new_Process(); - setArguments_Process(proc, + setArguments_Process(proc, iClob(newStringsCStr_StringList( #if defined (iPlatformAppleDesktop) - iClob(newStringsCStr_StringList("/usr/bin/env", "open", cstr_String(url), NULL)) + "/usr/bin/env", + "open", + cstr_String(url), #elif defined (iPlatformLinux) || defined (iPlatformOther) || defined (iPlatformHaiku) - iClob(newStringsCStr_StringList("/usr/bin/env", "xdg-open", cstr_String(url), NULL)) + "/usr/bin/env", + "xdg-open", + cstr_String(url), #elif defined (iPlatformMsys) - iClob(newStringsCStr_StringList( - concatPath_CStr(cstr_String(execPath_App()), "../urlopen.bat"), - cstr_String(url), - NULL)) + concatPath_CStr(cstr_String(execPath_App()), "../urlopen.bat"), + cstr_String(url), /* TODO: The prompt window is shown momentarily... */ #endif + NULL)) ); start_Process(proc); waitForFinished_Process(proc); /* TODO: test on Windows */ iRelease(proc); -#endif } void revealPath_App(const iString *path) { @@ -3392,6 +3399,9 @@ void revealPath_App(const iString *path) { proc, iClob(newStringsCStr_StringList("/usr/bin/open", "-R", cstr_String(path), NULL))); start_Process(proc); iRelease(proc); +#elif defined (iPlatformAppleMobile) + /* Use a share sheet. */ + openFileActivityView_iOS(path); #elif defined (iPlatformLinux) || defined (iPlatformHaiku) iFileInfo *inf = iClob(new_FileInfo(path)); iRangecc target; diff --git a/src/gmrequest.c b/src/gmrequest.c index c23e8499..3d5a4aef 100644 --- a/src/gmrequest.c +++ b/src/gmrequest.c @@ -694,9 +694,11 @@ void submit_GmRequest(iGmRequest *d) { setCStr_String(&resp->meta, "text/gemini"); iString *page = collectNew_String(); iString *parentDir = collectNewRange_String(dirName_Path(path)); +#if !defined (iPlatformMobile) appendFormat_String(page, "=> %s " upArrow_Icon " %s" iPathSeparator "\n\n", cstrCollect_String(makeFileUrl_String(parentDir)), cstr_String(parentDir)); +#endif appendFormat_String(page, "# %s\n", cstr_Rangecc(baseName_Path(path))); /* Make a directory index page. */ iPtrArray *sortedInfo = collectNew_PtrArray(); diff --git a/src/ios.h b/src/ios.h index bf742f1f..9860f7a2 100644 --- a/src/ios.h +++ b/src/ios.h @@ -39,6 +39,7 @@ void exportDownloadedFile_iOS(const iString *path); void pickFileForOpening_iOS (void); void pickFile_iOS (const char *command); /* ` path:%s` will be appended */ void openTextActivityView_iOS(const iString *text); +void openFileActivityView_iOS(const iString *path); iBool isPhone_iOS (void); void safeAreaInsets_iOS (float *left, float *top, float *right, float *bottom); diff --git a/src/ios.m b/src/ios.m index c9e843e4..69e09419 100644 --- a/src/ios.m +++ b/src/ios.m @@ -536,15 +536,24 @@ void pickFile_iOS(const char *command) { [viewController_(get_Window()) presentViewController:picker animated:YES completion:nil]; } -void openTextActivityView_iOS(const iString *text) { +static void openActivityView_(NSArray *activityItems) { UIActivityViewController *actView = [[UIActivityViewController alloc] - initWithActivityItems:@[ - [NSString stringWithUTF8String:cstr_String(text)]] + initWithActivityItems:activityItems applicationActivities:nil]; [viewController_(get_Window()) presentViewController:actView animated:YES completion:nil]; } +void openTextActivityView_iOS(const iString *text) { + openActivityView_(@[[NSString stringWithUTF8String:cstr_String(text)]]); +} + +void openFileActivityView_iOS(const iString *path) { + NSURL *url = [NSURL fileURLWithPath:[[NSString alloc] initWithCString:cstr_String(path) + encoding:NSUTF8StringEncoding]]; + openActivityView_(@[url]); +} + /*----------------------------------------------------------------------------------------------*/ enum iAVFAudioPlayerState { diff --git a/src/ui/documentwidget.c b/src/ui/documentwidget.c index 9e5e6ea3..65de157b 100644 --- a/src/ui/documentwidget.c +++ b/src/ui/documentwidget.c @@ -3945,7 +3945,14 @@ static iBool handleCommand_DocumentWidget_(iDocumentWidget *d, const char *cmd) /* Full document. */ copied = copy_String(source_GmDocument(d->view.doc)); } - SDL_SetClipboardText(cstr_String(copied)); + if (argLabel_Command(cmd, "share")) { +#if defined (iPlatformAppleMobile) + openTextActivityView_iOS(copied); +#endif + } + else { + SDL_SetClipboardText(cstr_String(copied)); + } delete_String(copied); if (flags_Widget(w) & touchDrag_WidgetFlag) { postCommand_Widget(w, "document.select arg:0"); @@ -5227,6 +5234,9 @@ static iBool processEvent_DocumentWidget_(iDocumentWidget *d, const SDL_Event *e } d->copyMenu = makeMenu_Widget(w, (iMenuItem[]){ { clipCopy_Icon " ${menu.copy}", 0, 0, "copy" }, +#if defined (iPlatformAppleMobile) + { export_Icon " ${menu.share}", 0, 0, "copy share:1" }, +#endif { "---" }, { close_Icon " ${menu.select.clear}", 0, 0, "document.select arg:0" }, }, 3); diff --git a/src/ui/mediaui.c b/src/ui/mediaui.c index 2aec568f..ab88c94a 100644 --- a/src/ui/mediaui.c +++ b/src/ui/mediaui.c @@ -262,6 +262,12 @@ iBool processEvent_DownloadUI(iDownloadUI *d, const SDL_Event *ev) { 0, 0, format_CStr("!reveal path:%s", cstr_String(path)) }, +#endif +#if defined (iPlatformAppleMobile) + { export_Icon " ${menu.share}", + 0, + 0, + format_CStr("!reveal path:%s", cstr_String(path)) }, #endif { "---" }, /* Generic items */ -- cgit v1.2.3 From e36bed146728f93d5be8a9b84d8756f0b5ccaada Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Thu, 30 Dec 2021 13:27:03 +0200 Subject: Added "Edit Page with Titan" A convenient way to copy the current page's source and open the Titan upload dialog with it prefilled. IssueID #415 --- po/en.po | 10 ++++++++-- res/lang/cs.bin | Bin 31599 -> 31683 bytes res/lang/de.bin | Bin 30606 -> 30690 bytes res/lang/en.bin | Bin 26692 -> 26766 bytes res/lang/eo.bin | Bin 25656 -> 25730 bytes res/lang/es.bin | Bin 30430 -> 30514 bytes res/lang/es_MX.bin | Bin 27762 -> 27836 bytes res/lang/fi.bin | Bin 30263 -> 30347 bytes res/lang/fr.bin | Bin 31410 -> 31494 bytes res/lang/gl.bin | Bin 29615 -> 29699 bytes res/lang/hu.bin | Bin 31435 -> 31519 bytes res/lang/ia.bin | Bin 28762 -> 28836 bytes res/lang/ie.bin | Bin 29350 -> 29434 bytes res/lang/isv.bin | Bin 25413 -> 25487 bytes res/lang/pl.bin | Bin 30038 -> 30122 bytes res/lang/ru.bin | Bin 44798 -> 44882 bytes res/lang/sk.bin | Bin 25749 -> 25823 bytes res/lang/sr.bin | Bin 44224 -> 44308 bytes res/lang/tok.bin | Bin 27472 -> 27556 bytes res/lang/tr.bin | Bin 29656 -> 29740 bytes res/lang/uk.bin | Bin 44143 -> 44227 bytes res/lang/zh_Hans.bin | Bin 25657 -> 25731 bytes res/lang/zh_Hant.bin | Bin 25855 -> 25939 bytes src/ui/documentwidget.c | 7 +++++++ src/ui/keys.c | 1 + src/ui/root.c | 1 + src/ui/uploadwidget.c | 4 ++++ src/ui/uploadwidget.h | 1 + 28 files changed, 22 insertions(+), 2 deletions(-) (limited to 'po') diff --git a/po/en.po b/po/en.po index 425243cc..a4b83dcc 100644 --- a/po/en.po +++ b/po/en.po @@ -1011,7 +1011,10 @@ msgid "heading.lookup.other" msgstr "OTHER" msgid "menu.page.upload" -msgstr "Upload Page with Titan…" +msgstr "Upload with Titan…" + +msgid "menu.page.upload.edit" +msgstr "Edit Page with Titan…" msgid "heading.upload" msgstr "Upload with Titan" @@ -1768,7 +1771,10 @@ msgid "keys.hoverurl" msgstr "Toggle show URL on hover" msgid "keys.upload" -msgstr "Upload page with Titan" +msgstr "Upload with Titan" + +msgid "keys.upload.edit" +msgstr "Edit Page with Titan" msgid "error.badstatus" msgstr "Unknown Status Code" diff --git a/res/lang/cs.bin b/res/lang/cs.bin index 47a5496f..bc34d7e8 100644 Binary files a/res/lang/cs.bin and b/res/lang/cs.bin differ diff --git a/res/lang/de.bin b/res/lang/de.bin index b0967918..5fb9eb03 100644 Binary files a/res/lang/de.bin and b/res/lang/de.bin differ diff --git a/res/lang/en.bin b/res/lang/en.bin index a918af83..114fa684 100644 Binary files a/res/lang/en.bin and b/res/lang/en.bin differ diff --git a/res/lang/eo.bin b/res/lang/eo.bin index 5f5a056a..3d16450c 100644 Binary files a/res/lang/eo.bin and b/res/lang/eo.bin differ diff --git a/res/lang/es.bin b/res/lang/es.bin index 91c1a9e6..fe6bdbb5 100644 Binary files a/res/lang/es.bin and b/res/lang/es.bin differ diff --git a/res/lang/es_MX.bin b/res/lang/es_MX.bin index baf7e294..c96da0b0 100644 Binary files a/res/lang/es_MX.bin and b/res/lang/es_MX.bin differ diff --git a/res/lang/fi.bin b/res/lang/fi.bin index 67ed5398..d06dfc9c 100644 Binary files a/res/lang/fi.bin and b/res/lang/fi.bin differ diff --git a/res/lang/fr.bin b/res/lang/fr.bin index b4ecf798..4cda45d8 100644 Binary files a/res/lang/fr.bin and b/res/lang/fr.bin differ diff --git a/res/lang/gl.bin b/res/lang/gl.bin index 005feca3..7ffb40ec 100644 Binary files a/res/lang/gl.bin and b/res/lang/gl.bin differ diff --git a/res/lang/hu.bin b/res/lang/hu.bin index 4f9b6d8b..e698c7ac 100644 Binary files a/res/lang/hu.bin and b/res/lang/hu.bin differ diff --git a/res/lang/ia.bin b/res/lang/ia.bin index d29bcee8..f951f0c5 100644 Binary files a/res/lang/ia.bin and b/res/lang/ia.bin differ diff --git a/res/lang/ie.bin b/res/lang/ie.bin index b648a56c..c4671e06 100644 Binary files a/res/lang/ie.bin and b/res/lang/ie.bin differ diff --git a/res/lang/isv.bin b/res/lang/isv.bin index 32b2cb39..2788dc3f 100644 Binary files a/res/lang/isv.bin and b/res/lang/isv.bin differ diff --git a/res/lang/pl.bin b/res/lang/pl.bin index 20fa1621..29260245 100644 Binary files a/res/lang/pl.bin and b/res/lang/pl.bin differ diff --git a/res/lang/ru.bin b/res/lang/ru.bin index 6c2be568..712d8a01 100644 Binary files a/res/lang/ru.bin and b/res/lang/ru.bin differ diff --git a/res/lang/sk.bin b/res/lang/sk.bin index 0604ebab..79b1208f 100644 Binary files a/res/lang/sk.bin and b/res/lang/sk.bin differ diff --git a/res/lang/sr.bin b/res/lang/sr.bin index 38b56ffa..79e76d20 100644 Binary files a/res/lang/sr.bin and b/res/lang/sr.bin differ diff --git a/res/lang/tok.bin b/res/lang/tok.bin index c8097f29..31f9536e 100644 Binary files a/res/lang/tok.bin and b/res/lang/tok.bin differ diff --git a/res/lang/tr.bin b/res/lang/tr.bin index 587774cc..758dba68 100644 Binary files a/res/lang/tr.bin and b/res/lang/tr.bin differ diff --git a/res/lang/uk.bin b/res/lang/uk.bin index 18707608..6aedfe5f 100644 Binary files a/res/lang/uk.bin and b/res/lang/uk.bin differ diff --git a/res/lang/zh_Hans.bin b/res/lang/zh_Hans.bin index 39024cdc..036ecca3 100644 Binary files a/res/lang/zh_Hans.bin and b/res/lang/zh_Hans.bin differ diff --git a/res/lang/zh_Hant.bin b/res/lang/zh_Hant.bin index 59c4dcea..d2aa482d 100644 Binary files a/res/lang/zh_Hant.bin and b/res/lang/zh_Hant.bin differ diff --git a/src/ui/documentwidget.c b/src/ui/documentwidget.c index f9efdd28..e63e4636 100644 --- a/src/ui/documentwidget.c +++ b/src/ui/documentwidget.c @@ -4116,6 +4116,12 @@ static iBool handleCommand_DocumentWidget_(iDocumentWidget *d, const char *cmd) setResponseViewer_UploadWidget(upload, d); addChild_Widget(get_Root()->widget, iClob(upload)); setupSheetTransition_Mobile(as_Widget(upload), iTrue); + if (argLabel_Command(cmd, "copy") && isUtf8_Rangecc(range_Block(&d->sourceContent))) { + iString text; + initBlock_String(&text, &d->sourceContent); + setText_UploadWidget(upload, &text); + deinit_String(&text); + } postRefresh_App(); } return iTrue; @@ -5080,6 +5086,7 @@ static iBool processEvent_DocumentWidget_(iDocumentWidget *d, const SDL_Event *e { book_Icon " ${menu.page.import}", 0, 0, "bookmark.links confirm:1" }, { globe_Icon " ${menu.page.translate}", 0, 0, "document.translate" }, { upload_Icon " ${menu.page.upload}", 0, 0, "document.upload" }, + { "${menu.page.upload.edit}", 0, 0, "document.upload copy:1" }, { "---" }, { "${menu.page.copyurl}", 0, 0, "document.copylink" } }, 16); diff --git a/src/ui/keys.c b/src/ui/keys.c index 30072572..d4d9320e 100644 --- a/src/ui/keys.c +++ b/src/ui/keys.c @@ -240,6 +240,7 @@ static const struct { int id; iMenuItem bind; int flags; } defaultBindings_[] = { 100,{ "${keys.hoverurl}", '/', KMOD_PRIMARY, "prefs.hoverlink.toggle" }, 0 }, { 110,{ "${menu.save.downloads}", SDLK_s, KMOD_PRIMARY, "document.save" }, 0 }, { 120,{ "${keys.upload}", SDLK_u, KMOD_PRIMARY, "document.upload" }, 0 }, + { 121,{ "${keys.upload.edit}", SDLK_e, KMOD_PRIMARY, "document.upload copy:1" }, 0 }, /* The following cannot currently be changed (built-in duplicates). */ #if defined (iPlatformApple) { 1002, { NULL, SDLK_LEFTBRACKET, KMOD_PRIMARY, "navigate.back" }, 0 }, diff --git a/src/ui/root.c b/src/ui/root.c index 3e0124d8..bc2bc0fb 100644 --- a/src/ui/root.c +++ b/src/ui/root.c @@ -1402,6 +1402,7 @@ void createUserInterface_Root(iRoot *d) { { book_Icon " ${menu.page.import}", 0, 0, "bookmark.links confirm:1" }, { globe_Icon " ${menu.page.translate}", 0, 0, "document.translate" }, { upload_Icon " ${menu.page.upload}", 0, 0, "document.upload" }, + { "${menu.page.upload.edit}", 0, 0, "document.upload copy:1" }, { "---" }, { "${menu.page.copyurl}", 0, 0, "document.copylink" }, { "${menu.page.copysource}", 'c', KMOD_PRIMARY, "copy" }, diff --git a/src/ui/uploadwidget.c b/src/ui/uploadwidget.c index 28a35668..ae777a68 100644 --- a/src/ui/uploadwidget.c +++ b/src/ui/uploadwidget.c @@ -406,6 +406,10 @@ void setResponseViewer_UploadWidget(iUploadWidget *d, iDocumentWidget *doc) { d->viewer = doc; } +void setText_UploadWidget(iUploadWidget *d, const iString *text) { + setText_InputWidget(findChild_Widget(as_Widget(d), "upload.text"), text); +} + static iWidget *acceptButton_UploadWidget_(iUploadWidget *d) { return lastChild_Widget(findChild_Widget(as_Widget(d), "dialogbuttons")); } diff --git a/src/ui/uploadwidget.h b/src/ui/uploadwidget.h index 5a7de45e..1cc1f193 100644 --- a/src/ui/uploadwidget.h +++ b/src/ui/uploadwidget.h @@ -31,3 +31,4 @@ iDeclareType(DocumentWidget) void setUrl_UploadWidget (iUploadWidget *, const iString *url); void setResponseViewer_UploadWidget (iUploadWidget *, iDocumentWidget *doc); +void setText_UploadWidget (iUploadWidget *, const iString *text); -- cgit v1.2.3 From 5d247c7fafddcb46d83572af788a04f835d48d42 Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Sat, 1 Jan 2022 10:04:06 +0200 Subject: Mobile: User-configurable phone toolbar buttons Actions for the first two mobile portrait phone toolbar buttons can be chosen in Settings. --- po/en.po | 12 ++++++++ res/lang/cs.bin | Bin 31683 -> 31806 bytes res/lang/de.bin | Bin 30690 -> 30813 bytes res/lang/en.bin | Bin 26766 -> 26889 bytes res/lang/eo.bin | Bin 25730 -> 25853 bytes res/lang/es.bin | Bin 30514 -> 30637 bytes res/lang/es_MX.bin | Bin 27836 -> 27959 bytes res/lang/fi.bin | Bin 30347 -> 30470 bytes res/lang/fr.bin | Bin 31494 -> 31617 bytes res/lang/gl.bin | Bin 29699 -> 29822 bytes res/lang/hu.bin | Bin 31519 -> 31642 bytes res/lang/ia.bin | Bin 28836 -> 28959 bytes res/lang/ie.bin | Bin 29434 -> 29557 bytes res/lang/isv.bin | Bin 25487 -> 25610 bytes res/lang/pl.bin | Bin 30122 -> 30245 bytes res/lang/ru.bin | Bin 44882 -> 45005 bytes res/lang/sk.bin | Bin 25823 -> 25946 bytes res/lang/sr.bin | Bin 44308 -> 44431 bytes res/lang/tok.bin | Bin 27556 -> 27679 bytes res/lang/tr.bin | Bin 29740 -> 29863 bytes res/lang/uk.bin | Bin 44227 -> 44350 bytes res/lang/zh_Hans.bin | Bin 25731 -> 25854 bytes res/lang/zh_Hant.bin | Bin 25939 -> 26062 bytes src/app.c | 22 ++++++++++++++ src/defs.h | 17 +++++++++++ src/prefs.c | 2 ++ src/prefs.h | 1 + src/ui/mobile.c | 16 ++++++++++ src/ui/mobile.h | 11 +++++++ src/ui/root.c | 83 +++++++++++++++++++++++---------------------------- src/ui/util.c | 13 +++++++- 31 files changed, 130 insertions(+), 47 deletions(-) (limited to 'po') diff --git a/po/en.po b/po/en.po index a4b83dcc..cf9643a0 100644 --- a/po/en.po +++ b/po/en.po @@ -344,6 +344,9 @@ msgstr "Go to Parent" msgid "menu.root" msgstr "Go to Root" +msgid "menu.home" +msgstr "Go Home" + msgid "menu.reload" msgstr "Reload Page" @@ -1419,6 +1422,15 @@ msgstr "Load image on scroll:" msgid "prefs.hidetoolbarscroll" msgstr "Hide toolbar on scroll:" +msgid "heading.prefs.toolbaractions" +msgstr "Toolbar Actions" + +msgid "prefs.toolbaraction1" +msgstr "Button 1" + +msgid "prefs.toolbaraction2" +msgstr "Button 2" + msgid "prefs.ostheme" msgstr "Use system theme:" diff --git a/res/lang/cs.bin b/res/lang/cs.bin index bc34d7e8..9069f4b0 100644 Binary files a/res/lang/cs.bin and b/res/lang/cs.bin differ diff --git a/res/lang/de.bin b/res/lang/de.bin index 5fb9eb03..62893c64 100644 Binary files a/res/lang/de.bin and b/res/lang/de.bin differ diff --git a/res/lang/en.bin b/res/lang/en.bin index 114fa684..12cde1d0 100644 Binary files a/res/lang/en.bin and b/res/lang/en.bin differ diff --git a/res/lang/eo.bin b/res/lang/eo.bin index 3d16450c..be6c9cef 100644 Binary files a/res/lang/eo.bin and b/res/lang/eo.bin differ diff --git a/res/lang/es.bin b/res/lang/es.bin index fe6bdbb5..feb0b8ea 100644 Binary files a/res/lang/es.bin and b/res/lang/es.bin differ diff --git a/res/lang/es_MX.bin b/res/lang/es_MX.bin index c96da0b0..26188c5b 100644 Binary files a/res/lang/es_MX.bin and b/res/lang/es_MX.bin differ diff --git a/res/lang/fi.bin b/res/lang/fi.bin index d06dfc9c..86efb862 100644 Binary files a/res/lang/fi.bin and b/res/lang/fi.bin differ diff --git a/res/lang/fr.bin b/res/lang/fr.bin index 4cda45d8..e6977fd9 100644 Binary files a/res/lang/fr.bin and b/res/lang/fr.bin differ diff --git a/res/lang/gl.bin b/res/lang/gl.bin index 7ffb40ec..f282366d 100644 Binary files a/res/lang/gl.bin and b/res/lang/gl.bin differ diff --git a/res/lang/hu.bin b/res/lang/hu.bin index e698c7ac..3ca7ee30 100644 Binary files a/res/lang/hu.bin and b/res/lang/hu.bin differ diff --git a/res/lang/ia.bin b/res/lang/ia.bin index f951f0c5..29faea06 100644 Binary files a/res/lang/ia.bin and b/res/lang/ia.bin differ diff --git a/res/lang/ie.bin b/res/lang/ie.bin index c4671e06..9c8bc9bd 100644 Binary files a/res/lang/ie.bin and b/res/lang/ie.bin differ diff --git a/res/lang/isv.bin b/res/lang/isv.bin index 2788dc3f..4414fdb3 100644 Binary files a/res/lang/isv.bin and b/res/lang/isv.bin differ diff --git a/res/lang/pl.bin b/res/lang/pl.bin index 29260245..aae2b705 100644 Binary files a/res/lang/pl.bin and b/res/lang/pl.bin differ diff --git a/res/lang/ru.bin b/res/lang/ru.bin index 712d8a01..1166b064 100644 Binary files a/res/lang/ru.bin and b/res/lang/ru.bin differ diff --git a/res/lang/sk.bin b/res/lang/sk.bin index 79b1208f..b43f885c 100644 Binary files a/res/lang/sk.bin and b/res/lang/sk.bin differ diff --git a/res/lang/sr.bin b/res/lang/sr.bin index 79e76d20..eec114aa 100644 Binary files a/res/lang/sr.bin and b/res/lang/sr.bin differ diff --git a/res/lang/tok.bin b/res/lang/tok.bin index 31f9536e..0202545c 100644 Binary files a/res/lang/tok.bin and b/res/lang/tok.bin differ diff --git a/res/lang/tr.bin b/res/lang/tr.bin index 758dba68..95bdffdc 100644 Binary files a/res/lang/tr.bin and b/res/lang/tr.bin differ diff --git a/res/lang/uk.bin b/res/lang/uk.bin index 6aedfe5f..e222a609 100644 Binary files a/res/lang/uk.bin and b/res/lang/uk.bin differ diff --git a/res/lang/zh_Hans.bin b/res/lang/zh_Hans.bin index 036ecca3..648016a8 100644 Binary files a/res/lang/zh_Hans.bin and b/res/lang/zh_Hans.bin differ diff --git a/res/lang/zh_Hant.bin b/res/lang/zh_Hant.bin index d2aa482d..daa31717 100644 Binary files a/res/lang/zh_Hant.bin and b/res/lang/zh_Hant.bin differ diff --git a/src/app.c b/src/app.c index 58eecf51..1e66c6cf 100644 --- a/src/app.c +++ b/src/app.c @@ -248,6 +248,10 @@ static iString *serializePrefs_App_(const iApp *d) { appendFormat_String(str, "linewidth.set arg:%d\n", d->prefs.lineWidth); appendFormat_String(str, "linespacing.set arg:%f\n", d->prefs.lineSpacing); appendFormat_String(str, "returnkey.set arg:%d\n", d->prefs.returnKey); +#if defined (iPlatformMobile) + appendFormat_String(str, "toolbar.action.set arg:%d button:0\n", d->prefs.toolbarActions[0]); + appendFormat_String(str, "toolbar.action.set arg:%d button:1\n", d->prefs.toolbarActions[1]); +#endif iConstForEach(StringSet, fp, d->prefs.disabledFontPacks) { appendFormat_String(str, "fontpack.disable id:%s\n", cstr_String(fp.value)); } @@ -1870,6 +1874,12 @@ static void updatePrefsPinSplitButtons_(iWidget *d, int value) { } } +static void updatePrefsToolBarActionButton_(iWidget *prefs, int buttonIndex, int action) { + updateDropdownSelection_LabelWidget( + findChild_Widget(prefs, format_CStr("prefs.toolbaraction%d", buttonIndex + 1)), + format_CStr(" arg:%d button:%d", action, buttonIndex)); +} + static void updateScrollSpeedButtons_(iWidget *d, enum iScrollType type, const int value) { const char *typeStr = (type == mouse_ScrollType ? "mouse" : "keyboard"); for (int i = 0; i <= 40; i++) { @@ -1960,6 +1970,10 @@ static iBool handlePrefsCommands_(iWidget *d, const char *cmd) { format_CStr("returnkey.set arg:%d", arg_Command(cmd))); return iFalse; } + else if (equal_Command(cmd, "toolbar.action.set")) { + updatePrefsToolBarActionButton_(d, argLabel_Command(cmd, "button"), arg_Command(cmd)); + return iFalse; + } else if (equal_Command(cmd, "pinsplit.set")) { updatePrefsPinSplitButtons_(d, arg_Command(cmd)); return iFalse; @@ -2268,6 +2282,12 @@ iBool handleCommand_App(const char *cmd) { } return iTrue; } + else if (equal_Command(cmd, "toolbar.action.set")) { + d->prefs.toolbarActions[iClamp(argLabel_Command(cmd, "button"), 0, 1)] = + iClamp(arg_Command(cmd), 0, max_ToolbarAction - 1); + postCommand_App("~toolbar.actions.changed"); + return iTrue; + } else if (equal_Command(cmd, "translation.languages")) { d->prefs.langFrom = argLabel_Command(cmd, "from"); d->prefs.langTo = argLabel_Command(cmd, "to"); @@ -3006,6 +3026,8 @@ iBool handleCommand_App(const char *cmd) { updateDropdownSelection_LabelWidget( findChild_Widget(dlg, "prefs.returnkey"), format_CStr("returnkey.set arg:%d", d->prefs.returnKey)); + updatePrefsToolBarActionButton_(dlg, 0, d->prefs.toolbarActions[0]); + updatePrefsToolBarActionButton_(dlg, 1, d->prefs.toolbarActions[1]); setToggle_Widget(findChild_Widget(dlg, "prefs.retainwindow"), d->prefs.retainWindowSize); setText_InputWidget(findChild_Widget(dlg, "prefs.uiscale"), collectNewFormat_String("%g", uiScale_Window(as_Window(d->window)))); diff --git a/src/defs.h b/src/defs.h index 9a466674..25c0ceeb 100644 --- a/src/defs.h +++ b/src/defs.h @@ -66,6 +66,23 @@ enum iReturnKeyFlag { accept_ReturnKeyFlag = 4, /* shift */ }; +enum iToolbarAction { + back_ToolbarAction = 0, + forward_ToolbarAction = 1, + home_ToolbarAction = 2, + parent_ToolbarAction = 3, + reload_ToolbarAction = 4, + newTab_ToolbarAction = 5, + closeTab_ToolbarAction = 6, + addBookmark_ToolbarAction = 7, + translate_ToolbarAction = 8, + upload_ToolbarAction = 9, + editPage_ToolbarAction = 10, + findText_ToolbarAction = 11, + settings_ToolbarAction = 12, + max_ToolbarAction +}; + /* Return key behavior is not handled via normal bindings because only certain combinations are valid. */ enum iReturnKeyBehavior { diff --git a/src/prefs.c b/src/prefs.c index 6b0164b6..426b7212 100644 --- a/src/prefs.c +++ b/src/prefs.c @@ -44,6 +44,8 @@ void init_Prefs(iPrefs *d) { d->uiAnimations = iTrue; d->uiScale = 1.0f; /* default set elsewhere */ d->zoomPercent = 100; + d->toolbarActions[0] = back_ToolbarAction; + d->toolbarActions[1] = forward_ToolbarAction; d->sideIcon = iTrue; d->hideToolbarOnScroll = iTrue; d->blinkingCursor = iTrue; diff --git a/src/prefs.h b/src/prefs.h index 6c79a3e1..43f7fc0e 100644 --- a/src/prefs.h +++ b/src/prefs.h @@ -159,6 +159,7 @@ struct Impl_Prefs { enum iColorAccent accent; /* Window and User Interface */ float uiScale; + enum iToolbarAction toolbarActions[2]; /* Document presentation */ int zoomPercent; /* Behavior */ diff --git a/src/ui/mobile.c b/src/ui/mobile.c index 08d8dba2..e34cad3a 100644 --- a/src/ui/mobile.c +++ b/src/ui/mobile.c @@ -37,6 +37,22 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ # include "ios.h" #endif +const iToolbarActionSpec toolbarActions_Mobile[max_ToolbarAction] = { + { backArrow_Icon, "${menu.back}", "navigate.back" }, + { forwardArrow_Icon, "${menu.forward}", "navigate.forward" }, + { home_Icon, "${menu.home}", "navigate.home" }, + { upArrow_Icon, "${menu.parent}", "navigate.parent" }, + { reload_Icon, "${menu.reload}", "navigate.reload" }, + { openTab_Icon, "${menu.newtab}", "tabs.new" }, + { close_Icon, "${menu.closetab}", "tabs.close" }, + { bookmark_Icon, "${menu.page.bookmark}", "bookmark.add" }, + { globe_Icon, "${menu.page.translate}", "document.translate" }, + { upload_Icon, "${menu.page.upload}", "document.upload" }, + { edit_Icon, "${menu.page.upload.edit}", "document.upload copy:1" }, + { magnifyingGlass_Icon, "${menu.find}", "focus.set id:find.input" }, + { gear_Icon, "${menu.settings}", "preferences" }, +}; + iBool isUsingPanelLayout_Mobile(void) { return deviceType_App() != desktop_AppDeviceType; } diff --git a/src/ui/mobile.h b/src/ui/mobile.h index 54f55fd2..c19623f9 100644 --- a/src/ui/mobile.h +++ b/src/ui/mobile.h @@ -22,8 +22,19 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #pragma once +#include "defs.h" #include +iDeclareType(ToolbarActionSpec) + +struct Impl_ToolbarActionSpec { + const char *icon; + const char *label; + const char *command; +}; + +const iToolbarActionSpec toolbarActions_Mobile[max_ToolbarAction]; + iDeclareType(Widget) iDeclareType(MenuItem) diff --git a/src/ui/root.c b/src/ui/root.c index bc2bc0fb..31176115 100644 --- a/src/ui/root.c +++ b/src/ui/root.c @@ -592,14 +592,21 @@ static void updateNavBarIdentity_(iWidget *navBar) { static void updateNavDirButtons_(iWidget *navBar) { const iHistory *history = history_DocumentWidget(document_App()); - const iBool atOldest = atOldest_History(history); - const iBool atNewest = atNewest_History(history); + iBool atOldest = atOldest_History(history); + iBool atNewest = atNewest_History(history); setFlags_Widget(findChild_Widget(navBar, "navbar.back"), disabled_WidgetFlag, atOldest); setFlags_Widget(findChild_Widget(navBar, "navbar.forward"), disabled_WidgetFlag, atNewest); iWidget *toolBar = findWidget_App("toolbar"); if (toolBar) { - iLabelWidget *back = findChild_Widget(toolBar, "toolbar.back"); - iLabelWidget *fwd = findChild_Widget(toolBar, "toolbar.forward"); + /* Reset the state. */ + for (int i = 0; i < 2; i++) { + const char *id = (i == 0 ? "toolbar.action1" : "toolbar.action2"); + setFlags_Widget(findChild_Widget(toolBar, id), disabled_WidgetFlag, iFalse); + setOutline_LabelWidget(findChild_Widget(toolBar, id), iFalse); + } + /* Disable certain actions. */ + iLabelWidget *back = findMenuItem_Widget(toolBar, "navigate.back"); + iLabelWidget *fwd = findMenuItem_Widget(toolBar, "navigate.forward"); setFlags_Widget(as_Widget(back), disabled_WidgetFlag, atOldest); setOutline_LabelWidget(back, atOldest); setFlags_Widget(as_Widget(fwd), disabled_WidgetFlag, atNewest); @@ -1062,14 +1069,23 @@ static iBool handleSearchBarCommands_(iWidget *searchBar, const char *cmd) { } #if defined (iPlatformMobile) -static void dismissSidebar_(iWidget *sidebar, const char *toolButtonId) { - if (isVisible_Widget(sidebar)) { - postCommandf_App("%s.toggle", cstr_String(id_Widget(sidebar))); -// if (toolButtonId) { - // setFlags_Widget(findWidget_App(toolButtonId), noBackground_WidgetFlag, iTrue); -// } - setVisualOffset_Widget(sidebar, height_Widget(sidebar), 250, easeIn_AnimFlag); + +static void updateToolBarActions_(iWidget *toolBar) { + const iPrefs *prefs = prefs_App(); + for (int i = 0; i < 2; i++) { + int action = prefs->toolbarActions[i] + ? prefs->toolbarActions[i] + : (i == 0 ? back_ToolbarAction : forward_ToolbarAction); + iLabelWidget *button = + findChild_Widget(toolBar, i == 0 ? "toolbar.action1" : "toolbar.action2"); + if (button) { + setFlags_Widget(as_Widget(button), disabled_WidgetFlag, iFalse); + setOutline_LabelWidget(button, iFalse); + updateTextCStr_LabelWidget(button, toolbarActions_Mobile[action].icon); + setCommand_LabelWidget(button, collectNewCStr_String(toolbarActions_Mobile[action].command)); + } } + refresh_Widget(toolBar); } static iBool handleToolBarCommands_(iWidget *toolBar, const char *cmd) { @@ -1081,13 +1097,6 @@ static iBool handleToolBarCommands_(iWidget *toolBar, const char *cmd) { return iTrue; } else if (equal_Command(cmd, "toolbar.showview")) { - /* TODO: Clean this up. */ -// iWidget *sidebar = findWidget_App("sidebar"); -// iWidget *sidebar2 = findWidget_App("sidebar2"); -// dismissSidebar_(sidebar2, "toolbar.ident"); -// const iBool isVisible = isVisible_Widget(sidebar); - /* If a sidebar hasn't been shown yet, it's height is zero. */ -// const int viewHeight = size_Root(get_Root()).y; if (arg_Command(cmd) >= 0) { postCommandf_App("sidebar.mode arg:%d show:1", arg_Command(cmd)); } @@ -1102,29 +1111,6 @@ static iBool handleToolBarCommands_(iWidget *toolBar, const char *cmd) { postCommandf_App("sidebar.toggle"); } postCommand_App("preferences idents:1"); -#if 0 - /* TODO: Clean this up. */ - iWidget *sidebar2 = findWidget_App("sidebar2"); - //dismissSidebar_(sidebar, "toolbar.view"); - if (isVisible_Widget(sidebar)) { - postCommandf_App("sidebar.toggle"); - } - const iBool isVisible = isVisible_Widget(sidebar2); - // setFlags_Widget(findChild_Widget(toolBar, "toolbar.ident"), noBackground_WidgetFlag, - // isVisible); - /* If a sidebar hasn't been shown yet, it's height is zero. */ - const int viewHeight = size_Root(get_Root()).y; - if (isVisible) { - dismissSidebar_(sidebar2, NULL); - } - else { - postCommand_App("sidebar2.mode arg:3 show:1"); - int offset = height_Widget(sidebar2); - if (offset == 0) offset = size_Root(get_Root()).y; - setVisualOffset_Widget(sidebar2, offset, 0, 0); - setVisualOffset_Widget(sidebar2, 0, 400, easeOut_AnimFlag | softer_AnimFlag); - } -#endif return iTrue; } else if (equal_Command(cmd, "sidebar.mode.changed")) { @@ -1132,8 +1118,13 @@ static iBool handleToolBarCommands_(iWidget *toolBar, const char *cmd) { updateTextCStr_LabelWidget(viewTool, icon_SidebarMode(arg_Command(cmd))); return iFalse; } + else if (equal_Command(cmd, "toolbar.actions.changed")) { + updateToolBarActions_(toolBar); + return iFalse; + } return iFalse; } + #endif /* defined (iPlatformMobile) */ static iLabelWidget *newLargeIcon_LabelWidget(const char *text, const char *cmd) { @@ -1552,14 +1543,14 @@ void createUserInterface_Root(iRoot *d) { "toolbar.close"); #else setId_Widget(addChildFlags_Widget(toolBar, - iClob(newLargeIcon_LabelWidget(backArrow_Icon, "navigate.back")), + iClob(newLargeIcon_LabelWidget("", "...")), frameless_WidgetFlag), - "toolbar.back"); + "toolbar.action1"); #endif setId_Widget(addChildFlags_Widget(toolBar, - iClob(newLargeIcon_LabelWidget(forwardArrow_Icon, "navigate.forward")), + iClob(newLargeIcon_LabelWidget("", "...")), frameless_WidgetFlag), - "toolbar.forward"); + "toolbar.action2"); iWidget *identButton; setId_Widget(identButton = addChildFlags_Widget( toolBar, @@ -1589,10 +1580,10 @@ void createUserInterface_Root(iRoot *d) { setId_Widget(as_Widget(menuButton), "toolbar.navmenu"); addChildFlags_Widget(toolBar, iClob(menuButton), frameless_WidgetFlag); iForEach(ObjectList, i, children_Widget(toolBar)) { - iLabelWidget *btn = i.object; setFlags_Widget(i.object, noBackground_WidgetFlag, iTrue); } updateToolbarColors_Root(d); + updateToolBarActions_(toolBar); const iMenuItem items[] = { { book_Icon " ${sidebar.bookmarks}", 0, 0, "toolbar.showview arg:0" }, { star_Icon " ${sidebar.feeds}", 0, 0, "toolbar.showview arg:1" }, diff --git a/src/ui/util.c b/src/ui/util.c index ab7e9ebf..6add5c89 100644 --- a/src/ui/util.c +++ b/src/ui/util.c @@ -2383,6 +2383,15 @@ iWidget *makePreferences_Widget(void) { format_CStr("returnkey.set arg:%d", acceptWithPrimaryMod_ReturnKeyBehavior) }, { NULL } }; + iMenuItem toolbarActionItems[2][max_ToolbarAction + 1]; + iZap(toolbarActionItems); + for (int j = 0; j < 2; j++) { + for (int i = 0; i < max_ToolbarAction; i++) { + toolbarActionItems[j][i].label = toolbarActions_Mobile[i].label; + toolbarActionItems[j][i].command = + format_CStr("toolbar.action.set arg:%d button:%d", i, j); + } + } iMenuItem docThemes[2][max_GmDocumentTheme + 1]; for (int i = 0; i < 2; ++i) { const iBool isDark = (i == 0); @@ -2476,8 +2485,10 @@ iWidget *makePreferences_Widget(void) { { "title id:heading.prefs.interface" }, { "dropdown device:0 id:prefs.returnkey", 0, 0, (const void *) returnKeyBehaviors }, { "padding device:1" }, - //{ "toggle id:prefs.hoverlink" }, { "toggle device:2 id:prefs.hidetoolbarscroll" }, + { "heading device:2 id:heading.prefs.toolbaractions" }, + { "dropdown device:2 id:prefs.toolbaraction1", 0, 0, (const void *) toolbarActionItems[0] }, + { "dropdown device:2 id:prefs.toolbaraction2", 0, 0, (const void *) toolbarActionItems[1] }, { "heading id:heading.prefs.sizing" }, { "input id:prefs.uiscale maxlen:8" }, { NULL } -- cgit v1.2.3 From 5e535fa7f3f39d8c948338e1aa152b3efb11b727 Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Sun, 2 Jan 2022 07:53:06 +0200 Subject: Lang: Headings are title-cased The uppercasing of headings will occur programmatically if appropriate. --- po/en.po | 60 +++++++++++++++++++++++++-------------------------- res/lang/en.bin | Bin 26889 -> 26889 bytes res/lang/eo.bin | Bin 25853 -> 25853 bytes res/lang/es_MX.bin | Bin 27959 -> 27959 bytes res/lang/ia.bin | Bin 28959 -> 28959 bytes res/lang/ie.bin | Bin 29557 -> 29557 bytes res/lang/isv.bin | Bin 25610 -> 25610 bytes res/lang/pl.bin | Bin 30245 -> 30245 bytes res/lang/sk.bin | Bin 25946 -> 25946 bytes res/lang/tok.bin | Bin 27679 -> 27679 bytes res/lang/zh_Hans.bin | Bin 25854 -> 25854 bytes res/lang/zh_Hant.bin | Bin 26062 -> 26062 bytes 12 files changed, 30 insertions(+), 30 deletions(-) (limited to 'po') diff --git a/po/en.po b/po/en.po index cf9643a0..687c4321 100644 --- a/po/en.po +++ b/po/en.po @@ -573,7 +573,7 @@ msgid "history.clear" msgstr "Clear History…" msgid "heading.history.clear" -msgstr "CLEAR HISTORY" +msgstr "Clear History" msgid "dlg.confirm.history.clear" msgstr "Do you really want to erase the history of all visited pages?" @@ -582,7 +582,7 @@ msgid "dlg.history.clear" msgstr "Clear History" msgid "heading.confirm.bookmarks.delete" -msgstr "DELETE BOOKMARKS" +msgstr "Delete Bookmarks" #, c-format msgid "dlg.confirm.bookmarks.delete" @@ -660,13 +660,13 @@ msgid "ident.switch" msgstr "Use %s" msgid "heading.ident.use" -msgstr "IDENTITY USAGE" +msgstr "Identity Usage" msgid "menu.edit.notes" msgstr "Edit Notes…" msgid "heading.ident.notes" -msgstr "IDENTITY NOTES" +msgstr "Identity Notes" # %s refers to name of an identity. #, c-format @@ -680,7 +680,7 @@ msgid "ident.delete" msgstr "Delete Identity…" msgid "heading.ident.delete" -msgstr "DELETE IDENTITY" +msgstr "Delete Identity" #, c-format msgid "dlg.confirm.ident.delete" @@ -701,7 +701,7 @@ msgid "ident.gotohelp" msgstr "See %sHelp%s for more information about TLS client certificates." msgid "heading.unsub" -msgstr "UNSUBSCRIBE" +msgstr "Unsubscribe" #, c-format msgid "dlg.confirm.unsub" @@ -718,7 +718,7 @@ msgid "error.server.msg" msgstr "Server responded with the message:" msgid "heading.pageinfo" -msgstr "PAGE INFORMATION" +msgstr "Page Information" msgid "pageinfo.header.cached" msgstr "(cached content)" @@ -771,10 +771,10 @@ msgid "menu.input.precedingline" msgstr "Paste Preceding Line" msgid "heading.save" -msgstr "FILE SAVED" +msgstr "File Saved" msgid "heading.save.incomplete" -msgstr "PAGE INCOMPLETE" +msgstr "Page Incomplete" msgid "dlg.save.incomplete" msgstr "The page contents are still being downloaded." @@ -786,10 +786,10 @@ msgid "dlg.save.opendownload" msgstr "Open Downloaded File" msgid "heading.save.error" -msgstr "ERROR SAVING FILE" +msgstr "Error Saving File" msgid "heading.import.bookmarks" -msgstr "IMPORT BOOKMARKS" +msgstr "Import Bookmarks" #, c-format msgid "dlg.import.found" @@ -807,7 +807,7 @@ msgid "dlg.import.notnew" msgstr "All links on this page are already bookmarked." msgid "heading.autoreload" -msgstr "AUTO-RELOAD" +msgstr "Auto-Reload" msgid "dlg.autoreload" msgstr "Select the auto-reload interval for this tab." @@ -868,7 +868,7 @@ msgid "link.file.delete" msgstr "Delete File" msgid "heading.file.delete" -msgstr "DELETE FILE" +msgstr "Delete File" msgid "dlg.file.delete.confirm" msgstr "Are you sure you want to delete this file?" @@ -877,7 +877,7 @@ msgid "dlg.file.delete" msgstr "Delete" msgid "heading.openlink" -msgstr "OPEN LINK" +msgstr "Open Link" #, c-format msgid "dlg.openlink.confirm" @@ -909,7 +909,7 @@ msgid "dlg.certwarn.domain.expired" msgstr "The received certificate is expired AND for the wrong domain." msgid "heading.certimport" -msgstr "IMPORT IDENTITY" +msgstr "Import Identity" msgid "dlg.certimport.help" msgstr "Paste a PEM-encoded certificate and/or private key,\nor drop a .crt/.key file on the window." @@ -921,10 +921,10 @@ msgid "dlg.certimport.notfound.page" msgstr "No certificate/key found on the current page." msgid "heading.certimport.pasted" -msgstr "PASTED FROM CLIPBOARD" +msgstr "Pasted from Clipboard" msgid "heading.certimport.dropped" -msgstr "DROPPED FILE" +msgstr "Dropped File" # button in the mobile New Identity dialog msgid "dlg.certimport.pickfile" @@ -1091,7 +1091,7 @@ msgid "upload.port" msgstr "Port…" msgid "heading.uploadport" -msgstr "TITAN UPLOAD PORT" +msgstr "Titan Upload Port" msgid "dlg.uploadport.msg" msgstr "Set the Titan server port to use for this URL. The port is saved in the site-specific configuration." @@ -1112,7 +1112,7 @@ msgid "dlg.upload.pickfile" msgstr "Select File" msgid "heading.translate" -msgstr "TRANSLATE PAGE" +msgstr "Translate Page" msgid "dlg.translate.unavail" msgstr "Service Unavailable" @@ -1174,7 +1174,7 @@ msgid "lang.es" msgstr "Spanish" msgid "heading.newident" -msgstr "NEW IDENTITY" +msgstr "New Identity" msgid "dlg.newident.rsa.selfsign" msgstr "Creating a self-signed 2048-bit RSA certificate." @@ -1231,13 +1231,13 @@ msgid "dlg.newident.create" msgstr "Create Identity" msgid "heading.newident.missing" -msgstr "MISSING INFO" +msgstr "Missing Info" msgid "dlg.newindent.missing.commonname" msgstr "A \"Common name\" must be specified." msgid "heading.newident.date.bad" -msgstr "INVALID DATE" +msgstr "Invalid Date" msgid "dlg.newident.date.past" msgstr "Expiration date must be in the future." @@ -1246,10 +1246,10 @@ msgid "dlg.newident.date.example" msgstr "Please check the \"Valid until\" date. Examples:\n• 2030\n• 2025-06-30\n• 2021-12-31 23:59:59" msgid "heading.feedcfg" -msgstr "FEED SETTINGS" +msgstr "Feed Settings" msgid "heading.subscribe" -msgstr "SUBSCRIBE TO PAGE" +msgstr "Subscribe to Page" msgid "dlg.feed.title" msgstr "Title:" @@ -1273,10 +1273,10 @@ msgid "dlg.feed.sub" msgstr "Subscribe" msgid "heading.bookmark.add" -msgstr "ADD BOOKMARK" +msgstr "Add Bookmark" msgid "heading.bookmark.edit" -msgstr "EDIT BOOKMARK" +msgstr "Edit Bookmark" msgid "dlg.bookmark.save" msgstr "Save Bookmark" @@ -1300,7 +1300,7 @@ msgid "heading.bookmark.tags" msgstr "Special Tags" msgid "heading.addfolder" -msgstr "ADD FOLDER" +msgstr "Add Folder" msgid "dlg.addfolder.defaulttitle" msgstr "New Folder" @@ -2036,7 +2036,7 @@ msgid "fontpack.delete" msgstr "Permanently delete \"%s\"" msgid "heading.fontpack.delete" -msgstr "DELETE FONTPACK" +msgstr "Delete Fontpack" #, c-format msgid "dlg.fontpack.delete.confirm" @@ -2064,7 +2064,7 @@ msgid "truetype.help.installed" msgstr "This font is installed in the user fonts directory." msgid "heading.dismiss.warning" -msgstr "DISMISS WARNING?" +msgstr "Dismiss Warning?" #, c-format msgid "dlg.dismiss.ansi" @@ -2074,7 +2074,7 @@ msgid "dlg.dismiss.warning" msgstr "Dismiss Warning" msgid "heading.fontpack.classic" -msgstr "DOWNLOAD FONTPACK" +msgstr "Download Fontpack" msgid "dlg.fontpack.classic.msg" msgstr "The fonts previously bundled with the app are now available as a separate download. Would you like to download the \"Classic set\" fontpack now?" diff --git a/res/lang/en.bin b/res/lang/en.bin index 12cde1d0..1b26e61e 100644 Binary files a/res/lang/en.bin and b/res/lang/en.bin differ diff --git a/res/lang/eo.bin b/res/lang/eo.bin index be6c9cef..3b734982 100644 Binary files a/res/lang/eo.bin and b/res/lang/eo.bin differ diff --git a/res/lang/es_MX.bin b/res/lang/es_MX.bin index 26188c5b..3de1f106 100644 Binary files a/res/lang/es_MX.bin and b/res/lang/es_MX.bin differ diff --git a/res/lang/ia.bin b/res/lang/ia.bin index 29faea06..7772f7d0 100644 Binary files a/res/lang/ia.bin and b/res/lang/ia.bin differ diff --git a/res/lang/ie.bin b/res/lang/ie.bin index 9c8bc9bd..648fb372 100644 Binary files a/res/lang/ie.bin and b/res/lang/ie.bin differ diff --git a/res/lang/isv.bin b/res/lang/isv.bin index 4414fdb3..adeeb8cd 100644 Binary files a/res/lang/isv.bin and b/res/lang/isv.bin differ diff --git a/res/lang/pl.bin b/res/lang/pl.bin index aae2b705..fab560a5 100644 Binary files a/res/lang/pl.bin and b/res/lang/pl.bin differ diff --git a/res/lang/sk.bin b/res/lang/sk.bin index b43f885c..ec171de2 100644 Binary files a/res/lang/sk.bin and b/res/lang/sk.bin differ diff --git a/res/lang/tok.bin b/res/lang/tok.bin index 0202545c..95532b2a 100644 Binary files a/res/lang/tok.bin and b/res/lang/tok.bin differ diff --git a/res/lang/zh_Hans.bin b/res/lang/zh_Hans.bin index 648016a8..0a12f0dd 100644 Binary files a/res/lang/zh_Hans.bin and b/res/lang/zh_Hans.bin differ diff --git a/res/lang/zh_Hant.bin b/res/lang/zh_Hant.bin index daa31717..ba1ff8c9 100644 Binary files a/res/lang/zh_Hant.bin and b/res/lang/zh_Hant.bin differ -- cgit v1.2.3 From 64f4ef11e433e2400a00e2fb7fe3bc3402889a9a Mon Sep 17 00:00:00 2001 From: Olga Smirnova Date: Sat, 1 Jan 2022 15:20:33 +0000 Subject: Translated using Weblate (Interlingua) Currently translated at 92.7% (572 of 617 strings) Translation: Lagrange/User Interface Translate-URL: http://weblate.skyjake.fi/projects/lagrange/ui/ia/ --- po/ia.po | 394 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 371 insertions(+), 23 deletions(-) (limited to 'po') diff --git a/po/ia.po b/po/ia.po index a983ca71..c8ddc5ad 100644 --- a/po/ia.po +++ b/po/ia.po @@ -1,7 +1,7 @@ msgid "" msgstr "" "Report-Msgid-Bugs-To: jaakko.keranen@iki.fi\n" -"PO-Revision-Date: 2021-07-19 19:06+0000\n" +"PO-Revision-Date: 2022-01-02 15:50+0000\n" "Last-Translator: Olga Smirnova \n" "Language-Team: Interlingua \n" @@ -133,7 +133,7 @@ msgid "toolbar.outline" msgstr "Structura del pagina" msgid "hint.findtext" -msgstr "Trovar texto in le pagina" +msgstr "trovar texto in le pagina" msgid "status.feeds" msgstr "Actualisation del syndicationes" @@ -760,8 +760,8 @@ msgstr "Certificato non valide" #, c-format msgid "ident.usedonurls" msgid_plural "ident.usedonurls.n" -msgstr[0] "Usate por %zu URL" -msgstr[1] "Usate por %zu URLs" +msgstr[0] "Usate por %u URL" +msgstr[1] "Usate por %u URLs" #, c-format msgid "dlg.import.add" @@ -926,9 +926,7 @@ msgstr "Vide %sAdjuta%s por plus de information re certificatos de cliente TLS." #, c-format msgid "dlg.confirm.unsub" -msgstr "" -"Disabonar le syndication\n" -"«%s»?" +msgstr "Disabonar le syndication «%s»?" msgid "heading.pageinfo" msgstr "INFORMATION RE LE PAGINA" @@ -1001,7 +999,7 @@ msgid "error.tls" msgstr "Fallimento del rete o TLS" msgid "error.tls.msg" -msgstr "Fallite a communicar con le servitor. Ecce le message de error:" +msgstr "Fallite a communicar con le servitor." msgid "error.slowdown" msgstr "Relentamento" @@ -1020,8 +1018,8 @@ msgstr "Monstrar tote" msgid "num.bytes" msgid_plural "num.bytes.n" -msgstr[0] "%zu byte" -msgstr[1] "%zu bytes" +msgstr[0] "%u byte" +msgstr[1] "%u bytes" msgid "prefs.doctheme.name.colorfuldark" msgstr "Colorate obscur" @@ -1211,9 +1209,8 @@ msgstr "Actualisar marcapaginas remote" #, c-format msgid "dlg.confirm.ident.delete" msgstr "" -"Vole tu vermente deler le identitate\n" -"%s%s%s\n" -"con su certificato e clave private?" +"Vole tu vermente deler le identitate %s«%s»%s con su certificato e clave " +"private?" msgid "lang.ie" msgstr "Interlingue" @@ -1241,14 +1238,14 @@ msgstr "Le contento del pagina se carga ancora." #, c-format msgid "feeds.list.counts" msgid_plural "feeds.list.counts.n" -msgstr[0] "%zu abonate syndication que contine %%s.\n" -msgstr[1] "%zu abonate syndicationes que contine %%s.\n" +msgstr[0] "%u abonate syndication que contine %%s.\n" +msgstr[1] "%u abonate syndicationes que contine %%s.\n" #, c-format msgid "feeds.list.entrycount" msgid_plural "feeds.list.entrycount.n" -msgstr[0] "%zu elemento in toto" -msgstr[1] "%zu elementos in toto" +msgstr[0] "%u elemento in toto" +msgstr[1] "%u elementos in toto" msgid "dlg.autoreload" msgstr "Interstitio de recarga automatic por iste scheda." @@ -1458,7 +1455,7 @@ msgid "menu.split.vertical" msgstr "Vertical" msgid "menu.view.split" -msgstr "Finder le vista..." +msgstr "Finder le vista…" msgid "bookmark.tag.linksplit" msgstr "Ligamines que aperi al latere" @@ -1507,9 +1504,8 @@ msgstr "Sortir le archivo" #, c-format msgid "archive.summary" msgid_plural "archive.summary.n" -msgstr[0] "Iste archivo contine %zu elemento e su dimension comprimite es %.1f MB." -msgstr[1] "" -"Iste archivo contine %zu elementos e su dimension comprimite es %.1f MB." +msgstr[0] "Iste archivo contine %u elemento e su dimension comprimite es %.1f MB." +msgstr[1] "Iste archivo contine %u elementos e su dimension comprimite es %.1f MB." msgid "dir.empty" msgstr "Iste directorio es vacue." @@ -1517,8 +1513,8 @@ msgstr "Iste directorio es vacue." #, c-format msgid "dir.summary" msgid_plural "dir.summary.n" -msgstr[0] "Iste directorio contine %zu elemento." -msgstr[1] "Iste directorio contine %zu elementos." +msgstr[0] "Iste directorio contine %u elemento." +msgstr[1] "Iste directorio contine %u elementos." msgid "keys.tab.close.other" msgstr "Clauder le altere schedas" @@ -1579,3 +1575,355 @@ msgstr "DELER LE FILE" msgid "dlg.file.delete" msgstr "Deler" + +msgid "upload.file.name" +msgstr "Nomine de file:" + +msgid "upload.file.drophere" +msgstr "(trahe e depone un file al fenestra)" + +msgid "upload.mime" +msgstr "Typo MIME:" + +msgid "upload.token" +msgstr "Token:" + +msgid "prefs.scrollspeed.mouse" +msgstr "Velocitate del mus:" + +msgid "dlg.newident.more" +msgstr "Plus…" + +msgid "dlg.fontpack.classic" +msgstr "Discargar le fontpack (25 MB)" + +msgid "prefs.returnkey.linebreak" +msgstr "Ruptura de linea" + +msgid "error.certverify" +msgstr "Servitor non fidabile" + +msgid "prefs.imagestyle" +msgstr "Colorisar imagines:" + +msgid "prefs.font.mono" +msgstr "Preformattate:" + +# Font to use for headings and body when Monospace body is enabled. +msgid "prefs.font.monodoc" +msgstr "Typo de characteres mono-spatio:" + +msgid "upload.port" +msgstr "Porta…" + +msgid "heading.uploadport" +msgstr "PORTA DE INCARGAMENTO DE TITAN" + +msgid "prefs.returnkey.accept" +msgstr "Acceptar" + +msgid "prefs.returnkey" +msgstr "Comportamento del clave Enter:" + +msgid "prefs.time.24h" +msgstr "Tempore a 24-horas" + +msgid "prefs.imagestyle.original" +msgstr "Nulle" + +msgid "prefs.imagestyle.text" +msgstr "Color del texto" + +msgid "prefs.gemtext.ansi" +msgstr "Escappamentos ANSI:" + +# Color of text background. +msgid "prefs.gemtext.ansi.bg" +msgstr "Color de fundo" + +msgid "prefs.gemtext.ansi.fontstyle" +msgstr "Stilo del characteres" + +msgid "prefs.memorysize" +msgstr "Dimension de memoria:" + +msgid "keys.upload" +msgstr "Incargar un pagina via Titan" + +msgid "error.server.msg" +msgstr "Le servitor ha respondite:" + +# Action label +msgid "fontpack.meta.viewfile" +msgstr "Vider le file" + +msgid "dlg.newident.scope" +msgstr "Usar pro:" + +msgid "menu.pageinfo" +msgstr "Monstrar information re le pagina" + +msgid "menu.save.downloads.open" +msgstr "Salvar a Discargas e aperir le file" + +msgid "prefs.scrollspeed.keyboard" +msgstr "Velocitate de claviero:" + +msgid "num.files" +msgid_plural "num.files.n" +msgstr[0] "%u dossier" +msgstr[1] "%u dossiers" + +msgid "prefs.font.ui" +msgstr "IdU:" + +msgid "fontpack.meta.disabled" +msgstr ", inactive" + +#, c-format +msgid "fontpack.enable" +msgstr "Activar «%s»" + +#, c-format +msgid "fontpack.disable" +msgstr "Disactivar «%s»" + +msgid "fontpack.export" +msgstr "Vider un patrono de fontpack.ini" + +#, c-format +msgid "fontpack.install" +msgstr "Installar «%s»" + +#, c-format +msgid "fontpack.upgrade" +msgstr "Promover «%s» al version %d" + +msgid "media.untitled.image" +msgstr "Imagine" + +msgid "media.untitled.audio" +msgstr "Audio" + +msgid "dlg.fontpack.delete" +msgstr "Deler le fontpack" + +msgid "prefs.font.body" +msgstr "Corpore:" + +msgid "heading.fontpack.meta.enabled" +msgstr "Fontpacks active" + +msgid "heading.fontpack.meta.disabled" +msgstr "Fontpacks inactive" + +msgid "menu.newfolder" +msgstr "Nove dossier…" + +# used for Preferences on mobile +msgid "menu.settings" +msgstr "Parametros" + +# keep this short (3x1 horiz layout) +msgid "menu.selectall" +msgstr "Seliger toto" + +# keep this short (3x1 horiz layout) +msgid "menu.delete" +msgstr "Deler" + +#, c-format +msgid "dlg.bookmarks.delete" +msgid_plural "dlg.bookmarks.delete.n" +msgstr[0] "Deler le marcapagina" +msgstr[1] "Deler %u marcapaginas" + +msgid "bookmark.export.count" +msgid_plural "bookmark.export.count.n" +msgstr[0] "Vos have %d marcapagina." +msgstr[1] "Vos have %d marcapaginas." + +msgid "sidebar.action.show" +msgstr "Monstrar:" + +msgid "heading.confirm.bookmarks.delete" +msgstr "DELER MARCAPAGINAS" + +msgid "menu.website" +msgstr "Sito web del projecto…" + +# keep this short (3x1 horiz layout) +msgid "menu.undo" +msgstr "Disfacer" + +msgid "fontpack.open.fontsdir" +msgstr "Aperir le directorio del typos del usator" + +msgid "fontpack.open.aboutfonts" +msgstr "Monstrar le typos de character installate" + +msgid "menu.fonts" +msgstr "Gerer typos de litteras…" + +# This label should be fairly short so it fits in a button in the sidebar. +msgid "sidebar.action.feeds.markallread" +msgstr "Toto legite" + +msgid "num.fonts" +msgid_plural "num.fonts.n" +msgstr[0] "%u typo" +msgstr[1] "%u typos" + +msgid "dlg.file.delete.confirm" +msgstr "Desira tu vermente deler iste file?" + +msgid "bookmark.export.format.linklines" +msgstr "Cata ligamine representa un marcapagina." + +msgid "menu.page.upload" +msgstr "Incargar un pagina via Titan…" + +msgid "heading.upload" +msgstr "INCARGAR VIA TITAN" + +msgid "upload.id" +msgstr "Identitate:" + +msgid "dlg.upload.id.none" +msgstr "Nulle" + +msgid "heading.upload.file" +msgstr "File" + +msgid "upload.file.size" +msgstr "Dimension de file:" + +msgid "dlg.upload.send" +msgstr "Incargar" + +# used on mobile +msgid "dlg.upload.text" +msgstr "Incargar un texto simple" + +# used on mobile +msgid "dlg.upload.file" +msgstr "Incargar un file" + +# used on mobile +msgid "dlg.upload.pickfile" +msgstr "Seliger un file" + +msgid "dlg.newident.scope.domain" +msgstr "Dominio actual" + +msgid "dlg.newident.scope.page" +msgstr "Pagina actual" + +msgid "dlg.newident.scope.none" +msgstr "Non usate" + +msgid "dlg.feed.ignoreweb" +msgstr "Ignorar ligamines HTTP(S):" + +msgid "dlg.bookmark.folder" +msgstr "Dossier:" + +msgid "heading.bookmark.tags" +msgstr "ETIQUETTAS SPECIAL" + +msgid "heading.addfolder" +msgstr "ADDER UN DOSSIER" + +msgid "dlg.addfolder.defaulttitle" +msgstr "Nove dossier" + +msgid "menu.update" +msgstr "Controlar pro le actualisationes…" + +msgid "status.query.tight" +msgstr "Requesta" + +msgid "dlg.addfolder" +msgstr "Adder un dossier" + +# used on mobile +msgid "heading.settings" +msgstr "PARAMETROS" + +msgid "prefs.font.heading" +msgstr "Capites:" + +msgid "prefs.boldlink.visited" +msgstr "Visitate" + +msgid "prefs.font.warnmissing" +msgstr "Advertimentos de glyphos:" + +msgid "prefs.linespacing" +msgstr "Spatiamento inter lineas:" + +msgid "error.certexpired" +msgstr "Certificato perimite" + +msgid "error.glyphs" +msgstr "Glyphos mancante" + +msgid "heading.fontpack.meta" +msgstr "Typos de character" + +#, c-format +msgid "fontpack.meta.version" +msgstr "Version %d" + +msgid "fontpack.meta.installed" +msgstr "Installate" + +msgid "fontpack.meta.notinstalled" +msgstr "Non installate" + +msgid "heading.fontpack.delete" +msgstr "DELER UN FONTPACK" + +msgid "fontpack.install.ttf" +msgstr "Installar un typo de litteras TrueType" + +msgid "dlg.dismiss.warning" +msgstr "Dimitter le advertimento" + +msgid "heading.fontpack.classic" +msgstr "DISCARGAR UN FONTPACK" + +msgid "prefs.imagestyle.preformat" +msgstr "Color de preformattate" + +#, c-format +msgid "fontpack.delete" +msgstr "Deler permanentemente «%s»" + +msgid "dlg.certwarn.title" +msgstr "Problema de securitate" + +# button in the mobile New Identity dialog +msgid "dlg.certimport.pickfile" +msgstr "Importar un certificato o un file clave" + +msgid "bookmark.export.title.folder" +msgstr "Marcapaginas" + +msgid "bookmark.export.title.tag" +msgstr "Etiquettas de marcapaginas" + +msgid "prefs.imagestyle.grayscale" +msgstr "Scala de gris" + +msgid "error.ansi" +msgstr "Emulation de terminal" + +msgid "dlg.upload.id.default" +msgstr "Predefinite" + +msgid "heading.upload.text" +msgstr "Texto" + +msgid "hint.upload.text" +msgstr "Insere texto a incargar" -- cgit v1.2.3 From dcf2ae0ae1c96eee908985c3f2092c9d20fc42ce Mon Sep 17 00:00:00 2001 From: Alyssa Liddell Date: Thu, 6 Jan 2022 11:29:42 +0000 Subject: Translated using Weblate (Russian) Currently translated at 100.0% (644 of 644 strings) Translation: Lagrange/User Interface Translate-URL: http://weblate.skyjake.fi/projects/lagrange/ui/ru/ --- po/ru.po | 184 ++++++++++++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 136 insertions(+), 48 deletions(-) (limited to 'po') diff --git a/po/ru.po b/po/ru.po index 05cfc315..f2fd4591 100644 --- a/po/ru.po +++ b/po/ru.po @@ -3,8 +3,8 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: jaakko.keranen@iki.fi\n" "POT-Creation-Date: 2021-03-23 19:02+0000\n" -"PO-Revision-Date: 2021-12-08 14:50+0000\n" -"Last-Translator: Nikolay Korotkiy \n" +"PO-Revision-Date: 2022-01-08 14:50+0000\n" +"Last-Translator: Alyssa Liddell \n" "Language-Team: Russian \n" "Language: ru\n" "MIME-Version: 1.0\n" @@ -350,7 +350,7 @@ msgid "history.clear" msgstr "Очистить историю…" msgid "heading.history.clear" -msgstr "ОЧИСТКА ИСТОРИИ" +msgstr "Очистка истории" msgid "dlg.confirm.history.clear" msgstr "Вы действительно хотите стереть историю посещений страниц?" @@ -413,13 +413,13 @@ msgid "ident.showuse" msgstr "Показать использование" msgid "heading.ident.use" -msgstr "ИСПОЛЬЗОВАНИЕ КЛИЕНТСКОГО СЕРТИФИКАТА" +msgstr "Использование клиентского сертификата" msgid "menu.edit.notes" msgstr "Редактировать заметки…" msgid "heading.ident.notes" -msgstr "ЗАМЕТКИ КЛИЕНТСКОГО СЕРТИФИКАТА" +msgstr "Заметки клиентского сертификата" msgid "dlg.ident.notes" msgstr "Заметки о %s:" @@ -431,7 +431,7 @@ msgid "ident.delete" msgstr "Удалить клиентский сертификат…" msgid "heading.ident.delete" -msgstr "УДАЛЕНИЕ КЛИЕНТСКОГО СЕРТИФИКАТА" +msgstr "Удаление клиентского сертификата" msgid "dlg.confirm.ident.delete" msgstr "" @@ -450,7 +450,7 @@ msgstr "" "сертификатах." msgid "heading.unsub" -msgstr "ОТПИСКА" +msgstr "Отписка" msgid "dlg.confirm.unsub" msgstr "Действительно отписаться от ленты «%s»?" @@ -464,7 +464,7 @@ msgstr "" "«%s»." msgid "heading.pageinfo" -msgstr "ИНФОРМАЦИЯ О СТРАНИЦЕ" +msgstr "Информация о странице" msgid "pageinfo.header.cached" msgstr "(кешированный контент)" @@ -509,10 +509,10 @@ msgid "dlg.input.send" msgstr "Отправить" msgid "heading.save" -msgstr "ФАЙЛ СОХРАНЁН" +msgstr "Файл сохранён" msgid "heading.save.incomplete" -msgstr "СТРАНИЦА В ПРОЦЕССЕ ЗАГРУЗКИ" +msgstr "Страница в процессе загрузки" msgid "dlg.save.incomplete" msgstr "Содержимое страницы всё еще загружается." @@ -521,10 +521,10 @@ msgid "dlg.save.size" msgstr "Размер:" msgid "heading.save.error" -msgstr "ОШИБКА СОХРАНЕНИЯ ФАЙЛА" +msgstr "Ошибка сохранения файла" msgid "heading.import.bookmarks" -msgstr "ИМПОРТ ЗАКЛАДОК" +msgstr "Импорт закладок" msgid "dlg.import.found" msgid_plural "dlg.import.found.n" @@ -542,7 +542,7 @@ msgid "dlg.import.notnew" msgstr "Все ссылки на этой странице уже добавлены в закладки." msgid "heading.autoreload" -msgstr "АВТОЗАГРУЗКА" +msgstr "Автозагрузка" msgid "dlg.autoreload" msgstr "Выберите интервал автоматической перезагрузки для этой вкладки." @@ -569,7 +569,7 @@ msgid "link.download" msgstr "Скачать файл" msgid "heading.openlink" -msgstr "ОТКРЫТЬ ССЫЛКУ" +msgstr "Открыть ссылку" msgid "dlg.openlink.confirm" msgstr "" @@ -616,16 +616,16 @@ msgstr "" "домену." msgid "link.hint.audio" -msgstr "Воспроизвести аудио" +msgstr "Аудио" msgid "link.hint.image" -msgstr "Показать изображение" +msgstr "Изображение" msgid "bookmark.title.blank" msgstr "Пустая страница" msgid "heading.translate" -msgstr "ПЕРЕВОД СТРАНИЦЫ" +msgstr "Перевод страницы" msgid "dlg.translate.unavail" msgstr "Сервис недоступен" @@ -676,7 +676,7 @@ msgid "lang.es" msgstr "Испанский" msgid "heading.newident" -msgstr "НОВЫЙ КЛИЕНТСКИЙ СЕРТИФИКАТ" +msgstr "Новый клиентский сертификат" msgid "dlg.newident.rsa.selfsign" msgstr "Создание самоподписанного 2048-битного RSA-сертификата." @@ -718,10 +718,10 @@ msgid "dlg.newident.create" msgstr "Создать сертификат" msgid "heading.feedcfg" -msgstr "НАСТРОЙКИ ЛЕНТЫ" +msgstr "Настройки ленты" msgid "heading.subscribe" -msgstr "ПОДПИСКА НА СТРАНИЦУ" +msgstr "Подписка на страницу" msgid "dlg.feed.title" msgstr "Заголовок:" @@ -742,10 +742,10 @@ msgid "dlg.feed.sub" msgstr "Подписаться" msgid "heading.bookmark.add" -msgstr "ДОБАВИТЬ ЗАКЛАДКУ" +msgstr "Добавить закладку" msgid "heading.bookmark.edit" -msgstr "РЕДАКТИРОВАНИЕ ЗАКЛАДКИ" +msgstr "Редактирование закладки" msgid "dlg.bookmark.save" msgstr "Сохранить закладку" @@ -763,10 +763,10 @@ msgid "dlg.bookmark.icon" msgstr "Иконка:" msgid "heading.prefs" -msgstr "НАСТРОЙКИ" +msgstr "Настройки" msgid "heading.prefs.certs" -msgstr "СЕРТИФИКАТЫ" +msgstr "Сертификаты" msgid "heading.prefs.colors" msgstr "Цвета" @@ -787,22 +787,22 @@ msgid "heading.prefs.network" msgstr "Сеть" msgid "heading.prefs.paragraph" -msgstr "ПАРАГРАФ" +msgstr "Параграф" msgid "heading.prefs.pagecontent" -msgstr "ЦВЕТА СТРАНИЦЫ" +msgstr "Цвета страницы" msgid "heading.prefs.proxies" -msgstr "ПРОКСИ" +msgstr "Прокси" msgid "heading.prefs.scrolling" -msgstr "ПРОКРУТКА" +msgstr "Прокрутка" msgid "heading.prefs.sizing" -msgstr "РАЗМЕР" +msgstr "Размер" msgid "heading.prefs.widelayout" -msgstr "ШИРОКИЙ МАКЕТ" +msgstr "Широкий макет" msgid "heading.prefs.style" msgstr "Стиль" @@ -1060,7 +1060,7 @@ msgid "prefs.uilang" msgstr "Язык:" msgid "heading.certimport" -msgstr "ИМПОРТ КЛИЕНТСКОГО СЕРТИФИКАТА" +msgstr "Импорт клиентского сертификата" msgid "dlg.certimport.notfound" msgstr "Сертификат или закрытый ключ не найдены." @@ -1075,7 +1075,7 @@ msgid "lang.fi" msgstr "Финский" msgid "heading.certimport.pasted" -msgstr "ВСТАВЛЕНО ИЗ БУФЕРА ОБМЕНА" +msgstr "Вставлено из буфера обмена" msgid "dlg.certimport.import" msgstr "Импортировать" @@ -1252,7 +1252,7 @@ msgid "keys.subscribe" msgstr "Подписаться на страницу" msgid "heading.certimport.dropped" -msgstr "ПЕРЕТАЩЕН ФАЙЛ" +msgstr "Перетащен файл" msgid "error.permanent.msg" msgstr "" @@ -1498,10 +1498,10 @@ msgid "dlg.newident.date.past" msgstr "Срок действия не должен заканчиваться в прошлом." msgid "heading.newident.date.bad" -msgstr "НЕПРАВИЛЬНАЯ ДАТА" +msgstr "Неправильная дата" msgid "heading.newident.missing" -msgstr "ТРЕБУЕТСЯ ИНФОРМАЦИЯ" +msgstr "Требуется информация" msgid "keys.split.menu" msgstr "Управлять разделением окна" @@ -1648,7 +1648,7 @@ msgid "link.file.delete" msgstr "Удалить файл" msgid "heading.file.delete" -msgstr "УДАЛИТЬ ФАЙЛ" +msgstr "Удалить файл" msgid "dlg.file.delete.confirm" msgstr "Вы действительно хотите удалить этот файл?" @@ -1657,7 +1657,7 @@ msgid "dlg.file.delete" msgstr "Удалить" msgid "heading.prefs.uitheme" -msgstr "ЦВЕТА ИНТЕРФЕЙСА" +msgstr "Цвета интерфейса" msgid "prefs.scrollspeed.keyboard" msgstr "Скорость клавиатуры:" @@ -1681,10 +1681,10 @@ msgid "menu.unexpire" msgstr "Все равно загрузить" msgid "menu.page.upload" -msgstr "Загрузить страницу (Titan)…" +msgstr "Загрузить (Titan)…" msgid "heading.upload" -msgstr "ЗАГРУЗКА ΤΙΤΑΝ" +msgstr "Загрузка Titan" msgid "heading.upload.text" msgstr "Текст" @@ -1723,7 +1723,7 @@ msgid "prefs.returnkey.accept" msgstr "Подтверждение" msgid "keys.upload" -msgstr "Загрузить страницу (Titan)" +msgstr "Загрузить (Titan)" msgid "error.certexpired" msgstr "Сертификат просрочен" @@ -1736,7 +1736,7 @@ msgid "upload.port" msgstr "Порт…" msgid "heading.uploadport" -msgstr "ПОРТ ЗАГРУЗОК TITAN" +msgstr "Порт загрузок Titan" msgid "dlg.uploadport.msg" msgstr "" @@ -1845,10 +1845,10 @@ msgid "lang.isv" msgstr "Междуславянский" msgid "heading.bookmark.tags" -msgstr "ОСОБЫЕ ТЕГИ" +msgstr "Особые теги" msgid "heading.addfolder" -msgstr "ДОБАВИТЬ ПАПКУ" +msgstr "Добавить папку" msgid "dlg.addfolder.defaulttitle" msgstr "Новая папка" @@ -1861,7 +1861,7 @@ msgstr "Добавить папку" # used on mobile msgid "heading.settings" -msgstr "НАСТРОЙКИ" +msgstr "Настройки" msgid "prefs.imagestyle" msgstr "Окрашивать изображения:" @@ -1898,7 +1898,7 @@ msgid "menu.undo" msgstr "Отмена" msgid "heading.confirm.bookmarks.delete" -msgstr "УДАЛИТЬ ЗАКЛАДКИ" +msgstr "Удалить закладки" # button in the mobile New Identity dialog msgid "dlg.certimport.pickfile" @@ -1941,7 +1941,7 @@ msgstr[1] "%u шрифта" msgstr[2] "%u шрифтов" msgid "heading.fontpack.classic" -msgstr "ЗАГРУЗИТЬ ПАКЕТ ШРИФТОВ" +msgstr "Загрузить пакет шрифтов" msgid "dlg.fontpack.classic.msg" msgstr "" @@ -2050,7 +2050,7 @@ msgid "fontpack.delete" msgstr "Безвозвратно удалить «%s»" msgid "heading.fontpack.delete" -msgstr "УДАЛИТЬ ПАКЕТ ШРИФТОВ" +msgstr "Удалить пакет шрифтов" msgid "dlg.fontpack.delete" msgstr "Удалить пакет шрифтов" @@ -2105,7 +2105,7 @@ msgid "truetype.help.installed" msgstr "Этот шрифт установлен в каталог пользовательских шрифтов." msgid "heading.dismiss.warning" -msgstr "СКРЫТЬ ПРЕДУПРЕЖДЕНИЕ?" +msgstr "Скрыть предупреждение?" msgid "dlg.dismiss.warning" msgstr "Скрыть предупреждение" @@ -2142,3 +2142,91 @@ msgstr "24-часовой формат времени" # This label should be fairly short so it fits in a button in the sidebar. msgid "sidebar.action.feeds.markallread" msgstr "Прочитать все" + +msgid "menu.open.external" +msgstr "Открыть в другом приложении" + +msgid "menu.identities" +msgstr "Управление клиентскими сертификатами" + +# The %s represents the name of an identity. +#, c-format +msgid "ident.switch" +msgstr "Использовать %s" + +# Paste the line preceding the clicked link into the input prompt. +msgid "menu.input.precedingline" +msgstr "Вставить предыдущую строку" + +msgid "menu.page.upload.edit" +msgstr "Редактировать страницу (Titan)…" + +msgid "menu.upload.export" +msgstr "Экспортировать текст" + +# Mobile subheading: buttons for entering uploaded data. +msgid "upload.content" +msgstr "Содержимое" + +msgid "prefs.blink" +msgstr "Мигание курсора мыши:" + +# Active identity toolbar menu. +msgid "menu.hide.identities" +msgstr "Скрыть панель клиентских сертификатов" + +msgid "menu.home" +msgstr "Домой" + +msgid "sidebar.close" +msgstr "Готово" + +msgid "sidebar.action.bookmarks.newfolder" +msgstr "Новая папка" + +msgid "sidebar.action.bookmarks.edit" +msgstr "Редактировать" + +msgid "sidebar.action.history.clear" +msgstr "Очистить" + +msgid "sidebar.empty.unread" +msgstr "Непрочитанных записей нет" + +# Shows where a local file is using the Finder. +msgid "menu.reveal.macos" +msgstr "Показать в Finder" + +msgid "menu.share" +msgstr "Поделиться" + +msgid "heading.upload.id" +msgstr "Авторизация" + +msgid "menu.upload.delete" +msgstr "Удалить всё" + +msgid "menu.upload.delete.confirm" +msgstr "Действительно удалить всё (безвозвратно)" + +# Mobile subheading in the Upload dialog. +msgid "upload.url" +msgstr "URL" + +msgid "hint.upload.path" +msgstr "Путь URL" + +msgid "hint.upload.token.long" +msgstr "токен — см. инструкции сервера" + +msgid "heading.prefs.toolbaractions" +msgstr "Панель инструментов" + +msgid "prefs.toolbaraction1" +msgstr "Кнопка 1" + +msgid "prefs.toolbaraction2" +msgstr "Кнопка 2" + +msgid "keys.upload.edit" +msgstr "Редактировать страницу (Titan)" -- cgit v1.2.3 From 1ff80c99a47f0e674cbedb278fac47ee20e50369 Mon Sep 17 00:00:00 2001 From: Weblate Admin Date: Wed, 5 Jan 2022 14:25:28 +0000 Subject: Translated using Weblate (Finnish) Currently translated at 100.0% (644 of 644 strings) Translation: Lagrange/User Interface Translate-URL: http://weblate.skyjake.fi/projects/lagrange/ui/fi/ --- po/fi.po | 182 ++++++++++++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 135 insertions(+), 47 deletions(-) (limited to 'po') diff --git a/po/fi.po b/po/fi.po index f7c68267..2310fb14 100644 --- a/po/fi.po +++ b/po/fi.po @@ -3,7 +3,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: jaakko.keranen@iki.fi\n" "POT-Creation-Date: 2021-03-23 09:09+0000\n" -"PO-Revision-Date: 2021-11-30 05:35+0000\n" +"PO-Revision-Date: 2022-01-08 14:50+0000\n" "Last-Translator: Weblate Admin \n" "Language-Team: Finnish \n" "Language: fi\n" @@ -348,7 +348,7 @@ msgid "history.clear" msgstr "Tyhjennä historia…" msgid "heading.history.clear" -msgstr "TYHJENNÄ HISTORIA" +msgstr "Tyhjennä historia" msgid "dlg.confirm.history.clear" msgstr "Haluatko varmasti tyhjentää selaushistorian?" @@ -410,13 +410,13 @@ msgid "ident.showuse" msgstr "Näytä käyttö" msgid "heading.ident.use" -msgstr "IDENTITEETIN KÄYTTÖ" +msgstr "Identiteetin käyttö" msgid "menu.edit.notes" msgstr "Muokkaa muistiinpanoja…" msgid "heading.ident.notes" -msgstr "IDENTITEETIN MUISTIINPANOT" +msgstr "Identiteetin muistiinpanot" msgid "dlg.ident.notes" msgstr "Muistiinpanot liittyen identiteettiin %s:" @@ -428,7 +428,7 @@ msgid "ident.delete" msgstr "Poista identiteetti…" msgid "heading.ident.delete" -msgstr "POISTA IDENTITEETTI" +msgstr "Poista identiteetti" msgid "dlg.confirm.ident.delete" msgstr "" @@ -445,7 +445,7 @@ msgid "ident.gotohelp" msgstr "Katso %sOhjeesta%s lisätietoja TLS-asiakassertifikaateista." msgid "heading.unsub" -msgstr "POISTA TILAUS" +msgstr "Poista tilaus" msgid "dlg.confirm.unsub" msgstr "Haluatko varmasti poistaa syötteen \"%s\" tilauksen?" @@ -458,7 +458,7 @@ msgstr "" "Voit tallentaa sen latauskansioon: paina %s tai valitse \"%s\" valikosta." msgid "heading.pageinfo" -msgstr "SIVUN TIEDOT" +msgstr "Sivun tiedot" msgid "pageinfo.header.cached" msgstr "(sisältö välimuistista)" @@ -503,10 +503,10 @@ msgid "dlg.input.send" msgstr "Lähetä" msgid "heading.save" -msgstr "TIEDOSTO TALLENNETTU" +msgstr "Tiedosto tallennettu" msgid "heading.save.incomplete" -msgstr "SIVUN LATAUS KESKEN" +msgstr "Sivun lataus kesken" msgid "dlg.save.incomplete" msgstr "Sivun sisällön lataus ei ole vielä päättynyt." @@ -515,10 +515,10 @@ msgid "dlg.save.size" msgstr "Koko:" msgid "heading.save.error" -msgstr "VIRHE TALLENTAESSA" +msgstr "Virhe tallentaessa" msgid "heading.import.bookmarks" -msgstr "TUO KIRJANMERKKEJÄ" +msgstr "Tuo kirjanmerkkejä" msgid "dlg.import.found" msgid_plural "dlg.import.found.n" @@ -534,7 +534,7 @@ msgid "dlg.import.notnew" msgstr "Kaikki sivun linkit on jo kirjanmerkkeinä." msgid "heading.autoreload" -msgstr "AUTOMAATTINEN LATAUS" +msgstr "Automaattinen lataus" msgid "dlg.autoreload" msgstr "Valitse välilehden uudelleenlataustiheys." @@ -561,7 +561,7 @@ msgid "link.download" msgstr "Lataa kohde tiedostoon" msgid "heading.openlink" -msgstr "AVAA LINKKI" +msgstr "Avaa linkki" msgid "dlg.openlink.confirm" msgstr "" @@ -604,16 +604,16 @@ msgstr "" "verkkotunnukselle." msgid "link.hint.audio" -msgstr "Toista äänitiedosto" +msgstr "Ääni" msgid "link.hint.image" -msgstr "Katso kuva" +msgstr "Kuva" msgid "bookmark.title.blank" msgstr "Tyhjä sivu" msgid "heading.translate" -msgstr "KÄÄNNÄ SIVU" +msgstr "Käännä sivu" msgid "dlg.translate.unavail" msgstr "Palvelu ei ole toiminnassa" @@ -664,7 +664,7 @@ msgid "lang.es" msgstr "Espanja" msgid "heading.newident" -msgstr "UUSI IDENTITEETTI" +msgstr "Uusi identiteetti" msgid "dlg.newident.rsa.selfsign" msgstr "Luodaan itse allekirjoitettu 2048-bittinen RSA-sertifikaatti." @@ -706,10 +706,10 @@ msgid "dlg.newident.create" msgstr "Luo identiteetti" msgid "heading.feedcfg" -msgstr "SYÖTTEEN ASETUKSET" +msgstr "Syötteen asetukset" msgid "heading.subscribe" -msgstr "TILAA SIVU SYÖTTEENÄ" +msgstr "Tilaa sivu syötteenä" msgid "dlg.feed.title" msgstr "Otsikko:" @@ -730,10 +730,10 @@ msgid "dlg.feed.sub" msgstr "Tilaa" msgid "heading.bookmark.add" -msgstr "LISÄÄ KIRJANMERKKI" +msgstr "Lisää kirjanmerkki" msgid "heading.bookmark.edit" -msgstr "MUOKKAA KIRJANMERKKIÄ" +msgstr "Muokkaa kirjanmerkkiä" msgid "dlg.bookmark.save" msgstr "Talleta kirjanmerkki" @@ -751,10 +751,10 @@ msgid "dlg.bookmark.icon" msgstr "Kuvake:" msgid "heading.prefs" -msgstr "ASETUKSET" +msgstr "Asetukset" msgid "heading.prefs.certs" -msgstr "SERTIFIKAATIT" +msgstr "Sertifikaatit" msgid "heading.prefs.colors" msgstr "Värit" @@ -775,22 +775,22 @@ msgid "heading.prefs.network" msgstr "Verkko" msgid "heading.prefs.paragraph" -msgstr "KAPPALE" +msgstr "Kappale" msgid "heading.prefs.pagecontent" -msgstr "SIVUN VÄRIT" +msgstr "Sivun värit" msgid "heading.prefs.proxies" -msgstr "VÄLIPALVELIMET" +msgstr "Välipalvelimet" msgid "heading.prefs.scrolling" -msgstr "VIERITYS" +msgstr "Vieritys" msgid "heading.prefs.sizing" -msgstr "KOKO" +msgstr "Koko" msgid "heading.prefs.widelayout" -msgstr "LEVEÄ ULKOASU" +msgstr "Leveä ulkoasu" msgid "heading.prefs.style" msgstr "Tyyli" @@ -1042,7 +1042,7 @@ msgid "keys.hoverurl" msgstr "Näytä URL kursorin alla" msgid "heading.certimport" -msgstr "TUO IDENTITEETTI" +msgstr "Tuo identiteetti" msgid "dlg.certimport.help" msgstr "" @@ -1059,10 +1059,10 @@ msgid "dlg.certimport.notfound.page" msgstr "Sivulta ei löytynyt sertifikaattia tai avainta." msgid "heading.certimport.pasted" -msgstr "LIIMATTU LEIKEPÖYDÄLTÄ" +msgstr "Liimattu leikepöydältä" msgid "heading.certimport.dropped" -msgstr "PUDOTETTU TIEDOSTO" +msgstr "Pudotettu tiedosto" msgid "dlg.certimport.import" msgstr "Tuo" @@ -1508,13 +1508,13 @@ msgid "lang.tok" msgstr "Toki Pona" msgid "heading.newident.missing" -msgstr "PUUTTUVA TIETO" +msgstr "Puuttuva tieto" msgid "dlg.newindent.missing.commonname" msgstr "\"Yleisnimi\" on pakollinen tieto." msgid "heading.newident.date.bad" -msgstr "VIRHEELLINEN PÄIVÄMÄÄRÄ" +msgstr "Virheellinen päivämäärä" msgid "dlg.newident.date.past" msgstr "Voimassaolon täytyy päättyä tulevaisuudessa." @@ -1657,7 +1657,7 @@ msgid "link.file.delete" msgstr "Poista tiedosto" msgid "heading.file.delete" -msgstr "POISTA TIEDOSTO" +msgstr "Poista tiedosto" msgid "dlg.file.delete.confirm" msgstr "Oletko varma, että haluat poistaa tämän tiedoston?" @@ -1666,7 +1666,7 @@ msgid "dlg.file.delete" msgstr "Poista" msgid "heading.prefs.uitheme" -msgstr "KÄYTTÖLIITTYMÄN VÄRIT" +msgstr "Käyttöliittymän värit" msgid "prefs.scrollspeed.keyboard" msgstr "Näppäimistön nopeus:" @@ -1690,10 +1690,10 @@ msgid "menu.unexpire" msgstr "Jatka lataamista vanhentumisesta huolimatta" msgid "menu.page.upload" -msgstr "Lähetä sivu Titanilla…" +msgstr "Lähetä Titanilla…" msgid "heading.upload" -msgstr "TITAN-LÄHETYS" +msgstr "Titan-lähetys" msgid "heading.upload.text" msgstr "Teksti" @@ -1735,7 +1735,7 @@ msgid "prefs.returnkey" msgstr "Palautusnäppäin:" msgid "keys.upload" -msgstr "Lähetä sivu Titanilla" +msgstr "Lähetä Titanilla" msgid "error.certexpired" msgstr "Vanhentunut sertifikaatti" @@ -1749,7 +1749,7 @@ msgid "upload.port" msgstr "Portti…" msgid "heading.uploadport" -msgstr "TITAN-LÄHETYSPORTTI" +msgstr "Titan-lähetysportti" msgid "dlg.uploadport.msg" msgstr "" @@ -1780,7 +1780,7 @@ msgid "menu.sort.alpha" msgstr "Järjestä aakkosjärjestykseen" msgid "heading.confirm.bookmarks.delete" -msgstr "TUHOA KIRJANMERKIT" +msgstr "Tuhoa kirjanmerkit" #, c-format msgid "dlg.confirm.bookmarks.delete" @@ -1803,7 +1803,7 @@ msgstr "Lähetä tekstiä" # used on mobile msgid "heading.settings" -msgstr "ASETUKSET" +msgstr "Asetukset" msgid "prefs.imagestyle" msgstr "Kuvien väritys:" @@ -1862,10 +1862,10 @@ msgid "dlg.upload.pickfile" msgstr "Valitse tiedosto" msgid "heading.bookmark.tags" -msgstr "ERIKOISAVAINSANAT" +msgstr "Erikoisavainsanat" msgid "heading.addfolder" -msgstr "LISÄÄ KANSIO" +msgstr "Lisää kansio" msgid "dlg.addfolder.defaulttitle" msgstr "Uusi kansio" @@ -2074,7 +2074,7 @@ msgid "fontpack.delete" msgstr "Poista ja tuhoa \"%s\"" msgid "heading.fontpack.delete" -msgstr "POISTA FONTTIPAKETTI" +msgstr "Poista fonttipaketti" msgid "dlg.fontpack.delete" msgstr "Tuhoa fonttipaketti" @@ -2092,7 +2092,7 @@ msgid "truetype.help.installed" msgstr "Tämä fontti on asennettu käyttäjän fonttihakemistoon." msgid "heading.dismiss.warning" -msgstr "POISTA VAROITUS?" +msgstr "Poista varoitus?" #, c-format msgid "dlg.dismiss.ansi" @@ -2105,7 +2105,7 @@ msgid "dlg.fontpack.classic" msgstr "Lataa fonttipaketti (25 Mt)" msgid "heading.fontpack.classic" -msgstr "LATAA FONTTIPAKETTI" +msgstr "Lataa fonttipaketti" msgid "dlg.fontpack.classic.msg" msgstr "" @@ -2140,3 +2140,91 @@ msgstr "24 tunnin kellonajat" # This label should be fairly short so it fits in a button in the sidebar. msgid "sidebar.action.feeds.markallread" msgstr "Lue kaikki" + +msgid "menu.page.upload.edit" +msgstr "Muokkaa sivua Titanilla…" + +msgid "heading.upload.id" +msgstr "Valtuudet" + +msgid "menu.upload.export" +msgstr "Vie teksti" + +msgid "menu.upload.delete" +msgstr "Poista kaikki" + +# Mobile subheading in the Upload dialog. +msgid "upload.url" +msgstr "URL" + +# Mobile subheading: buttons for entering uploaded data. +msgid "upload.content" +msgstr "Sisältö" + +msgid "hint.upload.path" +msgstr "Polku" + +msgid "hint.upload.token.long" +msgstr "avainsana — katso palvelimen ohjeet" + +msgid "prefs.toolbaraction1" +msgstr "Painike 1" + +msgid "prefs.toolbaraction2" +msgstr "Painike 2" + +msgid "keys.upload.edit" +msgstr "Muokkaa sivua Titanilla" + +# The %s represents the name of an identity. +#, c-format +msgid "ident.switch" +msgstr "Ota käyttöön %s" + +msgid "menu.upload.delete.confirm" +msgstr "Poista kaikki (ei voi peruuttaa)" + +msgid "heading.prefs.toolbaractions" +msgstr "Työkalupalkin toiminnot" + +msgid "prefs.blink" +msgstr "Vilkkuva kursori:" + +msgid "menu.open.external" +msgstr "Avaa toisessa sovelluksessa" + +# Active identity toolbar menu. +msgid "menu.hide.identities" +msgstr "Piilota identiteetit" + +msgid "menu.home" +msgstr "Mene kotiin" + +msgid "menu.identities" +msgstr "Hallinnoi identiteettejä" + +msgid "sidebar.close" +msgstr "Valmis" + +msgid "sidebar.action.bookmarks.newfolder" +msgstr "Uusi kansio" + +msgid "sidebar.action.bookmarks.edit" +msgstr "Muokkaa" + +msgid "sidebar.action.history.clear" +msgstr "Tyhjennä" + +msgid "sidebar.empty.unread" +msgstr "Kaikki luettu" + +# Paste the line preceding the clicked link into the input prompt. +msgid "menu.input.precedingline" +msgstr "Liimaa edeltävä rivi" + +# Shows where a local file is using the Finder. +msgid "menu.reveal.macos" +msgstr "Näytä Finderissa" + +msgid "menu.share" +msgstr "Jaa" -- cgit v1.2.3 From 99df3baa941c5033286ad97ed5f07d5b5bfa3a6a Mon Sep 17 00:00:00 2001 From: Alyssa Liddell Date: Thu, 6 Jan 2022 21:57:10 +0000 Subject: Translated using Weblate (German) Currently translated at 94.5% (609 of 644 strings) Translation: Lagrange/User Interface Translate-URL: http://weblate.skyjake.fi/projects/lagrange/ui/de/ --- po/de.po | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) (limited to 'po') diff --git a/po/de.po b/po/de.po index 2b662ed6..cae63f6c 100644 --- a/po/de.po +++ b/po/de.po @@ -1,7 +1,7 @@ msgid "" msgstr "" "Report-Msgid-Bugs-To: jaakko.keranen@iki.fi\n" -"PO-Revision-Date: 2021-11-27 04:58+0000\n" +"PO-Revision-Date: 2022-01-08 14:50+0000\n" "Last-Translator: Alyssa Liddell \n" "Language-Team: German \n" "Language: de\n" @@ -1167,7 +1167,7 @@ msgid "dlg.certimport.nokey" msgstr "Kein privater Schlüssel" msgid "link.hint.audio" -msgstr "Audio abspielen" +msgstr "Audio" # tab button msgid "heading.prefs.userinterface" @@ -2125,3 +2125,32 @@ msgstr "Hintergrundfarbe" msgid "sidebar.action.show" msgstr "Anzeigen:" + +msgid "sidebar.close" +msgstr "Fertig" + +msgid "sidebar.action.bookmarks.newfolder" +msgstr "Neuer Ordner" + +msgid "sidebar.action.bookmarks.edit" +msgstr "Bearbeiten" + +msgid "menu.upload.delete" +msgstr "Alles löschen" + +# Mobile subheading in the Upload dialog. +msgid "upload.url" +msgstr "URL" + +# Mobile subheading: buttons for entering uploaded data. +msgid "upload.content" +msgstr "Inhalt" + +msgid "menu.page.upload.edit" +msgstr "Seite mit Titan bearbeiten…" + +msgid "prefs.toolbaraction1" +msgstr "Taste 1" + +msgid "prefs.toolbaraction2" +msgstr "Taste 2" -- cgit v1.2.3 From 5a24521d8c12054b6a7ffb409b69eb8500da0612 Mon Sep 17 00:00:00 2001 From: Страхиња Радић Date: Thu, 6 Jan 2022 18:16:15 +0000 Subject: Translated using Weblate (Serbian) Currently translated at 100.0% (644 of 644 strings) Translation: Lagrange/User Interface Translate-URL: http://weblate.skyjake.fi/projects/lagrange/ui/sr/ --- po/sr.po | 184 ++++++++++++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 136 insertions(+), 48 deletions(-) (limited to 'po') diff --git a/po/sr.po b/po/sr.po index a28f5bb7..4fdd4ee0 100644 --- a/po/sr.po +++ b/po/sr.po @@ -1,7 +1,7 @@ msgid "" msgstr "" "Report-Msgid-Bugs-To: jaakko.keranen@iki.fi\n" -"PO-Revision-Date: 2021-12-01 16:50+0000\n" +"PO-Revision-Date: 2022-01-08 14:50+0000\n" "Last-Translator: Страхиња Радић \n" "Language-Team: Serbian \n" "Language: sr\n" @@ -289,7 +289,7 @@ msgid "dlg.unsub" msgstr "Уклонити претплату" msgid "heading.pageinfo" -msgstr "ПОДАЦИ О СТРАНИЦИ" +msgstr "Подаци о страници" msgid "pageinfo.header.cached" msgstr "(кеширани садржај)" @@ -316,7 +316,7 @@ msgid "pageinfo.cert.untrusted" msgstr "Без поверења" msgid "heading.unsub" -msgstr "УКЛАЊАЊЕ ПРЕТПЛАТЕ" +msgstr "Уклањање претплате" msgid "pageinfo.domain.mismatch" msgstr "Назив домена не одговара" @@ -331,10 +331,10 @@ msgid "dlg.input.send" msgstr "Пошаљи" msgid "heading.save" -msgstr "ДАТОТЕКА САЧУВАНА" +msgstr "Датотека је сачувана" msgid "heading.save.incomplete" -msgstr "НЕПОТПУНА СТРАНИЦА" +msgstr "Непотпуна страница" msgid "dlg.save.incomplete" msgstr "Садржај странице се и даље преузима." @@ -343,7 +343,7 @@ msgid "dlg.save.size" msgstr "Величина:" msgid "heading.import.bookmarks" -msgstr "УВОЗ ОБЕЛЕЖИВАЧА" +msgstr "Увоз обележивача" #, c-format msgid "dlg.import.add" @@ -356,7 +356,7 @@ msgid "dlg.import.notnew" msgstr "Све везе на овој страници су већ додате у обележиваче." msgid "heading.autoreload" -msgstr "АУТОМАТСКО УЧИТАВАЊЕ" +msgstr "Аутоматско освежавање" msgid "reload.never" msgstr "Никад" @@ -394,7 +394,7 @@ msgid "link.bookmark" msgstr "Додај везу у обележиваче…" msgid "heading.openlink" -msgstr "ОТВАРАЊЕ ВЕЗЕ" +msgstr "Отварање везе" msgid "dlg.openlink" msgstr "Отвори везу" @@ -403,10 +403,10 @@ msgid "dlg.certimport.notfound.page" msgstr "Ниједан сертификат нити кључ није пронађен на текућој страници." msgid "heading.certimport.pasted" -msgstr "НАЛЕПЉЕНО ИЗ КЛИПБОРДА" +msgstr "Налепљено из клипборда" msgid "heading.certimport.dropped" -msgstr "ПРЕВУЧЕНА ДАТОТЕКА" +msgstr "Превучена датотека" msgid "dlg.certimport.import" msgstr "Увези" @@ -421,7 +421,7 @@ msgid "dlg.certimport.nocert" msgstr "Без сертификата" msgid "link.hint.audio" -msgstr "Пусти аудио" +msgstr "Аудио" msgid "bookmark.title.blank" msgstr "Празна страница" @@ -447,7 +447,7 @@ msgid "heading.lookup.other" msgstr "ОСТАЛО" msgid "heading.translate" -msgstr "ПРЕВОД СТРАНИЦЕ" +msgstr "Превод странице" msgid "dlg.translate.unavail" msgstr "Сервис недоступан" @@ -495,7 +495,7 @@ msgid "lang.es" msgstr "Шпански" msgid "heading.newident" -msgstr "НОВ ИДЕНТИТЕТ" +msgstr "Нов идентитет" msgid "dlg.newident.until" msgstr "Важи до:" @@ -534,7 +534,7 @@ msgid "dlg.feed.sub" msgstr "Претплати се" msgid "heading.bookmark.add" -msgstr "ДОДАВАЊЕ ОБЕЛЕЖИВАЧА" +msgstr "Додавање обележивача" msgid "dlg.bookmark.save" msgstr "Сачувај обележивач" @@ -552,10 +552,10 @@ msgid "dlg.bookmark.icon" msgstr "Икона:" msgid "heading.prefs" -msgstr "ПОДЕШАВАЊА" +msgstr "Подешавања" msgid "heading.prefs.certs" -msgstr "СЕРТИФИКАТИ" +msgstr "Сертификати" msgid "heading.prefs.fonts" msgstr "Фонтови" @@ -573,16 +573,16 @@ msgid "heading.prefs.network" msgstr "Мрежа" msgid "heading.prefs.paragraph" -msgstr "ПАСУС" +msgstr "Пасус" msgid "heading.prefs.pagecontent" -msgstr "БОЈЕ СТРАНИЦЕ" +msgstr "Боје странице" msgid "heading.prefs.sizing" -msgstr "ВЕЛИЧИНА" +msgstr "Величина" msgid "heading.prefs.widelayout" -msgstr "ШИРОКИ ИЗГЛЕД" +msgstr "Широки изглед" # tab button msgid "heading.prefs.style" @@ -890,7 +890,7 @@ msgid "about.tagline" msgstr "Прелепи Џемини клијент" msgid "heading.history.clear" -msgstr "ЧИШЋЕЊЕ ИСТОРИЈЕ" +msgstr "Чишћење историје" msgid "error.unavail.msg" msgstr "" @@ -915,7 +915,7 @@ msgid "menu.title.file" msgstr "Датотека" msgid "heading.certimport" -msgstr "УВОЗ ИДЕНТИТЕТА" +msgstr "Увоз идентитета" msgid "error.proxy" msgstr "Грешка проксија" @@ -949,7 +949,7 @@ msgid "dlg.certimport.nokey" msgstr "Без приватног кључа" msgid "link.hint.image" -msgstr "Прикажи слику" +msgstr "Слика" msgid "menu.closetab.other" msgstr "Затвори остале картице" @@ -1021,13 +1021,13 @@ msgid "menu.show.outline" msgstr "Прикажи структуру странице" msgid "heading.feedcfg" -msgstr "ПОДЕШАВАЊА ФИДА" +msgstr "Подешавања фида" msgid "menu.autoreload" msgstr "Постави аутоматско учитавање…" msgid "heading.subscribe" -msgstr "ПРЕТПЛАТА НА СТРАНИЦУ" +msgstr "Претплата на страницу" msgid "menu.page.subscribe" msgstr "Претплати се на страницу…" @@ -1045,7 +1045,7 @@ msgid "menu.bookmarks.refresh" msgstr "Освежи удаљене обележиваче" msgid "heading.bookmark.edit" -msgstr "УРЕЂИВАЊЕ ОБЕЛЕЖИВАЧА" +msgstr "Уређивање обележивача" msgid "sidebar.feeds" msgstr "Фидови" @@ -1065,7 +1065,7 @@ msgid "sidebar.identities" msgstr "Идентитети" msgid "heading.prefs.proxies" -msgstr "ПРОКСИЈИ" +msgstr "Проксији" # Usage: "(count) Unread" in the sidebar tab title, referring to feed entries. msgid "sidebar.unread" @@ -1075,7 +1075,7 @@ msgstr[1] "непрочитана" msgstr[2] "непрочитаних" msgid "heading.prefs.scrolling" -msgstr "СКРОЛОВАЊЕ" +msgstr "Скроловање" msgid "status.query" msgstr "Упит за претрагу" @@ -1205,7 +1205,7 @@ msgid "prefs.proxy.gopher" msgstr "Прокси за Gopher:" msgid "heading.ident.use" -msgstr "УПОТРЕБА ИДЕНТИТЕТА" +msgstr "Употреба идентитета" msgid "keys.scroll.halfpage.up" msgstr "Скроловање нагоре за пола странице" @@ -1217,13 +1217,13 @@ msgid "keys.scroll.page.down" msgstr "Скроловање надоле за једну страницу" msgid "heading.ident.notes" -msgstr "ЗАБЕЛЕШКЕ О ИДЕНТИТЕТУ" +msgstr "Забелешке о идентитету" msgid "keys.link.modkey" msgstr "Отварање везе преко тастера модификатора" msgid "heading.ident.delete" -msgstr "БРИСАЊЕ ИДЕНТИТЕТА" +msgstr "Брисање идентитета" msgid "keys.link.homerow.newtab" msgstr "Отварање везе у новој картици преко тастера основног реда" @@ -1277,7 +1277,7 @@ msgid "keys.hoverurl" msgstr "Смена приказивања УРЛ-ова при надношењу показивача" msgid "heading.save.error" -msgstr "ГРЕШКА ПРИ ЧУВАЊУ ДАТОТЕКЕ" +msgstr "Грешка при чувању датотеке" msgid "error.badstatus.msg" msgstr "" @@ -1390,7 +1390,7 @@ msgstr[2] "пре %d дана" # Link download progress message. msgid "doc.fetching" -msgstr "Допремање" +msgstr "Учитавање" # Inline download status message. msgid "media.download.warnclose" @@ -1521,10 +1521,10 @@ msgid "link.side" msgstr "Отвори везу са стране" msgid "heading.newident.missing" -msgstr "НЕМА ИНФОРМАЦИЈА" +msgstr "Нема информација" msgid "heading.newident.date.bad" -msgstr "НЕИСПРАВАН ДАТУМ" +msgstr "Неисправан датум" msgid "dlg.newident.date.past" msgstr "Рок трајања мора бити у будућности." @@ -1696,7 +1696,7 @@ msgid "link.file.delete" msgstr "Обриши датотеку" msgid "heading.file.delete" -msgstr "БРИСАЊЕ ДАТОТЕКЕ" +msgstr "Брисање датотеке" msgid "dlg.file.delete.confirm" msgstr "Да ли сте сигурни да желите да обришете ову датотеку?" @@ -1705,7 +1705,7 @@ msgid "dlg.file.delete" msgstr "Обриши" msgid "heading.prefs.uitheme" -msgstr "БОЈЕ ИНТЕРФЕЈСА" +msgstr "Боје интерфејса" msgid "prefs.scrollspeed.keyboard" msgstr "Брзина тастатуре:" @@ -1742,7 +1742,7 @@ msgid "upload.port" msgstr "Порт…" msgid "heading.uploadport" -msgstr "ПОРТ ЗА СЛАЊЕ ПРЕКО ТИТАНА" +msgstr "Порт за слање преко Титана" msgid "dlg.uploadport.msg" msgstr "" @@ -1761,10 +1761,10 @@ msgid "prefs.returnkey.accept" msgstr "Прихватање" msgid "menu.page.upload" -msgstr "Пошаљи страницу преко Титана…" +msgstr "Пошаљи преко Титана…" msgid "heading.upload" -msgstr "СЛАЊЕ ПРЕКО ТИТАНА" +msgstr "Слање преко Титана" msgid "heading.upload.text" msgstr "Текст" @@ -1801,7 +1801,7 @@ msgstr "" "Повезивање са сервером је поништено јер је његов TLS сертификат истекао." msgid "keys.upload" -msgstr "Слање странице преко Титана" +msgstr "Слање преко Титана" msgid "media.untitled.image" msgstr "Слика" @@ -1907,7 +1907,7 @@ msgid "menu.undo" msgstr "Опозови" msgid "heading.confirm.bookmarks.delete" -msgstr "БРИСАЊЕ ОБЕЛЕЖИВАЧА" +msgstr "Брисање обележивача" #, c-format msgid "dlg.bookmarks.delete" @@ -1934,10 +1934,10 @@ msgid "dlg.upload.pickfile" msgstr "Изабери датотеку" msgid "heading.bookmark.tags" -msgstr "ПОСЕБНЕ ОЗНАКЕ" +msgstr "Посебне ознаке" msgid "heading.addfolder" -msgstr "ДОДАВАЊЕ ФАСЦИКЛЕ" +msgstr "Додавање фасцикле" msgid "dlg.addfolder.defaulttitle" msgstr "Нова фасцикла" @@ -1947,7 +1947,7 @@ msgstr "Додавање фасцикле" # used on mobile msgid "heading.settings" -msgstr "ПОДЕШАВАЊА" +msgstr "Подешавања" msgid "prefs.imagestyle.original" msgstr "Ниједно" @@ -1980,7 +1980,7 @@ msgid "lang.isv" msgstr "Међусловенски" msgid "heading.fontpack.classic" -msgstr "ПРЕУЗИМАЊЕ ПАКЕТА ФОНТОВА" +msgstr "Преузимање пакета фонтова" msgid "prefs.gemtext.ansi.fontstyle" msgstr "Стил фонта" @@ -2087,7 +2087,7 @@ msgid "fontpack.install" msgstr "Инсталирај „%s“" msgid "heading.fontpack.delete" -msgstr "БРИСАЊЕ ПАКЕТА ФОНТОВА" +msgstr "Брисање пакета фонтова" msgid "dlg.fontpack.delete" msgstr "Обриши пакет" @@ -2102,7 +2102,7 @@ msgid "truetype.help.installed" msgstr "Фонт је инсталиран у корисничком директоријуму са фонтовима." msgid "heading.dismiss.warning" -msgstr "ОТКЛОНИТИ УПОЗОРЕЊЕ?" +msgstr "Отклонити упозорење?" msgid "dlg.dismiss.warning" msgstr "Отклони упозорење" @@ -2189,3 +2189,91 @@ msgstr "24-часовно време" # This label should be fairly short so it fits in a button in the sidebar. msgid "sidebar.action.feeds.markallread" msgstr "Прочитај све" + +msgid "menu.open.external" +msgstr "Отвори у другој апликацији" + +# Active identity toolbar menu. +msgid "menu.hide.identities" +msgstr "Сакриј идентитете" + +msgid "menu.identities" +msgstr "Управљај идентитетима" + +msgid "sidebar.action.history.clear" +msgstr "Очисти" + +# Paste the line preceding the clicked link into the input prompt. +msgid "menu.input.precedingline" +msgstr "Уметни претходни ред" + +msgid "menu.upload.delete.confirm" +msgstr "Заиста обриши све (неповратно)" + +# Mobile subheading: buttons for entering uploaded data. +msgid "upload.content" +msgstr "Садржај" + +msgid "hint.upload.token.long" +msgstr "токен — видети инструкције сервера" + +msgid "menu.home" +msgstr "Иди на почетну" + +msgid "sidebar.close" +msgstr "Готово" + +msgid "sidebar.action.bookmarks.newfolder" +msgstr "Нова фасцикла" + +msgid "sidebar.action.bookmarks.edit" +msgstr "Уреди" + +# The %s represents the name of an identity. +#, c-format +msgid "ident.switch" +msgstr "Користити %s" + +msgid "sidebar.empty.unread" +msgstr "Нема непрочитаних ставки" + +# Shows where a local file is using the Finder. +msgid "menu.reveal.macos" +msgstr "Прикажи у Finder-у" + +msgid "menu.share" +msgstr "Подели" + +msgid "menu.page.upload.edit" +msgstr "Уреди страницу преко Титана…" + +msgid "heading.upload.id" +msgstr "Ауторизација" + +msgid "menu.upload.export" +msgstr "Извези текст" + +msgid "menu.upload.delete" +msgstr "Обриши све" + +# Mobile subheading in the Upload dialog. +msgid "upload.url" +msgstr "УРЛ" + +msgid "hint.upload.path" +msgstr "УРЛ путања" + +msgid "heading.prefs.toolbaractions" +msgstr "Акције палете алатки" + +msgid "prefs.toolbaraction1" +msgstr "Дугме 1" + +msgid "prefs.toolbaraction2" +msgstr "Дугме 2" + +msgid "prefs.blink" +msgstr "Трепћући курсор:" + +msgid "keys.upload.edit" +msgstr "Уређивање странице преко Титана" -- cgit v1.2.3 From dca6c9cec06495bde7374342e85a0ae81441f1b0 Mon Sep 17 00:00:00 2001 From: jan Anja Date: Wed, 5 Jan 2022 19:35:30 +0000 Subject: Translated using Weblate (Toki Pona (tok)) Currently translated at 96.5% (622 of 644 strings) Translation: Lagrange/User Interface Translate-URL: http://weblate.skyjake.fi/projects/lagrange/ui/tok/ --- po/tok.po | 147 ++++++++++++++++++++++++++++++++++++++++++-------------------- 1 file changed, 100 insertions(+), 47 deletions(-) (limited to 'po') diff --git a/po/tok.po b/po/tok.po index a8e7e901..01698208 100644 --- a/po/tok.po +++ b/po/tok.po @@ -1,7 +1,7 @@ msgid "" msgstr "" "Report-Msgid-Bugs-To: jaakko.keranen@iki.fi\n" -"PO-Revision-Date: 2021-12-08 14:50+0000\n" +"PO-Revision-Date: 2022-01-08 14:50+0000\n" "Last-Translator: jan Anja \n" "Language-Team: Toki Pona \n" @@ -29,7 +29,7 @@ msgstr "sitelen namako li jo ala e sitelen pona" # Link download progress message. msgid "doc.fetching" -msgstr "mi kama jo" +msgstr "lipu li kama" # Inline download status message. msgid "media.download.complete" @@ -389,7 +389,7 @@ msgid "history.clear" msgstr "o kama sin e sona pi tenpo pini…" msgid "heading.history.clear" -msgstr "SONA PI TENPO PINI LI WILE KAMA SIN" +msgstr "o kama sin e sona pi tenpo pini" msgid "ident.using" msgstr "lipu ni li kepeken e ona" @@ -428,25 +428,25 @@ msgid "dlg.ident.notes" msgstr "toki lili pi nimi %s:" msgid "heading.ident.use" -msgstr "LIPU NI LI KEPEKEN E ONA" +msgstr "lipu ni li kepeken e ona" msgid "menu.edit.notes" msgstr "o ante e toki lili…" msgid "heading.ident.notes" -msgstr "TOKI LILI NIMI" +msgstr "toki lili nimi" msgid "ident.delete" msgstr "o weka e ona…" msgid "heading.ident.delete" -msgstr "NIMI LI WILE TAWA WEKA" +msgstr "o weka e nimi" msgid "ident.fingerprint" msgstr "o kama sona e sitelen len lili" msgid "heading.unsub" -msgstr "O PINI LUKIN" +msgstr "o pini lukin" #, c-format msgid "dlg.confirm.unsub" @@ -499,10 +499,10 @@ msgid "dlg.cert.trust" msgstr "o kepeken" msgid "heading.save" -msgstr "IJO LI AWEN" +msgstr "ijo li awen" msgid "heading.save.incomplete" -msgstr "LIPU LI WAN ALA" +msgstr "lipu li wan ala" msgid "dlg.save.incomplete" msgstr "mi kin kama jo e lipu ni." @@ -511,10 +511,10 @@ msgid "dlg.save.size" msgstr "suli:" msgid "heading.save.error" -msgstr "PAKALA! MI AWEN ALA E IJO" +msgstr "pakala! mi awen ala e ijo" msgid "heading.import.bookmarks" -msgstr "O KAMA JO E LIPU AWEN" +msgstr "o kama jo e lipu awen" msgid "reload.onceperday" msgstr "tenpo wan pi tenpo suno" @@ -532,7 +532,7 @@ msgid "link.bookmark" msgstr "o awen e nimi tawa…" msgid "heading.openlink" -msgstr "O OPEN E NIMI TAWA" +msgstr "o open e nimi tawa" #, c-format msgid "dlg.import.add" @@ -546,7 +546,7 @@ msgid "link.noproxy" msgstr "o open kepeken ala lupa" msgid "heading.autoreload" -msgstr "O SIN E LIPU" +msgstr "o sin e lipu" #, c-format msgid "num.minutes" @@ -586,16 +586,16 @@ msgid "dlg.certimport.notfound.page" msgstr "sitelen len en ijo len li lon ala lon lipu ni." msgid "heading.certimport" -msgstr "O KAMA JO E NIMI" +msgstr "o kama jo e nimi" msgid "heading.certimport.pasted" -msgstr "PANA TAN SONA" +msgstr "pana tan sona" msgid "bookmark.title.blank" msgstr "lipu li jo e ala insa" msgid "heading.certimport.dropped" -msgstr "TAWA TAN IJO" +msgstr "tawa tan ijo" msgid "dlg.certimport.import" msgstr "o kama jo" @@ -610,10 +610,10 @@ msgid "dlg.certimport.nokey" msgstr "ijo len li lon ala" msgid "link.hint.audio" -msgstr "o kute e kalama musi" +msgstr "kalama musi" msgid "link.hint.image" -msgstr "o lukin e sitelen" +msgstr "sitelen" # Interpret as "Results from bookmarks..." msgid "heading.lookup.bookmarks" @@ -632,7 +632,7 @@ msgid "heading.lookup.other" msgstr "TAN IJO ANTE" msgid "heading.translate" -msgstr "O TOKI ANTE E LIPU" +msgstr "o toki ante e lipu" msgid "dlg.translate.fail" msgstr "toki li pakala" @@ -719,7 +719,7 @@ msgid "dlg.newident.create" msgstr "o pali e nimi" msgid "heading.subscribe" -msgstr "O LUKIN E IJO SIN LON LIPU" +msgstr "o lukin e ijo sin lon lipu" msgid "dlg.feed.title" msgstr "nimi:" @@ -740,10 +740,10 @@ msgid "dlg.feed.sub" msgstr "o lukin" msgid "heading.bookmark.add" -msgstr "O AWEN E LIPU" +msgstr "o awen e lipu" msgid "heading.bookmark.edit" -msgstr "O ANTE E LIPU AWEN" +msgstr "o ante e lipu awen" msgid "dlg.bookmark.save" msgstr "o awen" @@ -758,7 +758,7 @@ msgid "dlg.bookmark.icon" msgstr "sitelen:" msgid "heading.prefs" -msgstr "IJO ANTE" +msgstr "ijo ante" # tab button msgid "heading.prefs.colors" @@ -780,7 +780,7 @@ msgid "heading.prefs.network" msgstr "kon" msgid "heading.prefs.paragraph" -msgstr "WAN SITELEN" +msgstr "wan sitelen" msgid "prefs.searchurl" msgstr "nimi tawa lukin e nimi:" @@ -801,19 +801,19 @@ msgid "prefs.hidetoolbarscroll" msgstr "tawa la mi len e ijo sewi:" msgid "heading.prefs.pagecontent" -msgstr "KULE LIPU" +msgstr "kule lipu" msgid "heading.prefs.proxies" -msgstr "LUPA" +msgstr "lupa" msgid "heading.prefs.scrolling" -msgstr "TAWA" +msgstr "tawa" msgid "heading.prefs.sizing" -msgstr "SULI" +msgstr "suli" msgid "heading.prefs.widelayout" -msgstr "SULI MUTE" +msgstr "suli mute" # tab button msgid "heading.prefs.style" @@ -1288,7 +1288,7 @@ msgid "ident.gotohelp" msgstr "sina wile kama sona e sitelen jan pi ilo TLS la o lukin e %ssona%s." msgid "heading.pageinfo" -msgstr "SONA PI LIPU NI" +msgstr "sona pi lipu ni" msgid "pageinfo.header.cached" msgstr "(ijo lon sona pi tenpo pini lili)" @@ -1317,7 +1317,7 @@ msgid "dlg.newident.rsa.selfsign" msgstr "sina ken pali e sitelen len kepeken e sitelen RSA pi tu 2048." msgid "heading.prefs.certs" -msgstr "SITELEN LEN MUTE" +msgstr "sitelen len mute" msgid "error.cert.needed" msgstr "sina wile e sitelen len" @@ -1348,7 +1348,7 @@ msgid "lang.hi" msgstr "toki Insi" msgid "heading.newident" -msgstr "NIMI SIN" +msgstr "nimi sin" msgid "dlg.newident.domain" msgstr "nimi pi ilo sona:" @@ -1357,7 +1357,7 @@ msgid "dlg.newident.country" msgstr "ma:" msgid "heading.feedcfg" -msgstr "IJO ANTE PI LIPU LUKIN" +msgstr "ijo ante pi lipu lukin" msgid "dlg.bookmark.tags" msgstr "nimi lili:" @@ -1448,7 +1448,7 @@ msgid "dlg.save.opendownload" msgstr "o open e ijo" msgid "heading.newident.date.bad" -msgstr "TENPO LI PAKALA" +msgstr "tenpo li pakala" msgid "gempub.cover.aboutbook" msgstr "sona lipu" @@ -1476,7 +1476,7 @@ msgid "lang.ia" msgstr "toki Intelinwa" msgid "heading.newident.missing" -msgstr "NIMI LI LON ALA" +msgstr "nimi li lon ala" msgid "link.side" msgstr "o open e nimi tawa lon poki ante" @@ -1611,7 +1611,7 @@ msgid "dlg.newident.scope" msgstr "o kepeken e ona lon:" msgid "keys.upload" -msgstr "o pana e lipu kepeken kon Tetan" +msgstr "o pana kepeken kon Tetan" msgid "menu.pageinfo" msgstr "o lukin e sona lipu" @@ -1629,7 +1629,7 @@ msgid "upload.port" msgstr "nanpa kon…" msgid "heading.uploadport" -msgstr "NANPA PI KON TETAN" +msgstr "nanpa pi kon Tetan" msgid "dlg.uploadport.set" msgstr "o ante" @@ -1640,13 +1640,13 @@ msgstr "" "wile awen." msgid "heading.prefs.uitheme" -msgstr "KULE PI ILO LAKELAN" +msgstr "kule pi ilo Lakelan" msgid "link.file.delete" msgstr "o weka e ijo" msgid "heading.file.delete" -msgstr "O WEKA E IJO" +msgstr "o weka e ijo" msgid "dlg.file.delete.confirm" msgstr "sina wile ala wile weka e ijo ni?" @@ -1655,10 +1655,10 @@ msgid "dlg.file.delete" msgstr "o weka" msgid "heading.upload" -msgstr "O PANA KEPEKEN KON TETAN" +msgstr "o pana kepeken kon Tetan" msgid "menu.page.upload" -msgstr "o pana e lipu kepeken kon Tetan…" +msgstr "o pana kepeken kon Tetan…" msgid "heading.upload.text" msgstr "lipu" @@ -1768,7 +1768,7 @@ msgid "dlg.upload.pickfile" msgstr "open e ijo" msgid "heading.addfolder" -msgstr "O PALI E POKI" +msgstr "o pali e poki" msgid "dlg.addfolder.defaulttitle" msgstr "poki sin" @@ -1781,7 +1781,7 @@ msgstr "o pali e poki" # used on mobile msgid "heading.settings" -msgstr "IJO ANTE" +msgstr "ijo ante" msgid "prefs.imagestyle" msgstr "o kule e sitelen:" @@ -1806,7 +1806,7 @@ msgid "keys.bookmark.addfolder" msgstr "o pali e poki tawa lipu awen" msgid "heading.bookmark.tags" -msgstr "NIMI LILI NAMAKO" +msgstr "nimi lili namako" msgid "media.untitled.image" msgstr "sitelen" @@ -1834,7 +1834,7 @@ msgid "menu.undo" msgstr "o ante monsi" msgid "heading.confirm.bookmarks.delete" -msgstr "LIPU AWEN LI WILE KAMA WEKA" +msgstr "o weka e lipu awen" #, c-format msgid "dlg.confirm.bookmarks.delete" @@ -1854,7 +1854,7 @@ msgid "dlg.fontpack.classic" msgstr "o kama jo e kulupu sitelen (tu suli meka 25)" msgid "heading.fontpack.classic" -msgstr "O KAMA JO E KULUPU SITELEN" +msgstr "o kama jo e kulupu sitelen" #, c-format msgid "fontpack.install" @@ -1972,7 +1972,7 @@ msgid "fontpack.delete" msgstr "o weka e kulupu sitelen \"%s\"" msgid "heading.fontpack.delete" -msgstr "KULUPU SITELEN LI KAMA WEKA" +msgstr "o weka e kulupu sitelen" #, c-format msgid "dlg.fontpack.delete.confirm" @@ -2068,3 +2068,56 @@ msgstr "poki:" msgid "sidebar.action.show" msgstr "o len ala:" + +msgid "menu.open.external" +msgstr "o open kepeken ilo ante" + +msgid "sidebar.action.history.clear" +msgstr "o weka" + +msgid "keys.upload.edit" +msgstr "o ante e lipu kepeken kon Tetan" + +# Active identity toolbar menu. +msgid "menu.hide.identities" +msgstr "o len e nimi" + +msgid "menu.home" +msgstr "o tawa lipu tomo" + +msgid "menu.identities" +msgstr "o ante e nimi" + +msgid "sidebar.close" +msgstr "awen" + +msgid "sidebar.action.bookmarks.newfolder" +msgstr "poki sin" + +msgid "sidebar.action.bookmarks.edit" +msgstr "o ante" + +# The %s represents the name of an identity. +#, c-format +msgid "ident.switch" +msgstr "o kepeken e nimi %s" + +msgid "menu.share" +msgstr "o pana" + +msgid "menu.page.upload.edit" +msgstr "o ante e lipu kepeken kon Tetan…" + +# Shows where a local file is using the Finder. +msgid "menu.reveal.macos" +msgstr "o lukin kepeken ilo Finder" + +msgid "menu.upload.delete" +msgstr "o weka e ijo ale" + +msgid "menu.upload.delete.confirm" +msgstr "sina wile ala wile weka e ijo ale? sina ken ala ante monsi" + +# Mobile subheading in the Upload dialog. +msgid "upload.url" +msgstr "nimi tawa" -- cgit v1.2.3 From 31914cbfdef8fa9757e148b7676f7ebff2c8e1cf Mon Sep 17 00:00:00 2001 From: Xosé M Date: Thu, 6 Jan 2022 08:31:29 +0000 Subject: Translated using Weblate (Galician) Currently translated at 100.0% (644 of 644 strings) Translation: Lagrange/User Interface Translate-URL: http://weblate.skyjake.fi/projects/lagrange/ui/gl/ --- po/gl.po | 182 ++++++++++++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 135 insertions(+), 47 deletions(-) (limited to 'po') diff --git a/po/gl.po b/po/gl.po index 55ec7aa2..6d9f7e91 100644 --- a/po/gl.po +++ b/po/gl.po @@ -1,7 +1,7 @@ msgid "" msgstr "" "Report-Msgid-Bugs-To: jaakko.keranen@iki.fi\n" -"PO-Revision-Date: 2021-12-19 06:50+0000\n" +"PO-Revision-Date: 2022-01-08 14:50+0000\n" "Last-Translator: Xosé M. \n" "Language-Team: Galician " "\n" @@ -122,13 +122,13 @@ msgstr "" "• 2021-12-31 23:59:59" msgid "heading.prefs.pagecontent" -msgstr "CORES DA PÁXINA" +msgstr "Cores da páxina" msgid "heading.prefs.sizing" -msgstr "TAMAÑO" +msgstr "Tamaño" msgid "heading.prefs.widelayout" -msgstr "ANCHO DA DISPOSICIÓN" +msgstr "Ancho da disposición" msgid "prefs.collapsepreonload" msgstr "Pregar texto preformatado:" @@ -572,7 +572,7 @@ msgid "history.clear" msgstr "Limpar historial…" msgid "heading.history.clear" -msgstr "LIMPAR HISTORIAL" +msgstr "Limpar historial" msgid "dlg.history.clear" msgstr "Limpar historial" @@ -631,13 +631,13 @@ msgid "ident.export" msgstr "Exportar" msgid "heading.ident.use" -msgstr "USO DA IDENTIDADE" +msgstr "Uso de identidade" msgid "menu.edit.notes" msgstr "Editar notas…" msgid "heading.ident.notes" -msgstr "NOTAS DA IDENTIDADE" +msgstr "Notas da identidade" msgid "ident.fingerprint" msgstr "Copiar impresión dixital" @@ -646,7 +646,7 @@ msgid "ident.delete" msgstr "Eliiminar identidade…" msgid "heading.ident.delete" -msgstr "ELIMINAR IDENTIDADE" +msgstr "Eliminar identidade" msgid "dlg.ident.delete" msgstr "Eliminar Identidade e Ficheiros" @@ -655,7 +655,7 @@ msgid "sidebar.empty.idents" msgstr "Sen identidades" msgid "heading.unsub" -msgstr "RETIRAR SUBSCRICIÓN" +msgstr "Retirar subscrición" #, c-format msgid "dlg.confirm.unsub" @@ -674,7 +674,7 @@ msgid "error.server.msg" msgstr "O servidor respondeu coa mensaxe:" msgid "heading.pageinfo" -msgstr "INFORMACIÓN DA PÁXINA" +msgstr "Información da páxina" msgid "pageinfo.header.cached" msgstr "(contido na caché)" @@ -723,10 +723,10 @@ msgid "dlg.input.send" msgstr "Enviar" msgid "heading.save" -msgstr "FICHEIRO GARDADO" +msgstr "Ficheiro gardado" msgid "heading.save.incomplete" -msgstr "PÁXINA INCOMPLETA" +msgstr "Páxina incompleta" msgid "dlg.save.size" msgstr "Tamaño:" @@ -735,10 +735,10 @@ msgid "dlg.save.opendownload" msgstr "Abrir ficheiro descargado" msgid "heading.save.error" -msgstr "ERRO AO GARDAR O FICHEIRO" +msgstr "Erro ao gardar o ficheiro" msgid "heading.import.bookmarks" -msgstr "IMPORTAR MARCADORES" +msgstr "Importar marcadores" #, c-format msgid "dlg.import.found" @@ -756,7 +756,7 @@ msgid "dlg.import.notnew" msgstr "Xa están marcadas tódalas ligazóns desta páxina." msgid "heading.autoreload" -msgstr "AUTO-RECARGA" +msgstr "Auto-Recarga" msgid "dlg.autoreload" msgstr "Elixe o intervalo para a auto-recarga nesta lapela." @@ -798,13 +798,13 @@ msgid "link.file.delete" msgstr "Eliminar ficheiro" msgid "heading.file.delete" -msgstr "ELIMINAR FICHEIRO" +msgstr "Eliminar ficheiro" msgid "dlg.file.delete" msgstr "Eliminar" msgid "heading.openlink" -msgstr "ABRIR LIGAZÓN" +msgstr "Abrir Ligazón" #, c-format msgid "dlg.openlink.confirm" @@ -827,7 +827,7 @@ msgid "dlg.certwarn.domain.expired" msgstr "O certificado recibido está caducado E era para un dominio incorrecto." msgid "heading.certimport" -msgstr "IMPORTAR IDENTIDADE" +msgstr "Importar identidade" msgid "dlg.certimport.help" msgstr "" @@ -838,10 +838,10 @@ msgid "dlg.certimport.notfound" msgstr "Non se atopa certificado ou chave privada." msgid "heading.certimport.pasted" -msgstr "PEGADO DESDE PORTAPAPEIS" +msgstr "Pegado desde portapapeis" msgid "heading.certimport.dropped" -msgstr "FICHEIRO APORTADO" +msgstr "Ficheiro aportado" msgid "dlg.certimport.import" msgstr "Importar" @@ -859,10 +859,10 @@ msgid "dlg.certimport.nokey" msgstr "Sen chave privada" msgid "link.hint.audio" -msgstr "Reproducir" +msgstr "Audio" msgid "link.hint.image" -msgstr "Ver imaxe" +msgstr "Imaxe" msgid "bookmark.title.blank" msgstr "Páxina baleira" @@ -912,10 +912,10 @@ msgid "heading.lookup.other" msgstr "OUTRO" msgid "menu.page.upload" -msgstr "Subir páxina con Titan…" +msgstr "Subir con Titan…" msgid "heading.upload" -msgstr "SUBIR CON TITAN" +msgstr "Subir con Titan" msgid "heading.upload.text" msgstr "Texto" @@ -951,13 +951,13 @@ msgid "upload.port" msgstr "Porto…" msgid "heading.uploadport" -msgstr "PORTO TITAN PARA SUBIDAS" +msgstr "Porto de subida Titan" msgid "dlg.uploadport.set" msgstr "Establecer porto" msgid "heading.translate" -msgstr "TRADUCIR PÁXINA" +msgstr "Traducir páxina" msgid "dlg.translate.unavail" msgstr "Servizo non dispoñible" @@ -1029,7 +1029,7 @@ msgid "lang.tok" msgstr "Toki Pona" msgid "heading.newident" -msgstr "NOVA IDENTIDADE" +msgstr "Nova Identidade" msgid "dlg.newident.until" msgstr "Válido ata:" @@ -1080,19 +1080,19 @@ msgid "dlg.newident.create" msgstr "Crear identidade" msgid "heading.newident.missing" -msgstr "INFO QUE FALTA" +msgstr "Info que falta" msgid "heading.newident.date.bad" -msgstr "DATA NON VÁLIDA" +msgstr "Data non válida" msgid "dlg.newident.date.past" msgstr "A data de caducidade ten que estar no futuro." msgid "heading.feedcfg" -msgstr "AXUSTES DA FONTE" +msgstr "Axustes da Fonte" msgid "heading.subscribe" -msgstr "SUBSCRIBIRSE A PÁXINA" +msgstr "Subscribirse á Páxina" msgid "dlg.feed.title" msgstr "Título:" @@ -1113,10 +1113,10 @@ msgid "dlg.feed.sub" msgstr "Subscribirse" msgid "heading.bookmark.add" -msgstr "ENGADIR MARCADOR" +msgstr "Engadir Marcador" msgid "heading.bookmark.edit" -msgstr "EDITAR MARCADOR" +msgstr "Editar Marcador" msgid "dlg.bookmark.save" msgstr "Gardar marcador" @@ -1134,10 +1134,10 @@ msgid "dlg.bookmark.icon" msgstr "Icona:" msgid "heading.prefs" -msgstr "PREFERENCIAS" +msgstr "Preferencias" msgid "heading.prefs.certs" -msgstr "CERTIFICADOS" +msgstr "Certificados" # tab button msgid "heading.prefs.colors" @@ -1163,16 +1163,16 @@ msgid "heading.prefs.network" msgstr "Rede" msgid "heading.prefs.paragraph" -msgstr "PARÁGRAFO" +msgstr "Parágrafo" msgid "heading.prefs.uitheme" -msgstr "CORES DA IU" +msgstr "Cores da IU" msgid "heading.prefs.proxies" -msgstr "PROXIES" +msgstr "Proxies" msgid "heading.prefs.scrolling" -msgstr "DESPRAZAMENTO" +msgstr "Desprazamento" # tab button msgid "heading.prefs.style" @@ -1480,7 +1480,7 @@ msgid "keys.tab.close.other" msgstr "Pechar outras lapelas" msgid "keys.upload" -msgstr "Subir páxina con Titan" +msgstr "Subir con Titan" msgid "error.badstatus.msg" msgstr "" @@ -1825,7 +1825,7 @@ msgid "menu.undo" msgstr "Desfacer" msgid "heading.confirm.bookmarks.delete" -msgstr "ELIMINAR MARCADORES" +msgstr "Eliminar marcadores" #, c-format msgid "dlg.confirm.bookmarks.delete" @@ -1840,7 +1840,7 @@ msgid "dlg.upload.id.none" msgstr "Ningunha" msgid "heading.bookmark.tags" -msgstr "ETIQUETAS ESPECIAIS" +msgstr "Etiquetas especiais" msgid "dlg.addfolder.defaulttitle" msgstr "Novo cartafol" @@ -1890,7 +1890,7 @@ msgid "dlg.upload.pickfile" msgstr "Elexir ficheiro" msgid "heading.addfolder" -msgstr "ENGADIR CARTAFOL" +msgstr "Engadir Cartafol" msgid "dlg.addfolder.prompt" msgstr "Escribe o nome do novo cartafol:" @@ -1900,7 +1900,7 @@ msgstr "Engadir cartafol" # used on mobile msgid "heading.settings" -msgstr "AXUSTES" +msgstr "Axustes" msgid "prefs.imagestyle" msgstr "Imaxes coloridas:" @@ -1946,7 +1946,7 @@ msgstr[0] "%u tipografía" msgstr[1] "%u tipografías" msgid "heading.fontpack.classic" -msgstr "DESCARGAR PAQUETE TIPOGRAFÍA" +msgstr "Descargar paquete de tipografía" msgid "dlg.fontpack.classic" msgstr "Descargar Paquete de tipografía (25 MB)" @@ -2084,7 +2084,7 @@ msgid "fontpack.delete" msgstr "Eliminar permanentemente \"%s\"" msgid "heading.fontpack.delete" -msgstr "ELIMINAR TIPOGRAFÍA" +msgstr "Eliminar tipografía" msgid "dlg.fontpack.delete" msgstr "Eliminar tipografía" @@ -2107,7 +2107,7 @@ msgid "truetype.help.installed" msgstr "Esta tipografía está instalada no directorio da usuaria." msgid "heading.dismiss.warning" -msgstr "DESBOTAR AVISO?" +msgstr "Desbotar aviso?" #, c-format msgid "dlg.dismiss.ansi" @@ -2145,3 +2145,91 @@ msgstr "Ler todo" msgid "menu.update" msgstr "Comprobar actualización…" + +msgid "menu.open.external" +msgstr "Abrir noutra app" + +# Active identity toolbar menu. +msgid "menu.hide.identities" +msgstr "Agochar identidades" + +msgid "menu.home" +msgstr "Ir a Inicio" + +msgid "menu.identities" +msgstr "Xestión Identidades" + +msgid "sidebar.close" +msgstr "Feito" + +msgid "sidebar.action.bookmarks.newfolder" +msgstr "Novo cartafol" + +msgid "sidebar.action.bookmarks.edit" +msgstr "Editar" + +msgid "sidebar.action.history.clear" +msgstr "Limpar" + +# The %s represents the name of an identity. +#, c-format +msgid "ident.switch" +msgstr "Usar %s" + +msgid "sidebar.empty.unread" +msgstr "Sen entradas non lidas" + +# Paste the line preceding the clicked link into the input prompt. +msgid "menu.input.precedingline" +msgstr "Pegar a liña anterior" + +# Shows where a local file is using the Finder. +msgid "menu.reveal.macos" +msgstr "Mostrar no buscador" + +msgid "menu.share" +msgstr "Compartir" + +msgid "menu.page.upload.edit" +msgstr "Editar páxina con Titan…" + +msgid "heading.upload.id" +msgstr "Autorización" + +msgid "menu.upload.export" +msgstr "Exportar texto" + +msgid "menu.upload.delete" +msgstr "Eliminar todo" + +msgid "menu.upload.delete.confirm" +msgstr "Quero Eliminar Todo (non ten volta)" + +# Mobile subheading in the Upload dialog. +msgid "upload.url" +msgstr "URL" + +# Mobile subheading: buttons for entering uploaded data. +msgid "upload.content" +msgstr "Contido" + +msgid "hint.upload.path" +msgstr "Ruta URL" + +msgid "hint.upload.token.long" +msgstr "token — mira instruccións no servidor" + +msgid "heading.prefs.toolbaractions" +msgstr "Accións da barra de ferramentas" + +msgid "prefs.toolbaraction1" +msgstr "Botón 1" + +msgid "prefs.toolbaraction2" +msgstr "Botón 2" + +msgid "prefs.blink" +msgstr "Cursor intermitente:" + +msgid "keys.upload.edit" +msgstr "Editar páxina con Titan" -- cgit v1.2.3 From 24fed0953066821cfbe93f6497462401638350f0 Mon Sep 17 00:00:00 2001 From: Alyssa Liddell Date: Thu, 6 Jan 2022 11:10:14 +0000 Subject: Translated using Weblate (Ukrainian) Currently translated at 100.0% (644 of 644 strings) Translation: Lagrange/User Interface Translate-URL: http://weblate.skyjake.fi/projects/lagrange/ui/uk/ --- po/uk.po | 186 ++++++++++++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 137 insertions(+), 49 deletions(-) (limited to 'po') diff --git a/po/uk.po b/po/uk.po index d064f795..9b675221 100644 --- a/po/uk.po +++ b/po/uk.po @@ -1,7 +1,7 @@ msgid "" msgstr "" "Report-Msgid-Bugs-To: jaakko.keranen@iki.fi\n" -"PO-Revision-Date: 2021-12-23 11:10+0000\n" +"PO-Revision-Date: 2022-01-08 14:50+0000\n" "Last-Translator: Alyssa Liddell \n" "Language-Team: Ukrainian " "\n" @@ -524,13 +524,13 @@ msgid "pageinfo.domain.match" msgstr "Доменне ім'я збігається" msgid "heading.save" -msgstr "ФАЙЛ ЗБЕРЕЖЕНО" +msgstr "Файл Збережено" msgid "heading.save.incomplete" -msgstr "СТОРІНКА НЕПОВНА" +msgstr "Сторінка неповна" msgid "dlg.save.incomplete" -msgstr "ЗАВАНТАЖЕННЯ ЇЇ ВМІСТУ ПРОДОВЖУЄТЬСЯ." +msgstr "Завантаження її вмісту ще триває." #, c-format msgid "dlg.import.found" @@ -556,7 +556,7 @@ msgid "link.browser" msgstr "Відкрити посилання у основному переглядачі" msgid "heading.file.delete" -msgstr "ВИДАЛИТИ ФАЙЛ" +msgstr "Видалити файл" msgid "dlg.file.delete.confirm" msgstr "Справді бажаєте видалити цей файл?" @@ -631,13 +631,13 @@ msgid "history.clear" msgstr "Очистити історію…" msgid "heading.history.clear" -msgstr "ЧИЩЕННЯ ІСТОРІЇ" +msgstr "Чищення історії" msgid "dlg.history.clear" msgstr "Очистити історію" msgid "heading.confirm.bookmarks.delete" -msgstr "ВИДАЛИТИ ЗАКЛАДКИ" +msgstr "Видалення закладок" #, c-format msgid "dlg.bookmarks.delete" @@ -688,10 +688,10 @@ msgid "ident.export" msgstr "Експортувати" msgid "heading.ident.use" -msgstr "ВИКОРИСТАННЯ ІДЕНТИЧНОСТІ" +msgstr "Використання ідентичності" msgid "heading.ident.notes" -msgstr "ПРИМІТКИ ІДЕНТИЧНОСТІ" +msgstr "Примітки про ідентичність" # %s refers to name of an identity. #, c-format @@ -711,7 +711,7 @@ msgid "error.server.msg" msgstr "Сервер повернув таке повідомлення:" msgid "heading.pageinfo" -msgstr "ІНФОРМАЦІЯ ПРО СТОРІНКУ" +msgstr "Інформація Про Сторінку" msgid "pageinfo.cert.ca.verified" msgstr "Підтверджено ЦС" @@ -754,16 +754,16 @@ msgid "dlg.save.opendownload" msgstr "Відкрити завантажений файл" msgid "heading.save.error" -msgstr "ПОМИЛКА ЗБЕРЕЖЕННЯ ФАЙЛУ" +msgstr "Помилка збереження файлу" msgid "heading.import.bookmarks" -msgstr "ІМПОРТ ЗАКЛАДОК" +msgstr "Імпорт закладок" msgid "dlg.import.notnew" msgstr "Усі посилання на сторінці вже додані до закладок." msgid "heading.autoreload" -msgstr "АВТООНОВЛЕННЯ" +msgstr "Автооновлення" msgid "reload.never" msgstr "Ніколи" @@ -813,7 +813,7 @@ msgid "dlg.file.delete" msgstr "Видалити" msgid "heading.openlink" -msgstr "ВІДКРИТИ ПОСИЛАННЯ" +msgstr "Відкрити посилання" #, c-format msgid "dlg.openlink.confirm" @@ -839,16 +839,16 @@ msgid "dlg.certwarn.domain.expired" msgstr "Отриманий сертифікат протермінований ТА належить іншому домену." msgid "heading.certimport" -msgstr "ІМПОРТ ІДЕНТИЧНОСТІ" +msgstr "Імпорт Ідентичності" msgid "dlg.certimport.notfound" msgstr "Не вдалося знайти сертифікат або закритий ключ." msgid "heading.certimport.pasted" -msgstr "ВСТАВЛЕНО З БУФЕРА ОБМІНУ" +msgstr "Вставлено з буфера обміну" msgid "heading.certimport.dropped" -msgstr "ПЕРЕТЯГНУТО ФАЙЛ" +msgstr "Перетягнуто файл" # button in the mobile New Identity dialog msgid "dlg.certimport.pickfile" @@ -870,10 +870,10 @@ msgid "dlg.certimport.nokey" msgstr "Закритий ключ відсутній" msgid "link.hint.audio" -msgstr "Відтворити аудіо" +msgstr "Аудіозапис" msgid "link.hint.image" -msgstr "Показати зображення" +msgstr "Зображення" msgid "bookmark.title.blank" msgstr "Порожня сторінка" @@ -926,7 +926,7 @@ msgid "ident.delete" msgstr "Видалити ідентичність…" msgid "heading.ident.delete" -msgstr "ВИДАЛЕННЯ ІДЕНТИЧНОСТІ" +msgstr "Видалення ідентичності" #, c-format msgid "dlg.confirm.ident.delete" @@ -942,7 +942,7 @@ msgstr "" "сертифікати." msgid "heading.unsub" -msgstr "ВІДПИСКА" +msgstr "Відписка" #, c-format msgid "dlg.confirm.unsub" @@ -997,7 +997,7 @@ msgid "heading.lookup.other" msgstr "ІНШІ" msgid "heading.upload" -msgstr "ПЕРЕДАЧА ЗА ДОПОМОГОЮ TITAN" +msgstr "Передача за допомогою Titan" msgid "upload.id" msgstr "Ідентичність:" @@ -1026,7 +1026,7 @@ msgid "heading.lookup.pagecontent" msgstr "ВМІСТ СТОРІНКИ" msgid "menu.page.upload" -msgstr "Передати сторінку з Titan…" +msgstr "Передати за допомогою Titan…" msgid "hint.upload.text" msgstr "Введіть текст для передачі" @@ -1050,7 +1050,7 @@ msgid "upload.port" msgstr "Порт…" msgid "heading.uploadport" -msgstr "ПОРТ ПЕРЕДАЧІ TITAN" +msgstr "Порт передачі Titan" msgid "dlg.uploadport.set" msgstr "Вказати порт" @@ -1060,7 +1060,7 @@ msgid "dlg.upload.pickfile" msgstr "Вибрати файл" msgid "heading.translate" -msgstr "ПЕРЕКЛАД СТОРІНКИ" +msgstr "Переклад сторінки" msgid "heading.upload.file" msgstr "Файл" @@ -1172,7 +1172,7 @@ msgid "lang.tok" msgstr "Токі-пона" msgid "heading.newident" -msgstr "НОВА ІДЕНТИЧНІСТЬ" +msgstr "Нова ідентичність" msgid "dlg.newident.rsa.selfsign" msgstr "Створення самопідписаного 2048-розрядного RSA сертифікату." @@ -1223,7 +1223,7 @@ msgid "dlg.newident.more" msgstr "Ще…" msgid "heading.newident.missing" -msgstr "ВІДСУТНЯ ІНФОРМАЦІЯ" +msgstr "Відсутня інформація" msgid "dlg.newindent.missing.commonname" msgstr "Потрібно вказати звичайне ім'я." @@ -1236,10 +1236,10 @@ msgstr "" "• 2021-12-31 23:59:59" msgid "heading.feedcfg" -msgstr "НАЛАШТУВАННЯ СТРІЧКИ" +msgstr "Налаштування стічки" msgid "heading.subscribe" -msgstr "ПІДПИСКА НА СТОРІНКУ" +msgstr "Підписка на сторінку" msgid "dlg.feed.title" msgstr "Заголовок:" @@ -1254,7 +1254,7 @@ msgid "dlg.feed.sub" msgstr "Підписатися" msgid "heading.bookmark.add" -msgstr "ДОДАТИ ЗАКЛАДКУ" +msgstr "Додати закладку" msgid "dlg.bookmark.save" msgstr "Збереги закладку" @@ -1269,7 +1269,7 @@ msgid "dlg.newident.create" msgstr "Створити ідентичність" msgid "heading.newident.date.bad" -msgstr "НЕДІЙСНА ДАТА" +msgstr "Недійсна дата" msgid "dlg.newident.date.past" msgstr "Термін дії має закінчуватися у майбутньому." @@ -1281,7 +1281,7 @@ msgid "dlg.feed.type.headings" msgstr "Нові заголовки" msgid "heading.bookmark.edit" -msgstr "РЕДАГУВАННЯ ЗАКЛАДКИ" +msgstr "Редагування закладки" msgid "dlg.bookmark.url" msgstr "URL:" @@ -1293,10 +1293,10 @@ msgid "dlg.bookmark.icon" msgstr "Значок:" msgid "heading.bookmark.tags" -msgstr "ОСОБЛИВІ МІТКИ" +msgstr "Особливі мітки" msgid "heading.addfolder" -msgstr "ДОДАТИ ТЕКУ" +msgstr "Додати теку" msgid "dlg.addfolder.defaulttitle" msgstr "Нова тека" @@ -1305,7 +1305,7 @@ msgid "dlg.addfolder.prompt" msgstr "Назва створюваної теки:" msgid "heading.prefs.certs" -msgstr "СЕРТИФІКАТИ" +msgstr "Сертифікати" # tab button msgid "heading.prefs.colors" @@ -1318,11 +1318,11 @@ msgid "dlg.addfolder" msgstr "Додати теку" msgid "heading.prefs" -msgstr "НАЛАШТУВАННЯ" +msgstr "Налаштування" # used on mobile msgid "heading.settings" -msgstr "НАЛАШТУВАННЯ" +msgstr "Налаштування" # tab button msgid "heading.prefs.general" @@ -1341,22 +1341,22 @@ msgid "heading.prefs.network" msgstr "Мережа" msgid "heading.prefs.paragraph" -msgstr "АБЗАЦ" +msgstr "Абзац" msgid "heading.prefs.uitheme" -msgstr "КОЛЬОРИ ІК" +msgstr "Кольори ІК" msgid "heading.prefs.pagecontent" -msgstr "КОЛЬОРИ СТОРІНКИ" +msgstr "Кольори сторінки" msgid "heading.prefs.proxies" -msgstr "ПРОКСІ" +msgstr "Проксі" msgid "heading.prefs.scrolling" -msgstr "ПРОКРУЧУВАННЯ" +msgstr "Прокручування" msgid "heading.prefs.sizing" -msgstr "РОЗМІРИ" +msgstr "Розміри" # tab button msgid "heading.prefs.style" @@ -1373,7 +1373,7 @@ msgid "prefs.hoverlink" msgstr "Показувати URL при наведенні:" msgid "heading.prefs.widelayout" -msgstr "ШИРОКИЙ МАКЕТ" +msgstr "Широкий макет" msgid "prefs.searchurl" msgstr "URL пошуку:" @@ -1807,7 +1807,7 @@ msgid "keys.split.item" msgstr "Меню розділеного перегляду:" msgid "keys.upload" -msgstr "Передати сторінку з Titan" +msgstr "Передати за допомогою Titan" msgid "error.badstatus" msgstr "Невідомий код стану" @@ -2016,7 +2016,7 @@ msgid "prefs.bookmarks.addbottom" msgstr "Додати закладки у кінець списку:" msgid "prefs.font.ui" -msgstr "ІК:" +msgstr "Інтерфейс Користувача:" msgid "prefs.font.heading" msgstr "Заголовки:" @@ -2103,7 +2103,7 @@ msgid "fontpack.delete" msgstr "Назавжди видалити \"%s\"" msgid "heading.fontpack.delete" -msgstr "ВИДАЛЕННЯ ПАКЕТУ ШРИФТІВ" +msgstr "Видалення пакету шрифтів" msgid "dlg.fontpack.delete" msgstr "Видалити пакет шрифту" @@ -2129,13 +2129,13 @@ msgid "dlg.dismiss.warning" msgstr "Усунути попередження" msgid "heading.dismiss.warning" -msgstr "УСУНУТИ ПОПЕРЕДЖЕННЯ?" +msgstr "Усунути попередження?" msgid "dlg.fontpack.classic" msgstr "Завантажити пакет шрифтів (25 МБ)" msgid "heading.fontpack.classic" -msgstr "ЗАВАНТАЖИТИ ПАКЕТ ШРИФТІВ" +msgstr "Завантажити пакет шрифтів" msgid "dlg.fontpack.classic.msg" msgstr "" @@ -2170,3 +2170,91 @@ msgstr "24-годинний час" # This label should be fairly short so it fits in a button in the sidebar. msgid "sidebar.action.feeds.markallread" msgstr "Прочитати всі" + +msgid "heading.prefs.toolbaractions" +msgstr "Панель інструментів" + +msgid "prefs.toolbaraction1" +msgstr "Кнопка 1" + +msgid "prefs.toolbaraction2" +msgstr "Кнопка 2" + +msgid "prefs.blink" +msgstr "Моргання курсору:" + +msgid "keys.upload.edit" +msgstr "Редагувати сторінку за дпомогою Titan" + +msgid "menu.open.external" +msgstr "Відкрити в іншому додатку" + +msgid "sidebar.action.history.clear" +msgstr "Очистити" + +# Active identity toolbar menu. +msgid "menu.hide.identities" +msgstr "Приховати панель ідентичностей" + +msgid "menu.home" +msgstr "Додому" + +msgid "menu.identities" +msgstr "Керувати ідентичностями" + +msgid "sidebar.close" +msgstr "Готово" + +msgid "sidebar.action.bookmarks.newfolder" +msgstr "Нова тека" + +msgid "sidebar.action.bookmarks.edit" +msgstr "Редагувати" + +# The %s represents the name of an identity. +#, c-format +msgid "ident.switch" +msgstr "Використовувати %s" + +msgid "sidebar.empty.unread" +msgstr "Непрочитані дописи відсутні" + +# Paste the line preceding the clicked link into the input prompt. +msgid "menu.input.precedingline" +msgstr "Вставити попередній рядок" + +# Shows where a local file is using the Finder. +msgid "menu.reveal.macos" +msgstr "Показати в Finder" + +msgid "menu.share" +msgstr "Поділитися" + +msgid "menu.page.upload.edit" +msgstr "Редагувати сторінку за допомогою Titan…" + +msgid "heading.upload.id" +msgstr "Авторизація" + +msgid "menu.upload.export" +msgstr "Експортувати текст" + +msgid "menu.upload.delete" +msgstr "Видалити все" + +msgid "menu.upload.delete.confirm" +msgstr "Справді видалити все (незворотньо)" + +# Mobile subheading in the Upload dialog. +msgid "upload.url" +msgstr "URL" + +# Mobile subheading: buttons for entering uploaded data. +msgid "upload.content" +msgstr "Вміст" + +msgid "hint.upload.path" +msgstr "Шлях URL" + +msgid "hint.upload.token.long" +msgstr "токен — див. вказівки сервера" -- cgit v1.2.3 From 801a982fc2aaeb63a9da5d780d93260354058e6f Mon Sep 17 00:00:00 2001 From: Emir SARI Date: Fri, 7 Jan 2022 07:20:42 +0000 Subject: Translated using Weblate (Turkish) Currently translated at 100.0% (644 of 644 strings) Translation: Lagrange/User Interface Translate-URL: http://weblate.skyjake.fi/projects/lagrange/ui/tr/ --- po/tr.po | 188 ++++++++++++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 138 insertions(+), 50 deletions(-) (limited to 'po') diff --git a/po/tr.po b/po/tr.po index f317eb7d..5cff07d1 100644 --- a/po/tr.po +++ b/po/tr.po @@ -1,8 +1,8 @@ msgid "" msgstr "" "Report-Msgid-Bugs-To: jaakko.keranen@iki.fi\n" -"PO-Revision-Date: 2021-12-27 13:50+0000\n" -"Last-Translator: Emir \n" +"PO-Revision-Date: 2022-01-08 14:50+0000\n" +"Last-Translator: Emir SARI \n" "Language-Team: Turkish \n" "Language: tr\n" "MIME-Version: 1.0\n" @@ -13,7 +13,7 @@ msgstr "" # Link download progress message. msgid "doc.fetching" -msgstr "Getiriliyor" +msgstr "Yükleniyor" msgid "doc.archive.view" msgstr "Arşiv içeriğini görüntüle" @@ -392,7 +392,7 @@ msgid "history.clear" msgstr "Geçmişi temizle…" msgid "heading.history.clear" -msgstr "GEÇMİŞİ TEMİZLE" +msgstr "Geçmişi temizle" msgid "dlg.history.clear" msgstr "Geçmişi temizle" @@ -425,7 +425,7 @@ msgid "bookmarks.reload" msgstr "Uzak konum kaynaklarını yenile" msgid "ident.using" -msgstr "Bu sayfada kullanılıyor" +msgstr "Bu sayfada kullan" msgid "ident.notused" msgstr "Kullanılmıyor" @@ -454,13 +454,13 @@ msgid "ident.export" msgstr "Dışa aktar" msgid "heading.ident.use" -msgstr "KİMLİK KULLANIMI" +msgstr "Kimlik kullanımı" msgid "menu.edit.notes" msgstr "Notları düzenle…" msgid "heading.ident.notes" -msgstr "KİMLİK NOTLARI" +msgstr "Kimlik notlar" msgid "ident.fingerprint" msgstr "Parmak izini kopyala" @@ -469,7 +469,7 @@ msgid "ident.delete" msgstr "Kimliği sil…" msgid "heading.ident.delete" -msgstr "KİMLİĞİ SİL" +msgstr "Kimliği sil" #, c-format msgid "dlg.confirm.ident.delete" @@ -484,7 +484,7 @@ msgid "sidebar.empty.idents" msgstr "Kimlik yok" msgid "heading.unsub" -msgstr "ABONELİKTEN ÇIK" +msgstr "Abonelikten çık" #, c-format msgid "dlg.confirm.unsub" @@ -494,7 +494,7 @@ msgid "dlg.unsub" msgstr "Abonelikten çık" msgid "heading.pageinfo" -msgstr "SAYFA BİLGİSİ" +msgstr "Sayfa bilgisi" msgid "pageinfo.header.cached" msgstr "(önbelleklenmiş içerik)" @@ -534,7 +534,7 @@ msgid "dlg.input.linebreak" msgstr "Satır sonu" msgid "heading.save" -msgstr "DOSYA KAYDEDİLDİ" +msgstr "Dosya kaydedildi" msgid "dlg.save.incomplete" msgstr "Sayfa içeriği hâlâ indiriliyor." @@ -546,7 +546,7 @@ msgid "dlg.save.opendownload" msgstr "İndirilen dosyayı aç" msgid "heading.import.bookmarks" -msgstr "YER İMLERİNİ İÇE AKTAR" +msgstr "Yer imlerini içe aktar" #, c-format msgid "dlg.import.add" @@ -555,7 +555,7 @@ msgstr[0] "%sYer imi ekle" msgstr[1] "%s%d yer imi ekle" msgid "heading.autoreload" -msgstr "OTOMATİK YENİDEN YÜKLEME" +msgstr "Otomatik yeniden yükleme" msgid "reload.never" msgstr "Hiçbir zaman" @@ -597,10 +597,10 @@ msgid "dlg.file.delete" msgstr "Sil" msgid "heading.openlink" -msgstr "BAĞLANTI AÇ" +msgstr "Bağlantı aç" msgid "heading.file.delete" -msgstr "DOSYA SİL" +msgstr "Dosyayı sil" #, c-format msgid "dlg.openlink.confirm" @@ -623,7 +623,7 @@ msgstr "" "sorunu olabilir." msgid "heading.certimport" -msgstr "KİMLİK İÇE AKTAR" +msgstr "Kimlik içe aktar" msgid "dlg.certimport.notfound" msgstr "Bir sertifika veya gizli anahtar bulunamadı." @@ -632,10 +632,10 @@ msgid "dlg.certimport.notfound.page" msgstr "Geçerli sayfada bir sertifika/anahtar bulunamadı." msgid "heading.certimport.pasted" -msgstr "PANODAN YAPIŞTIRILMIŞ" +msgstr "Panodan yapıştırılmış" msgid "heading.certimport.dropped" -msgstr "BIRAKILAN DOSYA" +msgstr "Bırakılan dosya" msgid "dlg.certimport.import" msgstr "İçe aktar" @@ -650,10 +650,10 @@ msgid "dlg.certimport.nokey" msgstr "Gizli anahtar yok" msgid "link.hint.audio" -msgstr "Ses çal" +msgstr "Ses" msgid "link.hint.image" -msgstr "Görsel görüntüle" +msgstr "Görsel" msgid "bookmark.title.blank" msgstr "Boş sayfa" @@ -701,7 +701,7 @@ msgid "heading.lookup.other" msgstr "DİĞER" msgid "heading.upload" -msgstr "TITAN İLE GÖNDER" +msgstr "Titan ile gönder" msgid "upload.id" msgstr "Kimlik:" @@ -737,7 +737,7 @@ msgid "upload.port" msgstr "Kapı…" msgid "heading.uploadport" -msgstr "TITAN GÖNDERME KAPISI" +msgstr "Titan gönderim kapısı" msgid "dlg.uploadport.set" msgstr "Kapı ayarla" @@ -755,7 +755,7 @@ msgid "dlg.upload.pickfile" msgstr "Dosya seç" msgid "heading.translate" -msgstr "SAYFAYI ÇEVİR" +msgstr "Sayfayı çevir" msgid "dlg.translate.fail" msgstr "İstek başarısız oldu" @@ -798,7 +798,7 @@ msgid "lang.ru" msgstr "Rusça" msgid "heading.newident" -msgstr "YENİ KİMLİK" +msgstr "Yeni kimlik" msgid "dlg.newident.until" msgstr "Şu tarihe kadar geçerli:" @@ -837,19 +837,19 @@ msgid "dlg.newident.more" msgstr "Daha fazla…" msgid "heading.newident.missing" -msgstr "EKSİK BİLGİ" +msgstr "Bilgi eksik" msgid "dlg.newindent.missing.commonname" msgstr "Bir \"Ortak ad\" belirtilmelidir." msgid "heading.newident.date.bad" -msgstr "GEÇERSİZ TARİH" +msgstr "Geçersiz tarih" msgid "heading.feedcfg" -msgstr "BESLEME AYARLARI" +msgstr "Besleme ayarları" msgid "heading.subscribe" -msgstr "SAYFAYA ABONE OL" +msgstr "Sayfaya abone ol" msgid "dlg.feed.title" msgstr "Başlık:" @@ -870,10 +870,10 @@ msgid "dlg.feed.sub" msgstr "Abone ol" msgid "heading.bookmark.add" -msgstr "YER İMİ EKLE" +msgstr "Yer imi ekle" msgid "heading.bookmark.edit" -msgstr "YER İMİNİ DÜZENLE" +msgstr "Yer imini düzenle" msgid "dlg.bookmark.title" msgstr "Başlık:" @@ -888,10 +888,10 @@ msgid "dlg.bookmark.icon" msgstr "Simge:" msgid "heading.bookmark.tags" -msgstr "ÖZEL ETİKETLER" +msgstr "Özel etiketler" msgid "heading.addfolder" -msgstr "KLASÖR EKLE" +msgstr "Klasör ekle" msgid "dlg.addfolder.prompt" msgstr "Yeni klasörün adını girin:" @@ -900,14 +900,14 @@ msgid "dlg.addfolder" msgstr "Klasör ekle" msgid "heading.prefs" -msgstr "TERCİHLER" +msgstr "Tercihler" # used on mobile msgid "heading.settings" -msgstr "AYARLAR" +msgstr "Ayarlar" msgid "heading.prefs.certs" -msgstr "SERTİFİKALAR" +msgstr "Sertifikalar" msgid "heading.prefs.fonts" msgstr "Yazıtipleri" @@ -929,19 +929,19 @@ msgid "heading.prefs.network" msgstr "Ağ" msgid "heading.prefs.paragraph" -msgstr "PARAGRAF" +msgstr "Paragraf" msgid "heading.prefs.pagecontent" -msgstr "SAYFA RENKLERİ" +msgstr "Sayfa renkleri" msgid "heading.prefs.proxies" -msgstr "VEKİLLER" +msgstr "Vekiller" msgid "heading.prefs.scrolling" -msgstr "KAYDIRMA" +msgstr "Kaydırma" msgid "heading.prefs.sizing" -msgstr "BOYUTLANDIRMA" +msgstr "Boyutlandırma" # tab button msgid "heading.prefs.style" @@ -1193,7 +1193,7 @@ msgid "keys.split.next" msgstr "Odağı bir sonraki bölüntüye taşı" msgid "keys.upload" -msgstr "Sayfayı Titan ile gönder" +msgstr "Titan ile gönder" msgid "error.openfile.msg" msgstr "" @@ -1412,7 +1412,7 @@ msgid "fontpack.delete" msgstr "\"%s\" ögesini kalıcı olarak sil" msgid "heading.fontpack.delete" -msgstr "YAZITİPİ PAKETİNİ SİL" +msgstr "Yazıtipi paketini sil" msgid "dlg.fontpack.delete" msgstr "Yazıtipi paketini sil" @@ -1435,7 +1435,7 @@ msgid "truetype.help.installed" msgstr "Bu yazıtipi, kullanıcı yazıtipleri dizinine yüklenmiş." msgid "heading.dismiss.warning" -msgstr "UYARIYI ATLA?" +msgstr "Uyarı atlansın mı?" #, c-format msgid "dlg.dismiss.ansi" @@ -1445,7 +1445,7 @@ msgid "dlg.dismiss.warning" msgstr "Uyarıyı atla" msgid "heading.fontpack.classic" -msgstr "YAZITİPİ PAKETİNİ İNDİR" +msgstr "Yazıtipi paketini indir" msgid "dlg.fontpack.classic" msgstr "Yazıtipi paketini indir (25 MB)" @@ -1621,7 +1621,7 @@ msgstr "" "Tüm ziyaret edilen sayfalar geçmişini temizlemek istediğinizden emin misiniz?" msgid "heading.confirm.bookmarks.delete" -msgstr "YER İMLERİNİ SİL" +msgstr "Yer imlerini sil" #, c-format msgid "dlg.confirm.bookmarks.delete" @@ -1669,10 +1669,10 @@ msgid "dlg.input.send" msgstr "Gönder" msgid "heading.save.incomplete" -msgstr "SAYFA TAM DEĞİL" +msgstr "Sayfa tam değil" msgid "heading.save.error" -msgstr "DOSYA KAYDEDİLİRKEN HATA" +msgstr "Dosya kaydedilirken hata" #, c-format msgid "dlg.import.found" @@ -1760,7 +1760,7 @@ msgid "heading.lookup.pagecontent" msgstr "SAYFA İÇERİĞİ" msgid "menu.page.upload" -msgstr "Sayfayı Titan ile gönder…" +msgstr "Titan ile gönder…" msgid "hint.upload.text" msgstr "gönderilecek metni girin" @@ -1837,10 +1837,10 @@ msgid "heading.prefs.colors" msgstr "Renkler" msgid "heading.prefs.uitheme" -msgstr "KULLANICI ARABİRİMİ RENKLERİ" +msgstr "Arabirim renkleri" msgid "heading.prefs.widelayout" -msgstr "GENİŞ DİZİLİM" +msgstr "Geniş dizilim" msgid "prefs.collapsepreonload" msgstr "Önceden biçimlendirilenleri daralt:" @@ -2094,3 +2094,91 @@ msgstr "24 saat biçimi" # This label should be fairly short so it fits in a button in the sidebar. msgid "sidebar.action.feeds.markallread" msgstr "Tümünü oku" + +msgid "menu.home" +msgstr "Ana sayfaya git" + +msgid "menu.identities" +msgstr "Kimlikleri yönet" + +msgid "prefs.toolbaraction1" +msgstr "Düğme 1" + +msgid "prefs.toolbaraction2" +msgstr "Düğme 2" + +msgid "prefs.blink" +msgstr "Yanıp sönen imleç:" + +msgid "sidebar.close" +msgstr "Tamam" + +# The %s represents the name of an identity. +#, c-format +msgid "ident.switch" +msgstr "%s kullan" + +msgid "menu.upload.delete.confirm" +msgstr "Tümünü gerçekten sil (geri alınamaz)" + +msgid "keys.upload.edit" +msgstr "Sayfayı Titan ile düzenle" + +msgid "menu.open.external" +msgstr "Başka bir uygulamada aç" + +# Active identity toolbar menu. +msgid "menu.hide.identities" +msgstr "Kimlikleri gizle" + +msgid "sidebar.action.bookmarks.newfolder" +msgstr "Yeni klasör" + +msgid "sidebar.action.bookmarks.edit" +msgstr "Düzenle" + +msgid "sidebar.action.history.clear" +msgstr "Temizle" + +msgid "sidebar.empty.unread" +msgstr "Okunmamış girdi yok" + +# Paste the line preceding the clicked link into the input prompt. +msgid "menu.input.precedingline" +msgstr "Önceki satırı yapıştır" + +# Shows where a local file is using the Finder. +msgid "menu.reveal.macos" +msgstr "Finder'da göster" + +msgid "menu.share" +msgstr "Paylaş" + +msgid "menu.page.upload.edit" +msgstr "Sayfayı Titan ile düzenle…" + +msgid "heading.upload.id" +msgstr "Kimlik doğrulama" + +msgid "menu.upload.export" +msgstr "Metni dışa aktar" + +msgid "menu.upload.delete" +msgstr "Tümünü sil" + +# Mobile subheading in the Upload dialog. +msgid "upload.url" +msgstr "URL" + +# Mobile subheading: buttons for entering uploaded data. +msgid "upload.content" +msgstr "İçerik" + +msgid "hint.upload.path" +msgstr "URL yolu" + +msgid "hint.upload.token.long" +msgstr "jeton — sunucunun yönergelerine bakın" + +msgid "heading.prefs.toolbaractions" +msgstr "Araç çubuğu eylemleri" -- cgit v1.2.3 From 31602c0f1bca4fd66d792662e1652c588bba8d9e Mon Sep 17 00:00:00 2001 From: Wally Hackenslacker Date: Mon, 10 Jan 2022 02:36:27 +0000 Subject: Translated using Weblate (Spanish) Currently translated at 100.0% (644 of 644 strings) Translation: Lagrange/User Interface Translate-URL: http://weblate.skyjake.fi/projects/lagrange/ui/es/ --- po/es.po | 184 ++++++++++++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 136 insertions(+), 48 deletions(-) (limited to 'po') diff --git a/po/es.po b/po/es.po index d790bf2c..bf2c84de 100644 --- a/po/es.po +++ b/po/es.po @@ -1,7 +1,7 @@ msgid "" msgstr "" "Report-Msgid-Bugs-To: jaakko.keranen@iki.fi\n" -"PO-Revision-Date: 2021-12-07 04:50+0000\n" +"PO-Revision-Date: 2022-01-11 02:50+0000\n" "Last-Translator: Wally Hackenslacker \n" "Language-Team: Spanish \n" "Language: es\n" @@ -18,13 +18,13 @@ msgid "dlg.newident.rsa.selfsign" msgstr "Creando un certificado RSA autofirmado de 2048 bits." msgid "heading.subscribe" -msgstr "SUSCRIBIR A PÁGINA" +msgstr "Suscribir a Página" msgid "dlg.bookmark.save" msgstr "Guardar Marcador" msgid "heading.prefs.sizing" -msgstr "TAMAÑOS" +msgstr "Tamaños" msgid "prefs.uiscale" msgstr "Factor de escalamiento de la Interfaz:" @@ -135,7 +135,7 @@ msgid "dlg.feed.title" msgstr "Título:" msgid "heading.bookmark.add" -msgstr "AGREGAR MARCADOR" +msgstr "Agregar Marcador" # tab button msgid "heading.prefs.colors" @@ -479,7 +479,7 @@ msgid "history.clear" msgstr "Limpiar Historial…" msgid "heading.history.clear" -msgstr "LIMPIAR HISTORIAL" +msgstr "Limpiar Historial" msgid "dlg.history.clear" msgstr "Limpiar Historial" @@ -535,7 +535,7 @@ msgid "menu.edit.notes" msgstr "Editar Notas…" msgid "heading.ident.notes" -msgstr "NOTAS SOBRE IDENTIDAD" +msgstr "Notas Sobre Identidades" msgid "ident.fingerprint" msgstr "Copiar Huella Digital" @@ -544,7 +544,7 @@ msgid "ident.delete" msgstr "Borrar Identidad…" msgid "heading.ident.delete" -msgstr "BORRAR IDENTIDAD" +msgstr "Borrar Identidad" msgid "dlg.ident.delete" msgstr "Borrar Identidad y Archivos" @@ -559,13 +559,13 @@ msgstr "" "Vea la %sAyuda%s para más información sobre los certificados TLS de cliente." msgid "heading.unsub" -msgstr "ELIMINAR SUSCRIPCIÓN" +msgstr "Eliminar Suscripción" msgid "dlg.unsub" msgstr "Eliminar suscripción" msgid "heading.pageinfo" -msgstr "INFORMACIÓN DE PÁGINA" +msgstr "Información de Página" msgid "pageinfo.header.cached" msgstr "(contenido en caché)" @@ -611,26 +611,26 @@ msgid "dlg.input.send" msgstr "Enviar" msgid "heading.save" -msgstr "ARCHIVO GUARDADO" +msgstr "Archivo Guardado" msgid "heading.save.incomplete" -msgstr "PÁGINA INCOMPLETA" +msgstr "Página Incompleta" msgid "dlg.save.size" msgstr "Tamaño:" msgid "heading.save.error" -msgstr "ERROR GUARDANDO ARCHIVO" +msgstr "Error Guardando Archivo" msgid "heading.import.bookmarks" -msgstr "IMPORTAR MARCADORES" +msgstr "Importar Marcadores" msgid "dlg.import.notnew" msgstr "" "Todos los enlaces de esta página ya se encuentran guardados en marcadores." msgid "heading.autoreload" -msgstr "AUTO-RECARGAR" +msgstr "Auto-Recargar" msgid "link.newtab" msgstr "Abrir Enlace en Nueva Pestaña" @@ -651,7 +651,7 @@ msgid "link.bookmark" msgstr "Guardar Enlace en Marcadores…" msgid "heading.openlink" -msgstr "ABRIR ENLACE" +msgstr "Abrir Enlace" #, c-format msgid "dlg.openlink.confirm" @@ -670,7 +670,7 @@ msgid "bookmark.title.blank" msgstr "Página en Blanco" msgid "heading.translate" -msgstr "TRADUCIR PÁGINA" +msgstr "Traducir Página" msgid "dlg.translate.unavail" msgstr "Servicio no Disponible" @@ -719,7 +719,7 @@ msgid "dlg.certwarn.domain.expired" msgstr "El certificado recibido ha expirado Y es para el dominio incorrecto." msgid "heading.certimport" -msgstr "IMPORTAR IDENTIDAD" +msgstr "Importar Identidad" msgid "dlg.certimport.help" msgstr "" @@ -733,10 +733,10 @@ msgid "dlg.certimport.notfound.page" msgstr "No se encontró un certificado/clave en la página actual." msgid "heading.certimport.pasted" -msgstr "PEGADO DESDE EL PORTAPAPELES" +msgstr "Pegado del Portapapeles" msgid "heading.certimport.dropped" -msgstr "ARCHIVO ARRASTRADO Y SOLTADO" +msgstr "Archivo Soltado" msgid "dlg.certimport.import" msgstr "Importar" @@ -754,7 +754,7 @@ msgid "dlg.certimport.nokey" msgstr "Sin Clave Privada" msgid "link.hint.image" -msgstr "Ver Imagen" +msgstr "Imagen" msgid "keys.subscribe" msgstr "Suscribirse a página" @@ -861,7 +861,7 @@ msgid "ident.temporary" msgstr "Temporal" msgid "heading.ident.use" -msgstr "USO DE IDENTIDADES" +msgstr "Uso de Identidades" # %s refers to name of an identity. #, c-format @@ -911,7 +911,7 @@ msgid "lang.ru" msgstr "Ruso" msgid "heading.newident" -msgstr "NUEVA IDENTIDAD" +msgstr "Nueva Identidad" msgid "dlg.newident.until" msgstr "Válido hasta:" @@ -944,7 +944,7 @@ msgid "dlg.newident.create" msgstr "Crear Identidad" msgid "heading.feedcfg" -msgstr "CONFIGURACIÓN DE SUSCRIPCIONES" +msgstr "Configuración de Suscripciones" msgid "dlg.feed.entrytype" msgstr "Tipo de entrada:" @@ -962,7 +962,7 @@ msgid "dlg.feed.sub" msgstr "Suscribir" msgid "heading.bookmark.edit" -msgstr "EDITAR MARCADOR" +msgstr "Editar Marcador" msgid "dlg.bookmark.title" msgstr "Título:" @@ -977,25 +977,25 @@ msgid "dlg.bookmark.icon" msgstr "Ícono:" msgid "heading.prefs" -msgstr "PREFERENCIAS" +msgstr "Preferencias" msgid "heading.prefs.certs" -msgstr "CERTIFICADOS" +msgstr "Certificados" msgid "heading.prefs.paragraph" -msgstr "PÁRRAFO" +msgstr "Párrafo" msgid "heading.prefs.pagecontent" -msgstr "COLORES DE LA PÁGINA" +msgstr "Colores de la Página" msgid "heading.prefs.proxies" -msgstr "PROXIES" +msgstr "Proxies" msgid "heading.prefs.scrolling" -msgstr "DESPLAZAMIENTO" +msgstr "Desplazamiento" msgid "heading.prefs.widelayout" -msgstr "DISPOSICIÓN AMPLIA" +msgstr "Disposición Amplia" msgid "prefs.smoothscroll" msgstr "Desplazamiento suave:" @@ -1313,7 +1313,7 @@ msgid "prefs.doctheme.name.highcontrast" msgstr "Alto Contraste" msgid "link.hint.audio" -msgstr "Reproducir Audio" +msgstr "Audio" #, c-format msgid "num.minutes" @@ -1358,7 +1358,7 @@ msgstr "En Tema Claro" # Link download progress message. msgid "doc.fetching" -msgstr "Recibiendo" +msgstr "Cargando" # Inline download status message. msgid "media.download.warnclose" @@ -1492,13 +1492,13 @@ msgid "lang.ia" msgstr "Interlingua" msgid "heading.newident.missing" -msgstr "INFORMACIÓN FALTANTE" +msgstr "Información Faltante" msgid "dlg.newindent.missing.commonname" msgstr "Debe especificar un \"nombre común\"." msgid "heading.newident.date.bad" -msgstr "FECHA NO VÁLIDA" +msgstr "Fecha no Válida" msgid "dlg.newident.date.past" msgstr "La fecha de vencimiento debe ser en el futuro." @@ -1661,7 +1661,7 @@ msgid "upload.port" msgstr "Puerto…" msgid "heading.uploadport" -msgstr "PUERTO DE CARGA POR TITAN" +msgstr "Puerto de Carga con Titan" msgid "dlg.uploadport.msg" msgstr "" @@ -1678,7 +1678,7 @@ msgid "prefs.linespacing" msgstr "Espaciado de linea:" msgid "keys.upload" -msgstr "Cargar página con Titan" +msgstr "Cargar con Titan" msgid "error.certexpired" msgstr "Certificado Expirado" @@ -1698,7 +1698,7 @@ msgid "link.file.delete" msgstr "Borrar Archivo" msgid "heading.file.delete" -msgstr "BORRAR ARCHIVO" +msgstr "Borrar Archivo" msgid "dlg.file.delete.confirm" msgstr "Está seguro de que quiere borrar este archivo?" @@ -1707,10 +1707,10 @@ msgid "dlg.file.delete" msgstr "Borrar" msgid "menu.page.upload" -msgstr "Cargar Página con Titan…" +msgstr "Cargar con Titan…" msgid "heading.upload" -msgstr "CARGAR PÁGINA CON TITAN" +msgstr "Cargar con Titan" msgid "heading.upload.text" msgstr "Texto" @@ -1770,7 +1770,7 @@ msgid "menu.openfile" msgstr "Abrir Archivo…" msgid "heading.prefs.uitheme" -msgstr "COLORES DE IU" +msgstr "Colores de la IU" msgid "media.untitled.image" msgstr "Imagen" @@ -1830,7 +1830,7 @@ msgid "menu.newfolder" msgstr "Nueva Carpeta…" msgid "heading.confirm.bookmarks.delete" -msgstr "BORRAR MARCADORES" +msgstr "Borrar Marcadores" #, c-format msgid "dlg.confirm.bookmarks.delete" @@ -1849,7 +1849,7 @@ msgid "dlg.upload.id.none" msgstr "Ninguno" msgid "heading.bookmark.tags" -msgstr "ETIQUETAS ESPECIALES" +msgstr "Etiquetas Especiales" msgid "dlg.addfolder.prompt" msgstr "Nombre de la nueva carpeta:" @@ -1898,7 +1898,7 @@ msgid "dlg.upload.pickfile" msgstr "Escoger Archivo" msgid "heading.addfolder" -msgstr "AGREGAR CARPETA" +msgstr "Agregar Carpeta" msgid "dlg.addfolder.defaulttitle" msgstr "Nueva Carpeta" @@ -1908,7 +1908,7 @@ msgstr "Agregar Carpeta" # used on mobile msgid "heading.settings" -msgstr "CONFIGURACIÓN" +msgstr "Configuración" msgid "prefs.imagestyle" msgstr "Colorear imágenes:" @@ -1966,7 +1966,7 @@ msgid "fontpack.export" msgstr "Ver plantilla fontpack.ini" msgid "heading.fontpack.classic" -msgstr "DESCARGAR PAQUETE DE FUENTES" +msgstr "Descargar Paquete de Fuentes" msgid "dlg.fontpack.classic.msg" msgstr "" @@ -2041,7 +2041,7 @@ msgid "truetype.help.installed" msgstr "Esta fuente está instalada en el directorio de fuentes del usuario." msgid "heading.dismiss.warning" -msgstr "DESCARTAR ADVERTENCIA?" +msgstr "¿Descartar Advertencia?" #, c-format msgid "dlg.dismiss.ansi" @@ -2125,7 +2125,7 @@ msgid "fontpack.delete" msgstr "Borrar \"%s\" permanentemente" msgid "heading.fontpack.delete" -msgstr "BORRAR PAQUETE DE FUENTES" +msgstr "Borrar Paquete de Fuentes" msgid "lang.uk" msgstr "Ucraniano" @@ -2155,3 +2155,91 @@ msgstr "Hora de 24 Horas" # This label should be fairly short so it fits in a button in the sidebar. msgid "sidebar.action.feeds.markallread" msgstr "Leer Todo" + +msgid "menu.open.external" +msgstr "Abrir en Otra App" + +# Active identity toolbar menu. +msgid "menu.hide.identities" +msgstr "Ocultar Identidades" + +msgid "menu.home" +msgstr "Ir a la Página Principal" + +msgid "menu.identities" +msgstr "Gestionar Identidades" + +msgid "sidebar.close" +msgstr "Listo" + +msgid "sidebar.action.bookmarks.newfolder" +msgstr "Nueva Carpeta" + +msgid "sidebar.action.bookmarks.edit" +msgstr "Editar" + +msgid "sidebar.action.history.clear" +msgstr "Limpiar" + +# The %s represents the name of an identity. +#, c-format +msgid "ident.switch" +msgstr "Usar %s" + +msgid "sidebar.empty.unread" +msgstr "Sin Entradas no Leídas" + +# Paste the line preceding the clicked link into the input prompt. +msgid "menu.input.precedingline" +msgstr "Pegar la Linea Precedente" + +# Shows where a local file is using the Finder. +msgid "menu.reveal.macos" +msgstr "Mostrar en el Finder" + +msgid "menu.share" +msgstr "Compartir" + +msgid "menu.page.upload.edit" +msgstr "Editar Página con Titan…" + +msgid "heading.upload.id" +msgstr "Autorización" + +msgid "menu.upload.export" +msgstr "Exportar Texto" + +msgid "menu.upload.delete" +msgstr "Borrar Todo" + +msgid "menu.upload.delete.confirm" +msgstr "De Verdad Borrar Todo (No se Puede Deshacer)" + +# Mobile subheading in the Upload dialog. +msgid "upload.url" +msgstr "URL" + +# Mobile subheading: buttons for entering uploaded data. +msgid "upload.content" +msgstr "Contenido" + +msgid "hint.upload.path" +msgstr "Ruta del URL" + +msgid "hint.upload.token.long" +msgstr "Token — ver instrucciones del servidor" + +msgid "heading.prefs.toolbaractions" +msgstr "Acciones de la Barra de Herramientas" + +msgid "prefs.toolbaraction1" +msgstr "Botón 1" + +msgid "prefs.toolbaraction2" +msgstr "Botón 2" + +msgid "prefs.blink" +msgstr "Cursor parpadeante:" + +msgid "keys.upload.edit" +msgstr "Editar Página con Titan" -- cgit v1.2.3 From 2c4faf01db772b642ccc068383df96ee5633321b Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Thu, 13 Jan 2022 14:10:58 +0200 Subject: Showing files using `dbus-send` under Freedesktop D-Bus command line tools can be called to make method calls to reveal a file's location in the file manager. --- po/en.po | 4 ++++ src/app.c | 40 ++++++++++++++++++++++++++++++++-------- src/ui/certlistwidget.c | 3 +++ src/ui/documentwidget.c | 8 ++++++++ src/ui/mediaui.c | 6 ++++++ 5 files changed, 53 insertions(+), 8 deletions(-) (limited to 'po') diff --git a/po/en.po b/po/en.po index 687c4321..36f5d0c3 100644 --- a/po/en.po +++ b/po/en.po @@ -861,6 +861,10 @@ msgstr "Download Linked File" msgid "menu.reveal.macos" msgstr "Show in Finder" +# Shows where a local file is using the File Manager. +msgid "menu.reveal.filemgr" +msgstr "Show in File Manager" + msgid "menu.share" msgstr "Share" diff --git a/src/app.c b/src/app.c index 0a17a665..65f6fde6 100644 --- a/src/app.c +++ b/src/app.c @@ -3404,28 +3404,52 @@ void openInDefaultBrowser_App(const iString *url) { "xdg-open", cstr_String(url), #elif defined (iPlatformMsys) - concatPath_CStr(cstr_String(execPath_App()), "../urlopen.bat"), - cstr_String(url), + concatPath_CStr(cstr_String(execPath_App()), "../urlopen.bat"), + cstr_String(url), /* TODO: The prompt window is shown momentarily... */ #endif NULL)) ); start_Process(proc); - waitForFinished_Process(proc); /* TODO: test on Windows */ + waitForFinished_Process(proc); iRelease(proc); } +#include + void revealPath_App(const iString *path) { #if defined (iPlatformAppleDesktop) - iProcess *proc = new_Process(); - setArguments_Process( + iProcess *proc = new_Process(); + setArguments_Process( proc, iClob(newStringsCStr_StringList("/usr/bin/open", "-R", cstr_String(path), NULL))); - start_Process(proc); - iRelease(proc); + start_Process(proc); + iRelease(proc); #elif defined (iPlatformAppleMobile) /* Use a share sheet. */ openFileActivityView_iOS(path); #elif defined (iPlatformLinux) || defined (iPlatformHaiku) + iProcess *proc = NULL; + /* Try with `dbus-send` first. */ { + proc = new_Process(); + setArguments_Process( + proc, + iClob(newStringsCStr_StringList( + "/usr/bin/dbus-send", + "--print-reply", + "--dest=org.freedesktop.FileManager1", + "/org/freedesktop/FileManager1", + "org.freedesktop.FileManager1.ShowItems", + format_CStr("array:string:%s", makeFileUrl_CStr(cstr_String(path))), + "string:", + NULL))); + start_Process(proc); + waitForFinished_Process(proc); + const iBool dbusDidSucceed = (exitStatus_Process(proc) == 0); + iRelease(proc); + if (dbusDidSucceed) { + return; + } + } iFileInfo *inf = iClob(new_FileInfo(path)); iRangecc target; if (isDirectory_FileInfo(inf)) { @@ -3434,7 +3458,7 @@ void revealPath_App(const iString *path) { else { target = dirName_Path(path); } - iProcess *proc = new_Process(); + proc = new_Process(); setArguments_Process( proc, iClob(newStringsCStr_StringList("/usr/bin/env", "xdg-open", cstr_Rangecc(target), NULL))); start_Process(proc); diff --git a/src/ui/certlistwidget.c b/src/ui/certlistwidget.c index 5a1c481b..2a7562d8 100644 --- a/src/ui/certlistwidget.c +++ b/src/ui/certlistwidget.c @@ -106,6 +106,9 @@ static void updateContextMenu_CertListWidget_(iCertListWidget *d) { { "${ident.fingerprint}", 0, 0, "ident.fingerprint" }, #if defined (iPlatformAppleDesktop) { magnifyingGlass_Icon " ${menu.reveal.macos}", 0, 0, "ident.reveal" }, +#endif +#if defined (iPlatformLinux) + { magnifyingGlass_Icon " ${menu.reveal.filemgr}", 0, 0, "ident.reveal" }, #endif { export_Icon " ${ident.export}", 0, 0, "ident.export" }, { "---", 0, 0, NULL }, diff --git a/src/ui/documentwidget.c b/src/ui/documentwidget.c index 2ea0a4b7..58e6a11e 100644 --- a/src/ui/documentwidget.c +++ b/src/ui/documentwidget.c @@ -5031,6 +5031,14 @@ static iBool processEvent_DocumentWidget_(iDocumentWidget *d, const SDL_Event *e 0, format_CStr("!reveal url:%s", cstr_String(linkUrl)) }); +#endif +#if defined (iPlatformLinux) + pushBack_Array(&items, + &(iMenuItem){ "${menu.reveal.filemgr}", + 0, + 0, + format_CStr("!reveal url:%s", + cstr_String(linkUrl)) }); #endif } } diff --git a/src/ui/mediaui.c b/src/ui/mediaui.c index ab88c94a..f0070688 100644 --- a/src/ui/mediaui.c +++ b/src/ui/mediaui.c @@ -268,6 +268,12 @@ iBool processEvent_DownloadUI(iDownloadUI *d, const SDL_Event *ev) { 0, 0, format_CStr("!reveal path:%s", cstr_String(path)) }, +#endif +#if defined (iPlatformLinux) + { "${menu.reveal.filemgr}", + 0, + 0, + format_CStr("!reveal path:%s", cstr_String(path)) }, #endif { "---" }, /* Generic items */ -- cgit v1.2.3 From a5bd6f28363b565292d84618021a231d8c8686ed Mon Sep 17 00:00:00 2001 From: Страхиња Радић Date: Fri, 14 Jan 2022 09:44:52 +0000 Subject: Translated using Weblate (Serbian) Currently translated at 100.0% (644 of 644 strings) Translation: Lagrange/User Interface Translate-URL: http://weblate.skyjake.fi/projects/lagrange/ui/sr/ --- po/sr.po | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'po') diff --git a/po/sr.po b/po/sr.po index 4fdd4ee0..e9b31570 100644 --- a/po/sr.po +++ b/po/sr.po @@ -1,7 +1,7 @@ msgid "" msgstr "" "Report-Msgid-Bugs-To: jaakko.keranen@iki.fi\n" -"PO-Revision-Date: 2022-01-08 14:50+0000\n" +"PO-Revision-Date: 2022-01-16 09:50+0000\n" "Last-Translator: Страхиња Радић \n" "Language-Team: Serbian \n" "Language: sr\n" @@ -2123,7 +2123,7 @@ msgstr "" msgid "error.glyphs.msg" msgstr "" -"Ова страница се не може потпуно приказати јер недостају неки знакови. Можете " +"Ова страница се не може потпуно приказати јер недостају неки знаци. Можете " "инсталирати додатне фонтове да бисте то исправили." # Action label -- cgit v1.2.3 From 8a5f1d96d1d803a87de566577bb300c2a62ed2be Mon Sep 17 00:00:00 2001 From: Tadeáš Erban Date: Fri, 14 Jan 2022 19:50:14 +0000 Subject: Translated using Weblate (Czech) Currently translated at 100.0% (644 of 644 strings) Translation: Lagrange/User Interface Translate-URL: http://weblate.skyjake.fi/projects/lagrange/ui/cs/ --- po/cs.po | 200 +++++++++++++++++++++++++++++++++++++++++++++------------------ 1 file changed, 144 insertions(+), 56 deletions(-) (limited to 'po') diff --git a/po/cs.po b/po/cs.po index 797eeac3..034286fa 100644 --- a/po/cs.po +++ b/po/cs.po @@ -1,7 +1,7 @@ msgid "" msgstr "" "Report-Msgid-Bugs-To: jaakko.keranen@iki.fi\n" -"PO-Revision-Date: 2021-12-01 16:50+0000\n" +"PO-Revision-Date: 2022-01-16 09:50+0000\n" "Last-Translator: Tadeáš Erban \n" "Language-Team: Czech \n" "Language: cs\n" @@ -13,7 +13,7 @@ msgstr "" # Link download progress message. msgid "doc.fetching" -msgstr "Stahování" +msgstr "Načítání" #, c-format msgid "doc.archive" @@ -504,13 +504,13 @@ msgid "menu.copyurl" msgstr "Kopírovat adresu URL" msgid "heading.history.clear" -msgstr "VYMAZAT HISTORII" +msgstr "Vymazat historii" msgid "dlg.history.clear" msgstr "Vymazat historii" msgid "heading.confirm.bookmarks.delete" -msgstr "ODSTRANIT ZÁLOŽKY" +msgstr "Odstranit záložky" #, c-format msgid "dlg.bookmarks.delete" @@ -640,7 +640,7 @@ msgid "dlg.input.send" msgstr "Odeslat" msgid "heading.save" -msgstr "SOUBOR ULOŽEN" +msgstr "Soubor uložen" msgid "dlg.save.opendownload" msgstr "Otevřít stažený soubor" @@ -728,19 +728,19 @@ msgid "dlg.save.incomplete" msgstr "Obsah této stránky se ještě stahuje." msgid "heading.autoreload" -msgstr "AUTOMATICKÉ OBNOVOVÁNÍ" +msgstr "Automatické obnovování" msgid "dlg.autoreload" msgstr "Vyberte interval automatických aktualizací pro tuto kartu." msgid "heading.file.delete" -msgstr "ODSTRANIT SOUBOR" +msgstr "Odstranit soubor" msgid "dlg.certwarn.different" msgstr "Přijatý certifikát je platný, ale je jiný než ten, kterému důvěřujeme." msgid "link.hint.image" -msgstr "Zobrazit obrázek" +msgstr "Obrázek" msgid "bookmark.export.format.sub" msgstr "" @@ -787,7 +787,7 @@ msgid "lang.es.mx" msgstr "Španělština (Mexická)" msgid "heading.newident" -msgstr "NOVÁ TOTOŽNOST" +msgstr "Nová totožnost" msgid "lang.uk" msgstr "Ukrajinština" @@ -826,19 +826,19 @@ msgid "ident.export" msgstr "Exportovat" msgid "heading.ident.use" -msgstr "POUŽITÍ TOTOŽNOSTI" +msgstr "Použití totožnosti" msgid "menu.edit.notes" msgstr "Upravit poznámky…" msgid "heading.ident.notes" -msgstr "POZNÁMKY TOTOŽNOSTI" +msgstr "Poznámky k totožnosti" msgid "ident.fingerprint" msgstr "Zkopírovat otisk" msgid "heading.unsub" -msgstr "UKONČIT ODBĚR" +msgstr "Ukončit odběr" #, c-format msgid "dlg.confirm.unsub" @@ -857,7 +857,7 @@ msgid "error.server.msg" msgstr "Server odpověděl s následující zprávou:" msgid "heading.pageinfo" -msgstr "INFORMACE O STRÁNCE" +msgstr "Informace o stránce" msgid "pageinfo.cert.status" msgstr "Stav certifikátu:" @@ -869,7 +869,7 @@ msgid "ident.delete" msgstr "Odstranit totožnost…" msgid "heading.ident.delete" -msgstr "ODSTRANIT TOTOŽNOST" +msgstr "Odstranit totožnost" msgid "dlg.ident.delete" msgstr "Odstranit totožnost a její soubory" @@ -903,16 +903,16 @@ msgid "dlg.input.linebreak" msgstr "Zalomení řádku" msgid "heading.save.incomplete" -msgstr "STRÁNKA NEÚPLNÁ" +msgstr "Stránka neúplná" msgid "dlg.save.size" msgstr "Velikost:" msgid "heading.save.error" -msgstr "CHYBA PŘI UKLÁDÁNÍ SOUBORU" +msgstr "Chyba při ukládání souboru" msgid "heading.import.bookmarks" -msgstr "NAHRÁT ZÁLOŽKY" +msgstr "Nahrát záložky" #, c-format msgid "dlg.import.add" @@ -964,7 +964,7 @@ msgid "link.browser" msgstr "Otevřít odkaz ve výchozím prohlížeči" msgid "link.noproxy" -msgstr "Otevřít bez použití proxy" +msgstr "Otevřít bez použití prostředníka" msgid "link.copy" msgstr "Zkopírovat odkaz" @@ -979,7 +979,7 @@ msgid "dlg.file.delete" msgstr "Odstranit" msgid "heading.openlink" -msgstr "OTEVŘÍT ODKAZ" +msgstr "Otevřít odkaz" #, c-format msgid "dlg.openlink.confirm" @@ -1014,16 +1014,16 @@ msgid "dlg.certimport.notfound" msgstr "Žádný certifikát nebo soukromý klíč nebyl nalezen." msgid "heading.certimport.pasted" -msgstr "VLOŽENO ZE SCHRÁNKY" +msgstr "Vloženo ze schránky" msgid "heading.certimport.dropped" -msgstr "PŘETÁHNUTÝ SOUBOR" +msgstr "Přetáhnutý soubor" msgid "dlg.certimport.import" msgstr "Nahrát" msgid "heading.certimport" -msgstr "NAHRÁT TOTOŽNOST" +msgstr "Nahrát totožnost" msgid "dlg.certimport.notes" msgstr "Poznámky:" @@ -1038,7 +1038,7 @@ msgid "dlg.certimport.nokey" msgstr "Žádný soukromý klíč" msgid "link.hint.audio" -msgstr "Přehrát zvuk" +msgstr "Zvuk" msgid "bookmark.title.blank" msgstr "Prázdná stránka" @@ -1088,10 +1088,10 @@ msgid "hint.upload.text" msgstr "vložte text k odeslání" msgid "menu.page.upload" -msgstr "Nahrát stránku na server pomocí Titanu…" +msgstr "Nahrát na server pomocí Titanu…" msgid "heading.upload" -msgstr "NAHRÁT NA SERVER POMOCÍ TITANU" +msgstr "Nahrát pomocí titanu" msgid "upload.file.name" msgstr "Jméno souboru:" @@ -1127,7 +1127,7 @@ msgid "dlg.upload.pickfile" msgstr "Vybrat soubor" msgid "heading.translate" -msgstr "PŘELOŽIT STRÁNKU" +msgstr "Přeložit stránku" msgid "dlg.translate.unavail" msgstr "Služba nedostupná" @@ -1190,23 +1190,23 @@ msgid "lang.sk" msgstr "Slovenština" msgid "keys.upload" -msgstr "Nahrát stránku pomocí Titanu" +msgstr "Nahrát pomocí Titanu" msgid "error.proxy.msg" msgstr "" -"Požadavek pomocí proxy selhal, protože server nebyl schopen utvořit spojení " -"s vzdáleným hostitelem. Je možné, že existují problémy s konektivitou." +"Požadavek pomocí prostředníka selhal, protože server nebyl schopen utvořit " +"spojení s vzdáleným hostitelem. Je možné, že existují problémy s připojením." msgid "error.proxyrefusal.msg" msgstr "" "Váš požadavek byl pro zdroj na doméně, která není obsluhována tímto serverem " -"a ten server nepřijímá proxy požadavky." +"a ten server nepřijímá požadavky přes prostředníky." msgid "heading.bookmark.add" -msgstr "PŘIDAT ZÁLOŽKU" +msgstr "Přidat záložku" msgid "heading.bookmark.edit" -msgstr "UPRAVIT ZÁLOŽKU" +msgstr "Upravit záložku" msgid "dlg.bookmark.save" msgstr "Uložit záložku" @@ -1227,20 +1227,20 @@ msgid "dlg.addfolder.prompt" msgstr "Zadejte jméno nové složky:" msgid "heading.addfolder" -msgstr "PŘIDAT SLOŽKU" +msgstr "Přidat složku" msgid "dlg.bookmark.url" msgstr "URL:" msgid "heading.prefs.certs" -msgstr "CERTIFIKÁTY" +msgstr "Certifikáty" # used on mobile msgid "heading.settings" -msgstr "NASTAVENÍ" +msgstr "Nastavení" msgid "heading.prefs.uitheme" -msgstr "BARVY ROZHRANÍ" +msgstr "Barvy rozhraní" msgid "prefs.searchurl" msgstr "URL vyhledávání:" @@ -1289,7 +1289,7 @@ msgid "error.cgi" msgstr "CGI chyba" msgid "error.proxy" -msgstr "Chyba proxy" +msgstr "Chyba prostředníka" msgid "error.permanent" msgstr "Trvalé selhání" @@ -1386,13 +1386,13 @@ msgid "dlg.newident.more" msgstr "Více…" msgid "heading.newident.missing" -msgstr "CHYBĚJÍCÍ INFORMACE" +msgstr "Chybějící informace" msgid "dlg.newindent.missing.commonname" msgstr "\"Obecné jméno\" musí být specifikováno." msgid "heading.newident.date.bad" -msgstr "NEPLATNÉ DATUM" +msgstr "Neplatné datum" msgid "dlg.newident.date.past" msgstr "Datum vypršení platnosti musí být v budoucnosti." @@ -1408,10 +1408,10 @@ msgid "keys.split.menu" msgstr "Nastavit režim rozpůleného okna" msgid "heading.feedcfg" -msgstr "NASTAVENÍ KANÁLU" +msgstr "Nastavení kanálu" msgid "heading.subscribe" -msgstr "ODEBÍRAT STRÁNKU" +msgstr "Odebírat stránku" msgid "dlg.feed.title" msgstr "Název:" @@ -1438,22 +1438,22 @@ msgid "heading.prefs.network" msgstr "Síť" msgid "heading.prefs.paragraph" -msgstr "ODSTAVEC" +msgstr "Odstavec" msgid "heading.prefs.pagecontent" -msgstr "BARVY STRÁNKY" +msgstr "Barvy stránky" msgid "heading.prefs.proxies" -msgstr "PROXY" +msgstr "Prostředníci" msgid "heading.prefs.scrolling" -msgstr "POSOUVÁNÍ STRÁNKY" +msgstr "Posouvání stránky" msgid "heading.prefs.sizing" -msgstr "DIMENZOVÁNÍ" +msgstr "Dimenzování" msgid "heading.prefs.widelayout" -msgstr "ŠIROKÉ ROZLOŽENÍ" +msgstr "Široké rozložení" # tab button msgid "heading.prefs.style" @@ -1598,13 +1598,13 @@ msgid "prefs.ca.path" msgstr "Cesta k CA:" msgid "prefs.proxy.gemini" -msgstr "Proxy pro Gemini:" +msgstr "Prostředník pro Gemini:" msgid "prefs.proxy.gopher" -msgstr "Proxy pro Gopher:" +msgstr "Prostředník pro Gopher:" msgid "prefs.proxy.http" -msgstr "Proxy pro HTTP:" +msgstr "Prostředník pro HTTP:" msgid "menu.binding.reset" msgstr "Obnovit výchozí" @@ -1720,7 +1720,7 @@ msgid "error.gone.msg" msgstr "Požadovaný zdroj již není dostupný." msgid "error.proxyrefusal" -msgstr "Proxy požadavek byl odmítnut" +msgstr "Požadavek na prostředníka byl odmítnut" msgid "error.badheader.msg" msgstr "" @@ -1769,13 +1769,13 @@ msgid "dlg.bookmark.icon" msgstr "Ikona:" msgid "heading.bookmark.tags" -msgstr "SPECIÁLNÍ ZNAČENÍ" +msgstr "Speciální značení" msgid "dlg.addfolder" msgstr "Přidat složku" msgid "heading.prefs" -msgstr "PŘEDVOLBY" +msgstr "Předvolby" # tab button msgid "heading.prefs.colors" @@ -2009,7 +2009,7 @@ msgid "fontpack.delete" msgstr "Trvale odstranit \"%s\"" msgid "heading.fontpack.delete" -msgstr "ODSTRANIT PÍSMOVÝ BALÍČEK" +msgstr "Odstranit písmový balíček" #, c-format msgid "dlg.fontpack.delete.confirm" @@ -2030,7 +2030,7 @@ msgstr "" "zkopírovány do složky uživatelských písem." msgid "heading.dismiss.warning" -msgstr "PŘESTAT UKAZOVAT VAROVÁNÍ?" +msgstr "Skrýt varování?" #, c-format msgid "dlg.dismiss.ansi" @@ -2040,7 +2040,7 @@ msgid "dlg.dismiss.warning" msgstr "Přestat ukazovat varování" msgid "heading.fontpack.classic" -msgstr "STÁHNOUT PÍSMOVÝ BALÍČEK" +msgstr "Stáhnout písmový balíček" msgid "dlg.fontpack.classic.msg" msgstr "" @@ -2152,3 +2152,91 @@ msgstr "Zkontrolovat dostupné aktualizace…" # This label should be fairly short so it fits in a button in the sidebar. msgid "sidebar.action.feeds.markallread" msgstr "Označit vše jako přečtené" + +msgid "menu.open.external" +msgstr "Otevřít v jiné aplikaci" + +# Active identity toolbar menu. +msgid "menu.hide.identities" +msgstr "Skrýt totožnosti" + +msgid "menu.home" +msgstr "Jít domů" + +msgid "menu.identities" +msgstr "Spravovat totožnosti" + +msgid "sidebar.close" +msgstr "Hotovo" + +msgid "sidebar.action.bookmarks.newfolder" +msgstr "Nová složka" + +msgid "sidebar.action.bookmarks.edit" +msgstr "Upravit" + +msgid "sidebar.action.history.clear" +msgstr "Vymazat" + +# The %s represents the name of an identity. +#, c-format +msgid "ident.switch" +msgstr "Používat %s" + +msgid "sidebar.empty.unread" +msgstr "Žádné nepřečtené záznamy" + +# Paste the line preceding the clicked link into the input prompt. +msgid "menu.input.precedingline" +msgstr "Vložit předcházející řádek" + +# Shows where a local file is using the Finder. +msgid "menu.reveal.macos" +msgstr "Ukázat ve Finderu" + +msgid "menu.share" +msgstr "Sdílet" + +msgid "menu.page.upload.edit" +msgstr "Upravit pomocí Titanu…" + +msgid "heading.upload.id" +msgstr "Oprávnění" + +msgid "menu.upload.export" +msgstr "Exportovat text" + +msgid "menu.upload.delete" +msgstr "Odstranit vše" + +msgid "menu.upload.delete.confirm" +msgstr "Opravdu odstranit vše (není cesty zpět)" + +# Mobile subheading in the Upload dialog. +msgid "upload.url" +msgstr "URL" + +# Mobile subheading: buttons for entering uploaded data. +msgid "upload.content" +msgstr "Obsah" + +msgid "hint.upload.path" +msgstr "Cesta URL" + +msgid "hint.upload.token.long" +msgstr "token - podívejte se na instrukce serveru" + +msgid "heading.prefs.toolbaractions" +msgstr "Akce panelu nástrojů" + +msgid "prefs.toolbaraction1" +msgstr "Tlačítko 1" + +msgid "prefs.toolbaraction2" +msgstr "Tlačítko 2" + +msgid "prefs.blink" +msgstr "Blikající kurzor:" + +msgid "keys.upload.edit" +msgstr "Upravit pomocí Titanu" -- cgit v1.2.3 From a777e1a26a9e9ec97bc636e82349144912ce4a6b Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Sun, 16 Jan 2022 19:31:11 +0200 Subject: Added menu string for customizing toolbar --- po/en.po | 4 ++++ res/lang/cs.bin | Bin 32034 -> 32069 bytes res/lang/de.bin | Bin 30861 -> 30896 bytes res/lang/en.bin | Bin 26930 -> 26965 bytes res/lang/eo.bin | Bin 25900 -> 25935 bytes res/lang/es.bin | Bin 30749 -> 30784 bytes res/lang/es_MX.bin | Bin 28000 -> 28035 bytes res/lang/fi.bin | Bin 30559 -> 30594 bytes res/lang/fr.bin | Bin 31658 -> 31693 bytes res/lang/gl.bin | Bin 29917 -> 29952 bytes res/lang/hu.bin | Bin 31683 -> 31718 bytes res/lang/ia.bin | Bin 29713 -> 29748 bytes res/lang/ie.bin | Bin 29620 -> 29655 bytes res/lang/isv.bin | Bin 25651 -> 25686 bytes res/lang/nl.bin | Bin 29040 -> 29075 bytes res/lang/pl.bin | Bin 30286 -> 30321 bytes res/lang/ru.bin | Bin 45571 -> 45606 bytes res/lang/sk.bin | Bin 25987 -> 26022 bytes res/lang/sr.bin | Bin 44881 -> 44916 bytes res/lang/tok.bin | Bin 27766 -> 27801 bytes res/lang/tr.bin | Bin 29867 -> 29902 bytes res/lang/uk.bin | Bin 44956 -> 44991 bytes res/lang/zh_Hans.bin | Bin 25895 -> 25930 bytes res/lang/zh_Hant.bin | Bin 26293 -> 26328 bytes src/ui/root.c | 2 ++ 25 files changed, 6 insertions(+) (limited to 'po') diff --git a/po/en.po b/po/en.po index 36f5d0c3..e0e086e3 100644 --- a/po/en.po +++ b/po/en.po @@ -407,6 +407,10 @@ msgstr "Manage Identities" msgid "menu.identity.notactive" msgstr "No Active Identity" +# Menu heading shown when customizing navbar button actions. +msgid "menu.toolbar.setaction" +msgstr "Set Action:" + msgid "sidebar.close" msgstr "Done" diff --git a/res/lang/cs.bin b/res/lang/cs.bin index af77f8b2..eb59f65d 100644 Binary files a/res/lang/cs.bin and b/res/lang/cs.bin differ diff --git a/res/lang/de.bin b/res/lang/de.bin index bf857a70..9c3d4541 100644 Binary files a/res/lang/de.bin and b/res/lang/de.bin differ diff --git a/res/lang/en.bin b/res/lang/en.bin index 29608b71..5f649846 100644 Binary files a/res/lang/en.bin and b/res/lang/en.bin differ diff --git a/res/lang/eo.bin b/res/lang/eo.bin index d1d9dba3..beeeb21e 100644 Binary files a/res/lang/eo.bin and b/res/lang/eo.bin differ diff --git a/res/lang/es.bin b/res/lang/es.bin index a434cab4..14c1b843 100644 Binary files a/res/lang/es.bin and b/res/lang/es.bin differ diff --git a/res/lang/es_MX.bin b/res/lang/es_MX.bin index fd3f4e1f..dfcd6306 100644 Binary files a/res/lang/es_MX.bin and b/res/lang/es_MX.bin differ diff --git a/res/lang/fi.bin b/res/lang/fi.bin index 1d1a5185..6e5e3ee6 100644 Binary files a/res/lang/fi.bin and b/res/lang/fi.bin differ diff --git a/res/lang/fr.bin b/res/lang/fr.bin index 1cb5ddb1..ad16b2e7 100644 Binary files a/res/lang/fr.bin and b/res/lang/fr.bin differ diff --git a/res/lang/gl.bin b/res/lang/gl.bin index ba86c15d..f1501b4a 100644 Binary files a/res/lang/gl.bin and b/res/lang/gl.bin differ diff --git a/res/lang/hu.bin b/res/lang/hu.bin index 8dba97f9..c070dd49 100644 Binary files a/res/lang/hu.bin and b/res/lang/hu.bin differ diff --git a/res/lang/ia.bin b/res/lang/ia.bin index c3304a24..34633dd1 100644 Binary files a/res/lang/ia.bin and b/res/lang/ia.bin differ diff --git a/res/lang/ie.bin b/res/lang/ie.bin index 8988972e..722ee20d 100644 Binary files a/res/lang/ie.bin and b/res/lang/ie.bin differ diff --git a/res/lang/isv.bin b/res/lang/isv.bin index b14235a4..3be01643 100644 Binary files a/res/lang/isv.bin and b/res/lang/isv.bin differ diff --git a/res/lang/nl.bin b/res/lang/nl.bin index 8c40c833..dcc9fe97 100644 Binary files a/res/lang/nl.bin and b/res/lang/nl.bin differ diff --git a/res/lang/pl.bin b/res/lang/pl.bin index 4018a495..a32e9d10 100644 Binary files a/res/lang/pl.bin and b/res/lang/pl.bin differ diff --git a/res/lang/ru.bin b/res/lang/ru.bin index 2c0ddc73..11764fc0 100644 Binary files a/res/lang/ru.bin and b/res/lang/ru.bin differ diff --git a/res/lang/sk.bin b/res/lang/sk.bin index 259529e2..833872c9 100644 Binary files a/res/lang/sk.bin and b/res/lang/sk.bin differ diff --git a/res/lang/sr.bin b/res/lang/sr.bin index cb3da72a..fde7227f 100644 Binary files a/res/lang/sr.bin and b/res/lang/sr.bin differ diff --git a/res/lang/tok.bin b/res/lang/tok.bin index 3a3f1ee0..d17f075e 100644 Binary files a/res/lang/tok.bin and b/res/lang/tok.bin differ diff --git a/res/lang/tr.bin b/res/lang/tr.bin index 3ad7e349..06fc22e5 100644 Binary files a/res/lang/tr.bin and b/res/lang/tr.bin differ diff --git a/res/lang/uk.bin b/res/lang/uk.bin index 7a9cbd28..4f2a0085 100644 Binary files a/res/lang/uk.bin and b/res/lang/uk.bin differ diff --git a/res/lang/zh_Hans.bin b/res/lang/zh_Hans.bin index 63f4040c..246b7c42 100644 Binary files a/res/lang/zh_Hans.bin and b/res/lang/zh_Hans.bin differ diff --git a/res/lang/zh_Hant.bin b/res/lang/zh_Hant.bin index 23cfa0e7..0e94f66a 100644 Binary files a/res/lang/zh_Hant.bin and b/res/lang/zh_Hant.bin differ diff --git a/src/ui/root.c b/src/ui/root.c index 64043fd3..5c4296cf 100644 --- a/src/ui/root.c +++ b/src/ui/root.c @@ -872,6 +872,7 @@ static iBool handleNavBarCommands_(iWidget *navBar, const char *cmd) { const int buttonIndex = id.end[-1] - '1'; iArray items; init_Array(&items, sizeof(iMenuItem)); + pushBack_Array(&items, &(iMenuItem){ "```${menu.toolbar.setaction}" }); for (size_t i = 0; i < max_ToolbarAction; i++) { pushBack_Array( &items, @@ -886,6 +887,7 @@ static iBool handleNavBarCommands_(iWidget *navBar, const char *cmd) { makeMenu_Widget(get_Root()->widget, constData_Array(&items), size_Array(&items)), coord_Command(cmd)); deinit_Array(&items); + return iTrue; } return iFalse; } -- cgit v1.2.3 From 9b290f35ff00076d825bcc57f8590e7f0cd23cd8 Mon Sep 17 00:00:00 2001 From: Alyssa Liddell Date: Sun, 16 Jan 2022 15:39:05 +0000 Subject: Translated using Weblate (Russian) Currently translated at 100.0% (645 of 645 strings) Translation: Lagrange/User Interface Translate-URL: http://weblate.skyjake.fi/projects/lagrange/ui/ru/ --- po/ru.po | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'po') diff --git a/po/ru.po b/po/ru.po index f2fd4591..b5def1af 100644 --- a/po/ru.po +++ b/po/ru.po @@ -3,7 +3,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: jaakko.keranen@iki.fi\n" "POT-Creation-Date: 2021-03-23 19:02+0000\n" -"PO-Revision-Date: 2022-01-08 14:50+0000\n" +"PO-Revision-Date: 2022-01-16 17:31+0000\n" "Last-Translator: Alyssa Liddell \n" "Language-Team: Russian \n" "Language: ru\n" @@ -2230,3 +2230,7 @@ msgstr "Кнопка 2" msgid "keys.upload.edit" msgstr "Редактировать страницу (Titan)" + +# Shows where a local file is using the File Manager. +msgid "menu.reveal.filemgr" +msgstr "Показать в файловом менеджере" -- cgit v1.2.3 From 6d0f54c93a28ba590711e4e88cc0349eba7d14ac Mon Sep 17 00:00:00 2001 From: Nikolay Korotkiy Date: Sun, 16 Jan 2022 16:23:08 +0000 Subject: Translated using Weblate (Finnish) Currently translated at 100.0% (645 of 645 strings) Translation: Lagrange/User Interface Translate-URL: http://weblate.skyjake.fi/projects/lagrange/ui/fi/ --- po/fi.po | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'po') diff --git a/po/fi.po b/po/fi.po index 2310fb14..c61d974b 100644 --- a/po/fi.po +++ b/po/fi.po @@ -3,8 +3,8 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: jaakko.keranen@iki.fi\n" "POT-Creation-Date: 2021-03-23 09:09+0000\n" -"PO-Revision-Date: 2022-01-08 14:50+0000\n" -"Last-Translator: Weblate Admin \n" +"PO-Revision-Date: 2022-01-16 17:31+0000\n" +"Last-Translator: Nikolay Korotkiy \n" "Language-Team: Finnish \n" "Language: fi\n" "MIME-Version: 1.0\n" @@ -2228,3 +2228,7 @@ msgstr "Näytä Finderissa" msgid "menu.share" msgstr "Jaa" + +# Shows where a local file is using the File Manager. +msgid "menu.reveal.filemgr" +msgstr "Näytä tiedostonhallinnassa" -- cgit v1.2.3 From 6df8aec784377109805f403b9b1e13cb84e027e5 Mon Sep 17 00:00:00 2001 From: Nikolay Korotkiy Date: Sun, 16 Jan 2022 16:34:05 +0000 Subject: Translated using Weblate (Esperanto) Currently translated at 36.1% (233 of 645 strings) Translation: Lagrange/User Interface Translate-URL: http://weblate.skyjake.fi/projects/lagrange/ui/eo/ --- po/eo.po | 87 +++++++++++++++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 72 insertions(+), 15 deletions(-) (limited to 'po') diff --git a/po/eo.po b/po/eo.po index 5bbf56c5..3d770531 100644 --- a/po/eo.po +++ b/po/eo.po @@ -1,7 +1,7 @@ msgid "" msgstr "" "Report-Msgid-Bugs-To: jaakko.keranen@iki.fi\n" -"PO-Revision-Date: 2021-12-08 14:50+0000\n" +"PO-Revision-Date: 2022-01-16 17:31+0000\n" "Last-Translator: Nikolay Korotkiy \n" "Language-Team: Esperanto " "\n" @@ -227,7 +227,7 @@ msgid "feeds.entry.markunread" msgstr "Marki nelegita" msgid "heading.history.clear" -msgstr "MALPLENIGI HISTORION" +msgstr "Malplenigi historion" msgid "ident.delete" msgstr "Forigi identecon…" @@ -236,7 +236,7 @@ msgid "ident.fingerprint" msgstr "Kopii fingropremaĵon" msgid "heading.ident.use" -msgstr "IDENTECA UZADO" +msgstr "Identeca uzado" msgid "menu.edit.notes" msgstr "Redakti notojn…" @@ -259,10 +259,10 @@ msgid "dlg.input.send" msgstr "Sendi" msgid "heading.unsub" -msgstr "MALABONO" +msgstr "Malabono" msgid "heading.pageinfo" -msgstr "PAĜINFORMOJ" +msgstr "Paĝinformoj" msgid "dlg.cert.fingerprint" msgstr "Kopii fingropremaĵon" @@ -301,10 +301,10 @@ msgstr[0] "%d horo" msgstr[1] "%d horoj" msgid "heading.openlink" -msgstr "MALFERMI LIGILON" +msgstr "Malfermi ligilon" msgid "heading.certimport" -msgstr "IMPORTI IDENTECON" +msgstr "Importi identecon" msgid "hint.certimport.description" msgstr "priskribo" @@ -332,7 +332,7 @@ msgid "link.hint.audio" msgstr "Ludi la sondosieron" msgid "link.hint.image" -msgstr "Montri la bildon" +msgstr "Bildo" msgid "lang.ar" msgstr "Araba" @@ -380,7 +380,7 @@ msgid "dlg.newident.country" msgstr "Lando:" msgid "heading.newident" -msgstr "NOVA IDENTECO" +msgstr "Nova identeco" msgid "dlg.newident.domain" msgstr "Domajno:" @@ -411,7 +411,7 @@ msgid "dlg.bookmark.icon" msgstr "Bildsimbolo:" msgid "heading.prefs" -msgstr "AGORDOJ" +msgstr "Agordoj" msgid "heading.prefs.fonts" msgstr "Tiparoj" @@ -421,10 +421,10 @@ msgid "heading.prefs.network" msgstr "Reto" msgid "heading.prefs.paragraph" -msgstr "ALINEO" +msgstr "Alineo" msgid "heading.prefs.scrolling" -msgstr "RULUMADO" +msgstr "Rulumado" msgid "prefs.theme" msgstr "Temo:" @@ -559,7 +559,7 @@ msgid "dlg.newident.temp" msgstr "Provizora:" msgid "heading.prefs.certs" -msgstr "ATESTILOJ" +msgstr "Atestiloj" #, c-format msgid "num.minutes" @@ -580,7 +580,7 @@ msgid "keys.fullscreen" msgstr "Baskuligi plenekranan reĝimon" msgid "heading.import.bookmarks" -msgstr "IMPORTI LEGOSIGNOJN" +msgstr "Importi legosignojn" msgid "lang.sr" msgstr "Serba" @@ -679,7 +679,7 @@ msgid "heading.prefs.interface" msgstr "Fasado" msgid "heading.prefs.proxies" -msgstr "PROKURILOJ" +msgstr "Prokuriloj" msgid "gempub.meta.lang" msgstr "Lingvo" @@ -746,3 +746,60 @@ msgstr "Tiparoj" msgid "dlg.dismiss.warning" msgstr "Ignori averton" + +msgid "menu.newfolder" +msgstr "Nova dosierujo…" + +# keep this short (3x1 horiz layout) +msgid "menu.selectall" +msgstr "Elekti ĉiujn" + +msgid "menu.copyurl" +msgstr "Kopii URL" + +#, c-format +msgid "minutes.ago" +msgid_plural "minutes.ago.n" +msgstr[0] "antaŭ %d minuto" +msgstr[1] "antaŭ %d minutoj" + +#, c-format +msgid "hours.ago" +msgid_plural "hours.ago.n" +msgstr[0] "antaŭ %d horo" +msgstr[1] "antaŭ %d horoj" + +# used for Preferences on mobile +msgid "menu.settings" +msgstr "Agordoj" + +# keep this short (3x1 horiz layout) +msgid "menu.delete" +msgstr "Forigi" + +msgid "sidebar.action.bookmarks.newfolder" +msgstr "Nova dosierujo" + +msgid "sidebar.action.bookmarks.edit" +msgstr "Redakti" + +msgid "num.files" +msgid_plural "num.files.n" +msgstr[0] "%u dosiero" +msgstr[1] "%u dosieroj" + +msgid "ident.export" +msgstr "Eksporti" + +#, c-format +msgid "days.ago" +msgid_plural "days.ago.n" +msgstr[0] "antaŭ %d tago" +msgstr[1] "antaŭ %d tagoj" + +# keep this short (3x1 horiz layout) +msgid "menu.undo" +msgstr "Malfari" + +msgid "sidebar.action.show" +msgstr "Montri:" -- cgit v1.2.3 From 12c9964e465e4522e03fd3414902624088ae232a Mon Sep 17 00:00:00 2001 From: Страхиња Радић Date: Sun, 16 Jan 2022 13:42:58 +0000 Subject: Translated using Weblate (Serbian) Currently translated at 100.0% (645 of 645 strings) Translation: Lagrange/User Interface Translate-URL: http://weblate.skyjake.fi/projects/lagrange/ui/sr/ --- po/sr.po | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'po') diff --git a/po/sr.po b/po/sr.po index e9b31570..e6cef348 100644 --- a/po/sr.po +++ b/po/sr.po @@ -1,7 +1,7 @@ msgid "" msgstr "" "Report-Msgid-Bugs-To: jaakko.keranen@iki.fi\n" -"PO-Revision-Date: 2022-01-16 09:50+0000\n" +"PO-Revision-Date: 2022-01-16 17:31+0000\n" "Last-Translator: Страхиња Радић \n" "Language-Team: Serbian \n" "Language: sr\n" @@ -2277,3 +2277,7 @@ msgstr "Трепћући курсор:" msgid "keys.upload.edit" msgstr "Уређивање странице преко Титана" + +# Shows where a local file is using the File Manager. +msgid "menu.reveal.filemgr" +msgstr "Прикажи у Менаџеру датотека" -- cgit v1.2.3 From 786e9a5bc0601449143c1c3e2fbfae76e3ea8071 Mon Sep 17 00:00:00 2001 From: Alyssa Liddell Date: Sun, 16 Jan 2022 15:38:19 +0000 Subject: Translated using Weblate (Ukrainian) Currently translated at 100.0% (645 of 645 strings) Translation: Lagrange/User Interface Translate-URL: http://weblate.skyjake.fi/projects/lagrange/ui/uk/ --- po/uk.po | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'po') diff --git a/po/uk.po b/po/uk.po index 9b675221..1015097c 100644 --- a/po/uk.po +++ b/po/uk.po @@ -1,7 +1,7 @@ msgid "" msgstr "" "Report-Msgid-Bugs-To: jaakko.keranen@iki.fi\n" -"PO-Revision-Date: 2022-01-08 14:50+0000\n" +"PO-Revision-Date: 2022-01-16 17:31+0000\n" "Last-Translator: Alyssa Liddell \n" "Language-Team: Ukrainian " "\n" @@ -2258,3 +2258,7 @@ msgstr "Шлях URL" msgid "hint.upload.token.long" msgstr "токен — див. вказівки сервера" + +# Shows where a local file is using the File Manager. +msgid "menu.reveal.filemgr" +msgstr "Показати у файловому менеджері" -- cgit v1.2.3 From 5a204c06ca29c504ca4b8ff08cae3dbd5a71ee63 Mon Sep 17 00:00:00 2001 From: Weblate Admin Date: Sun, 16 Jan 2022 17:40:01 +0000 Subject: Translated using Weblate (Finnish) Currently translated at 100.0% (646 of 646 strings) Translation: Lagrange/User Interface Translate-URL: http://weblate.skyjake.fi/projects/lagrange/ui/fi/ --- po/fi.po | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'po') diff --git a/po/fi.po b/po/fi.po index c61d974b..6ed46bb8 100644 --- a/po/fi.po +++ b/po/fi.po @@ -3,8 +3,8 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: jaakko.keranen@iki.fi\n" "POT-Creation-Date: 2021-03-23 09:09+0000\n" -"PO-Revision-Date: 2022-01-16 17:31+0000\n" -"Last-Translator: Nikolay Korotkiy \n" +"PO-Revision-Date: 2022-01-17 09:43+0000\n" +"Last-Translator: Weblate Admin \n" "Language-Team: Finnish \n" "Language: fi\n" "MIME-Version: 1.0\n" @@ -2232,3 +2232,7 @@ msgstr "Jaa" # Shows where a local file is using the File Manager. msgid "menu.reveal.filemgr" msgstr "Näytä tiedostonhallinnassa" + +# Menu heading shown when customizing navbar button actions. +msgid "menu.toolbar.setaction" +msgstr "Aseta toiminto:" -- cgit v1.2.3 From de9201c809ec7777b0fcfb3567442dbd6a2ab5ae Mon Sep 17 00:00:00 2001 From: Nikolay Korotkiy Date: Mon, 17 Jan 2022 11:28:04 +0000 Subject: Translated using Weblate (Russian) Currently translated at 100.0% (646 of 646 strings) Translation: Lagrange/User Interface Translate-URL: http://weblate.skyjake.fi/projects/lagrange/ui/ru/ --- po/ru.po | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'po') diff --git a/po/ru.po b/po/ru.po index b5def1af..d8306f17 100644 --- a/po/ru.po +++ b/po/ru.po @@ -3,8 +3,8 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: jaakko.keranen@iki.fi\n" "POT-Creation-Date: 2021-03-23 19:02+0000\n" -"PO-Revision-Date: 2022-01-16 17:31+0000\n" -"Last-Translator: Alyssa Liddell \n" +"PO-Revision-Date: 2022-01-18 17:50+0000\n" +"Last-Translator: Nikolay Korotkiy \n" "Language-Team: Russian \n" "Language: ru\n" "MIME-Version: 1.0\n" @@ -2234,3 +2234,7 @@ msgstr "Редактировать страницу (Titan)" # Shows where a local file is using the File Manager. msgid "menu.reveal.filemgr" msgstr "Показать в файловом менеджере" + +# Menu heading shown when customizing navbar button actions. +msgid "menu.toolbar.setaction" +msgstr "Установить действие:" -- cgit v1.2.3 From d55a1ed06ad2f63be3dd86cdf51d588e2bf9d76d Mon Sep 17 00:00:00 2001 From: Wally Hackenslacker Date: Mon, 17 Jan 2022 13:24:10 +0000 Subject: Translated using Weblate (Spanish) Currently translated at 100.0% (646 of 646 strings) Translation: Lagrange/User Interface Translate-URL: http://weblate.skyjake.fi/projects/lagrange/ui/es/ --- po/es.po | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'po') diff --git a/po/es.po b/po/es.po index bf2c84de..b84622ab 100644 --- a/po/es.po +++ b/po/es.po @@ -1,7 +1,7 @@ msgid "" msgstr "" "Report-Msgid-Bugs-To: jaakko.keranen@iki.fi\n" -"PO-Revision-Date: 2022-01-11 02:50+0000\n" +"PO-Revision-Date: 2022-01-18 17:50+0000\n" "Last-Translator: Wally Hackenslacker \n" "Language-Team: Spanish \n" "Language: es\n" @@ -2243,3 +2243,11 @@ msgstr "Cursor parpadeante:" msgid "keys.upload.edit" msgstr "Editar Página con Titan" + +# Menu heading shown when customizing navbar button actions. +msgid "menu.toolbar.setaction" +msgstr "Establecer Acción:" + +# Shows where a local file is using the File Manager. +msgid "menu.reveal.filemgr" +msgstr "Mostrar en Administrador de Archivos" -- cgit v1.2.3 From 4859ebb237e6d09a26b86157524a2c01b4454ba2 Mon Sep 17 00:00:00 2001 From: Страхиња Радић Date: Mon, 17 Jan 2022 17:05:59 +0000 Subject: Translated using Weblate (Serbian) Currently translated at 100.0% (646 of 646 strings) Translation: Lagrange/User Interface Translate-URL: http://weblate.skyjake.fi/projects/lagrange/ui/sr/ --- po/sr.po | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'po') diff --git a/po/sr.po b/po/sr.po index e6cef348..02b35316 100644 --- a/po/sr.po +++ b/po/sr.po @@ -1,7 +1,7 @@ msgid "" msgstr "" "Report-Msgid-Bugs-To: jaakko.keranen@iki.fi\n" -"PO-Revision-Date: 2022-01-16 17:31+0000\n" +"PO-Revision-Date: 2022-01-18 17:50+0000\n" "Last-Translator: Страхиња Радић \n" "Language-Team: Serbian \n" "Language: sr\n" @@ -2281,3 +2281,7 @@ msgstr "Уређивање странице преко Титана" # Shows where a local file is using the File Manager. msgid "menu.reveal.filemgr" msgstr "Прикажи у Менаџеру датотека" + +# Menu heading shown when customizing navbar button actions. +msgid "menu.toolbar.setaction" +msgstr "Постави акцију:" -- cgit v1.2.3 From 98a26054e930eac7b165d27641a8d3f5fb5be048 Mon Sep 17 00:00:00 2001 From: Alyssa Liddell Date: Mon, 17 Jan 2022 11:32:37 +0000 Subject: Translated using Weblate (Ukrainian) Currently translated at 100.0% (646 of 646 strings) Translation: Lagrange/User Interface Translate-URL: http://weblate.skyjake.fi/projects/lagrange/ui/uk/ --- po/uk.po | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'po') diff --git a/po/uk.po b/po/uk.po index 1015097c..2d86f54d 100644 --- a/po/uk.po +++ b/po/uk.po @@ -1,7 +1,7 @@ msgid "" msgstr "" "Report-Msgid-Bugs-To: jaakko.keranen@iki.fi\n" -"PO-Revision-Date: 2022-01-16 17:31+0000\n" +"PO-Revision-Date: 2022-01-18 17:50+0000\n" "Last-Translator: Alyssa Liddell \n" "Language-Team: Ukrainian " "\n" @@ -2262,3 +2262,7 @@ msgstr "токен — див. вказівки сервера" # Shows where a local file is using the File Manager. msgid "menu.reveal.filemgr" msgstr "Показати у файловому менеджері" + +# Menu heading shown when customizing navbar button actions. +msgid "menu.toolbar.setaction" +msgstr "Призначити дію:" -- cgit v1.2.3 From 95c0646415b706d66d5fa61b4545d5d254026034 Mon Sep 17 00:00:00 2001 From: Tadeáš Erban Date: Wed, 19 Jan 2022 14:04:48 +0000 Subject: Translated using Weblate (Czech) Currently translated at 100.0% (646 of 646 strings) Translation: Lagrange/User Interface Translate-URL: http://weblate.skyjake.fi/projects/lagrange/ui/cs/ --- po/cs.po | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'po') diff --git a/po/cs.po b/po/cs.po index 034286fa..2b3eab30 100644 --- a/po/cs.po +++ b/po/cs.po @@ -1,7 +1,7 @@ msgid "" msgstr "" "Report-Msgid-Bugs-To: jaakko.keranen@iki.fi\n" -"PO-Revision-Date: 2022-01-16 09:50+0000\n" +"PO-Revision-Date: 2022-01-20 04:05+0000\n" "Last-Translator: Tadeáš Erban \n" "Language-Team: Czech \n" "Language: cs\n" @@ -2240,3 +2240,11 @@ msgstr "Blikající kurzor:" msgid "keys.upload.edit" msgstr "Upravit pomocí Titanu" + +# Menu heading shown when customizing navbar button actions. +msgid "menu.toolbar.setaction" +msgstr "Nastavit akci:" + +# Shows where a local file is using the File Manager. +msgid "menu.reveal.filemgr" +msgstr "Otevřít v průzkumníku souborů" -- cgit v1.2.3 From 8de556928d509637996350fd8dd810ec557e86ec Mon Sep 17 00:00:00 2001 From: Emir SARI Date: Wed, 19 Jan 2022 15:50:43 +0000 Subject: Translated using Weblate (Turkish) Currently translated at 100.0% (646 of 646 strings) Translation: Lagrange/User Interface Translate-URL: http://weblate.skyjake.fi/projects/lagrange/ui/tr/ --- po/tr.po | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'po') diff --git a/po/tr.po b/po/tr.po index 5cff07d1..c0811109 100644 --- a/po/tr.po +++ b/po/tr.po @@ -1,7 +1,7 @@ msgid "" msgstr "" "Report-Msgid-Bugs-To: jaakko.keranen@iki.fi\n" -"PO-Revision-Date: 2022-01-08 14:50+0000\n" +"PO-Revision-Date: 2022-01-20 04:05+0000\n" "Last-Translator: Emir SARI \n" "Language-Team: Turkish \n" "Language: tr\n" @@ -2182,3 +2182,11 @@ msgstr "jeton — sunucunun yönergelerine bakın" msgid "heading.prefs.toolbaractions" msgstr "Araç çubuğu eylemleri" + +# Menu heading shown when customizing navbar button actions. +msgid "menu.toolbar.setaction" +msgstr "Eylem Ayarla:" + +# Shows where a local file is using the File Manager. +msgid "menu.reveal.filemgr" +msgstr "Dosya Yöneticisinde Göster" -- cgit v1.2.3 From 6f063e986bf572cc832d2a74e5b3f973cfb7722f Mon Sep 17 00:00:00 2001 From: Xosé M Date: Thu, 20 Jan 2022 05:29:26 +0000 Subject: Translated using Weblate (Galician) Currently translated at 100.0% (646 of 646 strings) Translation: Lagrange/User Interface Translate-URL: http://weblate.skyjake.fi/projects/lagrange/ui/gl/ --- po/gl.po | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'po') diff --git a/po/gl.po b/po/gl.po index 6d9f7e91..ac2ef700 100644 --- a/po/gl.po +++ b/po/gl.po @@ -1,7 +1,7 @@ msgid "" msgstr "" "Report-Msgid-Bugs-To: jaakko.keranen@iki.fi\n" -"PO-Revision-Date: 2022-01-08 14:50+0000\n" +"PO-Revision-Date: 2022-01-20 06:20+0000\n" "Last-Translator: Xosé M. \n" "Language-Team: Galician " "\n" @@ -2233,3 +2233,11 @@ msgstr "Cursor intermitente:" msgid "keys.upload.edit" msgstr "Editar páxina con Titan" + +# Shows where a local file is using the File Manager. +msgid "menu.reveal.filemgr" +msgstr "Mostrar no Xestor de ficheiros" + +# Menu heading shown when customizing navbar button actions. +msgid "menu.toolbar.setaction" +msgstr "Establece acción:" -- cgit v1.2.3