summaryrefslogtreecommitdiff
path: root/RealtimeSync
diff options
context:
space:
mode:
Diffstat (limited to 'RealtimeSync')
-rw-r--r--RealtimeSync/RealtimeSync.cbp12
-rw-r--r--RealtimeSync/application.cpp2
-rw-r--r--RealtimeSync/application.h2
-rw-r--r--RealtimeSync/gui_generated.cpp14
-rw-r--r--RealtimeSync/gui_generated.h6
-rw-r--r--RealtimeSync/main_dlg.cpp24
-rw-r--r--RealtimeSync/main_dlg.h5
-rw-r--r--RealtimeSync/makefile2
-rw-r--r--RealtimeSync/resources.cpp2
-rw-r--r--RealtimeSync/resources.h2
-rw-r--r--RealtimeSync/tray_menu.cpp14
-rw-r--r--RealtimeSync/tray_menu.h2
-rw-r--r--RealtimeSync/watcher.cpp2
-rw-r--r--RealtimeSync/watcher.h2
-rw-r--r--RealtimeSync/xml_ffs.cpp2
-rw-r--r--RealtimeSync/xml_ffs.h2
-rw-r--r--RealtimeSync/xml_proc.cpp2
-rw-r--r--RealtimeSync/xml_proc.h2
18 files changed, 50 insertions, 49 deletions
diff --git a/RealtimeSync/RealtimeSync.cbp b/RealtimeSync/RealtimeSync.cbp
index 24aca825..4cda30b1 100644
--- a/RealtimeSync/RealtimeSync.cbp
+++ b/RealtimeSync/RealtimeSync.cbp
@@ -27,9 +27,9 @@
<Add library="libwxbase28u.a" />
<Add library="libwxpng.a" />
<Add library="libwxzlib.a" />
- <Add library="libboost_thread-mgw47-mt-s-1_50.a" />
- <Add library="libboost_system-mgw47-mt-s-1_50.a" />
- <Add library="libboost_chrono-mgw47-mt-s-1_50.a" />
+ <Add library="libboost_thread-mgw47-mt-s-1_51.a" />
+ <Add library="libboost_system-mgw47-mt-s-1_51.a" />
+ <Add library="libboost_chrono-mgw47-mt-s-1_51.a" />
<Add directory="C:\Programme\C++\wxWidgets\lib\mingw_release_lib" />
</Linker>
<ExtraCommands>
@@ -56,9 +56,9 @@
<Add library="libwxbase28ud.a" />
<Add library="libwxpngd.a" />
<Add library="libwxzlibd.a" />
- <Add library="libboost_thread-mgw47-mt-sd-1_50.a" />
- <Add library="libboost_system-mgw47-mt-sd-1_50.a" />
- <Add library="libboost_chrono-mgw47-mt-sd-1_50.a" />
+ <Add library="libboost_thread-mgw47-mt-sd-1_51.a" />
+ <Add library="libboost_system-mgw47-mt-sd-1_51.a" />
+ <Add library="libboost_chrono-mgw47-mt-sd-1_51.a" />
<Add directory="C:\Program Files\C++\wxWidgets\lib\mingw_debug_dll" />
</Linker>
</Target>
diff --git a/RealtimeSync/application.cpp b/RealtimeSync/application.cpp
index dae44de4..a69951d4 100644
--- a/RealtimeSync/application.cpp
+++ b/RealtimeSync/application.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 "application.h"
diff --git a/RealtimeSync/application.h b/RealtimeSync/application.h
index 8ed2b45d..cb8b42e3 100644
--- a/RealtimeSync/application.h
+++ b/RealtimeSync/application.h
@@ -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 *
// **************************************************************************
#ifndef REALTIMESYNCAPP_H
diff --git a/RealtimeSync/gui_generated.cpp b/RealtimeSync/gui_generated.cpp
index 645249fe..5f884012 100644
--- a/RealtimeSync/gui_generated.cpp
+++ b/RealtimeSync/gui_generated.cpp
@@ -20,7 +20,7 @@ MainDlgGenerated::MainDlgGenerated( wxWindow* parent, wxWindowID id, const wxStr
m_menuFile->Append( m_menuItem13 );
wxMenuItem* m_menuItem14;
- m_menuItem14 = new wxMenuItem( m_menuFile, wxID_SAVEAS, wxString( _("Save &As...") ) , wxEmptyString, wxITEM_NORMAL );
+ m_menuItem14 = new wxMenuItem( m_menuFile, wxID_SAVEAS, wxString( _("Save &as...") ) , wxEmptyString, wxITEM_NORMAL );
m_menuFile->Append( m_menuItem14 );
m_menuFile->AppendSeparator();
@@ -119,10 +119,10 @@ MainDlgGenerated::MainDlgGenerated( wxWindow* parent, wxWindowID id, const wxStr
m_txtCtrlDirectoryMain = new wxTextCtrl( m_panelMainFolder, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 300,-1 ), 0 );
bSizer781->Add( m_txtCtrlDirectoryMain, 1, wxALIGN_CENTER_VERTICAL, 5 );
- m_dirPickerMain = new zen::DirPickerCtrl( m_panelMainFolder, wxID_ANY, wxEmptyString, _("Select a folder"), wxDefaultPosition, wxDefaultSize, 0 );
- m_dirPickerMain->SetToolTip( _("Select a folder") );
+ m_buttonSelectDirMain = new wxButton( m_panelMainFolder, wxID_ANY, _("Browse"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_buttonSelectDirMain->SetToolTip( _("Select a folder") );
- bSizer781->Add( m_dirPickerMain, 0, wxALIGN_CENTER_VERTICAL, 5 );
+ bSizer781->Add( m_buttonSelectDirMain, 0, wxALIGN_CENTER_VERTICAL, 5 );
bSizer10->Add( bSizer781, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
@@ -233,10 +233,10 @@ FolderGenerated::FolderGenerated( wxWindow* parent, wxWindowID id, const wxPoint
m_txtCtrlDirectory = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
bSizer20->Add( m_txtCtrlDirectory, 1, wxALIGN_CENTER_VERTICAL, 5 );
- m_dirPicker = new zen::DirPickerCtrl( this, wxID_ANY, wxEmptyString, _("Select a folder"), wxDefaultPosition, wxDefaultSize, 0 );
- m_dirPicker->SetToolTip( _("Select a folder") );
+ m_buttonSelectDir = new wxButton( this, wxID_ANY, _("Browse"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_buttonSelectDir->SetToolTip( _("Select a folder") );
- bSizer20->Add( m_dirPicker, 0, wxALIGN_CENTER_VERTICAL, 5 );
+ bSizer20->Add( m_buttonSelectDir, 0, wxALIGN_CENTER_VERTICAL, 5 );
bSizer114->Add( bSizer20, 1, wxALIGN_CENTER_VERTICAL, 5 );
diff --git a/RealtimeSync/gui_generated.h b/RealtimeSync/gui_generated.h
index 2afd5244..1f475454 100644
--- a/RealtimeSync/gui_generated.h
+++ b/RealtimeSync/gui_generated.h
@@ -11,7 +11,6 @@
#include <wx/artprov.h>
#include <wx/xrc/xmlres.h>
#include <wx/intl.h>
-#include "../wx+/dir_picker.h"
#include "../wx+/button.h"
#include <wx/string.h>
#include <wx/bitmap.h>
@@ -29,7 +28,6 @@
#include <wx/bmpbuttn.h>
#include <wx/button.h>
#include <wx/textctrl.h>
-#include <wx/filepicker.h>
#include <wx/panel.h>
#include <wx/scrolwin.h>
#include <wx/spinctrl.h>
@@ -66,6 +64,7 @@ protected:
wxBitmapButton* m_bpButtonAddFolder;
wxBitmapButton* m_bpButtonRemoveTopFolder;
wxTextCtrl* m_txtCtrlDirectoryMain;
+ wxButton* m_buttonSelectDirMain;
wxScrolledWindow* m_scrolledWinFolders;
wxBoxSizer* bSizerFolders;
wxSpinCtrl* m_spinCtrlDelay;
@@ -86,7 +85,6 @@ protected:
public:
- zen::DirPickerCtrl* m_dirPickerMain;
MainDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("RealtimeSync - Automated Synchronization"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_FRAME_STYLE|wxTAB_TRAVERSAL );
@@ -102,11 +100,11 @@ class FolderGenerated : public wxPanel
private:
protected:
+ wxButton* m_buttonSelectDir;
public:
wxBitmapButton* m_bpButtonRemoveFolder;
wxTextCtrl* m_txtCtrlDirectory;
- zen::DirPickerCtrl* m_dirPicker;
FolderGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL );
~FolderGenerated();
diff --git a/RealtimeSync/main_dlg.cpp b/RealtimeSync/main_dlg.cpp
index 7c2c9f69..c5142f3a 100644
--- a/RealtimeSync/main_dlg.cpp
+++ b/RealtimeSync/main_dlg.cpp
@@ -1,27 +1,29 @@
// **************************************************************************
// * 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 "main_dlg.h"
#include "resources.h"
-#include <wx+/button.h>
-#include "../lib/ffs_paths.h"
#include <wx/msgdlg.h>
#include <wx/wupdlock.h>
-#include "watcher.h"
+#include <wx/filedlg.h>
#include <wx/utils.h>
-#include "xml_proc.h"
-#include "tray_menu.h"
-#include <zen/file_handling.h>
-#include "xml_ffs.h"
+#include <wx/filedlg.h>
+#include <wx+/button.h>
#include <wx+/string_conv.h>
+#include <wx+/mouse_move_dlg.h>
#include <zen/assert_static.h>
+#include <zen/file_handling.h>
#include <zen/build_info.h>
+#include "watcher.h"
+#include "xml_proc.h"
+#include "tray_menu.h"
+#include "xml_ffs.h"
#include "../lib/help_provider.h"
#include "../lib/process_xml.h"
-#include <wx+/mouse_move_dlg.h>
+#include "../lib/ffs_paths.h"
using namespace zen;
@@ -42,7 +44,7 @@ MainDialog::MainDialog(wxDialog* dlg, const wxString& cfgFileName)
Connect(wxEVT_CHAR_HOOK, wxKeyEventHandler(MainDialog::OnKeyPressed), nullptr, this);
//prepare drag & drop
- dirNameFirst.reset(new DirectoryName<wxTextCtrl>(*m_panelMainFolder, *m_dirPickerMain, *m_txtCtrlDirectoryMain, m_staticTextFinalPath));
+ dirNameFirst.reset(new DirectoryName<wxTextCtrl>(*m_panelMainFolder, *m_buttonSelectDirMain, *m_txtCtrlDirectoryMain, m_staticTextFinalPath));
#ifdef FFS_WIN
new MouseMoveWindow(*this); //ownership passed to "this"
@@ -139,7 +141,7 @@ void MainDialog::OnMenuAbout(wxCommandEvent& event)
build += L" x86";
assert_static(zen::is32BitBuild || zen::is64BitBuild);
- wxMessageBox(L"RealtimeSync" L"\n\n" + replaceCpy(_("(Build: %x)"), L"%x", build), _("About"), wxOK, this);
+ wxMessageBox(L"RealtimeSync" L"\n\n" + replaceCpy(_("Build: %x"), L"%x", build), _("About"), wxOK, this);
}
diff --git a/RealtimeSync/main_dlg.h b/RealtimeSync/main_dlg.h
index 50b90cc7..ebc0838e 100644
--- a/RealtimeSync/main_dlg.h
+++ b/RealtimeSync/main_dlg.h
@@ -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 *
// **************************************************************************
#ifndef REALTIMESYNCMAIN_H
@@ -11,7 +11,6 @@
#include <vector>
#include <memory>
#include "../ui/dir_name.h"
-#include <wx+/dir_picker.h>
namespace xmlAccess
{
@@ -24,7 +23,7 @@ class DirectoryPanel : public FolderGenerated
public:
DirectoryPanel(wxWindow* parent) :
FolderGenerated(parent),
- dirName(*this, *m_dirPicker, *m_txtCtrlDirectory) {}
+ dirName(*this, *m_buttonSelectDir, *m_txtCtrlDirectory) {}
void setName(const wxString& dirname) { dirName.setName(dirname); }
wxString getName() const { return dirName.getName(); }
diff --git a/RealtimeSync/makefile b/RealtimeSync/makefile
index 84f617f6..7c59d7b4 100644
--- a/RealtimeSync/makefile
+++ b/RealtimeSync/makefile
@@ -2,7 +2,7 @@ APPNAME = RealtimeSync
prefix = /usr
BINDIR = $(DESTDIR)$(prefix)/bin
-COMMON_COMPILE_FLAGS = -Wall -pipe -O3 -pthread -std=gnu++0x -DNDEBUG -DwxUSE_UNICODE -DFFS_LINUX -DZEN_PLATFORM_OTHER -DWXINTL_NO_GETTEXT_MACRO -I.. -include "../zen/i18n.h"
+COMMON_COMPILE_FLAGS = -Wall -pipe -O3 -pthread -std=gnu++0x -DNDEBUG -DwxUSE_UNICODE -DFFS_LINUX -DZEN_PLATFORM_OTHER -DWXINTL_NO_GETTEXT_MACRO -I.. -include "../zen/i18n.h" -include "zen/warn_static.h"
COMMON_LINK_FLAGS = -pthread -lrt
#default build
diff --git a/RealtimeSync/resources.cpp b/RealtimeSync/resources.cpp
index 486aa8f1..787e8968 100644
--- a/RealtimeSync/resources.cpp
+++ b/RealtimeSync/resources.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 "resources.h"
diff --git a/RealtimeSync/resources.h b/RealtimeSync/resources.h
index 7a7b1d7f..8578a730 100644
--- a/RealtimeSync/resources.h
+++ b/RealtimeSync/resources.h
@@ -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 *
// **************************************************************************
#ifndef RESOURCES_H_INCLUDED_870857342085670826521345
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();
}
};
diff --git a/RealtimeSync/tray_menu.h b/RealtimeSync/tray_menu.h
index 9c910694..7ebe4f40 100644
--- a/RealtimeSync/tray_menu.h
+++ b/RealtimeSync/tray_menu.h
@@ -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 *
// **************************************************************************
#ifndef TRAYMENU_H_INCLUDED
diff --git a/RealtimeSync/watcher.cpp b/RealtimeSync/watcher.cpp
index a0893382..c2885b5d 100644
--- a/RealtimeSync/watcher.cpp
+++ b/RealtimeSync/watcher.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 "watcher.h"
diff --git a/RealtimeSync/watcher.h b/RealtimeSync/watcher.h
index 6d68d5be..2078bb0f 100644
--- a/RealtimeSync/watcher.h
+++ b/RealtimeSync/watcher.h
@@ -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 *
// **************************************************************************
#ifndef WATCHER_H_INCLUDED
diff --git a/RealtimeSync/xml_ffs.cpp b/RealtimeSync/xml_ffs.cpp
index 6572800b..acce554c 100644
--- a/RealtimeSync/xml_ffs.cpp
+++ b/RealtimeSync/xml_ffs.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 "xml_ffs.h"
diff --git a/RealtimeSync/xml_ffs.h b/RealtimeSync/xml_ffs.h
index b63c3620..76e4348f 100644
--- a/RealtimeSync/xml_ffs.h
+++ b/RealtimeSync/xml_ffs.h
@@ -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 *
// **************************************************************************
#ifndef XMLFREEFILESYNC_H_INCLUDED
diff --git a/RealtimeSync/xml_proc.cpp b/RealtimeSync/xml_proc.cpp
index b804ba72..ac6c0eb9 100644
--- a/RealtimeSync/xml_proc.cpp
+++ b/RealtimeSync/xml_proc.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 "xml_proc.h"
diff --git a/RealtimeSync/xml_proc.h b/RealtimeSync/xml_proc.h
index e07f9844..33b1694c 100644
--- a/RealtimeSync/xml_proc.h
+++ b/RealtimeSync/xml_proc.h
@@ -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 *
// **************************************************************************
#ifndef XMLPROCESSING_H_INCLUDED
bgstack15