diff options
71 files changed, 359 insertions, 193 deletions
diff --git a/.github/workflows/make.yml b/.github/workflows/make.yml index c9fe273..7700ff3 100644 --- a/.github/workflows/make.yml +++ b/.github/workflows/make.yml @@ -24,11 +24,14 @@ jobs: steps: - uses: actions/checkout@v2 - name: Install dependencies (Ubuntu) - run: sudo apt-get install asciidoc autopoint gettext xmlto autoconf-archive + run: | + sudo apt-get update + sudo apt-get install asciidoc autopoint gettext xmlto autoconf-archive if: matrix.os == 'ubuntu-latest' - name: Install dependencies (MacOS) run: | brew update + brew install --overwrite python brew install automake brew install asciidoc brew install gettext @@ -1,123 +1,122 @@ [main] host = https://www.transifex.com -type = PO -[calcurse.calcurse] +[o:lfleischer:p:calcurse:r:calcurse] file_filter = po/<lang>.po source_file = po/calcurse.pot source_lang = en -[calcurse.doc-add] +[o:lfleischer:p:calcurse:r:doc-add] file_filter = po/doc/add-<lang>.po source_file = po/doc/add.pot source_lang = en -[calcurse.doc-config] +[o:lfleischer:p:calcurse:r:doc-config] file_filter = po/doc/config-<lang>.po source_file = po/doc/config.pot source_lang = en -[calcurse.doc-copy-paste] +[o:lfleischer:p:calcurse:r:doc-copy-paste] file_filter = po/doc/copy-paste-<lang>.po source_file = po/doc/copy-paste.pot source_lang = en -[calcurse.doc-credits] +[o:lfleischer:p:calcurse:r:doc-credits] file_filter = po/doc/credits-<lang>.po source_file = po/doc/credits.pot source_lang = en -[calcurse.doc-delete] +[o:lfleischer:p:calcurse:r:doc-delete] file_filter = po/doc/delete-<lang>.po source_file = po/doc/delete.pot source_lang = en -[calcurse.doc-displacement] +[o:lfleischer:p:calcurse:r:doc-displacement] file_filter = po/doc/displacement-<lang>.po source_file = po/doc/displacement.pot source_lang = en -[calcurse.doc-edit] +[o:lfleischer:p:calcurse:r:doc-edit] file_filter = po/doc/edit-<lang>.po source_file = po/doc/edit.pot source_lang = en -[calcurse.doc-enote] +[o:lfleischer:p:calcurse:r:doc-enote] file_filter = po/doc/enote-<lang>.po source_file = po/doc/enote.pot source_lang = en -[calcurse.doc-export] +[o:lfleischer:p:calcurse:r:doc-export] file_filter = po/doc/export-<lang>.po source_file = po/doc/export.pot source_lang = en -[calcurse.doc-flag] +[o:lfleischer:p:calcurse:r:doc-flag] file_filter = po/doc/flag-<lang>.po source_file = po/doc/flag.pot source_lang = en -[calcurse.doc-general] +[o:lfleischer:p:calcurse:r:doc-general] file_filter = po/doc/general-<lang>.po source_file = po/doc/general.pot source_lang = en -[calcurse.doc-goto] +[o:lfleischer:p:calcurse:r:doc-goto] file_filter = po/doc/goto-<lang>.po source_file = po/doc/goto.pot source_lang = en -[calcurse.doc-import] +[o:lfleischer:p:calcurse:r:doc-import] file_filter = po/doc/import-<lang>.po source_file = po/doc/import.pot source_lang = en -[calcurse.doc-intro] +[o:lfleischer:p:calcurse:r:doc-intro] file_filter = po/doc/intro-<lang>.po source_file = po/doc/intro.pot source_lang = en -[calcurse.doc-other] +[o:lfleischer:p:calcurse:r:doc-other] file_filter = po/doc/other-<lang>.po source_file = po/doc/other.pot source_lang = en -[calcurse.doc-pipe] +[o:lfleischer:p:calcurse:r:doc-pipe] file_filter = po/doc/pipe-<lang>.po source_file = po/doc/pipe.pot source_lang = en -[calcurse.doc-priority] +[o:lfleischer:p:calcurse:r:doc-priority] file_filter = po/doc/priority-<lang>.po source_file = po/doc/priority.pot source_lang = en -[calcurse.doc-reload] +[o:lfleischer:p:calcurse:r:doc-reload] file_filter = po/doc/reload-<lang>.po source_file = po/doc/reload.pot source_lang = en -[calcurse.doc-repeat] +[o:lfleischer:p:calcurse:r:doc-repeat] file_filter = po/doc/repeat-<lang>.po source_file = po/doc/repeat.pot source_lang = en -[calcurse.doc-save] +[o:lfleischer:p:calcurse:r:doc-save] file_filter = po/doc/save-<lang>.po source_file = po/doc/save.pot source_lang = en -[calcurse.doc-tab] +[o:lfleischer:p:calcurse:r:doc-tab] file_filter = po/doc/tab-<lang>.po source_file = po/doc/tab.pot source_lang = en -[calcurse.doc-view] +[o:lfleischer:p:calcurse:r:doc-view] file_filter = po/doc/view-<lang>.po source_file = po/doc/view.pot source_lang = en -[calcurse.doc-vnote] +[o:lfleischer:p:calcurse:r:doc-vnote] file_filter = po/doc/vnote-<lang>.po source_file = po/doc/vnote.pot source_lang = en @@ -1,6 +1,70 @@ Release Notes ============= +Version 4.8.1 (2023-05-22) +-------------------------- + +- Bug fixes: + + * Fixed characters in weekly view. + + * AsciiDoc checks are skipped if --disable-docs is used. + + * Fixed import for iCal files with empty description (fixed by Marian + Buschsieweke). + + * Fixed handling of note files edited outside calcurse (fixed by Nicholas + Johnson). + + * Fixed handling of recurrent open-ended appointments at 00:00. + + * Default description for items with empty descriptions (reported and + partially implemented by Jonathan van der Steege). + +- New calcurse-caldav features: + + * The PasswordCommand option can now be used to manage passwords in an + external program and is the new recommended way of storing passwords for + calcurse-caldav (implemented by Ryan Lue). + +Version 4.8.0 (2022-04-16) +-------------------------- + +- New features: + + * Support any weekday as first day of week; previously, only Sunday and + Monday were allowed (implemented by Morgan Seltzer). + + * Configuration of the format in which appointment time is displayed + (implemented by mercurialmoon). + + * Actions without key bindings. + + * generic-prev-view key binding to cycle backwards through windows + (implemented by Aurora). + + * Support for Home/End keys in text input mode. + +- Bug fixes: + + * Support compilation on big-endian systems (reported by nmeum). + + * Fixed --docdir support (fixed by Marco Sirabella). + + * Allow newlines in iCal SUMMARY by replacing them with blanks (reported by + Matthias Braun). + + * Fixed sidebar configuration sometimes not increasing width (fixed by + Morgan Seltzer). + + * Layout change recognizes changed appointment space; before this change, a + layout change did not update the maximum number of appointments visible + until the config menu was left (fixed by Morgan Seltzer). + +- calcurse-caldav bug fixes: + + * Fixed InsecureSSL support (reported by Pitido). + Version 4.7.1 (2021-04-11) -------------------------- @@ -1,4 +1,4 @@ -Copyright (c) 2004-2022 calcurse Development Team <misc@calcurse.org> +Copyright (c) 2004-2023 calcurse Development Team <misc@calcurse.org> All rights reserved. Redistribution and use in source and binary forms, with or without @@ -1,17 +1,21 @@ -calcurse -======== +# calcurse [![Build and test](https://github.com/lfos/calcurse/actions/workflows/make.yml/badge.svg)](https://github.com/lfos/calcurse/actions/workflows/make.yml) [![Lint Python](https://github.com/lfos/calcurse/actions/workflows/lint_python.yml/badge.svg)](https://github.com/lfos/calcurse/actions/workflows/lint_python.yml) ![Demo](https://calcurse.org/images/demo.gif) -Building --------- +## Installation -Install the following build dependencies. If your distro segments development -files from core packages (i.e., \*-devel or \*-dev packages), you may need to -install those as well: +calcurse is available on a number of Linux distributions: + +[![Packaging status](https://repology.org/badge/vertical-allrepos/calcurse.svg)](https://repology.org/project/calcurse/versions) + +## Building from Source + +Install the following build dependencies. If your distribution segments +development files from core packages (i.e., \*-devel or \*-dev packages), you +may need to install those as well: * gcc * autoconf-archive @@ -31,8 +35,7 @@ and install calcurse: Note that `make install` needs to be run as root. When working on a Git checkout, you need to run `./autogen.sh` before `./configure`. -Package Overview ----------------- +## Source Overview * `build-aux`: auxiliary files for the build process * `contrib`: useful tools such as hooks or the CalDAV synchronization script @@ -42,8 +45,7 @@ Package Overview * `src`: the actual calcurse source files * `test`: test suite and test cases for calcurse -Authors -------- +## Authors calcurse was created by Frederic Culot in 2004. Since 2011, the project is maintained by Lukas Fleischer. Many core features added to calcurse since 2017 @@ -53,8 +55,7 @@ Of course, there are numerous other contributors. Check the Git commit log and the `Thanks` section in the manual for a list of people who have contributed by reporting bugs, sending fixes, or suggesting improvements. -Contributing and Donations --------------------------- +## Contributing and Donations Patches, bug reports and other requests are always welcome! You can submit them to one of our mailing lists (check the [patch submission @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2004-2022 calcurse Development Team <misc@calcurse.org> +# Copyright (c) 2004-2023 calcurse Development Team <misc@calcurse.org> # All rights reserved. # # Redistribution and use in source and binary forms, with or without diff --git a/build-aux/git-version-gen b/build-aux/git-version-gen index fe1ec84..40c04b5 100755 --- a/build-aux/git-version-gen +++ b/build-aux/git-version-gen @@ -6,7 +6,7 @@ then exit 1 fi -DEF_VER=4.7.0 +DEF_VER=4.8.1 VERFILE="$1" if [ -d '.git' ] diff --git a/configure.ac b/configure.ac index e7594c5..da211d0 100644 --- a/configure.ac +++ b/configure.ac @@ -1,16 +1,14 @@ #------------------------------------------------------------------------------- # Init #------------------------------------------------------------------------------- -AC_PREREQ(2.59) -AC_INIT([calcurse], - m4_esyscmd([build-aux/git-version-gen .version]), - [bugs@calcurse.org]) +AC_PREREQ([2.71]) +AC_INIT([calcurse],[m4_esyscmd(build-aux/git-version-gen .version)],[bugs@calcurse.org]) AM_INIT_AUTOMAKE #m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])]) AM_GNU_GETTEXT([external]) -AM_GNU_GETTEXT_VERSION([0.14.1]) +AM_GNU_GETTEXT_VERSION([0.19.8]) AC_CONFIG_SRCDIR([src/calcurse.c]) -AC_CONFIG_HEADER([config.h]) +AC_CONFIG_HEADERS([config.h]) #------------------------------------------------------------------------------- # Checks for system type #------------------------------------------------------------------------------- @@ -23,7 +21,6 @@ AC_C_BIGENDIAN #------------------------------------------------------------------------------- # Checks for header files #------------------------------------------------------------------------------- -AC_HEADER_STDC AC_CHECK_HEADERS([ctype.h getopt.h locale.h math.h signal.h stdio.h stdlib.h \ string.h sys/stat.h sys/types.h sys/wait.h time.h unistd.h \ fcntl.h paths.h errno.h limits.h regex.h]) @@ -62,7 +59,6 @@ AC_ARG_ENABLE(docs, [enabledocs=$enableval], [enabledocs=yes]) if test x"$enabledocs" != x"yes"; then enabledocs=no - AC_MSG_WARN([Skipping documentation!]) fi AC_MSG_CHECKING([whether to include documentation]) AC_MSG_RESULT($enabledocs) @@ -73,7 +69,21 @@ AC_ARG_WITH(asciidoc, [use AsciiDoc to regenerate documentation]), [use_asciidoc=$withval], [use_asciidoc="auto"]) -if test x"$use_asciidoc" = x"auto"; then +if test x"$enabledocs" = x"no" -o x"$use_asciidoc" = x"no"; then + AC_MSG_WARN([Will not rebuild documentation!]) + have_asciidoc=no + have_a2x=no +elif test x"$use_asciidoc" = x"yes"; then + AC_PATH_PROG([ASCIIDOC], [asciidoc]) + if test -z "$ASCIIDOC"; then + AC_MSG_ERROR([AsciiDoc not found and "--with-asciidoc" specified!]) + fi + AC_PATH_PROG([A2X], [a2x]) + if test -z "$A2X"; then + AC_MSG_ERROR([a2x not found and "--with-asciidoc" specified!]) + fi + have_asciidoc=yes +elif test x"$use_asciidoc" = x"auto"; then AC_PATH_PROG([ASCIIDOC], [asciidoc]) if test -z "$ASCIIDOC"; then have_asciidoc=no @@ -98,20 +108,6 @@ if test x"$use_asciidoc" = x"auto"; then else have_a2x=yes fi -elif test x"$use_asciidoc" = x"yes"; then - AC_PATH_PROG([ASCIIDOC], [asciidoc]) - if test -z "$ASCIIDOC"; then - AC_MSG_ERROR([AsciiDoc not found and "--with-asciidoc" specified!]) - fi - AC_PATH_PROG([A2X], [a2x]) - if test -z "$A2X"; then - AC_MSG_ERROR([a2x not found and "--with-asciidoc" specified!]) - fi - have_asciidoc=yes -elif test x"$use_asciidoc" = x"no"; then - AC_MSG_WARN([Will not rebuild documentation!]) - have_asciidoc=no - have_a2x=no fi AM_CONDITIONAL(HAVE_ASCIIDOC, test $have_asciidoc = yes) AM_CONDITIONAL(HAVE_A2X, test $have_a2x = yes) @@ -138,9 +134,10 @@ AM_CONDITIONAL(CALCURSE_MEMORY_DEBUG, test x$memdebug = xyes) #------------------------------------------------------------------------------- # Create Makefiles #------------------------------------------------------------------------------- -AC_OUTPUT(Makefile doc/Makefile src/Makefile test/Makefile \ +AC_CONFIG_FILES([Makefile doc/Makefile src/Makefile test/Makefile \ scripts/Makefile po/Makefile.in po/Makefile \ - contrib/caldav/Makefile contrib/vdir/Makefile) + contrib/caldav/Makefile contrib/vdir/Makefile]) +AC_OUTPUT #------------------------------------------------------------------------------- # Summary #------------------------------------------------------------------------------- diff --git a/contrib/caldav/README.md b/contrib/caldav/README.md index a842081..b464dc9 100644 --- a/contrib/caldav/README.md +++ b/contrib/caldav/README.md @@ -34,13 +34,12 @@ argument. You can choose between the following initialization modes: For subsequent calcurse-caldav invocations, you don't need to specify any additional parameters. -You can specify a username and password for basic authentication in the -config file. Alternatively, the password can be passed securely from another -program (such as *pass*) via the `CALCURSE_CALDAV_PASSWORD` environment variable like -so: -``` -CALCURSE_CALDAV_PASSWORD=$(pass show calcurse) calcurse-caldav -``` +Specify your HTTP Basic authentication credentials under the config file's +`Auth` section. The most secure approach is to save your password in a CLI +encrypted password store (_e.g.,_ [pass](https://www.passwordstore.org/)), and +then set `PasswordCommand` to the shell command used to retrieve it. +If security is not a priority, you may store your password in plain text +instead. Hooks ----- diff --git a/contrib/caldav/calcurse-caldav.py b/contrib/caldav/calcurse-caldav.py index 99e2e6a..f9488e6 100755 --- a/contrib/caldav/calcurse-caldav.py +++ b/contrib/caldav/calcurse-caldav.py @@ -6,6 +6,7 @@ import configparser import os import pathlib import re +import shlex import subprocess import sys import textwrap @@ -30,6 +31,7 @@ class Config: self._map = { 'Auth': { 'Password': None, + 'PasswordCommand': None, 'Username': None, }, 'CustomHeaders': {}, @@ -657,9 +659,6 @@ verbose = args.verbose debug = args.debug debug_raw = args.debug_raw -# Read environment variables -password = os.getenv('CALCURSE_CALDAV_PASSWORD') - # Read configuration. config = Config(configfn) @@ -674,7 +673,17 @@ path = config.get('General', 'Path') sync_filter = config.get('General', 'SyncFilter') verbose = verbose or config.get('General', 'Verbose') -password = password or config.get('Auth', 'Password') +if os.getenv('CALCURSE_CALDAV_PASSWORD'): + # This approach is deprecated, but preserved for backwards compatibility + password = os.getenv('CALCURSE_CALDAV_PASSWORD') +elif config.get('Auth', 'Password'): + password = config.get('Auth', 'Password') +elif config.get('Auth', 'PasswordCommand'): + tokenized_cmd = shlex.split(config.get('Auth', 'PasswordCommand')) + password = subprocess.run(tokenized_cmd, capture_output=True).stdout.decode('UTF-8') +else: + password = None + username = config.get('Auth', 'Username') client_id = config.get('OAuth2', 'ClientID') diff --git a/contrib/caldav/config.sample b/contrib/caldav/config.sample index e2c6c2d..0ba8fa8 100644 --- a/contrib/caldav/config.sample +++ b/contrib/caldav/config.sample @@ -48,11 +48,13 @@ DryRun = Yes # Enable this if you want detailed logs written to stdout. Verbose = Yes -# Credentials for HTTP Basic Authentication. Leave this commented out if you do -# not want to use authentication. +# Credentials for HTTP Basic Authentication (if required). +# Set `Password` to your password in plaintext (unsafe), +# or `PasswordCommand` to a shell command that retrieves it (recommended). #[Auth] #Username = user -#Password = pass +#Password = password +#PasswordCommand = pass baikal # Optionally specify additional HTTP headers here. #[CustomHeaders] diff --git a/doc/calcurse.1.txt b/doc/calcurse.1.txt index faa81ae..1f79f9a 100644 --- a/doc/calcurse.1.txt +++ b/doc/calcurse.1.txt @@ -1,6 +1,6 @@ //// /* - * Copyright (c) 2004-2022 calcurse Development Team <misc@calcurse.org> + * Copyright (c) 2004-2023 calcurse Development Team <misc@calcurse.org> * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -764,5 +764,5 @@ AUTHORS COPYRIGHT --------- -Copyright (c) 2004-2022 calcurse Development Team. +Copyright (c) 2004-2023 calcurse Development Team. This software is released under the BSD License. diff --git a/doc/credits.txt b/doc/credits.txt index d43ea00..e1f5ae7 100644 --- a/doc/credits.txt +++ b/doc/credits.txt @@ -1,7 +1,7 @@ Calcurse - text-based organizer =============================== -Copyright (c) 2004-2022 calcurse Development Team +Copyright (c) 2004-2023 calcurse Development Team All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/doc/de/credits.txt b/doc/de/credits.txt index d43ea00..e1f5ae7 100644 --- a/doc/de/credits.txt +++ b/doc/de/credits.txt @@ -1,7 +1,7 @@ Calcurse - text-based organizer =============================== -Copyright (c) 2004-2022 calcurse Development Team +Copyright (c) 2004-2023 calcurse Development Team All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/doc/es/credits.txt b/doc/es/credits.txt index d43ea00..e1f5ae7 100644 --- a/doc/es/credits.txt +++ b/doc/es/credits.txt @@ -1,7 +1,7 @@ Calcurse - text-based organizer =============================== -Copyright (c) 2004-2022 calcurse Development Team +Copyright (c) 2004-2023 calcurse Development Team All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/doc/fr/credits.txt b/doc/fr/credits.txt index d43ea00..e1f5ae7 100644 --- a/doc/fr/credits.txt +++ b/doc/fr/credits.txt @@ -1,7 +1,7 @@ Calcurse - text-based organizer =============================== -Copyright (c) 2004-2022 calcurse Development Team +Copyright (c) 2004-2023 calcurse Development Team All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/doc/manual.txt b/doc/manual.txt index d88269b..03a27ff 100644 --- a/doc/manual.txt +++ b/doc/manual.txt @@ -1,6 +1,6 @@ //// /* - * Copyright (c) 2004-2022 calcurse Development Team <misc@calcurse.org> + * Copyright (c) 2004-2023 calcurse Development Team <misc@calcurse.org> * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -143,7 +143,7 @@ Install process First you need to gunzip and untar the source archive: ---- -$ tar zxvf calcurse-4.7.0.tar.gz +$ tar zxvf calcurse-4.8.1.tar.gz ---- Once you meet the requirements and have extracted the archive, the install diff --git a/doc/nl/credits.txt b/doc/nl/credits.txt index d43ea00..e1f5ae7 100644 --- a/doc/nl/credits.txt +++ b/doc/nl/credits.txt @@ -1,7 +1,7 @@ Calcurse - text-based organizer =============================== -Copyright (c) 2004-2022 calcurse Development Team +Copyright (c) 2004-2023 calcurse Development Team All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/doc/pt_BR/credits.txt b/doc/pt_BR/credits.txt index 7a23199..82efeb5 100644 --- a/doc/pt_BR/credits.txt +++ b/doc/pt_BR/credits.txt @@ -1,7 +1,7 @@ Calcurse - organizador baseado em texto ======================================= -Copyright (c) 2004-2022 Equipe de Desenvolvimento do Calcurse +Copyright (c) 2004-2023 Equipe de Desenvolvimento do Calcurse Todos os direitos reservados. A redistribuição e uso na forma de código-fonte e binário, com ou diff --git a/doc/ru/credits.txt b/doc/ru/credits.txt index d43ea00..e1f5ae7 100644 --- a/doc/ru/credits.txt +++ b/doc/ru/credits.txt @@ -1,7 +1,7 @@ Calcurse - text-based organizer =============================== -Copyright (c) 2004-2022 calcurse Development Team +Copyright (c) 2004-2023 calcurse Development Team All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/doc/submitting-patches.txt b/doc/submitting-patches.txt index 356fe9f..6514949 100644 --- a/doc/submitting-patches.txt +++ b/doc/submitting-patches.txt @@ -1,6 +1,6 @@ //// /* - * Copyright (c) 2004-2022 calcurse Development Team <misc@calcurse.org> + * Copyright (c) 2004-2023 calcurse Development Team <misc@calcurse.org> * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/po/calcurse.pot b/po/calcurse.pot index 74a21fb..f1894e3 100644 --- a/po/calcurse.pot +++ b/po/calcurse.pot @@ -1,14 +1,14 @@ # SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR calcurse Development Team <misc@calcurse.org> -# This file is distributed under the same license as the PACKAGE package. +# This file is distributed under the same license as the calcurse package. # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. # #, fuzzy msgid "" msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" +"Project-Id-Version: calcurse 4.8.1\n" "Report-Msgid-Bugs-To: bugs@calcurse.org\n" -"POT-Creation-Date: 2022-04-16 18:30-0400\n" +"POT-Creation-Date: 2023-05-22 14:19-0400\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -50,7 +50,7 @@ msgstr "" msgid "calcurse %s -- text-based organizer\n" msgstr "" -msgid "Copyright (c) 2004-2022 calcurse Development Team." +msgid "Copyright (c) 2004-2023 calcurse Development Team." msgstr "" msgid "This is free software; see the source for copying conditions." @@ -581,6 +581,12 @@ msgstr "" msgid "unknown ical type" msgstr "" +msgid "(empty)" +msgstr "" + +msgid "ical_store_event: out of memory" +msgstr "" + msgid "need DTSTART to determine event type." msgstr "" @@ -1767,7 +1773,7 @@ msgstr "" msgid "" "\n" -"Copyright (c) 2004-2022 calcurse Development Team.\n" +"Copyright (c) 2004-2023 calcurse Development Team.\n" "This is free software; see the source for copying conditions.\n" msgstr "" @@ -14,7 +14,7 @@ msgid "" msgstr "" "Project-Id-Version: calcurse\n" "Report-Msgid-Bugs-To: bugs@calcurse.org\n" -"POT-Creation-Date: 2022-04-16 18:30-0400\n" +"POT-Creation-Date: 2023-05-22 14:19-0400\n" "PO-Revision-Date: 2020-10-12 15:20+0000\n" "Last-Translator: Lukas Fleischer\n" "Language-Team: German (http://www.transifex.com/lfleischer/calcurse/language/" @@ -59,7 +59,7 @@ msgstr "Der Aufruf `calcurse -h` zeigt weitere Hilfen." msgid "calcurse %s -- text-based organizer\n" msgstr "calcurse %s -- Terminplaner im Textmodus\n" -msgid "Copyright (c) 2004-2022 calcurse Development Team." +msgid "Copyright (c) 2004-2023 calcurse Development Team." msgstr "" msgid "This is free software; see the source for copying conditions." @@ -608,6 +608,13 @@ msgstr "Hauptspeicher reicht nicht aus" msgid "unknown ical type" msgstr "Unbekannter ICal-Typ" +msgid "(empty)" +msgstr "" + +#, fuzzy +msgid "ical_store_event: out of memory" +msgstr "xcalloc: Speicher ist voll" + msgid "need DTSTART to determine event type." msgstr "" @@ -1857,7 +1864,7 @@ msgstr "Verwendung: calcurse-upgrade [-h|-v|--config <file>]" #, fuzzy msgid "" "\n" -"Copyright (c) 2004-2022 calcurse Development Team.\n" +"Copyright (c) 2004-2023 calcurse Development Team.\n" "This is free software; see the source for copying conditions.\n" msgstr "This is free software; see the source for copying conditions." @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: calcurse\n" "Report-Msgid-Bugs-To: bugs@calcurse.org\n" -"POT-Creation-Date: 2022-04-16 18:30-0400\n" +"POT-Creation-Date: 2023-05-22 14:19-0400\n" "PO-Revision-Date: 2006-07-03 00:05+0100\n" "Last-Translator: Neil Williams <linux@codehelp.co.uk>\n" "Language-Team: English/GB <en_GB@li.org>\n" @@ -49,7 +49,7 @@ msgstr "" msgid "calcurse %s -- text-based organizer\n" msgstr "" -msgid "Copyright (c) 2004-2022 calcurse Development Team." +msgid "Copyright (c) 2004-2023 calcurse Development Team." msgstr "" msgid "This is free software; see the source for copying conditions." @@ -582,6 +582,12 @@ msgstr "" msgid "unknown ical type" msgstr "" +msgid "(empty)" +msgstr "" + +msgid "ical_store_event: out of memory" +msgstr "" + msgid "need DTSTART to determine event type." msgstr "" @@ -1768,7 +1774,7 @@ msgstr "" msgid "" "\n" -"Copyright (c) 2004-2022 calcurse Development Team.\n" +"Copyright (c) 2004-2023 calcurse Development Team.\n" "This is free software; see the source for copying conditions.\n" msgstr "" @@ -12,7 +12,7 @@ msgid "" msgstr "" "Project-Id-Version: calcurse\n" "Report-Msgid-Bugs-To: bugs@calcurse.org\n" -"POT-Creation-Date: 2022-04-16 18:30-0400\n" +"POT-Creation-Date: 2023-05-22 14:19-0400\n" "PO-Revision-Date: 2020-10-12 15:20+0000\n" "Last-Translator: Lukas Fleischer\n" "Language-Team: Spanish (http://www.transifex.com/lfleischer/calcurse/" @@ -57,7 +57,7 @@ msgstr "Consulte `calcurse -h` para más información." msgid "calcurse %s -- text-based organizer\n" msgstr "calcurse %s -- organizador basado en texto\n" -msgid "Copyright (c) 2004-2022 calcurse Development Team." +msgid "Copyright (c) 2004-2023 calcurse Development Team." msgstr "" msgid "This is free software; see the source for copying conditions." @@ -617,6 +617,13 @@ msgstr "memoria agotada" msgid "unknown ical type" msgstr "tipo ical desconocido" +msgid "(empty)" +msgstr "" + +#, fuzzy +msgid "ical_store_event: out of memory" +msgstr "xcalloc: memoria agotada" + msgid "need DTSTART to determine event type." msgstr "" @@ -1889,7 +1896,7 @@ msgstr "Uso: calcurse-upgrade [-h|-v|--config <file>]" #, fuzzy msgid "" "\n" -"Copyright (c) 2004-2022 calcurse Development Team.\n" +"Copyright (c) 2004-2023 calcurse Development Team.\n" "This is free software; see the source for copying conditions.\n" msgstr "" "Esto es software libre; consulte el código fuente para ver las condiciones " @@ -14,7 +14,7 @@ msgid "" msgstr "" "Project-Id-Version: calcurse\n" "Report-Msgid-Bugs-To: bugs@calcurse.org\n" -"POT-Creation-Date: 2022-04-16 18:30-0400\n" +"POT-Creation-Date: 2023-05-22 14:19-0400\n" "PO-Revision-Date: 2020-10-12 15:20+0000\n" "Last-Translator: Lukas Fleischer\n" "Language-Team: French (http://www.transifex.com/lfleischer/calcurse/language/" @@ -67,7 +67,7 @@ msgstr "Tapez `calcurse -h` pour plus d'informations" msgid "calcurse %s -- text-based organizer\n" msgstr "calcurse %s -- organiseur en mode texte\n" -msgid "Copyright (c) 2004-2022 calcurse Development Team." +msgid "Copyright (c) 2004-2023 calcurse Development Team." msgstr "" msgid "This is free software; see the source for copying conditions." @@ -642,6 +642,13 @@ msgstr "dépassement de mémoire" msgid "unknown ical type" msgstr "type ical inconnu" +msgid "(empty)" +msgstr "" + +#, fuzzy +msgid "ical_store_event: out of memory" +msgstr "xcalloc : dépassement de mémoire" + msgid "need DTSTART to determine event type." msgstr "" @@ -1939,7 +1946,7 @@ msgstr "Utilisation : calcurse-upgrade [-h|-v|--config <fichier>]" #, fuzzy msgid "" "\n" -"Copyright (c) 2004-2022 calcurse Development Team.\n" +"Copyright (c) 2004-2023 calcurse Development Team.\n" "This is free software; see the source for copying conditions.\n" msgstr "" "Ceci est un logiciel libre : consultez le code source pour connaître les " @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: calcurse\n" "Report-Msgid-Bugs-To: bugs@calcurse.org\n" -"POT-Creation-Date: 2022-04-16 18:30-0400\n" +"POT-Creation-Date: 2023-05-22 14:19-0400\n" "PO-Revision-Date: 2020-10-12 15:20+0000\n" "Last-Translator: Lukas Fleischer\n" "Language-Team: Dutch (http://www.transifex.com/lfleischer/calcurse/language/" @@ -56,7 +56,7 @@ msgstr "Probeer `calcurse -h` voor meer informatie." msgid "calcurse %s -- text-based organizer\n" msgstr "calcurse %s -- tekst gebaseerde agenda\n" -msgid "Copyright (c) 2004-2022 calcurse Development Team." +msgid "Copyright (c) 2004-2023 calcurse Development Team." msgstr "" msgid "This is free software; see the source for copying conditions." @@ -598,6 +598,12 @@ msgstr "" msgid "unknown ical type" msgstr "onbekend ical type" +msgid "(empty)" +msgstr "" + +msgid "ical_store_event: out of memory" +msgstr "" + msgid "need DTSTART to determine event type." msgstr "" @@ -1807,7 +1813,7 @@ msgstr "" #, fuzzy msgid "" "\n" -"Copyright (c) 2004-2022 calcurse Development Team.\n" +"Copyright (c) 2004-2023 calcurse Development Team.\n" "This is free software; see the source for copying conditions.\n" msgstr "Dit is vrije software; bekijk de broncode voor de kopieer voorwaarden" diff --git a/po/pt_BR.po b/po/pt_BR.po index 0ed0d8f..b32085a 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: calcurse\n" "Report-Msgid-Bugs-To: bugs@calcurse.org\n" -"POT-Creation-Date: 2022-04-16 18:30-0400\n" +"POT-Creation-Date: 2023-05-22 14:19-0400\n" "PO-Revision-Date: 2020-10-12 15:20+0000\n" "Last-Translator: Lukas Fleischer\n" "Language-Team: Portuguese (Brazil) (http://www.transifex.com/lfleischer/" @@ -62,7 +62,7 @@ msgstr "Tente `calcurse -h` para mais informações." msgid "calcurse %s -- text-based organizer\n" msgstr "calcurse %s -- agenda baseada em texto\n" -msgid "Copyright (c) 2004-2022 calcurse Development Team." +msgid "Copyright (c) 2004-2023 calcurse Development Team." msgstr "" msgid "This is free software; see the source for copying conditions." @@ -637,6 +637,13 @@ msgstr "memória insuficiente" msgid "unknown ical type" msgstr "tipo de ical desconhecido" +msgid "(empty)" +msgstr "" + +#, fuzzy +msgid "ical_store_event: out of memory" +msgstr "xcalloc: memória insuficiente" + msgid "need DTSTART to determine event type." msgstr "" @@ -1473,8 +1480,8 @@ msgstr "(Formato de horário a ser exibido dentro da barra de notificação)" msgid "" "(Warn user if an appointment is within next 'notify-bar_warning' seconds)" msgstr "" -"(Avisa o usuário se um agendamento ocorrerá nos próximos \"notify-bar_warning" -"\" segundos)" +"(Avisa o usuário se um agendamento ocorrerá nos próximos \"notify-" +"bar_warning\" segundos)" msgid "(Command used to notify user of an upcoming appointment)" msgstr "(Comando usado para notificar usuário de um agendamento próximo)" @@ -1901,7 +1908,7 @@ msgstr "Uso: calcurse-upgrade [-h|-v|--config <arquivo>]" #, fuzzy msgid "" "\n" -"Copyright (c) 2004-2022 calcurse Development Team.\n" +"Copyright (c) 2004-2023 calcurse Development Team.\n" "This is free software; see the source for copying conditions.\n" msgstr "" "Esse programa é livre; veja o arquivo fonte para as condições aplicadas em " @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: calcurse\n" "Report-Msgid-Bugs-To: bugs@calcurse.org\n" -"POT-Creation-Date: 2022-04-16 18:30-0400\n" +"POT-Creation-Date: 2023-05-22 14:19-0400\n" "PO-Revision-Date: 2020-10-12 17:52+0000\n" "Last-Translator: Алексей Мехоношин <ruskidecko@gmail.com>\n" "Language-Team: Russian (http://www.transifex.com/lfleischer/calcurse/" @@ -20,9 +20,9 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" -"%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n" -"%100>=11 && n%100<=14)? 2 : 3);\n" +"Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " +"n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || " +"(n%100>=11 && n%100<=14)? 2 : 3);\n" msgid "null pointer" msgstr "пустой указатель" @@ -65,7 +65,7 @@ msgid "calcurse %s -- text-based organizer\n" msgstr "calcurse %s - текстовый органайзер\n" #, fuzzy -msgid "Copyright (c) 2004-2022 calcurse Development Team." +msgid "Copyright (c) 2004-2023 calcurse Development Team." msgstr "Копирайт (c) 2004-2020 calcurse Development Team." msgid "This is free software; see the source for copying conditions." @@ -616,6 +616,13 @@ msgstr "нехватка памяти" msgid "unknown ical type" msgstr "неизвестный тип ical" +msgid "(empty)" +msgstr "" + +#, fuzzy +msgid "ical_store_event: out of memory" +msgstr "xcalloc: out of memory" + msgid "need DTSTART to determine event type." msgstr "" @@ -1864,7 +1871,7 @@ msgstr "Использовать: calcurse-upgrade [-h|-v|--config <file>]" #, fuzzy msgid "" "\n" -"Copyright (c) 2004-2022 calcurse Development Team.\n" +"Copyright (c) 2004-2023 calcurse Development Team.\n" "This is free software; see the source for copying conditions.\n" msgstr "" "Это свободное ПО. Для ознакомления с условиями копирования ПО, ознакомьтесь " diff --git a/scripts/calcurse-upgrade.sh.in b/scripts/calcurse-upgrade.sh.in index 0145788..b6a7438 100644 --- a/scripts/calcurse-upgrade.sh.in +++ b/scripts/calcurse-upgrade.sh.in @@ -15,7 +15,7 @@ if [ "$#" -gt 0 ]; then elif [ "$1" = "-v" -o "$1" = "--version" ]; then echo "calcurse-upgrade @PACKAGE_VERSION@" echo "$(gettext " -Copyright (c) 2004-2022 calcurse Development Team. +Copyright (c) 2004-2023 calcurse Development Team. This is free software; see the source for copying conditions. ")" else diff --git a/src/apoint.c b/src/apoint.c index d6e9bc1..e138e5e 100644 --- a/src/apoint.c +++ b/src/apoint.c @@ -1,7 +1,7 @@ /* * Calcurse - text-based organizer * - * Copyright (c) 2004-2022 calcurse Development Team <misc@calcurse.org> + * Copyright (c) 2004-2023 calcurse Development Team <misc@calcurse.org> * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -1,7 +1,7 @@ /* * Calcurse - text-based organizer * - * Copyright (c) 2004-2022 calcurse Development Team <misc@calcurse.org> + * Copyright (c) 2004-2023 calcurse Development Team <misc@calcurse.org> * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -112,7 +112,7 @@ static void version_arg(void) { printf(_("calcurse %s -- text-based organizer\n"), VERSION); putchar('\n'); - printf("%s\n", _("Copyright (c) 2004-2022 calcurse Development Team.")); + printf("%s\n", _("Copyright (c) 2004-2023 calcurse Development Team.")); printf("%s\n", _("This is free software; see the source for copying conditions.")); } diff --git a/src/calcurse.c b/src/calcurse.c index 84d1a9b..c89d1dd 100644 --- a/src/calcurse.c +++ b/src/calcurse.c @@ -1,7 +1,7 @@ /* * Calcurse - text-based organizer * - * Copyright (c) 2004-2022 calcurse Development Team <misc@calcurse.org> + * Copyright (c) 2004-2023 calcurse Development Team <misc@calcurse.org> * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/src/calcurse.h b/src/calcurse.h index ee96bbe..8322416 100644 --- a/src/calcurse.h +++ b/src/calcurse.h @@ -1,7 +1,7 @@ /* * Calcurse - text-based organizer * - * Copyright (c) 2004-2022 calcurse Development Team <misc@calcurse.org> + * Copyright (c) 2004-2023 calcurse Development Team <misc@calcurse.org> * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -307,6 +307,7 @@ struct conf { }; #define EMPTY_DAY_DEFAULT "--" +#define EMPTY_EVENT_DESC_DEFAULT _("(empty description)") /* Daemon-related configuration. */ struct dmon_conf { diff --git a/src/config.c b/src/config.c index 9e2e40e..4e0f7db 100644 --- a/src/config.c +++ b/src/config.c @@ -1,7 +1,7 @@ /* * Calcurse - text-based organizer * - * Copyright (c) 2004-2022 calcurse Development Team <misc@calcurse.org> + * Copyright (c) 2004-2023 calcurse Development Team <misc@calcurse.org> * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/src/custom.c b/src/custom.c index 13570c6..2cd385c 100644 --- a/src/custom.c +++ b/src/custom.c @@ -1,7 +1,7 @@ /* * Calcurse - text-based organizer * - * Copyright (c) 2004-2022 calcurse Development Team <misc@calcurse.org> + * Copyright (c) 2004-2023 calcurse Development Team <misc@calcurse.org> * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -1,7 +1,7 @@ /* * Calcurse - text-based organizer * - * Copyright (c) 2004-2022 calcurse Development Team <misc@calcurse.org> + * Copyright (c) 2004-2023 calcurse Development Team <misc@calcurse.org> * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -198,7 +198,8 @@ static void day_add_item(int type, time_t start, time_t order, union aptev_ptr i /* Get the message of an item. */ char *day_item_get_mesg(struct day_item *day) { - switch (day->type) { + switch (day->type) + { case APPT: return day->item.apt->mesg; case EVNT: @@ -212,6 +213,15 @@ char *day_item_get_mesg(struct day_item *day) } } +/* Get the display message of an item. */ +char *day_item_get_display_mesg(struct day_item *day) +{ + char *msg = day_item_get_mesg(day); + if (msg[0] == '\0') + return EMPTY_EVENT_DESC_DEFAULT; + return msg; +} + /* Get the note attached to an item. */ char *day_item_get_note(struct day_item *day) { @@ -529,7 +539,7 @@ day_display_item(struct day_item *day, WINDOW *win, int incolor, int width, if (width <= 0) return; - char *mesg = day_item_get_mesg(day); + char *mesg = day_item_get_display_mesg(day); ch_recur = (day->type == RECUR_EVNT) ? '*' : ' '; ch_note = day_item_get_note(day) ? '>' : ' '; @@ -624,15 +634,19 @@ void day_popup_item(struct day_item *day) asprintf(¬epath, "%s%s", path_notes, day_item_get_note(day)); fp = fopen(notepath, "r"); + if (fp == NULL) { + item_in_popup(NULL, NULL, day_item_get_mesg(day), _("Event:")); + return; + } note_read_contents(note, note_size, fp); fclose(fp); mem_free(notepath); - asprintf(&msg, "%s\n\n%s\n%s", day_item_get_mesg(day), note_heading, note); + asprintf(&msg, "%s\n\n%s\n%s", day_item_get_display_mesg(day), note_heading, note); item_in_popup(NULL, NULL, msg, _("Event:")); mem_free(msg); } else { - item_in_popup(NULL, NULL, day_item_get_mesg(day), _("Event:")); + item_in_popup(NULL, NULL, day_item_get_display_mesg(day), _("Event:")); } } else if (day->type == APPT || day->type == RECUR_APPT) { char a_st[100], a_end[100]; @@ -651,15 +665,19 @@ void day_popup_item(struct day_item *day) asprintf(¬epath, "%s%s", path_notes, day_item_get_note(day)); fp = fopen(notepath, "r"); + if (fp == NULL) { + item_in_popup(a_st, a_end, day_item_get_mesg(day), _("Appointment:")); + return; + } note_read_contents(note, note_size, fp); fclose(fp); mem_free(notepath); - asprintf(&msg, "%s\n\n%s\n%s", day_item_get_mesg(day), note_heading, note); + asprintf(&msg, "%s\n\n%s\n%s", day_item_get_display_mesg(day), note_heading, note); item_in_popup(a_st, a_end, msg, _("Appointment:")); mem_free(msg); } else { - item_in_popup(a_st, a_end, day_item_get_mesg(day), _("Appointment:")); + item_in_popup(a_st, a_end, day_item_get_display_mesg(day), _("Appointment:")); } } else { EXIT(_("unknown item type")); @@ -1,7 +1,7 @@ /* * Calcurse - text-based organizer * - * Copyright (c) 2004-2022 calcurse Development Team <misc@calcurse.org> + * Copyright (c) 2004-2023 calcurse Development Team <misc@calcurse.org> * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/src/event.c b/src/event.c index f3a6298..7c371e4 100644 --- a/src/event.c +++ b/src/event.c @@ -1,7 +1,7 @@ /* * Calcurse - text-based organizer * - * Copyright (c) 2004-2022 calcurse Development Team <misc@calcurse.org> + * Copyright (c) 2004-2023 calcurse Development Team <misc@calcurse.org> * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/src/getstring.c b/src/getstring.c index 3e2b4da..8ea5df5 100644 --- a/src/getstring.c +++ b/src/getstring.c @@ -1,7 +1,7 @@ /* * Calcurse - text-based organizer * - * Copyright (c) 2004-2022 calcurse Development Team <misc@calcurse.org> + * Copyright (c) 2004-2023 calcurse Development Team <misc@calcurse.org> * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -1,7 +1,7 @@ /* * Calcurse - text-based organizer * - * Copyright (c) 2004-2022 calcurse Development Team <misc@calcurse.org> + * Copyright (c) 2004-2023 calcurse Development Team <misc@calcurse.org> * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/src/hooks.c b/src/hooks.c index 1812e0d..f649076 100644 --- a/src/hooks.c +++ b/src/hooks.c @@ -1,7 +1,7 @@ /* * Calcurse - text-based organizer * - * Copyright (c) 2004-2022 calcurse Development Team <misc@calcurse.org> + * Copyright (c) 2004-2023 calcurse Development Team <misc@calcurse.org> * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/src/htable.h b/src/htable.h index 981003f..92be6e2 100644 --- a/src/htable.h +++ b/src/htable.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004-2022 calcurse Development Team <misc@calcurse.org> + * Copyright (c) 2004-2023 calcurse Development Team <misc@calcurse.org> * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -1,7 +1,7 @@ /* * Calcurse - text-based organizer * - * Copyright (c) 2004-2022 calcurse Development Team <misc@calcurse.org> + * Copyright (c) 2004-2023 calcurse Development Team <misc@calcurse.org> * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -520,6 +520,10 @@ ical_store_event(char *mesg, char *note, time_t day, time_t end, struct event *ev; struct recur_event *rev; + if (!mesg) + mesg = mem_strdup(_("(empty)")); + EXIT_IF(!mesg, _("ical_store_event: out of memory")); + /* * Repeating event. The end day is ignored, and the event becomes * one-day even if multi-day. @@ -572,6 +576,10 @@ ical_store_apoint(char *mesg, char *note, time_t start, long dur, struct recur_apoint *rapt; time_t day; + if (!mesg) + mesg = mem_strdup(_("(empty)")); + EXIT_IF(!mesg, _("ical_store_event: out of memory")); + if (has_alarm) state |= APOINT_NOTIFY; if (rpt) { @@ -1,7 +1,7 @@ /* * Calcurse - text-based organizer * - * Copyright (c) 2004-2022 calcurse Development Team <misc@calcurse.org> + * Copyright (c) 2004-2023 calcurse Development Team <misc@calcurse.org> * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -1,7 +1,7 @@ /* * Calcurse - text-based organizer * - * Copyright (c) 2004-2022 calcurse Development Team <misc@calcurse.org> + * Copyright (c) 2004-2023 calcurse Development Team <misc@calcurse.org> * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/src/listbox.c b/src/listbox.c index 7ac7a26..d86f540 100644 --- a/src/listbox.c +++ b/src/listbox.c @@ -1,7 +1,7 @@ /* * Calcurse - text-based organizer * - * Copyright (c) 2004-2022 calcurse Development Team <misc@calcurse.org> + * Copyright (c) 2004-2023 calcurse Development Team <misc@calcurse.org> * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/src/llist.c b/src/llist.c index 9d4cd9c..d31f004 100644 --- a/src/llist.c +++ b/src/llist.c @@ -1,7 +1,7 @@ /* * Calcurse - text-based organizer * - * Copyright (c) 2004-2022 calcurse Development Team <misc@calcurse.org> + * Copyright (c) 2004-2023 calcurse Development Team <misc@calcurse.org> * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/src/llist.h b/src/llist.h index 386dcf3..0dd15bf 100644 --- a/src/llist.h +++ b/src/llist.h @@ -1,7 +1,7 @@ /* * Calcurse - text-based organizer * - * Copyright (c) 2004-2022 calcurse Development Team <misc@calcurse.org> + * Copyright (c) 2004-2023 calcurse Development Team <misc@calcurse.org> * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/src/llist_ts.h b/src/llist_ts.h index 048077a..a4b6184 100644 --- a/src/llist_ts.h +++ b/src/llist_ts.h @@ -1,7 +1,7 @@ /* * Calcurse - text-based organizer * - * Copyright (c) 2004-2022 calcurse Development Team <misc@calcurse.org> + * Copyright (c) 2004-2023 calcurse Development Team <misc@calcurse.org> * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -1,7 +1,7 @@ /* * Calcurse - text-based organizer * - * Copyright (c) 2004-2022 calcurse Development Team <misc@calcurse.org> + * Copyright (c) 2004-2023 calcurse Development Team <misc@calcurse.org> * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -1,7 +1,7 @@ /* * Calcurse - text-based organizer * - * Copyright (c) 2004-2022 calcurse Development Team <misc@calcurse.org> + * Copyright (c) 2004-2023 calcurse Development Team <misc@calcurse.org> * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/src/notify.c b/src/notify.c index a358bd5..6eda361 100644 --- a/src/notify.c +++ b/src/notify.c @@ -1,7 +1,7 @@ /* * Calcurse - text-based organizer * - * Copyright (c) 2004-2022 calcurse Development Team <misc@calcurse.org> + * Copyright (c) 2004-2023 calcurse Development Team <misc@calcurse.org> * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -1,7 +1,7 @@ /* * Calcurse - text-based organizer * - * Copyright (c) 2004-2022 calcurse Development Team <misc@calcurse.org> + * Copyright (c) 2004-2023 calcurse Development Team <misc@calcurse.org> * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/src/queue.c b/src/queue.c index e6fce02..41cb69b 100644 --- a/src/queue.c +++ b/src/queue.c @@ -1,7 +1,7 @@ /* * Calcurse - text-based organizer * - * Copyright (c) 2004-2022 calcurse Development Team <misc@calcurse.org> + * Copyright (c) 2004-2023 calcurse Development Team <misc@calcurse.org> * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/src/recur.c b/src/recur.c index 64172ef..12f76b8 100644 --- a/src/recur.c +++ b/src/recur.c @@ -1,7 +1,7 @@ /* * Calcurse - text-based organizer * - * Copyright (c) 2004-2022 calcurse Development Team <misc@calcurse.org> + * Copyright (c) 2004-2023 calcurse Development Team <misc@calcurse.org> * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -1003,14 +1003,20 @@ static int find_occurrence(time_t start, long dur, struct rpt *rpt, llist_t *exc if (rpt->until && t >= NEXTDAY(rpt->until)) return 0; - /* Does it span the given day? */ - if (t + DUR(t) < day) + /* Does it span the given day? + * + * NOTE: An appointment ending at 00:00 is not considered to span the + * given day, unless the appointment is an appointment without + * specified end time, which is internally treated as appointment with + * duration 0. + */ + if (t + DUR(t) >= day || (t == day && dur == 0)) { + if (occurrence) + *occurrence = t; + return 1; + } else { return 0; - - if (occurrence) - *occurrence = t; - - return 1; + } } #undef DUR @@ -1,7 +1,7 @@ /* * Calcurse - text-based organizer * - * Copyright (c) 2004-2022 calcurse Development Team <misc@calcurse.org> + * Copyright (c) 2004-2023 calcurse Development Team <misc@calcurse.org> * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -1,7 +1,7 @@ /* * Calcurse - text-based organizer * - * Copyright (c) 2004-2022 calcurse Development Team <misc@calcurse.org> + * Copyright (c) 2004-2023 calcurse Development Team <misc@calcurse.org> * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -1,7 +1,7 @@ /* * Calcurse - text-based organizer * - * Copyright (c) 2004-2022 calcurse Development Team <misc@calcurse.org> + * Copyright (c) 2004-2023 calcurse Development Team <misc@calcurse.org> * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/src/strings.c b/src/strings.c index f05f78b..45c9310 100644 --- a/src/strings.c +++ b/src/strings.c @@ -1,7 +1,7 @@ /* * Calcurse - text-based organizer * - * Copyright (c) 2004-2022 calcurse Development Team <misc@calcurse.org> + * Copyright (c) 2004-2023 calcurse Development Team <misc@calcurse.org> * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -1,7 +1,7 @@ /* * Calcurse - text-based organizer * - * Copyright (c) 2004-2022 calcurse Development Team <misc@calcurse.org> + * Copyright (c) 2004-2023 calcurse Development Team <misc@calcurse.org> * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/src/ui-calendar.c b/src/ui-calendar.c index f386d58..c1719d8 100644 --- a/src/ui-calendar.c +++ b/src/ui-calendar.c @@ -1,7 +1,7 @@ /* * Calcurse - text-based organizer * - * Copyright (c) 2004-2022 calcurse Development Team <misc@calcurse.org> + * Copyright (c) 2004-2023 calcurse Development Team <misc@calcurse.org> * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -560,9 +560,8 @@ draw_weekly_view(struct scrollwin *sw, struct date *current_day) if (j != WEEKINDAYS - 1 && i != DAYSLICESNO - 1) { WINS_CALENDAR_LOCK; - mvwhline(sw->inner, OFFY + 2 + i, - OFFX + 3 + 4 * j, ACS_S9, - 2); + mvwaddstr(sw->inner, OFFY + 2 + i, + OFFX + 3 + 4 * j, "__"); WINS_CALENDAR_UNLOCK; } if (slices[i]) { @@ -593,9 +592,9 @@ draw_weekly_view(struct scrollwin *sw, struct date *current_day) /* Draw marks to indicate midday on the sides of the calendar. */ WINS_CALENDAR_LOCK; custom_apply_attr(sw->inner, ATTR_HIGHEST); - mvwhline(sw->inner, OFFY + 1 + DAYSLICESNO / 2, OFFX, ACS_S9, 1); - mvwhline(sw->inner, OFFY + 1 + DAYSLICESNO / 2, - OFFX + WCALWIDTH - 1, ACS_S9, 1); + mvwaddch(sw->inner, OFFY + 1 + DAYSLICESNO / 2, OFFX, '<'); + mvwaddch(sw->inner, OFFY + 1 + DAYSLICESNO / 2, + OFFX + WCALWIDTH - 1, '>'); custom_remove_attr(sw->inner, ATTR_HIGHEST); WINS_CALENDAR_UNLOCK; diff --git a/src/ui-day.c b/src/ui-day.c index 566ccd7..6a038fa 100644 --- a/src/ui-day.c +++ b/src/ui-day.c @@ -1,7 +1,7 @@ /* * Calcurse - text-based organizer * - * Copyright (c) 2004-2022 calcurse Development Team <misc@calcurse.org> + * Copyright (c) 2004-2023 calcurse Development Team <misc@calcurse.org> * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/src/ui-todo.c b/src/ui-todo.c index c715250..46933b3 100644 --- a/src/ui-todo.c +++ b/src/ui-todo.c @@ -1,7 +1,7 @@ /* * Calcurse - text-based organizer * - * Copyright (c) 2004-2022 calcurse Development Team <misc@calcurse.org> + * Copyright (c) 2004-2023 calcurse Development Team <misc@calcurse.org> * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -207,14 +207,16 @@ void ui_todo_draw(int n, WINDOW *win, int y, int hilt, void *cb_data) if (hilt) custom_apply_attr(win, ATTR_HIGHEST); - if (utf8_strwidth(todo->mesg) < width) { - mesg = todo->mesg; - } else { + mesg = todo->mesg; + if (mesg[0] == '\0') + mesg = EMPTY_EVENT_DESC_DEFAULT; + + if (utf8_strwidth(mesg) >= width) { width -= 3; - for (j = 0; todo->mesg[j] && width > 0; j++) { - if (!UTF8_ISCONT(todo->mesg[j])) - width -= utf8_width(&todo->mesg[j]); - buf[j] = todo->mesg[j]; + for (j = 0; mesg[j] && width > 0; j++) { + if (!UTF8_ISCONT(mesg[j])) + width -= utf8_width(&mesg[j]); + buf[j] = mesg[j]; } if (j) { buf[j - 1] = '.'; @@ -325,6 +327,11 @@ void ui_todo_popup_item(void) asprintf(¬epath, "%s%s", path_notes, item->note); fp = fopen(notepath, "r"); + if (fp == NULL) { + item_in_popup(NULL, NULL, item->mesg, _("TODO:")); + return; + } + note_read_contents(note, note_size, fp); fclose(fp); mem_free(notepath); @@ -1,7 +1,7 @@ /* * Calcurse - text-based organizer * - * Copyright (c) 2004-2022 calcurse Development Team <misc@calcurse.org> + * Copyright (c) 2004-2023 calcurse Development Team <misc@calcurse.org> * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/src/utils.c b/src/utils.c index 2640163..2d30bfc 100644 --- a/src/utils.c +++ b/src/utils.c @@ -1,7 +1,7 @@ /* * Calcurse - text-based organizer * - * Copyright (c) 2004-2022 calcurse Development Team <misc@calcurse.org> + * Copyright (c) 2004-2023 calcurse Development Team <misc@calcurse.org> * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -1,7 +1,7 @@ /* * Calcurse - text-based organizer * - * Copyright (c) 2004-2022 calcurse Development Team <misc@calcurse.org> + * Copyright (c) 2004-2023 calcurse Development Team <misc@calcurse.org> * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/src/vector.c b/src/vector.c index 8ab57b0..796ef8e 100644 --- a/src/vector.c +++ b/src/vector.c @@ -1,7 +1,7 @@ /* * Calcurse - text-based organizer * - * Copyright (c) 2004-2022 calcurse Development Team <misc@calcurse.org> + * Copyright (c) 2004-2023 calcurse Development Team <misc@calcurse.org> * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/src/vector.h b/src/vector.h index 9610924..7648df2 100644 --- a/src/vector.h +++ b/src/vector.h @@ -1,7 +1,7 @@ /* * Calcurse - text-based organizer * - * Copyright (c) 2004-2022 calcurse Development Team <misc@calcurse.org> + * Copyright (c) 2004-2023 calcurse Development Team <misc@calcurse.org> * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -1,7 +1,7 @@ /* * Calcurse - text-based organizer * - * Copyright (c) 2004-2022 calcurse Development Team <misc@calcurse.org> + * Copyright (c) 2004-2023 calcurse Development Team <misc@calcurse.org> * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/test/run-test.c b/test/run-test.c index b41226d..41d55ad 100644 --- a/test/run-test.c +++ b/test/run-test.c @@ -1,7 +1,7 @@ /* * Calcurse - text-based organizer * - * Copyright (c) 2004-2022 calcurse Development Team <misc@calcurse.org> + * Copyright (c) 2004-2023 calcurse Development Team <misc@calcurse.org> * All rights reserved. * * Redistribution and use in source and binary forms, with or without |