From 0eca2d3cf96a3092ac15dc818b777f859da03b08 Mon Sep 17 00:00:00 2001 From: B Stack Date: Sun, 17 May 2020 13:45:22 -0400 Subject: include fixes after forum t=7276 https://freefilesync.org/forum/viewtopic.php?t=7276#p24407 --- Changelog.txt | 4 +-- FreeFileSync/Source/Makefile | 2 +- FreeFileSync/Source/RealTimeSync/Makefile | 1 + FreeFileSync/Source/ui/taskbar.cpp | 28 --------------------- FreeFileSync/Source/ui/taskbar.h | 42 ------------------------------- zen/system.cpp | 8 +++--- 6 files changed, 8 insertions(+), 77 deletions(-) mode change 100755 => 100644 FreeFileSync/Source/Makefile mode change 100755 => 100644 FreeFileSync/Source/RealTimeSync/Makefile delete mode 100644 FreeFileSync/Source/ui/taskbar.cpp delete mode 100644 FreeFileSync/Source/ui/taskbar.h diff --git a/Changelog.txt b/Changelog.txt index e9c5ca3c..97ed93d6 100755 --- a/Changelog.txt +++ b/Changelog.txt @@ -1,5 +1,5 @@ -FreeFileSync 10.24 ------------------- +FreeFileSync 10.24 [2020-05-17] +------------------------------- Increased SFTP buffer sizes for faster upload/download New %WeekDay%, %WeekDayName", and %MonthName% macros Support Linux systems without lsb_release diff --git a/FreeFileSync/Source/Makefile b/FreeFileSync/Source/Makefile old mode 100755 new mode 100644 index 3e95aba8..eedfa711 --- a/FreeFileSync/Source/Makefile +++ b/FreeFileSync/Source/Makefile @@ -75,7 +75,6 @@ cppFiles+=ui/progress_indicator.cpp cppFiles+=ui/search_grid.cpp cppFiles+=ui/small_dlgs.cpp cppFiles+=ui/sync_cfg.cpp -cppFiles+=ui/taskbar.cpp cppFiles+=ui/tray_icon.cpp cppFiles+=ui/triple_splitter.cpp cppFiles+=ui/version_check.cpp @@ -100,6 +99,7 @@ cppFiles+=../../wx+/file_drop.cpp cppFiles+=../../wx+/grid.cpp cppFiles+=../../wx+/image_tools.cpp cppFiles+=../../wx+/graph.cpp +cppFiles+=../../wx+/taskbar.cpp cppFiles+=../../wx+/tooltip.cpp cppFiles+=../../wx+/image_resources.cpp cppFiles+=../../wx+/popup_dlg.cpp diff --git a/FreeFileSync/Source/RealTimeSync/Makefile b/FreeFileSync/Source/RealTimeSync/Makefile old mode 100755 new mode 100644 index 7c9630cd..6d2961ce --- a/FreeFileSync/Source/RealTimeSync/Makefile +++ b/FreeFileSync/Source/RealTimeSync/Makefile @@ -41,6 +41,7 @@ cppFiles+=../../../wx+/image_tools.cpp cppFiles+=../../../wx+/image_resources.cpp cppFiles+=../../../wx+/popup_dlg.cpp cppFiles+=../../../wx+/popup_dlg_generated.cpp +cppFiles+=../../../wx+/taskbar.cpp cppFiles+=../../../xBRZ/src/xbrz.cpp tmpPath = /tmp/$(exeName)_Make diff --git a/FreeFileSync/Source/ui/taskbar.cpp b/FreeFileSync/Source/ui/taskbar.cpp deleted file mode 100644 index 519a1ce1..00000000 --- a/FreeFileSync/Source/ui/taskbar.cpp +++ /dev/null @@ -1,28 +0,0 @@ -// ***************************************************************************** -// * This file is part of the FreeFileSync project. It is distributed under * -// * GNU General Public License: https://www.gnu.org/licenses/gpl-3.0 * -// * Copyright (C) Zenju (zenju AT freefilesync DOT org) - All Rights Reserved * -// ***************************************************************************** - -#include "taskbar.h" - - -using namespace zen; -using namespace fff; - - -class Taskbar::Impl -{ -public: - Impl(const wxFrame& window) { throw TaskbarNotAvailable(); } - void setStatus(Status status) {} - void setProgress(double fraction) {} -}; - -//######################################################################################################## - -Taskbar::Taskbar(const wxFrame& window) : pimpl_(std::make_unique(window)) {} //throw TaskbarNotAvailable -Taskbar::~Taskbar() {} - -void Taskbar::setStatus(Status status) { pimpl_->setStatus(status); } -void Taskbar::setProgress(double fraction) { pimpl_->setProgress(fraction); } diff --git a/FreeFileSync/Source/ui/taskbar.h b/FreeFileSync/Source/ui/taskbar.h deleted file mode 100644 index a8aca46b..00000000 --- a/FreeFileSync/Source/ui/taskbar.h +++ /dev/null @@ -1,42 +0,0 @@ -// ***************************************************************************** -// * This file is part of the FreeFileSync project. It is distributed under * -// * GNU General Public License: https://www.gnu.org/licenses/gpl-3.0 * -// * Copyright (C) Zenju (zenju AT freefilesync DOT org) - All Rights Reserved * -// ***************************************************************************** - -#ifndef TASKBAR_H_98170845709124456 -#define TASKBAR_H_98170845709124456 - -#include -#include - - -namespace fff -{ -class TaskbarNotAvailable {}; - -class Taskbar -{ -public: - Taskbar(const wxFrame& window); //throw TaskbarNotAvailable - ~Taskbar(); - - enum Status - { - STATUS_INDETERMINATE, - STATUS_NORMAL, - STATUS_ERROR, - STATUS_PAUSED - }; - - void setStatus(Status status); //noexcept - void setProgress(double fraction); //between [0, 1]; noexcept - -private: - class Impl; - const std::unique_ptr pimpl_; -}; - -} - -#endif //TASKBAR_H_98170845709124456 diff --git a/zen/system.cpp b/zen/system.cpp index aa967f71..f39fae84 100644 --- a/zen/system.cpp +++ b/zen/system.cpp @@ -116,11 +116,11 @@ std::wstring zen::getOsDescription() //throw FileError trim(osName, true, true, [](char c) { return c == '"' || c == '\''; }); trim(osVersion, true, true, [](char c) { return c == '"' || c == '\''; }); - if (osName .empty()) throw SysError(formatSystemError("/etc/os-release", L"", L"NAME missing.")); - if (osVersion.empty()) throw SysError(formatSystemError("/etc/os-release", L"", L"VERSION_ID missing.")); - + if (osName.empty()) throw SysError(formatSystemError("/etc/os-release", L"", L"NAME missing.")); + //VERSION_ID usually available, except for Arch Linux: https://freefilesync.org/forum/viewtopic.php?t=7276 //PRETTY_NAME? too wordy! e.g. "Fedora 17 (Beefy Miracle)" - return utfTo(osName + ' ' + osVersion); //e.g. "CentOS Linux 7" + + return utfTo(trimCpy(osName + ' ' + osVersion)); //e.g. "CentOS Linux 7" } catch (const SysError& e) { throw FileError(_("Cannot get process information."), e.toString()); } -- cgit