diff options
author | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:08:42 +0200 |
---|---|---|
committer | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:08:42 +0200 |
commit | c32707148292d104c66276b43796d6057c8c7a5d (patch) | |
tree | bb83513f4aff24153e21a4ec92e34e4c27651b1f /ui | |
parent | 3.9 (diff) | |
download | FreeFileSync-c32707148292d104c66276b43796d6057c8c7a5d.tar.gz FreeFileSync-c32707148292d104c66276b43796d6057c8c7a5d.tar.bz2 FreeFileSync-c32707148292d104c66276b43796d6057c8c7a5d.zip |
3.10
Diffstat (limited to 'ui')
-rw-r--r-- | ui/batch_config.cpp | 85 | ||||
-rw-r--r-- | ui/batch_config.h | 13 | ||||
-rw-r--r-- | ui/batch_status_handler.cpp | 6 | ||||
-rw-r--r-- | ui/batch_status_handler.h | 4 | ||||
-rw-r--r-- | ui/folder_pair.h | 25 | ||||
-rw-r--r-- | ui/gui_generated.cpp | 127 | ||||
-rw-r--r-- | ui/gui_generated.h | 300 | ||||
-rw-r--r-- | ui/gui_status_handler.cpp | 6 | ||||
-rw-r--r-- | ui/gui_status_handler.h | 6 | ||||
-rw-r--r-- | ui/main_dlg.cpp | 237 | ||||
-rw-r--r-- | ui/main_dlg.h | 19 | ||||
-rw-r--r-- | ui/mouse_move_dlg.cpp | 23 | ||||
-rw-r--r-- | ui/mouse_move_dlg.h | 21 | ||||
-rw-r--r-- | ui/msg_popup.cpp | 16 | ||||
-rw-r--r-- | ui/progress_indicator.cpp | 8 | ||||
-rw-r--r-- | ui/search.cpp | 6 | ||||
-rw-r--r-- | ui/small_dlgs.cpp | 45 | ||||
-rw-r--r-- | ui/sorting.h | 4 | ||||
-rw-r--r-- | ui/sync_cfg.cpp | 15 | ||||
-rw-r--r-- | ui/sync_cfg.h | 4 | ||||
-rw-r--r-- | ui/tray_icon.cpp | 21 |
21 files changed, 572 insertions, 419 deletions
diff --git a/ui/batch_config.cpp b/ui/batch_config.cpp index 21a2f2cd..5aca5d67 100644 --- a/ui/batch_config.cpp +++ b/ui/batch_config.cpp @@ -14,6 +14,7 @@ #include "msg_popup.h" #include <wx/dnd.h> #include <wx/msgdlg.h> +#include "mouse_move_dlg.h" using namespace ffs3; @@ -91,7 +92,7 @@ private: /|\ /|\ _________|______________ ________| | | | - FirstBatchFolderPairCfg BatchFolderPairPanel + DirectoryPairBatchFirst DirectoryPairBatch */ template <class GuiPanel> @@ -117,42 +118,72 @@ private: }; -class BatchFolderPairPanel : - public BatchFolderPairGenerated, //BatchFolderPairPanel "owns" BatchFolderPairGenerated! +class DirectoryPairBatch: + public BatchFolderPairGenerated, //DirectoryPairBatch "owns" BatchFolderPairGenerated! public FolderPairCallback<BatchFolderPairGenerated> { public: - BatchFolderPairPanel(wxWindow* parent, BatchDialog& batchDialog) : + DirectoryPairBatch(wxWindow* parent, BatchDialog& batchDialog) : BatchFolderPairGenerated(parent), FolderPairCallback<BatchFolderPairGenerated>(static_cast<BatchFolderPairGenerated&>(*this), batchDialog), //pass BatchFolderPairGenerated part... - dragDropOnLeft( m_panelLeft, m_dirPickerLeft, m_directoryLeft), - dragDropOnRight(m_panelRight, m_dirPickerRight, m_directoryRight) {} + dirNameLeft( m_panelLeft, m_dirPickerLeft, m_directoryLeft), + dirNameRight(m_panelRight, m_dirPickerRight, m_directoryRight) {} + + void setValues(const Zstring& leftDir, const Zstring& rightDir, AltSyncCfgPtr syncCfg, const FilterConfig& filter) + { + setConfig(syncCfg, filter); + dirNameLeft.setName(leftDir); + dirNameRight.setName(rightDir); + } + Zstring getLeftDir() const + { + return dirNameLeft.getName(); + } + Zstring getRightDir() const + { + return dirNameRight.getName(); + } private: //support for drag and drop - DragDropOnDlg dragDropOnLeft; - DragDropOnDlg dragDropOnRight; + DirectoryName dirNameLeft; + DirectoryName dirNameRight; }; -class FirstBatchFolderPairCfg : public FolderPairCallback<BatchDlgGenerated> +class DirectoryPairBatchFirst : public FolderPairCallback<BatchDlgGenerated> { public: - FirstBatchFolderPairCfg(BatchDialog& batchDialog) : + DirectoryPairBatchFirst(BatchDialog& batchDialog) : FolderPairCallback<BatchDlgGenerated>(batchDialog, batchDialog), //prepare drag & drop - dragDropOnLeft(batchDialog.m_panelLeft, + dirNameLeft(batchDialog.m_panelLeft, batchDialog.m_dirPickerLeft, batchDialog.m_directoryLeft), - dragDropOnRight(batchDialog.m_panelRight, + dirNameRight(batchDialog.m_panelRight, batchDialog.m_dirPickerRight, batchDialog.m_directoryRight) {} + void setValues(const Zstring& leftDir, const Zstring& rightDir, AltSyncCfgPtr syncCfg, const FilterConfig& filter) + { + setConfig(syncCfg, filter); + dirNameLeft.setName(leftDir); + dirNameRight.setName(rightDir); + } + Zstring getLeftDir() const + { + return dirNameLeft.getName(); + } + Zstring getRightDir() const + { + return dirNameRight.getName(); + } + private: //support for drag and drop - DragDropOnDlg dragDropOnLeft; - DragDropOnDlg dragDropOnRight; + DirectoryName dirNameLeft; + DirectoryName dirNameRight; }; @@ -178,6 +209,16 @@ BatchDialog::~BatchDialog() {} //non-inline destructor for std::auto_ptr to work void BatchDialog::init() { +#ifdef FFS_WIN + new MouseMoveWindow(*this, //allow moving main dialog by clicking (nearly) anywhere... + this, + m_panelOverview, + m_panelLogging, + m_staticText56, + m_staticText44, + m_bitmap27); //ownership passed to "this" +#endif + wxWindowUpdateLocker dummy(this); //avoid display distortion m_bpButtonCmpConfig->SetBitmapLabel(GlobalResources::getInstance().getImageByName(wxT("cmpConfig"))); @@ -186,13 +227,13 @@ void BatchDialog::init() m_bpButtonHelp->SetBitmapLabel(GlobalResources::getInstance().getImageByName(wxT("help"))); //init handling of first folder pair - firstFolderPair.reset(new FirstBatchFolderPairCfg(*this)); + firstFolderPair.reset(new DirectoryPairBatchFirst(*this)); m_bpButtonFilter->Connect(wxEVT_RIGHT_DOWN, wxCommandEventHandler(BatchDialog::OnGlobalFilterOpenContext), NULL, this); //prepare drag & drop for loading of *.ffs_batch files SetDropTarget(new BatchFileDropEvent(*this)); - dragDropOnLogfileDir.reset(new DragDropOnDlg(m_panelLogging, m_dirPickerLogfileDir, m_textCtrlLogfileDir)); + logfileDir.reset(new DirectoryName(m_panelLogging, m_dirPickerLogfileDir, m_textCtrlLogfileDir)); //set icons for this dialog m_bpButtonAddPair->SetBitmapLabel(GlobalResources::getInstance().getImageByName(wxT("addFolderPair"))); @@ -469,7 +510,7 @@ void BatchDialog::OnLoadBatchJob(wxCommandEvent& event) inline -FolderPairEnh getEnahncedPair(const BatchFolderPairPanel* panel) +FolderPairEnh getEnahncedPair(const DirectoryPairBatch* panel) { return FolderPairEnh(panel->getLeftDir(), panel->getRightDir(), @@ -498,7 +539,7 @@ xmlAccess::XmlBatchConfig BatchDialog::getCurrentConfiguration() const //load structure with batch settings "batchCfg" batchCfg.silent = m_checkBoxSilent->GetValue(); - batchCfg.logFileDirectory = m_textCtrlLogfileDir->GetValue(); + batchCfg.logFileDirectory = zToWx(logfileDir->getName()); batchCfg.handleError = getSelectionHandleError(); return batchCfg; @@ -566,7 +607,7 @@ void BatchDialog::loadBatchCfg(const xmlAccess::XmlBatchConfig& batchCfg) localBatchCfg = batchCfg; m_checkBoxSilent->SetValue(batchCfg.silent); - m_textCtrlLogfileDir->SetValue(batchCfg.logFileDirectory); + logfileDir->setName(wxToZ(batchCfg.logFileDirectory)); //error handling is dependent from m_checkBoxSilent! /|\ \|/ setSelectionHandleError(batchCfg.handleError); @@ -614,7 +655,7 @@ void BatchDialog::OnRemoveFolderPair(wxCommandEvent& event) { //find folder pair originating the event const wxObject* const eventObj = event.GetEventObject(); - for (std::vector<BatchFolderPairPanel*>::const_iterator i = additionalFolderPairs.begin(); i != additionalFolderPairs.end(); ++i) + for (std::vector<DirectoryPairBatch*>::const_iterator i = additionalFolderPairs.begin(); i != additionalFolderPairs.end(); ++i) { if (eventObj == static_cast<wxObject*>((*i)->m_bpButtonRemovePair)) { @@ -684,7 +725,7 @@ void BatchDialog::addFolderPair(const std::vector<ffs3::FolderPairEnh>& newPairs int pairHeight = 0; for (std::vector<ffs3::FolderPairEnh>::const_iterator i = newPairs.begin(); i != newPairs.end(); ++i) { - BatchFolderPairPanel* newPair = new BatchFolderPairPanel(m_scrolledWindow6, *this); + DirectoryPairBatch* newPair = new DirectoryPairBatch(m_scrolledWindow6, *this); if (addFront) { @@ -733,7 +774,7 @@ void BatchDialog::removeAddFolderPair(const int pos) if (0 <= pos && pos < static_cast<int>(additionalFolderPairs.size())) { //remove folder pairs from window - BatchFolderPairPanel* pairToDelete = additionalFolderPairs[pos]; + DirectoryPairBatch* pairToDelete = additionalFolderPairs[pos]; const int pairHeight = pairToDelete->GetSize().GetHeight(); bSizerAddFolderPairs->Detach(pairToDelete); //Remove() does not work on Window*, so do it manually diff --git a/ui/batch_config.h b/ui/batch_config.h index b2ff0cc8..62645c78 100644 --- a/ui/batch_config.h +++ b/ui/batch_config.h @@ -13,11 +13,11 @@ namespace ffs3 { -class DragDropOnDlg; +class DirectoryName; } -class BatchFolderPairPanel; -class FirstBatchFolderPairCfg; +class DirectoryPairBatch; +class DirectoryPairBatchFirst; class BatchDialog: public BatchDlgGenerated @@ -79,8 +79,8 @@ private: xmlAccess::XmlBatchConfig getCurrentConfiguration() const; - boost::shared_ptr<FirstBatchFolderPairCfg> firstFolderPair; //always bound!!! - std::vector<BatchFolderPairPanel*> additionalFolderPairs; + boost::shared_ptr<DirectoryPairBatchFirst> firstFolderPair; //always bound!!! + std::vector<DirectoryPairBatch*> additionalFolderPairs; //used when saving batch file wxString proposedBatchFileName; @@ -89,8 +89,7 @@ private: std::auto_ptr<wxMenu> contextMenu; - //add drag & drop support when selecting logfile directory - std::auto_ptr<ffs3::DragDropOnDlg> dragDropOnLogfileDir; + std::auto_ptr<ffs3::DirectoryName> logfileDir; }; #endif // BATCHCONFIG_H_INCLUDED diff --git a/ui/batch_status_handler.cpp b/ui/batch_status_handler.cpp index e67e4426..c3dfc8df 100644 --- a/ui/batch_status_handler.cpp +++ b/ui/batch_status_handler.cpp @@ -33,7 +33,7 @@ public: //write header wxString headerLine = wxString(wxT("FreeFileSync - ")) + _("Batch execution") + wxT(" (") + - _("Date") + wxT(": ") + wxDateTime::Now().FormatDate() + wxT(" ") + //"Date" is used at other places too + _("Date") + wxT(": ") + wxDateTime::Now().FormatDate() + wxT(" ") + //"Date" is used at other places, too _("Time") + wxT(":") + wxT(" ") + wxDateTime::Now().FormatTime() + wxT(")"); logFile.Write(headerLine + wxChar('\n')); logFile.Write(wxString().Pad(headerLine.Len(), wxChar('-')) + wxChar('\n') + wxChar('\n')); @@ -213,7 +213,7 @@ BatchStatusHandler::~BatchStatusHandler() inline -void BatchStatusHandler::updateStatusText(const Zstring& text) +void BatchStatusHandler::reportInfo(const Zstring& text) { if (currentProcess == StatusHandler::PROCESS_SYNCHRONIZING && logFile.get()) //write file transfer information to log errorLog.logInfo(zToWx(text)); @@ -266,7 +266,7 @@ void BatchStatusHandler::updateProcessedData(int objectsProcessed, wxLongLong da } -void BatchStatusHandler::reportInfo(const wxString& infoMessage) +void BatchStatusHandler::logInfo(const wxString& infoMessage) { errorLog.logInfo(infoMessage); } diff --git a/ui/batch_status_handler.h b/ui/batch_status_handler.h index f5497b0f..bc4c5bde 100644 --- a/ui/batch_status_handler.h +++ b/ui/batch_status_handler.h @@ -28,12 +28,12 @@ public: int& returnVal); ~BatchStatusHandler(); - virtual void updateStatusText(const Zstring& text); virtual void initNewProcess(int objectsTotal, wxLongLong dataTotal, Process processID); virtual void updateProcessedData(int objectsProcessed, wxLongLong dataProcessed); + virtual void reportInfo(const Zstring& text); virtual void forceUiRefresh(); - void reportInfo(const wxString& infoMessage); + void logInfo(const wxString& infoMessage); virtual void reportWarning(const wxString& warningMessage, bool& warningActive); virtual ErrorHandler::Response reportError(const wxString& errorMessage); virtual void reportFatalError(const wxString& errorMessage); diff --git a/ui/folder_pair.h b/ui/folder_pair.h index 27f3ab29..5dc016ef 100644 --- a/ui/folder_pair.h +++ b/ui/folder_pair.h @@ -8,7 +8,7 @@ #define FOLDERPAIR_H_INCLUDED #include "../structures.h" -#include "../shared/drag_n_drop.h" +#include "../shared/dir_name.h" #include "../library/resources.h" #include "small_dlgs.h" #include "sync_cfg.h" @@ -27,17 +27,6 @@ class FolderPairPanelBasic : private wxEvtHandler public: typedef boost::shared_ptr<const ffs3::AlternateSyncConfig> AltSyncCfgPtr; - - Zstring getLeftDir() const - { - return wxToZ(basicPanel_.m_directoryLeft->GetValue()); - } - - Zstring getRightDir() const - { - return wxToZ(basicPanel_.m_directoryRight->GetValue()); - } - AltSyncCfgPtr getAltSyncConfig() const { return altSyncConfig; @@ -48,18 +37,10 @@ public: return localFilter; } - void setValues(const Zstring& leftDir, - const Zstring& rightDir, - AltSyncCfgPtr syncCfg, - const FilterConfig& filter) + void setConfig(AltSyncCfgPtr syncCfg, const FilterConfig& filter) { altSyncConfig = syncCfg; localFilter = filter; - - //insert directory names - ffs3::setDirectoryName(zToWx(leftDir), basicPanel_.m_directoryLeft, basicPanel_.m_dirPickerLeft); - ffs3::setDirectoryName(zToWx(rightDir), basicPanel_.m_directoryRight, basicPanel_.m_dirPickerRight); - refreshButtons(); } @@ -145,7 +126,7 @@ private: basicPanel_.PopupMenu(contextMenu.get()); //show context menu } - virtual MainConfiguration getMainConfig() const = 0; + virtual MainConfiguration getMainConfig() const = 0; virtual wxWindow* getParentWindow() = 0; virtual void OnAltSyncCfgChange() {}; diff --git a/ui/gui_generated.cpp b/ui/gui_generated.cpp index 59257708..659a40f3 100644 --- a/ui/gui_generated.cpp +++ b/ui/gui_generated.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Apr 16 2008) +// C++ code generated with wxFormBuilder (version Sep 8 2010) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -26,12 +26,14 @@ MainDialogGenerated::MainDialogGenerated( wxWindow* parent, wxWindowID id, const m_menuItem11 = new wxMenuItem( m_menuFile, wxID_ANY, wxString( _("2. &Synchronize...") ) + wxT('\t') + wxT("ALT-S"), wxEmptyString, wxITEM_NORMAL ); m_menuFile->Append( m_menuItem11 ); - m_menuFile->AppendSeparator(); + wxMenuItem* m_separator1; + m_separator1 = m_menuFile->AppendSeparator(); m_menuItemSwitchView = new wxMenuItem( m_menuFile, wxID_ANY, wxString( _("S&witch view") ) + wxT('\t') + wxT("ALT-W"), wxEmptyString, wxITEM_NORMAL ); m_menuFile->Append( m_menuItemSwitchView ); - m_menuFile->AppendSeparator(); + wxMenuItem* m_separator2; + m_separator2 = m_menuFile->AppendSeparator(); m_menuItemNew = new wxMenuItem( m_menuFile, wxID_ANY, wxString( _("&New") ) + wxT('\t') + wxT("CTRL-N"), wxEmptyString, wxITEM_NORMAL ); m_menuFile->Append( m_menuItemNew ); @@ -42,19 +44,21 @@ MainDialogGenerated::MainDialogGenerated( wxWindow* parent, wxWindowID id, const m_menuItemLoad = new wxMenuItem( m_menuFile, wxID_ANY, wxString( _("&Load configuration...") ) + wxT('\t') + wxT("CTRL-L"), wxEmptyString, wxITEM_NORMAL ); m_menuFile->Append( m_menuItemLoad ); - m_menuFile->AppendSeparator(); + wxMenuItem* m_separator3; + m_separator3 = m_menuFile->AppendSeparator(); wxMenuItem* m_menuItem4; m_menuItem4 = new wxMenuItem( m_menuFile, wxID_EXIT, wxString( _("&Quit") ) + wxT('\t') + wxT("CTRL-Q"), wxEmptyString, wxITEM_NORMAL ); m_menuFile->Append( m_menuItem4 ); - m_menubar1->Append( m_menuFile, _("&File") ); + m_menubar1->Append( m_menuFile, _("&File") ); m_menuAdvanced = new wxMenu(); m_menuLanguages = new wxMenu(); m_menuAdvanced->Append( -1, _("&Language"), m_menuLanguages ); - m_menuAdvanced->AppendSeparator(); + wxMenuItem* m_separator4; + m_separator4 = m_menuAdvanced->AppendSeparator(); m_menuItemGlobSett = new wxMenuItem( m_menuAdvanced, wxID_ANY, wxString( _("&Global settings...") ) , wxEmptyString, wxITEM_NORMAL ); m_menuAdvanced->Append( m_menuItemGlobSett ); @@ -66,7 +70,7 @@ MainDialogGenerated::MainDialogGenerated( wxWindow* parent, wxWindowID id, const m_menuItem5 = new wxMenuItem( m_menuAdvanced, wxID_ANY, wxString( _("&Export file list...") ) , wxEmptyString, wxITEM_NORMAL ); m_menuAdvanced->Append( m_menuItem5 ); - m_menubar1->Append( m_menuAdvanced, _("&Advanced") ); + m_menubar1->Append( m_menuAdvanced, _("&Advanced") ); m_menuHelp = new wxMenu(); wxMenuItem* m_menuItemReadme; @@ -76,12 +80,13 @@ MainDialogGenerated::MainDialogGenerated( wxWindow* parent, wxWindowID id, const m_menuItemCheckVer = new wxMenuItem( m_menuHelp, wxID_ANY, wxString( _("&Check for new version") ) , wxEmptyString, wxITEM_NORMAL ); m_menuHelp->Append( m_menuItemCheckVer ); - m_menuHelp->AppendSeparator(); + wxMenuItem* m_separator5; + m_separator5 = 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 ); - m_menubar1->Append( m_menuHelp, _("&Help") ); + m_menubar1->Append( m_menuHelp, _("&Help") ); this->SetMenuBar( m_menubar1 ); @@ -186,17 +191,17 @@ MainDialogGenerated::MainDialogGenerated( wxWindow* parent, wxWindowID id, const wxBoxSizer* bSizer92; bSizer92 = new wxBoxSizer( wxVERTICAL ); - sbSizer2 = new wxStaticBoxSizer( new wxStaticBox( m_panelTopLeft, wxID_ANY, _("Drag && drop") ), wxHORIZONTAL ); + sbSizerDirLeft = new wxStaticBoxSizer( new wxStaticBox( m_panelTopLeft, wxID_ANY, _("Drag && drop") ), wxHORIZONTAL ); m_directoryLeft = new CustomComboBox( m_panelTopLeft, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); - sbSizer2->Add( m_directoryLeft, 1, wxALIGN_CENTER_VERTICAL, 5 ); + sbSizerDirLeft->Add( m_directoryLeft, 1, wxALIGN_CENTER_VERTICAL, 5 ); m_dirPickerLeft = new wxDirPickerCtrl( m_panelTopLeft, wxID_ANY, wxEmptyString, _("Select a folder"), wxDefaultPosition, wxDefaultSize, 0 ); m_dirPickerLeft->SetToolTip( _("Select a folder") ); - sbSizer2->Add( m_dirPickerLeft, 0, wxALIGN_CENTER_VERTICAL, 5 ); + sbSizerDirLeft->Add( m_dirPickerLeft, 0, wxALIGN_CENTER_VERTICAL, 5 ); - bSizer92->Add( sbSizer2, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 ); + bSizer92->Add( sbSizerDirLeft, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 ); m_panelTopLeft->SetSizer( bSizer92 ); m_panelTopLeft->Layout(); @@ -255,32 +260,31 @@ MainDialogGenerated::MainDialogGenerated( wxWindow* parent, wxWindowID id, const wxBoxSizer* bSizer77; bSizer77 = new wxBoxSizer( wxHORIZONTAL ); - wxStaticBoxSizer* sbSizer3; - sbSizer3 = new wxStaticBoxSizer( new wxStaticBox( m_panelTopRight, wxID_ANY, _("Drag && drop") ), wxHORIZONTAL ); + sbSizerDirRight = new wxStaticBoxSizer( new wxStaticBox( m_panelTopRight, wxID_ANY, _("Drag && drop") ), wxHORIZONTAL ); m_bpButtonAddPair = new wxBitmapButton( m_panelTopRight, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 19,21 ), wxBU_AUTODRAW ); m_bpButtonAddPair->SetToolTip( _("Add folder pair") ); m_bpButtonAddPair->SetToolTip( _("Add folder pair") ); - sbSizer3->Add( m_bpButtonAddPair, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 3 ); + sbSizerDirRight->Add( m_bpButtonAddPair, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 3 ); m_bpButtonRemovePair = new wxBitmapButton( m_panelTopRight, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 19,21 ), wxBU_AUTODRAW ); m_bpButtonRemovePair->SetToolTip( _("Remove folder pair") ); m_bpButtonRemovePair->SetToolTip( _("Remove folder pair") ); - sbSizer3->Add( m_bpButtonRemovePair, 0, wxALIGN_CENTER_VERTICAL, 5 ); + sbSizerDirRight->Add( m_bpButtonRemovePair, 0, wxALIGN_CENTER_VERTICAL, 5 ); m_directoryRight = new CustomComboBox( m_panelTopRight, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); - sbSizer3->Add( m_directoryRight, 1, wxALIGN_CENTER_VERTICAL, 5 ); + sbSizerDirRight->Add( m_directoryRight, 1, wxALIGN_CENTER_VERTICAL, 5 ); m_dirPickerRight = new wxDirPickerCtrl( m_panelTopRight, wxID_ANY, wxEmptyString, _("Select a folder"), wxDefaultPosition, wxDefaultSize, 0 ); m_dirPickerRight->SetToolTip( _("Select a folder") ); - sbSizer3->Add( m_dirPickerRight, 0, wxALIGN_CENTER_VERTICAL, 5 ); + sbSizerDirRight->Add( m_dirPickerRight, 0, wxALIGN_CENTER_VERTICAL, 5 ); - bSizer77->Add( sbSizer3, 1, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 3 ); + bSizer77->Add( sbSizerDirRight, 1, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 3 ); bSizer94->Add( bSizer77, 0, wxEXPAND|wxLEFT, 3 ); @@ -464,7 +468,6 @@ MainDialogGenerated::MainDialogGenerated( wxWindow* parent, wxWindowID id, const bSizer23 = new wxBoxSizer( wxVERTICAL ); m_checkBoxHideFilt = new wxCheckBox( m_panelFilter, wxID_ANY, _("Hide excluded items"), wxDefaultPosition, wxDefaultSize, 0 ); - m_checkBoxHideFilt->SetToolTip( _("Hide filtered or temporarily excluded files") ); bSizer23->Add( m_checkBoxHideFilt, 0, wxEXPAND, 5 ); @@ -781,13 +784,13 @@ MainDialogGenerated::~MainDialogGenerated() this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnNewConfig ) ); this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnSaveConfig ) ); this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnLoadConfig ) ); - this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuQuit ) ); + this->Disconnect( wxID_EXIT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuQuit ) ); this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuGlobalSettings ) ); this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuBatchJob ) ); this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuExportFileList ) ); this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnShowHelp ) ); this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuCheckVersion ) ); - this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuAbout ) ); + this->Disconnect( wxID_ABOUT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuAbout ) ); m_buttonCompare->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnCompare ), NULL, this ); m_bpButtonCmpConfig->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnCmpSettings ), NULL, this ); m_bpButtonSyncConfig->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSyncSettings ), NULL, this ); @@ -829,6 +832,7 @@ MainDialogGenerated::~MainDialogGenerated() m_bpButtonSyncCreateRight->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSyncCreateRight ), NULL, this ); m_bpButtonConflict->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnConflictFiles ), NULL, this ); m_bpButton10->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnQuit ), NULL, this ); + } FolderPairGenerated::FolderPairGenerated( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style ) : wxPanel( parent, id, pos, size, style ) @@ -1313,7 +1317,6 @@ BatchDlgGenerated::BatchDlgGenerated( wxWindow* parent, wxWindowID id, const wxS sbSizer24->Add( 0, 0, 1, wxEXPAND, 5 ); m_checkBoxSilent = new wxCheckBox( m_panelOverview, wxID_ANY, _("Silent mode"), wxDefaultPosition, wxDefaultSize, 0 ); - m_checkBoxSilent->SetToolTip( _("Run minimized and write status information to a logfile") ); sbSizer24->Add( m_checkBoxSilent, 0, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT, 14 ); @@ -1433,6 +1436,7 @@ BatchDlgGenerated::~BatchDlgGenerated() m_buttonSave->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnSaveBatchJob ), NULL, this ); m_buttonLoad->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnLoadBatchJob ), NULL, this ); m_button6->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnCancel ), NULL, this ); + } CompareStatusGenerated::CompareStatusGenerated( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style ) : wxPanel( parent, id, pos, size, style ) @@ -1572,7 +1576,7 @@ CompareStatusGenerated::CompareStatusGenerated( wxWindow* parent, wxWindowID id, bSizer48->Add( m_staticText30, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 ); m_textCtrlStatus = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY ); - m_textCtrlStatus->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_ACTIVEBORDER ) ); + m_textCtrlStatus->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_APPWORKSPACE ) ); bSizer48->Add( m_textCtrlStatus, 1, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); @@ -1936,6 +1940,7 @@ SyncCfgDlgGenerated::~SyncCfgDlgGenerated() m_bpButtonRightNewer->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnRightNewer ), NULL, this ); m_bpButtonDifferent->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnDifferent ), NULL, this ); m_bpButtonConflict->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnConflict ), NULL, this ); + } CmpCfgDlgGenerated::CmpCfgDlgGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) @@ -2062,6 +2067,7 @@ CmpCfgDlgGenerated::~CmpCfgDlgGenerated() m_choiceHandleSymlinks->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( CmpCfgDlgGenerated::OnChangeErrorHandling ), NULL, this ); m_button10->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CmpCfgDlgGenerated::OnOkay ), NULL, this ); m_button6->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CmpCfgDlgGenerated::OnCancel ), NULL, this ); + } SyncStatusDlgGenerated::SyncStatusDlgGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxFrame( parent, id, title, pos, size, style ) @@ -2078,26 +2084,6 @@ SyncStatusDlgGenerated::SyncStatusDlgGenerated( wxWindow* parent, wxWindowID id, wxBoxSizer* bSizer37; bSizer37 = new wxBoxSizer( wxHORIZONTAL ); - m_animationControl1 = new wxAnimationCtrl(this, wxID_ANY, wxNullAnimation, wxDefaultPosition, wxSize( 45,45 )); - bSizer37->Add( m_animationControl1, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); - - m_panel8 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSIMPLE_BORDER|wxTAB_TRAVERSAL ); - m_panel8->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_3DLIGHT ) ); - - wxBoxSizer* bSizer72; - bSizer72 = new wxBoxSizer( wxVERTICAL ); - - m_staticText56 = new wxStaticText( m_panel8, wxID_ANY, _("Synchronization status"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText56->Wrap( -1 ); - m_staticText56->SetFont( wxFont( 16, 70, 90, 92, false, wxEmptyString ) ); - - bSizer72->Add( m_staticText56, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5 ); - - m_panel8->SetSizer( bSizer72 ); - m_panel8->Layout(); - bSizer72->Fit( m_panel8 ); - bSizer37->Add( m_panel8, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); - bSizer27->Add( bSizer37, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); wxBoxSizer* bSizer42; @@ -2111,10 +2097,13 @@ SyncStatusDlgGenerated::SyncStatusDlgGenerated( wxWindow* parent, wxWindowID id, m_staticTextStatus = new wxStaticText( this, wxID_ANY, _("Synchronizing..."), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextStatus->Wrap( -1 ); - m_staticTextStatus->SetFont( wxFont( 14, 70, 93, 90, false, wxEmptyString ) ); + m_staticTextStatus->SetFont( wxFont( 14, 70, 90, 92, false, wxEmptyString ) ); bSizer42->Add( m_staticTextStatus, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); + m_animationControl1 = new wxAnimationCtrl(this, wxID_ANY, wxNullAnimation, wxDefaultPosition, wxSize( 45,45 )); + bSizer42->Add( m_animationControl1, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); + bSizer42->Add( 0, 0, 1, wxEXPAND, 5 ); @@ -2218,7 +2207,7 @@ SyncStatusDlgGenerated::SyncStatusDlgGenerated( wxWindow* parent, wxWindowID id, bSizer27->Add( bSizer31, 0, wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); m_textCtrlInfo = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY ); - m_textCtrlInfo->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_ACTIVEBORDER ) ); + m_textCtrlInfo->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_APPWORKSPACE ) ); bSizer27->Add( m_textCtrlInfo, 3, wxEXPAND|wxALL, 5 ); @@ -2308,6 +2297,7 @@ SyncStatusDlgGenerated::~SyncStatusDlgGenerated() m_buttonOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncStatusDlgGenerated::OnOkay ), NULL, this ); m_buttonPause->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncStatusDlgGenerated::OnPause ), NULL, this ); m_buttonAbort->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncStatusDlgGenerated::OnAbort ), NULL, this ); + } HelpDlgGenerated::HelpDlgGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) @@ -2482,6 +2472,7 @@ HelpDlgGenerated::~HelpDlgGenerated() // Disconnect Events this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( HelpDlgGenerated::OnClose ) ); m_button8->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( HelpDlgGenerated::OnOK ), NULL, this ); + } AboutDlgGenerated::AboutDlgGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) @@ -2522,7 +2513,7 @@ AboutDlgGenerated::AboutDlgGenerated( wxWindow* parent, wxWindowID id, const wxS m_scrolledWindowCodeInfo = new wxScrolledWindow( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxDOUBLE_BORDER|wxHSCROLL|wxVSCROLL ); m_scrolledWindowCodeInfo->SetScrollRate( 5, 5 ); - m_scrolledWindowCodeInfo->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_ACTIVEBORDER ) ); + m_scrolledWindowCodeInfo->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_APPWORKSPACE ) ); m_scrolledWindowCodeInfo->SetMinSize( wxSize( -1,120 ) ); bSizerCodeInfo = new wxBoxSizer( wxVERTICAL ); @@ -2539,6 +2530,7 @@ AboutDlgGenerated::AboutDlgGenerated( wxWindow* parent, wxWindowID id, const wxS m_hyperlink21 = new wxHyperlinkCtrl( m_scrolledWindowCodeInfo, wxID_ANY, _("- ZenJu -"), wxT("mailto:zhnmju123@gmx.de"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE ); m_hyperlink21->SetFont( wxFont( 10, 74, 93, 92, false, wxT("Segoe Print") ) ); + m_hyperlink21->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_APPWORKSPACE ) ); m_hyperlink21->SetToolTip( _("zhnmju123@gmx.de") ); bSizerCodeInfo->Add( m_hyperlink21, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); @@ -2550,7 +2542,7 @@ AboutDlgGenerated::AboutDlgGenerated( wxWindow* parent, wxWindowID id, const wxS m_scrolledWindowTranslators = new wxScrolledWindow( this, wxID_ANY, wxDefaultPosition, wxSize( -1,-1 ), wxDOUBLE_BORDER|wxHSCROLL|wxVSCROLL ); m_scrolledWindowTranslators->SetScrollRate( 5, 5 ); - m_scrolledWindowTranslators->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_ACTIVEBORDER ) ); + m_scrolledWindowTranslators->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_APPWORKSPACE ) ); m_scrolledWindowTranslators->SetMinSize( wxSize( -1,140 ) ); m_scrolledWindowTranslators->SetMaxSize( wxSize( -1,145 ) ); @@ -2692,6 +2684,7 @@ AboutDlgGenerated::~AboutDlgGenerated() // Disconnect Events this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( AboutDlgGenerated::OnClose ) ); m_buttonOkay->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( AboutDlgGenerated::OnOK ), NULL, this ); + } ErrorDlgGenerated::ErrorDlgGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) @@ -2711,14 +2704,13 @@ ErrorDlgGenerated::ErrorDlgGenerated( wxWindow* parent, wxWindowID id, const wxS bSizer26->Add( m_bitmap10, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); m_textCtrl8 = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), wxTE_MULTILINE|wxTE_READONLY ); - m_textCtrl8->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_ACTIVEBORDER ) ); + m_textCtrl8->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_APPWORKSPACE ) ); bSizer26->Add( m_textCtrl8, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 ); bSizer24->Add( bSizer26, 1, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); m_checkBoxIgnoreErrors = new wxCheckBox( this, wxID_ANY, _("Ignore subsequent errors"), wxDefaultPosition, wxDefaultSize, 0 ); - m_checkBoxIgnoreErrors->SetToolTip( _("Hide further error messages during the current process") ); bSizer24->Add( m_checkBoxIgnoreErrors, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP, 10 ); @@ -2767,6 +2759,7 @@ ErrorDlgGenerated::~ErrorDlgGenerated() m_buttonIgnore->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ErrorDlgGenerated::OnIgnore ), NULL, this ); m_buttonRetry->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ErrorDlgGenerated::OnRetry ), NULL, this ); m_buttonAbort->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ErrorDlgGenerated::OnAbort ), NULL, this ); + } WarningDlgGenerated::WarningDlgGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) @@ -2786,14 +2779,13 @@ WarningDlgGenerated::WarningDlgGenerated( wxWindow* parent, wxWindowID id, const bSizer26->Add( m_bitmap10, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); m_textCtrl8 = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), wxTE_MULTILINE|wxTE_READONLY ); - m_textCtrl8->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_ACTIVEBORDER ) ); + m_textCtrl8->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_APPWORKSPACE ) ); bSizer26->Add( m_textCtrl8, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 ); bSizer24->Add( bSizer26, 1, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); m_checkBoxDontShowAgain = new wxCheckBox( this, wxID_ANY, _("Do not show this dialog again"), wxDefaultPosition, wxDefaultSize, 0 ); - bSizer24->Add( m_checkBoxDontShowAgain, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP, 10 ); @@ -2840,6 +2832,7 @@ WarningDlgGenerated::~WarningDlgGenerated() m_buttonIgnore->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( WarningDlgGenerated::OnIgnore ), NULL, this ); m_buttonSwitch->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( WarningDlgGenerated::OnSwitch ), NULL, this ); m_buttonAbort->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( WarningDlgGenerated::OnAbort ), NULL, this ); + } QuestionDlgGenerated::QuestionDlgGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) @@ -2859,14 +2852,13 @@ QuestionDlgGenerated::QuestionDlgGenerated( wxWindow* parent, wxWindowID id, con bSizer26->Add( m_bitmap10, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); m_textCtrl8 = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), wxTE_MULTILINE|wxTE_READONLY ); - m_textCtrl8->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_ACTIVEBORDER ) ); + m_textCtrl8->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_APPWORKSPACE ) ); bSizer26->Add( m_textCtrl8, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 ); bSizer24->Add( bSizer26, 1, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); m_checkBoxDontAskAgain = new wxCheckBox( this, wxID_ANY, _("Do not show this dialog again"), wxDefaultPosition, wxDefaultSize, 0 ); - bSizer24->Add( m_checkBoxDontAskAgain, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP, 10 ); @@ -2913,6 +2905,7 @@ QuestionDlgGenerated::~QuestionDlgGenerated() m_buttonYes->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( QuestionDlgGenerated::OnYes ), NULL, this ); m_buttonNo->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( QuestionDlgGenerated::OnNo ), NULL, this ); m_buttonCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( QuestionDlgGenerated::OnCancel ), NULL, this ); + } DeleteDlgGenerated::DeleteDlgGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) @@ -2949,7 +2942,6 @@ DeleteDlgGenerated::DeleteDlgGenerated( wxWindow* parent, wxWindowID id, const w bSizer99 = new wxBoxSizer( wxHORIZONTAL ); m_checkBoxDeleteBothSides = new wxCheckBox( this, wxID_ANY, _("Delete on both sides"), wxDefaultPosition, wxDefaultSize, 0 ); - m_checkBoxDeleteBothSides->SetToolTip( _("Delete on both sides even if the file is selected on one side only") ); bSizer99->Add( m_checkBoxDeleteBothSides, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); @@ -2958,14 +2950,13 @@ DeleteDlgGenerated::DeleteDlgGenerated( wxWindow* parent, wxWindowID id, const w bSizer99->Add( 0, 0, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); m_checkBoxUseRecycler = new wxCheckBox( this, wxID_ANY, _("Use Recycle Bin"), wxDefaultPosition, wxDefaultSize, 0 ); - m_checkBoxUseRecycler->SetValue(true); - + m_checkBoxUseRecycler->SetValue(true); bSizer99->Add( m_checkBoxUseRecycler, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); bSizer24->Add( bSizer99, 0, wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT, 10 ); m_textCtrlMessage = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), wxTE_MULTILINE|wxTE_READONLY ); - m_textCtrlMessage->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_ACTIVEBORDER ) ); + m_textCtrlMessage->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_APPWORKSPACE ) ); bSizer24->Add( m_textCtrlMessage, 1, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); @@ -3004,6 +2995,7 @@ DeleteDlgGenerated::~DeleteDlgGenerated() m_checkBoxUseRecycler->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DeleteDlgGenerated::OnUseRecycler ), NULL, this ); m_buttonOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DeleteDlgGenerated::OnOK ), NULL, this ); m_buttonCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DeleteDlgGenerated::OnCancel ), NULL, this ); + } FilterDlgGenerated::FilterDlgGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) @@ -3217,6 +3209,7 @@ FilterDlgGenerated::~FilterDlgGenerated() m_button9->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FilterDlgGenerated::OnDefault ), NULL, this ); m_button10->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FilterDlgGenerated::OnApply ), NULL, this ); m_button17->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FilterDlgGenerated::OnCancel ), NULL, this ); + } CustomizeColsDlgGenerated::CustomizeColsDlgGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) @@ -3300,6 +3293,7 @@ CustomizeColsDlgGenerated::~CustomizeColsDlgGenerated() m_button9->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CustomizeColsDlgGenerated::OnDefault ), NULL, this ); m_button28->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CustomizeColsDlgGenerated::OnOkay ), NULL, this ); m_button29->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CustomizeColsDlgGenerated::OnCancel ), NULL, this ); + } GlobalSettingsDlgGenerated::GlobalSettingsDlgGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) @@ -3343,20 +3337,12 @@ GlobalSettingsDlgGenerated::GlobalSettingsDlgGenerated( wxWindow* parent, wxWind wxStaticBoxSizer* sbSizer23; sbSizer23 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, wxEmptyString ), wxVERTICAL ); - m_checkBoxIgnoreOneHour = new wxCheckBox( this, wxID_ANY, _("Ignore 1-hour file time difference"), wxDefaultPosition, wxDefaultSize, 0 ); - - m_checkBoxIgnoreOneHour->SetToolTip( _("Treat file times that differ by exactly +/- 1 hour as equal, less than 1 hour as conflict in order to handle Daylight Saving Time changes") ); - - sbSizer23->Add( m_checkBoxIgnoreOneHour, 0, wxALL|wxEXPAND, 5 ); - m_checkBoxCopyLocked = new wxCheckBox( this, wxID_ANY, _("Copy locked files"), wxDefaultPosition, wxDefaultSize, 0 ); - m_checkBoxCopyLocked->SetToolTip( _("Copy shared or locked files using Volume Shadow Copy Service\n(Requires Administrator rights)") ); sbSizer23->Add( m_checkBoxCopyLocked, 0, wxALL|wxEXPAND, 5 ); m_checkBoxCopyPermissions = new wxCheckBox( this, wxID_ANY, _("Copy filesystem permissions"), wxDefaultPosition, wxDefaultSize, 0 ); - m_checkBoxCopyPermissions->SetToolTip( _("Transfer file and directory permissions\n(Requires Administrator rights)") ); sbSizer23->Add( m_checkBoxCopyPermissions, 0, wxALL|wxEXPAND, 5 ); @@ -3487,6 +3473,7 @@ GlobalSettingsDlgGenerated::~GlobalSettingsDlgGenerated() m_button9->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GlobalSettingsDlgGenerated::OnDefault ), NULL, this ); m_buttonOkay->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GlobalSettingsDlgGenerated::OnOkay ), NULL, this ); m_button29->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GlobalSettingsDlgGenerated::OnCancel ), NULL, this ); + } SyncPreviewDlgGenerated::SyncPreviewDlgGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) @@ -3659,7 +3646,6 @@ SyncPreviewDlgGenerated::SyncPreviewDlgGenerated( wxWindow* parent, wxWindowID i bSizer142 = new wxBoxSizer( wxHORIZONTAL ); m_checkBoxDontShowAgain = new wxCheckBox( this, wxID_ANY, _("Do not show this dialog again"), wxDefaultPosition, wxDefaultSize, 0 ); - bSizer142->Add( m_checkBoxDontShowAgain, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); @@ -3688,6 +3674,7 @@ SyncPreviewDlgGenerated::~SyncPreviewDlgGenerated() this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( SyncPreviewDlgGenerated::OnClose ) ); m_buttonStartSync->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncPreviewDlgGenerated::OnStartSync ), NULL, this ); m_button16->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncPreviewDlgGenerated::OnCancel ), NULL, this ); + } PopupFrameGenerated1::PopupFrameGenerated1( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxFrame( parent, id, title, pos, size, style ) @@ -3740,8 +3727,7 @@ SearchDialogGenerated::SearchDialogGenerated( wxWindow* parent, wxWindowID id, c bSizer166->Add( 0, 10, 0, 0, 5 ); m_checkBoxMatchCase = new wxCheckBox( this, wxID_ANY, _("Match case"), wxDefaultPosition, wxDefaultSize, 0 ); - - bSizer166->Add( m_checkBoxMatchCase, 0, wxALL|wxEXPAND, 5 ); + bSizer166->Add( m_checkBoxMatchCase, 0, wxALL, 5 ); bSizer161->Add( bSizer166, 1, wxALIGN_CENTER_VERTICAL, 5 ); @@ -3779,4 +3765,5 @@ SearchDialogGenerated::~SearchDialogGenerated() m_textCtrlSearchTxt->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( SearchDialogGenerated::OnText ), NULL, this ); m_buttonFindNext->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SearchDialogGenerated::OnFindNext ), NULL, this ); m_button29->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SearchDialogGenerated::OnCancel ), NULL, this ); + } diff --git a/ui/gui_generated.h b/ui/gui_generated.h index 96ede3c4..22bddfb1 100644 --- a/ui/gui_generated.h +++ b/ui/gui_generated.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Apr 16 2008) +// C++ code generated with wxFormBuilder (version Sep 8 2010) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -92,7 +92,7 @@ class MainDialogGenerated : public wxFrame wxBitmapButton* m_bpButtonSyncConfig; wxButtonWithImage* m_buttonStartSync; - wxStaticBoxSizer* sbSizer2; + wxStaticBoxSizer* sbSizerDirLeft; wxPanel* m_panelTopMiddle; wxBoxSizer* bSizerMiddle; @@ -100,6 +100,7 @@ class MainDialogGenerated : public wxFrame + wxStaticBoxSizer* sbSizerDirRight; wxBitmapButton* m_bpButtonAddPair; wxScrolledWindow* m_scrolledWindowFolderPairs; wxBoxSizer* bSizerAddFolderPairs; @@ -162,55 +163,55 @@ class MainDialogGenerated : public wxFrame wxStaticBitmap* m_bitmap15; // Virtual event handlers, overide them in your derived class - virtual void OnClose( wxCloseEvent& event ){ event.Skip(); } - virtual void OnCompare( wxCommandEvent& event ){ event.Skip(); } - virtual void OnStartSync( wxCommandEvent& event ){ event.Skip(); } - virtual void OnSwitchView( wxCommandEvent& event ){ event.Skip(); } - virtual void OnNewConfig( wxCommandEvent& event ){ event.Skip(); } - virtual void OnSaveConfig( wxCommandEvent& event ){ event.Skip(); } - virtual void OnLoadConfig( wxCommandEvent& event ){ event.Skip(); } - virtual void OnMenuQuit( wxCommandEvent& event ){ event.Skip(); } - virtual void OnMenuGlobalSettings( wxCommandEvent& event ){ event.Skip(); } - virtual void OnMenuBatchJob( wxCommandEvent& event ){ event.Skip(); } - virtual void OnMenuExportFileList( wxCommandEvent& event ){ event.Skip(); } - virtual void OnShowHelp( wxCommandEvent& event ){ event.Skip(); } - virtual void OnMenuCheckVersion( wxCommandEvent& event ){ event.Skip(); } - virtual void OnMenuAbout( wxCommandEvent& event ){ event.Skip(); } - virtual void OnCmpSettings( wxCommandEvent& event ){ event.Skip(); } - virtual void OnSyncSettings( wxCommandEvent& event ){ event.Skip(); } - virtual void OnDirSelected( wxFileDirPickerEvent& event ){ event.Skip(); } - virtual void OnSwapSides( wxCommandEvent& event ){ event.Skip(); } - virtual void OnAddFolderPair( wxCommandEvent& event ){ event.Skip(); } - virtual void OnRemoveTopFolderPair( wxCommandEvent& event ){ event.Skip(); } - virtual void OnLeftGridDoubleClick( wxGridEvent& event ){ event.Skip(); } - virtual void OnContextRim( wxGridEvent& event ){ event.Skip(); } - virtual void OnSortLeftGrid( wxGridEvent& event ){ event.Skip(); } - virtual void OnContextRimLabelLeft( wxGridEvent& event ){ event.Skip(); } - virtual void OnContextMiddle( wxGridEvent& event ){ event.Skip(); } - virtual void OnSortMiddleGrid( wxGridEvent& event ){ event.Skip(); } - virtual void OnContextMiddleLabel( wxGridEvent& event ){ event.Skip(); } - virtual void OnRightGridDoubleClick( wxGridEvent& event ){ event.Skip(); } - virtual void OnSortRightGrid( wxGridEvent& event ){ event.Skip(); } - virtual void OnContextRimLabelRight( wxGridEvent& event ){ event.Skip(); } - virtual void OnCfgHistoryKeyEvent( wxKeyEvent& event ){ event.Skip(); } - virtual void OnLoadFromHistory( wxCommandEvent& event ){ event.Skip(); } - virtual void OnConfigureFilter( wxCommandEvent& event ){ event.Skip(); } - virtual void OnHideFilteredButton( wxCommandEvent& event ){ event.Skip(); } - virtual void OnSyncCreateLeft( wxCommandEvent& event ){ event.Skip(); } - virtual void OnSyncDirLeft( wxCommandEvent& event ){ event.Skip(); } - virtual void OnSyncDeleteLeft( wxCommandEvent& event ){ event.Skip(); } - virtual void OnLeftOnlyFiles( wxCommandEvent& event ){ event.Skip(); } - virtual void OnLeftNewerFiles( wxCommandEvent& event ){ event.Skip(); } - virtual void OnEqualFiles( wxCommandEvent& event ){ event.Skip(); } - virtual void OnDifferentFiles( wxCommandEvent& event ){ event.Skip(); } - virtual void OnSyncDirNone( wxCommandEvent& event ){ event.Skip(); } - virtual void OnRightNewerFiles( wxCommandEvent& event ){ event.Skip(); } - virtual void OnRightOnlyFiles( wxCommandEvent& event ){ event.Skip(); } - virtual void OnSyncDeleteRight( wxCommandEvent& event ){ event.Skip(); } - virtual void OnSyncDirRight( wxCommandEvent& event ){ event.Skip(); } - virtual void OnSyncCreateRight( wxCommandEvent& event ){ event.Skip(); } - virtual void OnConflictFiles( wxCommandEvent& event ){ event.Skip(); } - virtual void OnQuit( wxCommandEvent& event ){ event.Skip(); } + virtual void OnClose( wxCloseEvent& event ) { event.Skip(); } + virtual void OnCompare( wxCommandEvent& event ) { event.Skip(); } + virtual void OnStartSync( wxCommandEvent& event ) { event.Skip(); } + virtual void OnSwitchView( wxCommandEvent& event ) { event.Skip(); } + virtual void OnNewConfig( wxCommandEvent& event ) { event.Skip(); } + virtual void OnSaveConfig( wxCommandEvent& event ) { event.Skip(); } + virtual void OnLoadConfig( wxCommandEvent& event ) { event.Skip(); } + virtual void OnMenuQuit( wxCommandEvent& event ) { event.Skip(); } + virtual void OnMenuGlobalSettings( wxCommandEvent& event ) { event.Skip(); } + virtual void OnMenuBatchJob( wxCommandEvent& event ) { event.Skip(); } + virtual void OnMenuExportFileList( wxCommandEvent& event ) { event.Skip(); } + virtual void OnShowHelp( wxCommandEvent& event ) { event.Skip(); } + virtual void OnMenuCheckVersion( wxCommandEvent& event ) { event.Skip(); } + virtual void OnMenuAbout( wxCommandEvent& event ) { event.Skip(); } + virtual void OnCmpSettings( wxCommandEvent& event ) { event.Skip(); } + virtual void OnSyncSettings( wxCommandEvent& event ) { event.Skip(); } + virtual void OnDirSelected( wxFileDirPickerEvent& event ) { event.Skip(); } + virtual void OnSwapSides( wxCommandEvent& event ) { event.Skip(); } + virtual void OnAddFolderPair( wxCommandEvent& event ) { event.Skip(); } + virtual void OnRemoveTopFolderPair( wxCommandEvent& event ) { event.Skip(); } + virtual void OnLeftGridDoubleClick( wxGridEvent& event ) { event.Skip(); } + virtual void OnContextRim( wxGridEvent& event ) { event.Skip(); } + virtual void OnSortLeftGrid( wxGridEvent& event ) { event.Skip(); } + virtual void OnContextRimLabelLeft( wxGridEvent& event ) { event.Skip(); } + virtual void OnContextMiddle( wxGridEvent& event ) { event.Skip(); } + virtual void OnSortMiddleGrid( wxGridEvent& event ) { event.Skip(); } + virtual void OnContextMiddleLabel( wxGridEvent& event ) { event.Skip(); } + virtual void OnRightGridDoubleClick( wxGridEvent& event ) { event.Skip(); } + virtual void OnSortRightGrid( wxGridEvent& event ) { event.Skip(); } + virtual void OnContextRimLabelRight( wxGridEvent& event ) { event.Skip(); } + virtual void OnCfgHistoryKeyEvent( wxKeyEvent& event ) { event.Skip(); } + virtual void OnLoadFromHistory( wxCommandEvent& event ) { event.Skip(); } + virtual void OnConfigureFilter( wxCommandEvent& event ) { event.Skip(); } + virtual void OnHideFilteredButton( wxCommandEvent& event ) { event.Skip(); } + virtual void OnSyncCreateLeft( wxCommandEvent& event ) { event.Skip(); } + virtual void OnSyncDirLeft( wxCommandEvent& event ) { event.Skip(); } + virtual void OnSyncDeleteLeft( wxCommandEvent& event ) { event.Skip(); } + virtual void OnLeftOnlyFiles( wxCommandEvent& event ) { event.Skip(); } + virtual void OnLeftNewerFiles( wxCommandEvent& event ) { event.Skip(); } + virtual void OnEqualFiles( wxCommandEvent& event ) { event.Skip(); } + virtual void OnDifferentFiles( wxCommandEvent& event ) { event.Skip(); } + virtual void OnSyncDirNone( wxCommandEvent& event ) { event.Skip(); } + virtual void OnRightNewerFiles( wxCommandEvent& event ) { event.Skip(); } + virtual void OnRightOnlyFiles( wxCommandEvent& event ) { event.Skip(); } + virtual void OnSyncDeleteRight( wxCommandEvent& event ) { event.Skip(); } + virtual void OnSyncDirRight( wxCommandEvent& event ) { event.Skip(); } + virtual void OnSyncCreateRight( wxCommandEvent& event ) { event.Skip(); } + virtual void OnConflictFiles( wxCommandEvent& event ) { event.Skip(); } + virtual void OnQuit( wxCommandEvent& event ) { event.Skip(); } public: @@ -225,6 +226,7 @@ class MainDialogGenerated : public wxFrame wxDirPickerCtrl* m_dirPickerRight; wxPanel* m_panelLeft; wxPanel* m_panelRight; + MainDialogGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 933,612 ), long style = wxDEFAULT_FRAME_STYLE|wxTAB_TRAVERSAL ); ~MainDialogGenerated(); @@ -254,6 +256,7 @@ class FolderPairGenerated : public wxPanel wxBitmapButton* m_bpButtonRemovePair; wxTextCtrl* m_directoryRight; wxDirPickerCtrl* m_dirPickerRight; + FolderPairGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL ); ~FolderPairGenerated(); @@ -282,6 +285,7 @@ class BatchFolderPairGenerated : public wxPanel wxTextCtrl* m_directoryRight; wxDirPickerCtrl* m_dirPickerRight; wxBitmapButton* m_bpButtonAltSyncCfg; + BatchFolderPairGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL ); ~BatchFolderPairGenerated(); @@ -337,18 +341,18 @@ class BatchDlgGenerated : public wxDialog wxButton* m_button6; // Virtual event handlers, overide them in your derived class - virtual void OnClose( wxCloseEvent& event ){ event.Skip(); } - virtual void OnHelp( wxCommandEvent& event ){ event.Skip(); } - virtual void OnCmpSettings( wxCommandEvent& event ){ event.Skip(); } - virtual void OnConfigureFilter( wxCommandEvent& event ){ event.Skip(); } - virtual void OnSyncSettings( wxCommandEvent& event ){ event.Skip(); } - virtual void OnAddFolderPair( wxCommandEvent& event ){ event.Skip(); } - virtual void OnRemoveTopFolderPair( wxCommandEvent& event ){ event.Skip(); } - virtual void OnCheckSilent( wxCommandEvent& event ){ event.Skip(); } - virtual void OnChangeErrorHandling( wxCommandEvent& event ){ event.Skip(); } - virtual void OnSaveBatchJob( wxCommandEvent& event ){ event.Skip(); } - virtual void OnLoadBatchJob( wxCommandEvent& event ){ event.Skip(); } - virtual void OnCancel( wxCommandEvent& event ){ event.Skip(); } + virtual void OnClose( wxCloseEvent& event ) { event.Skip(); } + virtual void OnHelp( wxCommandEvent& event ) { event.Skip(); } + virtual void OnCmpSettings( wxCommandEvent& event ) { event.Skip(); } + virtual void OnConfigureFilter( wxCommandEvent& event ) { event.Skip(); } + virtual void OnSyncSettings( wxCommandEvent& event ) { event.Skip(); } + virtual void OnAddFolderPair( wxCommandEvent& event ) { event.Skip(); } + virtual void OnRemoveTopFolderPair( wxCommandEvent& event ) { event.Skip(); } + virtual void OnCheckSilent( wxCommandEvent& event ) { event.Skip(); } + virtual void OnChangeErrorHandling( wxCommandEvent& event ) { event.Skip(); } + virtual void OnSaveBatchJob( wxCommandEvent& event ) { event.Skip(); } + virtual void OnLoadBatchJob( wxCommandEvent& event ) { event.Skip(); } + virtual void OnCancel( wxCommandEvent& event ) { event.Skip(); } public: @@ -363,6 +367,7 @@ class BatchDlgGenerated : public wxDialog wxTextCtrl* m_directoryRight; wxDirPickerCtrl* m_dirPickerRight; wxBitmapButton* m_bpButtonAltSyncCfg; + BatchDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Create a batch job"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); ~BatchDlgGenerated(); @@ -402,6 +407,7 @@ class CompareStatusGenerated : public wxPanel wxGauge* m_gauge2; public: + CompareStatusGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL ); ~CompareStatusGenerated(); @@ -467,24 +473,25 @@ class SyncCfgDlgGenerated : public wxDialog wxBitmapButton* m_bpButtonConflict; // Virtual event handlers, overide them in your derived class - virtual void OnClose( wxCloseEvent& event ){ event.Skip(); } - virtual void OnSyncAutomatic( wxCommandEvent& event ){ event.Skip(); } - virtual void OnSyncLeftToRight( wxCommandEvent& event ){ event.Skip(); } - virtual void OnSyncUpdate( wxCommandEvent& event ){ event.Skip(); } - virtual void OnSyncCustom( wxCommandEvent& event ){ event.Skip(); } - virtual void OnChangeErrorHandling( wxCommandEvent& event ){ event.Skip(); } - virtual void OnChangeDeletionHandling( wxCommandEvent& event ){ event.Skip(); } - virtual void OnApply( wxCommandEvent& event ){ event.Skip(); } - virtual void OnCancel( wxCommandEvent& event ){ event.Skip(); } - virtual void OnExLeftSideOnly( wxCommandEvent& event ){ event.Skip(); } - virtual void OnExRightSideOnly( wxCommandEvent& event ){ event.Skip(); } - virtual void OnLeftNewer( wxCommandEvent& event ){ event.Skip(); } - virtual void OnRightNewer( wxCommandEvent& event ){ event.Skip(); } - virtual void OnDifferent( wxCommandEvent& event ){ event.Skip(); } - virtual void OnConflict( wxCommandEvent& event ){ event.Skip(); } + virtual void OnClose( wxCloseEvent& event ) { event.Skip(); } + virtual void OnSyncAutomatic( wxCommandEvent& event ) { event.Skip(); } + virtual void OnSyncLeftToRight( wxCommandEvent& event ) { event.Skip(); } + virtual void OnSyncUpdate( wxCommandEvent& event ) { event.Skip(); } + virtual void OnSyncCustom( wxCommandEvent& event ) { event.Skip(); } + virtual void OnChangeErrorHandling( wxCommandEvent& event ) { event.Skip(); } + virtual void OnChangeDeletionHandling( wxCommandEvent& event ) { event.Skip(); } + virtual void OnApply( wxCommandEvent& event ) { event.Skip(); } + virtual void OnCancel( wxCommandEvent& event ) { event.Skip(); } + virtual void OnExLeftSideOnly( wxCommandEvent& event ) { event.Skip(); } + virtual void OnExRightSideOnly( wxCommandEvent& event ) { event.Skip(); } + virtual void OnLeftNewer( wxCommandEvent& event ) { event.Skip(); } + virtual void OnRightNewer( wxCommandEvent& event ) { event.Skip(); } + virtual void OnDifferent( wxCommandEvent& event ) { event.Skip(); } + virtual void OnConflict( wxCommandEvent& event ) { event.Skip(); } public: + SyncCfgDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Synchronization settings"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE ); ~SyncCfgDlgGenerated(); @@ -512,16 +519,17 @@ class CmpCfgDlgGenerated : public wxDialog wxButton* m_button6; // Virtual event handlers, overide them in your derived class - virtual void OnClose( wxCloseEvent& event ){ event.Skip(); } - virtual void OnTimeSize( wxCommandEvent& event ){ event.Skip(); } - virtual void OnContent( wxCommandEvent& event ){ event.Skip(); } - virtual void OnShowHelp( wxCommandEvent& event ){ event.Skip(); } - virtual void OnChangeErrorHandling( wxCommandEvent& event ){ event.Skip(); } - virtual void OnOkay( wxCommandEvent& event ){ event.Skip(); } - virtual void OnCancel( wxCommandEvent& event ){ event.Skip(); } + virtual void OnClose( wxCloseEvent& event ) { event.Skip(); } + virtual void OnTimeSize( wxCommandEvent& event ) { event.Skip(); } + virtual void OnContent( wxCommandEvent& event ) { event.Skip(); } + virtual void OnShowHelp( wxCommandEvent& event ) { event.Skip(); } + virtual void OnChangeErrorHandling( wxCommandEvent& event ) { event.Skip(); } + virtual void OnOkay( wxCommandEvent& event ) { event.Skip(); } + virtual void OnCancel( wxCommandEvent& event ) { event.Skip(); } public: + CmpCfgDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Comparison settings"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE ); ~CmpCfgDlgGenerated(); @@ -536,12 +544,10 @@ class SyncStatusDlgGenerated : public wxFrame protected: - wxAnimationCtrl* m_animationControl1; - wxPanel* m_panel8; - wxStaticText* m_staticText56; wxStaticBitmap* m_bitmapStatus; wxStaticText* m_staticTextStatus; + wxAnimationCtrl* m_animationControl1; wxBoxSizer* bSizer31; wxBoxSizer* bSizerObjectsRemaining; @@ -575,16 +581,17 @@ class SyncStatusDlgGenerated : public wxFrame // Virtual event handlers, overide them in your derived class - virtual void OnClose( wxCloseEvent& event ){ event.Skip(); } - virtual void OnIconize( wxIconizeEvent& event ){ event.Skip(); } - virtual void OnOkay( wxCommandEvent& event ){ event.Skip(); } - virtual void OnPause( wxCommandEvent& event ){ event.Skip(); } - virtual void OnAbort( wxCommandEvent& event ){ event.Skip(); } + virtual void OnClose( wxCloseEvent& event ) { event.Skip(); } + virtual void OnIconize( wxIconizeEvent& event ) { event.Skip(); } + virtual void OnOkay( wxCommandEvent& event ) { event.Skip(); } + virtual void OnPause( wxCommandEvent& event ) { event.Skip(); } + virtual void OnAbort( wxCommandEvent& event ) { event.Skip(); } public: wxGauge* m_gauge1; - SyncStatusDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 638,376 ), long style = wxDEFAULT_FRAME_STYLE|wxTAB_TRAVERSAL ); + + SyncStatusDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 638,350 ), long style = wxDEFAULT_FRAME_STYLE|wxTAB_TRAVERSAL ); ~SyncStatusDlgGenerated(); }; @@ -629,11 +636,12 @@ class HelpDlgGenerated : public wxDialog wxButton* m_button8; // Virtual event handlers, overide them in your derived class - virtual void OnClose( wxCloseEvent& event ){ event.Skip(); } - virtual void OnOK( wxCommandEvent& event ){ event.Skip(); } + virtual void OnClose( wxCloseEvent& event ) { event.Skip(); } + virtual void OnOK( wxCommandEvent& event ) { event.Skip(); } public: + HelpDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 579,543 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); ~HelpDlgGenerated(); @@ -682,11 +690,12 @@ class AboutDlgGenerated : public wxDialog wxButton* m_buttonOkay; // Virtual event handlers, overide them in your derived class - virtual void OnClose( wxCloseEvent& event ){ event.Skip(); } - virtual void OnOK( wxCommandEvent& event ){ event.Skip(); } + virtual void OnClose( wxCloseEvent& event ) { event.Skip(); } + virtual void OnOK( wxCommandEvent& event ) { event.Skip(); } public: + AboutDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("About"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE ); ~AboutDlgGenerated(); @@ -711,13 +720,14 @@ class ErrorDlgGenerated : public wxDialog // Virtual event handlers, overide them in your derived class - virtual void OnClose( wxCloseEvent& event ){ event.Skip(); } - virtual void OnIgnore( wxCommandEvent& event ){ event.Skip(); } - virtual void OnRetry( wxCommandEvent& event ){ event.Skip(); } - virtual void OnAbort( wxCommandEvent& event ){ event.Skip(); } + virtual void OnClose( wxCloseEvent& event ) { event.Skip(); } + virtual void OnIgnore( wxCommandEvent& event ) { event.Skip(); } + virtual void OnRetry( wxCommandEvent& event ) { event.Skip(); } + virtual void OnAbort( wxCommandEvent& event ) { event.Skip(); } public: + ErrorDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Error"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 421,228 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); ~ErrorDlgGenerated(); @@ -741,14 +751,15 @@ class WarningDlgGenerated : public wxDialog // Virtual event handlers, overide them in your derived class - virtual void OnClose( wxCloseEvent& event ){ event.Skip(); } - virtual void OnIgnore( wxCommandEvent& event ){ event.Skip(); } - virtual void OnSwitch( wxCommandEvent& event ){ event.Skip(); } - virtual void OnAbort( wxCommandEvent& event ){ event.Skip(); } + virtual void OnClose( wxCloseEvent& event ) { event.Skip(); } + virtual void OnIgnore( wxCommandEvent& event ) { event.Skip(); } + virtual void OnSwitch( wxCommandEvent& event ) { event.Skip(); } + virtual void OnAbort( wxCommandEvent& event ) { event.Skip(); } public: wxStaticBitmap* m_bitmap10; + WarningDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Warning"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 421,231 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); ~WarningDlgGenerated(); @@ -773,13 +784,14 @@ class QuestionDlgGenerated : public wxDialog // Virtual event handlers, overide them in your derived class - virtual void OnClose( wxCloseEvent& event ){ event.Skip(); } - virtual void OnYes( wxCommandEvent& event ){ event.Skip(); } - virtual void OnNo( wxCommandEvent& event ){ event.Skip(); } - virtual void OnCancel( wxCommandEvent& event ){ event.Skip(); } + virtual void OnClose( wxCloseEvent& event ) { event.Skip(); } + virtual void OnYes( wxCommandEvent& event ) { event.Skip(); } + virtual void OnNo( wxCommandEvent& event ) { event.Skip(); } + virtual void OnCancel( wxCommandEvent& event ) { event.Skip(); } public: + QuestionDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Question"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 420,198 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); ~QuestionDlgGenerated(); @@ -806,14 +818,15 @@ class DeleteDlgGenerated : public wxDialog wxButton* m_buttonCancel; // Virtual event handlers, overide them in your derived class - virtual void OnClose( wxCloseEvent& event ){ event.Skip(); } - virtual void OnDelOnBothSides( wxCommandEvent& event ){ event.Skip(); } - virtual void OnUseRecycler( wxCommandEvent& event ){ event.Skip(); } - virtual void OnOK( wxCommandEvent& event ){ event.Skip(); } - virtual void OnCancel( wxCommandEvent& event ){ event.Skip(); } + virtual void OnClose( wxCloseEvent& event ) { event.Skip(); } + virtual void OnDelOnBothSides( wxCommandEvent& event ) { event.Skip(); } + virtual void OnUseRecycler( wxCommandEvent& event ) { event.Skip(); } + virtual void OnOK( wxCommandEvent& event ) { event.Skip(); } + virtual void OnCancel( wxCommandEvent& event ) { event.Skip(); } public: + DeleteDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Confirm"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 553,336 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); ~DeleteDlgGenerated(); @@ -857,14 +870,15 @@ class FilterDlgGenerated : public wxDialog wxButton* m_button17; // Virtual event handlers, overide them in your derived class - virtual void OnClose( wxCloseEvent& event ){ event.Skip(); } - virtual void OnHelp( wxCommandEvent& event ){ event.Skip(); } - virtual void OnDefault( wxCommandEvent& event ){ event.Skip(); } - virtual void OnApply( wxCommandEvent& event ){ event.Skip(); } - virtual void OnCancel( wxCommandEvent& event ){ event.Skip(); } + virtual void OnClose( wxCloseEvent& event ) { event.Skip(); } + virtual void OnHelp( wxCommandEvent& event ) { event.Skip(); } + virtual void OnDefault( wxCommandEvent& event ) { event.Skip(); } + virtual void OnApply( wxCommandEvent& event ) { event.Skip(); } + virtual void OnCancel( wxCommandEvent& event ) { event.Skip(); } public: + FilterDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Configure filter"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); ~FilterDlgGenerated(); @@ -887,15 +901,16 @@ class CustomizeColsDlgGenerated : public wxDialog wxButton* m_button29; // Virtual event handlers, overide them in your derived class - virtual void OnClose( wxCloseEvent& event ){ event.Skip(); } - virtual void OnMoveUp( wxCommandEvent& event ){ event.Skip(); } - virtual void OnMoveDown( wxCommandEvent& event ){ event.Skip(); } - virtual void OnDefault( wxCommandEvent& event ){ event.Skip(); } - virtual void OnOkay( wxCommandEvent& event ){ event.Skip(); } - virtual void OnCancel( wxCommandEvent& event ){ event.Skip(); } + virtual void OnClose( wxCloseEvent& event ) { event.Skip(); } + virtual void OnMoveUp( wxCommandEvent& event ) { event.Skip(); } + virtual void OnMoveDown( wxCommandEvent& event ) { event.Skip(); } + virtual void OnDefault( wxCommandEvent& event ) { event.Skip(); } + virtual void OnOkay( wxCommandEvent& event ) { event.Skip(); } + virtual void OnCancel( wxCommandEvent& event ) { event.Skip(); } public: + CustomizeColsDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Customize columns"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE ); ~CustomizeColsDlgGenerated(); @@ -914,7 +929,6 @@ class GlobalSettingsDlgGenerated : public wxDialog wxPanel* m_panel8; wxStaticText* m_staticText56; - wxCheckBox* m_checkBoxIgnoreOneHour; wxCheckBox* m_checkBoxCopyLocked; wxCheckBox* m_checkBoxCopyPermissions; wxStaticLine* m_staticline10; @@ -933,16 +947,17 @@ class GlobalSettingsDlgGenerated : public wxDialog wxButton* m_button29; // Virtual event handlers, overide them in your derived class - virtual void OnClose( wxCloseEvent& event ){ event.Skip(); } - virtual void OnResetDialogs( wxCommandEvent& event ){ event.Skip(); } - virtual void OnAddRow( wxCommandEvent& event ){ event.Skip(); } - virtual void OnRemoveRow( wxCommandEvent& event ){ event.Skip(); } - virtual void OnDefault( wxCommandEvent& event ){ event.Skip(); } - virtual void OnOkay( wxCommandEvent& event ){ event.Skip(); } - virtual void OnCancel( wxCommandEvent& event ){ event.Skip(); } + virtual void OnClose( wxCloseEvent& event ) { event.Skip(); } + virtual void OnResetDialogs( wxCommandEvent& event ) { event.Skip(); } + virtual void OnAddRow( wxCommandEvent& event ) { event.Skip(); } + virtual void OnRemoveRow( wxCommandEvent& event ) { event.Skip(); } + virtual void OnDefault( wxCommandEvent& event ) { event.Skip(); } + virtual void OnOkay( wxCommandEvent& event ) { event.Skip(); } + virtual void OnCancel( wxCommandEvent& event ) { event.Skip(); } public: + GlobalSettingsDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Global settings"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); ~GlobalSettingsDlgGenerated(); @@ -983,12 +998,13 @@ class SyncPreviewDlgGenerated : public wxDialog wxButton* m_button16; // Virtual event handlers, overide them in your derived class - virtual void OnClose( wxCloseEvent& event ){ event.Skip(); } - virtual void OnStartSync( wxCommandEvent& event ){ event.Skip(); } - virtual void OnCancel( wxCommandEvent& event ){ event.Skip(); } + virtual void OnClose( wxCloseEvent& event ) { event.Skip(); } + virtual void OnStartSync( wxCommandEvent& event ) { event.Skip(); } + virtual void OnCancel( wxCommandEvent& event ) { event.Skip(); } public: + SyncPreviewDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Synchronization Preview"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE ); ~SyncPreviewDlgGenerated(); @@ -1006,6 +1022,7 @@ class PopupFrameGenerated1 : public wxFrame public: wxStaticBitmap* m_bitmapLeft; wxStaticText* m_staticTextMain; + PopupFrameGenerated1( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxFRAME_NO_TASKBAR|wxSTAY_ON_TOP|wxSTATIC_BORDER ); ~PopupFrameGenerated1(); @@ -1027,13 +1044,14 @@ class SearchDialogGenerated : public wxDialog wxButton* m_button29; // Virtual event handlers, overide them in your derived class - virtual void OnClose( wxCloseEvent& event ){ event.Skip(); } - virtual void OnText( wxCommandEvent& event ){ event.Skip(); } - virtual void OnFindNext( wxCommandEvent& event ){ event.Skip(); } - virtual void OnCancel( wxCommandEvent& event ){ event.Skip(); } + virtual void OnClose( wxCloseEvent& event ) { event.Skip(); } + virtual void OnText( wxCommandEvent& event ) { event.Skip(); } + virtual void OnFindNext( wxCommandEvent& event ) { event.Skip(); } + virtual void OnCancel( wxCommandEvent& event ) { event.Skip(); } public: + SearchDialogGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Find"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE ); ~SearchDialogGenerated(); diff --git a/ui/gui_status_handler.cpp b/ui/gui_status_handler.cpp index 052c18bd..81f4de6e 100644 --- a/ui/gui_status_handler.cpp +++ b/ui/gui_status_handler.cpp @@ -79,7 +79,7 @@ void CompareStatusHandler::OnKeyPressed(wxKeyEvent& event) } -void CompareStatusHandler::updateStatusText(const Zstring& text) +void CompareStatusHandler::reportInfo(const Zstring& text) { mainDialog->compareStatus->setStatusText_NoUpdate(text); } @@ -267,7 +267,7 @@ SyncStatusHandler::~SyncStatusHandler() inline -void SyncStatusHandler::updateStatusText(const Zstring& text) +void SyncStatusHandler::reportInfo(const Zstring& text) { syncStatusFrame.setStatusText_NoUpdate(text); } @@ -378,7 +378,7 @@ void SyncStatusHandler::reportWarning(const wxString& warningMessage, bool& warn } -void SyncStatusHandler::reportInfo(const wxString& infoMessage) +void SyncStatusHandler::logInfo(const wxString& infoMessage) { errorLog.logInfo(infoMessage); } diff --git a/ui/gui_status_handler.h b/ui/gui_status_handler.h index d519b142..d6c03399 100644 --- a/ui/gui_status_handler.h +++ b/ui/gui_status_handler.h @@ -25,9 +25,9 @@ public: CompareStatusHandler(MainDialog* dlg); ~CompareStatusHandler(); - virtual void updateStatusText(const Zstring& text); virtual void initNewProcess(int objectsTotal, wxLongLong dataTotal, Process processID); virtual void updateProcessedData(int objectsProcessed, wxLongLong dataProcessed); + virtual void reportInfo(const Zstring& text); virtual void forceUiRefresh(); virtual ErrorHandler::Response reportError(const wxString& text); @@ -51,15 +51,15 @@ public: SyncStatusHandler(wxTopLevelWindow* parentDlg, bool ignoreAllErrors); ~SyncStatusHandler(); - virtual void updateStatusText(const Zstring& text); virtual void initNewProcess(int objectsTotal, wxLongLong dataTotal, Process processID); virtual void updateProcessedData(int objectsProcessed, wxLongLong dataProcessed); + virtual void reportInfo(const Zstring& text); virtual void forceUiRefresh(); virtual ErrorHandler::Response reportError(const wxString& text); virtual void reportFatalError(const wxString& errorMessage); virtual void reportWarning(const wxString& warningMessage, bool& warningActive); - void reportInfo(const wxString& infoMessage); + void logInfo(const wxString& infoMessage); private: virtual void abortThisProcess(); diff --git a/ui/main_dlg.cpp b/ui/main_dlg.cpp index cc9568fb..0f2c83b5 100644 --- a/ui/main_dlg.cpp +++ b/ui/main_dlg.cpp @@ -30,7 +30,7 @@ #include "mouse_move_dlg.h" #include "progress_indicator.h" #include "msg_popup.h" -#include "../shared/drag_n_drop.h" +#include "../shared/dir_name.h" #include "../library/filter.h" #include "../structures.h" #include <wx/imaglist.h> @@ -56,16 +56,16 @@ using namespace ffs3; using ffs3::CustomLocale; -class MainFolderDragDrop : public DragDropOnMainDlg +class DirectoryNameMainImpl : public DirectoryNameMainDlg { public: - MainFolderDragDrop(MainDialog& mainDlg, - wxWindow* dropWindow1, - wxWindow* dropWindow2, - wxDirPickerCtrl* dirPicker, - wxComboBox* dirName) : - - DragDropOnMainDlg(dropWindow1, dropWindow2, dirPicker, dirName), + DirectoryNameMainImpl(MainDialog& mainDlg, + wxWindow* dropWindow1, + wxWindow* dropWindow2, + wxDirPickerCtrl* dirPicker, + wxComboBox* dirName, + wxStaticBoxSizer* staticBox) : + DirectoryNameMainDlg(dropWindow1, dropWindow2, dirPicker, dirName, staticBox), mainDlg_(mainDlg) {} virtual bool AcceptDrop(const std::vector<wxString>& droppedFiles) @@ -114,7 +114,7 @@ public: } case xmlAccess::MERGE_OTHER: - //=> return true: change directory selection via drag and drop + //=> return true: change directory selection via drag and drop break; } @@ -130,7 +130,8 @@ public: } private: - MainFolderDragDrop(const MainFolderDragDrop&); + DirectoryNameMainImpl(const DirectoryNameMainImpl&); + DirectoryNameMainImpl& operator=(const DirectoryNameMainImpl&); MainDialog& mainDlg_; }; @@ -147,7 +148,7 @@ private: /|\ /|\ _________|________ ________| | | | - FirstFolderPairCfg FolderPairPanel + DirectoryPairFirst DirectoryPair */ template <class GuiPanel> @@ -195,46 +196,78 @@ private: }; -class FolderPairPanel : - public FolderPairGenerated, //FolderPairPanel "owns" FolderPairGenerated! +class DirectoryPair : + public FolderPairGenerated, //DirectoryPair "owns" FolderPairGenerated! public FolderPairCallback<FolderPairGenerated> { public: - FolderPairPanel(wxWindow* parent, MainDialog& mainDialog) : + DirectoryPair(wxWindow* parent, MainDialog& mainDialog) : FolderPairGenerated(parent), FolderPairCallback<FolderPairGenerated>(static_cast<FolderPairGenerated&>(*this), mainDialog), //pass FolderPairGenerated part... - dragDropOnLeft( m_panelLeft, m_dirPickerLeft, m_directoryLeft), - dragDropOnRight(m_panelRight, m_dirPickerRight, m_directoryRight) {} + dirNameLeft( m_panelLeft, m_dirPickerLeft, m_directoryLeft), + dirNameRight(m_panelRight, m_dirPickerRight, m_directoryRight) {} + + void setValues(const Zstring& leftDir, const Zstring& rightDir, AltSyncCfgPtr syncCfg, const FilterConfig& filter) + { + setConfig(syncCfg, filter); + dirNameLeft.setName(leftDir); + dirNameRight.setName(rightDir); + } + Zstring getLeftDir() const + { + return dirNameLeft.getName(); + } + Zstring getRightDir() const + { + return dirNameRight.getName(); + } private: //support for drag and drop - DragDropOnDlg dragDropOnLeft; - DragDropOnDlg dragDropOnRight; + DirectoryName dirNameLeft; + DirectoryName dirNameRight; }; -class FirstFolderPairCfg : public FolderPairCallback<MainDialogGenerated> +class DirectoryPairFirst : public FolderPairCallback<MainDialogGenerated> { public: - FirstFolderPairCfg(MainDialog& mainDialog) : + DirectoryPairFirst(MainDialog& mainDialog) : FolderPairCallback<MainDialogGenerated>(mainDialog, mainDialog), //prepare drag & drop - dragDropOnLeft(mainDialog, - mainDialog.m_panelLeft, - mainDialog.m_panelTopLeft, - mainDialog.m_dirPickerLeft, - mainDialog.m_directoryLeft), - dragDropOnRight(mainDialog, - mainDialog.m_panelRight, - mainDialog.m_panelTopRight, - mainDialog.m_dirPickerRight, - mainDialog.m_directoryRight) {} + dirNameLeft(mainDialog, + mainDialog.m_panelLeft, + mainDialog.m_panelTopLeft, + mainDialog.m_dirPickerLeft, + mainDialog.m_directoryLeft, + mainDialog.sbSizerDirLeft), + dirNameRight(mainDialog, + mainDialog.m_panelRight, + mainDialog.m_panelTopRight, + mainDialog.m_dirPickerRight, + mainDialog.m_directoryRight, + mainDialog.sbSizerDirRight) {} + + void setValues(const Zstring& leftDir, const Zstring& rightDir, AltSyncCfgPtr syncCfg, const FilterConfig& filter) + { + setConfig(syncCfg, filter); + dirNameLeft.setName(leftDir); + dirNameRight.setName(rightDir); + } + Zstring getLeftDir() const + { + return dirNameLeft.getName(); + } + Zstring getRightDir() const + { + return dirNameRight.getName(); + } private: //support for drag and drop - MainFolderDragDrop dragDropOnLeft; - MainFolderDragDrop dragDropOnRight; + DirectoryNameMainImpl dirNameLeft; + DirectoryNameMainImpl dirNameRight; }; @@ -378,8 +411,12 @@ void MainDialog::init(const xmlAccess::XmlGuiConfig guiCfg, updateFileIcons.reset(new IconUpdater(m_gridLeft, m_gridRight)); #ifdef FFS_WIN - moveWholeWindow.reset(new MouseMoveWindow(this)); + new MouseMoveWindow(*this, //allow moving main dialog by clicking (nearly) anywhere... + m_panel71, + m_panelBottom, + m_panelStatusBar); //ownership passed to "this" #endif + syncPreview.reset(new SyncPreview(this)); SetTitle(wxString(wxT("FreeFileSync - ")) + _("Folder Comparison and Synchronization")); @@ -391,7 +428,7 @@ void MainDialog::init(const xmlAccess::XmlGuiConfig guiCfg, ffs3::AppMainWindow::setMainWindow(this); //init handling of first folder pair - firstFolderPair.reset(new FirstFolderPairCfg(*this)); + firstFolderPair.reset(new DirectoryPairFirst(*this)); initViewFilterButtons(); @@ -431,13 +468,6 @@ void MainDialog::init(const xmlAccess::XmlGuiConfig guiCfg, MenuItemUpdater updateMenuHelp(m_menuHelp); updateMenuHelp.addForUpdate(m_menuItemAbout, GlobalResources::getInstance().getImageByName(wxT("aboutSmall"))); -#ifdef FFS_WIN - //allow moving main dialog by clicking (nearly) anywhere... - moveWholeWindow->connectSourceWindow(m_panel71); - moveWholeWindow->connectSourceWindow(m_panelBottom); - moveWholeWindow->connectSourceWindow(m_panelStatusBar); -#endif - #ifdef FFS_LINUX if (!ffs3::isPortableVersion()) //disable update check for Linux installer-based version -> handled by .deb m_menuItemCheckVer->Enable(false); @@ -799,9 +829,9 @@ public: return DeleteFilesHandler::IGNORE_ERROR; //dummy return value } - virtual void deletionSuccessful() //called for each file/folder that has been deleted + virtual void deletionSuccessful(size_t deletedItems) //called for each file/folder that has been deleted { - ++deletionCount; + deletionCount += deletedItems; if (updateUiIsAllowed()) //test if specific time span between ui updates is over { @@ -875,7 +905,7 @@ void MainDialog::deleteSelectedFiles() globalSettings->gui.deleteOnBothSides, globalSettings->gui.useRecyclerForManualDeletion, getCurrentConfiguration().mainCfg, - &statusHandler); + statusHandler); } catch (ffs3::AbortThisProcess&) {} @@ -1100,10 +1130,11 @@ void MainDialog::OnResize(wxSizeEvent& event) GetSize(&width, &height); GetPosition(&x, &y); - if (width > 0 && height > 0 && x >= -200 && y >= -200) //test ALL parameters at once, since width/height are invalid if + //test ALL parameters at once, since width/height are invalid if the window is minimized (eg x,y == -32000; height = 28, width = 160) + //note: negative values for x and y are possible when using multiple monitors! + if (width > 0 && height > 0 && x >= -3360 && y >= -200) { - //the window is minimized (eg x,y == -32000; height = 28, width = 160) - widthNotMaximized = width; //however visible(!) x < 0 and y < 0 are possible with dual monitors + widthNotMaximized = width; //visible coordinates x < 0 and y < 0 are possible with dual monitors! heightNotMaximized = height; posXNotMaximized = x; @@ -1122,7 +1153,7 @@ void MainDialog::OnResizeFolderPairs(wxSizeEvent& event) { const int width = m_panelTopLeft->GetSize().GetWidth(); - for (std::vector<FolderPairPanel*>::iterator i = additionalFolderPairs.begin(); i != additionalFolderPairs.end(); ++i) + for (std::vector<DirectoryPair*>::iterator i = additionalFolderPairs.begin(); i != additionalFolderPairs.end(); ++i) (*i)->m_panelLeft->SetMinSize(wxSize(width, -1)); } @@ -1477,9 +1508,9 @@ void MainDialog::OnContextRim(wxGridEvent& event) if (exFilterCandidateObj.size() > 0 && !exFilterCandidateObj[0].isDir) { const Zstring filename = exFilterCandidateObj[0].relativeName.AfterLast(common::FILE_NAME_SEPARATOR); - if (filename.Find(wxChar('.'), false) != Zstring::npos) //be careful: AfterLast would return the whole string if '.' were not found! + if (filename.find(Zchar('.')) != Zstring::npos) //be careful: AfterLast would return the whole string if '.' were not found! { - const Zstring extension = filename.AfterLast(DefaultChar('.')); + const Zstring extension = filename.AfterLast(Zchar('.')); //add context menu item wxMenuItem* menuItemExclExt = new wxMenuItem(contextMenu.get(), CONTEXT_EXCLUDE_EXT, wxString(_("Exclude via filter:")) + wxT(" ") + wxT("*.") + zToWx(extension)); @@ -1597,13 +1628,13 @@ void MainDialog::OnContextExcludeExtension(wxCommandEvent& event) SelectedExtension* selExtension = dynamic_cast<SelectedExtension*>(event.m_callbackUserData); if (selExtension) { - const Zstring newExclude = Zstring(DefaultStr("*.")) + selExtension->extension; + const Zstring newExclude = Zstring(Zstr("*.")) + selExtension->extension; //add to filter config Zstring& excludeFilter = currentCfg.mainCfg.globalFilter.excludeFilter; - if (!excludeFilter.empty() && !excludeFilter.EndsWith(DefaultStr(";"))) - excludeFilter += DefaultStr("\n"); - excludeFilter += newExclude + DefaultStr(";"); //';' is appended to 'mark' that next exclude extension entry won't write to new line + if (!excludeFilter.empty() && !excludeFilter.EndsWith(Zstr(";"))) + excludeFilter += Zstr("\n"); + excludeFilter += newExclude + Zstr(";"); //';' is appended to 'mark' that next exclude extension entry won't write to new line updateFilterButtons(); @@ -1633,7 +1664,7 @@ void MainDialog::OnContextExcludeObject(wxCommandEvent& event) for (std::vector<FilterObject>::const_iterator i = objCont->selectedObjects.begin(); i != objCont->selectedObjects.end(); ++i) { if (i != objCont->selectedObjects.begin()) - newExclude += DefaultStr("\n"); + newExclude += Zstr("\n"); newExclude += common::FILE_NAME_SEPARATOR + i->relativeName; if (i->isDir) @@ -1642,8 +1673,8 @@ void MainDialog::OnContextExcludeObject(wxCommandEvent& event) //add to filter config Zstring& excludeFilter = currentCfg.mainCfg.globalFilter.excludeFilter; - if (!excludeFilter.empty() && !excludeFilter.EndsWith(DefaultStr("\n"))) - excludeFilter += DefaultStr("\n"); + if (!excludeFilter.empty() && !excludeFilter.EndsWith(Zstr("\n"))) + excludeFilter += Zstr("\n"); excludeFilter += newExclude; updateFilterButtons(); @@ -2276,7 +2307,7 @@ void MainDialog::setCurrentConfiguration(const xmlAccess::XmlGuiConfig& newGuiCf inline -FolderPairEnh getEnahncedPair(const FolderPairPanel* panel) +FolderPairEnh getEnahncedPair(const DirectoryPair* panel) { return FolderPairEnh(panel->getLeftDir(), panel->getRightDir(), @@ -2319,10 +2350,12 @@ const wxString& MainDialog::lastConfigFileName() void MainDialog::refreshGridAfterFilterChange(const int delay) { //signal UI that grids need to be refreshed on next Update() - m_gridLeft->ForceRefresh(); + m_gridLeft ->ForceRefresh(); m_gridMiddle->ForceRefresh(); - m_gridRight->ForceRefresh(); - Update(); //show changes resulting from ForceRefresh() + m_gridRight ->ForceRefresh(); + m_gridLeft ->Update(); // + m_gridMiddle->Update(); //show changes resulting from ForceRefresh() + m_gridRight ->Update(); // if (currentCfg.hideFilteredElements) { @@ -2614,9 +2647,9 @@ void MainDialog::updateFilterButtons() firstFolderPair->refreshButtons(); //update folder pairs - for (std::vector<FolderPairPanel*>::const_iterator i = additionalFolderPairs.begin(); i != additionalFolderPairs.end(); ++i) + for (std::vector<DirectoryPair*>::const_iterator i = additionalFolderPairs.begin(); i != additionalFolderPairs.end(); ++i) { - FolderPairPanel* dirPair = *i; + DirectoryPair* dirPair = *i; dirPair->refreshButtons(); } } @@ -2642,7 +2675,6 @@ void MainDialog::OnCompare(wxCommandEvent &event) //begin comparison ffs3::CompareProcess comparison(currentCfg.mainCfg.handleSymlinks, globalSettings->fileTimeTolerance, - globalSettings->ignoreOneHourDiff, globalSettings->optDialogs, &statusHandler); @@ -2710,6 +2742,8 @@ void MainDialog::OnCompare(wxCommandEvent &event) void MainDialog::updateGuiGrid() { + wxWindowUpdateLocker dummy(m_panelStatusBar); //avoid display distortion + updateGridViewData(); //update gridDataView and write status information //all three grids retrieve their data directly via gridDataView @@ -2789,9 +2823,15 @@ void MainDialog::OnCmpSettings(wxCommandEvent& event) wxPoint windowPos = m_bpButtonCmpConfig->GetScreenPosition(); windowPos.x += m_bpButtonCmpConfig->GetSize().GetWidth() + 5; + const CompareVariant compareVarOld = currentCfg.mainCfg.compareVar; + const SymLinkHandling handleSymlinksOld = currentCfg.mainCfg.handleSymlinks; + if (ffs3::showCompareCfgDialog(windowPos, currentCfg.mainCfg.compareVar, - currentCfg.mainCfg.handleSymlinks) == DefaultReturnCode::BUTTON_OKAY) + currentCfg.mainCfg.handleSymlinks) == DefaultReturnCode::BUTTON_OKAY && + //check if settings were changed at all + (compareVarOld != currentCfg.mainCfg.compareVar || + handleSymlinksOld != currentCfg.mainCfg.handleSymlinks)) { //update compare variant name m_staticTextCmpVariant->SetLabel(wxString(wxT("(")) + getVariantName(currentCfg.mainCfg.compareVar) + wxT(")")); @@ -2854,7 +2894,7 @@ void MainDialog::OnStartSync(wxCommandEvent& event) //check if there are files/folders to be sync'ed at all if (!synchronizationNeeded(gridDataView->getDataTentative())) - statusHandler.reportInfo(_("Nothing to synchronize according to configuration!")); //inform about this special case + statusHandler.logInfo(_("Nothing to synchronize according to configuration!")); //inform about this special case //start synchronization and mark all elements processed ffs3::SyncProcess synchronization( @@ -2971,27 +3011,30 @@ void MainDialog::OnSortLeftGrid(wxGridEvent& event) void MainDialog::OnSortMiddleGrid(wxGridEvent& event) { - //determine direction for std::sort() - static bool sortDefault = true; - if (lastSortColumn != 0 || lastSortGrid != m_gridMiddle) - sortDefault = true; - else - sortDefault = !sortDefault; - lastSortColumn = 0; - lastSortGrid = m_gridMiddle; - - //start sort - if (syncPreview->previewIsEnabled()) - gridDataView->sortView(GridView::SORT_BY_SYNC_DIRECTION, true, sortDefault); - else - gridDataView->sortView(GridView::SORT_BY_CMP_RESULT, true, sortDefault); - - updateGuiGrid(); //refresh gridDataView - - //set sort direction indicator on UI - m_gridLeft->setSortMarker(CustomGrid::SortMarker(-1, CustomGrid::ASCENDING)); - m_gridRight->setSortMarker(CustomGrid::SortMarker(-1, CustomGrid::ASCENDING)); - m_gridMiddle->setSortMarker(CustomGrid::SortMarker(0, sortDefault ? CustomGrid::ASCENDING : CustomGrid::DESCENDING)); + //sorting middle grid is more or less useless: therefore let's toggle view instead! + syncPreview->enablePreview(!syncPreview->previewIsEnabled()); //toggle view + +// //determine direction for std::sort() +// static bool sortDefault = true; +// if (lastSortColumn != 0 || lastSortGrid != m_gridMiddle) +// sortDefault = true; +// else +// sortDefault = !sortDefault; +// lastSortColumn = 0; +// lastSortGrid = m_gridMiddle; +// +// //start sort +// if (syncPreview->previewIsEnabled()) +// gridDataView->sortView(GridView::SORT_BY_SYNC_DIRECTION, true, sortDefault); +// else +// gridDataView->sortView(GridView::SORT_BY_CMP_RESULT, true, sortDefault); +// +// updateGuiGrid(); //refresh gridDataView +// +// //set sort direction indicator on UI +// m_gridLeft->setSortMarker(CustomGrid::SortMarker(-1, CustomGrid::ASCENDING)); +// m_gridRight->setSortMarker(CustomGrid::SortMarker(-1, CustomGrid::ASCENDING)); +// m_gridMiddle->setSortMarker(CustomGrid::SortMarker(0, sortDefault ? CustomGrid::ASCENDING : CustomGrid::DESCENDING)); } @@ -3063,9 +3106,9 @@ void MainDialog::OnSwapSides(wxCommandEvent& event) firstFolderPair->getAltFilterConfig()); //additional pairs - for (std::vector<FolderPairPanel*>::const_iterator i = additionalFolderPairs.begin(); i != additionalFolderPairs.end(); ++i) + for (std::vector<DirectoryPair*>::const_iterator i = additionalFolderPairs.begin(); i != additionalFolderPairs.end(); ++i) { - FolderPairPanel* dirPair = *i; + DirectoryPair* dirPair = *i; dirPair->setValues(dirPair->getRightDir(), // swap directories dirPair->getLeftDir(), // dirPair->getAltSyncConfig(), @@ -3428,7 +3471,7 @@ void MainDialog::OnRemoveTopFolderPair(wxCommandEvent& event) void MainDialog::OnRemoveFolderPair(wxCommandEvent& event) { const wxObject* const eventObj = event.GetEventObject(); //find folder pair originating the event - for (std::vector<FolderPairPanel*>::const_iterator i = additionalFolderPairs.begin(); i != additionalFolderPairs.end(); ++i) + for (std::vector<DirectoryPair*>::const_iterator i = additionalFolderPairs.begin(); i != additionalFolderPairs.end(); ++i) if (eventObj == (*i)->m_bpButtonRemovePair) { removeAddFolderPair(i - additionalFolderPairs.begin()); @@ -3445,9 +3488,6 @@ void MainDialog::OnRemoveFolderPair(wxCommandEvent& event) } -const size_t MAX_ADD_FOLDER_PAIRS = 5; - - void MainDialog::updateGuiForFolderPair() { //adapt delete top folder pair button @@ -3491,7 +3531,7 @@ void MainDialog::addFolderPair(const std::vector<FolderPairEnh>& newPairs, bool for (std::vector<FolderPairEnh>::const_iterator i = newPairs.begin(); i != newPairs.end(); ++i) { //add new folder pair - FolderPairPanel* newPair = new FolderPairPanel(m_scrolledWindowFolderPairs, *this); + DirectoryPair* newPair = new DirectoryPair(m_scrolledWindowFolderPairs, *this); //correct width of middle block newPair->m_panel21->SetMinSize(wxSize(m_gridMiddle->GetSize().GetWidth(), -1)); @@ -3526,7 +3566,7 @@ void MainDialog::addFolderPair(const std::vector<FolderPairEnh>& newPairs, bool } //set size of scrolled window - const size_t visiblePairs = std::min(additionalFolderPairs.size(), MAX_ADD_FOLDER_PAIRS); //up to MAX_ADD_FOLDER_PAIRS additional pairs shall be shown + const size_t visiblePairs = std::min(additionalFolderPairs.size(), globalSettings->gui.addFolderPairCountMax); //up to "addFolderPairCountMax" additional pairs shall be shown m_scrolledWindowFolderPairs->SetMinSize(wxSize( -1, pairHeight * static_cast<int>(visiblePairs))); //update controls @@ -3546,7 +3586,7 @@ void MainDialog::removeAddFolderPair(size_t pos) if (pos < additionalFolderPairs.size()) { //remove folder pairs from window - FolderPairPanel* pairToDelete = additionalFolderPairs[pos]; + DirectoryPair* pairToDelete = additionalFolderPairs[pos]; const int pairHeight = pairToDelete->GetSize().GetHeight(); bSizerAddFolderPairs->Detach(pairToDelete); //Remove() does not work on Window*, so do it manually @@ -3555,7 +3595,7 @@ void MainDialog::removeAddFolderPair(size_t pos) //set size of scrolled window const size_t additionalRows = additionalFolderPairs.size(); - if (additionalRows <= MAX_ADD_FOLDER_PAIRS) //up to MAX_ADD_FOLDER_PAIRS additional pairs shall be shown + if (additionalRows <= globalSettings->gui.addFolderPairCountMax) //up to "addFolderPairCountMax" additional pairs shall be shown m_scrolledWindowFolderPairs->SetMinSize(wxSize(-1, pairHeight * static_cast<int>(additionalRows))); //update controls @@ -3688,6 +3728,7 @@ void MainDialog::OnMenuExportFileList(wxCommandEvent& event) wxFFile output(newFileName.c_str(), wxT("w")); //don't write in binary mode if (output.IsOpened()) { + output.Write(common::BYTE_ORDER_MARK_UTF8, sizeof(common::BYTE_ORDER_MARK_UTF8) - 1); output.Write(exportString); pushStatusInformation(_("File list exported!")); } diff --git a/ui/main_dlg.h b/ui/main_dlg.h index 3e62191f..34a1fdb2 100644 --- a/ui/main_dlg.h +++ b/ui/main_dlg.h @@ -15,14 +15,14 @@ #include <set> class CompareStatusHandler; -class MainFolderDragDrop; +class DirectoryNameMainImpl; class CustomGrid; class FFSCheckRowsEvent; class FFSSyncDirectionEvent; class IconUpdater; class ManualDeletionHandler; -class FolderPairPanel; -class FirstFolderPairCfg; +class DirectoryPair; +class DirectoryPairFirst; class CompareStatus; @@ -30,7 +30,6 @@ namespace ffs3 { class CustomLocale; class GridView; -class MouseMoveWindow; } @@ -49,7 +48,8 @@ public: private: friend class CompareStatusHandler; friend class ManualDeletionHandler; - friend class MainFolderDragDrop; + friend class DirectoryPairFirst; + friend class DirectoryNameMainImpl; template <class GuiPanel> friend class FolderPairCallback; @@ -275,8 +275,8 @@ private: xmlAccess::XmlGuiConfig currentCfg; //folder pairs: - std::auto_ptr<FirstFolderPairCfg> firstFolderPair; //always bound!!! - std::vector<FolderPairPanel*> additionalFolderPairs; //additional pairs to the first pair + std::auto_ptr<DirectoryPairFirst> firstFolderPair; //always bound!!! + std::vector<DirectoryPair*> additionalFolderPairs; //additional pairs to the first pair //gui settings int widthNotMaximized; @@ -309,11 +309,6 @@ private: //update icons periodically: one updater instance for both left and right grids std::auto_ptr<IconUpdater> updateFileIcons; -#ifdef FFS_WIN - //enable moving window by clicking on sub-windows instead of header line - std::auto_ptr<ffs3::MouseMoveWindow> moveWholeWindow; -#endif - //encapsulation of handling of sync preview class SyncPreview //encapsulates MainDialog functionality for synchronization preview (friend class) { diff --git a/ui/mouse_move_dlg.cpp b/ui/mouse_move_dlg.cpp index 526408d4..efaba5fc 100644 --- a/ui/mouse_move_dlg.cpp +++ b/ui/mouse_move_dlg.cpp @@ -10,17 +10,34 @@ using namespace ffs3; -void MouseMoveWindow::connectSourceWindow(wxWindow* sourceWindow) +MouseMoveWindow::MouseMoveWindow(wxWindow& parent, + wxWindow* child1, + wxWindow* child2, + wxWindow* child3, + wxWindow* child4, + wxWindow* child5, + wxWindow* child6) : wxWindow(&parent, wxID_ANY) { - sourceWindow->Connect(wxEVT_LEFT_DOWN, wxMouseEventHandler(MouseMoveWindow::LeftButtonDown), NULL, this); + if (child1) child1->Connect(wxEVT_LEFT_DOWN, wxMouseEventHandler(MouseMoveWindow::LeftButtonDown), NULL, this); + if (child2) child2->Connect(wxEVT_LEFT_DOWN, wxMouseEventHandler(MouseMoveWindow::LeftButtonDown), NULL, this); + if (child3) child3->Connect(wxEVT_LEFT_DOWN, wxMouseEventHandler(MouseMoveWindow::LeftButtonDown), NULL, this); + if (child4) child4->Connect(wxEVT_LEFT_DOWN, wxMouseEventHandler(MouseMoveWindow::LeftButtonDown), NULL, this); + if (child5) child5->Connect(wxEVT_LEFT_DOWN, wxMouseEventHandler(MouseMoveWindow::LeftButtonDown), NULL, this); + if (child6) child6->Connect(wxEVT_LEFT_DOWN, wxMouseEventHandler(MouseMoveWindow::LeftButtonDown), NULL, this); + + Hide(); //this is just a dummy window so that its parent can have ownership + Disable(); } void MouseMoveWindow::LeftButtonDown(wxMouseEvent& event) { + if (!GetParent()) + return; + ::ReleaseCapture(); //::SendMessage(GetHwndOf(dialogToMove_), WM_NCLBUTTONDOWN, HTCAPTION, 0); - ::SendMessage(static_cast<HWND>(dialogToMove_->GetHWND()), WM_NCLBUTTONDOWN, HTCAPTION, 0); + ::SendMessage(static_cast<HWND>(GetParent()->GetHWND()), WM_NCLBUTTONDOWN, HTCAPTION, 0); //event.Skip(); -> swallow event, to avoid other windows losing focus } diff --git a/ui/mouse_move_dlg.h b/ui/mouse_move_dlg.h index 9d68845d..c7d07629 100644 --- a/ui/mouse_move_dlg.h +++ b/ui/mouse_move_dlg.h @@ -12,24 +12,23 @@ namespace ffs3 { -//move main dialog by mouse-dragging contained sub-windows: -//---------------------------------------------------------------------------------------- -//keep it as an attribute of the to-be-moved dialog and ensure that all connected source windows -//have a longer lifetime than the dialog which is moved (should be fulfilled naturally) -class MouseMoveWindow : private wxEvtHandler +//move main dialog by mouse-dragging contained sub-windows: just attach to parent via new in constructor: ownership passed! +class MouseMoveWindow : public wxWindow //private wxEvtHandler { public: - MouseMoveWindow(wxWindow* dialogToMove) : - dialogToMove_(dialogToMove) {} - - void connectSourceWindow(wxWindow* sourceWindow); + MouseMoveWindow(wxWindow& parent, + wxWindow* child1, + wxWindow* child2 = NULL, + wxWindow* child3 = NULL, + wxWindow* child4 = NULL, + wxWindow* child5 = NULL, + wxWindow* child6 = NULL); private: void LeftButtonDown(wxMouseEvent& event); - - wxWindow* dialogToMove_; }; + } diff --git a/ui/msg_popup.cpp b/ui/msg_popup.cpp index 4024a541..adf5ac7f 100644 --- a/ui/msg_popup.cpp +++ b/ui/msg_popup.cpp @@ -6,12 +6,18 @@ // #include "msg_popup.h" #include "../library/resources.h" +#include "mouse_move_dlg.h" ErrorDlg::ErrorDlg(wxWindow* parentWindow, const int activeButtons, const wxString messageText, bool& ignoreNextErrors) : ErrorDlgGenerated(parentWindow), ignoreErrors(ignoreNextErrors) { +#ifdef FFS_WIN + new ffs3::MouseMoveWindow(*this, //allow moving main dialog by clicking (nearly) anywhere... + this, m_bitmap10); //ownership passed to "this" +#endif + m_bitmap10->SetBitmap(GlobalResources::getInstance().getImageByName(wxT("error"))); m_textCtrl8->SetValue(messageText); m_checkBoxIgnoreErrors->SetValue(ignoreNextErrors); @@ -71,6 +77,11 @@ WarningDlg::WarningDlg(wxWindow* parentWindow, int activeButtons, const wxStrin WarningDlgGenerated(parentWindow), dontShowAgain(dontShowDlgAgain) { +#ifdef FFS_WIN + new ffs3::MouseMoveWindow(*this, //allow moving main dialog by clicking (nearly) anywhere... + this, m_bitmap10); //ownership passed to "this" +#endif + m_bitmap10->SetBitmap(GlobalResources::getInstance().getImageByName(wxT("warning"))); m_textCtrl8->SetValue(messageText); m_checkBoxDontShowAgain->SetValue(dontShowAgain); @@ -128,6 +139,11 @@ QuestionDlg::QuestionDlg(wxWindow* parentWindow, int activeButtons, const wxStri QuestionDlgGenerated(parentWindow), dontShowAgain(dontShowDlgAgain) { +#ifdef FFS_WIN + new ffs3::MouseMoveWindow(*this, //allow moving main dialog by clicking (nearly) anywhere... + this, m_bitmap10); //ownership passed to "this" +#endif + m_bitmap10->SetBitmap(GlobalResources::getInstance().getImageByName(wxT("question"))); m_textCtrl8->SetValue(messageText); if (dontShowAgain) diff --git a/ui/progress_indicator.cpp b/ui/progress_indicator.cpp index f41ccc36..346403ee 100644 --- a/ui/progress_indicator.cpp +++ b/ui/progress_indicator.cpp @@ -16,6 +16,7 @@ #include "../shared/global_func.h" #include "tray_icon.h" #include <boost/shared_ptr.hpp> +#include "mouse_move_dlg.h" #ifdef FFS_WIN #include "../shared/taskbar.h" @@ -512,7 +513,7 @@ SyncStatus::SyncStatusImpl::SyncStatusImpl(StatusHandler& updater, wxTopLevelWin SyncStatusDlgGenerated(parentWindow, wxID_ANY, parentWindow ? wxString(wxEmptyString) : (wxString(wxT("FreeFileSync - ")) + _("Folder Comparison and Synchronization")), - wxDefaultPosition, wxSize(638, 376), + wxDefaultPosition, wxSize(638, 350), parentWindow ? wxDEFAULT_FRAME_STYLE | wxTAB_TRAVERSAL | wxFRAME_NO_TASKBAR | wxFRAME_FLOAT_ON_PARENT : //wxTAB_TRAVERSAL is needed for standard button handling: wxID_OK/wxID_CANCEL wxDEFAULT_FRAME_STYLE | wxTAB_TRAVERSAL), @@ -529,6 +530,11 @@ SyncStatus::SyncStatusImpl::SyncStatusImpl(StatusHandler& updater, wxTopLevelWin lastStatCallSpeed(-1000000), //some big number lastStatCallRemTime(-1000000) { +#ifdef FFS_WIN + new ffs3::MouseMoveWindow(*this, //allow moving main dialog by clicking (nearly) anywhere... + this, m_bitmapStatus, m_staticTextStatus); //ownership passed to "this" +#endif + if (mainDialog) //save old title (will be used as progress indicator) titelTextBackup = mainDialog->GetTitle(); diff --git a/ui/search.cpp b/ui/search.cpp index 3fdb4d8b..23cf89b1 100644 --- a/ui/search.cpp +++ b/ui/search.cpp @@ -9,6 +9,7 @@ #include <wx/msgdlg.h> #include <wx/utils.h> #include <utility> +#include "mouse_move_dlg.h" class SearchDlg : public SearchDialogGenerated @@ -37,6 +38,11 @@ SearchDlg::SearchDlg(wxWindow& parentWindow, wxString& searchText, bool& respect searchText_(searchText), respectCase_(respectCase) { +#ifdef FFS_WIN + new ffs3::MouseMoveWindow(*this, //allow moving main dialog by clicking (nearly) anywhere... + this); //ownership passed to "this" +#endif + m_checkBoxMatchCase->SetValue(respectCase_); m_textCtrlSearchTxt->SetValue(searchText_); diff --git a/ui/small_dlgs.cpp b/ui/small_dlgs.cpp index 785dd793..3d63db47 100644 --- a/ui/small_dlgs.cpp +++ b/ui/small_dlgs.cpp @@ -19,6 +19,7 @@ #include "../shared/build_info.h" #include <wx/wupdlock.h> #include <wx/msgdlg.h> +#include "mouse_move_dlg.h" using namespace ffs3; @@ -36,6 +37,12 @@ private: AboutDlg::AboutDlg(wxWindow* window) : AboutDlgGenerated(window) { +#ifdef FFS_WIN + new MouseMoveWindow(*this, //allow moving main dialog by clicking (nearly) anywhere... + this, + m_bitmap11); //ownership passed to "this" +#endif + m_bitmap9->SetBitmap(GlobalResources::getInstance().getImageByName(wxT("website"))); m_bitmap10->SetBitmap(GlobalResources::getInstance().getImageByName(wxT("email"))); m_bitmap11->SetBitmap(GlobalResources::getInstance().getImageByName(wxT("logo"))); @@ -124,6 +131,11 @@ private: HelpDlg::HelpDlg(wxWindow* window) : HelpDlgGenerated(window) { +#ifdef FFS_WIN + new MouseMoveWindow(*this, //allow moving main dialog by clicking (nearly) anywhere... + this, m_bitmap25, m_staticText56, m_scrolledWindow1, m_scrolledWindow5); //ownership passed to "this" +#endif + m_notebook1->SetFocus(); m_bitmap25->SetBitmap(GlobalResources::getInstance().getImageByName(wxT("help"))); @@ -217,6 +229,11 @@ FilterDlg::FilterDlg(wxWindow* window, includeFilter(filterIncl), excludeFilter(filterExcl) { +#ifdef FFS_WIN + new MouseMoveWindow(*this, //allow moving main dialog by clicking (nearly) anywhere... + this, m_bitmap26, m_staticTexHeader, m_bitmap8, m_bitmap9); //ownership passed to "this" +#endif + m_bitmap8->SetBitmap(GlobalResources::getInstance().getImageByName(wxT("include"))); m_bitmap9->SetBitmap(GlobalResources::getInstance().getImageByName(wxT("exclude"))); m_bitmap26->SetBitmap(GlobalResources::getInstance().getImageByName(wxT("filterOn"))); @@ -358,6 +375,11 @@ DeleteDialog::DeleteDialog(wxWindow* main, m_useRecycleBin(useRecycleBin), totalDelCount(totalDeleteCount) { +#ifdef FFS_WIN + new MouseMoveWindow(*this, //allow moving main dialog by clicking (nearly) anywhere... + this, m_bitmap12, m_staticTextHeader); //ownership passed to "this" +#endif + m_checkBoxDeleteBothSides->SetValue(deleteOnBothSides); m_checkBoxUseRecycler->SetValue(useRecycleBin); updateTexts(); @@ -471,6 +493,11 @@ CustomizeColsDlg::CustomizeColsDlg(wxWindow* window, xmlAccess::ColumnAttributes CustomizeColsDlgGenerated(window), output(attr) { +#ifdef FFS_WIN + new MouseMoveWindow(*this, //allow moving main dialog by clicking (nearly) anywhere... + this); //ownership passed to "this" +#endif + m_bpButton29->SetBitmapLabel(GlobalResources::getInstance().getImageByName(wxT("moveUp"))); m_bpButton30->SetBitmapLabel(GlobalResources::getInstance().getImageByName(wxT("moveDown"))); @@ -612,6 +639,11 @@ SyncPreviewDlg::SyncPreviewDlg(wxWindow* parentWindow, SyncPreviewDlgGenerated(parentWindow), m_dontShowAgain(dontShowAgain) { +#ifdef FFS_WIN + new ffs3::MouseMoveWindow(*this, //allow moving main dialog by clicking (nearly) anywhere... + this, m_staticTextVariant); //ownership passed to "this" +#endif + using ffs3::numberToStringSep; m_buttonStartSync->setBitmapFront(GlobalResources::getInstance().getImageByName(wxT("startSync"))); @@ -759,6 +791,11 @@ CompareCfgDialog::CompareCfgDialog(wxWindow* parentWindow, cmpVarOut(cmpVar), handleSymlinksOut(handleSymlinks) { +#ifdef FFS_WIN + new MouseMoveWindow(*this, //allow moving main dialog by clicking (nearly) anywhere... + this); //ownership passed to "this" +#endif + //move dialog up so that compare-config button and first config-variant are on same level Move(wxPoint(position.x, std::max(0, position.y - (m_buttonTimeSize->GetScreenPosition() - GetScreenPosition()).y))); @@ -879,12 +916,16 @@ GlobalSettingsDlg::GlobalSettingsDlg(wxWindow* window, xmlAccess::XmlGlobalSetti GlobalSettingsDlgGenerated(window), settings(globalSettings) { +#ifdef FFS_WIN + new MouseMoveWindow(*this, //allow moving main dialog by clicking (nearly) anywhere... + this, m_bitmapSettings, m_staticText56); //ownership passed to "this" +#endif + m_bitmapSettings->SetBitmap(GlobalResources::getInstance().getImageByName(wxT("settings"))); m_buttonResetDialogs->setBitmapFront(GlobalResources::getInstance().getImageByName(wxT("warningSmall")), 5); m_bpButtonAddRow->SetBitmapLabel(GlobalResources::getInstance().getImageByName(wxT("addFolderPair"))); m_bpButtonRemoveRow->SetBitmapLabel(GlobalResources::getInstance().getImageByName(wxT("removeFolderPair"))); - m_checkBoxIgnoreOneHour->SetValue(globalSettings.ignoreOneHourDiff); m_checkBoxCopyLocked->SetValue(globalSettings.copyLockedFiles); m_checkBoxCopyPermissions->SetValue(globalSettings.copyFilePermissions); @@ -912,7 +953,6 @@ GlobalSettingsDlg::GlobalSettingsDlg(wxWindow* window, xmlAccess::XmlGlobalSetti void GlobalSettingsDlg::OnOkay(wxCommandEvent& event) { //write global settings only when okay-button is pressed! - settings.ignoreOneHourDiff = m_checkBoxIgnoreOneHour->GetValue(); settings.copyLockedFiles = m_checkBoxCopyLocked->GetValue(); settings.copyFilePermissions = m_checkBoxCopyPermissions->GetValue(); settings.gui.externelApplications = getExtApp(); @@ -936,7 +976,6 @@ void GlobalSettingsDlg::OnDefault(wxCommandEvent& event) { xmlAccess::XmlGlobalSettings defaultCfg; - m_checkBoxIgnoreOneHour-> SetValue(defaultCfg.ignoreOneHourDiff); m_checkBoxCopyLocked-> SetValue(defaultCfg.copyLockedFiles); m_checkBoxCopyPermissions->SetValue(defaultCfg.copyFilePermissions); set(defaultCfg.gui.externelApplications); diff --git a/ui/sorting.h b/ui/sorting.h index 94ac6f6d..305cb916 100644 --- a/ui/sorting.h +++ b/ui/sorting.h @@ -92,12 +92,12 @@ bool sortByRelativeName(const FileSystemObject& a, const FileSystemObject& b) return true; //empty rows always last const bool isDirectoryA = isDirectoryMapping(a); - const Zstring relDirNameA = isDirectoryA ? + const Zstring& relDirNameA = isDirectoryA ? a.getRelativeName<side>() : //directory a.getParentRelativeName(); //file or symlink const bool isDirectoryB = isDirectoryMapping(b); - const Zstring relDirNameB = isDirectoryB ? + const Zstring& relDirNameB = isDirectoryB ? b.getRelativeName<side>() : //directory b.getParentRelativeName(); //file or symlink diff --git a/ui/sync_cfg.cpp b/ui/sync_cfg.cpp index c7dd58a5..c0af4881 100644 --- a/ui/sync_cfg.cpp +++ b/ui/sync_cfg.cpp @@ -7,8 +7,10 @@ #include "sync_cfg.h" #include "../library/resources.h" -#include "../shared/drag_n_drop.h" +#include "../shared/dir_name.h" #include <wx/wupdlock.h> +#include "mouse_move_dlg.h" +#include "../shared/string_conv.h" using namespace ffs3; @@ -26,10 +28,15 @@ SyncCfgDialog::SyncCfgDialog(wxWindow* window, refHandleDeletion(handleDeletion), refCustomDeletionDirectory(customDeletionDirectory), refIgnoreErrors(ignoreErrors), - dragDropCustomDelFolder(new DragDropOnDlg(m_panelCustomDeletionDir, m_dirPickerCustomDelFolder, m_textCtrlCustomDelFolder)) + customDelFolder(new DirectoryName(m_panelCustomDeletionDir, m_dirPickerCustomDelFolder, m_textCtrlCustomDelFolder)) { +#ifdef FFS_WIN + new MouseMoveWindow(*this, //allow moving main dialog by clicking (nearly) anywhere... + this, m_staticText81, m_staticText8, m_staticText101, m_staticText9); //ownership passed to "this" +#endif + setDeletionHandling(handleDeletion); - m_textCtrlCustomDelFolder->SetValue(customDeletionDirectory); + customDelFolder->setName(wxToZ(customDeletionDirectory)); //error handling if (ignoreErrors) @@ -280,7 +287,7 @@ void SyncCfgDialog::OnApply(wxCommandEvent& event) //write configuration to main dialog refSyncConfiguration = currentSyncConfig; refHandleDeletion = getDeletionHandling(); - refCustomDeletionDirectory = m_textCtrlCustomDelFolder->GetValue(); + refCustomDeletionDirectory = zToWx(customDelFolder->getName()); if (refIgnoreErrors) *refIgnoreErrors = getErrorHandling(); diff --git a/ui/sync_cfg.h b/ui/sync_cfg.h index b738111a..805bb03f 100644 --- a/ui/sync_cfg.h +++ b/ui/sync_cfg.h @@ -14,7 +14,7 @@ namespace ffs3 { -class DragDropOnDlg; +class DirectoryName; } @@ -93,7 +93,7 @@ private: wxString& refCustomDeletionDirectory; bool* refIgnoreErrors; - std::auto_ptr<ffs3::DragDropOnDlg> dragDropCustomDelFolder; + std::auto_ptr<ffs3::DirectoryName> customDelFolder; }; #endif // SYNCCONFIG_H_INCLUDED diff --git a/ui/tray_icon.cpp b/ui/tray_icon.cpp index 464bf7ef..71de676d 100644 --- a/ui/tray_icon.cpp +++ b/ui/tray_icon.cpp @@ -24,7 +24,7 @@ int roundNum(double d) //little rounding function wxIcon generateIcon(size_t percent) //generate icon with progress indicator { - percent = std::min(percent, static_cast<size_t>(100u)); //handle invalid input + percent = std::min(percent, static_cast<size_t>(100)); //handle invalid input #ifdef FFS_WIN static const wxBitmap trayIcon = GlobalResources::getInstance().getImageByName(wxT("FFS_tray_win.png")); @@ -39,25 +39,26 @@ wxIcon generateIcon(size_t percent) //generate icon with progress indicator if (buffer.first == indicatorHeight) return buffer.second; - if ( trayIcon.GetWidth() > 0 && - trayIcon.GetHeight() > 0) - { - static const int indicatorWidth = trayIcon.GetWidth() * .25; - const int indicatorXBegin = ceil((trayIcon.GetWidth() - indicatorWidth) / 2.0); - const int indicatorYBegin = trayIcon.GetHeight() - indicatorHeight; - wxImage genImage(trayIcon.ConvertToImage()); + if ( genImage.GetWidth() > 0 && + genImage.GetHeight() > 0) + { + const int indicatorWidth = genImage.GetWidth() * .4; + const int indicatorXBegin = std::ceil((genImage.GetWidth() - indicatorWidth) / 2.0); + const int indicatorYBegin = genImage.GetHeight() - indicatorHeight; + //draw progress indicator: do NOT use wxDC::DrawRectangle! Doesn't respect alpha in Windows, but does in Linux! //We need a simple, working solution: unsigned char* const data = genImage.GetData(); + for (int row = indicatorYBegin; row < genImage.GetHeight(); ++row) { for (int col = indicatorXBegin; col < indicatorXBegin + indicatorWidth; ++col) { unsigned char* const pixelBegin = data + (row * genImage.GetWidth() + col) * 3; - pixelBegin[0] = 255; //red - pixelBegin[1] = 255; //green + pixelBegin[0] = 240; //red + pixelBegin[1] = 200; //green pixelBegin[2] = 0; //blue } } |