diff options
author | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:21:16 +0200 |
---|---|---|
committer | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:21:16 +0200 |
commit | 6d15812d7d93370d47e63f6bf9f70be40f5a9c5d (patch) | |
tree | 8e7bde205084ca23e1766d42305824c927c2ee5f /RealtimeSync/tray_menu.cpp | |
parent | 5.6 (diff) | |
download | FreeFileSync-6d15812d7d93370d47e63f6bf9f70be40f5a9c5d.tar.gz FreeFileSync-6d15812d7d93370d47e63f6bf9f70be40f5a9c5d.tar.bz2 FreeFileSync-6d15812d7d93370d47e63f6bf9f70be40f5a9c5d.zip |
5.7
Diffstat (limited to 'RealtimeSync/tray_menu.cpp')
-rw-r--r-- | RealtimeSync/tray_menu.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/RealtimeSync/tray_menu.cpp b/RealtimeSync/tray_menu.cpp index 1a3898d6..e1f2b732 100644 --- a/RealtimeSync/tray_menu.cpp +++ b/RealtimeSync/tray_menu.cpp @@ -1,7 +1,7 @@ // ************************************************************************** // * This file is part of the FreeFileSync project. It is distributed under * // * GNU General Public License: http://www.gnu.org/licenses/gpl.html * -// * Copyright (C) ZenJu (zhnmju123 AT gmx DOT de) - All Rights Reserved * +// * Copyright (C) ZenJu (zenju AT gmx DOT de) - All Rights Reserved * // ************************************************************************** #include "tray_menu.h" @@ -25,6 +25,7 @@ #include <zen/build_info.h> #include <wx+/shell_execute.h> #include "gui_generated.h" +#include "../lib/resolve_path.h" using namespace rts; using namespace zen; @@ -107,7 +108,7 @@ private: build += L" x86"; assert_static(zen::is32BitBuild || zen::is64BitBuild); - wxMessageBox(L"RealtimeSync" L"\n\n" + replaceCpy(_("(Build: %x)"), L"%x", build), _("About"), wxOK); + wxMessageBox(L"RealtimeSync" L"\n\n" + replaceCpy(_("Build: %x"), L"%x", build), _("About"), wxOK); } break; } @@ -266,12 +267,12 @@ public: private: void OnTimerEvent(wxEvent& event) { - --secondsLeft; - if (secondsLeft < 0) + if (secondsLeft <= 0) { EndModal(BUTTON_RETRY); return; } + --secondsLeft; updateButtonLabel(); } @@ -323,7 +324,7 @@ rts::AbortReason rts::startDirectoryMonitor(const xmlAccess::XmlRealConfig& conf { const std::vector<Zstring> dirList = toZ(config.directories); - auto cmdLine = config.commandline; + wxString cmdLine = config.commandline; trim(cmdLine); if (cmdLine.empty()) @@ -382,7 +383,8 @@ rts::AbortReason rts::startDirectoryMonitor(const xmlAccess::XmlRealConfig& conf lastFileChanged.clear(); //make sure old name is not shown again after a directory reappears //execute command - zen::shellExecute(cmdLine, zen::EXEC_TYPE_SYNC); + auto cmdLineExp = utfCvrtTo<wxString>(expandMacros(utfCvrtTo<Zstring>(cmdLine))); + zen::shellExecute(cmdLineExp, zen::EXEC_TYPE_SYNC); callback.clearSchedule(); } }; |