summaryrefslogtreecommitdiff
path: root/RealtimeSync
diff options
context:
space:
mode:
Diffstat (limited to 'RealtimeSync')
-rw-r--r--RealtimeSync/RealtimeSync.cbp1
-rw-r--r--RealtimeSync/RealtimeSync.vcproj24
-rw-r--r--RealtimeSync/application.cpp29
-rw-r--r--RealtimeSync/application.h16
-rw-r--r--RealtimeSync/functions.cpp6
-rw-r--r--RealtimeSync/functions.h6
-rw-r--r--RealtimeSync/guiGenerated.cpp10
-rw-r--r--RealtimeSync/mainDialog.cpp29
-rw-r--r--RealtimeSync/mainDialog.h17
-rw-r--r--RealtimeSync/makefile21
-rw-r--r--RealtimeSync/pch.h6
-rw-r--r--RealtimeSync/resources.cpp8
-rw-r--r--RealtimeSync/resources.h6
-rw-r--r--RealtimeSync/trayMenu.cpp16
-rw-r--r--RealtimeSync/trayMenu.h6
-rw-r--r--RealtimeSync/watcher.cpp16
-rw-r--r--RealtimeSync/watcher.h6
-rw-r--r--RealtimeSync/xmlFreeFileSync.cpp8
-rw-r--r--RealtimeSync/xmlFreeFileSync.h6
-rw-r--r--RealtimeSync/xmlProcessing.cpp6
-rw-r--r--RealtimeSync/xmlProcessing.h6
21 files changed, 167 insertions, 82 deletions
diff --git a/RealtimeSync/RealtimeSync.cbp b/RealtimeSync/RealtimeSync.cbp
index 76eccb5e..6d5760fd 100644
--- a/RealtimeSync/RealtimeSync.cbp
+++ b/RealtimeSync/RealtimeSync.cbp
@@ -132,6 +132,7 @@
<Unit filename="..\shared\fileTraverser.cpp" />
<Unit filename="..\shared\globalFunctions.cpp" />
<Unit filename="..\shared\globalFunctions.h" />
+ <Unit filename="..\shared\helpProvider.cpp" />
<Unit filename="..\shared\localization.cpp" />
<Unit filename="..\shared\localization.h" />
<Unit filename="..\shared\longPathPrefix.cpp" />
diff --git a/RealtimeSync/RealtimeSync.vcproj b/RealtimeSync/RealtimeSync.vcproj
index ddf293ea..d84e8525 100644
--- a/RealtimeSync/RealtimeSync.vcproj
+++ b/RealtimeSync/RealtimeSync.vcproj
@@ -49,11 +49,11 @@
PreprocessorDefinitions="wxUSE_UNICODE;__WXMSW__;FFS_WIN;__WXDEBUG__;TIXML_USE_STL;ZSTRING_WIDE_CHAR"
MinimalRebuild="true"
BasicRuntimeChecks="3"
- RuntimeLibrary="1"
+ RuntimeLibrary="3"
UsePrecompiledHeader="0"
- WarningLevel="3"
+ WarningLevel="4"
DebugInformationFormat="4"
- DisableSpecificWarnings="4804"
+ DisableSpecificWarnings="4804;4100"
/>
<Tool
Name="VCManagedResourceCompilerTool"
@@ -133,11 +133,11 @@
PreprocessorDefinitions="wxUSE_UNICODE;__WXMSW__;FFS_WIN;__WXDEBUG__;TIXML_USE_STL;ZSTRING_WIDE_CHAR"
MinimalRebuild="true"
BasicRuntimeChecks="3"
- RuntimeLibrary="1"
+ RuntimeLibrary="3"
UsePrecompiledHeader="0"
- WarningLevel="3"
+ WarningLevel="4"
DebugInformationFormat="3"
- DisableSpecificWarnings="4804"
+ DisableSpecificWarnings="4804;4100"
/>
<Tool
Name="VCManagedResourceCompilerTool"
@@ -219,9 +219,9 @@
RuntimeLibrary="0"
EnableFunctionLevelLinking="true"
UsePrecompiledHeader="0"
- WarningLevel="3"
+ WarningLevel="4"
DebugInformationFormat="3"
- DisableSpecificWarnings="4804"
+ DisableSpecificWarnings="4804;4100"
/>
<Tool
Name="VCManagedResourceCompilerTool"
@@ -303,10 +303,10 @@
RuntimeLibrary="0"
EnableFunctionLevelLinking="true"
UsePrecompiledHeader="0"
- WarningLevel="3"
+ WarningLevel="4"
SuppressStartupBanner="false"
DebugInformationFormat="3"
- DisableSpecificWarnings="4804"
+ DisableSpecificWarnings="4804;4100"
/>
<Tool
Name="VCManagedResourceCompilerTool"
@@ -404,6 +404,10 @@
>
</File>
<File
+ RelativePath="..\shared\helpProvider.cpp"
+ >
+ </File>
+ <File
RelativePath="..\shared\localization.cpp"
>
</File>
diff --git a/RealtimeSync/application.cpp b/RealtimeSync/application.cpp
index 68cebae0..a48369b4 100644
--- a/RealtimeSync/application.cpp
+++ b/RealtimeSync/application.cpp
@@ -1,10 +1,9 @@
-/***************************************************************
- * Purpose: Code for Application Class
- * Author: ZenJu (zhnmju123@gmx.de)
- * Created: 2009-07-06
- * Copyright: ZenJu (http://sourceforge.net/projects/freefilesync/)
- **************************************************************/
-
+// **************************************************************************
+// * 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) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// **************************************************************************
+//
#include "application.h"
#include "mainDialog.h"
#include <wx/event.h>
@@ -14,6 +13,7 @@
#include "xmlFreeFileSync.h"
#include "../shared/standardPaths.h"
#include <wx/file.h>
+#include "../shared/stringConv.h"
#ifdef FFS_LINUX
#include <gtk/gtk.h>
@@ -41,16 +41,7 @@ void Application::OnStartApplication(wxIdleEvent& event)
SetAppName(wxT("FreeFileSync")); //use a different app name, to have "GetUserDataDir()" return the same directory as for FreeFileSync
#ifdef FFS_LINUX
- ::gtk_rc_parse("styles.rc"); //remove inner border from bitmap buttons
-#endif
-
- //initialize help controller
- helpController.reset(new wxHelpController);
- helpController->Initialize(FreeFileSync::getInstallationDir() +
-#ifdef FFS_WIN
- wxT("FreeFileSync.chm"));
-#elif defined FFS_LINUX
- wxT("Help/FreeFileSync.hhp"));
+ ::gtk_rc_parse(FreeFileSync::wxToZ(FreeFileSync::getResourceDir()) + "styles.rc"); //remove inner border from bitmap buttons
#endif
//set program language
@@ -77,7 +68,7 @@ void Application::OnStartApplication(wxIdleEvent& event)
GlobalResources::getInstance().load(); //loads bitmap resources on program startup
- MainDialog* frame = new MainDialog(NULL, cfgFilename, *helpController);
+ MainDialog* frame = new MainDialog(NULL, cfgFilename);
frame->SetIcon(*GlobalResources::getInstance().programIcon); //set application icon
frame->Show();
}
@@ -98,7 +89,7 @@ int Application::OnRun()
catch (const std::exception& e) //catch all STL exceptions
{
//unfortunately it's not always possible to display a message box in this erroneous situation, however (non-stream) file output always works!
- wxFile safeOutput(FreeFileSync::getLastErrorTxtFile(), wxFile::write);
+ wxFile safeOutput(FreeFileSync::getConfigDir() + wxT("LastError.txt"), wxFile::write);
safeOutput.Write(wxString::FromAscii(e.what()));
wxMessageBox(wxString::FromAscii(e.what()), _("An exception occured!"), wxOK | wxICON_ERROR);
diff --git a/RealtimeSync/application.h b/RealtimeSync/application.h
index d95cb3b4..38303857 100644
--- a/RealtimeSync/application.h
+++ b/RealtimeSync/application.h
@@ -1,15 +1,13 @@
-/***************************************************************
- * Purpose: Defines Application Class
- * Author: ZenJu (zhnmju123@gmx.de)
- * Created: 2009-07-06
- * Copyright: ZenJu (http://sourceforge.net/projects/freefilesync/)
- **************************************************************/
-
+// **************************************************************************
+// * 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) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// **************************************************************************
+//
#ifndef REALTIMESYNCAPP_H
#define REALTIMESYNCAPP_H
#include <wx/app.h>
-#include <wx/help.h>
#include <memory>
class Application : public wxApp
@@ -21,8 +19,6 @@ public:
private:
void OnStartApplication(wxIdleEvent& event);
-
- std::auto_ptr<wxHelpController> helpController; //global help controller
};
#endif // REALTIMESYNCAPP_H
diff --git a/RealtimeSync/functions.cpp b/RealtimeSync/functions.cpp
index 93d075c0..15461cc4 100644
--- a/RealtimeSync/functions.cpp
+++ b/RealtimeSync/functions.cpp
@@ -1,3 +1,9 @@
+// **************************************************************************
+// * 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) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// **************************************************************************
+//
#include "functions.h"
#include <wx/textctrl.h>
#include <wx/filepicker.h>
diff --git a/RealtimeSync/functions.h b/RealtimeSync/functions.h
index 0001a7ec..e8c03a93 100644
--- a/RealtimeSync/functions.h
+++ b/RealtimeSync/functions.h
@@ -1,3 +1,9 @@
+// **************************************************************************
+// * 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) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// **************************************************************************
+//
#ifndef FUNCTIONS_H_INCLUDED
#define FUNCTIONS_H_INCLUDED
diff --git a/RealtimeSync/guiGenerated.cpp b/RealtimeSync/guiGenerated.cpp
index aa4a8261..3252b0c5 100644
--- a/RealtimeSync/guiGenerated.cpp
+++ b/RealtimeSync/guiGenerated.cpp
@@ -18,11 +18,11 @@ MainDlgGenerated::MainDlgGenerated( wxWindow* parent, wxWindowID id, const wxStr
m_menubar1 = new wxMenuBar( 0 );
m_menuFile = new wxMenu();
wxMenuItem* m_menuItem14;
- m_menuItem14 = new wxMenuItem( m_menuFile, wxID_ANY, wxString( _("S&ave configuration") ) + wxT('\t') + wxT("CTRL-S"), wxEmptyString, wxITEM_NORMAL );
+ m_menuItem14 = new wxMenuItem( m_menuFile, wxID_ANY, wxString( _("S&ave configuration...") ) + wxT('\t') + wxT("CTRL-S"), wxEmptyString, wxITEM_NORMAL );
m_menuFile->Append( m_menuItem14 );
wxMenuItem* m_menuItem13;
- m_menuItem13 = new wxMenuItem( m_menuFile, wxID_ANY, wxString( _("&Load configuration") ) + wxT('\t') + wxT("CTRL-L"), wxEmptyString, wxITEM_NORMAL );
+ m_menuItem13 = new wxMenuItem( m_menuFile, wxID_ANY, wxString( _("&Load configuration...") ) + wxT('\t') + wxT("CTRL-L"), wxEmptyString, wxITEM_NORMAL );
m_menuFile->Append( m_menuItem13 );
m_menuFile->AppendSeparator();
@@ -40,7 +40,7 @@ MainDlgGenerated::MainDlgGenerated( wxWindow* parent, wxWindowID id, const wxStr
m_menuHelp->AppendSeparator();
- m_menuItemAbout = new wxMenuItem( m_menuHelp, wxID_ABOUT, wxString( _("&About...") ) , wxEmptyString, wxITEM_NORMAL );
+ m_menuItemAbout = new wxMenuItem( m_menuHelp, wxID_ABOUT, wxString( _("&About...") ) + wxT('\t') + wxT("SHIFT-F1"), wxEmptyString, wxITEM_NORMAL );
m_menuHelp->Append( m_menuItemAbout );
m_menubar1->Append( m_menuHelp, _("&Help") );
@@ -80,7 +80,7 @@ MainDlgGenerated::MainDlgGenerated( wxWindow* parent, wxWindowID id, const wxStr
m_staticline3 = new wxStaticLine( m_panelMain, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
sbSizer41->Add( m_staticline3, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 );
- m_staticText21 = new wxStaticText( m_panelMain, wxID_ANY, _("The command line is executed each time:\n- Files within these directories (or subdirectories) are modified\n- The corresponding drive letter becomes available (USB-insert)"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText21 = new wxStaticText( m_panelMain, wxID_ANY, _("The command line is executed each time:\n- a directory becomes available (e.g. USB stick insert)\n- files within these directories or subdirectories are modified"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText21->Wrap( -1 );
sbSizer41->Add( m_staticText21, 0, wxRIGHT|wxLEFT|wxEXPAND, 5 );
@@ -158,7 +158,7 @@ MainDlgGenerated::MainDlgGenerated( wxWindow* parent, wxWindowID id, const wxStr
wxStaticBoxSizer* sbSizer4;
sbSizer4 = new wxStaticBoxSizer( new wxStaticBox( m_panelMain, wxID_ANY, _("Delay") ), wxVERTICAL );
- m_spinCtrlDelay = new wxSpinCtrl( m_panelMain, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS|wxSP_WRAP, 0, 2000000000, 0 );
+ m_spinCtrlDelay = new wxSpinCtrl( m_panelMain, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 2000000000, 0 );
m_spinCtrlDelay->SetToolTip( _("Delay between detection of changes and execution of command line in seconds") );
sbSizer4->Add( m_spinCtrlDelay, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxALIGN_CENTER_HORIZONTAL, 5 );
diff --git a/RealtimeSync/mainDialog.cpp b/RealtimeSync/mainDialog.cpp
index 81af1ce0..ec53cd02 100644
--- a/RealtimeSync/mainDialog.cpp
+++ b/RealtimeSync/mainDialog.cpp
@@ -1,3 +1,9 @@
+// **************************************************************************
+// * 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) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// **************************************************************************
+//
#include "mainDialog.h"
#include "resources.h"
#include "../shared/customButton.h"
@@ -14,15 +20,14 @@
#include "../shared/stringConv.h"
#include "../shared/staticAssert.h"
#include "../shared/buildInfo.h"
+#include "../shared/helpProvider.h"
using namespace FreeFileSync;
MainDialog::MainDialog(wxDialog *dlg,
- const wxString& cfgFilename,
- wxHelpController& helpController)
- : MainDlgGenerated(dlg),
- helpController_(helpController)
+ const wxString& cfgFilename)
+ : MainDlgGenerated(dlg)
{
wxWindowUpdateLocker dummy(this); //avoid display distortion
@@ -118,9 +123,7 @@ void MainDialog::OnQuit(wxCommandEvent &event)
const wxString& MainDialog::lastConfigFileName()
{
- static wxString instance = FreeFileSync::getConfigDir().EndsWith(zToWx(globalFunctions::FILE_NAME_SEPARATOR)) ?
- FreeFileSync::getConfigDir() + wxT("LastRun.ffs_real") :
- FreeFileSync::getConfigDir() + zToWx(globalFunctions::FILE_NAME_SEPARATOR) + wxT("LastRun.ffs_real");
+ static wxString instance = FreeFileSync::getConfigDir() + wxT("LastRun.ffs_real");
return instance;
}
@@ -128,9 +131,9 @@ const wxString& MainDialog::lastConfigFileName()
void MainDialog::OnShowHelp(wxCommandEvent& event)
{
#ifdef FFS_WIN
- helpController_.DisplaySection(wxT("html\\advanced\\RealtimeSync.html"));
+ FreeFileSync::displayHelpEntry(wxT("html\\advanced\\RealtimeSync.html"));
#elif defined FFS_LINUX
- helpController_.DisplaySection(wxT("html/advanced/RealtimeSync.html"));
+ FreeFileSync::displayHelpEntry(wxT("html/advanced/RealtimeSync.html"));
#endif
}
@@ -388,8 +391,8 @@ void MainDialog::addFolder(const std::vector<wxString>& newFolders, bool addFron
}
//set size of scrolled window
- const int additionalRows = std::min(additionalFolders.size(), MAX_ADD_FOLDERS); //up to MAX_ADD_FOLDERS additional folders shall be shown
- m_scrolledWinFolders->SetMinSize(wxSize( -1, folderHeight * additionalRows));
+ const size_t additionalRows = std::min(additionalFolders.size(), MAX_ADD_FOLDERS); //up to MAX_ADD_FOLDERS additional folders shall be shown
+ m_scrolledWinFolders->SetMinSize(wxSize( -1, folderHeight * static_cast<int>(additionalRows)));
//adapt delete top folder pair button
m_bpButtonRemoveTopFolder->Show();
@@ -419,8 +422,8 @@ void MainDialog::removeAddFolder(const int pos)
//set size of scrolled window
- const int additionalRows = std::min(additionalFolders.size(), MAX_ADD_FOLDERS); //up to MAX_ADD_FOLDERS additional folders shall be shown
- m_scrolledWinFolders->SetMinSize(wxSize( -1, folderHeight * additionalRows));
+ const size_t additionalRows = std::min(additionalFolders.size(), MAX_ADD_FOLDERS); //up to MAX_ADD_FOLDERS additional folders shall be shown
+ m_scrolledWinFolders->SetMinSize(wxSize( -1, folderHeight * static_cast<int>(additionalRows)));
//adapt delete top folder pair button
if (additionalFolders.size() == 0)
diff --git a/RealtimeSync/mainDialog.h b/RealtimeSync/mainDialog.h
index 8a5e87bf..8b83b058 100644
--- a/RealtimeSync/mainDialog.h
+++ b/RealtimeSync/mainDialog.h
@@ -1,10 +1,9 @@
-/***************************************************************
- * Purpose: Defines Application Frame
- * Author: ZenJu (zhnmju123@gmx.de)
- * Created: 2009-07-06
- * Copyright: ZenJu (http://sourceforge.net/projects/freefilesync/)
- **************************************************************/
-
+// **************************************************************************
+// * 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) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// **************************************************************************
+//
#ifndef REALTIMESYNCMAIN_H
#define REALTIMESYNCMAIN_H
@@ -12,7 +11,6 @@
#include <vector>
#include <memory>
#include "../shared/dragAndDrop.h"
-#include <wx/help.h>
namespace xmlAccess
{
@@ -37,7 +35,7 @@ private:
class MainDialog: public MainDlgGenerated
{
public:
- MainDialog(wxDialog *dlg, const wxString& cfgFilename, wxHelpController& helpController);
+ MainDialog(wxDialog *dlg, const wxString& cfgFilename);
~MainDialog();
void loadConfig(const wxString& filename);
@@ -70,7 +68,6 @@ private:
//additional folders
std::vector<FolderPanel*> additionalFolders; //additional pairs to the standard pair
- wxHelpController& helpController_;
//support for drag and drop on main folder
std::auto_ptr<FreeFileSync::DragDropOnDlg> dragDropOnFolder;
};
diff --git a/RealtimeSync/makefile b/RealtimeSync/makefile
index 25dd373f..59e4a25e 100644
--- a/RealtimeSync/makefile
+++ b/RealtimeSync/makefile
@@ -1,4 +1,9 @@
-CPPFLAGS=-Wall -pipe -DNDEBUG -DwxUSE_UNICODE `wx-config --cxxflags --debug=no --unicode=yes` `pkg-config --cflags gtk+-2.0` -DFFS_LINUX -DTIXML_USE_STL -DZSTRING_CHAR -O3 -pthread -c -I../shared/boost_1_x
+APPNAME = RealtimeSync
+
+prefix = /usr
+BINDIR = $(DESTDIR)$(prefix)/bin
+
+FFS_CPPFLAGS=-Wall -pipe -DNDEBUG -DwxUSE_UNICODE `wx-config --cxxflags --debug=no --unicode=yes` `pkg-config --cflags gtk+-2.0` -DFFS_LINUX -DTIXML_USE_STL -DZSTRING_CHAR -O3 -pthread -c -I../shared/boost_1_x
LINKFLAGS=`wx-config --libs --debug=no --unicode=yes` -O3 -pthread
FILE_LIST= #internal list of all *.cpp files needed for compilation
@@ -28,6 +33,7 @@ FILE_LIST+=../shared/fileHandling.cpp
FILE_LIST+=../shared/fileTraverser.cpp
FILE_LIST+=../shared/localization.cpp
FILE_LIST+=../shared/standardPaths.cpp
+FILE_LIST+=../shared/helpProvider.cpp
#list of all *.o files
OBJECT_LIST=$(foreach file, $(FILE_LIST), OBJ/$(subst .cpp,.o,$(notdir $(file))))
@@ -48,10 +54,17 @@ removeBOM: ../tools/removeBOM.cpp
%.dep : %.cpp
#strip path information
- g++ $(CPPFLAGS) $< -o OBJ/$(subst .cpp,.o,$(notdir $<))
+ g++ $(FFS_CPPFLAGS) $< -o OBJ/$(subst .cpp,.o,$(notdir $<))
RealtimeSync: init removeBOM $(DEP_LIST)
- g++ $(LINKFLAGS) -o ../BUILD/RealtimeSync $(OBJECT_LIST)
+ g++ $(LINKFLAGS) -o ../BUILD/$(APPNAME) $(OBJECT_LIST)
clean:
- find OBJ -type f -exec rm {} \;
+ rm -rf OBJ
+ rm -f ../BUILD/$(APPNAME)
+ rm -f removeBOM
+
+install:
+ if [ ! -d $(BINDIR) ] ; then mkdir -p $(BINDIR); fi
+
+ cp ../BUILD/$(APPNAME) $(BINDIR)
diff --git a/RealtimeSync/pch.h b/RealtimeSync/pch.h
index 22ed251f..aaee9032 100644
--- a/RealtimeSync/pch.h
+++ b/RealtimeSync/pch.h
@@ -1,3 +1,9 @@
+// **************************************************************************
+// * 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) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// **************************************************************************
+//
#ifndef FFS_PRECOMPILED_HEADER
#define FFS_PRECOMPILED_HEADER
diff --git a/RealtimeSync/resources.cpp b/RealtimeSync/resources.cpp
index eeb89563..c2678878 100644
--- a/RealtimeSync/resources.cpp
+++ b/RealtimeSync/resources.cpp
@@ -1,3 +1,9 @@
+// **************************************************************************
+// * 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) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// **************************************************************************
+//
#include "resources.h"
#include <wx/wfstream.h>
#include <wx/zipstrm.h>
@@ -36,7 +42,7 @@ GlobalResources::~GlobalResources()
void GlobalResources::load() const
{
- wxFFileInputStream input(FreeFileSync::getInstallationDir() + wxT("Resources.dat"));
+ wxFFileInputStream input(FreeFileSync::getResourceDir() + wxT("Resources.dat"));
if (input.IsOk()) //if not... we don't want to react too harsh here
{
//activate support for .png files
diff --git a/RealtimeSync/resources.h b/RealtimeSync/resources.h
index 6a6cd976..5a9f780b 100644
--- a/RealtimeSync/resources.h
+++ b/RealtimeSync/resources.h
@@ -1,3 +1,9 @@
+// **************************************************************************
+// * 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) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// **************************************************************************
+//
#ifndef RESOURCES_H_INCLUDED
#define RESOURCES_H_INCLUDED
diff --git a/RealtimeSync/trayMenu.cpp b/RealtimeSync/trayMenu.cpp
index 01bcda48..ff88a950 100644
--- a/RealtimeSync/trayMenu.cpp
+++ b/RealtimeSync/trayMenu.cpp
@@ -1,3 +1,9 @@
+// **************************************************************************
+// * 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) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// **************************************************************************
+//
#include "trayMenu.h"
#include <wx/msgdlg.h>
#include <wx/taskbar.h>
@@ -12,6 +18,7 @@
#include <wx/log.h>
#include "../shared/staticAssert.h"
#include "../shared/buildInfo.h"
+#include <wx/icon.h> //Linux needs this
class RtsTrayIcon;
@@ -46,7 +53,13 @@ public:
RtsTrayIcon(WaitCallbackImpl* callback) :
m_callback(callback)
{
- wxTaskBarIcon::SetIcon(*GlobalResources::getInstance().programIcon, wxString(wxT("RealtimeSync")) + wxT(" - ") + _("Monitoring active..."));
+#ifdef FFS_WIN
+ const wxIcon& realtimeIcon = *GlobalResources::getInstance().programIcon;
+#elif defined FFS_LINUX
+ wxIcon realtimeIcon;
+ realtimeIcon.CopyFromBitmap(GlobalResources::getInstance().getImageByName(wxT("RTS_tray_linux.png"))); //use a 22x22 bitmap for perfect fit
+#endif
+ wxTaskBarIcon::SetIcon(realtimeIcon, wxString(wxT("RealtimeSync")) + wxT(" - ") + _("Monitoring active..."));
//register double-click
Connect(wxEVT_TASKBAR_LEFT_DCLICK, wxCommandEventHandler(RtsTrayIcon::resumeToMain), NULL, this);
@@ -216,3 +229,4 @@ RealtimeSync::MonitorResponse RealtimeSync::startDirectoryMonitor(const xmlAcces
return RESUME;
}
+
diff --git a/RealtimeSync/trayMenu.h b/RealtimeSync/trayMenu.h
index 99f2f90a..8bf73a47 100644
--- a/RealtimeSync/trayMenu.h
+++ b/RealtimeSync/trayMenu.h
@@ -1,3 +1,9 @@
+// **************************************************************************
+// * 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) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// **************************************************************************
+//
#ifndef TRAYMENU_H_INCLUDED
#define TRAYMENU_H_INCLUDED
diff --git a/RealtimeSync/watcher.cpp b/RealtimeSync/watcher.cpp
index 67dae521..2bb91b8a 100644
--- a/RealtimeSync/watcher.cpp
+++ b/RealtimeSync/watcher.cpp
@@ -1,3 +1,9 @@
+// **************************************************************************
+// * 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) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// **************************************************************************
+//
#include "watcher.h"
#include "../shared/systemFunctions.h"
#include "functions.h"
@@ -253,7 +259,7 @@ public:
virtual ReturnValDir onDir(const DefaultChar* shortName, const Zstring& fullName)
{
m_dirs.push_back(fullName.c_str());
- return ReturnValDir(ReturnValDir::Continue(), this);
+ return ReturnValDir(Loki::Int2Type<ReturnValDir::TRAVERSING_DIR_CONTINUE>(), this);
}
virtual ReturnValue onError(const wxString& errorText)
{
@@ -354,7 +360,7 @@ void RealtimeSync::waitForChanges(const std::vector<wxString>& dirNames, WaitCal
if (notifications.getSize() > 0)
{
const DWORD rv = ::WaitForMultipleObjects( //NOTE: notifications.getArray() returns valid pointer, because it cannot be empty in this context
- notifications.getSize(), //__in DWORD nCount,
+ static_cast<DWORD>(notifications.getSize()), //__in DWORD nCount,
notifications.getArray(), //__in const HANDLE *lpHandles,
false, //__in BOOL bWaitAll,
UI_UPDATE_INTERVAL); //__in DWORD dwMilliseconds
@@ -450,9 +456,3 @@ void RealtimeSync::waitForChanges(const std::vector<wxString>& dirNames, WaitCal
#endif
}
-
-
-
-
-
-
diff --git a/RealtimeSync/watcher.h b/RealtimeSync/watcher.h
index 2f3990c2..87edde86 100644
--- a/RealtimeSync/watcher.h
+++ b/RealtimeSync/watcher.h
@@ -1,3 +1,9 @@
+// **************************************************************************
+// * 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) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// **************************************************************************
+//
#ifndef WATCHER_H_INCLUDED
#define WATCHER_H_INCLUDED
diff --git a/RealtimeSync/xmlFreeFileSync.cpp b/RealtimeSync/xmlFreeFileSync.cpp
index d09e7a7a..ac4c1e3a 100644
--- a/RealtimeSync/xmlFreeFileSync.cpp
+++ b/RealtimeSync/xmlFreeFileSync.cpp
@@ -1,3 +1,9 @@
+// **************************************************************************
+// * 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) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// **************************************************************************
+//
#include "xmlFreeFileSync.h"
#include "../shared/standardPaths.h"
#include "../shared/globalFunctions.h"
@@ -47,7 +53,7 @@ xmlAccess::XmlRealConfig convertBatchToReal(const xmlAccess::XmlBatchConfig& bat
output.directories.insert(output.directories.end(), uniqueFolders.begin(), uniqueFolders.end());
- output.commandline = FreeFileSync::getInstallationDir() +
+ output.commandline = FreeFileSync::getBinaryDir() +
#ifdef FFS_WIN
wxT("FreeFileSync.exe") +
#elif defined FFS_LINUX
diff --git a/RealtimeSync/xmlFreeFileSync.h b/RealtimeSync/xmlFreeFileSync.h
index 55687d93..8955ccf1 100644
--- a/RealtimeSync/xmlFreeFileSync.h
+++ b/RealtimeSync/xmlFreeFileSync.h
@@ -1,3 +1,9 @@
+// **************************************************************************
+// * 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) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// **************************************************************************
+//
#ifndef XMLFREEFILESYNC_H_INCLUDED
#define XMLFREEFILESYNC_H_INCLUDED
diff --git a/RealtimeSync/xmlProcessing.cpp b/RealtimeSync/xmlProcessing.cpp
index 7b640455..7cf78c7a 100644
--- a/RealtimeSync/xmlProcessing.cpp
+++ b/RealtimeSync/xmlProcessing.cpp
@@ -1,3 +1,9 @@
+// **************************************************************************
+// * 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) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// **************************************************************************
+//
#include "xmlProcessing.h"
#include <wx/filefn.h>
#include <wx/intl.h>
diff --git a/RealtimeSync/xmlProcessing.h b/RealtimeSync/xmlProcessing.h
index b8207973..f50849b1 100644
--- a/RealtimeSync/xmlProcessing.h
+++ b/RealtimeSync/xmlProcessing.h
@@ -1,3 +1,9 @@
+// **************************************************************************
+// * 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) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// **************************************************************************
+//
#ifndef XMLPROCESSING_H_INCLUDED
#define XMLPROCESSING_H_INCLUDED
bgstack15