summaryrefslogtreecommitdiff
path: root/src/ui
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/documentwidget.c29
-rw-r--r--src/ui/sidebarwidget.c8
2 files changed, 17 insertions, 20 deletions
diff --git a/src/ui/documentwidget.c b/src/ui/documentwidget.c
index 3d8d4f12..88016b1c 100644
--- a/src/ui/documentwidget.c
+++ b/src/ui/documentwidget.c
@@ -2081,20 +2081,17 @@ static iBool handleCommand_DocumentWidget_(iDocumentWidget *d, const char *cmd)
2081 } 2081 }
2082 if (!isEmpty_PtrArray(links)) { 2082 if (!isEmpty_PtrArray(links)) {
2083 if (argLabel_Command(cmd, "confirm")) { 2083 if (argLabel_Command(cmd, "confirm")) {
2084 //const char *plural = size_PtrArray(links) != 1 ? "s" : ""; 2084 const size_t count = size_PtrArray(links);
2085 const iBool isPlural = size_PtrArray(links) != 1;
2086 makeQuestion_Widget( 2085 makeQuestion_Widget(
2087 uiHeading_ColorEscape "${heading.import.bookmarks}", 2086 uiHeading_ColorEscape "${heading.import.bookmarks}",
2088 format_CStr(cstr_Lang(isPlural ? "dlg.import.found.many" : "dlg.import.found"), 2087 formatCStrs_Lang("dlg.import.found.n", count),
2089 size_PtrArray(links)), 2088 (iMenuItem[]){ { "${cancel}", 0, 0, NULL },
2090 (iMenuItem[]){ 2089 { format_CStr(cstrCount_Lang("dlg.import.add.n", count),
2091 { "${cancel}", 0, 0, NULL }, 2090 uiTextAction_ColorEscape,
2092 { format_CStr(cstr_Lang(isPlural ? "dlg.import.add.many" : "dlg.import.add"), 2091 count),
2093 uiTextAction_ColorEscape, 2092 0,
2094 size_PtrArray(links)), 2093 0,
2095 0, 2094 "bookmark.links" } },
2096 0,
2097 "bookmark.links" } },
2098 2); 2095 2);
2099 } 2096 }
2100 else { 2097 else {
@@ -2846,10 +2843,10 @@ static void drawBannerRun_DrawContext_(iDrawContext *d, const iGmRun *run, iInt2
2846 const int days = secondsSince_Time(&oldUntil, &now) / 3600 / 24; 2843 const int days = secondsSince_Time(&oldUntil, &now) / 3600 / 24;
2847 appendCStr_String(&str, "\n"); 2844 appendCStr_String(&str, "\n");
2848 if (days <= 30) { 2845 if (days <= 30) {
2849 appendFormat_String(&str, 2846 appendCStr_String(&str,
2850 cstr_Lang("dlg.certwarn.mayberenewed"), 2847 format_CStr(cstrCount_Lang("dlg.certwarn.mayberenewed.n", days),
2851 cstrCollect_String(format_Date(&exp, "%Y-%m-%d")), 2848 cstrCollect_String(format_Date(&exp, "%Y-%m-%d")),
2852 days); 2849 days));
2853 } 2850 }
2854 else { 2851 else {
2855 appendCStr_String(&str, cstr_Lang("dlg.certwarn.different")); 2852 appendCStr_String(&str, cstr_Lang("dlg.certwarn.different"));
diff --git a/src/ui/sidebarwidget.c b/src/ui/sidebarwidget.c
index 5ff585a5..29b3646a 100644
--- a/src/ui/sidebarwidget.c
+++ b/src/ui/sidebarwidget.c
@@ -352,7 +352,7 @@ static void updateItems_SidebarWidget_(iSidebarWidget *d) {
352 "%s", 352 "%s",
353 isActive ? cstr_Lang("ident.using") 353 isActive ? cstr_Lang("ident.using")
354 : isUsed_GmIdentity(ident) 354 : isUsed_GmIdentity(ident)
355 ? format_CStr(cstr_Lang("ident.usedonurls"), size_StringSet(ident->useUrls)) 355 ? formatCStrs_Lang("ident.usedonurls.n", size_StringSet(ident->useUrls))
356 : cstr_Lang("ident.notused")); 356 : cstr_Lang("ident.notused"));
357 const char *expiry = 357 const char *expiry =
358 ident->flags & temporary_GmIdentityFlag 358 ident->flags & temporary_GmIdentityFlag
@@ -705,12 +705,12 @@ static void checkModeButtonLayout_SidebarWidget_(iSidebarWidget *d) {
705 if (i == feeds_SidebarMode && d->numUnreadEntries) { 705 if (i == feeds_SidebarMode && d->numUnreadEntries) {
706 updateText_LabelWidget( 706 updateText_LabelWidget(
707 button, 707 button,
708 collectNewFormat_String("%s " uiTextAction_ColorEscape "%zu%s", 708 collectNewFormat_String("%s " uiTextAction_ColorEscape "%zu%s%s",
709 tightModeLabels_[i], 709 tightModeLabels_[i],
710 d->numUnreadEntries, 710 d->numUnreadEntries,
711 !isTight ? " " : "",
711 !isTight 712 !isTight
712 ? (d->numUnreadEntries == 1 ? " ${sidebar.unread}" 713 ? formatCStrs_Lang("sidebar.unread.n", d->numUnreadEntries)
713 : " ${sidebar.unread.many}")
714 : "")); 714 : ""));
715 } 715 }
716 else { 716 else {