summaryrefslogtreecommitdiff
path: root/src/ui/documentwidget.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/documentwidget.c')
-rw-r--r--src/ui/documentwidget.c29
1 files changed, 13 insertions, 16 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"));