diff options
Diffstat (limited to 'RealtimeSync')
-rw-r--r-- | RealtimeSync/RealtimeSync.cbp | 47 | ||||
-rw-r--r-- | RealtimeSync/RealtimeSync.vcxproj | 38 | ||||
-rw-r--r-- | RealtimeSync/application.cpp | 6 | ||||
-rw-r--r-- | RealtimeSync/gui_generated.cpp | 27 | ||||
-rw-r--r-- | RealtimeSync/gui_generated.h | 7 | ||||
-rw-r--r-- | RealtimeSync/main_dlg.cpp | 4 | ||||
-rw-r--r-- | RealtimeSync/makefile | 19 | ||||
-rw-r--r-- | RealtimeSync/resource.rc | 4 | ||||
-rw-r--r-- | RealtimeSync/resources.cpp | 5 | ||||
-rw-r--r-- | RealtimeSync/tray_menu.cpp | 12 | ||||
-rw-r--r-- | RealtimeSync/xml_proc.cpp | 7 |
11 files changed, 99 insertions, 77 deletions
diff --git a/RealtimeSync/RealtimeSync.cbp b/RealtimeSync/RealtimeSync.cbp index 2b1b97b7..e1b46812 100644 --- a/RealtimeSync/RealtimeSync.cbp +++ b/RealtimeSync/RealtimeSync.cbp @@ -27,9 +27,12 @@ <Add library="libwxbase28u.a" /> <Add library="libwxpng.a" /> <Add library="libwxzlib.a" /> - <Add library="libboost_thread-mgw46-mt-s-1_48.a" /> + <Add library="libboost_thread-mgw46-mt-s-1_49.a" /> <Add directory="C:\Programme\C++\wxWidgets\lib\gcc_lib" /> </Linker> + <ExtraCommands> + <Add after='"C:\Program Files\C++\CodeSigning\SignCode.cmd" "$(PROJECT_DIR)$(TARGET_OUTPUT_FILE)"' /> + </ExtraCommands> </Target> <Target title="Debug-DLL"> <Option output="..\BUILD\Bin\RealtimeSync_Debug" prefix_auto="1" extension_auto="1" /> @@ -51,7 +54,7 @@ <Add library="libwxbase28ud.a" /> <Add library="libwxpngd.a" /> <Add library="libwxzlibd.a" /> - <Add library="libboost_thread-mgw46-mt-sd-1_48.a" /> + <Add library="libboost_thread-mgw46-mt-sd-1_49.a" /> <Add directory="C:\Program Files\C++\wxWidgets\lib\gcc_dll" /> </Linker> </Target> @@ -99,26 +102,6 @@ <Add library="libuxtheme.a" /> <Add directory="C:\Program Files\C++\Boost\stage\lib" /> </Linker> - <Unit filename="WxWizDialog.fbp" /> - <Unit filename="application.cpp" /> - <Unit filename="application.h" /> - <Unit filename="gui_generated.cpp" /> - <Unit filename="gui_generated.h" /> - <Unit filename="main_dlg.cpp" /> - <Unit filename="main_dlg.h" /> - <Unit filename="resource.rc"> - <Option compilerVar="WINDRES" /> - </Unit> - <Unit filename="resources.cpp" /> - <Unit filename="resources.h" /> - <Unit filename="tray_menu.cpp" /> - <Unit filename="tray_menu.h" /> - <Unit filename="watcher.cpp" /> - <Unit filename="watcher.h" /> - <Unit filename="xml_ffs.cpp" /> - <Unit filename="xml_ffs.h" /> - <Unit filename="xml_proc.cpp" /> - <Unit filename="xml_proc.h" /> <Unit filename="..\lib\localization.cpp" /> <Unit filename="..\lib\process_xml.cpp" /> <Unit filename="..\lib\resolve_path.cpp" /> @@ -144,6 +127,26 @@ <Unit filename="..\zen\notify_removal.cpp" /> <Unit filename="..\zen\privilege.cpp" /> <Unit filename="..\zen\zstring.cpp" /> + <Unit filename="WxWizDialog.fbp" /> + <Unit filename="application.cpp" /> + <Unit filename="application.h" /> + <Unit filename="gui_generated.cpp" /> + <Unit filename="gui_generated.h" /> + <Unit filename="main_dlg.cpp" /> + <Unit filename="main_dlg.h" /> + <Unit filename="resource.rc"> + <Option compilerVar="WINDRES" /> + </Unit> + <Unit filename="resources.cpp" /> + <Unit filename="resources.h" /> + <Unit filename="tray_menu.cpp" /> + <Unit filename="tray_menu.h" /> + <Unit filename="watcher.cpp" /> + <Unit filename="watcher.h" /> + <Unit filename="xml_ffs.cpp" /> + <Unit filename="xml_ffs.h" /> + <Unit filename="xml_proc.cpp" /> + <Unit filename="xml_proc.h" /> <Extensions> <code_completion /> <envvars /> diff --git a/RealtimeSync/RealtimeSync.vcxproj b/RealtimeSync/RealtimeSync.vcxproj index 46529d63..f115bac4 100644 --- a/RealtimeSync/RealtimeSync.vcxproj +++ b/RealtimeSync/RealtimeSync.vcxproj @@ -22,6 +22,7 @@ <ProjectGuid>{A80B97E9-807C-47A1-803A-27565A1BD526}</ProjectGuid> <Keyword>Win32Proj</Keyword> <RootNamespace>RealtimeSync</RootNamespace> + <VCTargetsPath Condition="'$(VCTargetsPath11)' != '' and '$(VSVersion)' == '' and $(VisualStudioVersion) == ''">$(VCTargetsPath11)</VCTargetsPath> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> @@ -34,7 +35,7 @@ <ConfigurationType>Application</ConfigurationType> <UseDebugLibraries>true</UseDebugLibraries> <CharacterSet>Unicode</CharacterSet> - <PlatformToolset>Windows7.1SDK</PlatformToolset> + <PlatformToolset>v110</PlatformToolset> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> <ConfigurationType>Application</ConfigurationType> @@ -48,7 +49,7 @@ <UseDebugLibraries>false</UseDebugLibraries> <WholeProgramOptimization>true</WholeProgramOptimization> <CharacterSet>Unicode</CharacterSet> - <PlatformToolset>Windows7.1SDK</PlatformToolset> + <PlatformToolset>v110</PlatformToolset> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> <ImportGroup Label="ExtensionSettings"> @@ -99,7 +100,7 @@ <PrecompiledHeader>Use</PrecompiledHeader> <WarningLevel>Level4</WarningLevel> <Optimization>Disabled</Optimization> - <PreprocessorDefinitions>WXUSINGDLL;ZEN_PLATFORM_WINDOWS;wxUSE_UNICODE;__WXMSW__;FFS_WIN;WXINTL_NO_GETTEXT_MACRO;__WXDEBUG__;</PreprocessorDefinitions> + <PreprocessorDefinitions>_SCL_SECURE_NO_WARNINGS;ZEN_PLATFORM_WINDOWS;wxUSE_UNICODE;__WXMSW__;FFS_WIN;WXINTL_NO_GETTEXT_MACRO;__WXDEBUG__;WXUSINGDLL</PreprocessorDefinitions> <AdditionalIncludeDirectories>..;C:\Program Files\C++\wxWidgets\include;C:\Program Files\C++\wxWidgets\lib\vc_dll\mswud;C:\Program Files\C++\Boost</AdditionalIncludeDirectories> <PrecompiledHeaderFile>wx+/pch.h</PrecompiledHeaderFile> <DisableSpecificWarnings>4100;4996;4267;4512</DisableSpecificWarnings> @@ -120,7 +121,7 @@ </LinkStatus> </Link> <ResourceCompile> - <AdditionalIncludeDirectories>C:\Program Files\C++\wxWidgets\include;C:\Program Files\C++\wxWidgets\lib\vc_lib\mswud</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>C:\Program Files\C++\wxWidgets\include</AdditionalIncludeDirectories> <PreprocessorDefinitions>%(PreprocessorDefinitions);</PreprocessorDefinitions> </ResourceCompile> </ItemDefinitionGroup> @@ -129,8 +130,8 @@ <PrecompiledHeader>Use</PrecompiledHeader> <WarningLevel>Level4</WarningLevel> <Optimization>Disabled</Optimization> - <PreprocessorDefinitions>WXUSINGDLL;ZEN_PLATFORM_WINDOWS;wxUSE_UNICODE;__WXMSW__;FFS_WIN;WXINTL_NO_GETTEXT_MACRO;__WXDEBUG__;</PreprocessorDefinitions> - <AdditionalIncludeDirectories>..;C:\Program Files\C++\wxWidgets-x64\include;C:\Program Files\C++\wxWidgets-x64\lib\vc_dll\mswud;C:\Program Files\C++\Boost</AdditionalIncludeDirectories> + <PreprocessorDefinitions>_SCL_SECURE_NO_WARNINGS;ZEN_PLATFORM_WINDOWS;wxUSE_UNICODE;__WXMSW__;FFS_WIN;WXINTL_NO_GETTEXT_MACRO;__WXDEBUG__;WXUSINGDLL</PreprocessorDefinitions> + <AdditionalIncludeDirectories>..;C:\Program Files\C++\wxWidgets-x64-VC11\include;C:\Program Files\C++\wxWidgets-x64\lib\vc_dll\mswud;C:\Program Files\C++\Boost</AdditionalIncludeDirectories> <PrecompiledHeaderFile>wx+/pch.h</PrecompiledHeaderFile> <DisableSpecificWarnings>4100;4996;4267;4512</DisableSpecificWarnings> <MultiProcessorCompilation>false</MultiProcessorCompilation> @@ -146,12 +147,12 @@ <SuppressStartupBanner>true</SuppressStartupBanner> <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile> <AdditionalDependencies>wxmsw28ud_adv.lib;wxmsw28ud_core.lib;wxbase28ud.lib;wxpngd.lib;wxzlibd.lib;wxbase28ud_net.lib;comctl32.lib;ws2_32.lib;Rpcrt4.lib;winmm.lib;%(AdditionalDependencies)</AdditionalDependencies> - <AdditionalLibraryDirectories>C:\Program Files\C++\wxWidgets-x64\lib\vc_dll;C:\Program Files\C++\Boost\stage64\lib</AdditionalLibraryDirectories> + <AdditionalLibraryDirectories>C:\Program Files\C++\wxWidgets-x64-VC11\lib\vc_dll;C:\Program Files\C++\Boost\stage64\lib</AdditionalLibraryDirectories> <LinkStatus> </LinkStatus> </Link> <ResourceCompile> - <AdditionalIncludeDirectories>C:\Program Files\C++\wxWidgets\include;C:\Program Files\C++\wxWidgets\lib\vc_lib\mswud</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>C:\Program Files\C++\wxWidgets-x64-VC11\include</AdditionalIncludeDirectories> <PreprocessorDefinitions>%(PreprocessorDefinitions);WX_CPU_AMD64</PreprocessorDefinitions> </ResourceCompile> </ItemDefinitionGroup> @@ -162,7 +163,7 @@ <Optimization>MaxSpeed</Optimization> <FunctionLevelLinking>true</FunctionLevelLinking> <IntrinsicFunctions>true</IntrinsicFunctions> - <PreprocessorDefinitions>ZEN_PLATFORM_WINDOWS;wxUSE_UNICODE;__WXMSW__;FFS_WIN;WXINTL_NO_GETTEXT_MACRO;NDEBUG</PreprocessorDefinitions> + <PreprocessorDefinitions>_SCL_SECURE_NO_WARNINGS;ZEN_PLATFORM_WINDOWS;wxUSE_UNICODE;__WXMSW__;FFS_WIN;WXINTL_NO_GETTEXT_MACRO;NDEBUG</PreprocessorDefinitions> <AdditionalIncludeDirectories>..;C:\Program Files\C++\wxWidgets\include;C:\Program Files\C++\wxWidgets\lib\vc_lib\mswu;C:\Program Files\C++\Boost</AdditionalIncludeDirectories> <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> <DisableSpecificWarnings>4100;4996;4267;4512</DisableSpecificWarnings> @@ -182,13 +183,17 @@ <AdditionalLibraryDirectories>C:\Program Files\C++\wxWidgets\lib\vc_lib;C:\Program Files\C++\Boost\stage\lib</AdditionalLibraryDirectories> <LinkStatus> </LinkStatus> + <Profile>true</Profile> </Link> <ResourceCompile> - <AdditionalIncludeDirectories>C:\Program Files\C++\wxWidgets\include;C:\Program Files\C++\wxWidgets\lib\vc_lib\mswu</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>C:\Program Files\C++\wxWidgets\include</AdditionalIncludeDirectories> <PreprocessorDefinitions>%(PreprocessorDefinitions);</PreprocessorDefinitions> <Culture> </Culture> </ResourceCompile> + <PostBuildEvent> + <Command>"C:\Program Files\C++\CodeSigning\SignCode.cmd" "$(TargetPath)"</Command> + </PostBuildEvent> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <ClCompile> @@ -197,8 +202,8 @@ <Optimization>MaxSpeed</Optimization> <FunctionLevelLinking>true</FunctionLevelLinking> <IntrinsicFunctions>true</IntrinsicFunctions> - <PreprocessorDefinitions>ZEN_PLATFORM_WINDOWS;wxUSE_UNICODE;__WXMSW__;FFS_WIN;WXINTL_NO_GETTEXT_MACRO;NDEBUG</PreprocessorDefinitions> - <AdditionalIncludeDirectories>..;C:\Program Files\C++\wxWidgets-x64\include;C:\Program Files\C++\wxWidgets-x64\lib\vc_lib\mswu;C:\Program Files\C++\Boost</AdditionalIncludeDirectories> + <PreprocessorDefinitions>_SCL_SECURE_NO_WARNINGS;ZEN_PLATFORM_WINDOWS;wxUSE_UNICODE;__WXMSW__;FFS_WIN;WXINTL_NO_GETTEXT_MACRO;NDEBUG</PreprocessorDefinitions> + <AdditionalIncludeDirectories>..;C:\Program Files\C++\wxWidgets-x64-VC11\include;C:\Program Files\C++\wxWidgets-x64\lib\vc_lib\mswu;C:\Program Files\C++\Boost</AdditionalIncludeDirectories> <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> <DisableSpecificWarnings>4100;4996;4267;4512</DisableSpecificWarnings> <RuntimeLibrary>MultiThreaded</RuntimeLibrary> @@ -215,16 +220,20 @@ <SuppressStartupBanner>true</SuppressStartupBanner> <AdditionalDependencies>wxmsw28u_adv.lib;wxmsw28u_core.lib;wxbase28u.lib;wxpng.lib;wxzlib.lib;wxbase28u_net.lib;comctl32.lib;ws2_32.lib;winmm.lib;Rpcrt4.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile> - <AdditionalLibraryDirectories>C:\Program Files\C++\wxWidgets-x64\lib\vc_lib;C:\Program Files\C++\Boost\stage64\lib</AdditionalLibraryDirectories> + <AdditionalLibraryDirectories>C:\Program Files\C++\wxWidgets-x64-VC11\lib\vc_lib;C:\Program Files\C++\Boost\stage64\lib</AdditionalLibraryDirectories> <LinkStatus> </LinkStatus> + <Profile>true</Profile> </Link> <ResourceCompile> - <AdditionalIncludeDirectories>C:\Program Files\C++\wxWidgets\include;C:\Program Files\C++\wxWidgets\lib\vc_lib\mswu</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>C:\Program Files\C++\wxWidgets-x64-VC11\include</AdditionalIncludeDirectories> <PreprocessorDefinitions>%(PreprocessorDefinitions);WX_CPU_AMD64</PreprocessorDefinitions> <Culture> </Culture> </ResourceCompile> + <PostBuildEvent> + <Command>"C:\Program Files\C++\CodeSigning\SignCode.cmd" "$(TargetPath)"</Command> + </PostBuildEvent> </ItemDefinitionGroup> <ItemGroup> <ClCompile Include="..\lib\localization.cpp" /> @@ -262,6 +271,7 @@ <ResourceCompile Include="resource.rc" /> </ItemGroup> <ItemGroup> + <None Include="ClassDiagram.cd" /> <None Include="WxWizDialog.fbp" /> </ItemGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> diff --git a/RealtimeSync/application.cpp b/RealtimeSync/application.cpp index d45ae482..ead65eaa 100644 --- a/RealtimeSync/application.cpp +++ b/RealtimeSync/application.cpp @@ -33,7 +33,7 @@ bool Application::OnInit() //Note: initialization is done in the FIRST idle event instead of OnInit. Reason: Commandline mode requires the wxApp eventhandler to be established //for UI update events. This is not the case at the time of OnInit(). - Connect(wxEVT_IDLE, wxIdleEventHandler(Application::OnStartApplication), NULL, this); + Connect(wxEVT_IDLE, wxIdleEventHandler(Application::OnStartApplication), nullptr, this); return true; } @@ -41,7 +41,7 @@ bool Application::OnInit() void Application::OnStartApplication(wxIdleEvent& event) { - Disconnect(wxEVT_IDLE, wxIdleEventHandler(Application::OnStartApplication), NULL, this); + Disconnect(wxEVT_IDLE, wxIdleEventHandler(Application::OnStartApplication), nullptr, this); //if appname is not set, the default is the executable's name! SetAppName(wxT("FreeFileSync")); //use a different app name, to have "GetUserDataDir()" return the same directory as for FreeFileSync @@ -83,7 +83,7 @@ void Application::OnStartApplication(wxIdleEvent& event) if (!commandArgs.empty()) cfgFilename = commandArgs[0]; - MainDialog* frame = new MainDialog(NULL, cfgFilename); + MainDialog* frame = new MainDialog(nullptr, cfgFilename); frame->SetIcon(GlobalResources::instance().programIcon); //set application icon frame->Show(); } diff --git a/RealtimeSync/gui_generated.cpp b/RealtimeSync/gui_generated.cpp index f968c995..849915a4 100644 --- a/RealtimeSync/gui_generated.cpp +++ b/RealtimeSync/gui_generated.cpp @@ -1,13 +1,10 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Dec 2 2011) +// C++ code generated with wxFormBuilder (version Feb 9 2012) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! /////////////////////////////////////////////////////////////////////////// -#include "../wx+/button.h" -#include "../wx+/dir_picker.h" - #include "gui_generated.h" /////////////////////////////////////////////////////////////////////////// @@ -26,8 +23,7 @@ MainDlgGenerated::MainDlgGenerated( wxWindow* parent, wxWindowID id, const wxStr m_menuItem13 = new wxMenuItem( m_menuFile, wxID_ANY, wxString( _("&Load configuration...") ) + wxT('\t') + wxT("CTRL+L"), wxEmptyString, wxITEM_NORMAL ); m_menuFile->Append( m_menuItem13 ); - wxMenuItem* m_separator1; - m_separator1 = m_menuFile->AppendSeparator(); + m_menuFile->AppendSeparator(); wxMenuItem* m_menuItem4; m_menuItem4 = new wxMenuItem( m_menuFile, wxID_EXIT, wxString( _("&Quit") ) + wxT('\t') + wxT("CTRL+Q"), wxEmptyString, wxITEM_NORMAL ); @@ -37,11 +33,10 @@ MainDlgGenerated::MainDlgGenerated( wxWindow* parent, wxWindowID id, const wxStr m_menuHelp = new wxMenu(); wxMenuItem* m_menuItemContent; - m_menuItemContent = new wxMenuItem( m_menuHelp, wxID_ANY, wxString( _("&Content") ) + wxT('\t') + wxT("F1"), wxEmptyString, wxITEM_NORMAL ); + m_menuItemContent = new wxMenuItem( m_menuHelp, wxID_HELP, wxString( _("&Content") ) + wxT('\t') + wxT("F1"), wxEmptyString, wxITEM_NORMAL ); m_menuHelp->Append( m_menuItemContent ); - wxMenuItem* m_separator2; - m_separator2 = m_menuHelp->AppendSeparator(); + m_menuHelp->AppendSeparator(); m_menuItemAbout = new wxMenuItem( m_menuHelp, wxID_ABOUT, wxString( _("&About...") ) + wxT('\t') + wxT("SHIFT+F1"), wxEmptyString, wxITEM_NORMAL ); m_menuHelp->Append( m_menuItemAbout ); @@ -81,6 +76,7 @@ MainDlgGenerated::MainDlgGenerated( wxWindow* parent, wxWindowID id, const wxStr m_staticText21->Wrap( -1 ); sbSizer41->Add( m_staticText21, 0, wxRIGHT|wxLEFT|wxEXPAND, 5 ); + bSizer1->Add( sbSizer41, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND|wxRIGHT|wxLEFT, 20 ); m_staticline2 = new wxStaticLine( m_panelMain, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); @@ -102,6 +98,7 @@ MainDlgGenerated::MainDlgGenerated( wxWindow* parent, wxWindowID id, const wxStr m_staticTextFinalPath->Wrap( -1 ); bSizer11->Add( m_staticTextFinalPath, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 2 ); + bSizer10->Add( bSizer11, 0, 0, 5 ); wxBoxSizer* bSizer781; @@ -125,8 +122,10 @@ MainDlgGenerated::MainDlgGenerated( wxWindow* parent, wxWindowID id, const wxStr bSizer781->Add( m_dirPickerMain, 0, wxALIGN_CENTER_VERTICAL, 5 ); + bSizer10->Add( bSizer781, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); + m_panelMainFolder->SetSizer( bSizer10 ); m_panelMainFolder->Layout(); bSizer10->Fit( m_panelMainFolder ); @@ -136,11 +135,13 @@ MainDlgGenerated::MainDlgGenerated( wxWindow* parent, wxWindowID id, const wxStr m_scrolledWinFolders->SetScrollRate( 5, 5 ); bSizerFolders = new wxBoxSizer( wxVERTICAL ); + m_scrolledWinFolders->SetSizer( bSizerFolders ); m_scrolledWinFolders->Layout(); bSizerFolders->Fit( m_scrolledWinFolders ); sbSizerDirToWatch2->Add( m_scrolledWinFolders, 0, wxEXPAND, 5 ); + bSizer1->Add( sbSizerDirToWatch2, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 ); wxStaticBoxSizer* sbSizer3; @@ -149,6 +150,7 @@ MainDlgGenerated::MainDlgGenerated( wxWindow* parent, wxWindowID id, const wxStr m_textCtrlCommand = new wxTextCtrl( m_panelMain, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); sbSizer3->Add( m_textCtrlCommand, 0, wxEXPAND|wxBOTTOM, 5 ); + bSizer1->Add( sbSizer3, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 ); wxStaticBoxSizer* sbSizer4; @@ -159,6 +161,7 @@ MainDlgGenerated::MainDlgGenerated( wxWindow* parent, wxWindowID id, const wxStr sbSizer4->Add( m_spinCtrlDelay, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + bSizer1->Add( sbSizer4, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 ); m_buttonStart = new zen::BitmapButton( m_panelMain, wxID_ANY, _("Start"), wxDefaultPosition, wxSize( -1,40 ), 0 ); @@ -170,11 +173,13 @@ MainDlgGenerated::MainDlgGenerated( wxWindow* parent, wxWindowID id, const wxStr m_buttonCancel = new wxButton( m_panelMain, wxID_CANCEL, _("dummy"), wxDefaultPosition, wxSize( 0,0 ), 0 ); bSizer1->Add( m_buttonCancel, 0, 0, 5 ); + m_panelMain->SetSizer( bSizer1 ); m_panelMain->Layout(); bSizer1->Fit( m_panelMain ); bSizerMain->Add( m_panelMain, 1, wxEXPAND, 5 ); + this->SetSizer( bSizerMain ); this->Layout(); bSizerMain->Fit( this ); @@ -199,7 +204,7 @@ MainDlgGenerated::~MainDlgGenerated() this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDlgGenerated::OnSaveConfig ) ); this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDlgGenerated::OnLoadConfig ) ); this->Disconnect( wxID_EXIT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDlgGenerated::OnQuit ) ); - this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDlgGenerated::OnShowHelp ) ); + this->Disconnect( wxID_HELP, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDlgGenerated::OnShowHelp ) ); this->Disconnect( wxID_ABOUT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDlgGenerated::OnMenuAbout ) ); m_bpButtonAddFolder->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDlgGenerated::OnAddFolder ), NULL, this ); m_bpButtonRemoveTopFolder->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDlgGenerated::OnRemoveTopFolder ), NULL, this ); @@ -229,8 +234,10 @@ FolderGenerated::FolderGenerated( wxWindow* parent, wxWindowID id, const wxPoint bSizer20->Add( m_dirPicker, 0, wxALIGN_CENTER_VERTICAL, 5 ); + bSizer114->Add( bSizer20, 1, wxALIGN_CENTER_VERTICAL, 5 ); + this->SetSizer( bSizer114 ); this->Layout(); bSizer114->Fit( this ); diff --git a/RealtimeSync/gui_generated.h b/RealtimeSync/gui_generated.h index 2232fc67..aa0f5ad8 100644 --- a/RealtimeSync/gui_generated.h +++ b/RealtimeSync/gui_generated.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Dec 2 2011) +// C++ code generated with wxFormBuilder (version Feb 9 2012) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -11,9 +11,8 @@ #include <wx/artprov.h> #include <wx/xrc/xmlres.h> #include <wx/intl.h> -namespace zen { class BitmapButton; } -namespace zen { class DirPickerCtrl; } - +#include "../wx+/dir_picker.h" +#include "../wx+/button.h" #include <wx/string.h> #include <wx/bitmap.h> #include <wx/image.h> diff --git a/RealtimeSync/main_dlg.cpp b/RealtimeSync/main_dlg.cpp index 3b40236a..c91e4856 100644 --- a/RealtimeSync/main_dlg.cpp +++ b/RealtimeSync/main_dlg.cpp @@ -39,7 +39,7 @@ MainDialog::MainDialog(wxDialog* dlg, const wxString& cfgFileName) m_buttonStart ->setBitmapFront(GlobalResources::getImage(L"startRed")); //register key event - Connect(wxEVT_CHAR_HOOK, wxKeyEventHandler(MainDialog::OnKeyPressed), NULL, this); + 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)); @@ -401,7 +401,7 @@ void MainDialog::addFolder(const std::vector<wxString>& newFolders, bool addFron } //register events - newFolder->m_bpButtonRemoveFolder->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(MainDialog::OnRemoveFolder), NULL, this ); + newFolder->m_bpButtonRemoveFolder->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(MainDialog::OnRemoveFolder), nullptr, this ); //insert directory name newFolder->setName(*i); diff --git a/RealtimeSync/makefile b/RealtimeSync/makefile index 0dc2d8af..c92e2052 100644 --- a/RealtimeSync/makefile +++ b/RealtimeSync/makefile @@ -2,18 +2,23 @@ APPNAME = RealtimeSync prefix = /usr BINDIR = $(DESTDIR)$(prefix)/bin -COMMON_COMPILE_FLAGS = -Wall -pipe `pkg-config --cflags gtk+-2.0` -O3 -pthread -std=gnu++0x -DNDEBUG -DwxUSE_UNICODE -DFFS_LINUX -DZEN_PLATFORM_OTHER -DWXINTL_NO_GETTEXT_MACRO -I.. -include "../zen/i18n.h" -COMMON_LINK_FLAGS = -O3 -pthread +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_LINK_FLAGS = -pthread #default build -FFS_CPPFLAGS = $(COMMON_COMPILE_FLAGS) `wx-config --cxxflags --debug=no --unicode=yes` -LINKFLAGS = $(COMMON_LINK_FLAGS) `wx-config --libs --debug=no --unicode=yes` -lboost_thread +CPPFLAGS = $(COMMON_COMPILE_FLAGS) `wx-config --cxxflags --debug=no --unicode=yes` +LINKFLAGS = $(COMMON_LINK_FLAGS) `wx-config --libs --debug=no --unicode=yes` -lboost_thread #static std library linkage used for precompiled release ifeq ($(BUILD),release) -FFS_CPPFLAGS = $(COMMON_COMPILE_FLAGS) `wx-config --cxxflags --debug=no --unicode=yes --static=yes` -LINKFLAGS = $(COMMON_LINK_FLAGS) `wx-config --libs --debug=no --unicode=yes --static=yes` /usr/local/lib/libboost_thread.a +CPPFLAGS = $(COMMON_COMPILE_FLAGS) `wx-config --cxxflags --debug=no --unicode=yes --static=yes` +LINKFLAGS = $(COMMON_LINK_FLAGS) `wx-config --libs --debug=no --unicode=yes --static=yes` /usr/local/lib/libboost_thread.a endif +##################################################################################################### + +#Gtk - no button border +CPPFLAGS += `pkg-config --cflags gtk+-2.0` +LINKFLAGS += `pkg-config --libs gtk+-2.0` CPP_LIST= #internal list of all *.cpp files needed for compilation CPP_LIST+=application.cpp @@ -46,7 +51,7 @@ all: RealtimeSync ../OBJ/RTS_Release_GCC_Make/RTS/%.o : %.cpp mkdir -p $(dir $@) - g++ $(FFS_CPPFLAGS) -c $< -o $@ + g++ $(CPPFLAGS) -c $< -o $@ RealtimeSync: $(OBJECT_LIST) g++ -o ../BUILD/$(APPNAME) $(OBJECT_LIST) $(LINKFLAGS) diff --git a/RealtimeSync/resource.rc b/RealtimeSync/resource.rc index dcdb6ad1..bad326e1 100644 --- a/RealtimeSync/resource.rc +++ b/RealtimeSync/resource.rc @@ -16,11 +16,11 @@ BEGIN BEGIN BLOCK "FFFF04B0" BEGIN - VALUE "FileDescription", "Realtime Application Launcher\0" + VALUE "FileDescription", "Real-time Command Line Launcher\0" VALUE "FileVersion", VER_FREEFILESYNC_STR VALUE "ProductName", "RealtimeSync\0" VALUE "ProductVersion", VER_FREEFILESYNC_STR - VALUE "LegalCopyright", "(c) 2008 - 2011 ZenJu\0" + VALUE "LegalCopyright", "ZenJu - All Rights Reserved\0" END END BLOCK "VarFileInfo" diff --git a/RealtimeSync/resources.cpp b/RealtimeSync/resources.cpp index 41e16808..f81af50a 100644 --- a/RealtimeSync/resources.cpp +++ b/RealtimeSync/resources.cpp @@ -29,12 +29,13 @@ GlobalResources::GlobalResources() //activate support for .png files wxImage::AddHandler(new wxPNGHandler); //ownership passed - wxZipInputStream resourceFile(input); + wxZipInputStream resourceFile(input, wxConvUTF8); + //do NOT rely on wxConvLocal! May result in "Cannot convert from the charset 'Unknown encoding (-1)'!" while (true) { std::unique_ptr<wxZipEntry> entry(resourceFile.GetNextEntry()); - if (entry.get() == NULL) + if (entry.get() == nullptr) break; const wxString name = entry->GetName(); diff --git a/RealtimeSync/tray_menu.cpp b/RealtimeSync/tray_menu.cpp index c8eccbf5..e18101e0 100644 --- a/RealtimeSync/tray_menu.cpp +++ b/RealtimeSync/tray_menu.cpp @@ -76,14 +76,14 @@ public: void parentHasDied() //call before tray icon is marked for deferred deletion { - parent_ = NULL; + parent_ = nullptr; } private: virtual wxMenu* CreatePopupMenu() { if (!parent_) - return NULL; + return nullptr; wxMenu* contextMenu = new wxMenu; contextMenu->Append(CONTEXT_RESTORE, _("&Restore")); @@ -91,7 +91,7 @@ private: contextMenu->AppendSeparator(); contextMenu->Append(CONTEXT_ABORT, _("&Exit")); //event handling - contextMenu->Connect(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(TrayIconHolder::OnContextMenuSelection), NULL, parent_); + contextMenu->Connect(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(TrayIconHolder::OnContextMenuSelection), nullptr, parent_); return contextMenu; //ownership transferred to caller } @@ -127,13 +127,13 @@ TrayIconHolder::TrayIconHolder(const wxString& jobname) : showIconActive(); //register double-click - trayMenu->Connect(wxEVT_TASKBAR_LEFT_DCLICK, wxCommandEventHandler(TrayIconHolder::OnRequestResume), NULL, this); + trayMenu->Connect(wxEVT_TASKBAR_LEFT_DCLICK, wxCommandEventHandler(TrayIconHolder::OnRequestResume), nullptr, this); } TrayIconHolder::~TrayIconHolder() { - trayMenu->Disconnect(wxEVT_TASKBAR_LEFT_DCLICK, wxCommandEventHandler(TrayIconHolder::OnRequestResume), NULL, this); + trayMenu->Disconnect(wxEVT_TASKBAR_LEFT_DCLICK, wxCommandEventHandler(TrayIconHolder::OnRequestResume), nullptr, this); trayMenu->RemoveIcon(); //(try to) hide icon until final deletion takes place trayMenu->parentHasDied(); @@ -200,7 +200,7 @@ void TrayIconHolder::OnContextMenuSelection(wxCommandEvent& event) wxString buildFormatted = _("(Build: %x)"); buildFormatted.Replace(wxT("%x"), build); - wxMessageDialog aboutDlg(NULL, wxString(wxT("RealtimeSync")) + wxT("\n\n") + buildFormatted, _("About"), wxOK); + wxMessageDialog aboutDlg(nullptr, wxString(wxT("RealtimeSync")) + wxT("\n\n") + buildFormatted, _("About"), wxOK); aboutDlg.ShowModal(); } break; diff --git a/RealtimeSync/xml_proc.cpp b/RealtimeSync/xml_proc.cpp index df50d569..4f9306d2 100644 --- a/RealtimeSync/xml_proc.cpp +++ b/RealtimeSync/xml_proc.cpp @@ -29,10 +29,7 @@ bool isXmlTypeRTS(const XmlDoc& doc) //throw() { std::string type; if (doc.root().getAttribute("XmlType", type)) - { - if (type == "REAL") - return true; - } + return type == "REAL"; } return false; } @@ -54,7 +51,7 @@ void xmlAccess::readRealConfig(const wxString& filename, XmlRealConfig& config) ::readConfig(in, config); if (in.errorsOccured()) - throw FfsXmlError(_("Error parsing configuration file:") + L"\n\"" + toZ(filename) + L"\"\n\n" + + throw FfsXmlError(_("Configuration loaded partially only:") + L"\n\"" + toZ(filename) + L"\"\n\n" + getErrorMessageFormatted(in), FfsXmlError::WARNING); } |