summaryrefslogtreecommitdiff
path: root/ui
diff options
context:
space:
mode:
authorDaniel Wilhelm <daniel@wili.li>2014-04-18 16:46:15 +0200
committerDaniel Wilhelm <daniel@wili.li>2014-04-18 16:46:15 +0200
commitf0ae67919454f572f39541b11ddd74b4fda0d12e (patch)
tree5c9ea9601db75eb849e86fc30fe67810f3679bdc /ui
parent1.2 (diff)
downloadFreeFileSync-f0ae67919454f572f39541b11ddd74b4fda0d12e.tar.gz
FreeFileSync-f0ae67919454f572f39541b11ddd74b4fda0d12e.tar.bz2
FreeFileSync-f0ae67919454f572f39541b11ddd74b4fda0d12e.zip
1.3
Diffstat (limited to 'ui')
-rw-r--r--ui/MainDialog.cpp809
-rw-r--r--ui/MainDialog.h97
-rw-r--r--ui/Resources.cpp4
-rw-r--r--ui/Resources.h1
-rw-r--r--ui/SmallDialogs.cpp71
-rw-r--r--ui/SmallDialogs.h31
-rw-r--r--ui/SyncDialog.cpp11
-rw-r--r--ui/SyncDialog.h3
-rw-r--r--ui/guiGenerated.cpp (renamed from ui/GUI_Generated.cpp)416
-rw-r--r--ui/guiGenerated.h (renamed from ui/GUI_Generated.h)119
10 files changed, 1183 insertions, 379 deletions
diff --git a/ui/MainDialog.cpp b/ui/MainDialog.cpp
index 97288b90..f063dfcb 100644
--- a/ui/MainDialog.cpp
+++ b/ui/MainDialog.cpp
@@ -7,13 +7,13 @@
* License:
**************************************************************/
-#include "MainDialog.h"
+#include "mainDialog.h"
#include <wx/filename.h>
#include <stdexcept> //for std::runtime_error
-#include "..\library\globalfunctions.h"
+#include "../library/globalFunctions.h"
#include <fstream>
#include <wx/clipbrd.h>
-#include "..\library\CustomGrid.h"
+#include "../library/customGrid.h"
#include <cmath>
#include <wx/msgdlg.h>
@@ -21,17 +21,19 @@ using namespace GlobalFunctions;
int leadingPanel = 0;
-MainDialog::MainDialog(wxFrame* frame) :
- GUI_Generated(frame),
+MainDialog::MainDialog(wxFrame* frame, const wxString& cfgFileName) :
+ GuiGenerated(frame),
parent(frame),
- selectedRangeBegin(0),
- selectedRangeEnd(0),
+ stackObjects(0),
+ selectedRange3Begin(0),
+ selectedRange3End(0),
selectionLead(0),
+ filteringInitialized(false),
filteringPending(false),
cmpStatusUpdaterTmp(0)
{
//initialize sync configuration
- readConfigurationFromHD("config.dat");
+ readConfigurationFromHD(cfgFileName, true);
//set icons for this dialog
m_bpButton11->SetBitmapLabel(*GlobalResources::bitmapAbout);
@@ -41,15 +43,16 @@ MainDialog::MainDialog(wxFrame* frame) :
m_bpButtonSync->SetBitmapDisabled(*GlobalResources::bitmapSyncDisabled);
m_bpButtonSwap->SetBitmapLabel(*GlobalResources::bitmapSwap);
m_bpButton14->SetBitmapLabel(*GlobalResources::bitmapHelp);
+ m_bpButton201->SetBitmapLabel(*GlobalResources::bitmapSave);
- m_panel1->DragAcceptFiles(true);
- m_panel2->DragAcceptFiles(true);
- m_panel1->Connect(wxEVT_DROP_FILES, wxDropFilesEventHandler(MainDialog::onFilesDroppedPanel1), NULL, this);
- m_panel2->Connect(wxEVT_DROP_FILES, wxDropFilesEventHandler(MainDialog::onFilesDroppedPanel2), NULL, this);
+ //prepare drag & drop
+ m_panel1->SetDropTarget(new FileDropEvent(this, 1));
+ m_panel2->SetDropTarget(new FileDropEvent(this, 2));
- //support for CTRL + C
+ //support for CTRL + C and DEL
m_grid1->Connect(wxEVT_KEY_DOWN, wxKeyEventHandler(MainDialog::onGrid1ButtonEvent), NULL, this);
m_grid2->Connect(wxEVT_KEY_DOWN, wxKeyEventHandler(MainDialog::onGrid2ButtonEvent), NULL, this);
+ m_grid3->Connect(wxEVT_KEY_DOWN, wxKeyEventHandler(MainDialog::onGrid3ButtonEvent), NULL, this);
//identify leading grid by keyboard input or scroll action
m_grid1->Connect(wxEVT_KEY_DOWN, wxEventHandler(MainDialog::onGrid1access), NULL, this);
@@ -81,8 +84,12 @@ MainDialog::MainDialog(wxFrame* frame) :
m_grid3->Connect(wxEVT_SCROLLWIN_LINEDOWN, wxEventHandler(MainDialog::onGrid3access), NULL, this);
m_grid3->GetGridWindow()->Connect(wxEVT_LEFT_DOWN, wxEventHandler(MainDialog::onGrid3access), NULL, this);
- m_grid3->GetGridWindow()->Connect(wxEVT_IDLE, wxEventHandler(MainDialog::OnIdleToFilterManually), NULL, this);
+ m_grid3->GetGridWindow()->Connect(wxEVT_IDLE, wxEventHandler(MainDialog::OnIdleEvent), NULL, this);
m_grid3->GetGridWindow()->Connect(wxEVT_LEFT_UP, wxEventHandler(MainDialog::OnGrid3LeftMouseUp), NULL, this);
+ m_grid3->GetGridWindow()->Connect(wxEVT_LEFT_DOWN, wxEventHandler(MainDialog::OnGrid3LeftMouseDown), NULL, this);
+
+ Connect(wxEVT_SIZE, wxEventHandler(MainDialog::onResizeMainWindow), NULL, this);
+ Connect(wxEVT_MOVE, wxEventHandler(MainDialog::onResizeMainWindow), NULL, this);
wxString toolTip = wxString(_("Legend\n")) +
_("---------\n") +
@@ -108,7 +115,7 @@ MainDialog::MainDialog(wxFrame* frame) :
updateViewFilterButtons();
//disable sync button as long as "compare" hasn't been triggered.
- m_bpButtonSync->Enable(false);
+ m_bpButtonSync->Disable();
//make filesize right justified on grids
wxGridCellAttr* cellAttributes = m_grid1->GetOrCreateCellAttr(0, 2);
@@ -129,6 +136,18 @@ MainDialog::MainDialog(wxFrame* frame) :
//mainly to update row label sizes...
writeGrid(currentGridData);
+
+ //load list of last used configuration files
+ cfgFileHistory = new wxConfig("FreeFileSync");
+ for (int i = CfgHistroyLength - 1; i >= 0; --i) //put files in reverse order to history
+ {
+ const wxString key = "Selection" + numberToWxString(i);
+
+ wxString value;
+ if (cfgFileHistory->Read(key, &value))
+ addCfgFileToHistory(value);
+ }
+ m_choiceLoad->SetSelection(0);
}
@@ -143,9 +162,7 @@ MainDialog::~MainDialog()
m_grid1->Disconnect(wxEVT_KEY_DOWN, wxKeyEventHandler(MainDialog::onGrid1ButtonEvent), NULL, this);
m_grid2->Disconnect(wxEVT_KEY_DOWN, wxKeyEventHandler(MainDialog::onGrid2ButtonEvent), NULL, this);
-
- m_panel1->Disconnect(wxEVT_DROP_FILES, wxDropFilesEventHandler(MainDialog::onFilesDroppedPanel1), NULL, this);
- m_panel2->Disconnect(wxEVT_DROP_FILES, wxDropFilesEventHandler(MainDialog::onFilesDroppedPanel2), NULL, this);
+ m_grid3->Disconnect(wxEVT_KEY_DOWN, wxKeyEventHandler(MainDialog::onGrid3ButtonEvent), NULL, this);
m_grid1->Disconnect(wxEVT_KEY_DOWN, wxEventHandler(MainDialog::onGrid1access), NULL, this);
m_grid1->Disconnect(wxEVT_SCROLLWIN_TOP, wxEventHandler(MainDialog::onGrid1access), NULL, this);
@@ -176,12 +193,32 @@ MainDialog::~MainDialog()
m_grid3->Disconnect(wxEVT_SCROLLWIN_LINEDOWN, wxEventHandler(MainDialog::onGrid3access), NULL, this);
m_grid3->GetGridWindow()->Disconnect(wxEVT_LEFT_DOWN, wxEventHandler(MainDialog::onGrid3access), NULL, this);
- m_grid3->GetGridWindow()->Disconnect(wxEVT_IDLE, wxEventHandler(MainDialog::OnIdleToFilterManually), NULL, this);
+ m_grid3->GetGridWindow()->Disconnect(wxEVT_IDLE, wxEventHandler(MainDialog::OnIdleEvent), NULL, this);
m_grid3->GetGridWindow()->Disconnect(wxEVT_LEFT_UP, wxEventHandler(MainDialog::OnGrid3LeftMouseUp), NULL, this);
+ m_grid3->GetGridWindow()->Disconnect(wxEVT_LEFT_DOWN, wxEventHandler(MainDialog::OnGrid3LeftMouseDown), NULL, this);
+
+ Disconnect(wxEVT_SIZE, wxEventHandler(MainDialog::onResizeMainWindow), NULL, this);
+ Disconnect(wxEVT_MOVE, wxEventHandler(MainDialog::onResizeMainWindow), NULL, this);
+
+ //write list of last used configuration files
+ int vectorSize = cfgFileNames.size();
+ for (int i = 0; i < CfgHistroyLength; ++i)
+ {
+ const wxString key = "Selection" + numberToWxString(i);
+
+ if (i < vectorSize)
+ cfgFileHistory->Write(key, cfgFileNames[i]);
+ else
+ {
+ if (cfgFileHistory->Exists(key))
+ cfgFileHistory->DeleteEntry(key);
+ }
+ }
+ delete cfgFileHistory;
try
{
- writeConfigurationToHD("config.dat"); //don't trow exceptions in destructors
+ writeConfigurationToHD(FreeFileSync::FFS_LastConfigFile); //don't trow exceptions in destructors
}
catch (std::runtime_error& theException)
{
@@ -237,27 +274,47 @@ void MainDialog::filterRangeManual(int begin, int end, int leadingRow)
if (topRow <= bottomRow) // bottomRow might be -1 ?
{
+
bool newSelection = false; //default: deselect range
- //lastSelected Row should be set in OnDeselectRow()
- if (leadingRow < currentUI_Size)
+ //leadingRow should be set in OnGridSelectCell()
+ if (0 <= leadingRow && leadingRow < currentUI_Size)
newSelection = !currentGridData[currentUI_View[leadingRow].linkToCurrentGridData].selectedForSynchronization;
if (hideFiltered)
assert (!newSelection); //if hidefiltered is active, there should be no filtered elements on screen => current element was filtered out
- for (int i = topRow; i <= bottomRow; ++ i)
+
+ //get all lines that need to be filtered (e.g. if a folder is marked, then its subelements should be marked as well)
+ set<int> rowsToFilterOnGridData; //rows to filter in backend
+ for (int i = topRow; i <= bottomRow; ++i)
+ {
+ unsigned int gridDataLine = currentUI_View[i].linkToCurrentGridData;
+
+ rowsToFilterOnGridData.insert(gridDataLine);
+ FreeFileSync::addSubElements(rowsToFilterOnGridData, currentGridData, currentGridData[gridDataLine]);
+ }
+
+
+ //toggle selection of filtered rows
+ for (set<int>::iterator i = rowsToFilterOnGridData.begin(); i != rowsToFilterOnGridData.end(); ++i)
+ currentGridData[*i].selectedForSynchronization = newSelection;
+
+
+ set<int> filteredOutRowsOnUI; //determine rows that are currently filtered out on current UI view
+
+ //update currentUI_View
+ for (UI_Grid::iterator i = currentUI_View.begin(); i != currentUI_View.end(); ++i)
{
- bool& currentSelection = currentGridData[currentUI_View[i].linkToCurrentGridData].selectedForSynchronization;
- CompareFilesResult currentCmpResult = currentGridData[currentUI_View[i].linkToCurrentGridData].cmpResult;
+ const FileCompareLine& gridLine = currentGridData[i->linkToCurrentGridData];
- //toggle selection of current row
- currentSelection = newSelection;
+ i->cmpResult = evaluateCmpResult(gridLine.cmpResult, gridLine.selectedForSynchronization);
- //update currentUI_View, in case of sorting without refresh (mapping of griddata to ui model)
- currentUI_View[i].cmpResult = evaluateCmpResult(currentCmpResult, currentSelection);
+ if (!gridLine.selectedForSynchronization)
+ filteredOutRowsOnUI.insert(i - currentUI_View.begin());
}
+
//signal UI that grids need to be refreshed on next Update()
m_grid1->ForceRefresh();
m_grid2->ForceRefresh();
@@ -270,9 +327,39 @@ void MainDialog::filterRangeManual(int begin, int end, int leadingRow)
wxMilliSleep(400);
//delete rows, that are filtered out:
- currentUI_View.erase(currentUI_View.begin() + topRow, currentUI_View.begin() + bottomRow + 1);
- //redraw grid neccessary to update new dimensions
+ //for (set<int>::reverse_iterator i = filteredOutRowsOnUI.rbegin(); i != filteredOutRowsOnUI.rend(); ++i)
+ // currentUI_View.erase(currentUI_View.begin() + *i);
+
+ //Note: the following lines are a performance optimization for deleting elements from a vector. It is incredibly faster to create a new
+ //vector and leave specific elements out than to delete row by row and force recopying of most elements for each single deletion (linear vs quadratic runtime)
+
+ //Note: This is the most time consuming part in this whole method!
+
+ UI_Grid temp;
+ int rowNr = 0;
+ int rowToSkip = -1;
+
+ set<int>::iterator rowToSkipIndex = filteredOutRowsOnUI.begin();
+
+ if (rowToSkipIndex != filteredOutRowsOnUI.end())
+ rowToSkip = *rowToSkipIndex;
+
+ for (UI_Grid::iterator i = currentUI_View.begin(); i != currentUI_View.end(); ++i, ++rowNr)
+ {
+ if (rowNr != rowToSkip)
+ temp.push_back(*i);
+ else
+ {
+ rowToSkipIndex++;
+ if (rowToSkipIndex != filteredOutRowsOnUI.end())
+ rowToSkip = *rowToSkipIndex;
+ }
+ }
+ currentUI_View.swap(temp);
+
+
+ //redraw grid necessary to update new dimensions
writeGrid(currentGridData, true); //use UI buffer, no mapping from currentGridData to UI model again, just a re-dimensioning of grids
updateStatusInformation(currentUI_View); //status information has to be recalculated!
}
@@ -282,7 +369,7 @@ void MainDialog::filterRangeManual(int begin, int end, int leadingRow)
}
/*grid event choreography:
-1. UI-Mouse-Down => OnGrid3SelectCell
+1. UI-Mouse-Down => OnGridSelectCell
2. UI-Mouse-Up => OnGrid3SelectRange (if at least two rows are marked)
=> the decision if a range or a single cell is selected can be made only after Mouse-UP. But OnGrid3SelectRange unfortunately is not always
@@ -290,17 +377,25 @@ executed (e.g. if single cell selected)
=> new choreography:
-1. UI-Mouse-Down => OnGrid3SelectCell
+1. UI-Mouse-Down => OnGridSelectCell -> set leading row
2. UI-Mouse-Up => OnGrid3LeftMouseUp (notify that filtering shall be started on next idle event
3. UI-Mouse-Up => OnGrid3SelectRange, possibly
-4. Idle event => OnIdleToFilterManually
+4. Idle event => OnIdleEvent
It's !crazy! but it works!
*/
-void MainDialog::OnGrid3SelectCell(wxGridEvent& event)
+void MainDialog::OnGridSelectCell(wxGridEvent& event)
{
- selectionLead = selectedRangeBegin = selectedRangeEnd = event.GetRow();
+ selectionLead = selectedRange3Begin = selectedRange3End = event.GetRow();
+ event.Skip();
+}
+
+
+void MainDialog::OnGrid3LeftMouseDown(wxEvent& event)
+{
+
+ filteringInitialized = true;
event.Skip();
}
@@ -314,22 +409,45 @@ void MainDialog::OnGrid3LeftMouseUp(wxEvent& event)
void MainDialog::OnGrid3SelectRange(wxGridRangeSelectEvent& event)
{
- if (event.Selecting())
+ if (event.Selecting()) //this range event should only be processed on release left mouse button
{
- selectedRangeBegin = event.GetTopRow();
- selectedRangeEnd = event.GetBottomRow();
+ selectedRange3Begin = event.GetTopRow();
+ selectedRange3End = event.GetBottomRow();
}
event.Skip();
}
-void MainDialog::OnIdleToFilterManually(wxEvent& event)
+void MainDialog::OnIdleEvent(wxEvent& event)
{
+ //process manually filtered rows
if (filteringPending)
{
filteringPending = false;
- filterRangeManual(selectedRangeBegin, selectedRangeEnd, selectionLead);
+
+ if (filteringInitialized) //filteringInitialized is being reset after each selection, since strangely it might happen, that the grid receives
+ { //a mouse up event, but no mouse down! (e.g. when window is maximized and cursor is on grid3)
+ filteringInitialized = false;
+
+ filterRangeManual(selectedRange3Begin, selectedRange3End, selectionLead);
+ }
}
+
+ //------------------------------------------------------------------------------
+
+ //small routine to restore status information after some time
+ if (stackObjects > 0 ) //check if there is some work to do
+ {
+ wxLongLong currentTime = wxGetLocalTimeMillis();
+ if (currentTime - lastStatusChange > 3000) //restore stackObject after three seconds
+ {
+ lastStatusChange = currentTime;
+
+ stackObjects--;
+ m_statusBar1->PopStatusText(1);
+ }
+ }
+
event.Skip();
}
@@ -416,12 +534,229 @@ void copySelectionToClipboard(wxGrid* grid)
}
+set<int> getSelectedRows(wxGrid* grid)
+{
+ set<int> output;
+ int rowTop, rowBottom; //coords of selection
+
+ wxArrayInt selectedRows = grid->GetSelectedRows();
+ if (!selectedRows.IsEmpty())
+ {
+ for (unsigned int i = 0; i < selectedRows.GetCount(); ++i)
+ output.insert(selectedRows[i]);
+ }
+
+ if (!grid->GetSelectedCols().IsEmpty()) //if a column is selected this is means all rows are marked for deletion
+ {
+ for (int k = 0; k < grid->GetNumberRows(); ++k)
+ output.insert(k);
+ }
+
+ wxGridCellCoordsArray singlySelected = grid->GetSelectedCells();
+ if (!singlySelected.IsEmpty())
+ {
+ for (unsigned int k = 0; k < singlySelected.GetCount(); ++k)
+ output.insert(singlySelected[k].GetRow());
+ }
+
+ wxGridCellCoordsArray tmpArrayTop = grid->GetSelectionBlockTopLeft();
+ if (!tmpArrayTop.IsEmpty())
+ {
+ wxGridCellCoordsArray tmpArrayBottom = grid->GetSelectionBlockBottomRight();
+
+ unsigned int arrayCount = tmpArrayTop.GetCount();
+
+ if (arrayCount == tmpArrayBottom.GetCount())
+ {
+ for (unsigned int i = 0; i < arrayCount; ++i)
+ {
+ rowTop = tmpArrayTop[i].GetRow();
+ rowBottom = tmpArrayBottom[i].GetRow();
+
+ for (int k = rowTop; k <= rowBottom; ++k)
+ output.insert(k);
+ }
+ }
+ }
+
+ return output;
+}
+
+
+void removeInvalidRows(set<int>& rows, const int currentUI_Size)
+{
+ set<int> validRows; //temporal table IS needed here
+ for (set<int>::iterator i = rows.begin(); i != rows.end(); ++i)
+ if (0 <= *i)
+ {
+ if (*i >= currentUI_Size) //set is sorted, so no need to continue here
+ break;
+ validRows.insert(*i);
+ }
+ rows = validRows;
+}
+
+
+class DeleteStatusUpdater : public StatusUpdater
+{
+public:
+ DeleteStatusUpdater(bool& unsolvedErrorOccured) : suppressUI_Errormessages(false), unsolvedErrors(unsolvedErrorOccured) {}
+ ~DeleteStatusUpdater() {}
+
+ int reportError(const wxString& text)
+ {
+ if (suppressUI_Errormessages)
+ {
+ unsolvedErrors = true;
+ return StatusUpdater::Continue;
+ }
+
+ wxString errorMessage = text + _("\n\nInformation: If you skip the error and continue or abort a re-compare will be necessary!");
+
+ ErrorDlg* errorDlg = new ErrorDlg(errorMessage, suppressUI_Errormessages);
+
+ int rv = errorDlg->ShowModal();
+ errorDlg->Destroy();
+
+ switch (rv)
+ {
+ case ErrorDlg::ContinueButtonPressed:
+ unsolvedErrors = true;
+ return StatusUpdater::Continue;
+ case ErrorDlg::RetryButtonPressed:
+ return StatusUpdater::Retry;
+ case ErrorDlg::AbortButtonPressed:
+ {
+ unsolvedErrors = true;
+ throw AbortThisProcess();
+ }
+ default:
+ assert (false);
+ }
+
+ return StatusUpdater::Continue; //dummy return value
+ }
+ void updateStatus(const wxString& text) {}
+ void updateProgressIndicator(double number) {}
+
+
+private:
+ bool suppressUI_Errormessages;
+ bool& unsolvedErrors;
+};
+
+
+void MainDialog::deleteFilesOnGrid(wxGrid* grid)
+{
+ set<int> rowsToDeleteOnUI = getSelectedRows(grid);
+
+ if (0 <= selectionLead && unsigned(selectionLead) < currentUI_View.size())
+ rowsToDeleteOnUI.insert(selectionLead); //add row of the currently selected cell
+
+ removeInvalidRows(rowsToDeleteOnUI, currentUI_View.size());
+
+
+ if (rowsToDeleteOnUI.size())
+ {
+ //map grid lines from UI to grid lines in backend
+ set<int> rowsToDeleteOnGrid;
+ for (set<int>::iterator i = rowsToDeleteOnUI.begin(); i != rowsToDeleteOnUI.end(); ++i)
+ rowsToDeleteOnGrid.insert(currentUI_View[*i].linkToCurrentGridData);
+
+ wxString headerText;
+ wxString filesToDelete;
+
+ if (useRecycleBin)
+ headerText = _("Do you really want to move the following objects(s) to the recycle bin?");
+ else
+ headerText = _("Do you really want to delete the following objects(s)?");
+
+ for (set<int>::iterator i = rowsToDeleteOnGrid.begin(); i != rowsToDeleteOnGrid.end(); ++i)
+ {
+ const FileCompareLine& currentCmpLine = currentGridData[*i];
+
+ if (currentCmpLine.fileDescrLeft.objType != IsNothing)
+ filesToDelete+= currentCmpLine.fileDescrLeft.filename + "\n";
+
+ if (currentCmpLine.fileDescrRight.objType != IsNothing)
+ filesToDelete+= currentCmpLine.fileDescrRight.filename + "\n";
+
+ filesToDelete+= "\n";
+ }
+
+ DeleteDialog* confirmDeletion = new DeleteDialog(headerText, filesToDelete, this); //no destruction needed; attached to main window
+
+ switch (confirmDeletion->ShowModal())
+ {
+ case DeleteDialog::OkayButtonPressed:
+ {
+ bool unsolvedErrorOccured = false; //if an error is skipped a re-compare will be necessary!
+
+ try
+ { //class errors when deleting files/folders
+ DeleteStatusUpdater deleteStatusUpdater(unsolvedErrorOccured);
+
+ FreeFileSync::deleteOnGridAndHD(currentGridData, rowsToDeleteOnGrid, &deleteStatusUpdater, useRecycleBin);
+ }
+ catch (AbortThisProcess& theException)
+ {}
+
+
+ //disable the sync button if errors occured during deletion
+ if (unsolvedErrorOccured)
+ m_bpButtonSync->Disable();
+
+
+ //redraw grid neccessary to update new dimensions and for UI-Backend data linkage
+ writeGrid(currentGridData); //do NOT use UI buffer here
+ }
+ break;
+
+ case DeleteDialog::CancelButtonPressed:
+ default:
+ break;
+
+ }
+ }
+}
+
+
+void MainDialog::pushStatusInformation(const wxString& text)
+{
+ lastStatusChange = wxGetLocalTimeMillis();
+ stackObjects++;
+ m_statusBar1->PushStatusText(text, 1);
+}
+
+
+void MainDialog::writeStatusInformation(const wxString& text)
+{
+ stackObjects = 0;
+ m_statusBar1->SetStatusText(text, 1);
+}
+
+
+void MainDialog::onResizeMainWindow(wxEvent& event)
+{
+ if (!IsMaximized())
+ {
+ GetSize(&widthNotMaximized, &heightNotMaximized);
+ GetPosition(&posXNotMaximized, &posYNotMaximized);
+ }
+ event.Skip();
+}
+
+
void MainDialog::onGrid1ButtonEvent(wxKeyEvent& event)
{
//CTRL + C || CTRL + INS
if (event.ControlDown() && event.GetKeyCode() == 67 ||
event.ControlDown() && event.GetKeyCode() == WXK_INSERT)
copySelectionToClipboard(m_grid1);
+
+ else if (event.GetKeyCode() == WXK_DELETE)
+ deleteFilesOnGrid(m_grid1);
+
event.Skip();
}
@@ -431,6 +766,22 @@ void MainDialog::onGrid2ButtonEvent(wxKeyEvent& event)
if (event.ControlDown() && event.GetKeyCode() == 67 ||
event.ControlDown() && event.GetKeyCode() == WXK_INSERT)
copySelectionToClipboard(m_grid2);
+ else if (event.GetKeyCode() == WXK_DELETE)
+ deleteFilesOnGrid(m_grid2);
+
+ event.Skip();
+}
+
+
+void MainDialog::onGrid3ButtonEvent(wxKeyEvent& event)
+{
+ //CTRL + C || CTRL + INS
+ if (event.ControlDown() && event.GetKeyCode() == 67 ||
+ event.ControlDown() && event.GetKeyCode() == WXK_INSERT)
+ copySelectionToClipboard(m_grid3);
+ else if (event.GetKeyCode() == WXK_DELETE)
+ deleteFilesOnGrid(m_grid3);
+
event.Skip();
}
@@ -469,6 +820,7 @@ void MainDialog::OnDirChangedPanel1(wxFileDirPickerEvent& event)
event.Skip();
}
+
void MainDialog::OnDirChangedPanel2(wxFileDirPickerEvent& event)
{
wxString newPath = m_dirPicker2->GetPath();
@@ -484,51 +836,230 @@ void MainDialog::OnDirChangedPanel2(wxFileDirPickerEvent& event)
event.Skip();
}
-void onFilesDropped(wxString elementName, wxTextCtrl* txtCtrl, wxDirPickerCtrl* dirPicker)
+
+void onFilesDropped(const wxString& elementName, wxTextCtrl* txtCtrl, wxDirPickerCtrl* dirPicker)
{
- if (wxDirExists(elementName))
+ wxString fileName = elementName;
+
+ if (wxDirExists(fileName))
{
- txtCtrl->SetValue(elementName);
- dirPicker->SetPath(elementName);
+ txtCtrl->SetValue(fileName);
+ dirPicker->SetPath(fileName);
}
else
{
- elementName = wxFileName(elementName).GetPath();
- if (wxDirExists(elementName))
+ fileName = wxFileName(fileName).GetPath();
+ if (wxDirExists(fileName))
{
- txtCtrl->SetValue(elementName);
- dirPicker->SetPath(elementName);
+ txtCtrl->SetValue(fileName);
+ dirPicker->SetPath(fileName);
}
}
}
-void MainDialog::onFilesDroppedPanel1(wxDropFilesEvent& event)
+void MainDialog::clearStatusBar()
+{
+ stackObjects = 0; //prevent old stack objects from popping up
+
+ m_statusBar1->SetStatusText("");
+ m_statusBar1->SetStatusText("", 1);
+ m_statusBar1->SetStatusText("", 2);
+}
+
+
+wxString getFormattedHistoryElement(const wxString& filename)
+{
+ wxString output = wxFileName(filename).GetFullName();
+ if (output.EndsWith(".FFS"))
+ output = output.BeforeLast('.');
+ return output;
+}
+
+
+//tests if the same filenames are specified, even if they are relative to the current working directory
+bool sameFileSpecified(const wxString& file1, const wxString& file2)
+{
+ wxString file1Full = file1;
+ wxString file2Full = file2;
+
+ if (wxFileName(file1).GetPath() == wxEmptyString)
+ file1Full = wxFileName::GetCwd() + FileNameSeparator + file1;
+
+ if (wxFileName(file2).GetPath() == wxEmptyString)
+ file2Full = wxFileName::GetCwd() + FileNameSeparator + file2;
+
+ return (file1Full == file2Full);
+}
+
+
+void MainDialog::addCfgFileToHistory(const wxString& filename)
{
- if (event.m_noFiles >= 1)
+ //the default configFile should not be in the history
+ if (sameFileSpecified(FreeFileSync::FFS_LastConfigFile, filename))
+ return;
+
+
+ bool duplicateEntry = false;
+ unsigned int duplicatePos = 0;
+ for (unsigned int i = 0; i < cfgFileNames.size(); ++i)
+ if (sameFileSpecified(cfgFileNames[i], filename))
+ {
+ duplicateEntry = true;
+ duplicatePos = i;
+ break;
+ }
+
+
+ if (duplicateEntry) //if entry is in the list, then jump to element
+ {
+ m_choiceLoad->SetSelection(duplicatePos + 1);
+ }
+ else
+ {
+ cfgFileNames.insert(cfgFileNames.begin(), filename);
+ m_choiceLoad->Insert(getFormattedHistoryElement(filename), 1); //insert after "Load configuration..."
+ m_choiceLoad->SetSelection(1);
+ }
+
+ //keep maximal size of history list
+ if (cfgFileNames.size() > unsigned(CfgHistroyLength))
{
- onFilesDropped(event.GetFiles()[0], m_directoryPanel1, m_dirPicker1);
+ //delete last rows
+ cfgFileNames.erase(cfgFileNames.end() - 1);
+ m_choiceLoad->Delete(CfgHistroyLength); //don't forget: m_choiceLoad has (cfgHistroyLength + 1) elements
+ }
+}
+
+bool FileDropEvent::OnDropFiles(wxCoord x, wxCoord y, const wxArrayString& filenames)
+{
+ if (filenames.IsEmpty())
+ return false;
+ else
+ {
//disable the sync button
- m_bpButtonSync->Enable(false);
+ mainDlg->m_bpButtonSync->Disable();
+
//clear grids
- currentGridData.clear();
- writeGrid(currentGridData);
+ mainDlg->currentGridData.clear();
+ mainDlg->writeGrid(mainDlg->currentGridData);
+
+ mainDlg->clearStatusBar();
+
+ const wxString droppedFileName = filenames[0];
+
+ //test if ffs config file has been dropped
+ if (wxFileExists(droppedFileName) && FreeFileSync::isFFS_ConfigFile(droppedFileName))
+ {
+ mainDlg->readConfigurationFromHD(droppedFileName);
+
+ mainDlg->pushStatusInformation(_("Configuration loaded!"));
+ }
+
+ else if (targetGrid == 1)
+ onFilesDropped(droppedFileName, mainDlg->m_directoryPanel1, mainDlg->m_dirPicker1);
+
+ else if (targetGrid == 2)
+ onFilesDropped(droppedFileName, mainDlg->m_directoryPanel2, mainDlg->m_dirPicker2);
}
- event.Skip();
+ return false;
}
-void MainDialog::onFilesDroppedPanel2(wxDropFilesEvent& event)
+
+void MainDialog::OnSaveConfig(wxCommandEvent& event)
{
- if (event.m_noFiles >= 1)
+ wxString defaultFileName = "SyncSettings.FFS";
+
+ //try to use last selected configuration file as default
+ int selectedItem;
+ if ((selectedItem = m_choiceLoad->GetSelection()) != wxNOT_FOUND)
+ if (1 <= selectedItem && unsigned(selectedItem) < m_choiceLoad->GetCount())
+ if (unsigned(selectedItem - 1) < cfgFileNames.size())
+ defaultFileName = cfgFileNames[selectedItem - 1];
+
+
+ clearStatusBar();
+
+ wxFileDialog* filePicker = new wxFileDialog(this, "", "", defaultFileName, "*.*", wxFD_SAVE);
+
+ if (filePicker->ShowModal() == wxID_OK)
{
- onFilesDropped(event.GetFiles()[0], m_directoryPanel2, m_dirPicker2);
+ wxString newFileName = filePicker->GetFilename();
- //disable the sync button
- m_bpButtonSync->Enable(false);
- //clear grids
- currentGridData.clear();
- writeGrid(currentGridData);
+ if (wxFileExists(newFileName))
+ {
+ wxMessageDialog* messageDlg = new wxMessageDialog(this, wxString("\"") + newFileName + "\"" + _(" already exists. Overwrite?"), _("Warning") , wxOK | wxCANCEL);
+
+ if (messageDlg->ShowModal() != wxID_OK)
+ {
+ pushStatusInformation(_("Saved aborted!"));
+ return;
+ }
+ }
+ writeConfigurationToHD(newFileName);
+
+ pushStatusInformation(_("Configuration saved!"));
+ }
+}
+
+
+void MainDialog::OnLoadConfiguration(wxCommandEvent& event)
+{
+ int selectedItem;
+ if ((selectedItem = m_choiceLoad->GetSelection()) != wxNOT_FOUND)
+ {
+ wxString newCfgFile;
+
+ clearStatusBar();
+
+ switch (selectedItem)
+ {
+ case 0: //load config from file
+ wxFileDialog* filePicker = new wxFileDialog(this, "", "", "", "*.*", wxFD_OPEN);
+
+ if (filePicker->ShowModal() == wxID_OK)
+ newCfgFile = filePicker->GetFilename();
+
+ break;
+ default:
+ if (1 <= selectedItem && unsigned(selectedItem) < m_choiceLoad->GetCount())
+ {
+ if (unsigned(selectedItem - 1) < cfgFileNames.size())
+ newCfgFile = cfgFileNames[selectedItem - 1];
+ }
+ break;
+ }
+
+ if (!newCfgFile.IsEmpty())
+ {
+ if (wxFileExists(newCfgFile) && FreeFileSync::isFFS_ConfigFile(newCfgFile))
+ {
+ readConfigurationFromHD(newCfgFile);
+
+ pushStatusInformation(_("Configuration loaded!"));
+ }
+ else
+ wxMessageBox(_("The selected file does not contain a valid configuration!"), _("Warning"), wxOK);
+ }
+ }
+ event.Skip();
+}
+
+
+void MainDialog::OnChoiceKeyEvent(wxKeyEvent& event)
+{
+ if (event.GetKeyCode() == WXK_DELETE)
+ { //try to delete the currently selected config history item
+ int selectedItem;
+ if ((selectedItem = m_choiceLoad->GetSelection()) != wxNOT_FOUND)
+ if (1 <= selectedItem && unsigned(selectedItem) < m_choiceLoad->GetCount())
+ if (unsigned(selectedItem - 1) < cfgFileNames.size())
+ {
+ //delete selected row
+ cfgFileNames.erase(cfgFileNames.begin() + selectedItem - 1);
+ m_choiceLoad->Delete(selectedItem);
+ }
}
event.Skip();
}
@@ -556,7 +1087,7 @@ void MainDialog::OnQuit(wxCommandEvent &event)
}
-void MainDialog::readConfigurationFromHD(const wxString& filename)
+void MainDialog::readConfigurationFromHD(const wxString& filename, bool programStartup)
{
//default values
syncConfiguration.exLeftSideOnly = SyncDirRight;
@@ -578,12 +1109,26 @@ void MainDialog::readConfigurationFromHD(const wxString& filename)
filterIsActive = false; //do not filter by default
useRecycleBin = false; //do not use: in case OS doesn't support this, user will have to activate first and then get the error message
+
+ widthNotMaximized = wxDefaultCoord;
+ heightNotMaximized = wxDefaultCoord;
+ posXNotMaximized = wxDefaultCoord;
+ posYNotMaximized = wxDefaultCoord;
//#####################################################
ifstream config(filename.c_str());
if (!config)
return;
+ //put filename on list of last used config files
+ addCfgFileToHistory(filename);
+
+ char bigBuffer[10000];
+
+
+ //read FFS identifier
+ config.get(bigBuffer, FreeFileSync::FFS_ConfigFileID.Len() + 1);
+
//read sync configuration
syncConfiguration.exLeftSideOnly = SyncDirection(config.get());
syncConfiguration.exRightSideOnly = SyncDirection(config.get());
@@ -604,8 +1149,6 @@ void MainDialog::readConfigurationFromHD(const wxString& filename)
assert (false);
}
- char bigBuffer[10000];
-
//read column sizes
for (int i = 0; i < m_grid1->GetNumberCols(); ++i)
{
@@ -619,17 +1162,30 @@ void MainDialog::readConfigurationFromHD(const wxString& filename)
}
//read application window size and position
- Maximize(bool(config.get()));
+ bool startWindowMaximized = bool(config.get());
config.getline(bigBuffer, 100, char(0));
- int width = atoi(bigBuffer);
+ int widthTmp = atoi(bigBuffer);
config.getline(bigBuffer, 100, char(0));
- int height = atoi(bigBuffer);
+ int heighthTmp = atoi(bigBuffer);
+
config.getline(bigBuffer, 100, char(0));
- int posX = atoi(bigBuffer);
+ int posX_Tmp = atoi(bigBuffer);
config.getline(bigBuffer, 100, char(0));
- int posY = atoi(bigBuffer);
- SetSize(posX, posY, width, height);
+ int posY_Tmp = atoi(bigBuffer);
+
+ //apply window size and position at program startup ONLY
+ if (programStartup)
+ {
+ widthNotMaximized = widthTmp;
+ heightNotMaximized = heighthTmp;
+ posXNotMaximized = posX_Tmp;
+ posYNotMaximized = posY_Tmp;
+
+ //apply window size and position
+ SetSize(posXNotMaximized, posYNotMaximized, widthNotMaximized, heightNotMaximized);
+ Maximize(startWindowMaximized);
+ }
//read last directory selection
config.getline(bigBuffer, 10000, char(0));
@@ -661,21 +1217,15 @@ void MainDialog::readConfigurationFromHD(const wxString& filename)
void MainDialog::writeConfigurationToHD(const wxString& filename)
{
- DWORD dwFileAttributes;
-
- //make config file visible: needed for ofstream
- if (wxFileExists(filename))
- {
- dwFileAttributes = FILE_ATTRIBUTE_NORMAL;
- if (!SetFileAttributes(
- filename.c_str(), // address of filename
- dwFileAttributes // address of attributes to set
- )) throw runtime_error(string(_("Could not change attributes of ")) + filename.c_str());
- }
-
ofstream config(filename.c_str());
if (!config)
- throw runtime_error(string(_("Could not open ")) + filename.c_str());
+ throw runtime_error(string(_("Could not write to ")) + filename.c_str());
+
+ //put filename on list of last used config files
+ addCfgFileToHistory(filename);
+
+ //write FFS identifier
+ config<<FreeFileSync::FFS_ConfigFileID.c_str();
//write sync configuration
config<<char(syncConfiguration.exLeftSideOnly)
@@ -698,20 +1248,16 @@ void MainDialog::writeConfigurationToHD(const wxString& filename)
for (int i = 0; i < m_grid2->GetNumberCols(); ++i)
config<<m_grid2->GetColSize(i)<<char(0);
- //write application window size
+ //write application window size and position
config<<char(IsMaximized());
+
//window size
- int width = 0;
- int height = 0;
- GetSize(&width, &height);
- config<<width<<char(0);
- config<<height<<char(0);
+ config<<widthNotMaximized<<char(0);
+ config<<heightNotMaximized<<char(0);
+
//window position
- int posX = 0;
- int posY = 0;
- GetPosition(&posX, &posY);
- config<<posX<<char(0);
- config<<posY<<char(0);
+ config<<posXNotMaximized<<char(0);
+ config<<posYNotMaximized<<char(0);
//write last directory selection
config<<m_directoryPanel1->GetValue().c_str()<<char(0)
@@ -727,13 +1273,6 @@ void MainDialog::writeConfigurationToHD(const wxString& filename)
config<<char(useRecycleBin);
config.close();
-
- //hide config file
- dwFileAttributes = FILE_ATTRIBUTE_HIDDEN;
- if (!SetFileAttributes(
- filename.c_str(), // address of filename
- dwFileAttributes // address of attributes to set
- )) throw runtime_error(string(_("Could not change attributes of ")) + filename.c_str());
}
void MainDialog::OnAbout(wxCommandEvent &event)
@@ -778,7 +1317,7 @@ void MainDialog::OnHideFilteredButton(wxCommandEvent &event)
void MainDialog::OnConfigureFilter(wxHyperlinkEvent &event)
{
FilterDlg* filterDlg = new FilterDlg(this);
- if (filterDlg->ShowModal() == OkayButtonPressed)
+ if (filterDlg->ShowModal() == FilterDlg::OkayButtonPressed)
{
if (filterIsActive)
{
@@ -888,11 +1427,8 @@ void MainDialog::OnCompare(wxCommandEvent &event)
wxMessageBox(_("Please select directories for both sides!"), _("Information"));
return;
}
- m_statusBar1->SetStatusText("");
- m_statusBar1->SetStatusText("", 1);
- m_statusBar1->SetStatusText("", 2);
- m_statusBar1->SetStatusText("", 3);
- m_statusBar1->SetStatusText("", 4);
+
+ clearStatusBar();
//check if directories exist if loaded by config file
if (!wxDirExists(m_directoryPanel1->GetValue()))
@@ -919,6 +1455,7 @@ void MainDialog::OnCompare(wxCommandEvent &event)
{ //class handling status display and error messages
CompareStatusUpdater statusUpdater(this, m_statusBar1);
cmpStatusUpdaterTmp = &statusUpdater;
+ stackObjects = 0;
//unsigned int startTime3 = GetTickCount();
FreeFileSync::getModelDiff(currentGridData,
@@ -937,13 +1474,14 @@ void MainDialog::OnCompare(wxCommandEvent &event)
//once compare is finished enable the sync button
m_bpButtonSync->Enable(true);
+ m_bpButtonSync->SetFocus();
cmpStatusUpdaterTmp = 0;
}
catch (AbortThisProcess& theException)
{
//disable the sync button
- m_bpButtonSync->Enable(false);
+ m_bpButtonSync->Disable();
}
wxEndBusyCursor();
@@ -1052,11 +1590,7 @@ void MainDialog::OnSync( wxCommandEvent& event )
{
wxBeginBusyCursor();
- m_statusBar1->SetStatusText("");
- m_statusBar1->SetStatusText("", 1);
- m_statusBar1->SetStatusText("", 2);
- m_statusBar1->SetStatusText("", 3);
- m_statusBar1->SetStatusText("", 4);
+ clearStatusBar();
//unsigned int startTime = GetTickCount();
synchronizeFolders(currentGridData, syncConfiguration);
@@ -1334,6 +1868,7 @@ bool cmpGridSmallerThan(const UI_GridLine& a, const UI_GridLine& b)
void MainDialog::updateStatusInformation(const UI_Grid& visibleGrid)
{
+ stackObjects = 0;
unsigned int objectsOnLeftView = 0;
unsigned int objectsOnRightView = 0;
mpz_t filesizeLeftView, filesizeRightView, tmpInt;
@@ -1383,17 +1918,17 @@ void MainDialog::updateStatusInformation(const UI_Grid& visibleGrid)
wxString objectsView = numberToWxString(visibleGrid.size());
GlobalFunctions::includeNumberSeparator(objectsView);
if (currentGridData.size() == 1)
- m_statusBar1->SetStatusText(objectsView + _(" of ") + objectsTotal + _(" row in view"), 2);
+ m_statusBar1->SetStatusText(objectsView + _(" of ") + objectsTotal + _(" row in view"), 1);
else
- m_statusBar1->SetStatusText(objectsView + _(" of ") + objectsTotal + _(" rows in view"), 2);
+ m_statusBar1->SetStatusText(objectsView + _(" of ") + objectsTotal + _(" rows in view"), 1);
wxString objectsViewRight = numberToWxString(objectsOnRightView);
GlobalFunctions::includeNumberSeparator(objectsViewRight);
if (objectsOnRightView == 1)
- m_statusBar1->SetStatusText(wxString(_("1 item on right, ")) + FreeFileSync::formatFilesizeToShortString(mpz_class(filesizeRightView)), 4);
+ m_statusBar1->SetStatusText(wxString(_("1 item on right, ")) + FreeFileSync::formatFilesizeToShortString(mpz_class(filesizeRightView)), 2);
else
- m_statusBar1->SetStatusText(objectsViewRight + _(" items on right, ") + FreeFileSync::formatFilesizeToShortString(mpz_class(filesizeRightView)), 4);
+ m_statusBar1->SetStatusText(objectsViewRight + _(" items on right, ") + FreeFileSync::formatFilesizeToShortString(mpz_class(filesizeRightView)), 2);
//-----------------------------------------------------
mpz_clear(filesizeLeftView);
@@ -1448,8 +1983,8 @@ void MainDialog::mapFileModelToUI(UI_Grid& output, const FileCompareResult& file
}
else
{
- gridline.leftFilename = i->fileDescrLeft.relFilename.AfterLast('\\');
- gridline.leftRelativePath = i->fileDescrLeft.relFilename.BeforeLast('\\');
+ gridline.leftFilename = i->fileDescrLeft.relFilename.AfterLast(FileNameSeparator);
+ gridline.leftRelativePath = i->fileDescrLeft.relFilename.BeforeLast(FileNameSeparator);
gridline.leftSize = GlobalFunctions::includeNumberSeparator(fileSize = i->fileDescrLeft.fileSize);
}
gridline.leftDate = i->fileDescrLeft.lastWriteTime;
@@ -1465,8 +2000,8 @@ void MainDialog::mapFileModelToUI(UI_Grid& output, const FileCompareResult& file
}
else
{
- gridline.rightFilename = i->fileDescrRight.relFilename.AfterLast('\\');
- gridline.rightRelativePath = i->fileDescrRight.relFilename.BeforeLast('\\');
+ gridline.rightFilename = i->fileDescrRight.relFilename.AfterLast(FileNameSeparator);
+ gridline.rightRelativePath = i->fileDescrRight.relFilename.BeforeLast(FileNameSeparator);
gridline.rightSize = GlobalFunctions::includeNumberSeparator(fileSize = i->fileDescrRight.fileSize);
}
gridline.rightDate = i->fileDescrRight.lastWriteTime;
@@ -1483,8 +2018,11 @@ void MainDialog::mapFileModelToUI(UI_Grid& output, const FileCompareResult& file
void updateUI_Now()
{
//process UI events and prevent application from "not responding" -> NO performance issue!
- while (wxTheApp->Pending())
- wxTheApp->Dispatch();
+ wxTheApp->Yield();
+
+
+// while (wxTheApp->Pending())
+// wxTheApp->Dispatch();
}
@@ -1494,7 +2032,7 @@ bool updateUI_IsAllowed()
wxLongLong newExec = wxGetLocalTimeMillis();
- if (newExec - lastExec > 100) //perform ui updates not more often than necessary, 100 seems to be a good value with only a minimal performance loss
+ if (newExec - lastExec >= 100) //perform ui updates not more often than necessary, 100 seems to be a good value with only a minimal performance loss
{
lastExec = newExec;
return true;
@@ -1531,12 +2069,15 @@ CompareStatusUpdater::CompareStatusUpdater(MainDialog* dlg, wxStatusBar* mainWin
mainDialog->m_panel1->Disable();
mainDialog->m_panel2->Disable();
mainDialog->m_panel3->Disable();
+ mainDialog->m_bpButton201->Disable();
+ mainDialog->m_choiceLoad->Disable();
//show abort button
- mainDialog->m_buttonAbort->Show(true);
- mainDialog->m_bpButtonCompare->Show(false);
+ mainDialog->m_buttonAbort->Show();
+ mainDialog->m_bpButtonCompare->Hide();
mainDialog->Layout();
mainDialog->Refresh();
+ mainDialog->m_buttonAbort->SetFocus();
}
CompareStatusUpdater::~CompareStatusUpdater()
@@ -1560,12 +2101,14 @@ CompareStatusUpdater::~CompareStatusUpdater()
mainDialog->m_panel1->Enable();
mainDialog->m_panel2->Enable();
mainDialog->m_panel3->Enable();
+ mainDialog->m_bpButton201->Enable();
+ mainDialog->m_choiceLoad->Enable();
if (abortionRequested)
- mainDialog->m_statusBar1->SetStatusText(mainDialog->m_statusBar1->GetStatusText(2) + " - " + _("Aborted!"), 2);
+ mainDialog->pushStatusInformation(_("Operation aborted!"));
- mainDialog->m_buttonAbort->Show(false);
- mainDialog->m_bpButtonCompare->Show(true);
+ mainDialog->m_buttonAbort->Hide();
+ mainDialog->m_bpButtonCompare->Show();
mainDialog->Layout();
mainDialog->Refresh();
}
@@ -1619,7 +2162,7 @@ void CompareStatusUpdater::triggerUI_Refresh()
if (updateUI_IsAllowed()) //test if specific time span between ui updates is over
{
- statusBar->SetStatusText(wxString(_("Scanning files/folders: ")) + numberToWxString(numberOfScannedObjects), 2);
+ statusBar->SetStatusText(wxString(_("Scanning files/folders: ")) + numberToWxString(numberOfScannedObjects), 1);
updateUI_Now();
}
}
diff --git a/ui/MainDialog.h b/ui/MainDialog.h
index 4c2486b9..7803cfd6 100644
--- a/ui/MainDialog.h
+++ b/ui/MainDialog.h
@@ -10,19 +10,18 @@
#ifndef MAINDIALOG_H
#define MAINDIALOG_H
-#include "..\library\wxWidgets.h"
-#include "GUI_Generated.h"
-#include "..\FreeFileSync.h"
+#include "../library/wxWidgets.h"
+#include "guiGenerated.h"
+#include "../FreeFileSync.h"
-#include "SyncDialog.h"
-#include "SmallDialogs.h"
-#include "Resources.h"
+#include "syncDialog.h"
+#include "smallDialogs.h"
+#include "resources.h"
+#include <wx/dnd.h>
+#include <wx/config.h>
using namespace std;
-//configure filter dialog
-const int OkayButtonPressed = 25;
-
const wxString ConstFilteredOut = "(-)";
struct UI_GridLine
@@ -50,11 +49,12 @@ void updateUI_Now(); //do the updating
extern int leadingPanel;
class CompareStatusUpdater;
+class FileDropEvent;
-class MainDialog : public GUI_Generated
+class MainDialog : public GuiGenerated
{
public:
- MainDialog(wxFrame* frame);
+ MainDialog(wxFrame* frame, const wxString& cfgFileName);
~MainDialog();
private:
@@ -62,8 +62,9 @@ private:
friend class FilterDlg;
friend class CompareStatusUpdater;
friend class SyncStatusUpdater;
+ friend class FileDropEvent;
- void readConfigurationFromHD(const wxString& filename);
+ void readConfigurationFromHD(const wxString& filename, bool programStartup = false);
void writeConfigurationToHD(const wxString& filename);
void loadResourceFiles();
@@ -72,37 +73,47 @@ private:
void updateViewFilterButtons();
void updateFilterButton();
+ void addCfgFileToHistory(const wxString& filename);
+
void synchronizeFolders(FileCompareResult& grid, const SyncConfiguration config);
static wxString evaluateCmpResult(const CompareFilesResult result, const bool selectedForSynchronization);
//main method for putting gridData on UI: maps data respecting current view settings
void writeGrid(const FileCompareResult& gridData, bool useUI_GridCache = false);
-
void mapFileModelToUI(UI_Grid& output, const FileCompareResult& fileCmpResult);
void updateStatusInformation(const UI_Grid& output);
void filterRangeManual(int begin, int end, int leadingRow);
+ void deleteFilesOnGrid(wxGrid* grid);
+
+ //work to be done in idle time
+ void OnIdleEvent(wxEvent& event);
+
+ //delayed status information restore
+ void pushStatusInformation(const wxString& text);
+ void writeStatusInformation(const wxString& text);
+ void clearStatusBar();
- //Events
+ //events
void onGrid1access(wxEvent& event);
void onGrid2access(wxEvent& event);
void onGrid3access(wxEvent& event);
void onGrid1ButtonEvent(wxKeyEvent& event);
void onGrid2ButtonEvent(wxKeyEvent& event);
+ void onGrid3ButtonEvent(wxKeyEvent& event);
void OnEnterLeftDir(wxCommandEvent& event);
void OnEnterRightDir(wxCommandEvent& event);
void OnDirChangedPanel1(wxFileDirPickerEvent& event);
void OnDirChangedPanel2(wxFileDirPickerEvent& event);
- void onFilesDroppedPanel1(wxDropFilesEvent& event);
- void onFilesDroppedPanel2(wxDropFilesEvent& event);
- void OnGrid3SelectCell(wxGridEvent& event);
+ //manual filtering of rows:
+ void OnGridSelectCell(wxGridEvent& event);
void OnGrid3SelectRange(wxGridRangeSelectEvent& event);
void OnGrid3LeftMouseUp(wxEvent& event);
- void OnIdleToFilterManually(wxEvent& event);
+ void OnGrid3LeftMouseDown(wxEvent& event);
void OnLeftGridDoubleClick( wxGridEvent& event);
void OnRightGridDoubleClick(wxGridEvent& event);
@@ -116,6 +127,11 @@ private:
void OnRightOnlyFiles( wxCommandEvent& event);
void OnEqualFiles( wxCommandEvent& event);
+ void OnSaveConfig( wxCommandEvent& event);
+ void OnLoadConfiguration( wxCommandEvent& event);
+ void OnChoiceKeyEvent( wxKeyEvent& event );
+
+void onResizeMainWindow(wxEvent& event);
void OnAbortCompare( wxCommandEvent& event);
void OnFilterButton( wxCommandEvent& event);
void OnHideFilteredButton( wxCommandEvent& event);
@@ -155,6 +171,12 @@ private:
bool rightNewerFilesActive;
bool rightOnlyFilesActive;
+ //ui settings
+ int widthNotMaximized;
+ int heightNotMaximized;
+ int posXNotMaximized;
+ int posYNotMaximized;
+
//other options
bool useRecycleBin; //use Recycle bin when deleting or overwriting files while synchronizing
@@ -162,10 +184,20 @@ private:
wxFrame* parent;
+ //status information
+ wxLongLong lastStatusChange;
+ int stackObjects;
+
+ //save the last used config filenames
+ wxConfig* cfgFileHistory;
+ vector<wxString> cfgFileNames;
+ static const int CfgHistroyLength = 10;
+
//variables for manual filtering of m_grid3
- int selectedRangeBegin;
- int selectedRangeEnd;
- int selectionLead;
+ int selectedRange3Begin; //only used for grid 3
+ int selectedRange3End; //only used for grid 3
+ int selectionLead; //used on all three grids
+ bool filteringInitialized;
bool filteringPending;
CompareStatusUpdater* cmpStatusUpdaterTmp; //used only by the abort button when comparing
@@ -173,6 +205,29 @@ private:
//######################################################################################
+
+class FileDropEvent : public wxFileDropTarget
+{
+public:
+ FileDropEvent(MainDialog* dlg, int grid) :
+ mainDlg(dlg),
+ targetGrid(grid)
+ {
+ assert(grid == 1 || grid == 2);
+ }
+
+ ~FileDropEvent() {}
+
+ //overwritten virtual method
+ bool OnDropFiles(wxCoord x, wxCoord y, const wxArrayString& filenames);
+
+private:
+ MainDialog* mainDlg;
+ int targetGrid;
+};
+
+//######################################################################################
+
//classes handling sync and compare error as well as status information
class CompareStatusUpdater : public StatusUpdater
diff --git a/ui/Resources.cpp b/ui/Resources.cpp
index d4db282c..a92c73f7 100644
--- a/ui/Resources.cpp
+++ b/ui/Resources.cpp
@@ -1,4 +1,4 @@
-#include "Resources.h"
+#include "resources.h"
#include <wx/wfstream.h>
#include <wx/zipstrm.h>
#include <wx/image.h>
@@ -38,6 +38,7 @@ wxBitmap* GlobalResources::bitmapFilterOff = 0;
wxBitmap* GlobalResources::bitmapWarning = 0;
wxBitmap* GlobalResources::bitmapSmallUp = 0;
wxBitmap* GlobalResources::bitmapSmallDown = 0;
+wxBitmap* GlobalResources::bitmapSave = 0;
wxAnimation* GlobalResources::animationMoney = 0;
@@ -77,6 +78,7 @@ void GlobalResources::loadResourceFiles()
bitmapResource["Warning.png"] = (bitmapWarning = new wxBitmap(wxNullBitmap));
bitmapResource["small arrow up.png"] = (bitmapSmallUp = new wxBitmap(wxNullBitmap));
bitmapResource["small arrow down.png"] = (bitmapSmallDown = new wxBitmap(wxNullBitmap));
+ bitmapResource["save.png"] = (bitmapSave = new wxBitmap(wxNullBitmap));
animationMoney = new wxAnimation(wxNullAnimation);
diff --git a/ui/Resources.h b/ui/Resources.h
index fba26f03..fa7eaf29 100644
--- a/ui/Resources.h
+++ b/ui/Resources.h
@@ -47,6 +47,7 @@ public:
static wxBitmap* bitmapWarning;
static wxBitmap* bitmapSmallUp;
static wxBitmap* bitmapSmallDown;
+ static wxBitmap* bitmapSave;
static wxAnimation* animationMoney;
diff --git a/ui/SmallDialogs.cpp b/ui/SmallDialogs.cpp
index f6d29864..cf21bc22 100644
--- a/ui/SmallDialogs.cpp
+++ b/ui/SmallDialogs.cpp
@@ -1,5 +1,5 @@
-#include "SmallDialogs.h"
-#include "..\library\globalFunctions.h"
+#include "smallDialogs.h"
+#include "../library/globalFunctions.h"
AboutDlg::AboutDlg(MainDialog* window) : AboutDlgGenerated(window)
{
@@ -12,6 +12,8 @@ AboutDlg::AboutDlg(MainDialog* window) : AboutDlgGenerated(window)
//build
wxString build = wxString(_("(Build: ")) + __TDATE__ + ")";
m_build->SetLabel(build);
+
+ m_button8->SetFocus();
}
AboutDlg::~AboutDlg() {}
@@ -28,7 +30,10 @@ void AboutDlg::OnOK(wxCommandEvent& event)
//########################################################################################
-HelpDlg::HelpDlg(MainDialog* window) : HelpDlgGenerated(window) {}
+HelpDlg::HelpDlg(MainDialog* window) : HelpDlgGenerated(window)
+{
+ m_button8->SetFocus();
+}
HelpDlg::~HelpDlg() {}
@@ -46,7 +51,9 @@ void HelpDlg::OnOK(wxCommandEvent& event)
//########################################################################################
-FilterDlg::FilterDlg(MainDialog* window) : FilterDlgGenerated(window), mainDialog(window)
+FilterDlg::FilterDlg(MainDialog* window) :
+ FilterDlgGenerated(window),
+ mainDialog(window)
{
m_bitmap8->SetBitmap(*GlobalResources::bitmapInclude);
@@ -58,11 +65,13 @@ FilterDlg::FilterDlg(MainDialog* window) : FilterDlgGenerated(window), mainDialo
FilterDlg::~FilterDlg() {}
+
void FilterDlg::OnClose(wxCloseEvent& event)
{
EndModal(0);
}
+
void FilterDlg::OnOK(wxCommandEvent& event)
{
//only if user presses ApplyFilter, he wants the changes to be committed
@@ -74,6 +83,12 @@ void FilterDlg::OnOK(wxCommandEvent& event)
}
+void FilterDlg::OnCancel(wxCommandEvent& event)
+{
+ EndModal(0);
+}
+
+
void FilterDlg::OnDefault(wxCommandEvent& event)
{
m_textCtrlInclude->SetValue("*");
@@ -84,6 +99,34 @@ void FilterDlg::OnDefault(wxCommandEvent& event)
}
//########################################################################################
+DeleteDialog::DeleteDialog(const wxString& headerText, const wxString& messageText, wxWindow* main) :
+ DeleteDialogGenerated(main)
+{
+ m_staticTextHeader->SetLabel(headerText);
+ m_textCtrlMessage->SetValue(messageText);
+
+ m_buttonOK->SetFocus();
+}
+
+DeleteDialog::~DeleteDialog() {}
+
+
+void DeleteDialog::OnOK(wxCommandEvent& event)
+{
+ EndModal(OkayButtonPressed);
+}
+
+void DeleteDialog::OnCancel(wxCommandEvent& event)
+{
+ EndModal(CancelButtonPressed);
+}
+
+void DeleteDialog::OnClose(wxCloseEvent& event)
+{
+ EndModal(CancelButtonPressed);
+}
+//########################################################################################
+
ErrorDlg::ErrorDlg(const wxString messageText, bool& suppressErrormessages) :
ErrorDlgGenerated(0),
@@ -91,6 +134,8 @@ ErrorDlg::ErrorDlg(const wxString messageText, bool& suppressErrormessages) :
{
m_bitmap10->SetBitmap(*GlobalResources::bitmapWarning);
m_textCtrl8->SetValue(messageText);
+
+ m_buttonContinue->SetFocus();
}
ErrorDlg::~ErrorDlg() {}
@@ -134,6 +179,8 @@ SyncStatus::SyncStatus(StatusUpdater* updater, double gaugeTotalElements, wxWind
resetGauge(gaugeTotalElements);
+ m_buttonAbort->SetFocus();
+
if (windowToDis) //disable (main) window while this status dialog is shown
windowToDis->Enable(false);
}
@@ -142,7 +189,10 @@ SyncStatus::SyncStatus(StatusUpdater* updater, double gaugeTotalElements, wxWind
SyncStatus::~SyncStatus()
{
if (windowToDis)
+ {
windowToDis->Enable(true);
+ windowToDis->Raise();
+ }
}
@@ -183,14 +233,10 @@ void SyncStatus::updateStatusDialogNow()
m_staticTextProcessedObj->SetLabel(GlobalFunctions::numberToWxString(numberOfProcessedObjects));
//remaining bytes left for copy
- m_staticTextBytesCurrent->SetLabel(FreeFileSync::formatFilesizeToShortString(mpz_class(currentElements)));
-
- static double totalElementsLast = -1;
- if (totalElementsLast != totalElements)
- {
- totalElementsLast = totalElements;
- m_staticTextBytesTotal->SetLabel(FreeFileSync::formatFilesizeToShortString(mpz_class(totalElements)));
- }
+ const wxString remainingBytes =
+ FreeFileSync::formatFilesizeToShortString(mpz_class(currentElements)) + "/" +
+ FreeFileSync::formatFilesizeToShortString(mpz_class(totalElements));
+ m_staticTextBytesCopied->SetLabel(remainingBytes);
//do the ui update
updateUI_Now();
@@ -204,6 +250,7 @@ void SyncStatus::processHasFinished(const wxString& finalStatusText) //essential
m_staticTextStatus->SetLabel(finalStatusText);
m_buttonAbort->Hide();
m_buttonOK->Show();
+ m_buttonOK->SetFocus();
updateStatusDialogNow(); //keep this sequence to avoid display distortion, if e.g. only 1 item is sync'ed
Layout(); //
diff --git a/ui/SmallDialogs.h b/ui/SmallDialogs.h
index 77da9eac..c41ca2b8 100644
--- a/ui/SmallDialogs.h
+++ b/ui/SmallDialogs.h
@@ -1,7 +1,7 @@
#ifndef SMALLDIALOGS_H_INCLUDED
#define SMALLDIALOGS_H_INCLUDED
-#include "MainDialog.h"
+#include "mainDialog.h"
class MainDialog;
@@ -13,7 +13,7 @@ public:
private:
void OnClose(wxCloseEvent& event);
- void AboutDlg::OnOK(wxCommandEvent& event);
+ void OnOK(wxCommandEvent& event);
};
@@ -35,24 +35,43 @@ public:
FilterDlg(MainDialog* window);
~FilterDlg();
+ static const int OkayButtonPressed = 25;
+
private:
void OnDefault(wxCommandEvent& event);
void OnOK(wxCommandEvent& event);
+ void OnCancel(wxCommandEvent& event);
void OnClose(wxCloseEvent& event);
MainDialog* mainDialog;
};
+class DeleteDialog : public DeleteDialogGenerated
+{
+public:
+ DeleteDialog(const wxString& headerText, const wxString& messageText, wxWindow* main);
+ ~DeleteDialog();
+
+ static const int OkayButtonPressed = 35;
+ static const int CancelButtonPressed = 45;
+
+private:
+ void OnOK(wxCommandEvent& event);
+ void OnCancel(wxCommandEvent& event);
+ void OnClose(wxCloseEvent& event);
+};
+
+
class ErrorDlg : public ErrorDlgGenerated
{
public:
ErrorDlg(const wxString messageText, bool& suppressErrormessages);
~ErrorDlg();
- static const int ContinueButtonPressed = 35;
- static const int RetryButtonPressed = 45;
- static const int AbortButtonPressed = 55;
+ static const int ContinueButtonPressed = 35;
+ static const int RetryButtonPressed = 45;
+ static const int AbortButtonPressed = 55;
private:
void OnClose(wxCloseEvent& event);
@@ -87,7 +106,7 @@ private:
bool currentProcessIsRunning;
//gauge variables
- double totalElements; //each element represents one byte for proper progress indicator scaling
+ double totalElements; //each element represents one byte for proper progress indicator scaling
double currentElements;
double scalingFactor; //nr of elements has to be normalized to smaller nr. because of range of int limitation
diff --git a/ui/SyncDialog.cpp b/ui/SyncDialog.cpp
index 2353e313..1f2804ae 100644
--- a/ui/SyncDialog.cpp
+++ b/ui/SyncDialog.cpp
@@ -1,5 +1,5 @@
-#include "SyncDialog.h"
-#include "..\library\globalfunctions.h"
+#include "syncDialog.h"
+#include "../library/globalFunctions.h"
SyncDialog::SyncDialog(MainDialog* window)
: SyncDialogGenerated(window), mainDialog(window)
@@ -136,6 +136,13 @@ void SyncDialog::OnClose(wxCloseEvent& event)
EndModal(0);
}
+
+void SyncDialog::OnCancel(wxCommandEvent& event)
+{
+ EndModal(0);
+}
+
+
void SyncDialog::OnBack(wxCommandEvent& event)
{
//write configuration to main dialog
diff --git a/ui/SyncDialog.h b/ui/SyncDialog.h
index a743279a..23d8ce5b 100644
--- a/ui/SyncDialog.h
+++ b/ui/SyncDialog.h
@@ -1,7 +1,7 @@
#ifndef SYNCDIALOG_H_INCLUDED
#define SYNCDIALOG_H_INCLUDED
-#include "MainDialog.h"
+#include "mainDialog.h"
class MainDialog;
@@ -31,6 +31,7 @@ private:
void OnStartSync(wxCommandEvent& event);
void OnClose(wxCloseEvent& event);
void OnBack(wxCommandEvent& event);
+ void OnCancel(wxCommandEvent& event);
void OnSelectRecycleBin(wxCommandEvent& event);
diff --git a/ui/GUI_Generated.cpp b/ui/guiGenerated.cpp
index fc88dd7d..4308804e 100644
--- a/ui/GUI_Generated.cpp
+++ b/ui/guiGenerated.cpp
@@ -15,13 +15,13 @@
#include <wx/wx.h>
#endif //WX_PRECOMP
-#include "..\library\CustomGrid.h"
+#include "..\library\customGrid.h"
-#include "GUI_Generated.h"
+#include "guiGenerated.h"
///////////////////////////////////////////////////////////////////////////
-GUI_Generated::GUI_Generated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxFrame( parent, id, title, pos, size, style )
+GuiGenerated::GuiGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxFrame( parent, id, title, pos, size, style )
{
this->SetSizeHints( wxDefaultSize, wxDefaultSize );
@@ -36,7 +36,8 @@ GUI_Generated::GUI_Generated( wxWindow* parent, wxWindowID id, const wxString& t
wxBoxSizer* bSizer30;
bSizer30 = new wxBoxSizer( wxHORIZONTAL );
- m_bpButtonCompare = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 190,37 ), wxBU_AUTODRAW|wxFULL_REPAINT_ON_RESIZE );
+ m_bpButtonCompare = new wxBitmapButton( this, wxID_OK, wxNullBitmap, wxDefaultPosition, wxSize( 190,37 ), wxBU_AUTODRAW|wxFULL_REPAINT_ON_RESIZE );
+ m_bpButtonCompare->SetDefault();
m_bpButtonCompare->SetToolTip( _("Compare both sides") );
m_bpButtonCompare->SetToolTip( _("Compare both sides") );
@@ -284,6 +285,24 @@ GUI_Generated::GUI_Generated( wxWindow* parent, wxWindowID id, const wxString& t
bSizer3->Add( 0, 0, 1, wxEXPAND, 5 );
+ m_bpButton201 = new wxBitmapButton( m_panel4, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW );
+ m_bpButton201->SetToolTip( _("Save current configuration to file") );
+
+ m_bpButton201->SetToolTip( _("Save current configuration to file") );
+
+ bSizer3->Add( m_bpButton201, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+ wxString m_choiceLoadChoices[] = { _("Load configuration...") };
+ int m_choiceLoadNChoices = sizeof( m_choiceLoadChoices ) / sizeof( wxString );
+ m_choiceLoad = new wxChoice( m_panel4, wxID_ANY, wxDefaultPosition, wxSize( 140,-1 ), m_choiceLoadNChoices, m_choiceLoadChoices, 0 );
+ m_choiceLoad->SetSelection( 0 );
+ m_choiceLoad->SetToolTip( _("Load configuration from file:\n - use this choice box\n - drag & drop config file to this window\n - specify config file as first commandline parameter") );
+
+ bSizer3->Add( m_choiceLoad, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ bSizer3->Add( 0, 0, 1, wxEXPAND, 5 );
+
wxStaticBoxSizer* sbSizer31;
sbSizer31 = new wxStaticBoxSizer( new wxStaticBox( m_panel4, wxID_ANY, _("Filter view") ), wxHORIZONTAL );
@@ -334,6 +353,12 @@ GUI_Generated::GUI_Generated( wxWindow* parent, wxWindowID id, const wxString& t
bSizer3->Add( 0, 0, 1, wxEXPAND, 5 );
+
+ bSizer3->Add( 190, 0, 0, wxEXPAND, 5 );
+
+
+ bSizer3->Add( 0, 0, 1, wxEXPAND, 5 );
+
m_bpButton10 = new wxBitmapButton( m_panel4, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 50,50 ), wxBU_AUTODRAW );
m_bpButton10->SetToolTip( _("Quit") );
@@ -348,72 +373,82 @@ GUI_Generated::GUI_Generated( wxWindow* parent, wxWindowID id, const wxString& t
this->SetSizer( bSizer1 );
this->Layout();
- m_statusBar1 = this->CreateStatusBar( 5, wxST_SIZEGRIP, wxID_ANY );
+ m_statusBar1 = this->CreateStatusBar( 3, wxST_SIZEGRIP, wxID_ANY );
// Connect Events
- this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( GUI_Generated::OnClose ) );
- m_bpButtonCompare->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GUI_Generated::OnCompare ), NULL, this );
- m_buttonAbort->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GUI_Generated::OnAbortCompare ), NULL, this );
- m_radioBtnSizeDate->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( GUI_Generated::OnChangeCompareVariant ), NULL, this );
- m_radioBtnContent->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( GUI_Generated::OnChangeCompareVariant ), NULL, this );
- m_bpButton14->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GUI_Generated::OnShowHelpDialog ), NULL, this );
- m_bpButtonFilter->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GUI_Generated::OnFilterButton ), NULL, this );
- m_hyperlinkCfgFilter->Connect( wxEVT_COMMAND_HYPERLINK, wxHyperlinkEventHandler( GUI_Generated::OnConfigureFilter ), NULL, this );
- m_checkBoxHideFilt->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( GUI_Generated::OnHideFilteredButton ), NULL, this );
- m_bpButtonSync->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GUI_Generated::OnSync ), NULL, this );
- m_directoryPanel1->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( GUI_Generated::OnEnterLeftDir ), NULL, this );
- m_dirPicker1->Connect( wxEVT_COMMAND_DIRPICKER_CHANGED, wxFileDirPickerEventHandler( GUI_Generated::OnDirChangedPanel1 ), NULL, this );
- m_grid1->Connect( wxEVT_GRID_CELL_LEFT_DCLICK, wxGridEventHandler( GUI_Generated::OnLeftGridDoubleClick ), NULL, this );
- m_grid1->Connect( wxEVT_GRID_LABEL_LEFT_CLICK, wxGridEventHandler( GUI_Generated::OnSortLeftGrid ), NULL, this );
- m_bpButtonSwap->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GUI_Generated::OnSwapDirs ), NULL, this );
- m_grid3->Connect( wxEVT_GRID_RANGE_SELECT, wxGridRangeSelectEventHandler( GUI_Generated::OnGrid3SelectRange ), NULL, this );
- m_grid3->Connect( wxEVT_GRID_SELECT_CELL, wxGridEventHandler( GUI_Generated::OnGrid3SelectCell ), NULL, this );
- m_directoryPanel2->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( GUI_Generated::OnEnterRightDir ), NULL, this );
- m_dirPicker2->Connect( wxEVT_COMMAND_DIRPICKER_CHANGED, wxFileDirPickerEventHandler( GUI_Generated::OnDirChangedPanel2 ), NULL, this );
- m_grid2->Connect( wxEVT_GRID_CELL_LEFT_DCLICK, wxGridEventHandler( GUI_Generated::OnRightGridDoubleClick ), NULL, this );
- m_grid2->Connect( wxEVT_GRID_LABEL_LEFT_CLICK, wxGridEventHandler( GUI_Generated::OnSortRightGrid ), NULL, this );
- m_bpButton11->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GUI_Generated::OnAbout ), NULL, this );
- m_bpButton20->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GUI_Generated::OnLeftOnlyFiles ), NULL, this );
- m_bpButton21->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GUI_Generated::OnLeftNewerFiles ), NULL, this );
- m_bpButton25->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GUI_Generated::OnEqualFiles ), NULL, this );
- m_bpButton22->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GUI_Generated::OnDifferentFiles ), NULL, this );
- m_bpButton23->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GUI_Generated::OnRightNewerFiles ), NULL, this );
- m_bpButton24->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GUI_Generated::OnRightOnlyFiles ), NULL, this );
- m_bpButton10->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GUI_Generated::OnQuit ), NULL, this );
+ this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( GuiGenerated::OnClose ) );
+ m_bpButtonCompare->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GuiGenerated::OnCompare ), NULL, this );
+ m_buttonAbort->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GuiGenerated::OnAbortCompare ), NULL, this );
+ m_radioBtnSizeDate->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( GuiGenerated::OnChangeCompareVariant ), NULL, this );
+ m_radioBtnContent->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( GuiGenerated::OnChangeCompareVariant ), NULL, this );
+ m_bpButton14->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GuiGenerated::OnShowHelpDialog ), NULL, this );
+ m_bpButtonFilter->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GuiGenerated::OnFilterButton ), NULL, this );
+ m_hyperlinkCfgFilter->Connect( wxEVT_COMMAND_HYPERLINK, wxHyperlinkEventHandler( GuiGenerated::OnConfigureFilter ), NULL, this );
+ m_checkBoxHideFilt->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( GuiGenerated::OnHideFilteredButton ), NULL, this );
+ m_bpButtonSync->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GuiGenerated::OnSync ), NULL, this );
+ m_directoryPanel1->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( GuiGenerated::OnEnterLeftDir ), NULL, this );
+ m_dirPicker1->Connect( wxEVT_COMMAND_DIRPICKER_CHANGED, wxFileDirPickerEventHandler( GuiGenerated::OnDirChangedPanel1 ), NULL, this );
+ m_grid1->Connect( wxEVT_GRID_CELL_LEFT_DCLICK, wxGridEventHandler( GuiGenerated::OnLeftGridDoubleClick ), NULL, this );
+ m_grid1->Connect( wxEVT_GRID_LABEL_LEFT_CLICK, wxGridEventHandler( GuiGenerated::OnSortLeftGrid ), NULL, this );
+ m_grid1->Connect( wxEVT_GRID_SELECT_CELL, wxGridEventHandler( GuiGenerated::OnGridSelectCell ), NULL, this );
+ m_bpButtonSwap->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GuiGenerated::OnSwapDirs ), NULL, this );
+ m_grid3->Connect( wxEVT_GRID_RANGE_SELECT, wxGridRangeSelectEventHandler( GuiGenerated::OnGrid3SelectRange ), NULL, this );
+ m_grid3->Connect( wxEVT_GRID_SELECT_CELL, wxGridEventHandler( GuiGenerated::OnGridSelectCell ), NULL, this );
+ m_directoryPanel2->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( GuiGenerated::OnEnterRightDir ), NULL, this );
+ m_dirPicker2->Connect( wxEVT_COMMAND_DIRPICKER_CHANGED, wxFileDirPickerEventHandler( GuiGenerated::OnDirChangedPanel2 ), NULL, this );
+ m_grid2->Connect( wxEVT_GRID_CELL_LEFT_DCLICK, wxGridEventHandler( GuiGenerated::OnRightGridDoubleClick ), NULL, this );
+ m_grid2->Connect( wxEVT_GRID_LABEL_LEFT_CLICK, wxGridEventHandler( GuiGenerated::OnSortRightGrid ), NULL, this );
+ m_grid2->Connect( wxEVT_GRID_SELECT_CELL, wxGridEventHandler( GuiGenerated::OnGridSelectCell ), NULL, this );
+ m_bpButton11->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GuiGenerated::OnAbout ), NULL, this );
+ m_bpButton201->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GuiGenerated::OnSaveConfig ), NULL, this );
+ m_choiceLoad->Connect( wxEVT_CHAR, wxKeyEventHandler( GuiGenerated::OnChoiceKeyEvent ), NULL, this );
+ m_choiceLoad->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( GuiGenerated::OnLoadConfiguration ), NULL, this );
+ m_bpButton20->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GuiGenerated::OnLeftOnlyFiles ), NULL, this );
+ m_bpButton21->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GuiGenerated::OnLeftNewerFiles ), NULL, this );
+ m_bpButton25->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GuiGenerated::OnEqualFiles ), NULL, this );
+ m_bpButton22->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GuiGenerated::OnDifferentFiles ), NULL, this );
+ m_bpButton23->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GuiGenerated::OnRightNewerFiles ), NULL, this );
+ m_bpButton24->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GuiGenerated::OnRightOnlyFiles ), NULL, this );
+ m_bpButton10->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GuiGenerated::OnQuit ), NULL, this );
}
-GUI_Generated::~GUI_Generated()
+GuiGenerated::~GuiGenerated()
{
// Disconnect Events
- this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( GUI_Generated::OnClose ) );
- m_bpButtonCompare->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GUI_Generated::OnCompare ), NULL, this );
- m_buttonAbort->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GUI_Generated::OnAbortCompare ), NULL, this );
- m_radioBtnSizeDate->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( GUI_Generated::OnChangeCompareVariant ), NULL, this );
- m_radioBtnContent->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( GUI_Generated::OnChangeCompareVariant ), NULL, this );
- m_bpButton14->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GUI_Generated::OnShowHelpDialog ), NULL, this );
- m_bpButtonFilter->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GUI_Generated::OnFilterButton ), NULL, this );
- m_hyperlinkCfgFilter->Disconnect( wxEVT_COMMAND_HYPERLINK, wxHyperlinkEventHandler( GUI_Generated::OnConfigureFilter ), NULL, this );
- m_checkBoxHideFilt->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( GUI_Generated::OnHideFilteredButton ), NULL, this );
- m_bpButtonSync->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GUI_Generated::OnSync ), NULL, this );
- m_directoryPanel1->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( GUI_Generated::OnEnterLeftDir ), NULL, this );
- m_dirPicker1->Disconnect( wxEVT_COMMAND_DIRPICKER_CHANGED, wxFileDirPickerEventHandler( GUI_Generated::OnDirChangedPanel1 ), NULL, this );
- m_grid1->Disconnect( wxEVT_GRID_CELL_LEFT_DCLICK, wxGridEventHandler( GUI_Generated::OnLeftGridDoubleClick ), NULL, this );
- m_grid1->Disconnect( wxEVT_GRID_LABEL_LEFT_CLICK, wxGridEventHandler( GUI_Generated::OnSortLeftGrid ), NULL, this );
- m_bpButtonSwap->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GUI_Generated::OnSwapDirs ), NULL, this );
- m_grid3->Disconnect( wxEVT_GRID_RANGE_SELECT, wxGridRangeSelectEventHandler( GUI_Generated::OnGrid3SelectRange ), NULL, this );
- m_grid3->Disconnect( wxEVT_GRID_SELECT_CELL, wxGridEventHandler( GUI_Generated::OnGrid3SelectCell ), NULL, this );
- m_directoryPanel2->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( GUI_Generated::OnEnterRightDir ), NULL, this );
- m_dirPicker2->Disconnect( wxEVT_COMMAND_DIRPICKER_CHANGED, wxFileDirPickerEventHandler( GUI_Generated::OnDirChangedPanel2 ), NULL, this );
- m_grid2->Disconnect( wxEVT_GRID_CELL_LEFT_DCLICK, wxGridEventHandler( GUI_Generated::OnRightGridDoubleClick ), NULL, this );
- m_grid2->Disconnect( wxEVT_GRID_LABEL_LEFT_CLICK, wxGridEventHandler( GUI_Generated::OnSortRightGrid ), NULL, this );
- m_bpButton11->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GUI_Generated::OnAbout ), NULL, this );
- m_bpButton20->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GUI_Generated::OnLeftOnlyFiles ), NULL, this );
- m_bpButton21->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GUI_Generated::OnLeftNewerFiles ), NULL, this );
- m_bpButton25->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GUI_Generated::OnEqualFiles ), NULL, this );
- m_bpButton22->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GUI_Generated::OnDifferentFiles ), NULL, this );
- m_bpButton23->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GUI_Generated::OnRightNewerFiles ), NULL, this );
- m_bpButton24->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GUI_Generated::OnRightOnlyFiles ), NULL, this );
- m_bpButton10->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GUI_Generated::OnQuit ), NULL, this );
+ this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( GuiGenerated::OnClose ) );
+ m_bpButtonCompare->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GuiGenerated::OnCompare ), NULL, this );
+ m_buttonAbort->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GuiGenerated::OnAbortCompare ), NULL, this );
+ m_radioBtnSizeDate->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( GuiGenerated::OnChangeCompareVariant ), NULL, this );
+ m_radioBtnContent->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( GuiGenerated::OnChangeCompareVariant ), NULL, this );
+ m_bpButton14->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GuiGenerated::OnShowHelpDialog ), NULL, this );
+ m_bpButtonFilter->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GuiGenerated::OnFilterButton ), NULL, this );
+ m_hyperlinkCfgFilter->Disconnect( wxEVT_COMMAND_HYPERLINK, wxHyperlinkEventHandler( GuiGenerated::OnConfigureFilter ), NULL, this );
+ m_checkBoxHideFilt->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( GuiGenerated::OnHideFilteredButton ), NULL, this );
+ m_bpButtonSync->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GuiGenerated::OnSync ), NULL, this );
+ m_directoryPanel1->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( GuiGenerated::OnEnterLeftDir ), NULL, this );
+ m_dirPicker1->Disconnect( wxEVT_COMMAND_DIRPICKER_CHANGED, wxFileDirPickerEventHandler( GuiGenerated::OnDirChangedPanel1 ), NULL, this );
+ m_grid1->Disconnect( wxEVT_GRID_CELL_LEFT_DCLICK, wxGridEventHandler( GuiGenerated::OnLeftGridDoubleClick ), NULL, this );
+ m_grid1->Disconnect( wxEVT_GRID_LABEL_LEFT_CLICK, wxGridEventHandler( GuiGenerated::OnSortLeftGrid ), NULL, this );
+ m_grid1->Disconnect( wxEVT_GRID_SELECT_CELL, wxGridEventHandler( GuiGenerated::OnGridSelectCell ), NULL, this );
+ m_bpButtonSwap->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GuiGenerated::OnSwapDirs ), NULL, this );
+ m_grid3->Disconnect( wxEVT_GRID_RANGE_SELECT, wxGridRangeSelectEventHandler( GuiGenerated::OnGrid3SelectRange ), NULL, this );
+ m_grid3->Disconnect( wxEVT_GRID_SELECT_CELL, wxGridEventHandler( GuiGenerated::OnGridSelectCell ), NULL, this );
+ m_directoryPanel2->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( GuiGenerated::OnEnterRightDir ), NULL, this );
+ m_dirPicker2->Disconnect( wxEVT_COMMAND_DIRPICKER_CHANGED, wxFileDirPickerEventHandler( GuiGenerated::OnDirChangedPanel2 ), NULL, this );
+ m_grid2->Disconnect( wxEVT_GRID_CELL_LEFT_DCLICK, wxGridEventHandler( GuiGenerated::OnRightGridDoubleClick ), NULL, this );
+ m_grid2->Disconnect( wxEVT_GRID_LABEL_LEFT_CLICK, wxGridEventHandler( GuiGenerated::OnSortRightGrid ), NULL, this );
+ m_grid2->Disconnect( wxEVT_GRID_SELECT_CELL, wxGridEventHandler( GuiGenerated::OnGridSelectCell ), NULL, this );
+ m_bpButton11->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GuiGenerated::OnAbout ), NULL, this );
+ m_bpButton201->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GuiGenerated::OnSaveConfig ), NULL, this );
+ m_choiceLoad->Disconnect( wxEVT_CHAR, wxKeyEventHandler( GuiGenerated::OnChoiceKeyEvent ), NULL, this );
+ m_choiceLoad->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( GuiGenerated::OnLoadConfiguration ), NULL, this );
+ m_bpButton20->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GuiGenerated::OnLeftOnlyFiles ), NULL, this );
+ m_bpButton21->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GuiGenerated::OnLeftNewerFiles ), NULL, this );
+ m_bpButton25->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GuiGenerated::OnEqualFiles ), NULL, this );
+ m_bpButton22->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GuiGenerated::OnDifferentFiles ), NULL, this );
+ m_bpButton23->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GuiGenerated::OnRightNewerFiles ), NULL, this );
+ m_bpButton24->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GuiGenerated::OnRightOnlyFiles ), NULL, this );
+ m_bpButton10->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GuiGenerated::OnQuit ), NULL, this );
}
SyncDialogGenerated::SyncDialogGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
@@ -438,7 +473,8 @@ SyncDialogGenerated::SyncDialogGenerated( wxWindow* parent, wxWindowID id, const
wxBoxSizer* bSizer201;
bSizer201 = new wxBoxSizer( wxHORIZONTAL );
- m_bpButton18 = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 140,58 ), wxBU_AUTODRAW );
+ m_bpButton18 = new wxBitmapButton( this, wxID_OK, wxNullBitmap, wxDefaultPosition, wxSize( 140,58 ), wxBU_AUTODRAW );
+ m_bpButton18->SetDefault();
m_bpButton18->SetToolTip( _("Start synchronizing files") );
m_bpButton18->SetToolTip( _("Start synchronizing files") );
@@ -542,10 +578,13 @@ SyncDialogGenerated::SyncDialogGenerated( wxWindow* parent, wxWindowID id, const
wxBoxSizer* bSizer291;
bSizer291 = new wxBoxSizer( wxHORIZONTAL );
- m_button6 = new wxButton( this, wxID_ANY, _("Back"), wxDefaultPosition, wxSize( 100,32 ), 0 );
+ m_button6 = new wxButton( this, wxID_ANY, _("&Back"), wxDefaultPosition, wxSize( 100,32 ), 0 );
m_button6->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Tahoma") ) );
- bSizer291->Add( m_button6, 0, wxBOTTOM|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
+ bSizer291->Add( m_button6, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT, 5 );
+
+ m_button16 = new wxButton( this, wxID_CANCEL, _("dummyButton"), wxDefaultPosition, wxSize( 0,-1 ), 0 );
+ bSizer291->Add( m_button16, 0, wxALL, 5 );
bSizer291->Add( 82, 0, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
@@ -686,6 +725,7 @@ SyncDialogGenerated::SyncDialogGenerated( wxWindow* parent, wxWindowID id, const
m_buttonTwoWay->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncDialogGenerated::OnSyncBothSides ), NULL, this );
m_radioBtn3->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( SyncDialogGenerated::OnSyncCostum ), NULL, this );
m_button6->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncDialogGenerated::OnBack ), NULL, this );
+ m_button16->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncDialogGenerated::OnCancel ), NULL, this );
m_checkBoxUseRecycler->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( SyncDialogGenerated::OnSelectRecycleBin ), NULL, this );
m_bpButton5->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncDialogGenerated::OnExLeftSideOnly ), NULL, this );
m_bpButton6->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncDialogGenerated::OnExRightSideOnly ), NULL, this );
@@ -705,6 +745,7 @@ SyncDialogGenerated::~SyncDialogGenerated()
m_buttonTwoWay->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncDialogGenerated::OnSyncBothSides ), NULL, this );
m_radioBtn3->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( SyncDialogGenerated::OnSyncCostum ), NULL, this );
m_button6->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncDialogGenerated::OnBack ), NULL, this );
+ m_button16->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncDialogGenerated::OnCancel ), NULL, this );
m_checkBoxUseRecycler->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( SyncDialogGenerated::OnSelectRecycleBin ), NULL, this );
m_bpButton5->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncDialogGenerated::OnExLeftSideOnly ), NULL, this );
m_bpButton6->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncDialogGenerated::OnExRightSideOnly ), NULL, this );
@@ -737,7 +778,8 @@ HelpDlgGenerated::HelpDlgGenerated( wxWindow* parent, wxWindowID id, const wxStr
bSizer20->Add( m_textCtrl8, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
- m_button8 = new wxButton( this, wxID_ANY, _("OK"), wxDefaultPosition, wxSize( 100,32 ), 0 );
+ m_button8 = new wxButton( this, wxID_OK, _("OK"), wxDefaultPosition, wxSize( 100,32 ), 0 );
+ m_button8->SetDefault();
m_button8->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Tahoma") ) );
bSizer20->Add( m_button8, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
@@ -767,7 +809,7 @@ AboutDlgGenerated::AboutDlgGenerated( wxWindow* parent, wxWindowID id, const wxS
bSizer31->Add( 0, 10, 0, wxEXPAND, 5 );
- m_staticText14 = new wxStaticText( this, wxID_ANY, _("FreeFileSync v1.2"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText14 = new wxStaticText( this, wxID_ANY, _("FreeFileSync v1.3"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText14->Wrap( -1 );
m_staticText14->SetFont( wxFont( 16, 74, 90, 92, false, wxT("Tahoma") ) );
@@ -850,7 +892,8 @@ AboutDlgGenerated::AboutDlgGenerated( wxWindow* parent, wxWindowID id, const wxS
bSizer31->Add( fgSizer2, 0, wxEXPAND|wxLEFT, 10 );
- m_button8 = new wxButton( this, wxID_ANY, _("OK"), wxDefaultPosition, wxSize( 100,32 ), 0 );
+ m_button8 = new wxButton( this, wxID_OK, _("OK"), wxDefaultPosition, wxSize( 100,32 ), 0 );
+ m_button8->SetDefault();
m_button8->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Tahoma") ) );
bSizer31->Add( m_button8, 0, wxALIGN_CENTER_HORIZONTAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
@@ -870,6 +913,133 @@ AboutDlgGenerated::~AboutDlgGenerated()
m_button8->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 )
+{
+ this->SetSizeHints( wxDefaultSize, wxDefaultSize );
+
+ wxBoxSizer* bSizer24;
+ bSizer24 = new wxBoxSizer( wxVERTICAL );
+
+
+ bSizer24->Add( 0, 10, 0, wxEXPAND, 5 );
+
+ wxBoxSizer* bSizer26;
+ bSizer26 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_bitmap10 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 48,48 ), 0 );
+ 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 ) );
+
+ bSizer26->Add( m_textCtrl8, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
+
+ bSizer24->Add( bSizer26, 1, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
+
+
+ bSizer24->Add( 0, 10, 0, wxEXPAND, 5 );
+
+ m_checkBoxSuppress = new wxCheckBox( this, wxID_ANY, _("Hide further messages during current process"), wxDefaultPosition, wxDefaultSize, 0 );
+
+ bSizer24->Add( m_checkBoxSuppress, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
+
+
+ bSizer24->Add( 0, 10, 0, wxEXPAND, 5 );
+
+ wxBoxSizer* bSizer25;
+ bSizer25 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_buttonContinue = new wxButton( this, wxID_OK, _("&Continue"), wxDefaultPosition, wxSize( 80,30 ), 0 );
+ m_buttonContinue->SetDefault();
+ m_buttonContinue->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Tahoma") ) );
+
+ bSizer25->Add( m_buttonContinue, 0, wxTOP|wxBOTTOM|wxLEFT, 5 );
+
+ m_buttonRetry = new wxButton( this, wxID_ANY, _("&Retry"), wxDefaultPosition, wxSize( 80,30 ), 0 );
+ m_buttonRetry->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Tahoma") ) );
+
+ bSizer25->Add( m_buttonRetry, 0, wxTOP|wxBOTTOM|wxLEFT, 5 );
+
+ m_buttonAbort = new wxButton( this, wxID_CANCEL, _("&Abort"), wxDefaultPosition, wxSize( 80,30 ), 0 );
+ m_buttonAbort->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Tahoma") ) );
+
+ bSizer25->Add( m_buttonAbort, 0, wxALL, 5 );
+
+ bSizer24->Add( bSizer25, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
+
+ this->SetSizer( bSizer24 );
+ this->Layout();
+
+ // Connect Events
+ this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( ErrorDlgGenerated::OnClose ) );
+ m_buttonContinue->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ErrorDlgGenerated::OnContinue ), NULL, this );
+ m_buttonRetry->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ErrorDlgGenerated::OnRetry ), NULL, this );
+ m_buttonAbort->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ErrorDlgGenerated::OnAbort ), NULL, this );
+}
+
+ErrorDlgGenerated::~ErrorDlgGenerated()
+{
+ // Disconnect Events
+ this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( ErrorDlgGenerated::OnClose ) );
+ m_buttonContinue->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ErrorDlgGenerated::OnContinue ), 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 );
+}
+
+DeleteDialogGenerated::DeleteDialogGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
+{
+ this->SetSizeHints( wxDefaultSize, wxDefaultSize );
+
+ wxBoxSizer* bSizer24;
+ bSizer24 = new wxBoxSizer( wxVERTICAL );
+
+
+ bSizer24->Add( 0, 10, 0, wxEXPAND, 5 );
+
+ m_staticTextHeader = new wxStaticText( this, wxID_ANY, _("Dummy text"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextHeader->Wrap( -1 );
+ m_staticTextHeader->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Tahoma") ) );
+
+ bSizer24->Add( m_staticTextHeader, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
+
+ m_textCtrlMessage = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), wxTE_MULTILINE|wxTE_READONLY );
+ m_textCtrlMessage->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_ACTIVEBORDER ) );
+
+ bSizer24->Add( m_textCtrlMessage, 1, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+
+ wxBoxSizer* bSizer25;
+ bSizer25 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_buttonOK = new wxButton( this, wxID_OK, _("OK"), wxDefaultPosition, wxSize( 80,30 ), 0 );
+ m_buttonOK->SetDefault();
+ m_buttonOK->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Tahoma") ) );
+
+ bSizer25->Add( m_buttonOK, 0, wxTOP|wxBOTTOM|wxLEFT, 5 );
+
+ m_buttonCancel = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize( 80,30 ), 0 );
+ m_buttonCancel->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Tahoma") ) );
+
+ bSizer25->Add( m_buttonCancel, 0, wxALL, 5 );
+
+ bSizer24->Add( bSizer25, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
+
+ this->SetSizer( bSizer24 );
+ this->Layout();
+
+ // Connect Events
+ this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DeleteDialogGenerated::OnClose ) );
+ m_buttonOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DeleteDialogGenerated::OnOK ), NULL, this );
+ m_buttonCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DeleteDialogGenerated::OnCancel ), NULL, this );
+}
+
+DeleteDialogGenerated::~DeleteDialogGenerated()
+{
+ // Disconnect Events
+ this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DeleteDialogGenerated::OnClose ) );
+ m_buttonOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DeleteDialogGenerated::OnOK ), NULL, this );
+ m_buttonCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DeleteDialogGenerated::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 )
{
this->SetSizeHints( wxDefaultSize, wxDefaultSize );
@@ -945,7 +1115,7 @@ FilterDlgGenerated::FilterDlgGenerated( wxWindow* parent, wxWindowID id, const w
wxBoxSizer* bSizer22;
bSizer22 = new wxBoxSizer( wxHORIZONTAL );
- m_button9 = new wxButton( this, wxID_ANY, _("Default"), wxDefaultPosition, wxSize( 80,30 ), 0 );
+ m_button9 = new wxButton( this, wxID_ANY, _("&Default"), wxDefaultPosition, wxSize( 80,30 ), 0 );
m_button9->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Tahoma") ) );
bSizer22->Add( m_button9, 0, wxALL, 5 );
@@ -953,7 +1123,10 @@ FilterDlgGenerated::FilterDlgGenerated( wxWindow* parent, wxWindowID id, const w
bSizer22->Add( 0, 0, 1, wxEXPAND, 5 );
- m_button10 = new wxButton( this, wxID_ANY, _("OK"), wxDefaultPosition, wxSize( 80,30 ), 0 );
+ m_button17 = new wxButton( this, wxID_CANCEL, _("dummyButton"), wxDefaultPosition, wxSize( 0,-1 ), 0 );
+ bSizer22->Add( m_button17, 0, wxALL, 5 );
+
+ m_button10 = new wxButton( this, wxID_OK, _("OK"), wxDefaultPosition, wxSize( 80,30 ), 0 );
m_button10->SetDefault();
m_button10->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Tahoma") ) );
@@ -967,6 +1140,7 @@ FilterDlgGenerated::FilterDlgGenerated( wxWindow* parent, wxWindowID id, const w
// Connect Events
this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( FilterDlgGenerated::OnClose ) );
m_button9->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FilterDlgGenerated::OnDefault ), NULL, this );
+ m_button17->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FilterDlgGenerated::OnCancel ), NULL, this );
m_button10->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FilterDlgGenerated::OnOK ), NULL, this );
}
@@ -975,81 +1149,10 @@ FilterDlgGenerated::~FilterDlgGenerated()
// Disconnect Events
this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( FilterDlgGenerated::OnClose ) );
m_button9->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FilterDlgGenerated::OnDefault ), NULL, this );
+ m_button17->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FilterDlgGenerated::OnCancel ), NULL, this );
m_button10->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FilterDlgGenerated::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 )
-{
- this->SetSizeHints( wxDefaultSize, wxDefaultSize );
-
- wxBoxSizer* bSizer24;
- bSizer24 = new wxBoxSizer( wxVERTICAL );
-
-
- bSizer24->Add( 0, 0, 1, wxEXPAND, 5 );
-
- wxBoxSizer* bSizer26;
- bSizer26 = new wxBoxSizer( wxHORIZONTAL );
-
- m_bitmap10 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 48,48 ), 0 );
- bSizer26->Add( m_bitmap10, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
-
- m_textCtrl8 = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 320,140 ), wxTE_MULTILINE|wxTE_READONLY );
- m_textCtrl8->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_ACTIVEBORDER ) );
-
- bSizer26->Add( m_textCtrl8, 1, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
-
- bSizer24->Add( bSizer26, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
-
-
- bSizer24->Add( 0, 0, 1, wxEXPAND, 5 );
-
- m_checkBoxSuppress = new wxCheckBox( this, wxID_ANY, _("Hide further messages during current process"), wxDefaultPosition, wxDefaultSize, 0 );
-
- bSizer24->Add( m_checkBoxSuppress, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
-
-
- bSizer24->Add( 0, 10, 0, wxEXPAND, 5 );
-
- wxBoxSizer* bSizer25;
- bSizer25 = new wxBoxSizer( wxHORIZONTAL );
-
- m_buttonContinue = new wxButton( this, wxID_ANY, _("Continue"), wxDefaultPosition, wxSize( 80,30 ), 0 );
- m_buttonContinue->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Tahoma") ) );
-
- bSizer25->Add( m_buttonContinue, 0, wxTOP|wxBOTTOM|wxLEFT, 5 );
-
- m_buttonRetry = new wxButton( this, wxID_ANY, _("Retry"), wxDefaultPosition, wxSize( 80,30 ), 0 );
- m_buttonRetry->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Tahoma") ) );
-
- bSizer25->Add( m_buttonRetry, 0, wxTOP|wxBOTTOM|wxLEFT, 5 );
-
- m_buttonAbort = new wxButton( this, wxID_ANY, _("Abort"), wxDefaultPosition, wxSize( 80,30 ), 0 );
- m_buttonAbort->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Tahoma") ) );
-
- bSizer25->Add( m_buttonAbort, 0, wxALL, 5 );
-
- bSizer24->Add( bSizer25, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
-
- this->SetSizer( bSizer24 );
- this->Layout();
-
- // Connect Events
- this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( ErrorDlgGenerated::OnClose ) );
- m_buttonContinue->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ErrorDlgGenerated::OnContinue ), NULL, this );
- m_buttonRetry->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ErrorDlgGenerated::OnRetry ), NULL, this );
- m_buttonAbort->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ErrorDlgGenerated::OnAbort ), NULL, this );
-}
-
-ErrorDlgGenerated::~ErrorDlgGenerated()
-{
- // Disconnect Events
- this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( ErrorDlgGenerated::OnClose ) );
- m_buttonContinue->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ErrorDlgGenerated::OnContinue ), 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 );
-}
-
SyncStatusGenerated::SyncStatusGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
{
this->SetSizeHints( wxDefaultSize, wxDefaultSize );
@@ -1118,36 +1221,25 @@ SyncStatusGenerated::SyncStatusGenerated( wxWindow* parent, wxWindowID id, const
bSizer32->Add( m_staticText26, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 );
- m_staticTextBytesCurrent = new wxStaticText( this, wxID_ANY, _("10,0 MB"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextBytesCurrent->Wrap( -1 );
- m_staticTextBytesCurrent->SetFont( wxFont( 10, 74, 90, 92, false, wxT("Tahoma") ) );
-
- bSizer32->Add( m_staticTextBytesCurrent, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 );
-
- m_staticText30 = new wxStaticText( this, wxID_ANY, _("/"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText30->Wrap( -1 );
- m_staticText30->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Tahoma") ) );
-
- bSizer32->Add( m_staticText30, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- m_staticTextBytesTotal = new wxStaticText( this, wxID_ANY, _("10,0 MB"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextBytesTotal->Wrap( -1 );
- m_staticTextBytesTotal->SetFont( wxFont( 10, 74, 90, 92, false, wxT("Tahoma") ) );
+ m_staticTextBytesCopied = new wxStaticText( this, wxID_ANY, _("--,- MB"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextBytesCopied->Wrap( -1 );
+ m_staticTextBytesCopied->SetFont( wxFont( 10, 74, 90, 92, false, wxT("Tahoma") ) );
- bSizer32->Add( m_staticTextBytesTotal, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
+ bSizer32->Add( m_staticTextBytesCopied, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 );
bSizer28->Add( bSizer32, 1, wxALIGN_CENTER_VERTICAL, 5 );
bSizer28->Add( 0, 0, 1, wxEXPAND, 5 );
- m_buttonOK = new wxButton( this, wxID_ANY, _("OK"), wxDefaultPosition, wxSize( 100,32 ), 0 );
+ m_buttonOK = new wxButton( this, wxID_OK, _("OK"), wxDefaultPosition, wxSize( 100,32 ), 0 );
m_buttonOK->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Tahoma") ) );
m_buttonOK->Hide();
bSizer28->Add( m_buttonOK, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
- m_buttonAbort = new wxButton( this, wxID_ANY, _("Abort"), wxDefaultPosition, wxSize( 100,32 ), 0 );
+ m_buttonAbort = new wxButton( this, wxID_CANCEL, _("Abort"), wxDefaultPosition, wxSize( 100,32 ), 0 );
+ m_buttonAbort->SetDefault();
m_buttonAbort->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Tahoma") ) );
bSizer28->Add( m_buttonAbort, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
diff --git a/ui/GUI_Generated.h b/ui/guiGenerated.h
index f7ef37a7..fe685d9c 100644
--- a/ui/GUI_Generated.h
+++ b/ui/guiGenerated.h
@@ -5,8 +5,8 @@
// PLEASE DO "NOT" EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////
-#ifndef __GUI_Generated__
-#define __GUI_Generated__
+#ifndef __guiGenerated__
+#define __guiGenerated__
#include <wx/intl.h>
@@ -31,6 +31,7 @@ class CustomGrid;
#include <wx/filepicker.h>
#include <wx/grid.h>
#include <wx/panel.h>
+#include <wx/choice.h>
#include <wx/statusbr.h>
#include <wx/frame.h>
#include <wx/stattext.h>
@@ -44,9 +45,9 @@ class CustomGrid;
///////////////////////////////////////////////////////////////////////////////
-/// Class GUI_Generated
+/// Class GuiGenerated
///////////////////////////////////////////////////////////////////////////////
-class GUI_Generated : public wxFrame
+class GuiGenerated : public wxFrame
{
private:
@@ -78,6 +79,9 @@ class GUI_Generated : public wxFrame
wxPanel* m_panel4;
wxBitmapButton* m_bpButton11;
+ wxBitmapButton* m_bpButton201;
+ wxChoice* m_choiceLoad;
+
wxBitmapButton* m_bpButton20;
wxBitmapButton* m_bpButton21;
wxBitmapButton* m_bpButton25;
@@ -85,6 +89,8 @@ class GUI_Generated : public wxFrame
wxBitmapButton* m_bpButton23;
wxBitmapButton* m_bpButton24;
+
+
wxBitmapButton* m_bpButton10;
wxStatusBar* m_statusBar1;
@@ -102,14 +108,17 @@ class GUI_Generated : public wxFrame
virtual void OnDirChangedPanel1( wxFileDirPickerEvent& event ){ event.Skip(); }
virtual void OnLeftGridDoubleClick( wxGridEvent& event ){ event.Skip(); }
virtual void OnSortLeftGrid( wxGridEvent& event ){ event.Skip(); }
+ virtual void OnGridSelectCell( wxGridEvent& event ){ event.Skip(); }
virtual void OnSwapDirs( wxCommandEvent& event ){ event.Skip(); }
virtual void OnGrid3SelectRange( wxGridRangeSelectEvent& event ){ event.Skip(); }
- virtual void OnGrid3SelectCell( wxGridEvent& event ){ event.Skip(); }
virtual void OnEnterRightDir( wxCommandEvent& event ){ event.Skip(); }
virtual void OnDirChangedPanel2( wxFileDirPickerEvent& event ){ event.Skip(); }
virtual void OnRightGridDoubleClick( wxGridEvent& event ){ event.Skip(); }
virtual void OnSortRightGrid( wxGridEvent& event ){ event.Skip(); }
virtual void OnAbout( wxCommandEvent& event ){ event.Skip(); }
+ virtual void OnSaveConfig( wxCommandEvent& event ){ event.Skip(); }
+ virtual void OnChoiceKeyEvent( wxKeyEvent& event ){ event.Skip(); }
+ virtual void OnLoadConfiguration( 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(); }
@@ -120,8 +129,8 @@ class GUI_Generated : public wxFrame
public:
- GUI_Generated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("FreeFileSync - Folder Synchronization"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 930,603 ), long style = wxDEFAULT_FRAME_STYLE|wxTAB_TRAVERSAL );
- ~GUI_Generated();
+ GuiGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("FreeFileSync - Folder Synchronization"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 930,603 ), long style = wxDEFAULT_FRAME_STYLE|wxTAB_TRAVERSAL );
+ ~GuiGenerated();
};
@@ -152,6 +161,7 @@ class SyncDialogGenerated : public wxDialog
wxButton* m_button6;
+ wxButton* m_button16;
wxCheckBox* m_checkBoxUseRecycler;
@@ -184,6 +194,7 @@ class SyncDialogGenerated : public wxDialog
virtual void OnSyncBothSides( wxCommandEvent& event ){ event.Skip(); }
virtual void OnSyncCostum( wxCommandEvent& event ){ event.Skip(); }
virtual void OnBack( wxCommandEvent& event ){ event.Skip(); }
+ virtual void OnCancel( wxCommandEvent& event ){ event.Skip(); }
virtual void OnSelectRecycleBin( wxCommandEvent& event ){ event.Skip(); }
virtual void OnExLeftSideOnly( wxCommandEvent& event ){ event.Skip(); }
virtual void OnExRightSideOnly( wxCommandEvent& event ){ event.Skip(); }
@@ -256,75 +267,103 @@ class AboutDlgGenerated : public wxDialog
public:
- AboutDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("About"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 438,495 ), long style = wxDEFAULT_DIALOG_STYLE );
+ AboutDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("About"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 439,510 ), long style = wxDEFAULT_DIALOG_STYLE );
~AboutDlgGenerated();
};
///////////////////////////////////////////////////////////////////////////////
-/// Class FilterDlgGenerated
+/// Class ErrorDlgGenerated
///////////////////////////////////////////////////////////////////////////////
-class FilterDlgGenerated : public wxDialog
+class ErrorDlgGenerated : public wxDialog
{
private:
protected:
- wxStaticText* m_staticText17;
- wxStaticText* m_staticText18;
+ wxStaticBitmap* m_bitmap10;
+ wxTextCtrl* m_textCtrl8;
- wxStaticText* m_staticText15;
- wxStaticBitmap* m_bitmap8;
- wxTextCtrl* m_textCtrlInclude;
+ wxCheckBox* m_checkBoxSuppress;
- wxStaticText* m_staticText16;
- wxStaticBitmap* m_bitmap9;
- wxTextCtrl* m_textCtrlExclude;
+ wxButton* m_buttonContinue;
+ wxButton* m_buttonRetry;
+ wxButton* m_buttonAbort;
- wxButton* m_button9;
+ // Virtual event handlers, overide them in your derived class
+ virtual void OnClose( wxCloseEvent& event ){ event.Skip(); }
+ virtual void OnContinue( wxCommandEvent& event ){ event.Skip(); }
+ virtual void OnRetry( wxCommandEvent& event ){ event.Skip(); }
+ virtual void OnAbort( wxCommandEvent& event ){ event.Skip(); }
- wxButton* m_button10;
+
+ public:
+ ErrorDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("An error occured"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 411,266 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
+ ~ErrorDlgGenerated();
+
+};
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class DeleteDialogGenerated
+///////////////////////////////////////////////////////////////////////////////
+class DeleteDialogGenerated : public wxDialog
+{
+ private:
+
+ protected:
+
+ wxStaticText* m_staticTextHeader;
+ wxTextCtrl* m_textCtrlMessage;
+ wxButton* m_buttonOK;
+ wxButton* m_buttonCancel;
// Virtual event handlers, overide them in your derived class
virtual void OnClose( wxCloseEvent& event ){ event.Skip(); }
- virtual void OnDefault( wxCommandEvent& event ){ event.Skip(); }
virtual void OnOK( wxCommandEvent& event ){ event.Skip(); }
+ virtual void OnCancel( wxCommandEvent& event ){ event.Skip(); }
public:
- FilterDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Configure filter settings"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 484,350 ), long style = wxDEFAULT_DIALOG_STYLE );
- ~FilterDlgGenerated();
+ DeleteDialogGenerated( 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 );
+ ~DeleteDialogGenerated();
};
///////////////////////////////////////////////////////////////////////////////
-/// Class ErrorDlgGenerated
+/// Class FilterDlgGenerated
///////////////////////////////////////////////////////////////////////////////
-class ErrorDlgGenerated : public wxDialog
+class FilterDlgGenerated : public wxDialog
{
private:
protected:
+ wxStaticText* m_staticText17;
- wxStaticBitmap* m_bitmap10;
- wxTextCtrl* m_textCtrl8;
+ wxStaticText* m_staticText18;
- wxCheckBox* m_checkBoxSuppress;
+ wxStaticText* m_staticText15;
+ wxStaticBitmap* m_bitmap8;
+ wxTextCtrl* m_textCtrlInclude;
- wxButton* m_buttonContinue;
- wxButton* m_buttonRetry;
- wxButton* m_buttonAbort;
+ wxStaticText* m_staticText16;
+ wxStaticBitmap* m_bitmap9;
+ wxTextCtrl* m_textCtrlExclude;
+
+ wxButton* m_button9;
+
+ wxButton* m_button17;
+ wxButton* m_button10;
// Virtual event handlers, overide them in your derived class
virtual void OnClose( wxCloseEvent& event ){ event.Skip(); }
- virtual void OnContinue( wxCommandEvent& event ){ event.Skip(); }
- virtual void OnRetry( wxCommandEvent& event ){ event.Skip(); }
- virtual void OnAbort( wxCommandEvent& event ){ event.Skip(); }
+ virtual void OnDefault( wxCommandEvent& event ){ event.Skip(); }
+ virtual void OnCancel( wxCommandEvent& event ){ event.Skip(); }
+ virtual void OnOK( wxCommandEvent& event ){ event.Skip(); }
public:
- ErrorDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("An error occured"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 411,266 ), long style = wxDEFAULT_DIALOG_STYLE );
- ~ErrorDlgGenerated();
+ FilterDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Configure filter settings"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 484,350 ), long style = wxDEFAULT_DIALOG_STYLE );
+ ~FilterDlgGenerated();
};
@@ -343,9 +382,7 @@ class SyncStatusGenerated : public wxDialog
wxStaticText* m_staticText25;
wxStaticText* m_staticTextProcessedObj;
wxStaticText* m_staticText26;
- wxStaticText* m_staticTextBytesCurrent;
- wxStaticText* m_staticText30;
- wxStaticText* m_staticTextBytesTotal;
+ wxStaticText* m_staticTextBytesCopied;
wxStaticText* m_staticText32;
@@ -363,9 +400,9 @@ class SyncStatusGenerated : public wxDialog
wxGauge* m_gauge1;
wxButton* m_buttonOK;
wxButton* m_buttonAbort;
- SyncStatusGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 614,371 ), long style = wxDEFAULT_DIALOG_STYLE );
+ SyncStatusGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 614,371 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~SyncStatusGenerated();
};
-#endif //__GUI_Generated__
+#endif //__guiGenerated__
bgstack15