From 3e4972ba4b2e1bd253d290a5783c0e0d483555e6 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Tue, 7 Jan 2014 22:23:39 -0500 Subject: [PATCH 1/4] Bug #1476 - #1476 Unicode indicators increase column width (thanks to Paul Kishimoto). --- ChangeLog | 1 + src/columns/ColDepends.cpp | 3 ++- src/columns/ColRecur.cpp | 3 ++- src/columns/ColStart.cpp | 3 ++- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6be9d177c..d557b44c9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -95,6 +95,7 @@ Bugs + #1414 Client does not verify SSL certificates (thanks to Scott Kroll). + #1415 Client should not require a SSL certificate if the server has a trusted certificate (thanks to Scott Kroll). + + #1476 Unicode indicators increase column width (thanks to Paul Kishimoto). + Fixed bug so that 'limit:page' now considers footnote messages. + Fixed bug where specifying an ID of 0 yielded all completed/deleted tasks (thanks to greenskeleton). diff --git a/src/columns/ColDepends.cpp b/src/columns/ColDepends.cpp index 4367be45d..dc24e6ade 100644 --- a/src/columns/ColDepends.cpp +++ b/src/columns/ColDepends.cpp @@ -30,6 +30,7 @@ #include #include #include +#include #include #include @@ -83,7 +84,7 @@ void ColumnDepends::measure (Task& task, unsigned int& minimum, unsigned int& ma std::vector blocking; dependencyGetBlocking (task, blocking); - if (_style == "indicator") minimum = maximum = context.config.get ("dependency.indicator").length (); + if (_style == "indicator") minimum = maximum = utf8_width (context.config.get ("dependency.indicator")); else if (_style == "count") minimum = maximum = 2 + format ((int) blocking.size ()).length (); else if (_style == "default" || _style == "list") diff --git a/src/columns/ColRecur.cpp b/src/columns/ColRecur.cpp index 5ec1fa3f8..7632bf7e2 100644 --- a/src/columns/ColRecur.cpp +++ b/src/columns/ColRecur.cpp @@ -30,6 +30,7 @@ #include #include #include +#include #include extern Context context; @@ -87,7 +88,7 @@ void ColumnRecur::measure (Task& task, unsigned int& minimum, unsigned int& maxi else if (_style == "indicator") { if (task.has (_name)) - minimum = maximum = context.config.get ("recurrence.indicator").length (); + minimum = maximum = utf8_width (context.config.get ("recurrence.indicator")); } else throw format (STRING_COLUMN_BAD_FORMAT, _name, _style); diff --git a/src/columns/ColStart.cpp b/src/columns/ColStart.cpp index f9e3fd861..6517e8a78 100644 --- a/src/columns/ColStart.cpp +++ b/src/columns/ColStart.cpp @@ -29,6 +29,7 @@ #include #include #include +#include #include extern Context context; @@ -77,7 +78,7 @@ void ColumnStart::measure (Task& task, unsigned int& minimum, unsigned int& maxi if (_style == "active") { if (! task.has ("end")) - minimum = maximum = context.config.get ("active.indicator").length (); + minimum = maximum = utf8_width (context.config.get ("active.indicator")); } else ColumnDate::measure (task, minimum, maximum); From 89d536c9017f134b024f9e9e56068ddce4417b9e Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Tue, 7 Jan 2014 23:34:06 -0500 Subject: [PATCH 2/4] Bug #1196 - Applied patch to fix the need for PATH_MAX on GNU/Hurd (thanks to Jakub Wilk). --- src/Path.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/Path.cpp b/src/Path.cpp index 27622509d..94657e240 100644 --- a/src/Path.cpp +++ b/src/Path.cpp @@ -35,6 +35,7 @@ #include #include #include +#include #include //////////////////////////////////////////////////////////////////////////////// @@ -248,17 +249,13 @@ std::string Path::expand (const std::string& in) else if (in.length () > 2 && in.substr (0, 2) == "./") { - char buf[PATH_MAX]; - getcwd (buf, PATH_MAX - 1); - copy = std::string (buf) + "/" + in.substr (2); + copy = Directory::cwd () + "/" + in.substr (2); } else if (in.length () > 1 && in[0] != '.' && in[0] != '/') { - char buf[PATH_MAX]; - getcwd (buf, PATH_MAX - 1); - copy = std::string (buf) + "/" + in; + copy = Directory::cwd () + "/" + in; } return copy; From 15524650d890d757334017e8d3ee2f31a55cfbf0 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Tue, 7 Jan 2014 23:47:43 -0500 Subject: [PATCH 3/4] Portability - Improved platform recognition (thanks to Jakub Wilk). --- CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 73525efb9..5c00a2d34 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,6 +13,8 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Linux") set (LINUX true) elseif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") set (DARWIN true) +elseif (${CMAKE_SYSTEM_NAME} MATCHES "kFreeBSD") + set (KFREEBSD true) elseif (${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD") set (FREEBSD true) elseif (${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD") @@ -21,9 +23,7 @@ elseif (${CMAKE_SYSTEM_NAME} MATCHES "NetBSD") set (NETBSD true) elseif (${CMAKE_SYSTEM_NAME} MATCHES "SunOS") set (SOLARIS true) -elseif (${CMAKE_SYSTEM_NAME} MATCHES "GNU/kFreeBSD") - set (KFREEBSD true) -elseif (${CMAKE_SYSTEM_NAME} MATCHES "GNU/Hurd") +elseif (${CMAKE_SYSTEM_NAME} STREQUAL "GNU") set (GNUHURD true) else (${CMAKE_SYSTEM_NAME} MATCHES "Linux") set (UNKNOWN true) From 6819c216009bb919d4fbcd0260d2b2bca1f2f36a Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Wed, 8 Jan 2014 00:07:07 -0500 Subject: [PATCH 4/4] Bug #1477 - Pre-compiled static library (*.a) in source tarball (thanks to Jakub Wilk). --- CMakeLists.txt | 3 ++- ChangeLog | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5c00a2d34..90662f307 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -165,5 +165,6 @@ set (CPACK_SOURCE_IGNORE_FILES "CMakeCache" "CMakeFiles" "CPackConfig" "CPackSo "_CPack_Packages" "cmake_install" "install_manifest" "Makefile$" "test" "package-config" "misc/*" "src/task$" "src/libtask.a" "src/columns/libcolumns.a" "src/commands/libcommands.a" - "src/shell/tasksh$" "auto.h$" "/\\.gitignore" "/\\.git/" "swp$") + "src/shell/tasksh$" "src/shell/libtasksh.a" "auto.h$" + "/\\.gitignore" "/\\.git/" "swp$") include (CPack) diff --git a/ChangeLog b/ChangeLog index d557b44c9..abaf24ccb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -96,6 +96,8 @@ Bugs + #1415 Client should not require a SSL certificate if the server has a trusted certificate (thanks to Scott Kroll). + #1476 Unicode indicators increase column width (thanks to Paul Kishimoto). + + #1477 Pre-compiled static library (*.a) in source tarball (thanks to Jakub + Wilk); + Fixed bug so that 'limit:page' now considers footnote messages. + Fixed bug where specifying an ID of 0 yielded all completed/deleted tasks (thanks to greenskeleton).