diff options
Diffstat (limited to 'ui')
-rw-r--r-- | ui/batch_config.cpp | 29 | ||||
-rw-r--r-- | ui/batch_status_handler.cpp | 38 | ||||
-rw-r--r-- | ui/batch_status_handler.h | 8 | ||||
-rw-r--r-- | ui/check_version.cpp | 47 | ||||
-rw-r--r-- | ui/custom_grid.cpp | 181 | ||||
-rw-r--r-- | ui/custom_grid.h | 2 | ||||
-rw-r--r-- | ui/dir_name.cpp | 2 | ||||
-rw-r--r-- | ui/exec_finished_box.cpp | 12 | ||||
-rw-r--r-- | ui/folder_history_box.cpp | 9 | ||||
-rw-r--r-- | ui/folder_pair.h | 19 | ||||
-rw-r--r-- | ui/grid_view.cpp | 7 | ||||
-rw-r--r-- | ui/gui_generated.cpp | 1240 | ||||
-rw-r--r-- | ui/gui_generated.h | 163 | ||||
-rw-r--r-- | ui/main_dlg.cpp | 521 | ||||
-rw-r--r-- | ui/main_dlg.h | 6 | ||||
-rw-r--r-- | ui/msg_popup.cpp | 6 | ||||
-rw-r--r-- | ui/progress_indicator.cpp | 43 | ||||
-rw-r--r-- | ui/small_dlgs.cpp | 138 | ||||
-rw-r--r-- | ui/sync_cfg.cpp | 10 | ||||
-rw-r--r-- | ui/tray_icon.cpp | 2 | ||||
-rw-r--r-- | ui/tree_view.cpp | 16 |
21 files changed, 1425 insertions, 1074 deletions
diff --git a/ui/batch_config.cpp b/ui/batch_config.cpp index cbb667ad..10cee822 100644 --- a/ui/batch_config.cpp +++ b/ui/batch_config.cpp @@ -45,7 +45,7 @@ private: virtual void OnCmpSettings (wxCommandEvent& event); virtual void OnSyncSettings (wxCommandEvent& event); virtual void OnConfigureFilter(wxCommandEvent& event); - virtual void OnHelp (wxCommandEvent& event); + virtual void OnHelp (wxCommandEvent& event) { displayHelpEntry(L"html/Schedule a Batch Job.html"); } void OnCompSettingsContext(wxCommandEvent& event); void OnSyncSettingsContext(wxCommandEvent& event); @@ -368,15 +368,15 @@ void BatchDialog::updateGui() //re-evaluate gui after config changes m_staticTextSyncVariant->SetLabel(cfg.mainCfg.getSyncVariantName()); //set filter icon - if (isNullFilter(cfg.mainCfg.globalFilter)) + if (!isNullFilter(cfg.mainCfg.globalFilter)) { - setImage(*m_bpButtonFilter, GlobalResources::getImage(wxT("filterOff"))); - m_bpButtonFilter->SetToolTip(_("No filter selected")); + setImage(*m_bpButtonFilter, GlobalResources::getImage(L"filter")); + m_bpButtonFilter->SetToolTip(_("Filter is active")); } else { - setImage(*m_bpButtonFilter, GlobalResources::getImage(wxT("filterOn"))); - m_bpButtonFilter->SetToolTip(_("Filter is active")); + setImage(*m_bpButtonFilter, greyScale(GlobalResources::getImage(L"filter"))); + m_bpButtonFilter->SetToolTip(_("No filter selected")); } m_panelOverview->Layout (); //adjust stuff inside scrolled window @@ -461,15 +461,6 @@ void BatchDialog::OnFilesDropped(FileDropEvent& event) } -void BatchDialog::OnHelp(wxCommandEvent& event) -{ -#ifdef FFS_WIN - zen::displayHelpEntry(wxT("html\\ScheduleBatch.html")); -#elif defined FFS_LINUX - zen::displayHelpEntry(wxT("html/ScheduleBatch.html")); -#endif -} - /* void BatchDialog::showNotebookpage(wxWindow* page, const wxString& pageName, bool show) { @@ -513,8 +504,8 @@ void BatchDialog::OnSaveBatchJob(wxCommandEvent& event) wxEmptyString, wxEmptyString, defaultFileName, - wxString(_("FreeFileSync batch file")) + L" (*.ffs_batch)|*.ffs_batch", - wxFD_SAVE /*| wxFD_OVERWRITE_PROMPT*/); //creating this on freestore leads to memleak! + _("FreeFileSync batch file") + L" (*.ffs_batch)|*.ffs_batch" + L"|" +_("All files") + L" (*.*)|*", + wxFD_SAVE | wxFD_OVERWRITE_PROMPT); //creating this on freestore leads to memleak! if (filePicker.ShowModal() == wxID_OK) { const wxString newFileName = filePicker.GetPath(); @@ -530,9 +521,9 @@ void BatchDialog::OnLoadBatchJob(wxCommandEvent& event) { wxFileDialog filePicker(this, wxEmptyString, - beforeLast(proposedBatchFileName, utf8CvrtTo<wxString>(FILE_NAME_SEPARATOR)), //set default dir: empty string if "currentConfigFileName" is empty or has no path separator + beforeLast(proposedBatchFileName, utfCvrtTo<wxString>(FILE_NAME_SEPARATOR)), //set default dir: empty string if "currentConfigFileName" is empty or has no path separator wxEmptyString, - wxString(_("FreeFileSync configuration")) + wxT(" (*.ffs_batch;*.ffs_gui)|*.ffs_batch;*.ffs_gui"), + _("FreeFileSync batch file") + L" (*.ffs_batch;*.ffs_gui)|*.ffs_batch;*.ffs_gui" + L"|" +_("All files") + L" (*.*)|*", wxFD_OPEN | wxFD_MULTIPLE); //creating this on freestore leads to memleak! if (filePicker.ShowModal() == wxID_OK) { diff --git a/ui/batch_status_handler.cpp b/ui/batch_status_handler.cpp index 7254f570..89d28084 100644 --- a/ui/batch_status_handler.cpp +++ b/ui/batch_status_handler.cpp @@ -37,8 +37,8 @@ public: virtual std::shared_ptr<TraverseCallback> onDir (const Zchar* shortName, const Zstring& fullName) { return nullptr; } //DON'T traverse into subdirs - virtual void onSymlink(const Zchar* shortName, const Zstring& fullName, const SymlinkInfo& details) {} - virtual HandleError onError (const std::wstring& errorText) { return TRAV_ERROR_IGNORE; } //errors are not really critical in this context + virtual HandleLink onSymlink(const Zchar* shortName, const Zstring& fullName, const SymlinkInfo& details) { return LINK_SKIP; } + virtual HandleError onError (const std::wstring& errorText) { return ON_ERROR_IGNORE; } //errors are not really critical in this context private: const Zstring prefix_; @@ -50,9 +50,11 @@ private: class LogFile //throw FileError { public: - LogFile(const Zstring& logfileDirectory, const wxString& jobName) : + LogFile(const Zstring& logfileDirectory, + const std::wstring& jobName, + const std::wstring& timestamp) : jobName_(jobName), //throw FileError - logfileName(findUniqueLogname(logfileDirectory, jobName)) + logfileName(findUnusedLogname(logfileDirectory, jobName, timestamp)) { logFile.Open(toWx(logfileName), L"w"); if (!logFile.IsOpened()) @@ -78,11 +80,11 @@ public: results.push_back(L""); if (itemsTotal != 0 || dataTotal != 0) //=: sync phase was reached and there were actual items to sync { - results.push_back(L" " + _("Items processed:") + L" " + toStringSep(itemsSynced) + L" (" + filesizeToShortString(dataSynced) + L")"); + results.push_back(L" " + _("Items processed:") + L" " + toGuiString(itemsSynced) + L" (" + filesizeToShortString(dataSynced) + L")"); if (itemsSynced != itemsTotal || dataSynced != dataTotal) - results.push_back(L" " + _("Items remaining:") + L" " + toStringSep(itemsTotal - itemsSynced) + L" (" + filesizeToShortString(dataTotal - dataSynced) + L")"); + results.push_back(L" " + _("Items remaining:") + L" " + toGuiString(itemsTotal - itemsSynced) + L" (" + filesizeToShortString(dataTotal - dataSynced) + L")"); } results.push_back(L" " + _("Total time:") + L" " + wxTimeSpan::Milliseconds(totalTime.Time()).Format()); @@ -100,7 +102,7 @@ public: const auto& entries = log.getEntries(); for (auto iter = entries.begin(); iter != entries.end(); ++iter) { - const std::string& msg = utf8CvrtTo<std::string>(formatMessage(*iter)); + const std::string& msg = utfCvrtTo<std::string>(formatMessage(*iter)); logFile.Write(msg.c_str(), msg.size()); //better do UTF8 conversion ourselves rather than to rely on wxWidgets logFile.Write(L'\n'); } @@ -116,7 +118,6 @@ public: FindLogfiles traverseCallback(toZ(jobName_), logFiles); traverseFolder(beforeLast(logfileName, FILE_NAME_SEPARATOR), //throw(); - false, //don't follow symlinks traverseCallback); if (logFiles.size() <= maxCount) @@ -132,7 +133,9 @@ public: //Zstring getLogfileName() const { return logfileName; } private: - static Zstring findUniqueLogname(const Zstring& logfileDirectory, const wxString& jobName) + static Zstring findUnusedLogname(const Zstring& logfileDirectory, + const std::wstring& jobName, + const std::wstring& timestamp) { //create logfile directory Zstring logfileDir = logfileDirectory.empty() ? @@ -143,7 +146,7 @@ private: createDirectory(logfileDir); //throw FileError; create recursively if necessary //assemble logfile name - const Zstring logfileName = appendSeparator(logfileDir) + toZ(jobName) + Zstr(" ") + formatTime<Zstring>(Zstr("%Y-%m-%d %H%M%S")); + const Zstring logfileName = appendSeparator(logfileDir) + toZ(jobName) + Zstr(" ") + utfCvrtTo<Zstring>(timestamp); //ensure uniqueness Zstring output = logfileName + Zstr(".log"); @@ -162,29 +165,30 @@ private: //############################################################################################################################## BatchStatusHandler::BatchStatusHandler(bool showProgress, - const wxString& jobName, + const std::wstring& jobName, + const std::wstring& timestamp, const wxString& logfileDirectory, size_t logFileCountMax, const xmlAccess::OnError handleError, const SwitchToGui& switchBatchToGui, //functionality to change from batch mode to GUI mode - int& returnVal, + FfsReturnCode& returnCode, const std::wstring& execWhenFinished, std::vector<std::wstring>& execFinishedHistory) : switchBatchToGui_(switchBatchToGui), showFinalResults(showProgress), //=> exit immediately or wait when finished switchToGuiRequested(false), handleError_(handleError), - returnValue(returnVal), + returnCode_(returnCode), syncStatusFrame(*this, *this, nullptr, showProgress, jobName, execWhenFinished, execFinishedHistory) { if (logFileCountMax > 0) //init log file: starts internal timer! if (!tryReportingError([&] { - logFile.reset(new LogFile(toZ(logfileDirectory), jobName)); //throw FileError + logFile.reset(new LogFile(toZ(logfileDirectory), jobName, timestamp)); //throw FileError logFile->limitLogfileCount(logFileCountMax); //throw() }, *this)) { - returnValue = -7; + returnCode_ = FFS_RC_ABORTED; throw BatchAbortProcess(); } @@ -200,13 +204,13 @@ BatchStatusHandler::~BatchStatusHandler() std::wstring finalStatus; if (abortIsRequested()) { - returnValue = -4; + returnCode_ = FFS_RC_ABORTED; finalStatus = _("Synchronization aborted!"); errorLog.logMsg(finalStatus, TYPE_ERROR); } else if (totalErrors > 0) { - returnValue = -5; + returnCode_ = FFS_RC_FINISHED_WITH_ERRORS; finalStatus = _("Synchronization completed with errors!"); errorLog.logMsg(finalStatus, TYPE_WARNING); } diff --git a/ui/batch_status_handler.h b/ui/batch_status_handler.h index cc23019e..56e9e781 100644 --- a/ui/batch_status_handler.h +++ b/ui/batch_status_handler.h @@ -12,6 +12,7 @@ #include "../lib/process_xml.h" #include "progress_indicator.h" #include "switch_to_gui.h" +#include "lib/return_codes.h" class LogFile; @@ -23,12 +24,13 @@ class BatchStatusHandler : public zen::StatusHandler { public: BatchStatusHandler(bool showProgress, //defines: -start minimized and -quit immediately when finished - const wxString& jobName, + const std::wstring& jobName, //should not be empty for a batch job! + const std::wstring& timestamp, const wxString& logfileDirectory, size_t logFileCountMax, //0 if logging shall be inactive const xmlAccess::OnError handleError, const zen::SwitchToGui& switchBatchToGui, //functionality to change from batch mode to GUI mode - int& returnVal, + zen::FfsReturnCode& returnCode, const std::wstring& execWhenFinished, std::vector<std::wstring>& execFinishedHistory); ~BatchStatusHandler(); @@ -50,7 +52,7 @@ private: bool switchToGuiRequested; xmlAccess::OnError handleError_; zen::ErrorLog errorLog; //list of non-resolved errors and warnings - int& returnValue; + zen::FfsReturnCode& returnCode_; SyncStatus syncStatusFrame; //the window managed by SyncStatus has longer lifetime than this handler! std::unique_ptr<LogFile> logFile; //optional! diff --git a/ui/check_version.cpp b/ui/check_version.cpp index 37fa16ff..5856f95a 100644 --- a/ui/check_version.cpp +++ b/ui/check_version.cpp @@ -52,7 +52,7 @@ bool getOnlineVersion(wxString& version) } -const wxChar VERSION_SEP = wxT('.'); +const wchar_t VERSION_SEP = L'.'; std::vector<size_t> parseVersion(const wxString& version) @@ -69,7 +69,7 @@ std::vector<size_t> parseVersion(const wxString& version) } -bool newerVersionExists(const wxString& onlineVersion) +bool isNewerVersion(const wxString& onlineVersion) { std::vector<size_t> current = parseVersion(zen::currentVersion); std::vector<size_t> online = parseVersion(onlineVersion); @@ -91,14 +91,11 @@ void zen::checkForUpdateNow(wxWindow* parent) return; } - if (newerVersionExists(onlineVersion)) + if (isNewerVersion(onlineVersion)) { - const int rv = wxMessageBox(_("A newer version of FreeFileSync is available:") + L" v" + onlineVersion + L". " + _("Download now?"), - _("Information"), - wxYES_NO | wxICON_QUESTION, - parent); - if (rv == wxYES) - wxLaunchDefaultBrowser(wxString(L"http://sourceforge.net/projects/freefilesync/files/freefilesync/v") + onlineVersion + L"/"); + if (showQuestionDlg(parent, ReturnQuestionDlg::BUTTON_YES | ReturnQuestionDlg::BUTTON_CANCEL, + _("A newer version of FreeFileSync is available:") + L" " + onlineVersion + L"\n\n" + _("Download now?")) == ReturnQuestionDlg::BUTTON_YES) + wxLaunchDefaultBrowser(L"http://sourceforge.net/projects/freefilesync/files/freefilesync/v" + onlineVersion + L"/"); } else wxMessageBox(_("FreeFileSync is up to date!"), _("Information"), wxICON_INFORMATION, parent); @@ -116,17 +113,22 @@ void zen::checkForUpdatePeriodically(wxWindow* parent, long& lastUpdateCheck) { if (lastUpdateCheck == 0) { - const bool checkRegularly = showQuestionDlg(parent, ReturnQuestionDlg::BUTTON_YES | ReturnQuestionDlg::BUTTON_NO, - _("Do you want FreeFileSync to automatically check for updates every week?") + L"\n" + - _("(Requires an Internet connection!)")) == ReturnQuestionDlg::BUTTON_YES; - if (checkRegularly) + switch (showQuestionDlg(parent, ReturnQuestionDlg::BUTTON_YES | ReturnQuestionDlg::BUTTON_NO | ReturnQuestionDlg::BUTTON_CANCEL, + _("Do you want FreeFileSync to automatically check for updates every week?") + L"\n" + + _("(Requires an Internet connection!)"))) { - lastUpdateCheck = 123; //some old date (few seconds after 1970) + case ReturnQuestionDlg::BUTTON_YES: + lastUpdateCheck = 123; //some old date (few seconds after 1970) different from 0 and -1 + checkForUpdatePeriodically(parent, lastUpdateCheck); //check for updates now + break; - checkForUpdatePeriodically(parent, lastUpdateCheck); //check for updates now + case ReturnQuestionDlg::BUTTON_NO: + lastUpdateCheck = -1; //don't check for updates anymore + break; + + case ReturnQuestionDlg::BUTTON_CANCEL: + break; } - else - lastUpdateCheck = -1; //don't check for updates anymore } else if (wxGetLocalTime() >= lastUpdateCheck + 7 * 24 * 3600) //check weekly { @@ -136,14 +138,11 @@ void zen::checkForUpdatePeriodically(wxWindow* parent, long& lastUpdateCheck) lastUpdateCheck = wxGetLocalTime(); - if (newerVersionExists(onlineVersion)) + if (isNewerVersion(onlineVersion)) { - const int rv = wxMessageBox(_("A newer version of FreeFileSync is available:") + L" v" + onlineVersion + L". " + _("Download now?"), - _("Information"), - wxYES_NO | wxICON_QUESTION, - parent); - if (rv == wxYES) - wxLaunchDefaultBrowser(wxString(L"http://sourceforge.net/projects/freefilesync/files/freefilesync/v") + onlineVersion + L"/"); + if (showQuestionDlg(parent, ReturnQuestionDlg::BUTTON_YES | ReturnQuestionDlg::BUTTON_CANCEL, + _("A newer version of FreeFileSync is available:") + L" " + onlineVersion + L"\n\n" + _("Download now?")) == ReturnQuestionDlg::BUTTON_YES) + wxLaunchDefaultBrowser(L"http://sourceforge.net/projects/freefilesync/files/freefilesync/v" + onlineVersion + L"/"); } } } diff --git a/ui/custom_grid.cpp b/ui/custom_grid.cpp index fdb72161..d6180dd0 100644 --- a/ui/custom_grid.cpp +++ b/ui/custom_grid.cpp @@ -9,6 +9,7 @@ #include <wx/settings.h> #include <zen/i18n.h> #include <zen/file_error.h> +#include <zen/basic_math.h> #include <wx+/tooltip.h> #include <wx+/format_unit.h> #include <wx+/string_conv.h> @@ -195,7 +196,44 @@ protected: dc.GradientFillLinear(rect, getColorSelectionGradientFrom(), getColorSelectionGradientTo(), wxEAST); //ignore focus else - clearArea(dc, rect, getBackGroundColor(row)); + { + //alternate background color to improve readability (while lacking cell borders) + if (getRowDisplayType(row) == DISP_TYPE_NORMAL && row % 2 == 0) + { + //accessibility, support high-contrast schemes => work with user-defined background color! + const auto backCol = getBackGroundColor(row); + + auto colorDist = [](const wxColor& lhs, const wxColor& rhs) //just some metric + { + return numeric::power<2>(static_cast<int>(lhs.Red ()) - static_cast<int>(rhs.Red ())) + + numeric::power<2>(static_cast<int>(lhs.Green()) - static_cast<int>(rhs.Green())) + + numeric::power<2>(static_cast<int>(lhs.Blue ()) - static_cast<int>(rhs.Blue ())); + }; + + const int levelDiff = 20; + const int level = colorDist(backCol, *wxBLACK) < colorDist(backCol, *wxWHITE) ? + levelDiff : -levelDiff; //brighten or darken + + auto incChannel = [level](unsigned char c) { return static_cast<unsigned char>(std::max(0, std::min(255, c + level))); }; + + const wxColor backColAlt(incChannel(backCol.Red ()), + incChannel(backCol.Green()), + incChannel(backCol.Blue ())); + + //clearArea(dc, rect, backColAlt); + + //add some nice background gradient + wxRect rectUpper = rect; + rectUpper.height /= 2; + wxRect rectLower = rect; + rectLower.y += rectUpper.height; + rectLower.height -= rectUpper.height; + dc.GradientFillLinear(rectUpper, backColAlt, getBackGroundColor(row), wxSOUTH); + dc.GradientFillLinear(rectLower, backColAlt, getBackGroundColor(row), wxNORTH); + } + else + clearArea(dc, rect, getBackGroundColor(row)); + } } else clearArea(dc, rect, wxSystemSettings::GetColour(wxSYS_COLOUR_BTNFACE)); @@ -203,41 +241,71 @@ protected: wxColor getBackGroundColor(size_t row) const { - wxColor backGroundCol = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW); + //accessibility: always set both foreground AND background colors! + // => harmonize with renderCell()! - if (const FileSystemObject* fsObj = getRawData(row)) + switch (getRowDisplayType(row)) { - //mark filtered rows - if (!fsObj->isActive()) + case DISP_TYPE_NORMAL: + break; + case DISP_TYPE_FOLDER: + return COLOR_GREY; + case DISP_TYPE_SYMLINK: + return COLOR_ORANGE; + case DISP_TYPE_INACTIVE: return COLOR_NOT_ACTIVE; - else if (!fsObj->isEmpty<side>()) //always show not existing files/dirs/symlinks as empty - { - //mark directories and symlinks - struct GetRowColor : public FSObjectVisitor - { - GetRowColor(wxColour& background) : background_(background) {} - virtual void visit(const FileMapping& fileObj) {} - virtual void visit(const SymLinkMapping& linkObj) - { - background_ = COLOR_ORANGE; - } - virtual void visit(const DirMapping& dirObj) - { - background_ = COLOR_GREY; - } - private: - wxColour& background_; - } getCol(backGroundCol); - fsObj->accept(getCol); - } } - return backGroundCol; + return wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW); } const FileSystemObject* getRawData(size_t row) const { return gridDataView_ ? gridDataView_->getObject(row) : nullptr; } private: + enum DisplayType + { + DISP_TYPE_NORMAL, + DISP_TYPE_FOLDER, + DISP_TYPE_SYMLINK, + DISP_TYPE_INACTIVE, + }; + + + DisplayType getRowDisplayType(size_t row) const + { + const FileSystemObject* fsObj = getRawData(row); + if (!fsObj ) + return DISP_TYPE_NORMAL; + + //mark filtered rows + if (!fsObj->isActive()) + return DISP_TYPE_INACTIVE; + + if (fsObj->isEmpty<side>()) //always show not existing files/dirs/symlinks as empty + return DISP_TYPE_NORMAL; + + DisplayType output = DISP_TYPE_NORMAL; + //mark directories and symlinks + struct GetRowType : public FSObjectVisitor + { + GetRowType(DisplayType& result) : result_(result) {} + + virtual void visit(const FileMapping& fileObj) {} + virtual void visit(const SymLinkMapping& linkObj) + { + result_ = DISP_TYPE_SYMLINK; + } + virtual void visit(const DirMapping& dirObj) + { + result_ = DISP_TYPE_FOLDER; + } + private: + DisplayType& result_; + } getType(output); + fsObj->accept(getType); + return output; + } + virtual size_t getRowCount() const { if (gridDataView_) @@ -265,7 +333,7 @@ private: switch (colType_) { case COL_TYPE_FULL_PATH: - value = toWx(beforeLast(fileObj.getFullName<side>(), FILE_NAME_SEPARATOR)); + value = toWx(appendSeparator(beforeLast(fileObj.getBaseDirPf<side>() + fileObj.getObjRelativeName(), FILE_NAME_SEPARATOR))); break; case COL_TYPE_FILENAME: //filename value = toWx(fileObj.getShortName<side>()); @@ -278,7 +346,7 @@ private: break; case COL_TYPE_SIZE: //file size if (!fsObj_.isEmpty<side>()) - value = zen::toStringSep(fileObj.getFileSize<side>()); + value = zen::toGuiString(fileObj.getFileSize<side>()); break; case COL_TYPE_DATE: //date if (!fsObj_.isEmpty<side>()) @@ -295,7 +363,7 @@ private: switch (colType_) { case COL_TYPE_FULL_PATH: - value = toWx(beforeLast(linkObj.getFullName<side>(), FILE_NAME_SEPARATOR)); + value = toWx(appendSeparator(beforeLast(linkObj.getBaseDirPf<side>() + linkObj.getObjRelativeName(), FILE_NAME_SEPARATOR))); break; case COL_TYPE_FILENAME: //filename value = toWx(linkObj.getShortName<side>()); @@ -325,7 +393,7 @@ private: switch (colType_) { case COL_TYPE_FULL_PATH: - value = toWx(dirObj.getFullName<side>()); + value = toWx(appendSeparator(beforeLast(dirObj.getBaseDirPf<side>() + dirObj.getObjRelativeName(), FILE_NAME_SEPARATOR))); break; case COL_TYPE_FILENAME: value = toWx(dirObj.getShortName<side>()); @@ -338,7 +406,7 @@ private: break; case COL_TYPE_SIZE: //file size if (!fsObj_.isEmpty<side>()) - value = _("<Directory>"); + value = _("<Folder>"); break; case COL_TYPE_DATE: //date if (!fsObj_.isEmpty<side>()) @@ -366,7 +434,18 @@ private: virtual void renderCell(Grid& grid, wxDC& dc, const wxRect& rect, size_t row, ColumnType colType) { - wxRect rectTmp = drawCellBorder(dc, rect); + wxRect rectTmp = rect; + + //draw horizontal border if required + auto dispTp = getRowDisplayType(row); + if (dispTp == getRowDisplayType(row + 1) && dispTp != DISP_TYPE_NORMAL) + { + const wxColor colorGridLine = wxColour(192, 192, 192); //light grey + wxDCPenChanger dummy2(dc, wxPen(colorGridLine, 1, wxSOLID)); + dc.DrawLine(rect.GetBottomLeft(), rect.GetBottomRight() + wxPoint(1, 0)); + rectTmp.height -= 1; + } + //wxRect rectTmp = drawCellBorder(dc, rect); const bool isActive = [&]() -> bool { @@ -436,6 +515,10 @@ private: rectTmp.width -= iconSize; } + std::unique_ptr<wxDCTextColourChanger> dummy3; + if (getRowDisplayType(row) != DISP_TYPE_NORMAL) + dummy3 = make_unique<wxDCTextColourChanger>(dc, *wxBLACK); //accessibility: always set both foreground AND background colors! + //draw text if (static_cast<ColumnTypeRim>(colType) == COL_TYPE_SIZE && grid.GetLayoutDirection() != wxLayout_RightToLeft) { @@ -462,9 +545,9 @@ private: if (static_cast<ColumnTypeRim>(colType) == COL_TYPE_FILENAME && iconMgr_) bestSize += CELL_BORDER + iconMgr_->iconBuffer.getSize(); - bestSize += CELL_BORDER + dc.GetTextExtent(getValue(row, colType)).GetWidth(); + bestSize += CELL_BORDER + dc.GetTextExtent(getValue(row, colType)).GetWidth() + CELL_BORDER; - return bestSize + CELL_BORDER + 1; //add additional right border + 1 pix for border line + return bestSize; // + 1 pix for cell border line -> not used anymore! } virtual wxString getColumnLabel(ColumnType colType) const @@ -478,7 +561,7 @@ private: case COL_TYPE_REL_PATH: return _("Relative path"); case COL_TYPE_DIRECTORY: - return _("Directory"); + return _("Base folder"); case COL_TYPE_SIZE: return _("Size"); case COL_TYPE_DATE: @@ -682,7 +765,7 @@ public: GridDataMiddle(const std::shared_ptr<const zen::GridView>& gridDataView, Grid& grid) : GridDataBase(grid), gridDataView_(gridDataView), - syncPreviewActive(true) {} + showSyncAction_(true) {} void onSelectBegin(const wxPoint& clientPos, size_t row, ColumnType colType) { @@ -775,7 +858,7 @@ public: toolTip.hide(); //handle custom tooltip } - void setSyncPreviewActive(bool value) { syncPreviewActive = value; } + void showSyncAction(bool value) { showSyncAction_ = value; } private: virtual size_t getRowCount() const { return 0; /*if there are multiple grid components, only the first one will be polled for row count!*/ } @@ -785,7 +868,7 @@ private: if (static_cast<ColumnTypeMiddle>(colType) == COL_TYPE_MIDDLE_VALUE) { if (const FileSystemObject* fsObj = getRawData(row)) - return syncPreviewActive ? getSymbol(fsObj->getSyncOperation()) : getSymbol(fsObj->getCategory()); + return showSyncAction_ ? getSymbol(fsObj->getSyncOperation()) : getSymbol(fsObj->getCategory()); } return wxEmptyString; } @@ -802,10 +885,10 @@ private: { case COL_TYPE_MIDDLE_VALUE: { - wxRect rectInside = drawCellBorder(dc, rect); - if (const FileSystemObject* fsObj = getRawData(row)) { + wxRect rectInside = drawCellBorder(dc, rect); + //draw checkbox wxRect checkBoxArea = rectInside; checkBoxArea.SetWidth(CHECK_BOX_WIDTH); @@ -822,7 +905,7 @@ private: rectInside.x += CHECK_BOX_WIDTH; //synchronization preview - if (syncPreviewActive) + if (showSyncAction_) { if (rowHighlighted && highlightBlock != BLOCKPOS_CHECK_BOX) switch (highlightBlock) @@ -864,7 +947,7 @@ private: wxRect rectInside = drawColumnLabelBorder(dc, rect); drawColumnLabelBackground(dc, rectInside, highlighted); - if (syncPreviewActive) + if (showSyncAction_) dc.DrawLabel(wxEmptyString, GlobalResources::getImage(L"syncSmall"), rectInside, wxALIGN_CENTER_HORIZONTAL | wxALIGN_CENTER_VERTICAL); else dc.DrawLabel(wxEmptyString, GlobalResources::getImage(L"compareSmall"), rectInside, wxALIGN_CENTER_HORIZONTAL | wxALIGN_CENTER_VERTICAL); @@ -887,7 +970,7 @@ private: return COLOR_NOT_ACTIVE; else { - if (syncPreviewActive) //synchronization preview + if (showSyncAction_) //synchronization preview { switch (fsObj->getSyncOperation()) //evaluate comparison result and sync direction { @@ -959,7 +1042,7 @@ private: if (rect.width > CHECK_BOX_WIDTH && rect.height > 0) { const FileSystemObject* const fsObj = getRawData(row); - if (fsObj && syncPreviewActive && + if (fsObj && showSyncAction_ && fsObj->getSyncOperation() != SO_EQUAL) //in sync-preview equal files shall be treated as in cmp result, i.e. as full checkbox { // cell: @@ -987,7 +1070,7 @@ private: { if (const FileSystemObject* fsObj = getRawData(row)) { - if (syncPreviewActive) //synchronization preview + if (showSyncAction_) //synchronization preview { const wchar_t* imageName = [&]() -> const wchar_t* { @@ -1066,10 +1149,10 @@ private: toolTip.hide(); //if invalid row... } - virtual wxString getToolTip(ColumnType colType) const { return syncPreviewActive ? _("Synchronization Preview") : _("Comparison Result"); } + virtual wxString getToolTip(ColumnType colType) const { return showSyncAction_ ? _("Action") : _("Category"); } std::shared_ptr<const zen::GridView> gridDataView_; - bool syncPreviewActive; + bool showSyncAction_; std::unique_ptr<std::pair<size_t, BlockPosition>> highlight; //(row, block) current mouse highlight std::unique_ptr<std::pair<size_t, BlockPosition>> dragSelection; //(row, block) std::unique_ptr<wxBitmap> buffer; //avoid costs of recreating this temporal variable @@ -1354,10 +1437,10 @@ void gridview::setNavigationMarker(Grid& grid, } -void gridview::setSyncPreviewActive(Grid& grid, bool value) +void gridview::showSyncAction(Grid& grid, bool value) { if (auto* provMiddle = dynamic_cast<GridDataMiddle*>(grid.getDataProvider(gridview::COMP_MIDDLE))) - provMiddle->setSyncPreviewActive(value); + provMiddle->showSyncAction(value); else assert(false); } diff --git a/ui/custom_grid.h b/ui/custom_grid.h index 8993777b..58a421e6 100644 --- a/ui/custom_grid.h +++ b/ui/custom_grid.h @@ -26,7 +26,7 @@ void init(Grid& grid, const std::shared_ptr<const GridView>& gridDataView); std::vector<Grid::ColumnAttribute> convertConfig(const std::vector<ColumnAttributeRim>& attribs); //+ make consistent std::vector<ColumnAttributeRim> convertConfig(const std::vector<Grid::ColumnAttribute>& attribs); // -void setSyncPreviewActive(Grid& grid, bool value); +void showSyncAction(Grid& grid, bool value); void setupIcons(Grid& grid, bool show, IconBuffer::IconSize sz); diff --git a/ui/dir_name.cpp b/ui/dir_name.cpp index cf43accf..fcab49ca 100644 --- a/ui/dir_name.cpp +++ b/ui/dir_name.cpp @@ -126,7 +126,7 @@ void DirectoryName<NameControl>::OnFilesDropped(FileDropEvent& event) setDirectoryName(fileName, &dirName_, &dirPicker_, dirName_, staticText_); else { - wxString parentName = beforeLast(fileName, utf8CvrtTo<wxString>(FILE_NAME_SEPARATOR)); //returns empty string if ch not found + wxString parentName = beforeLast(fileName, utfCvrtTo<wxString>(FILE_NAME_SEPARATOR)); //returns empty string if ch not found #ifdef FFS_WIN if (endsWith(parentName, L":")) //volume name parentName += FILE_NAME_SEPARATOR; diff --git a/ui/exec_finished_box.cpp b/ui/exec_finished_box.cpp index edc57d58..e776c673 100644 --- a/ui/exec_finished_box.cpp +++ b/ui/exec_finished_box.cpp @@ -31,24 +31,24 @@ std::vector<std::pair<std::wstring, std::wstring>> getDefaultCommands() //(gui n #ifdef FFS_WIN if (zen::vistaOrLater()) { - addEntry(_("Shut down"), L"shutdown /s /t 60"); - addEntry(_("Log off" ), L"shutdown /l"); addEntry(_("Standby" ), L"rundll32.exe powrprof.dll,SetSuspendState Sleep"); //suspend/Suspend to RAM/sleep + addEntry(_("Log off" ), L"shutdown /l"); + addEntry(_("Shut down"), L"shutdown /s /t 60"); //addEntry(_("Hibernate"), L"shutdown /h"); //Suspend to disk -> Standby is better anyway } else //XP { - addEntry(_("Shut down"), L"shutdown -s -t 60"); + addEntry(_("Standby"), L"rundll32.exe powrprof.dll,SetSuspendState"); //this triggers standby OR hibernate, depending on whether hibernate setting is active! addEntry(_("Log off" ), L"shutdown -l"); + addEntry(_("Shut down"), L"shutdown -s -t 60"); //no suspend on XP? - addEntry(_("Standby"), L"rundll32.exe powrprof.dll,SetSuspendState"); //this triggers standby OR hibernate, depending on whether hibernate setting is active! } #elif defined FFS_LINUX + addEntry(_("Standby" ), L"sudo pm-suspend"); + addEntry(_("Log off" ), L"gnome-session-quit"); //alternative requiring admin: sudo killall Xorg addEntry(_("Shut down"), L"dbus-send --print-reply --dest=org.gnome.SessionManager /org/gnome/SessionManager org.gnome.SessionManager.RequestShutdown"); //alternative requiring admin: sudo shutdown -h 1 - addEntry(_("Log off" ), L"gnome-session-quit"); //alternative requiring admin: sudo killall Xorg - addEntry(_("Standby" ), L"sudo pm-suspend"); //addEntry(_("Hibernate"), L"sudo pm-hibernate"); //alternative: "pmi action suspend" and "pmi action hibernate", require "sudo apt-get install powermanagement-interaface" diff --git a/ui/folder_history_box.cpp b/ui/folder_history_box.cpp index 72204c3a..d30ada64 100644 --- a/ui/folder_history_box.cpp +++ b/ui/folder_history_box.cpp @@ -148,10 +148,11 @@ void FolderHistoryBox::OnMouseWheel(wxMouseEvent& event) wxWindow* wnd = this; while ((wnd = wnd->GetParent()) != nullptr) //silence MSVC warning if (dynamic_cast<wxScrolledWindow*>(wnd) != nullptr) - { - wnd->GetEventHandler()->AddPendingEvent(event); - break; - } + if (wxEvtHandler* evtHandler = wnd->GetEventHandler()) + { + evtHandler->AddPendingEvent(event); + break; + } // event.Skip(); } diff --git a/ui/folder_pair.h b/ui/folder_pair.h index d80d8a05..3dadc07c 100644 --- a/ui/folder_pair.h +++ b/ui/folder_pair.h @@ -18,6 +18,7 @@ #include <wx+/string_conv.h> #include "../lib/norm_filter.h" #include <wx+/button.h> +#include <wx+/image_tools.h> namespace zen { @@ -46,38 +47,38 @@ public: { if (altCompConfig.get()) { - setImage(*basicPanel_.m_bpButtonAltCompCfg, GlobalResources::getImage(wxT("cmpConfigSmall"))); + setImage(*basicPanel_.m_bpButtonAltCompCfg, GlobalResources::getImage(L"cmpConfigSmall")); basicPanel_.m_bpButtonAltCompCfg->SetToolTip(wxString(_("Select alternate comparison settings")) + wxT(" \n") + wxT("(") + getVariantName(altCompConfig->compareVar) + wxT(")")); } else { - setImage(*basicPanel_.m_bpButtonAltCompCfg, GlobalResources::getImage(wxT("cmpConfigSmallGrey"))); + setImage(*basicPanel_.m_bpButtonAltCompCfg, greyScale(GlobalResources::getImage(L"cmpConfigSmall"))); basicPanel_.m_bpButtonAltCompCfg->SetToolTip(_("Select alternate comparison settings")); } if (altSyncConfig.get()) { - setImage(*basicPanel_.m_bpButtonAltSyncCfg, GlobalResources::getImage(wxT("syncConfigSmall"))); + setImage(*basicPanel_.m_bpButtonAltSyncCfg, GlobalResources::getImage(L"syncConfigSmall")); basicPanel_.m_bpButtonAltSyncCfg->SetToolTip(wxString(_("Select alternate synchronization settings")) + wxT(" \n") + wxT("(") + getVariantName(altSyncConfig->directionCfg.var) + wxT(")")); } else { - setImage(*basicPanel_.m_bpButtonAltSyncCfg, GlobalResources::getImage(wxT("syncConfigSmallGrey"))); + setImage(*basicPanel_.m_bpButtonAltSyncCfg, greyScale(GlobalResources::getImage(L"syncConfigSmall"))); basicPanel_.m_bpButtonAltSyncCfg->SetToolTip(_("Select alternate synchronization settings")); } //test for Null-filter - if (isNullFilter(localFilter)) + if (!isNullFilter(localFilter)) { - setImage(*basicPanel_.m_bpButtonLocalFilter, GlobalResources::getImage(L"filterOffSmall")); - basicPanel_.m_bpButtonLocalFilter->SetToolTip(_("No filter selected")); + setImage(*basicPanel_.m_bpButtonLocalFilter, GlobalResources::getImage(L"filterSmall")); + basicPanel_.m_bpButtonLocalFilter->SetToolTip(_("Filter is active")); } else { - setImage(*basicPanel_.m_bpButtonLocalFilter, GlobalResources::getImage(L"filterOnSmall")); - basicPanel_.m_bpButtonLocalFilter->SetToolTip(_("Filter is active")); + setImage(*basicPanel_.m_bpButtonLocalFilter, greyScale(GlobalResources::getImage(L"filterSmall"))); + basicPanel_.m_bpButtonLocalFilter->SetToolTip(_("No filter selected")); } } diff --git a/ui/grid_view.cpp b/ui/grid_view.cpp index 80ff895c..2162394f 100644 --- a/ui/grid_view.cpp +++ b/ui/grid_view.cpp @@ -71,13 +71,14 @@ void GridView::updateView(Predicate pred) if (pred(*fsObj)) { //save row position for direct random access to FileMapping or DirMapping - rowPositions.insert(std::make_pair(ref.objId, viewRef.size())); //costs: 0.28 µs per call - MSVC based on std::set + this->rowPositions.insert(std::make_pair(ref.objId, viewRef.size())); //costs: 0.28 µs per call - MSVC based on std::set + //"this->" required by two-pass lookup as enforced by GCC 4.7 //save row position to identify first child *on sorted subview* of DirMapping or BaseDirMapping in case latter are filtered out const HierarchyObject* parent = &(fsObj->parent()); for (;;) //map all yet unassociated parents to this row { - const auto rv = rowPositionsFirstChild.insert(std::make_pair(parent, viewRef.size())); + const auto rv = this->rowPositionsFirstChild.insert(std::make_pair(parent, viewRef.size())); if (!rv.second) break; @@ -88,7 +89,7 @@ void GridView::updateView(Predicate pred) } //build subview - viewRef.push_back(ref.objId); + this->viewRef.push_back(ref.objId); } }); } diff --git a/ui/gui_generated.cpp b/ui/gui_generated.cpp index 4c42caf1..c59028c2 100644 --- a/ui/gui_generated.cpp +++ b/ui/gui_generated.cpp @@ -23,7 +23,7 @@ MainDialogGenerated::MainDialogGenerated( wxWindow* parent, wxWindowID id, const #endif m_menuFile->Append( m_menuItem10 ); - m_menuItem11 = new wxMenuItem( m_menuFile, wxID_ANY, wxString( _("2. &Synchronize...") ) + wxT('\t') + wxT("F6"), wxEmptyString, wxITEM_NORMAL ); + m_menuItem11 = new wxMenuItem( m_menuFile, wxID_ANY, wxString( _("2. &Synchronize") ) + wxT('\t') + wxT("F6"), wxEmptyString, wxITEM_NORMAL ); #ifdef __WXMSW__ m_menuItem11->SetBitmaps( wxNullBitmap ); #elif defined( __WXGTK__ ) @@ -33,7 +33,7 @@ MainDialogGenerated::MainDialogGenerated( wxWindow* parent, wxWindowID id, const m_menuFile->AppendSeparator(); - m_menuItemNew = new wxMenuItem( m_menuFile, wxID_ANY, wxString( _("&New") ) + wxT('\t') + wxT("Ctrl+N"), wxEmptyString, wxITEM_NORMAL ); + m_menuItemNew = new wxMenuItem( m_menuFile, wxID_NEW, wxString( _("&New") ) + wxT('\t') + wxT("Ctrl+N"), wxEmptyString, wxITEM_NORMAL ); #ifdef __WXMSW__ m_menuItemNew->SetBitmaps( wxNullBitmap ); #elif defined( __WXGTK__ ) @@ -41,16 +41,16 @@ MainDialogGenerated::MainDialogGenerated( wxWindow* parent, wxWindowID id, const #endif m_menuFile->Append( m_menuItemNew ); - m_menuItemSave = new wxMenuItem( m_menuFile, wxID_ANY, wxString( _("S&ave configuration...") ) + wxT('\t') + wxT("Ctrl+S"), wxEmptyString, wxITEM_NORMAL ); - m_menuFile->Append( m_menuItemSave ); - - m_menuItemLoad = new wxMenuItem( m_menuFile, wxID_ANY, wxString( _("&Load configuration...") ) + wxT('\t') + wxT("Ctrl+O"), wxEmptyString, wxITEM_NORMAL ); + m_menuItemLoad = new wxMenuItem( m_menuFile, wxID_OPEN, wxString( _("&Open...") ) + wxT('\t') + wxT("Ctrl+O"), wxEmptyString, wxITEM_NORMAL ); m_menuFile->Append( m_menuItemLoad ); + m_menuItemSave = new wxMenuItem( m_menuFile, wxID_SAVE, wxString( _("&Save...") ) + wxT('\t') + wxT("Ctrl+S"), wxEmptyString, wxITEM_NORMAL ); + m_menuFile->Append( m_menuItemSave ); + m_menuFile->AppendSeparator(); wxMenuItem* m_menuItem4; - m_menuItem4 = new wxMenuItem( m_menuFile, wxID_EXIT, wxString( _("&Quit") ) + wxT('\t') + wxT("Ctrl+Q"), wxEmptyString, wxITEM_NORMAL ); + m_menuItem4 = new wxMenuItem( m_menuFile, wxID_EXIT, wxString( _("&Quit") ) , wxEmptyString, wxITEM_NORMAL ); m_menuFile->Append( m_menuItem4 ); m_menubar1->Append( m_menuFile, _("&Program") ); @@ -82,7 +82,7 @@ MainDialogGenerated::MainDialogGenerated( wxWindow* parent, wxWindowID id, const m_menuHelp->AppendSeparator(); - m_menuItemAbout = new wxMenuItem( m_menuHelp, wxID_ABOUT, wxString( _("&About...") ) + wxT('\t') + wxT("Shift+F1"), wxEmptyString, wxITEM_NORMAL ); + m_menuItemAbout = new wxMenuItem( m_menuHelp, wxID_ABOUT, wxString( _("&About") ) + wxT('\t') + wxT("Shift+F1"), wxEmptyString, wxITEM_NORMAL ); m_menuHelp->Append( m_menuItemAbout ); m_menubar1->Append( m_menuHelp, _("&Help") ); @@ -172,7 +172,7 @@ MainDialogGenerated::MainDialogGenerated( wxWindow* parent, wxWindowID id, const fgSizer12->Add( m_bpButtonSyncConfig, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 3 ); - m_buttonStartSync = new zen::BitmapButton( m_panelTopButtons, wxID_ANY, _("Synchronize..."), wxDefaultPosition, wxSize( 180,42 ), 0 ); + m_buttonStartSync = new zen::BitmapButton( m_panelTopButtons, wxID_ANY, _("Synchronize"), wxDefaultPosition, wxSize( 180,42 ), 0 ); m_buttonStartSync->SetFont( wxFont( 14, 74, 90, 92, false, wxEmptyString ) ); m_buttonStartSync->SetToolTip( _("Start synchronization") ); @@ -352,9 +352,152 @@ MainDialogGenerated::MainDialogGenerated( wxWindow* parent, wxWindowID id, const m_gridNavi->SetScrollRate( 5, 5 ); bSizerPanelHolder->Add( m_gridNavi, 1, wxEXPAND, 5 ); - m_gridMain = new zen::Grid( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL ); + m_panelCenter = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + wxBoxSizer* bSizer1711; + bSizer1711 = new wxBoxSizer( wxVERTICAL ); + + m_gridMain = new zen::Grid( m_panelCenter, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL ); m_gridMain->SetScrollRate( 5, 5 ); - bSizerPanelHolder->Add( m_gridMain, 1, wxEXPAND, 5 ); + bSizer1711->Add( m_gridMain, 1, wxEXPAND, 5 ); + + m_panelStatusBar = new wxPanel( m_panelCenter, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSTATIC_BORDER|wxTAB_TRAVERSAL ); + wxBoxSizer* bSizer451; + bSizer451 = new wxBoxSizer( wxHORIZONTAL ); + + bSizer451->SetMinSize( wxSize( -1,22 ) ); + wxBoxSizer* bSizer53; + bSizer53 = new wxBoxSizer( wxHORIZONTAL ); + + + bSizer53->Add( 0, 0, 1, wxALIGN_CENTER_VERTICAL, 5 ); + + bSizerStatusLeftDirectories = new wxBoxSizer( wxHORIZONTAL ); + + m_bitmapSmallDirectoryLeft = new wxStaticBitmap( m_panelStatusBar, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + bSizerStatusLeftDirectories->Add( m_bitmapSmallDirectoryLeft, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + + bSizerStatusLeftDirectories->Add( 2, 0, 0, 0, 5 ); + + m_staticTextStatusLeftDirs = new wxStaticText( m_panelStatusBar, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextStatusLeftDirs->Wrap( -1 ); + bSizerStatusLeftDirectories->Add( m_staticTextStatusLeftDirs, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); + + + bSizer53->Add( bSizerStatusLeftDirectories, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + bSizerStatusLeftFiles = new wxBoxSizer( wxHORIZONTAL ); + + + bSizerStatusLeftFiles->Add( 10, 0, 0, 0, 5 ); + + m_bitmapSmallFileLeft = new wxStaticBitmap( m_panelStatusBar, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + bSizerStatusLeftFiles->Add( m_bitmapSmallFileLeft, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + + bSizerStatusLeftFiles->Add( 2, 0, 0, 0, 5 ); + + m_staticTextStatusLeftFiles = new wxStaticText( m_panelStatusBar, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextStatusLeftFiles->Wrap( -1 ); + bSizerStatusLeftFiles->Add( m_staticTextStatusLeftFiles, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + + bSizerStatusLeftFiles->Add( 10, 0, 0, 0, 5 ); + + m_staticTextStatusLeftBytes = new wxStaticText( m_panelStatusBar, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextStatusLeftBytes->Wrap( -1 ); + bSizerStatusLeftFiles->Add( m_staticTextStatusLeftBytes, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + + bSizer53->Add( bSizerStatusLeftFiles, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + + bSizer53->Add( 0, 0, 1, wxALIGN_CENTER_VERTICAL, 5 ); + + + bSizer451->Add( bSizer53, 1, wxALIGN_BOTTOM|wxEXPAND, 5 ); + + m_staticline9 = new wxStaticLine( m_panelStatusBar, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL ); + bSizer451->Add( m_staticline9, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxEXPAND, 2 ); + + + bSizer451->Add( 26, 0, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + m_staticTextStatusMiddle = new wxStaticText( m_panelStatusBar, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextStatusMiddle->Wrap( -1 ); + m_staticTextStatusMiddle->SetFont( wxFont( 8, 70, 90, 92, false, wxEmptyString ) ); + + bSizer451->Add( m_staticTextStatusMiddle, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + + bSizer451->Add( 26, 0, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + m_staticline10 = new wxStaticLine( m_panelStatusBar, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL ); + bSizer451->Add( m_staticline10, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP, 2 ); + + wxBoxSizer* bSizer52; + bSizer52 = new wxBoxSizer( wxHORIZONTAL ); + + + bSizer52->Add( 0, 0, 1, wxALIGN_CENTER_VERTICAL, 5 ); + + bSizerStatusRightDirectories = new wxBoxSizer( wxHORIZONTAL ); + + m_bitmapSmallDirectoryRight = new wxStaticBitmap( m_panelStatusBar, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + bSizerStatusRightDirectories->Add( m_bitmapSmallDirectoryRight, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + + bSizerStatusRightDirectories->Add( 2, 0, 0, 0, 5 ); + + m_staticTextStatusRightDirs = new wxStaticText( m_panelStatusBar, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextStatusRightDirs->Wrap( -1 ); + bSizerStatusRightDirectories->Add( m_staticTextStatusRightDirs, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + + bSizer52->Add( bSizerStatusRightDirectories, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + bSizerStatusRightFiles = new wxBoxSizer( wxHORIZONTAL ); + + + bSizerStatusRightFiles->Add( 10, 0, 0, 0, 5 ); + + m_bitmapSmallFileRight = new wxStaticBitmap( m_panelStatusBar, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + bSizerStatusRightFiles->Add( m_bitmapSmallFileRight, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + + bSizerStatusRightFiles->Add( 2, 0, 0, 0, 5 ); + + m_staticTextStatusRightFiles = new wxStaticText( m_panelStatusBar, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextStatusRightFiles->Wrap( -1 ); + bSizerStatusRightFiles->Add( m_staticTextStatusRightFiles, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + + bSizerStatusRightFiles->Add( 10, 0, 0, 0, 5 ); + + m_staticTextStatusRightBytes = new wxStaticText( m_panelStatusBar, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextStatusRightBytes->Wrap( -1 ); + bSizerStatusRightFiles->Add( m_staticTextStatusRightBytes, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + + bSizer52->Add( bSizerStatusRightFiles, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + + bSizer52->Add( 0, 0, 1, wxALIGN_CENTER_VERTICAL, 5 ); + + + bSizer451->Add( bSizer52, 1, wxALIGN_BOTTOM|wxEXPAND, 5 ); + + + m_panelStatusBar->SetSizer( bSizer451 ); + m_panelStatusBar->Layout(); + bSizer451->Fit( m_panelStatusBar ); + bSizer1711->Add( m_panelStatusBar, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); + + + m_panelCenter->SetSizer( bSizer1711 ); + m_panelCenter->Layout(); + bSizer1711->Fit( m_panelCenter ); + bSizerPanelHolder->Add( m_panelCenter, 1, wxEXPAND, 5 ); m_panelConfig = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); bSizerConfig = new wxBoxSizer( wxHORIZONTAL ); @@ -362,16 +505,16 @@ MainDialogGenerated::MainDialogGenerated( wxWindow* parent, wxWindowID id, const wxBoxSizer* bSizer151; bSizer151 = new wxBoxSizer( wxHORIZONTAL ); - m_bpButtonSave = new wxBitmapButton( m_panelConfig, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW ); - m_bpButtonSave->SetToolTip( _("Save current configuration to file") ); - - bSizer151->Add( m_bpButtonSave, 0, wxALIGN_CENTER_VERTICAL, 5 ); - m_bpButtonLoad = new wxBitmapButton( m_panelConfig, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW ); m_bpButtonLoad->SetToolTip( _("Load configuration from file") ); bSizer151->Add( m_bpButtonLoad, 0, wxALIGN_CENTER_VERTICAL, 5 ); + m_bpButtonSave = new wxBitmapButton( m_panelConfig, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW ); + m_bpButtonSave->SetToolTip( _("Save current configuration to file") ); + + bSizer151->Add( m_bpButtonSave, 0, wxALIGN_CENTER_VERTICAL, 5 ); + bSizerConfig->Add( bSizer151, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); @@ -406,278 +549,280 @@ MainDialogGenerated::MainDialogGenerated( wxWindow* parent, wxWindowID id, const bSizerPanelHolder->Add( m_panelFilter, 0, 0, 5 ); m_panelStatistics = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + bSizer1801 = new wxBoxSizer( wxHORIZONTAL ); + + + bSizer1801->Add( 0, 0, 1, wxEXPAND, 5 ); + bSizerStatistics = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer1712; + bSizer1712 = new wxBoxSizer( wxVERTICAL ); - bSizerStatistics->Add( 0, 0, 1, wxEXPAND, 5 ); - wxFlexGridSizer* fgSizer5; - fgSizer5 = new wxFlexGridSizer( 2, 2, 0, 5 ); - fgSizer5->SetFlexibleDirection( wxHORIZONTAL ); - fgSizer5->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + bSizer1712->Add( 0, 0, 1, wxEXPAND, 5 ); - m_bitmapCreate = new wxStaticBitmap( m_panelStatistics, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); - m_bitmapCreate->SetToolTip( _("Number of files and directories that will be created") ); + m_bitmapCreateLeft = new wxStaticBitmap( m_panelStatistics, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + m_bitmapCreateLeft->SetToolTip( _("Number of files and folders that will be created") ); - fgSizer5->Add( m_bitmapCreate, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); + bSizer1712->Add( m_bitmapCreateLeft, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); - m_textCtrlCreate = new wxTextCtrl( m_panelStatistics, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 80,-1 ), wxTE_READONLY|wxTE_RIGHT ); - m_textCtrlCreate->SetBackgroundColour( wxColour( 224, 224, 224 ) ); - m_textCtrlCreate->SetToolTip( _("Number of files and directories that will be created") ); - fgSizer5->Add( m_textCtrlCreate, 0, wxALIGN_CENTER_VERTICAL, 5 ); + bSizer1712->Add( 0, 0, 1, wxEXPAND, 5 ); - m_bitmapUpdate = new wxStaticBitmap( m_panelStatistics, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); - m_bitmapUpdate->SetToolTip( _("Number of files that will be overwritten") ); - fgSizer5->Add( m_bitmapUpdate, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); + bSizer1712->Add( 2, 2, 0, 0, 5 ); - m_textCtrlUpdate = new wxTextCtrl( m_panelStatistics, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 80,-1 ), wxTE_READONLY|wxTE_RIGHT ); - m_textCtrlUpdate->SetBackgroundColour( wxColour( 224, 224, 224 ) ); - m_textCtrlUpdate->SetToolTip( _("Number of files that will be overwritten") ); + m_staticTextCreateLeft = new wxStaticText( m_panelStatistics, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextCreateLeft->Wrap( -1 ); + m_staticTextCreateLeft->SetToolTip( _("Number of files and folders that will be created") ); - fgSizer5->Add( m_textCtrlUpdate, 0, wxALIGN_CENTER_VERTICAL, 5 ); + bSizer1712->Add( m_staticTextCreateLeft, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); - bSizerStatistics->Add( fgSizer5, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 ); + bSizerStatistics->Add( bSizer1712, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - wxFlexGridSizer* fgSizer6; - fgSizer6 = new wxFlexGridSizer( 2, 2, 0, 5 ); - fgSizer6->SetFlexibleDirection( wxHORIZONTAL ); - fgSizer6->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - m_bitmapDelete = new wxStaticBitmap( m_panelStatistics, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); - m_bitmapDelete->SetToolTip( _("Number of files and directories that will be deleted") ); + bSizerStatistics->Add( 5, 5, 0, 0, 5 ); - fgSizer6->Add( m_bitmapDelete, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + wxBoxSizer* bSizer172; + bSizer172 = new wxBoxSizer( wxVERTICAL ); - m_textCtrlDelete = new wxTextCtrl( m_panelStatistics, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 80,-1 ), wxTE_READONLY|wxTE_RIGHT ); - m_textCtrlDelete->SetBackgroundColour( wxColour( 224, 224, 224 ) ); - m_textCtrlDelete->SetToolTip( _("Number of files and directories that will be deleted") ); - fgSizer6->Add( m_textCtrlDelete, 0, wxALIGN_CENTER_VERTICAL, 5 ); + bSizer172->Add( 0, 0, 1, wxEXPAND, 5 ); - m_bitmapData = new wxStaticBitmap( m_panelStatistics, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); - m_bitmapData->SetToolTip( _("Total amount of data that will be transferred") ); + m_bitmapUpdateLeft = new wxStaticBitmap( m_panelStatistics, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + m_bitmapUpdateLeft->SetToolTip( _("Number of files that will be overwritten") ); - fgSizer6->Add( m_bitmapData, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); + bSizer172->Add( m_bitmapUpdateLeft, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - m_textCtrlData = new wxTextCtrl( m_panelStatistics, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 80,-1 ), wxTE_READONLY|wxTE_RIGHT ); - m_textCtrlData->SetBackgroundColour( wxColour( 224, 224, 224 ) ); - m_textCtrlData->SetToolTip( _("Total amount of data that will be transferred") ); - fgSizer6->Add( m_textCtrlData, 0, wxALIGN_CENTER_VERTICAL, 5 ); + bSizer172->Add( 0, 0, 1, wxEXPAND, 5 ); - bSizerStatistics->Add( fgSizer6, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 ); + bSizer172->Add( 2, 2, 0, 0, 5 ); + m_staticTextUpdateLeft = new wxStaticText( m_panelStatistics, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextUpdateLeft->Wrap( -1 ); + m_staticTextUpdateLeft->SetToolTip( _("Number of files that will be overwritten") ); - bSizerStatistics->Add( 0, 0, 1, wxEXPAND, 5 ); + bSizer172->Add( m_staticTextUpdateLeft, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); - m_panelStatistics->SetSizer( bSizerStatistics ); - m_panelStatistics->Layout(); - bSizerStatistics->Fit( m_panelStatistics ); - bSizerPanelHolder->Add( m_panelStatistics, 0, wxALIGN_CENTER_VERTICAL, 5 ); + bSizerStatistics->Add( bSizer172, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - m_panelViewFilter = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - bSizerViewFilter = new wxBoxSizer( wxHORIZONTAL ); + bSizerStatistics->Add( 5, 5, 0, 0, 5 ); - bSizerViewFilter->Add( 0, 0, 1, wxEXPAND, 5 ); + wxBoxSizer* bSizer173; + bSizer173 = new wxBoxSizer( wxVERTICAL ); - m_bpButtonSyncCreateLeft = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW ); - bSizerViewFilter->Add( m_bpButtonSyncCreateLeft, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); - m_bpButtonSyncDirOverwLeft = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW ); - bSizerViewFilter->Add( m_bpButtonSyncDirOverwLeft, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); + bSizer173->Add( 0, 0, 1, wxEXPAND, 5 ); - m_bpButtonSyncDeleteLeft = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW ); - bSizerViewFilter->Add( m_bpButtonSyncDeleteLeft, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); + m_bitmapDeleteLeft = new wxStaticBitmap( m_panelStatistics, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + m_bitmapDeleteLeft->SetToolTip( _("Number of files and folders that will be deleted") ); - m_bpButtonLeftOnly = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW ); - bSizerViewFilter->Add( m_bpButtonLeftOnly, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); + bSizer173->Add( m_bitmapDeleteLeft, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - m_bpButtonLeftNewer = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW ); - bSizerViewFilter->Add( m_bpButtonLeftNewer, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); - m_bpButtonEqual = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW ); - bSizerViewFilter->Add( m_bpButtonEqual, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); + bSizer173->Add( 0, 0, 1, wxEXPAND, 5 ); - m_bpButtonDifferent = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW ); - bSizerViewFilter->Add( m_bpButtonDifferent, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); - m_bpButtonSyncDirNone = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW ); - bSizerViewFilter->Add( m_bpButtonSyncDirNone, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); + bSizer173->Add( 2, 2, 0, 0, 5 ); - m_bpButtonRightNewer = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW ); - bSizerViewFilter->Add( m_bpButtonRightNewer, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); + m_staticTextDeleteLeft = new wxStaticText( m_panelStatistics, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextDeleteLeft->Wrap( -1 ); + m_staticTextDeleteLeft->SetToolTip( _("Number of files and folders that will be deleted") ); - m_bpButtonRightOnly = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW ); - bSizerViewFilter->Add( m_bpButtonRightOnly, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); + bSizer173->Add( m_staticTextDeleteLeft, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - m_bpButtonSyncDeleteRight = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW ); - bSizerViewFilter->Add( m_bpButtonSyncDeleteRight, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); - m_bpButtonSyncDirOverwRight = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW ); - bSizerViewFilter->Add( m_bpButtonSyncDirOverwRight, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); + bSizerStatistics->Add( bSizer173, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - m_bpButtonSyncCreateRight = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW ); - bSizerViewFilter->Add( m_bpButtonSyncCreateRight, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); - m_bpButtonConflict = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW ); - bSizerViewFilter->Add( m_bpButtonConflict, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); + bSizerStatistics->Add( 5, 5, 0, 0, 5 ); + bSizerData = new wxBoxSizer( wxVERTICAL ); - bSizerViewFilter->Add( 0, 0, 1, wxEXPAND, 5 ); + bSizerData->Add( 0, 0, 1, wxEXPAND, 5 ); - m_panelViewFilter->SetSizer( bSizerViewFilter ); - m_panelViewFilter->Layout(); - bSizerViewFilter->Fit( m_panelViewFilter ); - bSizerPanelHolder->Add( m_panelViewFilter, 0, wxALIGN_CENTER_VERTICAL, 5 ); + m_bitmapData = new wxStaticBitmap( m_panelStatistics, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + m_bitmapData->SetToolTip( _("Total amount of data that will be transferred") ); - m_panelStatusBar = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSTATIC_BORDER|wxTAB_TRAVERSAL ); - wxBoxSizer* bSizer451; - bSizer451 = new wxBoxSizer( wxHORIZONTAL ); + bSizerData->Add( m_bitmapData, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); - bSizer451->SetMinSize( wxSize( -1,22 ) ); - wxBoxSizer* bSizer53; - bSizer53 = new wxBoxSizer( wxHORIZONTAL ); + bSizerData->Add( 0, 0, 1, wxEXPAND, 5 ); - bSizer53->Add( 0, 0, 1, wxALIGN_CENTER_VERTICAL, 5 ); - bSizerStatusLeftDirectories = new wxBoxSizer( wxHORIZONTAL ); + bSizerData->Add( 2, 2, 0, 0, 5 ); - m_bitmapSmallDirectoryLeft = new wxStaticBitmap( m_panelStatusBar, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); - bSizerStatusLeftDirectories->Add( m_bitmapSmallDirectoryLeft, 0, wxALIGN_CENTER_VERTICAL, 5 ); + m_staticTextData = new wxStaticText( m_panelStatistics, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextData->Wrap( -1 ); + m_staticTextData->SetToolTip( _("Total amount of data that will be transferred") ); + bSizerData->Add( m_staticTextData, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - bSizerStatusLeftDirectories->Add( 2, 0, 0, 0, 5 ); - m_staticTextStatusLeftDirs = new wxStaticText( m_panelStatusBar, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextStatusLeftDirs->Wrap( -1 ); - bSizerStatusLeftDirectories->Add( m_staticTextStatusLeftDirs, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); + bSizerStatistics->Add( bSizerData, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - bSizer53->Add( bSizerStatusLeftDirectories, 0, wxALIGN_CENTER_VERTICAL, 5 ); + bSizerStatistics->Add( 5, 5, 0, 0, 5 ); - bSizerStatusLeftFiles = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer176; + bSizer176 = new wxBoxSizer( wxVERTICAL ); - bSizerStatusLeftFiles->Add( 10, 0, 0, 0, 5 ); + bSizer176->Add( 0, 0, 1, wxEXPAND, 5 ); - m_bitmapSmallFileLeft = new wxStaticBitmap( m_panelStatusBar, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); - bSizerStatusLeftFiles->Add( m_bitmapSmallFileLeft, 0, wxALIGN_CENTER_VERTICAL, 5 ); + m_bitmapDeleteRight = new wxStaticBitmap( m_panelStatistics, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + m_bitmapDeleteRight->SetToolTip( _("Number of files and folders that will be deleted") ); + bSizer176->Add( m_bitmapDeleteRight, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - bSizerStatusLeftFiles->Add( 2, 0, 0, 0, 5 ); - m_staticTextStatusLeftFiles = new wxStaticText( m_panelStatusBar, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextStatusLeftFiles->Wrap( -1 ); - bSizerStatusLeftFiles->Add( m_staticTextStatusLeftFiles, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + bSizer176->Add( 0, 0, 1, wxEXPAND, 5 ); - bSizerStatusLeftFiles->Add( 10, 0, 0, 0, 5 ); + bSizer176->Add( 2, 2, 0, 0, 5 ); - m_staticTextStatusLeftBytes = new wxStaticText( m_panelStatusBar, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextStatusLeftBytes->Wrap( -1 ); - bSizerStatusLeftFiles->Add( m_staticTextStatusLeftBytes, 0, wxALIGN_CENTER_VERTICAL, 5 ); + m_staticTextDeleteRight = new wxStaticText( m_panelStatistics, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextDeleteRight->Wrap( -1 ); + m_staticTextDeleteRight->SetToolTip( _("Number of files and folders that will be deleted") ); + bSizer176->Add( m_staticTextDeleteRight, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - bSizer53->Add( bSizerStatusLeftFiles, 0, wxALIGN_CENTER_VERTICAL, 5 ); + bSizerStatistics->Add( bSizer176, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - bSizer53->Add( 0, 0, 1, wxALIGN_CENTER_VERTICAL, 5 ); + bSizerStatistics->Add( 5, 5, 0, 0, 5 ); - bSizer451->Add( bSizer53, 1, wxALIGN_BOTTOM|wxEXPAND, 5 ); + wxBoxSizer* bSizer177; + bSizer177 = new wxBoxSizer( wxVERTICAL ); - m_staticline9 = new wxStaticLine( m_panelStatusBar, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL ); - bSizer451->Add( m_staticline9, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxEXPAND, 2 ); + bSizer177->Add( 0, 0, 1, wxEXPAND, 5 ); - bSizer451->Add( 26, 0, 0, wxALIGN_CENTER_VERTICAL, 5 ); + m_bitmapUpdateRight = new wxStaticBitmap( m_panelStatistics, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + m_bitmapUpdateRight->SetToolTip( _("Number of files that will be overwritten") ); - m_staticTextStatusMiddle = new wxStaticText( m_panelStatusBar, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextStatusMiddle->Wrap( -1 ); - m_staticTextStatusMiddle->SetFont( wxFont( 8, 70, 90, 92, false, wxEmptyString ) ); + bSizer177->Add( m_bitmapUpdateRight, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); - bSizer451->Add( m_staticTextStatusMiddle, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + bSizer177->Add( 0, 0, 1, wxEXPAND, 5 ); - bSizer451->Add( 26, 0, 0, wxALIGN_CENTER_VERTICAL, 5 ); - m_staticline10 = new wxStaticLine( m_panelStatusBar, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL ); - bSizer451->Add( m_staticline10, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP, 2 ); + bSizer177->Add( 2, 2, 0, 0, 5 ); - wxBoxSizer* bSizer52; - bSizer52 = new wxBoxSizer( wxHORIZONTAL ); + m_staticTextUpdateRight = new wxStaticText( m_panelStatistics, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextUpdateRight->Wrap( -1 ); + m_staticTextUpdateRight->SetToolTip( _("Number of files that will be overwritten") ); + bSizer177->Add( m_staticTextUpdateRight, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - bSizer52->Add( 0, 0, 1, wxALIGN_CENTER_VERTICAL, 5 ); - bSizerStatusRightDirectories = new wxBoxSizer( wxHORIZONTAL ); + bSizerStatistics->Add( bSizer177, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - m_bitmapSmallDirectoryRight = new wxStaticBitmap( m_panelStatusBar, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); - bSizerStatusRightDirectories->Add( m_bitmapSmallDirectoryRight, 0, wxALIGN_CENTER_VERTICAL, 5 ); + bSizerStatistics->Add( 5, 5, 0, 0, 5 ); - bSizerStatusRightDirectories->Add( 2, 0, 0, 0, 5 ); + wxBoxSizer* bSizer178; + bSizer178 = new wxBoxSizer( wxVERTICAL ); - m_staticTextStatusRightDirs = new wxStaticText( m_panelStatusBar, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextStatusRightDirs->Wrap( -1 ); - bSizerStatusRightDirectories->Add( m_staticTextStatusRightDirs, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + bSizer178->Add( 0, 0, 1, wxEXPAND, 5 ); - bSizer52->Add( bSizerStatusRightDirectories, 0, wxALIGN_CENTER_VERTICAL, 5 ); + m_bitmapCreateRight = new wxStaticBitmap( m_panelStatistics, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + m_bitmapCreateRight->SetToolTip( _("Number of files and folders that will be created") ); - bSizerStatusRightFiles = new wxBoxSizer( wxHORIZONTAL ); + bSizer178->Add( m_bitmapCreateRight, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); - bSizerStatusRightFiles->Add( 10, 0, 0, 0, 5 ); + bSizer178->Add( 0, 0, 1, wxEXPAND, 5 ); - m_bitmapSmallFileRight = new wxStaticBitmap( m_panelStatusBar, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); - bSizerStatusRightFiles->Add( m_bitmapSmallFileRight, 0, wxALIGN_CENTER_VERTICAL, 5 ); + bSizer178->Add( 2, 2, 0, 0, 5 ); - bSizerStatusRightFiles->Add( 2, 0, 0, 0, 5 ); + m_staticTextCreateRight = new wxStaticText( m_panelStatistics, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextCreateRight->Wrap( -1 ); + m_staticTextCreateRight->SetToolTip( _("Number of files and folders that will be created") ); - m_staticTextStatusRightFiles = new wxStaticText( m_panelStatusBar, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextStatusRightFiles->Wrap( -1 ); - bSizerStatusRightFiles->Add( m_staticTextStatusRightFiles, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + bSizer178->Add( m_staticTextCreateRight, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - bSizerStatusRightFiles->Add( 10, 0, 0, 0, 5 ); + bSizerStatistics->Add( bSizer178, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - m_staticTextStatusRightBytes = new wxStaticText( m_panelStatusBar, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextStatusRightBytes->Wrap( -1 ); - bSizerStatusRightFiles->Add( m_staticTextStatusRightBytes, 0, wxALIGN_CENTER_VERTICAL, 5 ); + bSizer1801->Add( bSizerStatistics, 0, wxALIGN_CENTER_VERTICAL, 5 ); - bSizer52->Add( bSizerStatusRightFiles, 0, wxALIGN_CENTER_VERTICAL, 5 ); - wxBoxSizer* bSizer50; - bSizer50 = new wxBoxSizer( wxHORIZONTAL ); + bSizer1801->Add( 0, 0, 1, wxEXPAND, 5 ); - bSizer50->Add( 0, 0, 1, wxALIGN_BOTTOM, 5 ); + m_panelStatistics->SetSizer( bSizer1801 ); + m_panelStatistics->Layout(); + bSizer1801->Fit( m_panelStatistics ); + bSizerPanelHolder->Add( m_panelStatistics, 0, wxALIGN_CENTER_VERTICAL, 5 ); - m_bitmapResizeCorner = new wxStaticBitmap( m_panelStatusBar, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 10,10 ), 0 ); - bSizer50->Add( m_bitmapResizeCorner, 0, wxALIGN_BOTTOM, 5 ); + m_panelViewFilter = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + bSizerViewFilter = new wxBoxSizer( wxHORIZONTAL ); - bSizer52->Add( bSizer50, 1, wxALIGN_BOTTOM, 5 ); + bSizerViewFilter->Add( 0, 0, 1, wxEXPAND, 5 ); + m_bpButtonSyncCreateLeft = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW ); + bSizerViewFilter->Add( m_bpButtonSyncCreateLeft, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); - bSizer451->Add( bSizer52, 1, wxALIGN_BOTTOM|wxEXPAND, 5 ); + m_bpButtonSyncDirOverwLeft = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW ); + bSizerViewFilter->Add( m_bpButtonSyncDirOverwLeft, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); + m_bpButtonSyncDeleteLeft = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW ); + bSizerViewFilter->Add( m_bpButtonSyncDeleteLeft, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); - m_panelStatusBar->SetSizer( bSizer451 ); - m_panelStatusBar->Layout(); - bSizer451->Fit( m_panelStatusBar ); - bSizerPanelHolder->Add( m_panelStatusBar, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); + m_bpButtonLeftOnly = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW ); + bSizerViewFilter->Add( m_bpButtonLeftOnly, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); + + m_bpButtonLeftNewer = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW ); + bSizerViewFilter->Add( m_bpButtonLeftNewer, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); + + m_bpButtonEqual = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW ); + bSizerViewFilter->Add( m_bpButtonEqual, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); + + m_bpButtonDifferent = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW ); + bSizerViewFilter->Add( m_bpButtonDifferent, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); + + m_bpButtonSyncDirNone = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW ); + bSizerViewFilter->Add( m_bpButtonSyncDirNone, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); + + m_bpButtonRightNewer = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW ); + bSizerViewFilter->Add( m_bpButtonRightNewer, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); + + m_bpButtonRightOnly = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW ); + bSizerViewFilter->Add( m_bpButtonRightOnly, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); + + m_bpButtonSyncDeleteRight = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW ); + bSizerViewFilter->Add( m_bpButtonSyncDeleteRight, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); + + m_bpButtonSyncDirOverwRight = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW ); + bSizerViewFilter->Add( m_bpButtonSyncDirOverwRight, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); + + m_bpButtonSyncCreateRight = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW ); + bSizerViewFilter->Add( m_bpButtonSyncCreateRight, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); + + m_bpButtonConflict = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW ); + bSizerViewFilter->Add( m_bpButtonConflict, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); + + + bSizerViewFilter->Add( 0, 0, 1, wxEXPAND, 5 ); + + + m_panelViewFilter->SetSizer( bSizerViewFilter ); + m_panelViewFilter->Layout(); + bSizerViewFilter->Fit( m_panelViewFilter ); + bSizerPanelHolder->Add( m_panelViewFilter, 0, wxALIGN_CENTER_VERTICAL, 5 ); this->SetSizer( bSizerPanelHolder ); @@ -688,8 +833,8 @@ MainDialogGenerated::MainDialogGenerated( wxWindow* parent, wxWindowID id, const this->Connect( m_menuItem10->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnCompare ) ); this->Connect( m_menuItem11->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnStartSync ) ); this->Connect( m_menuItemNew->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnNewConfig ) ); - this->Connect( m_menuItemSave->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnSaveConfig ) ); this->Connect( m_menuItemLoad->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnLoadConfig ) ); + this->Connect( m_menuItemSave->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnSaveConfig ) ); this->Connect( m_menuItem4->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuQuit ) ); this->Connect( m_menuItemGlobSett->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuGlobalSettings ) ); this->Connect( m_menuItem7->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuBatchJob ) ); @@ -706,8 +851,8 @@ MainDialogGenerated::MainDialogGenerated( wxWindow* parent, wxWindowID id, const m_dirPickerLeft->Connect( wxEVT_COMMAND_DIRPICKER_CHANGED, wxFileDirPickerEventHandler( MainDialogGenerated::OnDirSelected ), NULL, this ); m_bpButtonSwapSides->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSwapSides ), NULL, this ); m_dirPickerRight->Connect( wxEVT_COMMAND_DIRPICKER_CHANGED, wxFileDirPickerEventHandler( MainDialogGenerated::OnDirSelected ), NULL, this ); - m_bpButtonSave->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSaveConfig ), NULL, this ); m_bpButtonLoad->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnLoadConfig ), NULL, this ); + m_bpButtonSave->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSaveConfig ), NULL, this ); m_listBoxHistory->Connect( wxEVT_CHAR, wxKeyEventHandler( MainDialogGenerated::OnCfgHistoryKeyEvent ), NULL, this ); m_listBoxHistory->Connect( wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnLoadFromHistory ), NULL, this ); m_bpButtonFilter->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnConfigureFilter ), NULL, this ); @@ -734,9 +879,9 @@ MainDialogGenerated::~MainDialogGenerated() this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( MainDialogGenerated::OnClose ) ); this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnCompare ) ); this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnStartSync ) ); - this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnNewConfig ) ); - this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnSaveConfig ) ); - this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnLoadConfig ) ); + this->Disconnect( wxID_NEW, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnNewConfig ) ); + this->Disconnect( wxID_OPEN, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnLoadConfig ) ); + this->Disconnect( wxID_SAVE, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnSaveConfig ) ); this->Disconnect( wxID_EXIT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuQuit ) ); this->Disconnect( wxID_PREFERENCES, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuGlobalSettings ) ); this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuBatchJob ) ); @@ -753,8 +898,8 @@ MainDialogGenerated::~MainDialogGenerated() m_dirPickerLeft->Disconnect( wxEVT_COMMAND_DIRPICKER_CHANGED, wxFileDirPickerEventHandler( MainDialogGenerated::OnDirSelected ), NULL, this ); m_bpButtonSwapSides->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSwapSides ), NULL, this ); m_dirPickerRight->Disconnect( wxEVT_COMMAND_DIRPICKER_CHANGED, wxFileDirPickerEventHandler( MainDialogGenerated::OnDirSelected ), NULL, this ); - m_bpButtonSave->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSaveConfig ), NULL, this ); m_bpButtonLoad->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnLoadConfig ), NULL, this ); + m_bpButtonSave->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSaveConfig ), NULL, this ); m_listBoxHistory->Disconnect( wxEVT_CHAR, wxKeyEventHandler( MainDialogGenerated::OnCfgHistoryKeyEvent ), NULL, this ); m_listBoxHistory->Disconnect( wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnLoadFromHistory ), NULL, this ); m_bpButtonFilter->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnConfigureFilter ), NULL, this ); @@ -863,31 +1008,27 @@ FolderPairGenerated::~FolderPairGenerated() CompareStatusGenerated::CompareStatusGenerated( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style ) : wxPanel( parent, id, pos, size, style ) { + this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); + wxBoxSizer* bSizer40; bSizer40 = new wxBoxSizer( wxVERTICAL ); bSizer40->Add( 0, 0, 1, wxEXPAND, 5 ); - wxBoxSizer* bSizer48; - bSizer48 = new wxBoxSizer( wxHORIZONTAL ); - - m_staticText30 = new wxStaticText( this, wxID_ANY, _("Operation:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText30->Wrap( -1 ); - m_staticText30->SetFont( wxFont( 10, 70, 90, 92, false, wxEmptyString ) ); - - bSizer48->Add( m_staticText30, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 ); + wxBoxSizer* bSizer182; + bSizer182 = new wxBoxSizer( wxVERTICAL ); - m_textCtrlStatus = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY ); - m_textCtrlStatus->SetBackgroundColour( wxColour( 224, 224, 224 ) ); + m_textCtrlStatus = new wxTextCtrl( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, wxTE_READONLY ); + m_textCtrlStatus->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) ); - bSizer48->Add( m_textCtrlStatus, 1, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + bSizer182->Add( m_textCtrlStatus, 0, wxEXPAND, 5 ); - bSizer40->Add( bSizer48, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + bSizer40->Add( bSizer182, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 ); m_gauge2 = new wxGauge( this, wxID_ANY, 100, wxDefaultPosition, wxSize( -1,14 ), wxGA_HORIZONTAL|wxGA_SMOOTH ); - bSizer40->Add( m_gauge2, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 ); + bSizer40->Add( m_gauge2, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 ); bSizer42 = new wxBoxSizer( wxHORIZONTAL ); @@ -1042,6 +1183,7 @@ BatchDlgGenerated::BatchDlgGenerated( wxWindow* parent, wxWindowID id, const wxS m_staticText56 = new wxStaticText( m_panel8, wxID_ANY, _("Batch job"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText56->Wrap( -1 ); m_staticText56->SetFont( wxFont( 14, 70, 90, 92, false, wxEmptyString ) ); + m_staticText56->SetForegroundColour( wxColour( 0, 0, 0 ) ); bSizer72->Add( m_staticText56, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 ); @@ -1051,7 +1193,7 @@ BatchDlgGenerated::BatchDlgGenerated( wxWindow* parent, wxWindowID id, const wxS bSizer72->Fit( m_panel8 ); bSizer87->Add( m_panel8, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); - m_staticText44 = new wxStaticText( this, wxID_ANY, _("Create a batch file and automate synchronization. To start in batch mode simply double-click this file or run command: FreeFileSync.exe SyncJob.ffs_batch. This can also be scheduled in your system's task planner."), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText44 = new wxStaticText( this, wxID_ANY, _("Create a batch file to automate synchronization. Double-click this file or schedule in your system's task planner: FreeFileSync.exe <job name>.ffs_batch"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText44->Wrap( 480 ); bSizer87->Add( m_staticText44, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); @@ -1102,19 +1244,25 @@ BatchDlgGenerated::BatchDlgGenerated( wxWindow* parent, wxWindowID id, const wxS bSizer175->Add( bSizer1701, 1, wxALIGN_CENTER_VERTICAL, 5 ); wxStaticBoxSizer* sbSizer26; - sbSizer26 = new wxStaticBoxSizer( new wxStaticBox( m_panelOverview, wxID_ANY, _("Filter files") ), wxVERTICAL ); + sbSizer26 = new wxStaticBoxSizer( new wxStaticBox( m_panelOverview, wxID_ANY, _("Filter files") ), wxHORIZONTAL ); + + + sbSizer26->Add( 20, 0, 0, 0, 5 ); m_bpButtonFilter = new wxBitmapButton( m_panelOverview, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW|wxFULL_REPAINT_ON_RESIZE ); sbSizer26->Add( m_bpButtonFilter, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT, 15 ); + sbSizer26->Add( 20, 0, 0, 0, 5 ); + + bSizer175->Add( sbSizer26, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); wxBoxSizer* bSizer171; bSizer171 = new wxBoxSizer( wxVERTICAL ); wxStaticBoxSizer* sbSizer252; - sbSizer252 = new wxStaticBoxSizer( new wxStaticBox( m_panelOverview, wxID_ANY, _("Synchronize...") ), wxHORIZONTAL ); + sbSizer252 = new wxStaticBoxSizer( new wxStaticBox( m_panelOverview, wxID_ANY, _("Synchronize") ), wxHORIZONTAL ); m_staticTextSyncVariant = new wxStaticText( m_panelOverview, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextSyncVariant->Wrap( -1 ); @@ -1299,27 +1447,31 @@ BatchDlgGenerated::BatchDlgGenerated( wxWindow* parent, wxWindowID id, const wxS bSizer1722 = new wxBoxSizer( wxHORIZONTAL ); wxStaticBoxSizer* sbSizer24; - sbSizer24 = new wxStaticBoxSizer( new wxStaticBox( m_panelBatchSettings, wxID_ANY, _("Status feedback") ), wxVERTICAL ); + sbSizer24 = new wxStaticBoxSizer( new wxStaticBox( m_panelBatchSettings, wxID_ANY, _("Status feedback") ), wxHORIZONTAL ); m_checkBoxShowProgress = new wxCheckBox( m_panelBatchSettings, wxID_ANY, _("Show progress dialog"), wxDefaultPosition, wxDefaultSize, 0 ); - sbSizer24->Add( m_checkBoxShowProgress, 0, wxALL|wxEXPAND, 5 ); + sbSizer24->Add( m_checkBoxShowProgress, 1, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + wxBoxSizer* bSizer1702; + bSizer1702 = new wxBoxSizer( wxHORIZONTAL ); - bSizer1722->Add( sbSizer24, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - - - bSizer1722->Add( 10, 0, 0, 0, 5 ); - - wxStaticBoxSizer* sbSizer25; - sbSizer25 = new wxStaticBoxSizer( new wxStaticBox( m_panelBatchSettings, wxID_ANY, _("Error handling") ), wxHORIZONTAL ); + m_staticText961 = new wxStaticText( m_panelBatchSettings, wxID_ANY, _("Error handling"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText961->Wrap( -1 ); + bSizer1702->Add( m_staticText961, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); wxArrayString m_choiceHandleErrorChoices; m_choiceHandleError = new wxChoice( m_panelBatchSettings, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceHandleErrorChoices, 0 ); m_choiceHandleError->SetSelection( 0 ); - sbSizer25->Add( m_choiceHandleError, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + bSizer1702->Add( m_choiceHandleError, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + + sbSizer24->Add( bSizer1702, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); - bSizer1722->Add( sbSizer25, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); + bSizer1722->Add( sbSizer24, 1, wxALIGN_CENTER_VERTICAL, 5 ); + + + bSizer1722->Add( 10, 0, 0, 0, 5 ); bSizer172->Add( bSizer1722, 0, wxEXPAND, 5 ); @@ -1334,10 +1486,7 @@ BatchDlgGenerated::BatchDlgGenerated( wxWindow* parent, wxWindowID id, const wxS m_staticText96 = new wxStaticText( m_panelBatchSettings, wxID_ANY, _("Maximum number of log files:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText96->Wrap( -1 ); - bSizer152->Add( m_staticText96, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); - - - bSizer152->Add( 0, 0, 1, wxEXPAND, 5 ); + bSizer152->Add( m_staticText96, 1, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); m_spinCtrlLogCountMax = new wxSpinCtrl( m_panelBatchSettings, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 2000000000, 0 ); bSizer152->Add( m_spinCtrlLogCountMax, 0, wxALIGN_CENTER_VERTICAL, 5 ); @@ -1349,7 +1498,7 @@ BatchDlgGenerated::BatchDlgGenerated( wxWindow* parent, wxWindowID id, const wxS wxBoxSizer* bSizer1721; bSizer1721 = new wxBoxSizer( wxVERTICAL ); - m_staticText94 = new wxStaticText( m_panelLogfile, wxID_ANY, _("Select log file directory:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText94 = new wxStaticText( m_panelLogfile, wxID_ANY, _("Select folder to save log files:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText94->Wrap( -1 ); bSizer1721->Add( m_staticText94, 0, wxTOP|wxBOTTOM|wxLEFT, 5 ); @@ -1390,13 +1539,13 @@ BatchDlgGenerated::BatchDlgGenerated( wxWindow* parent, wxWindowID id, const wxS wxBoxSizer* bSizer68; bSizer68 = new wxBoxSizer( wxHORIZONTAL ); - m_buttonSave = new wxButton( this, wxID_SAVE, _("&Save"), wxDefaultPosition, wxSize( -1,30 ), 0 ); + m_buttonSave = new wxButton( this, wxID_SAVE, _("&Save..."), wxDefaultPosition, wxSize( -1,30 ), 0 ); m_buttonSave->SetDefault(); m_buttonSave->SetFont( wxFont( 10, 70, 90, 92, false, wxEmptyString ) ); bSizer68->Add( m_buttonSave, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 ); - m_buttonLoad = new wxButton( this, wxID_OPEN, _("&Load"), wxDefaultPosition, wxSize( -1,30 ), 0 ); + m_buttonLoad = new wxButton( this, wxID_OPEN, _("&Open..."), wxDefaultPosition, wxSize( -1,30 ), 0 ); m_buttonLoad->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); bSizer68->Add( m_buttonLoad, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); @@ -1613,23 +1762,23 @@ SyncCfgDlgGenerated::SyncCfgDlgGenerated( wxWindow* parent, wxWindowID id, const fgSizer1->Add( m_buttonAutomatic, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - m_staticText81 = new wxStaticText( this, wxID_ANY, _("Identify and propagate changes on both sides using a database. Deletions, renaming and conflicts are detected automatically."), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText81->Wrap( 410 ); - fgSizer1->Add( m_staticText81, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); + m_staticTextAutomatic = new wxStaticText( this, wxID_ANY, _("Identify and propagate changes on both sides using a database. Deletions, renaming and conflicts are detected automatically."), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextAutomatic->Wrap( 410 ); + fgSizer1->Add( m_staticTextAutomatic, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); m_radioBtnMirror = new wxRadioButton( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); m_radioBtnMirror->SetFont( wxFont( 11, 70, 90, 92, false, wxEmptyString ) ); fgSizer1->Add( m_radioBtnMirror, 0, wxALIGN_CENTER_VERTICAL, 5 ); - m_buttonOneWay = new wxButton( this, wxID_ANY, _("Mirror ->>"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); - m_buttonOneWay->SetFont( wxFont( 11, 70, 90, 92, false, wxEmptyString ) ); + m_buttonMirror = new wxButton( this, wxID_ANY, _("Mirror ->>"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); + m_buttonMirror->SetFont( wxFont( 11, 70, 90, 92, false, wxEmptyString ) ); - fgSizer1->Add( m_buttonOneWay, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); + fgSizer1->Add( m_buttonMirror, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - m_staticText8 = new wxStaticText( this, wxID_ANY, _("Mirror backup of left folder. Right folder is modified to exactly match left folder after synchronization."), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText8->Wrap( 410 ); - fgSizer1->Add( m_staticText8, 0, wxLEFT|wxALIGN_CENTER_VERTICAL, 5 ); + m_staticTextMirror = new wxStaticText( this, wxID_ANY, _("Mirror backup of left folder. Right folder is modified to exactly match left folder after synchronization."), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextMirror->Wrap( 410 ); + fgSizer1->Add( m_staticTextMirror, 0, wxLEFT|wxALIGN_CENTER_VERTICAL, 5 ); m_radioBtnUpdate = new wxRadioButton( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); m_radioBtnUpdate->SetFont( wxFont( 11, 70, 90, 92, false, wxEmptyString ) ); @@ -1641,23 +1790,23 @@ SyncCfgDlgGenerated::SyncCfgDlgGenerated( wxWindow* parent, wxWindowID id, const fgSizer1->Add( m_buttonUpdate, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - m_staticText101 = new wxStaticText( this, wxID_ANY, _("Copy new or updated files to right folder."), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText101->Wrap( 410 ); - fgSizer1->Add( m_staticText101, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); + m_staticTextUpdate = new wxStaticText( this, wxID_ANY, _("Copy new or updated files to right folder."), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextUpdate->Wrap( 410 ); + fgSizer1->Add( m_staticTextUpdate, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); m_radioBtnCustom = new wxRadioButton( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); m_radioBtnCustom->SetFont( wxFont( 11, 70, 90, 92, false, wxEmptyString ) ); fgSizer1->Add( m_radioBtnCustom, 0, wxALIGN_CENTER_VERTICAL, 5 ); - m_buttonUpdate1 = new wxButton( this, wxID_ANY, _("Custom"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); - m_buttonUpdate1->SetFont( wxFont( 11, 70, 90, 92, false, wxEmptyString ) ); + m_buttonCustom = new wxButton( this, wxID_ANY, _("Custom"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); + m_buttonCustom->SetFont( wxFont( 11, 70, 90, 92, false, wxEmptyString ) ); - fgSizer1->Add( m_buttonUpdate1, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); + fgSizer1->Add( m_buttonCustom, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - m_staticText9 = new wxStaticText( this, wxID_ANY, _("Configure your own synchronization rules."), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText9->Wrap( 410 ); - fgSizer1->Add( m_staticText9, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); + m_staticTextCustom = new wxStaticText( this, wxID_ANY, _("Configure your own synchronization rules."), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextCustom->Wrap( 410 ); + fgSizer1->Add( m_staticTextCustom, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); sbSizer7->Add( fgSizer1, 0, 0, 5 ); @@ -1758,7 +1907,7 @@ SyncCfgDlgGenerated::SyncCfgDlgGenerated( wxWindow* parent, wxWindowID id, const bSizerLeftOnly = new wxBoxSizer( wxHORIZONTAL ); m_bitmapLeftOnly = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 45,45 ), 0 ); - m_bitmapLeftOnly->SetToolTip( _("File/folder exists on left side only") ); + m_bitmapLeftOnly->SetToolTip( _("Item exists on left side only") ); bSizerLeftOnly->Add( m_bitmapLeftOnly, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); @@ -1774,7 +1923,7 @@ SyncCfgDlgGenerated::SyncCfgDlgGenerated( wxWindow* parent, wxWindowID id, const bSizerRightOnly = new wxBoxSizer( wxHORIZONTAL ); m_bitmapRightOnly = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 45,45 ), 0 ); - m_bitmapRightOnly->SetToolTip( _("File/folder exists on right side only") ); + m_bitmapRightOnly->SetToolTip( _("Item exists on right side only") ); bSizerRightOnly->Add( m_bitmapRightOnly, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); @@ -1790,7 +1939,7 @@ SyncCfgDlgGenerated::SyncCfgDlgGenerated( wxWindow* parent, wxWindowID id, const bSizerLeftNewer = new wxBoxSizer( wxHORIZONTAL ); m_bitmapLeftNewer = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 45,45 ), 0 ); - m_bitmapLeftNewer->SetToolTip( _("Left file is newer") ); + m_bitmapLeftNewer->SetToolTip( _("Left side is newer") ); bSizerLeftNewer->Add( m_bitmapLeftNewer, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); @@ -1806,7 +1955,7 @@ SyncCfgDlgGenerated::SyncCfgDlgGenerated( wxWindow* parent, wxWindowID id, const bSizerRightNewer = new wxBoxSizer( wxHORIZONTAL ); m_bitmapRightNewer = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 45,45 ), 0 ); - m_bitmapRightNewer->SetToolTip( _("Right file is newer") ); + m_bitmapRightNewer->SetToolTip( _("Right side is newer") ); bSizerRightNewer->Add( m_bitmapRightNewer, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); @@ -1822,7 +1971,7 @@ SyncCfgDlgGenerated::SyncCfgDlgGenerated( wxWindow* parent, wxWindowID id, const bSizerDifferent = new wxBoxSizer( wxHORIZONTAL ); m_bitmapDifferent = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 45,45 ), 0 ); - m_bitmapDifferent->SetToolTip( _("Files have different content") ); + m_bitmapDifferent->SetToolTip( _("Items have different content") ); bSizerDifferent->Add( m_bitmapDifferent, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); @@ -1838,7 +1987,7 @@ SyncCfgDlgGenerated::SyncCfgDlgGenerated( wxWindow* parent, wxWindowID id, const bSizerConflict = new wxBoxSizer( wxHORIZONTAL ); m_bitmapConflict = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 45,45 ), 0 ); - m_bitmapConflict->SetToolTip( _("Conflict/file cannot be categorized") ); + m_bitmapConflict->SetToolTip( _("Conflict/item cannot be categorized") ); bSizerConflict->Add( m_bitmapConflict, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); @@ -1896,14 +2045,14 @@ SyncCfgDlgGenerated::SyncCfgDlgGenerated( wxWindow* parent, wxWindowID id, const m_buttonAutomatic->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncAutomatic ), NULL, this ); m_buttonAutomatic->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( SyncCfgDlgGenerated::OnSyncAutomaticDouble ), NULL, this ); m_radioBtnMirror->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncMirror ), NULL, this ); - m_buttonOneWay->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncMirror ), NULL, this ); - m_buttonOneWay->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( SyncCfgDlgGenerated::OnSyncMirrorDouble ), NULL, this ); + m_buttonMirror->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncMirror ), NULL, this ); + m_buttonMirror->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( SyncCfgDlgGenerated::OnSyncMirrorDouble ), NULL, this ); m_radioBtnUpdate->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncUpdate ), NULL, this ); m_buttonUpdate->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncUpdate ), NULL, this ); m_buttonUpdate->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( SyncCfgDlgGenerated::OnSyncUpdateDouble ), NULL, this ); m_radioBtnCustom->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncCustom ), NULL, this ); - m_buttonUpdate1->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncCustom ), NULL, this ); - m_buttonUpdate1->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( SyncCfgDlgGenerated::OnSyncCustomDouble ), NULL, this ); + m_buttonCustom->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncCustom ), NULL, this ); + m_buttonCustom->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( SyncCfgDlgGenerated::OnSyncCustomDouble ), NULL, this ); m_choiceHandleDeletion->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( SyncCfgDlgGenerated::OnChangeDeletionHandling ), NULL, this ); m_choiceHandleError->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( SyncCfgDlgGenerated::OnChangeErrorHandling ), NULL, this ); m_bpButtonLeftOnly->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnExLeftSideOnly ), NULL, this ); @@ -1924,14 +2073,14 @@ SyncCfgDlgGenerated::~SyncCfgDlgGenerated() m_buttonAutomatic->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncAutomatic ), NULL, this ); m_buttonAutomatic->Disconnect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( SyncCfgDlgGenerated::OnSyncAutomaticDouble ), NULL, this ); m_radioBtnMirror->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncMirror ), NULL, this ); - m_buttonOneWay->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncMirror ), NULL, this ); - m_buttonOneWay->Disconnect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( SyncCfgDlgGenerated::OnSyncMirrorDouble ), NULL, this ); + m_buttonMirror->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncMirror ), NULL, this ); + m_buttonMirror->Disconnect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( SyncCfgDlgGenerated::OnSyncMirrorDouble ), NULL, this ); m_radioBtnUpdate->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncUpdate ), NULL, this ); m_buttonUpdate->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncUpdate ), NULL, this ); m_buttonUpdate->Disconnect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( SyncCfgDlgGenerated::OnSyncUpdateDouble ), NULL, this ); m_radioBtnCustom->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncCustom ), NULL, this ); - m_buttonUpdate1->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncCustom ), NULL, this ); - m_buttonUpdate1->Disconnect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( SyncCfgDlgGenerated::OnSyncCustomDouble ), NULL, this ); + m_buttonCustom->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncCustom ), NULL, this ); + m_buttonCustom->Disconnect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( SyncCfgDlgGenerated::OnSyncCustomDouble ), NULL, this ); m_choiceHandleDeletion->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( SyncCfgDlgGenerated::OnChangeDeletionHandling ), NULL, this ); m_choiceHandleError->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( SyncCfgDlgGenerated::OnChangeErrorHandling ), NULL, this ); m_bpButtonLeftOnly->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnExLeftSideOnly ), NULL, this ); @@ -2088,56 +2237,64 @@ CmpCfgDlgGenerated::~CmpCfgDlgGenerated() SyncStatusDlgGenerated::SyncStatusDlgGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxFrame( parent, id, title, pos, size, style ) { this->SetSizeHints( wxSize( 470,260 ), wxDefaultSize ); + this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); - wxBoxSizer* bSizer172; - bSizer172 = new wxBoxSizer( wxVERTICAL ); - - m_panelBackground = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); bSizerTop = new wxBoxSizer( wxVERTICAL ); + m_panelHeader = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + m_panelHeader->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) ); + + wxBoxSizer* bSizer181; + bSizer181 = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bSizer42; bSizer42 = new wxBoxSizer( wxHORIZONTAL ); - m_bitmapStatus = new wxStaticBitmap( m_panelBackground, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 28,28 ), 0 ); - bSizer42->Add( m_bitmapStatus, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + m_bitmapStatus = new wxStaticBitmap( m_panelHeader, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 28,28 ), 0 ); + bSizer42->Add( m_bitmapStatus, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 ); - m_staticTextStatus = new wxStaticText( m_panelBackground, wxID_ANY, _("Synchronizing..."), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextStatus = new wxStaticText( m_panelHeader, wxID_ANY, _("Synchronizing..."), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextStatus->Wrap( -1 ); m_staticTextStatus->SetFont( wxFont( 14, 70, 90, 92, false, wxEmptyString ) ); - bSizer42->Add( m_staticTextStatus, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5 ); + bSizer42->Add( m_staticTextStatus, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxTOP, 5 ); - m_animationControl1 = new wxAnimationCtrl( m_panelBackground, wxID_ANY, wxNullAnimation, wxDefaultPosition, wxDefaultSize, wxAC_DEFAULT_STYLE ); + m_animationControl1 = new wxAnimationCtrl( m_panelHeader, wxID_ANY, wxNullAnimation, wxDefaultPosition, wxDefaultSize, wxAC_DEFAULT_STYLE ); m_animationControl1->SetMinSize( wxSize( 45,45 ) ); bSizer42->Add( m_animationControl1, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); - bSizerTop->Add( bSizer42, 0, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT, 5 ); + bSizer181->Add( bSizer42, 0, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT, 5 ); - bSizerCurrentOperation = new wxBoxSizer( wxHORIZONTAL ); - m_staticText2511 = new wxStaticText( m_panelBackground, wxID_ANY, _("Operation:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText2511->Wrap( -1 ); - m_staticText2511->SetFont( wxFont( 10, 70, 90, 92, false, wxEmptyString ) ); + m_panelHeader->SetSizer( bSizer181 ); + m_panelHeader->Layout(); + bSizer181->Fit( m_panelHeader ); + bSizerTop->Add( m_panelHeader, 0, wxEXPAND, 5 ); - bSizerCurrentOperation->Add( m_staticText2511, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 ); + m_staticlineHeader = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizerTop->Add( m_staticlineHeader, 0, wxEXPAND, 5 ); - m_textCtrlInfo = new wxTextCtrl( m_panelBackground, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY ); - m_textCtrlInfo->SetBackgroundColour( wxColour( 224, 224, 224 ) ); + m_panelProgress = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + wxBoxSizer* bSizer173; + bSizer173 = new wxBoxSizer( wxVERTICAL ); - bSizerCurrentOperation->Add( m_textCtrlInfo, 1, wxALIGN_CENTER_VERTICAL, 5 ); + wxBoxSizer* bSizer1811; + bSizer1811 = new wxBoxSizer( wxVERTICAL ); + m_textCtrlStatus = new wxTextCtrl( m_panelProgress, wxID_ANY, _("dummy"), wxDefaultPosition, wxSize( -1,-1 ), wxTE_READONLY|wxNO_BORDER ); + m_textCtrlStatus->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); - bSizerTop->Add( bSizerCurrentOperation, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 ); + bSizer1811->Add( m_textCtrlStatus, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxLEFT, 5 ); - m_panelProgress = new wxPanel( m_panelBackground, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - wxBoxSizer* bSizer173; - bSizer173 = new wxBoxSizer( wxVERTICAL ); - bSizer171 = new wxBoxSizer( wxHORIZONTAL ); + bSizer173->Add( bSizer1811, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 ); + + m_gauge1 = new wxGauge( m_panelProgress, wxID_ANY, 100, wxDefaultPosition, wxSize( -1,14 ), wxGA_HORIZONTAL ); + bSizer173->Add( m_gauge1, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 ); - bSizerProgressStat = new wxStaticBoxSizer( new wxStaticBox( m_panelProgress, wxID_ANY, wxEmptyString ), wxHORIZONTAL ); + bSizer171 = new wxBoxSizer( wxHORIZONTAL ); wxFlexGridSizer* fgSizer10; fgSizer10 = new wxFlexGridSizer( 0, 2, 0, 5 ); @@ -2227,34 +2384,28 @@ SyncStatusDlgGenerated::SyncStatusDlgGenerated( wxWindow* parent, wxWindowID id, fgSizer10->Add( m_staticTextTimeElapsed, 0, wxALIGN_BOTTOM, 5 ); - bSizerProgressStat->Add( fgSizer10, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); - - - bSizer171->Add( bSizerProgressStat, 0, wxALIGN_CENTER_VERTICAL, 5 ); + bSizer171->Add( fgSizer10, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 10 ); bSizer171->Add( 10, 0, 0, 0, 5 ); - m_panelGraph = new zen::Graph2D( m_panelProgress, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - m_panelGraph->SetBackgroundColour( wxColour( 255, 255, 255 ) ); + m_panelGraph = new zen::Graph2D( m_panelProgress, wxID_ANY, wxDefaultPosition, wxSize( 340,130 ), wxTAB_TRAVERSAL ); + m_panelGraph->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); bSizer171->Add( m_panelGraph, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - bSizer173->Add( bSizer171, 1, wxEXPAND, 5 ); - - m_gauge1 = new wxGauge( m_panelProgress, wxID_ANY, 100, wxDefaultPosition, wxSize( -1,14 ), wxGA_HORIZONTAL ); - bSizer173->Add( m_gauge1, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 ); + bSizer173->Add( bSizer171, 1, wxEXPAND|wxTOP|wxLEFT, 5 ); m_panelProgress->SetSizer( bSizer173 ); m_panelProgress->Layout(); bSizer173->Fit( m_panelProgress ); - bSizerTop->Add( m_panelProgress, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 ); + bSizerTop->Add( m_panelProgress, 1, wxEXPAND, 5 ); bSizerFinalStat = new wxBoxSizer( wxVERTICAL ); - m_listbookResult = new wxListbook( m_panelBackground, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLB_TOP ); + m_listbookResult = new wxListbook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLB_TOP ); wxSize m_listbookResultImageSize = wxSize( 180,1 ); int m_listbookResultIndex = 0; wxImageList* m_listbookResultImages = new wxImageList( m_listbookResultImageSize.GetWidth(), m_listbookResultImageSize.GetHeight() ); @@ -2265,39 +2416,48 @@ SyncStatusDlgGenerated::SyncStatusDlgGenerated( wxWindow* parent, wxWindowID id, bSizerFinalStat->Add( m_listbookResult, 1, wxEXPAND, 5 ); - bSizerTop->Add( bSizerFinalStat, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 ); + bSizerTop->Add( bSizerFinalStat, 1, wxEXPAND, 5 ); + + m_staticline12 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizerTop->Add( m_staticline12, 0, wxEXPAND, 5 ); + + m_panelFooter = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + m_panelFooter->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) ); + + wxBoxSizer* bSizer182; + bSizer182 = new wxBoxSizer( wxVERTICAL ); bSizerExecFinished = new wxBoxSizer( wxHORIZONTAL ); - m_staticText87 = new wxStaticText( m_panelBackground, wxID_ANY, _("On completion:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText87 = new wxStaticText( m_panelFooter, wxID_ANY, _("On completion:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText87->Wrap( -1 ); m_staticText87->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 90, false, wxEmptyString ) ); bSizerExecFinished->Add( m_staticText87, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); - m_comboBoxExecFinished = new ExecFinishedBox( m_panelBackground, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); + m_comboBoxExecFinished = new ExecFinishedBox( m_panelFooter, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); bSizerExecFinished->Add( m_comboBoxExecFinished, 1, wxALIGN_CENTER_VERTICAL, 5 ); - bSizerTop->Add( bSizerExecFinished, 0, wxTOP|wxRIGHT|wxLEFT|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); + bSizer182->Add( bSizerExecFinished, 0, wxTOP|wxRIGHT|wxLEFT|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); bSizer28 = new wxBoxSizer( wxHORIZONTAL ); bSizer28->Add( 0, 0, 1, 0, 5 ); - m_buttonOK = new wxButton( m_panelBackground, wxID_OK, _("OK"), wxDefaultPosition, wxSize( 100,30 ), 0 ); + m_buttonOK = new wxButton( m_panelFooter, wxID_OK, _("OK"), wxDefaultPosition, wxSize( 100,30 ), 0 ); m_buttonOK->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); m_buttonOK->Enable( false ); bSizer28->Add( m_buttonOK, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); - m_buttonPause = new wxButton( m_panelBackground, wxID_ANY, _("&Pause"), wxDefaultPosition, wxSize( 100,30 ), 0 ); + m_buttonPause = new wxButton( m_panelFooter, wxID_ANY, _("&Pause"), wxDefaultPosition, wxSize( 100,30 ), 0 ); m_buttonPause->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); bSizer28->Add( m_buttonPause, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); - m_buttonAbort = new wxButton( m_panelBackground, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize( 100,30 ), 0 ); + m_buttonAbort = new wxButton( m_panelFooter, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize( 100,30 ), 0 ); m_buttonAbort->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); bSizer28->Add( m_buttonAbort, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 ); @@ -2306,17 +2466,18 @@ SyncStatusDlgGenerated::SyncStatusDlgGenerated( wxWindow* parent, wxWindowID id, bSizer28->Add( 0, 0, 1, wxEXPAND, 5 ); - bSizerTop->Add( bSizer28, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + bSizer182->Add( bSizer28, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); - m_panelBackground->SetSizer( bSizerTop ); - m_panelBackground->Layout(); - bSizerTop->Fit( m_panelBackground ); - bSizer172->Add( m_panelBackground, 1, wxEXPAND, 5 ); + m_panelFooter->SetSizer( bSizer182 ); + m_panelFooter->Layout(); + bSizer182->Fit( m_panelFooter ); + bSizerTop->Add( m_panelFooter, 0, wxEXPAND, 5 ); - this->SetSizer( bSizer172 ); + this->SetSizer( bSizerTop ); this->Layout(); + bSizerTop->Fit( this ); this->Centre( wxBOTH ); @@ -2341,6 +2502,8 @@ SyncStatusDlgGenerated::~SyncStatusDlgGenerated() LogControlGenerated::LogControlGenerated( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style ) : wxPanel( parent, id, pos, size, style ) { + this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) ); + wxBoxSizer* bSizer153; bSizer153 = new wxBoxSizer( wxHORIZONTAL ); @@ -2357,11 +2520,12 @@ LogControlGenerated::LogControlGenerated( wxWindow* parent, wxWindowID id, const bSizer154->Add( m_bpButtonInfo, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); - bSizer153->Add( bSizer154, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); + bSizer153->Add( bSizer154, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); - m_textCtrlInfo = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_DONTWRAP|wxTE_MULTILINE|wxTE_READONLY ); - m_textCtrlInfo->SetBackgroundColour( wxColour( 224, 224, 224 ) ); + m_staticline13 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL ); + bSizer153->Add( m_staticline13, 0, wxEXPAND, 5 ); + m_textCtrlInfo = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), wxTE_DONTWRAP|wxTE_MULTILINE|wxTE_READONLY|wxNO_BORDER ); bSizer153->Add( m_textCtrlInfo, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); @@ -2394,33 +2558,33 @@ AboutDlgGenerated::AboutDlgGenerated( wxWindow* parent, wxWindowID id, const wxS bSizer31->Add( 0, 5, 0, 0, 5 ); + wxBoxSizer* bSizer53; + bSizer53 = new wxBoxSizer( wxVERTICAL ); + m_panel5 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxSize( -1,-1 ), wxSIMPLE_BORDER|wxTAB_TRAVERSAL ); m_panel5->SetBackgroundColour( wxColour( 255, 255, 255 ) ); wxBoxSizer* bSizer36; bSizer36 = new wxBoxSizer( wxHORIZONTAL ); - m_bitmap11 = new wxStaticBitmap( m_panel5, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 404,55 ), 0 ); + m_bitmap11 = new wxStaticBitmap( m_panel5, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), 0 ); bSizer36->Add( m_bitmap11, 0, wxALIGN_CENTER_VERTICAL, 5 ); m_panel5->SetSizer( bSizer36 ); m_panel5->Layout(); bSizer36->Fit( m_panel5 ); - bSizer31->Add( m_panel5, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 ); + bSizer53->Add( m_panel5, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND|wxTOP|wxBOTTOM, 5 ); m_build = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); m_build->Wrap( -1 ); - bSizer31->Add( m_build, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 ); - + bSizer53->Add( m_build, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 ); - bSizer31->Add( 0, 5, 0, 0, 5 ); - wxBoxSizer* bSizer53; - bSizer53 = new wxBoxSizer( wxVERTICAL ); + bSizer53->Add( 0, 5, 0, 0, 5 ); m_panel33 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxDOUBLE_BORDER|wxTAB_TRAVERSAL ); - m_panel33->SetBackgroundColour( wxColour( 224, 224, 224 ) ); + m_panel33->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); bSizerCodeInfo = new wxBoxSizer( wxVERTICAL ); @@ -2437,32 +2601,32 @@ AboutDlgGenerated::AboutDlgGenerated( wxWindow* parent, wxWindowID id, const wxS bSizer171 = new wxBoxSizer( wxHORIZONTAL ); m_hyperlink9 = new wxHyperlinkCtrl( m_panel33, wxID_ANY, _("MinGW"), wxT("http://www.mingw.org"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE ); - m_hyperlink9->SetBackgroundColour( wxColour( 224, 224, 224 ) ); + m_hyperlink9->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); bSizer171->Add( m_hyperlink9, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); m_hyperlink11 = new wxHyperlinkCtrl( m_panel33, wxID_ANY, _("MS Visual C++"), wxT("http://msdn.microsoft.com/library/60k1461a.aspx"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE ); - m_hyperlink11->SetBackgroundColour( wxColour( 224, 224, 224 ) ); + m_hyperlink11->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); bSizer171->Add( m_hyperlink11, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); m_hyperlink10 = new wxHyperlinkCtrl( m_panel33, wxID_ANY, _("Code::Blocks"), wxT("http://www.codeblocks.org"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE ); - m_hyperlink10->SetBackgroundColour( wxColour( 224, 224, 224 ) ); + m_hyperlink10->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); bSizer171->Add( m_hyperlink10, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); m_hyperlink13 = new wxHyperlinkCtrl( m_panel33, wxID_ANY, _("Boost"), wxT("http://www.boost.org"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE ); - m_hyperlink13->SetBackgroundColour( wxColour( 224, 224, 224 ) ); + m_hyperlink13->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); bSizer171->Add( m_hyperlink13, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); m_hyperlink7 = new wxHyperlinkCtrl( m_panel33, wxID_ANY, _("wxWidgets"), wxT("http://www.wxwidgets.org"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE ); - m_hyperlink7->SetBackgroundColour( wxColour( 224, 224, 224 ) ); + m_hyperlink7->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); bSizer171->Add( m_hyperlink7, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); m_hyperlink16 = new wxHyperlinkCtrl( m_panel33, wxID_ANY, _("Artistic Style"), wxT("http://astyle.sourceforge.net"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE ); - m_hyperlink16->SetBackgroundColour( wxColour( 224, 224, 224 ) ); + m_hyperlink16->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); bSizer171->Add( m_hyperlink16, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); @@ -2473,27 +2637,27 @@ AboutDlgGenerated::AboutDlgGenerated( wxWindow* parent, wxWindowID id, const wxS bSizer172 = new wxBoxSizer( wxHORIZONTAL ); m_hyperlink8 = new wxHyperlinkCtrl( m_panel33, wxID_ANY, _("Loki"), wxT("http://loki-lib.sourceforge.net/"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE ); - m_hyperlink8->SetBackgroundColour( wxColour( 224, 224, 224 ) ); + m_hyperlink8->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); bSizer172->Add( m_hyperlink8, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); m_hyperlink15 = new wxHyperlinkCtrl( m_panel33, wxID_ANY, _("zenXML"), wxT("http://zenxml.sourceforge.net/"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE ); - m_hyperlink15->SetBackgroundColour( wxColour( 224, 224, 224 ) ); + m_hyperlink15->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); bSizer172->Add( m_hyperlink15, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); m_hyperlink12 = new wxHyperlinkCtrl( m_panel33, wxID_ANY, _("Google Test"), wxT("http://code.google.com/p/googletest"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE ); - m_hyperlink12->SetBackgroundColour( wxColour( 224, 224, 224 ) ); + m_hyperlink12->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); bSizer172->Add( m_hyperlink12, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); m_hyperlink18 = new wxHyperlinkCtrl( m_panel33, wxID_ANY, _("Unicode NSIS"), wxT("http://www.scratchpaper.com"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE ); - m_hyperlink18->SetBackgroundColour( wxColour( 224, 224, 224 ) ); + m_hyperlink18->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); bSizer172->Add( m_hyperlink18, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); m_hyperlink14 = new wxHyperlinkCtrl( m_panel33, wxID_ANY, _("wxFormBuilder"), wxT("http://wxformbuilder.org"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE ); - m_hyperlink14->SetBackgroundColour( wxColour( 224, 224, 224 ) ); + m_hyperlink14->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); bSizer172->Add( m_hyperlink14, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); @@ -2505,7 +2669,7 @@ AboutDlgGenerated::AboutDlgGenerated( wxWindow* parent, wxWindowID id, const wxS m_hyperlink21 = new wxHyperlinkCtrl( m_panel33, wxID_ANY, _("- ZenJu -"), wxT("mailto:zhnmju123@gmx.de"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE ); m_hyperlink21->SetFont( wxFont( 10, 74, 93, 92, false, wxT("Segoe Print") ) ); - m_hyperlink21->SetBackgroundColour( wxColour( 224, 224, 224 ) ); + m_hyperlink21->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); m_hyperlink21->SetToolTip( _("zhnmju123@gmx.de") ); bSizerCodeInfo->Add( m_hyperlink21, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); @@ -2531,7 +2695,7 @@ AboutDlgGenerated::AboutDlgGenerated( wxWindow* parent, wxWindowID id, const wxS bSizer170->Add( m_hyperlink1, 0, wxALIGN_CENTER_VERTICAL, 5 ); - m_bitmap9 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 48,48 ), 0 ); + m_bitmap9 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), 0 ); m_bitmap9->SetToolTip( _("FreeFileSync at Sourceforge") ); bSizer170->Add( m_bitmap9, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); @@ -2554,7 +2718,7 @@ AboutDlgGenerated::AboutDlgGenerated( wxWindow* parent, wxWindowID id, const wxS bSizer1711->Add( m_hyperlink2, 0, wxALIGN_CENTER_VERTICAL, 5 ); - m_bitmap10 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 48,48 ), 0 ); + m_bitmap10 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), 0 ); m_bitmap10->SetToolTip( _("Email") ); bSizer1711->Add( m_bitmap10, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); @@ -2570,7 +2734,7 @@ AboutDlgGenerated::AboutDlgGenerated( wxWindow* parent, wxWindowID id, const wxS m_scrolledWindowTranslators = new wxScrolledWindow( this, wxID_ANY, wxDefaultPosition, wxSize( -1,-1 ), wxDOUBLE_BORDER|wxHSCROLL|wxVSCROLL ); m_scrolledWindowTranslators->SetScrollRate( 5, 5 ); - m_scrolledWindowTranslators->SetBackgroundColour( wxColour( 224, 224, 224 ) ); + m_scrolledWindowTranslators->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); m_scrolledWindowTranslators->SetMinSize( wxSize( -1,180 ) ); bSizerTranslators = new wxBoxSizer( wxVERTICAL ); @@ -2597,31 +2761,54 @@ AboutDlgGenerated::AboutDlgGenerated( wxWindow* parent, wxWindowID id, const wxS bSizerTranslators->Fit( m_scrolledWindowTranslators ); bSizer53->Add( m_scrolledWindowTranslators, 0, wxALIGN_CENTER_HORIZONTAL|wxBOTTOM|wxEXPAND, 5 ); - wxStaticBoxSizer* sbSizer28; - sbSizer28 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("If you like FreeFileSync") ), wxHORIZONTAL ); + m_panel40 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + m_panel40->SetBackgroundColour( wxColour( 153, 170, 187 ) ); + wxBoxSizer* bSizer183; + bSizer183 = new wxBoxSizer( wxVERTICAL ); - sbSizer28->Add( 0, 0, 1, wxEXPAND, 5 ); + m_panel39 = new wxPanel( m_panel40, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + m_panel39->SetBackgroundColour( wxColour( 221, 221, 255 ) ); + + wxBoxSizer* bSizer184; + bSizer184 = new wxBoxSizer( wxHORIZONTAL ); + + m_staticText83 = new wxStaticText( m_panel39, wxID_ANY, _("If you like FreeFileSync"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText83->Wrap( -1 ); + m_staticText83->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 93, 92, false, wxEmptyString ) ); + m_staticText83->SetForegroundColour( wxColour( 0, 0, 0 ) ); - m_hyperlink3 = new wxHyperlinkCtrl( this, wxID_ANY, _("Donate with PayPal"), wxT("https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=zhnmju123@gmx.de&lc=US¤cy_code=EUR"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE ); + bSizer184->Add( m_staticText83, 0, wxALL, 5 ); + + + bSizer184->Add( 0, 0, 1, wxEXPAND, 5 ); + + m_hyperlink3 = new wxHyperlinkCtrl( m_panel39, wxID_ANY, _("Donate with PayPal"), wxT("https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=zhnmju123@gmx.de&lc=US¤cy_code=EUR"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE ); m_hyperlink3->SetFont( wxFont( 10, 70, 90, 92, true, wxEmptyString ) ); + m_hyperlink3->SetBackgroundColour( wxColour( 221, 221, 255 ) ); m_hyperlink3->SetToolTip( _("https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=zhnmju123@gmx.de&lc=US¤cy_code=EUR") ); - sbSizer28->Add( m_hyperlink3, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); + bSizer184->Add( m_hyperlink3, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); - m_bitmapPaypal = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + m_bitmapPaypal = new wxStaticBitmap( m_panel39, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); m_bitmapPaypal->SetToolTip( _("Donate with PayPal") ); - sbSizer28->Add( m_bitmapPaypal, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); + bSizer184->Add( m_bitmapPaypal, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); - sbSizer28->Add( 0, 0, 1, wxEXPAND, 5 ); + bSizer184->Add( 0, 0, 1, wxEXPAND, 5 ); - bSizer53->Add( sbSizer28, 0, wxBOTTOM|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); + m_panel39->SetSizer( bSizer184 ); + m_panel39->Layout(); + bSizer184->Fit( m_panel39 ); + bSizer183->Add( m_panel39, 0, wxEXPAND|wxALL, 5 ); - bSizer31->Add( bSizer53, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND|wxRIGHT|wxLEFT, 25 ); + m_panel40->SetSizer( bSizer183 ); + m_panel40->Layout(); + bSizer183->Fit( m_panel40 ); + bSizer53->Add( m_panel40, 0, wxEXPAND|wxBOTTOM, 5 ); wxStaticBoxSizer* sbSizer14; sbSizer14 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Published under the GNU General Public License") ), wxHORIZONTAL ); @@ -2629,17 +2816,20 @@ AboutDlgGenerated::AboutDlgGenerated( wxWindow* parent, wxWindowID id, const wxS sbSizer14->Add( 0, 0, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); - m_bitmap13 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 88,31 ), 0 ); + m_bitmap13 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), 0 ); sbSizer14->Add( m_bitmap13, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); m_hyperlink5 = new wxHyperlinkCtrl( this, wxID_ANY, _("http://www.gnu.org/licenses/gpl.html"), wxT("http://www.gnu.org/licenses/gpl.html"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE ); - sbSizer14->Add( m_hyperlink5, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + sbSizer14->Add( m_hyperlink5, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); sbSizer14->Add( 0, 0, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); - bSizer31->Add( sbSizer14, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND|wxRIGHT|wxLEFT, 5 ); + bSizer53->Add( sbSizer14, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); + + + bSizer31->Add( bSizer53, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND|wxRIGHT|wxLEFT, 25 ); m_buttonOkay = new wxButton( this, wxID_OK, _("OK"), wxDefaultPosition, wxSize( 100,30 ), 0 ); m_buttonOkay->SetDefault(); @@ -2670,6 +2860,7 @@ AboutDlgGenerated::~AboutDlgGenerated() 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( wxSize( 300,160 ), wxDefaultSize ); + this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); wxBoxSizer* bSizer24; bSizer24 = new wxBoxSizer( wxVERTICAL ); @@ -2680,47 +2871,61 @@ ErrorDlgGenerated::ErrorDlgGenerated( wxWindow* parent, wxWindowID id, const wxS 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( wxColour( 224, 224, 224 ) ); + m_bitmap10 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), 0 ); + bSizer26->Add( m_bitmap10, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 ); - bSizer26->Add( m_textCtrl8, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 ); + m_textCtrl8 = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 400,130 ), wxTE_MULTILINE|wxTE_READONLY|wxNO_BORDER ); + bSizer26->Add( m_textCtrl8, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); bSizer24->Add( bSizer26, 1, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); - m_checkBoxIgnoreErrors = new wxCheckBox( this, wxID_ANY, _("Ignore further errors"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticline6 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizer24->Add( m_staticline6, 0, wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxTOP, 5 ); + + m_panel33 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + m_panel33->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) ); + + wxBoxSizer* bSizer177; + bSizer177 = new wxBoxSizer( wxVERTICAL ); + + m_checkBoxIgnoreErrors = new wxCheckBox( m_panel33, wxID_ANY, _("Ignore further errors"), wxDefaultPosition, wxDefaultSize, 0 ); m_checkBoxIgnoreErrors->SetToolTip( _("Hide further error messages during the current process") ); - bSizer24->Add( m_checkBoxIgnoreErrors, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP, 5 ); + bSizer177->Add( m_checkBoxIgnoreErrors, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP, 5 ); wxBoxSizer* bSizer25; bSizer25 = new wxBoxSizer( wxHORIZONTAL ); - m_buttonIgnore = new wxButton( this, wxID_OK, _("&Ignore"), wxDefaultPosition, wxSize( -1,30 ), 0 ); + m_buttonIgnore = new wxButton( m_panel33, wxID_OK, _("&Ignore"), wxDefaultPosition, wxSize( -1,30 ), 0 ); m_buttonIgnore->SetDefault(); m_buttonIgnore->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); bSizer25->Add( m_buttonIgnore, 0, wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 ); - m_buttonRetry = new wxButton( this, wxID_RETRY, _("&Retry"), wxDefaultPosition, wxSize( -1,30 ), 0 ); + m_buttonRetry = new wxButton( m_panel33, wxID_RETRY, _("&Retry"), wxDefaultPosition, wxSize( -1,30 ), 0 ); m_buttonRetry->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); bSizer25->Add( m_buttonRetry, 0, wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 ); - m_buttonAbort = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize( -1,30 ), 0 ); + m_buttonAbort = new wxButton( m_panel33, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize( -1,30 ), 0 ); m_buttonAbort->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); bSizer25->Add( m_buttonAbort, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 ); - bSizer24->Add( bSizer25, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + bSizer177->Add( bSizer25, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + + + m_panel33->SetSizer( bSizer177 ); + m_panel33->Layout(); + bSizer177->Fit( m_panel33 ); + bSizer24->Add( m_panel33, 0, wxEXPAND, 5 ); this->SetSizer( bSizer24 ); this->Layout(); + bSizer24->Fit( this ); this->Centre( wxBOTH ); @@ -2744,6 +2949,7 @@ ErrorDlgGenerated::~ErrorDlgGenerated() WarningDlgGenerated::WarningDlgGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) { this->SetSizeHints( wxSize( 300,160 ), wxDefaultSize ); + this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); wxBoxSizer* bSizer24; bSizer24 = new wxBoxSizer( wxVERTICAL ); @@ -2754,45 +2960,59 @@ WarningDlgGenerated::WarningDlgGenerated( wxWindow* parent, wxWindowID id, const 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_bitmap10 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), 0 ); + bSizer26->Add( m_bitmap10, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 ); - m_textCtrl8 = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), wxTE_MULTILINE|wxTE_READONLY ); - m_textCtrl8->SetBackgroundColour( wxColour( 224, 224, 224 ) ); - - bSizer26->Add( m_textCtrl8, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 ); + m_textCtrl8 = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 400,130 ), wxTE_MULTILINE|wxTE_READONLY|wxNO_BORDER ); + bSizer26->Add( m_textCtrl8, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); bSizer24->Add( bSizer26, 1, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); - m_checkBoxDontShowAgain = new wxCheckBox( this, wxID_ANY, _("Do not show this dialog again"), wxDefaultPosition, wxDefaultSize, 0 ); - bSizer24->Add( m_checkBoxDontShowAgain, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP, 5 ); + m_staticline7 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizer24->Add( m_staticline7, 0, wxEXPAND|wxTOP, 5 ); + + m_panel34 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + m_panel34->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) ); + + wxBoxSizer* bSizer178; + bSizer178 = new wxBoxSizer( wxVERTICAL ); + + m_checkBoxDontShowAgain = new wxCheckBox( m_panel34, wxID_ANY, _("Do not show this dialog again"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer178->Add( m_checkBoxDontShowAgain, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP, 5 ); wxBoxSizer* bSizer25; bSizer25 = new wxBoxSizer( wxHORIZONTAL ); - m_buttonIgnore = new wxButton( this, wxID_IGNORE, _("&Ignore"), wxDefaultPosition, wxSize( -1,30 ), 0 ); + m_buttonIgnore = new wxButton( m_panel34, wxID_IGNORE, _("&Ignore"), wxDefaultPosition, wxSize( -1,30 ), 0 ); m_buttonIgnore->SetDefault(); m_buttonIgnore->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); bSizer25->Add( m_buttonIgnore, 0, wxTOP|wxBOTTOM|wxLEFT, 5 ); - m_buttonSwitch = new wxButton( this, wxID_MORE, _("&Switch"), wxDefaultPosition, wxSize( -1,30 ), 0 ); + m_buttonSwitch = new wxButton( m_panel34, wxID_MORE, _("&Switch"), wxDefaultPosition, wxSize( -1,30 ), 0 ); m_buttonSwitch->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); bSizer25->Add( m_buttonSwitch, 0, wxTOP|wxBOTTOM|wxLEFT, 5 ); - m_buttonAbort = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize( -1,30 ), 0 ); + m_buttonAbort = new wxButton( m_panel34, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize( -1,30 ), 0 ); m_buttonAbort->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); bSizer25->Add( m_buttonAbort, 0, wxTOP|wxBOTTOM|wxLEFT, 5 ); - bSizer24->Add( bSizer25, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + bSizer178->Add( bSizer25, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + + + m_panel34->SetSizer( bSizer178 ); + m_panel34->Layout(); + bSizer178->Fit( m_panel34 ); + bSizer24->Add( m_panel34, 0, wxEXPAND, 5 ); this->SetSizer( bSizer24 ); this->Layout(); + bSizer24->Fit( this ); this->Centre( wxBOTH ); @@ -2816,6 +3036,7 @@ WarningDlgGenerated::~WarningDlgGenerated() QuestionDlgGenerated::QuestionDlgGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) { this->SetSizeHints( wxSize( 300,160 ), wxDefaultSize ); + this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); wxBoxSizer* bSizer24; bSizer24 = new wxBoxSizer( wxVERTICAL ); @@ -2826,45 +3047,59 @@ QuestionDlgGenerated::QuestionDlgGenerated( wxWindow* parent, wxWindowID id, con 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_bitmap10 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), 0 ); + bSizer26->Add( m_bitmap10, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 ); - m_textCtrl8 = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), wxTE_MULTILINE|wxTE_READONLY ); - m_textCtrl8->SetBackgroundColour( wxColour( 224, 224, 224 ) ); - - bSizer26->Add( m_textCtrl8, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 ); + m_textCtrl8 = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 400,130 ), wxTE_MULTILINE|wxTE_READONLY|wxNO_BORDER ); + bSizer26->Add( m_textCtrl8, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); bSizer24->Add( bSizer26, 1, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); - m_checkBox = new wxCheckBox( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - bSizer24->Add( m_checkBox, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP, 5 ); + m_staticline8 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizer24->Add( m_staticline8, 0, wxEXPAND|wxTOP, 5 ); + + m_panel35 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + m_panel35->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) ); + + wxBoxSizer* bSizer179; + bSizer179 = new wxBoxSizer( wxVERTICAL ); + + m_checkBox = new wxCheckBox( m_panel35, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer179->Add( m_checkBox, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP, 5 ); wxBoxSizer* bSizer25; bSizer25 = new wxBoxSizer( wxHORIZONTAL ); - m_buttonYes = new wxButton( this, wxID_YES, _("&Yes"), wxDefaultPosition, wxSize( -1,30 ), 0 ); + m_buttonYes = new wxButton( m_panel35, wxID_YES, _("&Yes"), wxDefaultPosition, wxSize( -1,30 ), 0 ); m_buttonYes->SetDefault(); m_buttonYes->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); bSizer25->Add( m_buttonYes, 0, wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 ); - m_buttonNo = new wxButton( this, wxID_NO, _("&No"), wxDefaultPosition, wxSize( -1,30 ), 0 ); + m_buttonNo = new wxButton( m_panel35, wxID_NO, _("&No"), wxDefaultPosition, wxSize( -1,30 ), 0 ); m_buttonNo->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); bSizer25->Add( m_buttonNo, 0, wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 ); - m_buttonCancel = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize( -1,30 ), 0 ); + m_buttonCancel = new wxButton( m_panel35, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize( -1,30 ), 0 ); m_buttonCancel->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); bSizer25->Add( m_buttonCancel, 0, wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 ); - bSizer24->Add( bSizer25, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + bSizer179->Add( bSizer25, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + + + m_panel35->SetSizer( bSizer179 ); + m_panel35->Layout(); + bSizer179->Fit( m_panel35 ); + bSizer24->Add( m_panel35, 0, wxEXPAND, 5 ); this->SetSizer( bSizer24 ); this->Layout(); + bSizer24->Fit( this ); this->Centre( wxBOTH ); @@ -2887,30 +3122,53 @@ QuestionDlgGenerated::~QuestionDlgGenerated() DeleteDlgGenerated::DeleteDlgGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) { - this->SetSizeHints( wxSize( 400,220 ), wxDefaultSize ); + this->SetSizeHints( wxSize( 300,180 ), wxDefaultSize ); + this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); wxBoxSizer* bSizer24; bSizer24 = new wxBoxSizer( wxVERTICAL ); + m_panelHeader = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + m_panelHeader->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) ); + + wxBoxSizer* bSizer181; + bSizer181 = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bSizer41; bSizer41 = new wxBoxSizer( wxHORIZONTAL ); - m_bitmap12 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), 0 ); + m_bitmap12 = new wxStaticBitmap( m_panelHeader, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), 0 ); bSizer41->Add( m_bitmap12, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); - m_staticTextHeader = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextHeader = new wxStaticText( m_panelHeader, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextHeader->Wrap( -1 ); m_staticTextHeader->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); bSizer41->Add( m_staticTextHeader, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - bSizer24->Add( bSizer41, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP|wxRIGHT|wxLEFT, 5 ); + bSizer181->Add( bSizer41, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5 ); + - m_textCtrlMessage = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), wxTE_DONTWRAP|wxTE_MULTILINE|wxTE_READONLY ); - m_textCtrlMessage->SetBackgroundColour( wxColour( 224, 224, 224 ) ); + m_panelHeader->SetSizer( bSizer181 ); + m_panelHeader->Layout(); + bSizer181->Fit( m_panelHeader ); + bSizer24->Add( m_panelHeader, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); - bSizer24->Add( m_textCtrlMessage, 1, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT|wxLEFT|wxEXPAND, 5 ); + m_staticline91 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizer24->Add( m_staticline91, 0, wxEXPAND|wxBOTTOM, 5 ); + + m_textCtrlFileList = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 550,200 ), wxTE_DONTWRAP|wxTE_MULTILINE|wxTE_READONLY|wxNO_BORDER ); + bSizer24->Add( m_textCtrlFileList, 1, wxEXPAND|wxLEFT, 5 ); + + m_staticline9 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizer24->Add( m_staticline9, 0, wxEXPAND|wxTOP, 5 ); + + m_panel36 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + m_panel36->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) ); + + wxBoxSizer* bSizer180; + bSizer180 = new wxBoxSizer( wxVERTICAL ); wxBoxSizer* bSizer179; bSizer179 = new wxBoxSizer( wxHORIZONTAL ); @@ -2918,10 +3176,10 @@ DeleteDlgGenerated::DeleteDlgGenerated( wxWindow* parent, wxWindowID id, const w wxBoxSizer* bSizer99; bSizer99 = new wxBoxSizer( wxVERTICAL ); - m_checkBoxUseRecycler = new wxCheckBox( this, wxID_ANY, _("Use Recycle Bin"), wxDefaultPosition, wxDefaultSize, 0 ); + m_checkBoxUseRecycler = new wxCheckBox( m_panel36, wxID_ANY, _("Use Recycle Bin"), wxDefaultPosition, wxDefaultSize, 0 ); bSizer99->Add( m_checkBoxUseRecycler, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM, 5 ); - m_checkBoxDeleteBothSides = new wxCheckBox( this, wxID_ANY, _("Delete on both sides"), wxDefaultPosition, wxDefaultSize, 0 ); + m_checkBoxDeleteBothSides = new wxCheckBox( m_panel36, wxID_ANY, _("Delete on both sides"), wxDefaultPosition, wxDefaultSize, 0 ); m_checkBoxDeleteBothSides->SetToolTip( _("Delete on both sides even if the file is selected on one side only") ); bSizer99->Add( m_checkBoxDeleteBothSides, 0, wxALIGN_CENTER_VERTICAL, 5 ); @@ -2935,13 +3193,13 @@ DeleteDlgGenerated::DeleteDlgGenerated( wxWindow* parent, wxWindowID id, const w wxBoxSizer* bSizer25; bSizer25 = new wxBoxSizer( wxHORIZONTAL ); - m_buttonOK = new wxButton( this, wxID_OK, _("OK"), wxDefaultPosition, wxSize( -1,30 ), 0 ); + m_buttonOK = new wxButton( m_panel36, wxID_OK, _("OK"), wxDefaultPosition, wxSize( -1,30 ), 0 ); m_buttonOK->SetDefault(); m_buttonOK->SetFont( wxFont( 10, 70, 90, 92, false, wxEmptyString ) ); bSizer25->Add( m_buttonOK, 0, wxTOP|wxBOTTOM|wxLEFT, 5 ); - m_buttonCancel = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize( -1,30 ), 0 ); + m_buttonCancel = new wxButton( m_panel36, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize( -1,30 ), 0 ); m_buttonCancel->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); bSizer25->Add( m_buttonCancel, 0, wxALL, 5 ); @@ -2950,11 +3208,18 @@ DeleteDlgGenerated::DeleteDlgGenerated( wxWindow* parent, wxWindowID id, const w bSizer179->Add( bSizer25, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - bSizer24->Add( bSizer179, 0, wxEXPAND, 5 ); + bSizer180->Add( bSizer179, 0, wxEXPAND, 5 ); + + + m_panel36->SetSizer( bSizer180 ); + m_panel36->Layout(); + bSizer180->Fit( m_panel36 ); + bSizer24->Add( m_panel36, 0, wxEXPAND, 5 ); this->SetSizer( bSizer24 ); this->Layout(); + bSizer24->Fit( this ); this->Centre( wxBOTH ); @@ -3003,6 +3268,7 @@ FilterDlgGenerated::FilterDlgGenerated( wxWindow* parent, wxWindowID id, const w m_staticTexHeader = new wxStaticText( m_panel8, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTexHeader->Wrap( -1 ); m_staticTexHeader->SetFont( wxFont( 14, 70, 90, 92, false, wxEmptyString ) ); + m_staticTexHeader->SetForegroundColour( wxColour( 0, 0, 0 ) ); bSizer72->Add( m_staticTexHeader, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5 ); @@ -3027,59 +3293,6 @@ FilterDlgGenerated::FilterDlgGenerated( wxWindow* parent, wxWindowID id, const w bSizer21->Add( bSizer70, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP|wxRIGHT|wxLEFT|wxEXPAND, 5 ); - m_panel13 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - wxBoxSizer* bSizer69; - bSizer69 = new wxBoxSizer( wxVERTICAL ); - - m_staticline10 = new wxStaticLine( m_panel13, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - bSizer69->Add( m_staticline10, 0, wxEXPAND, 5 ); - - wxBoxSizer* bSizer52; - bSizer52 = new wxBoxSizer( wxVERTICAL ); - - m_staticText45 = new wxStaticText( m_panel13, wxID_ANY, _("Hints:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText45->Wrap( -1 ); - m_staticText45->SetFont( wxFont( 10, 70, 90, 92, true, wxEmptyString ) ); - - bSizer52->Add( m_staticText45, 0, wxBOTTOM, 5 ); - - m_staticText83 = new wxStaticText( m_panel13, wxID_ANY, _("1. Enter relative file or directory names separated by ';' or a new line."), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText83->Wrap( -1 ); - bSizer52->Add( m_staticText83, 0, 0, 5 ); - - m_staticText84 = new wxStaticText( m_panel13, wxID_ANY, _("2. Use wildcard characters '*' and '?'."), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText84->Wrap( -1 ); - bSizer52->Add( m_staticText84, 0, 0, 5 ); - - m_staticText85 = new wxStaticText( m_panel13, wxID_ANY, _("3. Exclude files directly on main grid via context menu."), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText85->Wrap( -1 ); - bSizer52->Add( m_staticText85, 0, 0, 5 ); - - - bSizer69->Add( bSizer52, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP, 5 ); - - wxStaticBoxSizer* sbSizer21; - sbSizer21 = new wxStaticBoxSizer( new wxStaticBox( m_panel13, wxID_ANY, _("Example") ), wxHORIZONTAL ); - - m_staticText181 = new wxStaticText( m_panel13, wxID_ANY, _("Include: *.doc;*.zip;*.exe\nExclude: \\stuff\\temp\\*"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText181->Wrap( -1 ); - sbSizer21->Add( m_staticText181, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); - - m_staticText1811 = new wxStaticText( m_panel13, wxID_ANY, _("Synchronize all .doc, .zip and .exe files except everything in subfolder \"temp\"."), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText1811->Wrap( 250 ); - m_staticText1811->SetFont( wxFont( 8, 70, 93, 90, false, wxEmptyString ) ); - - sbSizer21->Add( m_staticText1811, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); - - - bSizer69->Add( sbSizer21, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP, 5 ); - - - m_panel13->SetSizer( bSizer69 ); - m_panel13->Layout(); - bSizer69->Fit( m_panel13 ); - bSizer21->Add( m_panel13, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 ); - wxBoxSizer* bSizer159; bSizer159 = new wxBoxSizer( wxHORIZONTAL ); @@ -3228,11 +3441,11 @@ FilterDlgGenerated::FilterDlgGenerated( wxWindow* parent, wxWindowID id, const w bSizer22->Add( 0, 0, 1, wxALIGN_CENTER_VERTICAL, 5 ); - m_button10 = new wxButton( this, wxID_OK, _("OK"), wxDefaultPosition, wxSize( -1,30 ), 0 ); - m_button10->SetDefault(); - m_button10->SetFont( wxFont( 10, 70, 90, 92, false, wxEmptyString ) ); + m_buttonOk = new wxButton( this, wxID_OK, _("OK"), wxDefaultPosition, wxSize( -1,30 ), 0 ); + m_buttonOk->SetDefault(); + m_buttonOk->SetFont( wxFont( 10, 70, 90, 92, false, wxEmptyString ) ); - bSizer22->Add( m_button10, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 ); + bSizer22->Add( m_buttonOk, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 ); m_button17 = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize( -1,30 ), 0 ); m_button17->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); @@ -3258,7 +3471,7 @@ FilterDlgGenerated::FilterDlgGenerated( wxWindow* parent, wxWindowID id, const w m_choiceUnitMinSize->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( FilterDlgGenerated::OnUpdateChoice ), NULL, this ); m_choiceUnitMaxSize->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( FilterDlgGenerated::OnUpdateChoice ), NULL, this ); m_button9->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FilterDlgGenerated::OnDefault ), NULL, this ); - m_button10->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FilterDlgGenerated::OnApply ), NULL, this ); + m_buttonOk->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FilterDlgGenerated::OnApply ), NULL, this ); m_button17->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FilterDlgGenerated::OnCancel ), NULL, this ); } @@ -3273,14 +3486,14 @@ FilterDlgGenerated::~FilterDlgGenerated() m_choiceUnitMinSize->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( FilterDlgGenerated::OnUpdateChoice ), NULL, this ); m_choiceUnitMaxSize->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( FilterDlgGenerated::OnUpdateChoice ), NULL, this ); m_button9->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FilterDlgGenerated::OnDefault ), NULL, this ); - m_button10->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FilterDlgGenerated::OnApply ), NULL, this ); + m_buttonOk->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FilterDlgGenerated::OnApply ), NULL, this ); m_button17->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FilterDlgGenerated::OnCancel ), NULL, this ); } GlobalSettingsDlgGenerated::GlobalSettingsDlgGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) { - this->SetSizeHints( wxSize( 280,230 ), wxDefaultSize ); + this->SetSizeHints( wxSize( 300,360 ), wxDefaultSize ); wxBoxSizer* bSizer95; bSizer95 = new wxBoxSizer( wxVERTICAL ); @@ -3300,6 +3513,7 @@ GlobalSettingsDlgGenerated::GlobalSettingsDlgGenerated( wxWindow* parent, wxWind m_staticText56 = new wxStaticText( m_panel8, wxID_ANY, _("Global settings"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText56->Wrap( -1 ); m_staticText56->SetFont( wxFont( 14, 70, 90, 92, false, wxEmptyString ) ); + m_staticText56->SetForegroundColour( wxColour( 0, 0, 0 ) ); bSizer72->Add( m_staticText56, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5 ); @@ -3315,11 +3529,11 @@ GlobalSettingsDlgGenerated::GlobalSettingsDlgGenerated( wxWindow* parent, wxWind wxStaticBoxSizer* sbSizer23; sbSizer23 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, wxEmptyString ), wxVERTICAL ); - m_checkBoxTransCopy = new wxCheckBox( this, wxID_ANY, _("Transactional file copy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_checkBoxTransCopy = new wxCheckBox( this, wxID_ANY, _("Fail-safe file copy"), wxDefaultPosition, wxDefaultSize, 0 ); sbSizer23->Add( m_checkBoxTransCopy, 0, wxEXPAND|wxALL, 5 ); m_staticText82 = new wxStaticText( this, wxID_ANY, _("Write to a temporary file (*.ffs_tmp) first then rename it. This guarantees a consistent state even in case of fatal error."), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText82->Wrap( 400 ); + m_staticText82->Wrap( 420 ); m_staticText82->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) ); sbSizer23->Add( m_staticText82, 0, wxLEFT, 20 ); @@ -3328,7 +3542,7 @@ GlobalSettingsDlgGenerated::GlobalSettingsDlgGenerated( wxWindow* parent, wxWind sbSizer23->Add( m_checkBoxCopyLocked, 0, wxALL|wxEXPAND, 5 ); m_staticTextCopyLocked = new wxStaticText( this, wxID_ANY, _("Copy shared or locked files using Volume Shadow Copy Service (Requires Administrator rights)"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextCopyLocked->Wrap( 400 ); + m_staticTextCopyLocked->Wrap( 420 ); m_staticTextCopyLocked->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) ); sbSizer23->Add( m_staticTextCopyLocked, 0, wxLEFT|wxEXPAND, 20 ); @@ -3336,8 +3550,8 @@ GlobalSettingsDlgGenerated::GlobalSettingsDlgGenerated( wxWindow* parent, wxWind m_checkBoxCopyPermissions = new wxCheckBox( this, wxID_ANY, _("Copy file access permissions"), wxDefaultPosition, wxDefaultSize, 0 ); sbSizer23->Add( m_checkBoxCopyPermissions, 0, wxALL|wxEXPAND, 5 ); - m_staticText8211 = new wxStaticText( this, wxID_ANY, _("Transfer file and directory permissions (Requires Administrator rights)"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText8211->Wrap( 400 ); + m_staticText8211 = new wxStaticText( this, wxID_ANY, _("Transfer file and folder permissions (Requires Administrator rights)"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText8211->Wrap( 420 ); m_staticText8211->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) ); sbSizer23->Add( m_staticText8211, 0, wxLEFT|wxEXPAND, 20 ); @@ -3503,119 +3717,90 @@ SyncPreviewDlgGenerated::SyncPreviewDlgGenerated( wxWindow* parent, wxWindowID i wxStaticBoxSizer* sbSizer161; sbSizer161 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Statistics") ), wxVERTICAL ); - wxBoxSizer* bSizer157; - bSizer157 = new wxBoxSizer( wxHORIZONTAL ); - - wxFlexGridSizer* fgSizer5; - fgSizer5 = new wxFlexGridSizer( 0, 2, 0, 5 ); - fgSizer5->SetFlexibleDirection( wxHORIZONTAL ); - fgSizer5->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - - - fgSizer5->Add( 0, 0, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); - - m_staticText94 = new wxStaticText( this, wxID_ANY, _("Left"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText94->Wrap( -1 ); - m_staticText94->SetFont( wxFont( 9, 70, 90, 92, false, wxEmptyString ) ); - - fgSizer5->Add( m_staticText94, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + wxFlexGridSizer* fgSizer11; + fgSizer11 = new wxFlexGridSizer( 2, 7, 2, 5 ); + fgSizer11->SetFlexibleDirection( wxBOTH ); + fgSizer11->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - m_bitmapCreate = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); - m_bitmapCreate->SetToolTip( _("Number of files and directories that will be created") ); + m_bitmapCreateLeft = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + m_bitmapCreateLeft->SetToolTip( _("Number of files and folders that will be created") ); - fgSizer5->Add( m_bitmapCreate, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); + fgSizer11->Add( m_bitmapCreateLeft, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); - m_textCtrlCreateL = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 80,-1 ), wxTE_READONLY|wxTE_RIGHT ); - m_textCtrlCreateL->SetBackgroundColour( wxColour( 224, 224, 224 ) ); - m_textCtrlCreateL->SetToolTip( _("Number of files and directories that will be created") ); + m_bitmapUpdateLeft = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + m_bitmapUpdateLeft->SetToolTip( _("Number of files that will be overwritten") ); - fgSizer5->Add( m_textCtrlCreateL, 0, wxALIGN_CENTER_VERTICAL, 5 ); + fgSizer11->Add( m_bitmapUpdateLeft, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - m_bitmapUpdate = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); - m_bitmapUpdate->SetToolTip( _("Number of files that will be overwritten") ); + m_bitmapDeleteLeft = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + m_bitmapDeleteLeft->SetToolTip( _("Number of files and folders that will be deleted") ); - fgSizer5->Add( m_bitmapUpdate, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); + fgSizer11->Add( m_bitmapDeleteLeft, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - m_textCtrlUpdateL = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 80,-1 ), wxTE_READONLY|wxTE_RIGHT ); - m_textCtrlUpdateL->SetBackgroundColour( wxColour( 224, 224, 224 ) ); - m_textCtrlUpdateL->SetToolTip( _("Number of files that will be overwritten") ); - - fgSizer5->Add( m_textCtrlUpdateL, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - m_bitmapDelete = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); - m_bitmapDelete->SetToolTip( _("Number of files and directories that will be deleted") ); - - fgSizer5->Add( m_bitmapDelete, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - - m_textCtrlDeleteL = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 80,-1 ), wxTE_READONLY|wxTE_RIGHT ); - m_textCtrlDeleteL->SetBackgroundColour( wxColour( 224, 224, 224 ) ); - m_textCtrlDeleteL->SetToolTip( _("Number of files and directories that will be deleted") ); - - fgSizer5->Add( m_textCtrlDeleteL, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - - bSizer157->Add( fgSizer5, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); - - wxFlexGridSizer* fgSizer51; - fgSizer51 = new wxFlexGridSizer( 0, 1, 0, 5 ); - fgSizer51->SetFlexibleDirection( wxHORIZONTAL ); - fgSizer51->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - - m_staticText95 = new wxStaticText( this, wxID_ANY, _("Right"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText95->Wrap( -1 ); - m_staticText95->SetFont( wxFont( 9, 70, 90, 92, false, wxEmptyString ) ); - - fgSizer51->Add( m_staticText95, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + m_bitmapData = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + m_bitmapData->SetToolTip( _("Total amount of data that will be transferred") ); - m_textCtrlCreateR = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 80,-1 ), wxTE_READONLY|wxTE_RIGHT ); - m_textCtrlCreateR->SetBackgroundColour( wxColour( 224, 224, 224 ) ); - m_textCtrlCreateR->SetToolTip( _("Number of files and directories that will be created") ); + fgSizer11->Add( m_bitmapData, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); - fgSizer51->Add( m_textCtrlCreateR, 0, wxALIGN_CENTER_VERTICAL, 5 ); + m_bitmapDeleteRight = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + m_bitmapDeleteRight->SetToolTip( _("Number of files and folders that will be deleted") ); - m_textCtrlUpdateR = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 80,-1 ), wxTE_READONLY|wxTE_RIGHT ); - m_textCtrlUpdateR->SetBackgroundColour( wxColour( 224, 224, 224 ) ); - m_textCtrlUpdateR->SetToolTip( _("Number of files that will be overwritten") ); + fgSizer11->Add( m_bitmapDeleteRight, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - fgSizer51->Add( m_textCtrlUpdateR, 0, wxALIGN_CENTER_VERTICAL, 5 ); + m_bitmapUpdateRight = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + m_bitmapUpdateRight->SetToolTip( _("Number of files that will be overwritten") ); - m_textCtrlDeleteR = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 80,-1 ), wxTE_READONLY|wxTE_RIGHT ); - m_textCtrlDeleteR->SetBackgroundColour( wxColour( 224, 224, 224 ) ); - m_textCtrlDeleteR->SetToolTip( _("Number of files and directories that will be deleted") ); + fgSizer11->Add( m_bitmapUpdateRight, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); - fgSizer51->Add( m_textCtrlDeleteR, 0, wxALIGN_CENTER_VERTICAL, 5 ); + m_bitmapCreateRight = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + m_bitmapCreateRight->SetToolTip( _("Number of files and folders that will be created") ); + fgSizer11->Add( m_bitmapCreateRight, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); - bSizer157->Add( fgSizer51, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 ); + m_staticTextCreateLeft = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextCreateLeft->Wrap( -1 ); + m_staticTextCreateLeft->SetToolTip( _("Number of files and folders that will be created") ); + fgSizer11->Add( m_staticTextCreateLeft, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); - sbSizer161->Add( bSizer157, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); + m_staticTextUpdateLeft = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextUpdateLeft->Wrap( -1 ); + m_staticTextUpdateLeft->SetToolTip( _("Number of files that will be overwritten") ); + fgSizer11->Add( m_staticTextUpdateLeft, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); - sbSizer161->Add( 0, 10, 0, 0, 5 ); + m_staticTextDeleteLeft = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextDeleteLeft->Wrap( -1 ); + m_staticTextDeleteLeft->SetToolTip( _("Number of files and folders that will be deleted") ); - wxBoxSizer* bSizer156; - bSizer156 = new wxBoxSizer( wxHORIZONTAL ); + fgSizer11->Add( m_staticTextDeleteLeft, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - m_bitmapData = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); - m_bitmapData->SetToolTip( _("Total amount of data that will be transferred") ); + m_staticTextData = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextData->Wrap( -1 ); + m_staticTextData->SetToolTip( _("Total amount of data that will be transferred") ); - bSizer156->Add( m_bitmapData, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxRIGHT, 5 ); + fgSizer11->Add( m_staticTextData, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + m_staticTextDeleteRight = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextDeleteRight->Wrap( -1 ); + m_staticTextDeleteRight->SetToolTip( _("Number of files and folders that will be deleted") ); - bSizer156->Add( 0, 0, 1, wxEXPAND, 5 ); + fgSizer11->Add( m_staticTextDeleteRight, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - m_textCtrlData = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 80,-1 ), wxTE_CENTRE|wxTE_READONLY ); - m_textCtrlData->SetBackgroundColour( wxColour( 224, 224, 224 ) ); - m_textCtrlData->SetToolTip( _("Total amount of data that will be transferred") ); + m_staticTextUpdateRight = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextUpdateRight->Wrap( -1 ); + m_staticTextUpdateRight->SetToolTip( _("Number of files that will be overwritten") ); - bSizer156->Add( m_textCtrlData, 0, wxALIGN_CENTER_VERTICAL, 5 ); + fgSizer11->Add( m_staticTextUpdateRight, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + m_staticTextCreateRight = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextCreateRight->Wrap( -1 ); + m_staticTextCreateRight->SetToolTip( _("Number of files and folders that will be created") ); - bSizer156->Add( 0, 0, 1, wxEXPAND, 5 ); + fgSizer11->Add( m_staticTextCreateRight, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - sbSizer161->Add( bSizer156, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT|wxEXPAND, 5 ); + sbSizer161->Add( fgSizer11, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); bSizer141->Add( sbSizer161, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxALL, 5 ); @@ -3741,6 +3926,7 @@ SearchDialogGenerated::SearchDialogGenerated( wxWindow* parent, wxWindowID id, c this->SetSizer( bSizer161 ); this->Layout(); + bSizer161->Fit( this ); this->Centre( wxBOTH ); diff --git a/ui/gui_generated.h b/ui/gui_generated.h index bd7c6be4..cb608374 100644 --- a/ui/gui_generated.h +++ b/ui/gui_generated.h @@ -36,12 +36,12 @@ #include <wx/combobox.h> #include <wx/filepicker.h> #include <wx/scrolwin.h> -#include <wx/listbox.h> -#include <wx/checkbox.h> #include <wx/statbmp.h> -#include <wx/textctrl.h> #include <wx/statline.h> +#include <wx/listbox.h> +#include <wx/checkbox.h> #include <wx/frame.h> +#include <wx/textctrl.h> #include <wx/gauge.h> #include <wx/statbox.h> #include <wx/choice.h> @@ -75,8 +75,8 @@ protected: wxMenuItem* m_menuItem10; wxMenuItem* m_menuItem11; wxMenuItem* m_menuItemNew; - wxMenuItem* m_menuItemSave; wxMenuItem* m_menuItemLoad; + wxMenuItem* m_menuItemSave; wxMenu* m_menuAdvanced; wxMenu* m_menuLanguages; wxMenuItem* m_menuItemGlobSett; @@ -104,25 +104,50 @@ protected: wxScrolledWindow* m_scrolledWindowFolderPairs; wxBoxSizer* bSizerAddFolderPairs; zen::Grid* m_gridNavi; + wxPanel* m_panelCenter; zen::Grid* m_gridMain; + wxPanel* m_panelStatusBar; + wxBoxSizer* bSizerStatusLeftDirectories; + wxStaticBitmap* m_bitmapSmallDirectoryLeft; + wxStaticText* m_staticTextStatusLeftDirs; + wxBoxSizer* bSizerStatusLeftFiles; + wxStaticBitmap* m_bitmapSmallFileLeft; + wxStaticText* m_staticTextStatusLeftFiles; + wxStaticText* m_staticTextStatusLeftBytes; + wxStaticLine* m_staticline9; + wxStaticText* m_staticTextStatusMiddle; + wxStaticLine* m_staticline10; + wxBoxSizer* bSizerStatusRightDirectories; + wxStaticBitmap* m_bitmapSmallDirectoryRight; + wxStaticText* m_staticTextStatusRightDirs; + wxBoxSizer* bSizerStatusRightFiles; + wxStaticBitmap* m_bitmapSmallFileRight; + wxStaticText* m_staticTextStatusRightFiles; + wxStaticText* m_staticTextStatusRightBytes; wxPanel* m_panelConfig; wxBoxSizer* bSizerConfig; - wxBitmapButton* m_bpButtonSave; wxBitmapButton* m_bpButtonLoad; + wxBitmapButton* m_bpButtonSave; wxListBox* m_listBoxHistory; wxPanel* m_panelFilter; wxBitmapButton* m_bpButtonFilter; wxCheckBox* m_checkBoxHideFilt; wxPanel* m_panelStatistics; - wxBoxSizer* bSizerStatistics; - wxStaticBitmap* m_bitmapCreate; - wxTextCtrl* m_textCtrlCreate; - wxStaticBitmap* m_bitmapUpdate; - wxTextCtrl* m_textCtrlUpdate; - wxStaticBitmap* m_bitmapDelete; - wxTextCtrl* m_textCtrlDelete; + wxBoxSizer* bSizer1801; + wxStaticBitmap* m_bitmapCreateLeft; + wxStaticText* m_staticTextCreateLeft; + wxStaticBitmap* m_bitmapUpdateLeft; + wxStaticText* m_staticTextUpdateLeft; + wxStaticBitmap* m_bitmapDeleteLeft; + wxStaticText* m_staticTextDeleteLeft; wxStaticBitmap* m_bitmapData; - wxTextCtrl* m_textCtrlData; + wxStaticText* m_staticTextData; + wxStaticBitmap* m_bitmapDeleteRight; + wxStaticText* m_staticTextDeleteRight; + wxStaticBitmap* m_bitmapUpdateRight; + wxStaticText* m_staticTextUpdateRight; + wxStaticBitmap* m_bitmapCreateRight; + wxStaticText* m_staticTextCreateRight; wxPanel* m_panelViewFilter; wxBoxSizer* bSizerViewFilter; ToggleButton* m_bpButtonSyncCreateLeft; @@ -139,33 +164,14 @@ protected: ToggleButton* m_bpButtonSyncDirOverwRight; ToggleButton* m_bpButtonSyncCreateRight; ToggleButton* m_bpButtonConflict; - wxPanel* m_panelStatusBar; - wxBoxSizer* bSizerStatusLeftDirectories; - wxStaticBitmap* m_bitmapSmallDirectoryLeft; - wxStaticText* m_staticTextStatusLeftDirs; - wxBoxSizer* bSizerStatusLeftFiles; - wxStaticBitmap* m_bitmapSmallFileLeft; - wxStaticText* m_staticTextStatusLeftFiles; - wxStaticText* m_staticTextStatusLeftBytes; - wxStaticLine* m_staticline9; - wxStaticText* m_staticTextStatusMiddle; - wxStaticLine* m_staticline10; - wxBoxSizer* bSizerStatusRightDirectories; - wxStaticBitmap* m_bitmapSmallDirectoryRight; - wxStaticText* m_staticTextStatusRightDirs; - wxBoxSizer* bSizerStatusRightFiles; - wxStaticBitmap* m_bitmapSmallFileRight; - wxStaticText* m_staticTextStatusRightFiles; - wxStaticText* m_staticTextStatusRightBytes; - wxStaticBitmap* m_bitmapResizeCorner; // Virtual event handlers, overide them in your derived class virtual void OnClose( wxCloseEvent& event ) { event.Skip(); } virtual void OnCompare( wxCommandEvent& event ) { event.Skip(); } virtual void OnStartSync( wxCommandEvent& event ) { event.Skip(); } virtual void OnNewConfig( wxCommandEvent& event ) { event.Skip(); } - virtual void OnSaveConfig( wxCommandEvent& event ) { event.Skip(); } virtual void OnLoadConfig( wxCommandEvent& event ) { event.Skip(); } + virtual void OnSaveConfig( wxCommandEvent& event ) { event.Skip(); } virtual void OnMenuQuit( wxCommandEvent& event ) { event.Skip(); } virtual void OnMenuGlobalSettings( wxCommandEvent& event ) { event.Skip(); } virtual void OnMenuBatchJob( wxCommandEvent& event ) { event.Skip(); } @@ -210,6 +216,8 @@ public: wxPanel* m_panelTopRight; FolderHistoryBox* m_directoryRight; zen::DirPickerCtrl* m_dirPickerRight; + wxBoxSizer* bSizerStatistics; + wxBoxSizer* bSizerData; MainDialogGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 702,522 ), long style = wxDEFAULT_FRAME_STYLE|wxTAB_TRAVERSAL ); @@ -252,7 +260,6 @@ class CompareStatusGenerated : public wxPanel private: protected: - wxStaticText* m_staticText30; wxTextCtrl* m_textCtrlStatus; wxGauge* m_gauge2; wxBoxSizer* bSizer42; @@ -306,6 +313,7 @@ protected: wxBoxSizer* bSizerAddFolderPairs; wxPanel* m_panelBatchSettings; wxCheckBox* m_checkBoxShowProgress; + wxStaticText* m_staticText961; wxChoice* m_choiceHandleError; wxStaticBoxSizer* sbSizerLogfileDir; wxStaticText* m_staticText96; @@ -391,16 +399,16 @@ private: protected: wxRadioButton* m_radioBtnAutomatic; wxButton* m_buttonAutomatic; - wxStaticText* m_staticText81; + wxStaticText* m_staticTextAutomatic; wxRadioButton* m_radioBtnMirror; - wxButton* m_buttonOneWay; - wxStaticText* m_staticText8; + wxButton* m_buttonMirror; + wxStaticText* m_staticTextMirror; wxRadioButton* m_radioBtnUpdate; wxButton* m_buttonUpdate; - wxStaticText* m_staticText101; + wxStaticText* m_staticTextUpdate; wxRadioButton* m_radioBtnCustom; - wxButton* m_buttonUpdate1; - wxStaticText* m_staticText9; + wxButton* m_buttonCustom; + wxStaticText* m_staticTextCustom; wxStaticBoxSizer* sbSizerCustDelDir; wxChoice* m_choiceHandleDeletion; wxPanel* m_panelCustomDeletionDir; @@ -511,17 +519,15 @@ class SyncStatusDlgGenerated : public wxFrame private: protected: - wxPanel* m_panelBackground; wxBoxSizer* bSizerTop; + wxPanel* m_panelHeader; wxStaticBitmap* m_bitmapStatus; wxStaticText* m_staticTextStatus; wxAnimationCtrl* m_animationControl1; - wxBoxSizer* bSizerCurrentOperation; - wxStaticText* m_staticText2511; - wxTextCtrl* m_textCtrlInfo; + wxStaticLine* m_staticlineHeader; wxPanel* m_panelProgress; + wxTextCtrl* m_textCtrlStatus; wxBoxSizer* bSizer171; - wxStaticBoxSizer* bSizerProgressStat; wxStaticText* m_staticTextLabelItemsProc; wxBoxSizer* bSizerItemsProc; wxStaticText* m_staticTextProcessedObj; @@ -539,6 +545,8 @@ protected: zen::Graph2D* m_panelGraph; wxBoxSizer* bSizerFinalStat; wxListbook* m_listbookResult; + wxStaticLine* m_staticline12; + wxPanel* m_panelFooter; wxBoxSizer* bSizerExecFinished; wxStaticText* m_staticText87; ExecFinishedBox* m_comboBoxExecFinished; @@ -558,7 +566,7 @@ protected: public: wxGauge* m_gauge1; - SyncStatusDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 640,350 ), long style = wxDEFAULT_FRAME_STYLE|wxTAB_TRAVERSAL ); + SyncStatusDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_FRAME_STYLE|wxTAB_TRAVERSAL ); ~SyncStatusDlgGenerated(); @@ -575,6 +583,7 @@ protected: ToggleButton* m_bpButtonErrors; ToggleButton* m_bpButtonWarnings; ToggleButton* m_bpButtonInfo; + wxStaticLine* m_staticline13; wxTextCtrl* m_textCtrlInfo; // Virtual event handlers, overide them in your derived class @@ -624,6 +633,9 @@ protected: wxBoxSizer* bSizerTranslators; wxStaticText* m_staticText54; wxFlexGridSizer* fgSizerTranslators; + wxPanel* m_panel40; + wxPanel* m_panel39; + wxStaticText* m_staticText83; wxHyperlinkCtrl* m_hyperlink3; wxStaticBitmap* m_bitmapPaypal; wxStaticBitmap* m_bitmap13; @@ -652,6 +664,8 @@ private: protected: wxStaticBitmap* m_bitmap10; wxTextCtrl* m_textCtrl8; + wxStaticLine* m_staticline6; + wxPanel* m_panel33; wxCheckBox* m_checkBoxIgnoreErrors; wxButton* m_buttonIgnore; wxButton* m_buttonRetry; @@ -666,7 +680,7 @@ protected: public: - ErrorDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Error"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 460,250 ), long style = wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxMINIMIZE_BOX|wxRESIZE_BORDER ); + ErrorDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Error"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxMINIMIZE_BOX|wxRESIZE_BORDER ); ~ErrorDlgGenerated(); }; @@ -680,6 +694,8 @@ private: protected: wxTextCtrl* m_textCtrl8; + wxStaticLine* m_staticline7; + wxPanel* m_panel34; wxCheckBox* m_checkBoxDontShowAgain; wxButton* m_buttonIgnore; wxButton* m_buttonSwitch; @@ -695,7 +711,7 @@ protected: public: wxStaticBitmap* m_bitmap10; - WarningDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Warning"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 460,250 ), long style = wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxMINIMIZE_BOX|wxRESIZE_BORDER ); + WarningDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Warning"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxMINIMIZE_BOX|wxRESIZE_BORDER ); ~WarningDlgGenerated(); }; @@ -710,6 +726,8 @@ private: protected: wxStaticBitmap* m_bitmap10; wxTextCtrl* m_textCtrl8; + wxStaticLine* m_staticline8; + wxPanel* m_panel35; wxCheckBox* m_checkBox; wxButton* m_buttonYes; wxButton* m_buttonNo; @@ -724,7 +742,7 @@ protected: public: - QuestionDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Question"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 420,198 ), long style = wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxMINIMIZE_BOX|wxRESIZE_BORDER ); + QuestionDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Question"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxMINIMIZE_BOX|wxRESIZE_BORDER ); ~QuestionDlgGenerated(); }; @@ -737,9 +755,13 @@ class DeleteDlgGenerated : public wxDialog private: protected: + wxPanel* m_panelHeader; wxStaticBitmap* m_bitmap12; wxStaticText* m_staticTextHeader; - wxTextCtrl* m_textCtrlMessage; + wxStaticLine* m_staticline91; + wxTextCtrl* m_textCtrlFileList; + wxStaticLine* m_staticline9; + wxPanel* m_panel36; wxCheckBox* m_checkBoxUseRecycler; wxCheckBox* m_checkBoxDeleteBothSides; wxButton* m_buttonOK; @@ -755,7 +777,7 @@ protected: public: - DeleteDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Confirm"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 560,336 ), long style = wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxMINIMIZE_BOX|wxRESIZE_BORDER ); + DeleteDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Confirm"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxMINIMIZE_BOX|wxRESIZE_BORDER ); ~DeleteDlgGenerated(); }; @@ -773,14 +795,6 @@ protected: wxStaticText* m_staticTexHeader; wxStaticText* m_staticText44; wxBitmapButton* m_bpButtonHelp; - wxPanel* m_panel13; - wxStaticLine* m_staticline10; - wxStaticText* m_staticText45; - wxStaticText* m_staticText83; - wxStaticText* m_staticText84; - wxStaticText* m_staticText85; - wxStaticText* m_staticText181; - wxStaticText* m_staticText1811; wxStaticBitmap* m_bitmapInclude; wxTextCtrl* m_textCtrlInclude; wxStaticBitmap* m_bitmapExclude; @@ -796,7 +810,7 @@ protected: wxSpinCtrl* m_spinCtrlMaxSize; wxChoice* m_choiceUnitMaxSize; wxButton* m_button9; - wxButton* m_button10; + wxButton* m_buttonOk; wxButton* m_button17; // Virtual event handlers, overide them in your derived class @@ -870,19 +884,20 @@ protected: wxStaticLine* m_staticline16; wxStaticText* m_staticTextVariant; wxStaticLine* m_staticline14; - wxStaticText* m_staticText94; - wxStaticBitmap* m_bitmapCreate; - wxTextCtrl* m_textCtrlCreateL; - wxStaticBitmap* m_bitmapUpdate; - wxTextCtrl* m_textCtrlUpdateL; - wxStaticBitmap* m_bitmapDelete; - wxTextCtrl* m_textCtrlDeleteL; - wxStaticText* m_staticText95; - wxTextCtrl* m_textCtrlCreateR; - wxTextCtrl* m_textCtrlUpdateR; - wxTextCtrl* m_textCtrlDeleteR; + wxStaticBitmap* m_bitmapCreateLeft; + wxStaticBitmap* m_bitmapUpdateLeft; + wxStaticBitmap* m_bitmapDeleteLeft; wxStaticBitmap* m_bitmapData; - wxTextCtrl* m_textCtrlData; + wxStaticBitmap* m_bitmapDeleteRight; + wxStaticBitmap* m_bitmapUpdateRight; + wxStaticBitmap* m_bitmapCreateRight; + wxStaticText* m_staticTextCreateLeft; + wxStaticText* m_staticTextUpdateLeft; + wxStaticText* m_staticTextDeleteLeft; + wxStaticText* m_staticTextData; + wxStaticText* m_staticTextDeleteRight; + wxStaticText* m_staticTextUpdateRight; + wxStaticText* m_staticTextCreateRight; wxStaticLine* m_staticline12; wxCheckBox* m_checkBoxDontShowAgain; wxButton* m_button16; @@ -895,7 +910,7 @@ protected: public: - SyncPreviewDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Synchronization Preview"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE ); + SyncPreviewDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Summary"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE ); ~SyncPreviewDlgGenerated(); }; @@ -942,7 +957,7 @@ protected: public: - SearchDialogGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Find"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 384,97 ), long style = wxDEFAULT_DIALOG_STYLE ); + SearchDialogGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Find"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE ); ~SearchDialogGenerated(); }; diff --git a/ui/main_dlg.cpp b/ui/main_dlg.cpp index 049a1176..1ea2f29f 100644 --- a/ui/main_dlg.cpp +++ b/ui/main_dlg.cpp @@ -110,9 +110,8 @@ public: { const wxPoint absPos = dropGrid_.CalcUnscrolledPosition(clientPos); - const Opt<std::pair<ColumnType, size_t>> colInfo = dropGrid_.Grid::getColumnAtPos(absPos.x); - const bool dropOnLeft = colInfo ? colInfo->second != gridview::COMP_RIGHT : true; + const bool dropOnLeft = colInfo ? colInfo->second != gridview::COMP_RIGHT : false; if ((compPos_ == gridview::COMP_LEFT && !dropOnLeft) || //accept left or right half of m_gridMain only! (compPos_ == gridview::COMP_RIGHT && dropOnLeft)) // @@ -370,15 +369,14 @@ MainDialog::MainDialog(const std::vector<wxString>& cfgFileNames, xmlAccess::Xml [&](const wxString& filename) { const Zstring filenameFmt = toZ(filename); //convert to Zstring first: we don't want to pass wxString by value and risk MT issues! - findFirstMissing.addJob([=] { return filenameFmt.empty() || !fileExists(filenameFmt) ? zen::make_unique<NullType>() : nullptr; }); + findFirstMissing.addJob([=] { return filenameFmt.empty() /*ever empty??*/ || !fileExists(filenameFmt) ? zen::make_unique<NullType>() : nullptr; }); }); //potentially slow network access: give all checks 500ms to finish const bool allFilesExist = findFirstMissing.timedWait(boost::posix_time::milliseconds(500)) && //false: time elapsed !findFirstMissing.get(); //no missing - //------------------------------------------------------------------------------------------ - if (!allFilesExist) filenames.clear(); + //------------------------------------------------------------------------------------------ if (filenames.empty()) { @@ -465,7 +463,7 @@ void MainDialog::init(const xmlAccess::XmlGuiConfig& guiCfg, xmlAccess::XmlGlobalSettings& settings, bool startComparison) { - syncPreviewEnabled = false; + showSyncAction_ = false; folderHistoryLeft = std::make_shared<FolderHistory>(); //make sure it is always bound folderHistoryRight = std::make_shared<FolderHistory>(); // @@ -475,22 +473,15 @@ void MainDialog::init(const xmlAccess::XmlGuiConfig& guiCfg, wxWindowUpdateLocker dummy(this); //avoid display distortion - //--------- avoid mirroring this dialog in RTL languages like Hebrew or Arabic -------------------- - //m_panelViewFilter ->SetLayoutDirection(wxLayout_LeftToRight); - //m_panelStatusBar ->SetLayoutDirection(wxLayout_LeftToRight); - //m_panelDirectoryPairs->SetLayoutDirection(wxLayout_LeftToRight); - //------------------------------------------------------------------------------------------------------ - //---------------- support for dockable gui style -------------------------------- bSizerPanelHolder->Detach(m_panelTopButtons); bSizerPanelHolder->Detach(m_panelDirectoryPairs); bSizerPanelHolder->Detach(m_gridNavi); - bSizerPanelHolder->Detach(m_gridMain); + bSizerPanelHolder->Detach(m_panelCenter); bSizerPanelHolder->Detach(m_panelConfig); bSizerPanelHolder->Detach(m_panelFilter); bSizerPanelHolder->Detach(m_panelViewFilter); bSizerPanelHolder->Detach(m_panelStatistics); - bSizerPanelHolder->Detach(m_panelStatusBar); auiMgr.SetManagedWindow(this); auiMgr.SetFlags(wxAUI_MGR_DEFAULT | wxAUI_MGR_LIVE_RESIZE); @@ -507,7 +498,7 @@ void MainDialog::init(const xmlAccess::XmlGuiConfig& guiCfg, auiMgr.AddPane(m_panelDirectoryPairs, wxAuiPaneInfo().Name(wxT("Panel2")).Layer(2).Top().Row(2).Caption(_("Folder pairs")).CaptionVisible(false).PaneBorder(false).Gripper()); - auiMgr.AddPane(m_gridMain, + auiMgr.AddPane(m_panelCenter, wxAuiPaneInfo().Name(wxT("Panel3")).CenterPane().PaneBorder(false)); auiMgr.AddPane(m_gridNavi, @@ -523,10 +514,7 @@ void MainDialog::init(const xmlAccess::XmlGuiConfig& guiCfg, wxAuiPaneInfo().Name(wxT("Panel6")).Layer(4).Bottom().Row(1).Position(2).Caption(_("Select view")).MinSize(m_bpButtonSyncDirNone->GetSize().GetWidth(), m_panelViewFilter->GetSize().GetHeight())); auiMgr.AddPane(m_panelStatistics, - wxAuiPaneInfo().Name(wxT("Panel7")).Layer(4).Bottom().Row(1).Position(3).Caption(_("Statistics")).MinSize(m_panelStatistics->GetSize().GetWidth() / 2, m_panelStatistics->GetSize().GetHeight())); - - auiMgr.AddPane(m_panelStatusBar, - wxAuiPaneInfo().Name(wxT("Panel8")).Layer(4).Bottom().Row(0).CaptionVisible(false).PaneBorder(false).DockFixed()); + wxAuiPaneInfo().Name(wxT("Panel7")).Layer(4).Bottom().Row(1).Position(3).Caption(_("Statistics")).MinSize(bSizerData->GetSize().GetWidth() / 2, m_panelStatistics->GetSize().GetHeight())); auiMgr.Update(); @@ -597,7 +585,7 @@ void MainDialog::init(const xmlAccess::XmlGuiConfig& guiCfg, m_bpButtonSave ->SetBitmapLabel(GlobalResources::getImage(L"save")); m_bpButtonLoad ->SetBitmapLabel(GlobalResources::getImage(L"load")); m_bpButtonAddPair ->SetBitmapLabel(GlobalResources::getImage(L"addFolderPair")); - m_bitmapResizeCorner->SetBitmap(mirrorIfRtl(GlobalResources::getImage(L"statusEdge"))); + //m_bitmapResizeCorner->SetBitmap(mirrorIfRtl(GlobalResources::getImage(L"statusEdge"))); { IconBuffer tmp(IconBuffer::SIZE_SMALL); const wxBitmap bmpFile = tmp.genericFileIcon(); @@ -609,11 +597,6 @@ void MainDialog::init(const xmlAccess::XmlGuiConfig& guiCfg, m_bitmapSmallFileRight ->SetBitmap(bmpFile); } - m_bitmapCreate->SetBitmap(mirrorIfRtl(GlobalResources::getImage(L"create"))); - m_bitmapUpdate->SetBitmap(mirrorIfRtl(GlobalResources::getImage(L"update"))); - m_bitmapDelete->SetBitmap(mirrorIfRtl(GlobalResources::getImage(L"delete"))); - m_bitmapData ->SetBitmap(mirrorIfRtl(GlobalResources::getImage(L"data"))); - m_panelTopButtons->Layout(); //wxButtonWithImage size might have changed //menu icons: workaround for wxWidgets: small hack to update menu items: actually this is a wxWidgets bug (affects Windows- and Linux-build) @@ -705,33 +688,42 @@ void MainDialog::init(const xmlAccess::XmlGuiConfig& guiCfg, //check existence of all directories in parallel! RunUntilFirstHit<NullType> findFirstMissing; - bool haveNonEmptyPair = false; + //harmonize checks with comparison.cpp:: checkForIncompleteInput() + //we're really doing two checks: 1. check directory existence 2. check config validity -> don't mix them! + bool havePartialPair = false; + bool haveFullPair = false; + auto addDirCheck = [&](const FolderPairEnh& fp) { - const Zstring dirFmtLeft = getFormattedDirectoryName(fp.leftDirectory ); //should not block!? - const Zstring dirFmtRight = getFormattedDirectoryName(fp.rightDirectory); // + const Zstring dirLeft = getFormattedDirectoryName(fp.leftDirectory ); //should not block!? + const Zstring dirRight = getFormattedDirectoryName(fp.rightDirectory); // - if (dirFmtLeft.empty() && dirFmtRight.empty()) //only skip check if both sides are empty! - return; - haveNonEmptyPair = true; - findFirstMissing.addJob([=] { return dirFmtLeft .empty() || !dirExists(dirFmtLeft ) ? zen::make_unique<NullType>() : nullptr; }); - findFirstMissing.addJob([=] { return dirFmtRight.empty() || !dirExists(dirFmtRight) ? zen::make_unique<NullType>() : nullptr; }); + if (dirLeft.empty() != dirRight.empty()) //only skip check if both sides are empty! + havePartialPair = true; + else if (!dirLeft.empty()) + haveFullPair = true; + + if (!dirLeft.empty()) + findFirstMissing.addJob([=] { return !dirExists(dirLeft ) ? zen::make_unique<NullType>() : nullptr; }); + if (!dirRight.empty()) + findFirstMissing.addJob([=] { return !dirExists(dirRight) ? zen::make_unique<NullType>() : nullptr; }); }; addDirCheck(currMainCfg.firstPair); std::for_each(currMainCfg.additionalPairs.begin(), currMainCfg.additionalPairs.end(), addDirCheck); //------------------------------------------------------------------------------------------ - if (haveNonEmptyPair) + if (havePartialPair != haveFullPair) //either all pairs full or all half-filled -> validity check! { //potentially slow network access: give all checks 500ms to finish const bool allFilesExist = findFirstMissing.timedWait(boost::posix_time::milliseconds(500)) && //true: have result !findFirstMissing.get(); //no missing if (allFilesExist) - { - wxCommandEvent dummy2(wxEVT_COMMAND_BUTTON_CLICKED); - m_buttonCompare->GetEventHandler()->AddPendingEvent(dummy2); //simulate button click on "compare" - } + if (wxEvtHandler* evtHandler = m_buttonCompare->GetEventHandler()) + { + wxCommandEvent dummy2(wxEVT_COMMAND_BUTTON_CLICKED); + evtHandler->AddPendingEvent(dummy2); //simulate button click on "compare" + } } } //---------------------------------------------------------------------------------------------------------------------------------------------------------------- @@ -967,7 +959,7 @@ std::vector<FileSystemObject*> MainDialog::getTreeSelection() const { if (std::unique_ptr<TreeView::Node> node = treeDataView->getLine(row)) { - if (const TreeView::RootNode* root = dynamic_cast<const TreeView::RootNode*>(node.get())) + if (auto root = dynamic_cast<const TreeView::RootNode*>(node.get())) { //select first level of child elements std::transform(root->baseMap_.refSubDirs ().begin(), root->baseMap_.refSubDirs ().end(), std::back_inserter(output), [](FileSystemObject& fsObj) { return &fsObj; }); @@ -975,9 +967,15 @@ std::vector<FileSystemObject*> MainDialog::getTreeSelection() const std::transform(root->baseMap_.refSubLinks().begin(), root->baseMap_.refSubLinks().end(), std::back_inserter(output), [](FileSystemObject& fsObj) { return &fsObj; }); //for (auto& fsObj : root->baseMap_.refSubLinks()) output.push_back(&fsObj); -> seriously MSVC, stop this disgrace and implement "range for"! } - else if (const TreeView::DirNode* dir = dynamic_cast<const TreeView::DirNode*>(node.get())) + else if (auto dir = dynamic_cast<const TreeView::DirNode*>(node.get())) output.push_back(&(dir->dirObj_)); - //else if (dynamic_cast<const TreeView::FilesNode*>(node.get())) -> ignore files/symlinks + else if (auto file = dynamic_cast<const TreeView::FilesNode*>(node.get())) + { + //does a "little more" than what is shown on main grid: we return ALL files + HierarchyObject& parent = file->firstFile_.parent(); + std::transform(parent.refSubFiles().begin(), parent.refSubFiles().end(), std::back_inserter(output), [](FileSystemObject& fsObj) { return &fsObj; }); + std::transform(parent.refSubLinks().begin(), parent.refSubLinks().end(), std::back_inserter(output), [](FileSystemObject& fsObj) { return &fsObj; }); + } } }); return output; @@ -1046,7 +1044,7 @@ public: if (updateUiIsAllowed()) //test if specific time span between ui updates is over { wxString statusMessage = replaceCpy(_P("Object deleted successfully!", "%x objects deleted successfully!", deletionCount), - L"%x", zen::toStringSep(deletionCount), false); + L"%x", zen::toGuiString(deletionCount), false); if (mainDlg->m_staticTextStatusMiddle->GetLabel() != statusMessage) { @@ -1140,11 +1138,26 @@ wxString extractLastValidDir(const FileSystemObject& fsObj) } -void MainDialog::openExternalApplication(const FileSystemObject* fsObj, bool leftSide, const wxString& commandline) +void MainDialog::openExternalApplication(const wxString& commandline, const zen::FileSystemObject* fsObj, size_t compPos) //fsObj may be nullptr { if (commandline.empty()) return; + bool leftSide = true; + switch (compPos) + { + case gridview::COMP_LEFT: + break; + case gridview::COMP_MIDDLE: + return; //we don't want to start external apps when double-clicking here! + case gridview::COMP_RIGHT: + leftSide = false; + break; + default: //area to the right of main grid + leftSide = false; + fsObj = nullptr; //do not evaluate row when outside grid! + } + wxString name; wxString nameCo; wxString dir; @@ -1254,6 +1267,8 @@ void MainDialog::disableAllElements(bool enableAbort) m_bpButtonSyncConfig ->Disable(); m_buttonStartSync ->Disable(); m_gridMain ->Disable(); + m_panelCenter ->Disable(); + m_panelStatistics ->Disable(); m_gridNavi ->Disable(); m_panelDirectoryPairs->Disable(); m_menubar1->EnableTop(0, false); @@ -1288,6 +1303,8 @@ void MainDialog::enableAllElements() m_bpButtonSyncConfig ->Enable(); m_buttonStartSync ->Enable(); m_gridMain ->Enable(); + m_panelCenter ->Enable(); + m_panelStatistics ->Enable(); m_gridNavi ->Enable(); m_panelDirectoryPairs->Enable(); m_menubar1->EnableTop(0, true); @@ -1494,7 +1511,7 @@ void MainDialog::onGridButtonEvent(wxKeyEvent& event) auto cursorPos = m_gridMain->getGridCursor(); const size_t row = cursorPos.first; const size_t compPos = cursorPos.second; - openExternalApplication(gridDataView->getObject(row), compPos == gridview::COMP_LEFT, commandline); + openExternalApplication(commandline, gridDataView->getObject(row), compPos); } return; } @@ -1549,7 +1566,7 @@ void MainDialog::OnGlobalKeyEvent(wxKeyEvent& event) //process key events withou return; //-> swallow event! case WXK_F8: //F8 - enablePreview(!syncPreviewEnabled); + showSyncAction(!showSyncAction_); return; //-> swallow event! //redirect certain (unhandled) keys directly to grid! @@ -1578,12 +1595,13 @@ void MainDialog::OnGlobalKeyEvent(wxKeyEvent& event) //process key events withou !isPartOf(focus, m_directoryRight) && !isPartOf(focus, m_gridNavi ) && !isPartOf(focus, m_scrolledWindowFolderPairs)) - { - m_gridMain->SetFocus(); - m_gridMain->GetEventHandler()->ProcessEvent(event); //propagating event catched at wxTheApp to child leads to recursion, but we prevented it... - event.Skip(false); //definitively handled now! - return; - } + if (wxEvtHandler* evtHandler = m_gridMain->GetEventHandler()) + { + m_gridMain->SetFocus(); + evtHandler->ProcessEvent(event); //propagating event catched at wxTheApp to child leads to recursion, but we prevented it... + event.Skip(false); //definitively handled now! + return; + } } break; } @@ -1640,12 +1658,11 @@ void MainDialog::onNaviSelection(GridRangeSelectEvent& event) void MainDialog::onNaviGridContext(GridClickEvent& event) { - ContextMenu menu; - const auto& selection = getTreeSelection(); //referenced by lambdas! + ContextMenu menu; //---------------------------------------------------------------------------------------------------- - if (syncPreviewEnabled && !selection.empty()) + if (showSyncAction_ && !selection.empty()) //std::any_of(selection.begin(), selection.end(), [](const FileSystemObject* fsObj){ return fsObj->getSyncOperation() != SO_EQUAL; })) -> doesn't consider directories { auto getImage = [&](SyncDirection dir, SyncOperation soDefault) @@ -1686,13 +1703,13 @@ void MainDialog::onNaviGridContext(GridClickEvent& event) { //by relative path menu.addItem(_("Exclude via filter:") + L" " + (FILE_NAME_SEPARATOR + selection[0]->getObjRelativeName()), - [this, &selection] { excludeItems(selection); }, &GlobalResources::getImage(L"filterOnSmall")); + [this, &selection] { excludeItems(selection); }, &GlobalResources::getImage(L"filterSmall")); } else if (selection.size() > 1) { //by relative path menu.addItem(_("Exclude via filter:") + L" " + _("<multiple selection>"), - [this, &selection] { excludeItems(selection); }, &GlobalResources::getImage(L"filterOnSmall")); + [this, &selection] { excludeItems(selection); }, &GlobalResources::getImage(L"filterSmall")); } //---------------------------------------------------------------------------------------------------- @@ -1706,135 +1723,137 @@ void MainDialog::onNaviGridContext(GridClickEvent& event) void MainDialog::onMainGridContext(GridClickEvent& event) { - ContextMenu menu; - const auto& selection = getGridSelection(); //referenced by lambdas! + ContextMenu menu; - if (event.compPos_ == gridview::COMP_LEFT || - event.compPos_ == gridview::COMP_RIGHT) + switch (event.compPos_) { - //---------------------------------------------------------------------------------------------------- - if (syncPreviewEnabled && !selection.empty()) - { - auto getImage = [&](SyncDirection dir, SyncOperation soDefault) + case gridview::COMP_MIDDLE: + menu.addItem(_("Include all"), [&] { - return mirrorIfRtl(getSyncOpImage(selection[0]->getSyncOperation() != SO_EQUAL ? - selection[0]->testSyncOperation(dir) : soDefault)); - }; - const wxBitmap opRight = getImage(SYNC_DIR_RIGHT, SO_OVERWRITE_RIGHT); - const wxBitmap opNone = getImage(SYNC_DIR_NONE, SO_DO_NOTHING ); - const wxBitmap opLeft = getImage(SYNC_DIR_LEFT, SO_OVERWRITE_LEFT ); - - wxString shortCutLeft = L"\tAlt+Left"; - wxString shortCutRight = L"\tAlt+Right"; - if (wxTheApp->GetLayoutDirection() == wxLayout_RightToLeft) - std::swap(shortCutLeft, shortCutRight); - - menu.addItem(_("Set direction:") + L" ->" + shortCutRight, [this, &selection] { setSyncDirManually(selection, SYNC_DIR_RIGHT); }, &opRight); - menu.addItem(_("Set direction:") + L" -" L"\tAlt+Up", [this, &selection] { setSyncDirManually(selection, SYNC_DIR_NONE); }, &opNone); - menu.addItem(_("Set direction:") + L" <-" + shortCutLeft, [this, &selection] { setSyncDirManually(selection, SYNC_DIR_LEFT); }, &opLeft); - //Gtk needs a direction, "<-", because it has no context menu icons! - //Gtk requires "no spaces" for shortcut identifiers! - menu.addSeparator(); - } - //---------------------------------------------------------------------------------------------------- - if (!selection.empty()) - { - if (selection[0]->isActive()) - menu.addItem(_("Exclude temporarily") + L"\tSpace", [this, &selection] { setManualFilter(selection, false); }, &GlobalResources::getImage(L"checkboxFalse")); - else - menu.addItem(_("Include temporarily") + L"\tSpace", [this, &selection] { setManualFilter(selection, true); }, &GlobalResources::getImage(L"checkboxTrue")); - } - else - menu.addItem(_("Exclude temporarily") + L"\tSpace", [] {}, nullptr, false); + zen::setActiveStatus(true, folderCmp); + updateGui(); + }, nullptr, gridDataView->rowsTotal() > 0); - //---------------------------------------------------------------------------------------------------- - //EXCLUDE FILTER - if (selection.size() == 1) - { - ContextMenu submenu; + menu.addItem(_("Exclude all"), [&] + { + zen::setActiveStatus(false, folderCmp); + updateGuiAfterFilterChange(400); //call this instead of updateGuiGrid() to add some delay if hideFiltered == true + }, nullptr, gridDataView->rowsTotal() > 0); + break; - //by extension - if (dynamic_cast<const DirMapping*>(selection[0]) == nullptr) //non empty && no directory + case gridview::COMP_LEFT: + case gridview::COMP_RIGHT: + default: //area to the right of main grid + //---------------------------------------------------------------------------------------------------- + if (showSyncAction_ && !selection.empty()) { - const Zstring filename = afterLast(selection[0]->getObjRelativeName(), FILE_NAME_SEPARATOR); - if (contains(filename, Zchar('.'))) //be careful: AfterLast would return the whole string if '.' were not found! + auto getImage = [&](SyncDirection dir, SyncOperation soDefault) { - const Zstring extension = afterLast(filename, Zchar('.')); - - submenu.addItem(L"*." + utf8CvrtTo<wxString>(extension), - [this, extension] { excludeExtension(extension); }); - } + return mirrorIfRtl(getSyncOpImage(selection[0]->getSyncOperation() != SO_EQUAL ? + selection[0]->testSyncOperation(dir) : soDefault)); + }; + const wxBitmap opRight = getImage(SYNC_DIR_RIGHT, SO_OVERWRITE_RIGHT); + const wxBitmap opNone = getImage(SYNC_DIR_NONE, SO_DO_NOTHING ); + const wxBitmap opLeft = getImage(SYNC_DIR_LEFT, SO_OVERWRITE_LEFT ); + + wxString shortCutLeft = L"\tAlt+Left"; + wxString shortCutRight = L"\tAlt+Right"; + if (wxTheApp->GetLayoutDirection() == wxLayout_RightToLeft) + std::swap(shortCutLeft, shortCutRight); + + menu.addItem(_("Set direction:") + L" ->" + shortCutRight, [this, &selection] { setSyncDirManually(selection, SYNC_DIR_RIGHT); }, &opRight); + menu.addItem(_("Set direction:") + L" -" L"\tAlt+Up", [this, &selection] { setSyncDirManually(selection, SYNC_DIR_NONE); }, &opNone); + menu.addItem(_("Set direction:") + L" <-" + shortCutLeft, [this, &selection] { setSyncDirManually(selection, SYNC_DIR_LEFT); }, &opLeft); + //Gtk needs a direction, "<-", because it has no context menu icons! + //Gtk requires "no spaces" for shortcut identifiers! + menu.addSeparator(); } + //---------------------------------------------------------------------------------------------------- + if (!selection.empty()) + { + if (selection[0]->isActive()) + menu.addItem(_("Exclude temporarily") + L"\tSpace", [this, &selection] { setManualFilter(selection, false); }, &GlobalResources::getImage(L"checkboxFalse")); + else + menu.addItem(_("Include temporarily") + L"\tSpace", [this, &selection] { setManualFilter(selection, true); }, &GlobalResources::getImage(L"checkboxTrue")); + } + else + menu.addItem(_("Exclude temporarily") + L"\tSpace", [] {}, nullptr, false); - //by short name - submenu.addItem(utf8CvrtTo<wxString>(Zstring(Zstr("*")) + FILE_NAME_SEPARATOR + selection[0]->getObjShortName()), - [this, &selection] { excludeShortname(*selection[0]); }); + //---------------------------------------------------------------------------------------------------- + //EXCLUDE FILTER + if (selection.size() == 1) + { + ContextMenu submenu; - //by relative path - submenu.addItem(utf8CvrtTo<wxString>(FILE_NAME_SEPARATOR + selection[0]->getObjRelativeName()), - [this, &selection] { excludeItems(selection); }); + //by extension + if (dynamic_cast<const DirMapping*>(selection[0]) == nullptr) //non empty && no directory + { + const Zstring filename = afterLast(selection[0]->getObjRelativeName(), FILE_NAME_SEPARATOR); + if (contains(filename, Zchar('.'))) //be careful: AfterLast would return the whole string if '.' were not found! + { + const Zstring extension = afterLast(filename, Zchar('.')); - menu.addSubmenu(_("Exclude via filter:"), submenu, &GlobalResources::getImage(L"filterOnSmall")); - } - else if (selection.size() > 1) - { - //by relative path - menu.addItem(_("Exclude via filter:") + L" " + _("<multiple selection>"), - [this, &selection] { excludeItems(selection); }, &GlobalResources::getImage(L"filterOnSmall")); - } + submenu.addItem(L"*." + utfCvrtTo<wxString>(extension), + [this, extension] { excludeExtension(extension); }); + } + } - //---------------------------------------------------------------------------------------------------- - //CONTEXT_EXTERNAL_APP - if (!globalSettings->gui.externelApplications.empty()) - { - menu.addSeparator(); + //by short name + submenu.addItem(utfCvrtTo<wxString>(Zstring(Zstr("*")) + FILE_NAME_SEPARATOR + selection[0]->getObjShortName()), + [this, &selection] { excludeShortname(*selection[0]); }); + + //by relative path + submenu.addItem(utfCvrtTo<wxString>(FILE_NAME_SEPARATOR + selection[0]->getObjRelativeName()), + [this, &selection] { excludeItems(selection); }); - for (auto iter = globalSettings->gui.externelApplications.begin(); - iter != globalSettings->gui.externelApplications.end(); - ++iter) + menu.addSubmenu(_("Exclude via filter:"), submenu, &GlobalResources::getImage(L"filterSmall")); + } + else if (selection.size() > 1) { - //some trick to translate default external apps on the fly: 1. "open in explorer" 2. "start directly" - wxString description = zen::implementation::translate(copyStringTo<std::wstring>(iter->first)); - if (description.empty()) - description = L" "; //wxWidgets doesn't like empty items + //by relative path + menu.addItem(_("Exclude via filter:") + L" " + _("<multiple selection>"), + [this, &selection] { excludeItems(selection); }, &GlobalResources::getImage(L"filterSmall")); + } - const wxString command = iter->second; + //---------------------------------------------------------------------------------------------------- + //CONTEXT_EXTERNAL_APP + if (!globalSettings->gui.externelApplications.empty()) + { + menu.addSeparator(); - auto openApp = [this, &selection, command, event] { openExternalApplication(selection.empty() ? nullptr : selection[0], event.compPos_ == gridview::COMP_LEFT, command); }; + for (auto iter = globalSettings->gui.externelApplications.begin(); + iter != globalSettings->gui.externelApplications.end(); + ++iter) + { + //some trick to translate default external apps on the fly: 1. "open in explorer" 2. "start directly" + wxString description = zen::implementation::translate(iter->first); + if (description.empty()) + description = L" "; //wxWidgets doesn't like empty items - if (iter == globalSettings->gui.externelApplications.begin()) - menu.addItem(description + L"\tEnter", openApp); - else - menu.addItem(description, openApp, nullptr, !selection.empty()); - } - } - //---------------------------------------------------------------------------------------------------- - //CONTEXT_DELETE_FILES - menu.addSeparator(); + const wxString command = iter->second; - menu.addItem(_("Delete") + L"\tDel", [this] - { - deleteSelectedFiles( - getGridSelection(true, false), - getGridSelection(false, true)); - }, nullptr, !selection.empty()); - } + auto openApp = [this, &selection, command, event] { openExternalApplication(command, selection.empty() ? nullptr : selection[0], event.compPos_); }; - else if (event.compPos_ == gridview::COMP_MIDDLE) - { - menu.addItem(_("Include all"), [&] - { - zen::setActiveStatus(true, folderCmp); - updateGui(); - }, nullptr, gridDataView->rowsTotal() > 0); + if (iter == globalSettings->gui.externelApplications.begin()) + menu.addItem(description + L"\tEnter", openApp); + else + menu.addItem(description, openApp, nullptr, !selection.empty()); + } + } + //---------------------------------------------------------------------------------------------------- + //CONTEXT_DELETE_FILES + menu.addSeparator(); - menu.addItem(_("Exclude all"), [&] - { - zen::setActiveStatus(false, folderCmp); - updateGuiAfterFilterChange(400); //call this instead of updateGuiGrid() to add some delay if hideFiltered == true - }, nullptr, gridDataView->rowsTotal() > 0); + menu.addItem(_("Delete") + L"\tDel", [this] + { + deleteSelectedFiles( + getGridSelection(true, false), + getGridSelection(false, true)); + }, nullptr, !selection.empty()); + break; } + menu.popup(*this); } @@ -1996,8 +2015,8 @@ void MainDialog::onGridLabelContext(GridClickEvent& event) else if (event.compPos_ == gridview::COMP_MIDDLE) { - menu.addItem(_("Synchronization Preview") + L"\tF8", [&] { enablePreview(true ); }, syncPreviewEnabled ? &GlobalResources::getImage(L"syncSmall") : nullptr); - menu.addItem(_("Comparison Result"), [&] { enablePreview(false); }, syncPreviewEnabled ? nullptr : &GlobalResources::getImage(L"compareSmall")); + menu.addItem(_("Category") + L"\tF8", [&] { showSyncAction(false); }, showSyncAction_ ? nullptr : &GlobalResources::getImage(L"compareSmall")); + menu.addItem(_("Action"), [&] { showSyncAction(true ); }, showSyncAction_ ? &GlobalResources::getImage(L"syncSmall") : nullptr); } menu.popup(*this); } @@ -2100,7 +2119,7 @@ void MainDialog::onNaviPanelFilesDropped(FileDropEvent& event) wxString getFormattedHistoryElement(const wxString& filename) { - wxString output = afterLast(filename, utf8CvrtTo<wxString>(FILE_NAME_SEPARATOR)); + wxString output = afterLast(filename, utfCvrtTo<wxString>(FILE_NAME_SEPARATOR)); if (endsWith(output, ".ffs_gui")) output = beforeLast(output, L'.'); return output; @@ -2206,8 +2225,8 @@ bool MainDialog::trySaveConfig(const wxString* fileName) //return true if saved wxEmptyString, wxEmptyString, defaultFileName, - wxString(_("FreeFileSync configuration")) + wxT(" (*.ffs_gui)|*.ffs_gui"), - wxFD_SAVE /*| wxFD_OVERWRITE_PROMPT*/); + wxString(L"FreeFileSync (*.ffs_gui)|*.ffs_gui") + L"|" +_("All files") + L" (*.*)|*", + wxFD_SAVE | wxFD_OVERWRITE_PROMPT); if (filePicker.ShowModal() != wxID_OK) return false; targetFilename = filePicker.GetPath(); @@ -2235,9 +2254,9 @@ void MainDialog::OnLoadConfig(wxCommandEvent& event) { wxFileDialog filePicker(this, wxEmptyString, - beforeLast(activeConfigFiles.size() == 1 && activeConfigFiles[0] != lastRunConfigName() ? activeConfigFiles[0] : wxString(), utf8CvrtTo<wxString>(FILE_NAME_SEPARATOR)), //set default dir: empty string if "activeConfigFiles" is empty or has no path separator + beforeLast(activeConfigFiles.size() == 1 && activeConfigFiles[0] != lastRunConfigName() ? activeConfigFiles[0] : wxString(), utfCvrtTo<wxString>(FILE_NAME_SEPARATOR)), //set default dir: empty string if "activeConfigFiles" is empty or has no path separator wxEmptyString, - _("FreeFileSync configuration") + L" (*.ffs_gui;*.ffs_batch)|*.ffs_gui;*.ffs_batch", + wxString(L"FreeFileSync (*.ffs_gui;*.ffs_batch)|*.ffs_gui;*.ffs_batch") + L"|" +_("All files") + L" (*.*)|*", wxFD_OPEN | wxFD_MULTIPLE); if (filePicker.ShowModal() == wxID_OK) @@ -2519,7 +2538,7 @@ void MainDialog::setConfig(const xmlAccess::XmlGuiConfig& newGuiCfg) //read GUI layout m_checkBoxHideFilt->SetValue(currentCfg.hideFilteredElements); - enablePreview(currentCfg.syncPreviewEnabled); + showSyncAction(currentCfg.showSyncAction); //########################################################### //update compare variant name @@ -2561,7 +2580,7 @@ xmlAccess::XmlGuiConfig MainDialog::getConfig() const std::back_inserter(guiCfg.mainCfg.additionalPairs), getEnhancedPair); //sync preview - guiCfg.syncPreviewEnabled = syncPreviewEnabled; + guiCfg.showSyncAction = showSyncAction_; return guiCfg; } @@ -2735,14 +2754,14 @@ wxBitmap buttonPressed(const std::string& name) wxBitmap background = GlobalResources::getImage(L"buttonPressed"); return mirrorIfRtl( layOver( - GlobalResources::getImage(utf8CvrtTo<wxString>(name)), background)); + GlobalResources::getImage(utfCvrtTo<wxString>(name)), background)); } inline wxBitmap buttonReleased(const std::string& name) { - wxImage output = GlobalResources::getImage(utf8CvrtTo<wxString>(name)).ConvertToImage().ConvertToGreyscale(1.0/3, 1.0/3, 1.0/3); //treat all channels equally! + wxImage output = GlobalResources::getImage(utfCvrtTo<wxString>(name)).ConvertToImage().ConvertToGreyscale(1.0/3, 1.0/3, 1.0/3); //treat all channels equally! zen::move(output, 0, -1); //move image right one pixel brighten(output, 80); @@ -2847,15 +2866,15 @@ void MainDialog::initViewFilterButtons() void MainDialog::updateFilterButtons() { //global filter: test for Null-filter - if (isNullFilter(currentCfg.mainCfg.globalFilter)) + if (!isNullFilter(currentCfg.mainCfg.globalFilter)) { - setImage(*m_bpButtonFilter, GlobalResources::getImage(wxT("filterOff"))); - m_bpButtonFilter->SetToolTip(_("No filter selected")); + setImage(*m_bpButtonFilter, GlobalResources::getImage(L"filter")); + m_bpButtonFilter->SetToolTip(_("Filter is active")); } else { - setImage(*m_bpButtonFilter, GlobalResources::getImage(wxT("filterOn"))); - m_bpButtonFilter->SetToolTip(_("Filter is active")); + setImage(*m_bpButtonFilter, greyScale(GlobalResources::getImage(L"filter"))); + m_bpButtonFilter->SetToolTip(_("No filter selected")); } //update main local filter @@ -2972,17 +2991,34 @@ void MainDialog::clearGrid(bool refreshGrid) void MainDialog::updateStatistics() { - //update preview of bytes to be transferred: + //update preview of item count and bytes to be transferred: const SyncStatistics st(folderCmp); - const wxString toCreate = zen::toStringSep(st.getCreate()); - const wxString toUpdate = zen::toStringSep(st.getUpdate()); - const wxString toDelete = zen::toStringSep(st.getDelete()); - const wxString data = zen::filesizeToShortString(st.getDataToProcess()); - m_textCtrlCreate->SetValue(toCreate); - m_textCtrlUpdate->SetValue(toUpdate); - m_textCtrlDelete->SetValue(toDelete); - m_textCtrlData ->SetValue(data); + setText(*m_staticTextData, filesizeToShortString(st.getDataToProcess())); + if (st.getDataToProcess() == 0) + m_bitmapData->SetBitmap(greyScale(GlobalResources::getImage(L"data"))); + else + m_bitmapData->SetBitmap(GlobalResources::getImage(L"data")); + + auto setValue = [](wxStaticText& txtControl, int value, wxStaticBitmap& bmpControl, const wchar_t* bmpName) + { + setText(txtControl, toGuiString(value)); + + if (value == 0) + bmpControl.SetBitmap(greyScale(mirrorIfRtl(GlobalResources::getImage(bmpName)))); + else + bmpControl.SetBitmap(mirrorIfRtl(GlobalResources::getImage(bmpName))); + }; + + setValue(*m_staticTextCreateLeft, st.getCreate<LEFT_SIDE >(), *m_bitmapCreateLeft, L"createLeftSmall"); + setValue(*m_staticTextUpdateLeft, st.getUpdate<LEFT_SIDE >(), *m_bitmapUpdateLeft, L"updateLeftSmall"); + setValue(*m_staticTextDeleteLeft, st.getDelete<LEFT_SIDE >(), *m_bitmapDeleteLeft, L"deleteLeftSmall"); + setValue(*m_staticTextCreateRight, st.getCreate<RIGHT_SIDE>(), *m_bitmapCreateRight, L"createRightSmall"); + setValue(*m_staticTextUpdateRight, st.getUpdate<RIGHT_SIDE>(), *m_bitmapUpdateRight, L"updateRightSmall"); + setValue(*m_staticTextDeleteRight, st.getDelete<RIGHT_SIDE>(), *m_bitmapDeleteRight, L"deleteRightSmall"); + + m_panelStatistics->Layout(); + m_panelStatistics->Refresh(); //fix small mess up on RTL layout } @@ -3018,10 +3054,10 @@ void MainDialog::applyCompareConfig(bool changePreviewStatus) switch (currentCfg.mainCfg.cmpConfig.compareVar) { case CMP_BY_TIME_SIZE: - enablePreview(true); + showSyncAction(true); break; case CMP_BY_CONTENT: - enablePreview(false); + showSyncAction(false); break; } @@ -3056,7 +3092,8 @@ void MainDialog::OnStartSync(wxCommandEvent& event) { //quick sync: simulate button click on "compare" wxCommandEvent dummy2(wxEVT_COMMAND_BUTTON_CLICKED); - m_buttonCompare->GetEventHandler()->ProcessEvent(dummy2); //synchronous call + if (wxEvtHandler* evtHandler = m_buttonCompare->GetEventHandler()) + evtHandler->ProcessEvent(dummy2); //synchronous call if (folderCmp.empty()) //check if user aborted or error occured, ect... return; @@ -3085,7 +3122,9 @@ void MainDialog::OnStartSync(wxCommandEvent& event) { //PERF_START; - wxString activeFileName = activeConfigFiles.size() == 1 && activeConfigFiles[0] != lastRunConfigName() ? activeConfigFiles[0] : wxString(); + Zstring activeFileName; + if (activeConfigFiles.size() == 1 && activeConfigFiles[0] != lastRunConfigName()) + activeFileName = utfCvrtTo<Zstring>(activeConfigFiles[0]); const auto& guiCfg = getConfig(); @@ -3109,7 +3148,9 @@ void MainDialog::OnStartSync(wxCommandEvent& event) } //start synchronization and mark all elements processed - zen::SyncProcess syncProc(globalSettings->optDialogs, + zen::SyncProcess syncProc(xmlAccess::extractJobName(activeFileName), + formatTime<std::wstring>(L"%Y-%m-%d %H%M%S"), + globalSettings->optDialogs, globalSettings->verifyFileCopy, globalSettings->copyLockedFiles, globalSettings->copyFilePermissions, @@ -3145,9 +3186,9 @@ void MainDialog::OnStartSync(wxCommandEvent& event) void MainDialog::onGridDoubleClick(GridClickEvent& event) { if (!globalSettings->gui.externelApplications.empty()) - openExternalApplication(gridDataView->getObject(event.row_), //optional - event.compPos_ == gridview::COMP_LEFT, - globalSettings->gui.externelApplications[0].second); + openExternalApplication(globalSettings->gui.externelApplications[0].second, + gridDataView->getObject(event.row_), //optional + event.compPos_); } @@ -3177,7 +3218,7 @@ void MainDialog::onGridLabelLeftClick(GridClickEvent& event) case gridview::COMP_MIDDLE: //sorting middle grid is more or less useless: therefore let's toggle view instead! - enablePreview(!syncPreviewEnabled); //toggle view + showSyncAction(!showSyncAction_); //toggle view break; case gridview::COMP_RIGHT: @@ -3262,7 +3303,7 @@ void MainDialog::updateGridViewData() m_bpButtonSyncDirNone-> Show(false); - if (syncPreviewEnabled) + if (showSyncAction_) { const GridView::StatusSyncPreview result = gridDataView->updateSyncPreview(currentCfg.hideFilteredElements, m_bpButtonSyncCreateLeft-> isActive(), @@ -3354,7 +3395,7 @@ void MainDialog::updateGridViewData() m_gridMain->Refresh(); //navigation tree - if (syncPreviewEnabled) + if (showSyncAction_) treeDataView->updateSyncPreview(currentCfg.hideFilteredElements, m_bpButtonSyncCreateLeft-> isActive(), m_bpButtonSyncCreateRight-> isActive(), @@ -3387,8 +3428,8 @@ void MainDialog::updateGridViewData() bSizerStatusLeftDirectories->Show(foldersOnLeftView > 0); bSizerStatusLeftFiles ->Show(filesOnLeftView > 0); - setText(*m_staticTextStatusLeftDirs, replaceCpy(_P("1 directory", "%x directories", foldersOnLeftView), L"%x", toStringSep(foldersOnLeftView), false)); - setText(*m_staticTextStatusLeftFiles, replaceCpy(_P("1 file", "%x files", filesOnLeftView), L"%x", toStringSep(filesOnLeftView), false)); + setText(*m_staticTextStatusLeftDirs, replaceCpy(_P("1 directory", "%x directories", foldersOnLeftView), L"%x", toGuiString(foldersOnLeftView), false)); + setText(*m_staticTextStatusLeftFiles, replaceCpy(_P("1 file", "%x files", filesOnLeftView), L"%x", toGuiString(filesOnLeftView), false)); setText(*m_staticTextStatusLeftBytes, filesizeToShortString(to<Int64>(filesizeLeftView))); { @@ -3396,8 +3437,8 @@ void MainDialog::updateGridViewData() if (gridDataView->rowsTotal() > 0) { statusMiddleNew = _P("%x of 1 row in view", "%x of %y rows in view", gridDataView->rowsTotal()); - replace(statusMiddleNew, L"%x", toStringSep(gridDataView->rowsOnView()), false); - replace(statusMiddleNew, L"%y", toStringSep(gridDataView->rowsTotal ()), false); + replace(statusMiddleNew, L"%x", toGuiString(gridDataView->rowsOnView()), false); + replace(statusMiddleNew, L"%y", toGuiString(gridDataView->rowsTotal ()), false); } setText(*m_staticTextStatusMiddle, statusMiddleNew); } @@ -3405,8 +3446,8 @@ void MainDialog::updateGridViewData() bSizerStatusRightDirectories->Show(foldersOnRightView > 0); bSizerStatusRightFiles ->Show(filesOnRightView > 0); - setText(*m_staticTextStatusRightDirs, replaceCpy(_P("1 directory", "%x directories", foldersOnRightView), L"%x", toStringSep(foldersOnRightView), false)); - setText(*m_staticTextStatusRightFiles, replaceCpy(_P("1 file", "%x files", filesOnRightView), L"%x", toStringSep(filesOnRightView), false)); + setText(*m_staticTextStatusRightDirs, replaceCpy(_P("1 directory", "%x directories", foldersOnRightView), L"%x", toGuiString(foldersOnRightView), false)); + setText(*m_staticTextStatusRightFiles, replaceCpy(_P("1 file", "%x files", filesOnRightView), L"%x", toGuiString(filesOnRightView), false)); setText(*m_staticTextStatusRightBytes, filesizeToShortString(to<Int64>(filesizeRightView))); m_panelStatusBar->Layout(); @@ -3683,12 +3724,12 @@ void MainDialog::OnMenuExportFileList(wxCommandEvent& event) { //get a filename const wxString defaultFileName = L"FileList.csv"; //proposal - wxFileDialog filePicker(this, + wxFileDialog filePicker(this, //creating this on freestore leads to memleak! wxEmptyString, wxEmptyString, defaultFileName, - _("Comma separated list") + L" (*.csv)|*.csv", - wxFD_SAVE /*| wxFD_OVERWRITE_PROMPT*/); //creating this on freestore leads to memleak! + _("Comma separated list") + L" (*.csv)|*.csv" + L"|" +_("All files") + L" (*.*)|*", + wxFD_SAVE | wxFD_OVERWRITE_PROMPT); if (filePicker.ShowModal() != wxID_OK) return; @@ -3699,38 +3740,38 @@ void MainDialog::OnMenuExportFileList(wxCommandEvent& event) UtfString exportString; //write legend - exportString += utf8CvrtTo<UtfString>(_("Legend")) + '\n'; - if (syncPreviewEnabled) - { - exportString += "\"" + utf8CvrtTo<UtfString>(getSyncOpDescription(SO_EQUAL)) + "\";" + utf8CvrtTo<UtfString>(getSymbol(SO_EQUAL)) + '\n'; - exportString += "\"" + utf8CvrtTo<UtfString>(getSyncOpDescription(SO_CREATE_NEW_LEFT)) + "\";" + utf8CvrtTo<UtfString>(getSymbol(SO_CREATE_NEW_LEFT)) + '\n'; - exportString += "\"" + utf8CvrtTo<UtfString>(getSyncOpDescription(SO_CREATE_NEW_RIGHT)) + "\";" + utf8CvrtTo<UtfString>(getSymbol(SO_CREATE_NEW_RIGHT)) + '\n'; - exportString += "\"" + utf8CvrtTo<UtfString>(getSyncOpDescription(SO_OVERWRITE_LEFT)) + "\";" + utf8CvrtTo<UtfString>(getSymbol(SO_OVERWRITE_LEFT)) + '\n'; - exportString += "\"" + utf8CvrtTo<UtfString>(getSyncOpDescription(SO_OVERWRITE_RIGHT)) + "\";" + utf8CvrtTo<UtfString>(getSymbol(SO_OVERWRITE_RIGHT)) + '\n'; - exportString += "\"" + utf8CvrtTo<UtfString>(getSyncOpDescription(SO_DELETE_LEFT)) + "\";" + utf8CvrtTo<UtfString>(getSymbol(SO_DELETE_LEFT)) + '\n'; - exportString += "\"" + utf8CvrtTo<UtfString>(getSyncOpDescription(SO_DELETE_RIGHT)) + "\";" + utf8CvrtTo<UtfString>(getSymbol(SO_DELETE_RIGHT)) + '\n'; - exportString += "\"" + utf8CvrtTo<UtfString>(getSyncOpDescription(SO_DO_NOTHING)) + "\";" + utf8CvrtTo<UtfString>(getSymbol(SO_DO_NOTHING)) + '\n'; - exportString += "\"" + utf8CvrtTo<UtfString>(getSyncOpDescription(SO_UNRESOLVED_CONFLICT)) + "\";" + utf8CvrtTo<UtfString>(getSymbol(SO_UNRESOLVED_CONFLICT)) + '\n'; + exportString += utfCvrtTo<UtfString>(_("Legend")) + '\n'; + if (showSyncAction_) + { + exportString += "\"" + utfCvrtTo<UtfString>(getSyncOpDescription(SO_EQUAL)) + "\";" + utfCvrtTo<UtfString>(getSymbol(SO_EQUAL)) + '\n'; + exportString += "\"" + utfCvrtTo<UtfString>(getSyncOpDescription(SO_CREATE_NEW_LEFT)) + "\";" + utfCvrtTo<UtfString>(getSymbol(SO_CREATE_NEW_LEFT)) + '\n'; + exportString += "\"" + utfCvrtTo<UtfString>(getSyncOpDescription(SO_CREATE_NEW_RIGHT)) + "\";" + utfCvrtTo<UtfString>(getSymbol(SO_CREATE_NEW_RIGHT)) + '\n'; + exportString += "\"" + utfCvrtTo<UtfString>(getSyncOpDescription(SO_OVERWRITE_LEFT)) + "\";" + utfCvrtTo<UtfString>(getSymbol(SO_OVERWRITE_LEFT)) + '\n'; + exportString += "\"" + utfCvrtTo<UtfString>(getSyncOpDescription(SO_OVERWRITE_RIGHT)) + "\";" + utfCvrtTo<UtfString>(getSymbol(SO_OVERWRITE_RIGHT)) + '\n'; + exportString += "\"" + utfCvrtTo<UtfString>(getSyncOpDescription(SO_DELETE_LEFT)) + "\";" + utfCvrtTo<UtfString>(getSymbol(SO_DELETE_LEFT)) + '\n'; + exportString += "\"" + utfCvrtTo<UtfString>(getSyncOpDescription(SO_DELETE_RIGHT)) + "\";" + utfCvrtTo<UtfString>(getSymbol(SO_DELETE_RIGHT)) + '\n'; + exportString += "\"" + utfCvrtTo<UtfString>(getSyncOpDescription(SO_DO_NOTHING)) + "\";" + utfCvrtTo<UtfString>(getSymbol(SO_DO_NOTHING)) + '\n'; + exportString += "\"" + utfCvrtTo<UtfString>(getSyncOpDescription(SO_UNRESOLVED_CONFLICT)) + "\";" + utfCvrtTo<UtfString>(getSymbol(SO_UNRESOLVED_CONFLICT)) + '\n'; } else { - exportString += "\"" + utf8CvrtTo<UtfString>(getCategoryDescription(FILE_EQUAL)) + "\";" + utf8CvrtTo<UtfString>(getSymbol(FILE_EQUAL)) + '\n'; - exportString += "\"" + utf8CvrtTo<UtfString>(getCategoryDescription(FILE_DIFFERENT)) + "\";" + utf8CvrtTo<UtfString>(getSymbol(FILE_DIFFERENT)) + '\n'; - exportString += "\"" + utf8CvrtTo<UtfString>(getCategoryDescription(FILE_LEFT_SIDE_ONLY)) + "\";" + utf8CvrtTo<UtfString>(getSymbol(FILE_LEFT_SIDE_ONLY)) + '\n'; - exportString += "\"" + utf8CvrtTo<UtfString>(getCategoryDescription(FILE_RIGHT_SIDE_ONLY)) + "\";" + utf8CvrtTo<UtfString>(getSymbol(FILE_RIGHT_SIDE_ONLY)) + '\n'; - exportString += "\"" + utf8CvrtTo<UtfString>(getCategoryDescription(FILE_LEFT_NEWER)) + "\";" + utf8CvrtTo<UtfString>(getSymbol(FILE_LEFT_NEWER)) + '\n'; - exportString += "\"" + utf8CvrtTo<UtfString>(getCategoryDescription(FILE_RIGHT_NEWER)) + "\";" + utf8CvrtTo<UtfString>(getSymbol(FILE_RIGHT_NEWER)) + '\n'; - exportString += "\"" + utf8CvrtTo<UtfString>(getCategoryDescription(FILE_CONFLICT)) + "\";" + utf8CvrtTo<UtfString>(getSymbol(FILE_CONFLICT)) + '\n'; + exportString += "\"" + utfCvrtTo<UtfString>(getCategoryDescription(FILE_EQUAL)) + "\";" + utfCvrtTo<UtfString>(getSymbol(FILE_EQUAL)) + '\n'; + exportString += "\"" + utfCvrtTo<UtfString>(getCategoryDescription(FILE_DIFFERENT)) + "\";" + utfCvrtTo<UtfString>(getSymbol(FILE_DIFFERENT)) + '\n'; + exportString += "\"" + utfCvrtTo<UtfString>(getCategoryDescription(FILE_LEFT_SIDE_ONLY)) + "\";" + utfCvrtTo<UtfString>(getSymbol(FILE_LEFT_SIDE_ONLY)) + '\n'; + exportString += "\"" + utfCvrtTo<UtfString>(getCategoryDescription(FILE_RIGHT_SIDE_ONLY)) + "\";" + utfCvrtTo<UtfString>(getSymbol(FILE_RIGHT_SIDE_ONLY)) + '\n'; + exportString += "\"" + utfCvrtTo<UtfString>(getCategoryDescription(FILE_LEFT_NEWER)) + "\";" + utfCvrtTo<UtfString>(getSymbol(FILE_LEFT_NEWER)) + '\n'; + exportString += "\"" + utfCvrtTo<UtfString>(getCategoryDescription(FILE_RIGHT_NEWER)) + "\";" + utfCvrtTo<UtfString>(getSymbol(FILE_RIGHT_NEWER)) + '\n'; + exportString += "\"" + utfCvrtTo<UtfString>(getCategoryDescription(FILE_CONFLICT)) + "\";" + utfCvrtTo<UtfString>(getSymbol(FILE_CONFLICT)) + '\n'; } exportString += '\n'; //base folders - exportString += utf8CvrtTo<UtfString>(_("Folder pairs")) + '\n' ; + exportString += utfCvrtTo<UtfString>(_("Folder pairs")) + '\n' ; std::for_each(begin(folderCmp), end(folderCmp), [&](BaseDirMapping& baseMap) { - exportString += utf8CvrtTo<UtfString>(baseMap.getBaseDirPf<LEFT_SIDE >()) + ';'; - exportString += utf8CvrtTo<UtfString>(baseMap.getBaseDirPf<RIGHT_SIDE>()) + '\n'; + exportString += utfCvrtTo<UtfString>(baseMap.getBaseDirPf<LEFT_SIDE >()) + ';'; + exportString += utfCvrtTo<UtfString>(baseMap.getBaseDirPf<RIGHT_SIDE>()) + '\n'; }); exportString += '\n'; @@ -3750,9 +3791,9 @@ void MainDialog::OnMenuExportFileList(wxCommandEvent& event) auto addCellValue = [&](const wxString& val) { if (val.find(L';') != wxString::npos) - exportString += '\"' + utf8CvrtTo<UtfString>(val) + '\"'; + exportString += '\"' + utfCvrtTo<UtfString>(val) + '\"'; else - exportString += utf8CvrtTo<UtfString>(val); + exportString += utfCvrtTo<UtfString>(val); }; if (provLeft && provMiddle && provRight) @@ -3922,12 +3963,12 @@ void MainDialog::OnMenuLanguageSwitch(wxCommandEvent& event) //######################################################################################################### -void MainDialog::enablePreview(bool value) +void MainDialog::showSyncAction(bool value) { - syncPreviewEnabled = value; + showSyncAction_ = value; //toggle display of sync preview in middle grid - gridview::setSyncPreviewActive(*m_gridMain, value); + gridview::showSyncAction(*m_gridMain, value); updateGui(); } @@ -3935,15 +3976,15 @@ void MainDialog::enablePreview(bool value) void MainDialog::updateSyncEnabledStatus() { - if (folderCmp.empty()) + if (!folderCmp.empty()) { - m_buttonStartSync->SetForegroundColour(wxColor(128, 128, 128)); //Some colors seem to have problems with 16Bit color depth, well this one hasn't! - m_buttonStartSync->setBitmapFront(GlobalResources::getImage(L"syncDisabled")); + m_buttonStartSync->SetForegroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_BTNTEXT)); + m_buttonStartSync->setBitmapFront(GlobalResources::getImage(L"sync")); } else { - m_buttonStartSync->SetForegroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_BTNTEXT)); - m_buttonStartSync->setBitmapFront(GlobalResources::getImage(L"sync")); + m_buttonStartSync->SetForegroundColour(wxColor(128, 128, 128)); //Some colors seem to have problems with 16-bit desktop color, well this one hasn't! + m_buttonStartSync->setBitmapFront(GlobalResources::getImage(L"syncDisabled")); //looks better than greyscaling "sync" bmp } } diff --git a/ui/main_dlg.h b/ui/main_dlg.h index 6c0c6974..b9f3fe0d 100644 --- a/ui/main_dlg.h +++ b/ui/main_dlg.h @@ -106,7 +106,7 @@ private: void deleteSelectedFiles(const std::vector<zen::FileSystemObject*>& selectionLeft, const std::vector<zen::FileSystemObject*>& selectionRight); - void openExternalApplication(const zen::FileSystemObject* fsObj, bool leftSide, const wxString& commandline); //fsObj is optional! + void openExternalApplication(const wxString& commandline, const zen::FileSystemObject* fsObj, size_t compPos); //fsObj may be nullptr //work to be done in idle time void OnIdleEvent(wxEvent& event); @@ -251,9 +251,9 @@ private: bool processingGlobalKeyEvent; //indicator to notify recursion in OnGlobalKeyEvent() - bool syncPreviewEnabled; //toggle to display configuration preview instead of comparison result + bool showSyncAction_; //toggle to display configuration preview instead of comparison result //use this methods when changing values! - void enablePreview(bool value); + void showSyncAction(bool value); wxAuiManager auiMgr; //implement dockable GUI design diff --git a/ui/msg_popup.cpp b/ui/msg_popup.cpp index b6067242..142d2e9e 100644 --- a/ui/msg_popup.cpp +++ b/ui/msg_popup.cpp @@ -66,6 +66,8 @@ ErrorDlg::ErrorDlg(wxWindow* parent, const int activeButtons, const wxString& me m_buttonIgnore->SetFocus(); else if (activeButtons & ReturnErrorDlg::BUTTON_ABORT) m_buttonAbort->SetFocus(); + + Fit(); //child-element widths have changed: image was set } @@ -148,6 +150,8 @@ WarningDlg::WarningDlg(wxWindow* parent, int activeButtons, const wxString& mes m_buttonIgnore->SetFocus(); else if (activeButtons & ReturnWarningDlg::BUTTON_ABORT) m_buttonAbort->SetFocus(); + + Fit(); //child-element widths have changed: image was set } @@ -237,6 +241,8 @@ QuestionDlg::QuestionDlg(wxWindow* parent, int activeButtons, const wxString& me m_buttonCancel->SetFocus(); else if (activeButtons & ReturnQuestionDlg::BUTTON_NO) m_buttonNo->SetFocus(); + + Fit(); //child-element widths have changed: image was set } void QuestionDlg::OnYes(wxCommandEvent& event) diff --git a/ui/progress_indicator.cpp b/ui/progress_indicator.cpp index fba2c801..ff2df809 100644 --- a/ui/progress_indicator.cpp +++ b/ui/progress_indicator.cpp @@ -140,7 +140,7 @@ void CompareStatus::CompareStatusImpl::updateStatusPanelNow() //wxWindowUpdateLocker dummy(this) -> not needed - const wxString& scannedObjects = toStringSep(syncStat_->getObjectsCurrent(ProcessCallback::PHASE_SCANNING)); + const wxString& scannedObjects = toGuiString(syncStat_->getObjectsCurrent(ProcessCallback::PHASE_SCANNING)); auto setTitle = [&](const wxString& title) { @@ -186,7 +186,7 @@ void CompareStatus::CompareStatusImpl::updateStatusPanelNow() m_gauge2->SetValue(numeric::round(fraction * GAUGE_FULL_RANGE)); //remaining objects and bytes for file comparison - setText(*m_staticTextFilesRemaining, toStringSep(objectsTotal - objectsCurrent), &layoutChanged); + setText(*m_staticTextFilesRemaining, toGuiString(objectsTotal - objectsCurrent), &layoutChanged); setText(*m_staticTextDataRemaining, L"(" + filesizeToShortString(dataTotal - dataCurrent) + L")", &layoutChanged); //remaining time and speed: only visible during binary comparison @@ -270,15 +270,15 @@ inline wxBitmap buttonPressed(const std::string& name) { wxBitmap background = GlobalResources::getImage(wxT("log button pressed")); - return layOver(GlobalResources::getImage(utf8CvrtTo<wxString>(name)), background); + return layOver(GlobalResources::getImage(utfCvrtTo<wxString>(name)), background); } inline wxBitmap buttonReleased(const std::string& name) { - wxImage output = greyScale(GlobalResources::getImage(utf8CvrtTo<wxString>(name))).ConvertToImage(); - //GlobalResources::getImage(utf8CvrtTo<wxString>(name)).ConvertToImage().ConvertToGreyscale(1.0/3, 1.0/3, 1.0/3); //treat all channels equally! + wxImage output = greyScale(GlobalResources::getImage(utfCvrtTo<wxString>(name))).ConvertToImage(); + //GlobalResources::getImage(utfCvrtTo<wxString>(name)).ConvertToImage().ConvertToGreyscale(1.0/3, 1.0/3, 1.0/3); //treat all channels equally! //brighten(output, 30); zen::move(output, 0, -1); //move image right one pixel @@ -308,6 +308,8 @@ public: m_bpButtonWarnings->Show(warningCount != 0); m_bpButtonInfo ->Show(infoCount != 0); + m_textCtrlInfo->SetMaxLength(0); //allow large entries! + updateLogText(); m_textCtrlInfo->Connect(wxEVT_KEY_DOWN, wxKeyEventHandler(LogControl::onKeyEvent), nullptr, this); @@ -661,6 +663,7 @@ SyncStatus::SyncStatusImpl::SyncStatusImpl(AbortCallback& abortCb, m_staticTextLabelItemsProc->Show(false); bSizerItemsProc ->Show(false); m_buttonOK ->Show(false); + m_panelFooter->Layout(); //register key event Connect(wxEVT_CHAR_HOOK, wxKeyEventHandler(SyncStatusImpl::OnKeyPressed), nullptr, this); @@ -681,6 +684,8 @@ SyncStatus::SyncStatusImpl::SyncStatusImpl(AbortCallback& abortCb, m_comboBoxExecFinished->setHistoryRef(execFinishedHistory); updateDialogStatus(); //null-status will be shown while waiting for dir locks (if at all) + + Fit(); } @@ -834,11 +839,10 @@ void SyncStatus::SyncStatusImpl::setExternalStatus(const wxString& status, const if (mainDialog->GetTitle() != newCaption) mainDialog->SetTitle(newCaption); } - else - { - if (this->GetTitle() != newCaption) - this->SetTitle(newCaption); - } + + //always set a title: we don't wxGTK to show "nameless window" instead + if (this->GetTitle() != newCaption) + this->SetTitle(newCaption); } @@ -853,14 +857,14 @@ void SyncStatus::SyncStatusImpl::updateProgress(bool allowYield) bool layoutChanged = false; //avoid screen flicker by calling layout() only if necessary //sync status text - setText(*m_textCtrlInfo, replaceCpy(syncStat_->currentStatusText(), L'\n', L' ')); //no layout update for status texts! + setText(*m_textCtrlStatus, replaceCpy(syncStat_->currentStatusText(), L'\n', L' ')); //no layout update for status texts! switch (syncStat_->currentPhase()) //no matter if paused or not { case ProcessCallback::PHASE_NONE: case ProcessCallback::PHASE_SCANNING: //dialog caption, taskbar, systray tooltip - setExternalStatus(getDialogStatusText(syncStat_, paused_, finalResult), toStringSep(syncStat_->getObjectsCurrent(ProcessCallback::PHASE_SCANNING))); //status text may be "paused"! + setExternalStatus(getDialogStatusText(syncStat_, paused_, finalResult), toGuiString(syncStat_->getObjectsCurrent(ProcessCallback::PHASE_SCANNING))); //status text may be "paused"! //progress indicators m_gauge1->Pulse(); @@ -905,7 +909,7 @@ void SyncStatus::SyncStatusImpl::updateProgress(bool allowYield) graphDataBytesTotal->setValue(to<double>(dataTotal)); //remaining objects and data - setText(*m_staticTextRemainingObj, toStringSep(objectsTotal - objectsCurrent), &layoutChanged); + setText(*m_staticTextRemainingObj, toGuiString(objectsTotal - objectsCurrent), &layoutChanged); setText(*m_staticTextDataRemaining, L"(" + filesizeToShortString(dataTotal - dataCurrent) + L")", &layoutChanged); //remaining time and speed @@ -949,7 +953,7 @@ void SyncStatus::SyncStatusImpl::updateProgress(bool allowYield) // Layout(); // bSizerItemsRem->Layout(); // bSizer171->Layout(); - bSizerProgressStat->Layout(); // + //bSizerProgressStat->Layout(); // m_panelProgress->Layout(); //both needed //m_panelBackground->Layout(); //we use a dummy panel as actual background: replaces simple "Layout()" call //-> it seems this layout is not required, and even harmful: resets m_comboBoxExecFinished dropdown while user is selecting! @@ -1083,7 +1087,8 @@ void SyncStatus::SyncStatusImpl::updateDialogStatus() //depends on "syncStat_, p } } - m_panelBackground->Layout(); //we use a dummy panel as actual background: replaces simple "Layout()" call + m_panelHeader->Layout(); + Layout(); } @@ -1139,7 +1144,7 @@ void SyncStatus::SyncStatusImpl::processHasFinished(SyncResult resultId, const E //show new element "items processed" m_staticTextLabelItemsProc->Show(true); bSizerItemsProc ->Show(true); - m_staticTextProcessedObj ->SetLabel(toStringSep(objectsCurrent)); + m_staticTextProcessedObj ->SetLabel(toGuiString(objectsCurrent)); m_staticTextDataProcessed->SetLabel(L"(" + filesizeToShortString(dataCurrent) + L")"); //hide remaining elements... @@ -1180,7 +1185,8 @@ void SyncStatus::SyncStatusImpl::processHasFinished(SyncResult resultId, const E m_animationControl1->Hide(); //hide current operation status - bSizerCurrentOperation->Show(false); + m_staticlineHeader ->Hide(); + m_textCtrlStatus ->Hide(); bSizerExecFinished->Show(false); @@ -1218,7 +1224,8 @@ void SyncStatus::SyncStatusImpl::processHasFinished(SyncResult resultId, const E if (log.getItemCount(TYPE_ERROR | TYPE_FATAL_ERROR) > 0) m_listbookResult->ChangeSelection(posLog); - m_panelBackground->Layout(); //we use a dummy panel as actual background: replaces simple "Layout()" call + m_panelFooter->Layout(); + Layout(); //Raise(); -> don't! user may be watching a movie in the meantime ;) } diff --git a/ui/small_dlgs.cpp b/ui/small_dlgs.cpp index c8c88de0..0dd85593 100644 --- a/ui/small_dlgs.cpp +++ b/ui/small_dlgs.cpp @@ -18,6 +18,7 @@ #include <zen/build_info.h> #include <wx/wupdlock.h> #include <wx/msgdlg.h> +#include <wx+/no_flicker.h> #include <wx+/mouse_move_dlg.h> #include <wx+/rtl.h> #include "../lib/help_provider.h" @@ -58,11 +59,13 @@ AboutDlg::AboutDlg(wxWindow* parent) : AboutDlgGenerated(parent) //language name wxStaticText* staticTextLanguage = new wxStaticText(m_scrolledWindowTranslators, wxID_ANY, iter->languageName, wxDefaultPosition, wxDefaultSize, 0 ); staticTextLanguage->Wrap(-1); + staticTextLanguage->SetForegroundColour(*wxBLACK); //accessibility: always set both foreground AND background colors! fgSizerTranslators->Add(staticTextLanguage, 0, wxALIGN_CENTER_VERTICAL); //translator name wxStaticText* staticTextTranslator = new wxStaticText(m_scrolledWindowTranslators, wxID_ANY, iter->translatorName, wxDefaultPosition, wxDefaultSize, 0 ); staticTextTranslator->Wrap(-1); + staticTextTranslator->SetForegroundColour(*wxBLACK); //accessibility: always set both foreground AND background colors! fgSizerTranslators->Add(staticTextTranslator, 0, wxALIGN_CENTER_VERTICAL); } @@ -90,10 +93,10 @@ AboutDlg::AboutDlg(wxWindow* parent) : AboutDlgGenerated(parent) //m_animationControl1->Play(); m_buttonOkay->SetFocus(); - Fit(); + Fit(); //child-element widths have changed: image was set #ifdef FFS_WIN - new zen::MouseMoveWindow(*this); //allow moving main dialog by clicking (nearly) anywhere...; ownership passed to "this" + new zen::MouseMoveWindow(*this); //-> put *after* creating credit control #endif } @@ -117,7 +120,7 @@ public: private: void OnClose ( wxCloseEvent& event) { EndModal(ReturnSmallDlg::BUTTON_CANCEL); } void OnCancel (wxCommandEvent& event) { EndModal(ReturnSmallDlg::BUTTON_CANCEL); } - void OnHelp (wxCommandEvent& event); + void OnHelp (wxCommandEvent& event) { displayHelpEntry(L"html/Exclude Items.html"); } void OnDefault (wxCommandEvent& event); void OnApply (wxCommandEvent& event); void OnUpdateChoice(wxCommandEvent& event) { updateGui(); } @@ -172,8 +175,7 @@ FilterDlg::FilterDlg(wxWindow* parent, setFilter(filter); - m_panel13->Hide(); - m_button10->SetFocus(); + m_buttonOk->SetFocus(); //adapt header for global/local dialog // if (isGlobalFilter_) @@ -266,17 +268,6 @@ FilterConfig FilterDlg::getFilter() const } -void FilterDlg::OnHelp(wxCommandEvent& event) -{ - m_bpButtonHelp->Hide(); - m_panel13->Show(); - Fit(); - Refresh(); - - event.Skip(); -} - - void FilterDlg::OnDefault(wxCommandEvent& event) { if (isGlobalFilter_) @@ -359,6 +350,8 @@ DeleteDialog::DeleteDialog(wxWindow* parent, m_checkBoxDeleteBothSides->SetValue(true); } + m_textCtrlFileList->SetMaxLength(0); //allow large entries! + updateGui(); m_buttonOK->SetFocus(); @@ -367,6 +360,8 @@ DeleteDialog::DeleteDialog(wxWindow* parent, void DeleteDialog::updateGui() { + wxWindowUpdateLocker dummy(m_panelHeader); //avoid display distortion + const std::pair<wxString, int> delInfo = zen::deleteFromGridAndHDPreview( rowsToDeleteOnLeft, rowsToDeleteOnRight, @@ -376,20 +371,22 @@ void DeleteDialog::updateGui() { header = _P("Do you really want to move the following object to the Recycle Bin?", "Do you really want to move the following %x objects to the Recycle Bin?", delInfo.second); - m_bitmap12->SetBitmap(GlobalResources::getImage(wxT("recycler"))); + m_bitmap12->SetBitmap(GlobalResources::getImage(L"recycler")); } else { header = _P("Do you really want to delete the following object?", "Do you really want to delete the following %x objects?", delInfo.second); - m_bitmap12->SetBitmap(GlobalResources::getImage(wxT("deleteFile"))); + m_bitmap12->SetBitmap(GlobalResources::getImage(L"deleteFile")); } - replace(header, L"%x", toStringSep(delInfo.second)); + replace(header, L"%x", toGuiString(delInfo.second)); m_staticTextHeader->SetLabel(header); const wxString& filesToDelete = delInfo.first; - m_textCtrlMessage->SetValue(filesToDelete); + m_textCtrlFileList->ChangeValue(filesToDelete); + Fit(); //child-element widths have changed: image was set + m_panelHeader->Layout(); Layout(); } @@ -435,7 +432,7 @@ class SyncPreviewDlg : public SyncPreviewDlgGenerated public: SyncPreviewDlg(wxWindow* parent, const wxString& variantName, - const zen::SyncStatistics& statistics, + const zen::SyncStatistics& st, bool& dontShowAgain); private: void OnClose (wxCloseEvent& event) { EndModal(ReturnSmallDlg::BUTTON_CANCEL); } @@ -448,7 +445,7 @@ private: SyncPreviewDlg::SyncPreviewDlg(wxWindow* parent, const wxString& variantName, - const zen::SyncStatistics& statistics, + const SyncStatistics& st, bool& dontShowAgain) : SyncPreviewDlgGenerated(parent), m_dontShowAgain(dontShowAgain) @@ -457,27 +454,33 @@ SyncPreviewDlg::SyncPreviewDlg(wxWindow* parent, new zen::MouseMoveWindow(*this); //allow moving main dialog by clicking (nearly) anywhere...; ownership passed to "this" #endif - using zen::toStringSep; - - m_buttonStartSync->setBitmapFront(GlobalResources::getImage(wxT("startSync"))); - - m_bitmapCreate->SetBitmap(mirrorIfRtl(GlobalResources::getImage(L"create"))); - m_bitmapUpdate->SetBitmap(mirrorIfRtl(GlobalResources::getImage(L"update"))); - m_bitmapDelete->SetBitmap(mirrorIfRtl(GlobalResources::getImage(L"delete"))); - m_bitmapData ->SetBitmap(mirrorIfRtl(GlobalResources::getImage(L"data"))); - + m_buttonStartSync->setBitmapFront(GlobalResources::getImage(L"startSync")); m_staticTextVariant->SetLabel(variantName); - m_textCtrlData->SetValue(zen::filesizeToShortString(statistics.getDataToProcess())); + m_checkBoxDontShowAgain->SetValue(dontShowAgain); - m_textCtrlCreateL->SetValue(toStringSep(statistics.getCreate<LEFT_SIDE>())); - m_textCtrlUpdateL->SetValue(toStringSep(statistics.getUpdate<LEFT_SIDE>())); - m_textCtrlDeleteL->SetValue(toStringSep(statistics.getDelete<LEFT_SIDE>())); + //update preview of item count and bytes to be transferred: + setText(*m_staticTextData, filesizeToShortString(st.getDataToProcess())); + if (st.getDataToProcess() == 0) + m_bitmapData->SetBitmap(greyScale(GlobalResources::getImage(L"data"))); + else + m_bitmapData->SetBitmap(GlobalResources::getImage(L"data")); - m_textCtrlCreateR->SetValue(toStringSep(statistics.getCreate<RIGHT_SIDE>())); - m_textCtrlUpdateR->SetValue(toStringSep(statistics.getUpdate<RIGHT_SIDE>())); - m_textCtrlDeleteR->SetValue(toStringSep(statistics.getDelete<RIGHT_SIDE>())); + auto setValue = [](wxStaticText& txtControl, int value, wxStaticBitmap& bmpControl, const wchar_t* bmpName) + { + setText(txtControl, toGuiString(value)); - m_checkBoxDontShowAgain->SetValue(dontShowAgain); + if (value == 0) + bmpControl.SetBitmap(greyScale(mirrorIfRtl(GlobalResources::getImage(bmpName)))); + else + bmpControl.SetBitmap(mirrorIfRtl(GlobalResources::getImage(bmpName))); + }; + + setValue(*m_staticTextCreateLeft, st.getCreate<LEFT_SIDE >(), *m_bitmapCreateLeft, L"createLeftSmall"); + setValue(*m_staticTextUpdateLeft, st.getUpdate<LEFT_SIDE >(), *m_bitmapUpdateLeft, L"updateLeftSmall"); + setValue(*m_staticTextDeleteLeft, st.getDelete<LEFT_SIDE >(), *m_bitmapDeleteLeft, L"deleteLeftSmall"); + setValue(*m_staticTextCreateRight, st.getCreate<RIGHT_SIDE>(), *m_bitmapCreateRight, L"createRightSmall"); + setValue(*m_staticTextUpdateRight, st.getUpdate<RIGHT_SIDE>(), *m_bitmapUpdateRight, L"updateRightSmall"); + setValue(*m_staticTextDeleteRight, st.getDelete<RIGHT_SIDE>(), *m_bitmapDeleteRight, L"deleteRightSmall"); m_buttonStartSync->SetFocus(); Fit(); @@ -515,17 +518,16 @@ private: void OnOkay(wxCommandEvent& event); void OnClose (wxCloseEvent& event) { EndModal(ReturnSmallDlg::BUTTON_CANCEL); } void OnCancel(wxCommandEvent& event) { EndModal(ReturnSmallDlg::BUTTON_CANCEL); } - void OnShowHelp(wxCommandEvent& event); + void OnShowHelp(wxCommandEvent& event) { displayHelpEntry(L"html/Comparison Settings.html"); } - void OnTimeSize(wxCommandEvent& event) { m_radioBtnSizeDate->SetValue(true); } - //void OnFilesize(wxCommandEvent& event) { m_radioBtnSize ->SetValue(true); } - void OnContent (wxCommandEvent& event) { m_radioBtnContent ->SetValue(true); } + void OnTimeSize(wxCommandEvent& event) { m_radioBtnSizeDate->SetValue(true); updateGui(); } + void OnContent (wxCommandEvent& event) { m_radioBtnContent ->SetValue(true); updateGui(); } void OnTimeSizeDouble(wxMouseEvent& event); void OnFilesizeDouble(wxMouseEvent& event); void OnContentDouble(wxMouseEvent& event); - void updateView(); + void updateGui(); CompConfig& cmpConfigOut; @@ -550,10 +552,7 @@ CompareCfgDialog::CompareCfgDialog(wxWindow* parent, //move dialog up so that compare-config button and first config-variant are on same level // Move(wxPoint(position.x, std::max(0, position.y - (m_buttonTimeSize->GetScreenPosition() - GetScreenPosition()).y))); - m_bpButtonHelp ->SetBitmapLabel(GlobalResources::getImage(wxT("help"))); - m_bitmapByTime ->SetBitmap (GlobalResources::getImage(wxT("clock"))); - //m_bitmapBySize ->SetBitmap (GlobalResources::getImage(wxT("size"))); - m_bitmapByContent->SetBitmap (GlobalResources::getImage(wxT("cmpByContent"))); + m_bpButtonHelp ->SetBitmapLabel(GlobalResources::getImage(L"help")); switch (cmpConfig.compareVar) { @@ -569,14 +568,26 @@ CompareCfgDialog::CompareCfgDialog(wxWindow* parent, setEnumVal(enumDescrHandleSyml, *m_choiceHandleSymlinks, cmpConfig.handleSymlinks); - updateView(); + updateGui(); + Fit(); } -void CompareCfgDialog::updateView() + +void CompareCfgDialog::updateGui() { - Fit(); + auto setBitmap = [](wxStaticBitmap& bmpCtrl, bool active, const wxBitmap& bmp) + { + if (active) + bmpCtrl.SetBitmap(bmp); + else + bmpCtrl.SetBitmap(greyScale(bmp)); + }; + + setBitmap(*m_bitmapByTime, m_radioBtnSizeDate->GetValue(), GlobalResources::getImage(L"clock")); + setBitmap(*m_bitmapByContent, m_radioBtnContent ->GetValue(), GlobalResources::getImage(L"cmpByContent")); } + void CompareCfgDialog::OnOkay(wxCommandEvent& event) { if (m_radioBtnContent->GetValue()) @@ -606,16 +617,6 @@ void CompareCfgDialog::OnContentDouble(wxMouseEvent& event) } -void CompareCfgDialog::OnShowHelp(wxCommandEvent& event) -{ -#ifdef FFS_WIN - zen::displayHelpEntry(wxT("html\\ComparisonSettings.html")); -#elif defined FFS_LINUX - zen::displayHelpEntry(wxT("html/ComparisonSettings.html")); -#endif -} - - ReturnSmallDlg::ButtonPressed zen::showCompareCfgDialog(wxWindow* parent, CompConfig& cmpConfig) { CompareCfgDialog syncDlg(parent, cmpConfig); @@ -673,8 +674,8 @@ GlobalSettingsDlg::GlobalSettingsDlg(wxWindow* parent, xmlAccess::XmlGlobalSetti set(globalSettings.gui.externelApplications); const wxString toolTip = wxString(_("Integrate external applications into context menu. The following macros are available:")) + wxT("\n\n") + - wxT("%name \t") + _("- full file or directory name") + wxT("\n") + - wxT("%dir \t") + _("- directory part only") + wxT("\n") + + wxT("%name \t") + _("- full file or folder name") + wxT("\n") + + wxT("%dir \t") + _("- folder part only") + wxT("\n") + wxT("%nameCo \t") + _("- Other side's counterpart to %name") + wxT("\n") + wxT("%dirCo \t") + _("- Other side's counterpart to %dir"); @@ -768,10 +769,11 @@ xmlAccess::ExternalApps GlobalSettingsDlg::getExtApp() xmlAccess::ExternalApps output; for (int i = 0; i < m_gridCustomCommand->GetNumberRows(); ++i) { - auto entry = std::make_pair(m_gridCustomCommand->GetCellValue(i, 0), //description - m_gridCustomCommand->GetCellValue(i, 1)); //commandline - if (!entry.first.empty() || !entry.second.empty()) - output.push_back(entry); + auto description = copyStringTo<std::wstring>(m_gridCustomCommand->GetCellValue(i, 0)); + auto commandline = copyStringTo<std::wstring>(m_gridCustomCommand->GetCellValue(i, 1)); + + if (!description.empty() || !commandline.empty()) + output.push_back(std::make_pair(description, commandline)); } return output; } @@ -869,7 +871,7 @@ SelectTimespanDlg::SelectTimespanDlg(wxWindow* parent, Int64& timeFrom, Int64& t LOCALE_IFIRSTDAYOFWEEK | // first day of week specifier, 0-6, 0=Monday, 6=Sunday LOCALE_RETURN_NUMBER, //__in LCTYPE LCType, reinterpret_cast<LPTSTR>(&firstDayOfWeek), //__out LPTSTR lpLCData, - sizeof(firstDayOfWeek) / sizeof(TCHAR)) != 0 && //__in int cchData + sizeof(firstDayOfWeek) / sizeof(TCHAR)) > 0 && //__in int cchData firstDayOfWeek == 6) style |= wxCAL_SUNDAY_FIRST; else //default diff --git a/ui/sync_cfg.cpp b/ui/sync_cfg.cpp index 87e1b44d..b88d40f0 100644 --- a/ui/sync_cfg.cpp +++ b/ui/sync_cfg.cpp @@ -214,7 +214,7 @@ SyncCfgDialog::SyncCfgDialog(wxWindow* parent, enumDelhandDescr. add(DELETE_PERMANENTLY, _("Delete permanently"), _("Delete or overwrite files permanently")). add(MOVE_TO_RECYCLE_BIN, _("Use Recycle Bin"), _("Use Recycle Bin when deleting or overwriting files")). - add(MOVE_TO_CUSTOM_DIRECTORY, _("Versioning"), _("Move files into a time-stamped subdirectory")); + add(MOVE_TO_CUSTOM_DIRECTORY, _("Versioning"), _("Move files into a time-stamped subfolder")); enumErrhandDescr. add(ON_GUIERROR_POPUP, _("Show pop-up"), _("Show pop-up on errors or warnings")). @@ -317,19 +317,27 @@ void SyncCfgDialog::updateGui() } //set radiobuttons -> have no parameter-ownership at all! + m_staticTextAutomatic->SetForegroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_GRAYTEXT)); + m_staticTextMirror ->SetForegroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_GRAYTEXT)); + m_staticTextUpdate ->SetForegroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_GRAYTEXT)); + m_staticTextCustom ->SetForegroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_GRAYTEXT)); switch (currentDirectionCfg.var) { case DirectionConfig::AUTOMATIC: m_radioBtnAutomatic->SetValue(true); //automatic mode + m_staticTextAutomatic->SetForegroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT)); break; case DirectionConfig::MIRROR: m_radioBtnMirror->SetValue(true); //one way -> + m_staticTextMirror->SetForegroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT)); break; case DirectionConfig::UPDATE: m_radioBtnUpdate->SetValue(true); //Update -> + m_staticTextUpdate->SetForegroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT)); break; case DirectionConfig::CUSTOM: m_radioBtnCustom->SetValue(true); //custom + m_staticTextCustom->SetForegroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT)); break; } diff --git a/ui/tray_icon.cpp b/ui/tray_icon.cpp index 2fc76f15..cd61ae29 100644 --- a/ui/tray_icon.cpp +++ b/ui/tray_icon.cpp @@ -171,7 +171,7 @@ private: return nullptr; wxMenu* contextMenu = new wxMenu; - contextMenu->Append(CONTEXT_ABOUT, _("&About...")); + contextMenu->Append(CONTEXT_ABOUT, _("&About")); contextMenu->AppendSeparator(); contextMenu->Append(CONTEXT_RESTORE, _("&Restore")); //event handling diff --git a/ui/tree_view.cpp b/ui/tree_view.cpp index b3a9595a..ea73d979 100644 --- a/ui/tree_view.cpp +++ b/ui/tree_view.cpp @@ -9,6 +9,7 @@ #include <wx/settings.h> #include <wx/menu.h> #include <zen/i18n.h> +#include <zen/utf.h> #include <zen/stl_tools.h> #include <wx+/format_unit.h> #include <wx+/rtl.h> @@ -336,7 +337,7 @@ void TreeView::updateView(Predicate pred) if (root.firstFile || !root.subDirs.empty()) { root.baseMap = baseObj; - compressNode(root); + this->compressNode(root); //"this->" required by two-pass lookup as enforced by GCC 4.7 } else newView.pop_back(); @@ -656,18 +657,18 @@ private: case COL_TYPE_NAVI_DIRECTORY: if (const TreeView::RootNode* root = dynamic_cast<const TreeView::RootNode*>(node.get())) { - const wxString dirLeft = utf8CvrtTo<wxString>(beforeLast(root->baseMap_.getBaseDirPf<LEFT_SIDE >(), FILE_NAME_SEPARATOR)); - const wxString dirRight = utf8CvrtTo<wxString>(beforeLast(root->baseMap_.getBaseDirPf<RIGHT_SIDE>(), FILE_NAME_SEPARATOR)); + const wxString dirLeft = utfCvrtTo<wxString>(beforeLast(root->baseMap_.getBaseDirPf<LEFT_SIDE >(), FILE_NAME_SEPARATOR)); + const wxString dirRight = utfCvrtTo<wxString>(beforeLast(root->baseMap_.getBaseDirPf<RIGHT_SIDE>(), FILE_NAME_SEPARATOR)); if (dirLeft.empty()) return dirRight; else if (dirRight.empty()) return dirLeft; else - return utf8CvrtTo<wxString>(dirLeft + L" \x2212 " + dirRight); //\x2212 = unicode minus + return utfCvrtTo<wxString>(dirLeft + L" \x2212 " + dirRight); //\x2212 = unicode minus } else if (const TreeView::DirNode* dir = dynamic_cast<const TreeView::DirNode*>(node.get())) - return utf8CvrtTo<wxString>(dir->dirObj_.getObjShortName()); + return utfCvrtTo<wxString>(dir->dirObj_.getObjShortName()); else if (dynamic_cast<const TreeView::FilesNode*>(node.get())) return _("Files"); break; @@ -801,6 +802,8 @@ private: dc.SetBrush(*wxTRANSPARENT_BRUSH); dc.DrawRectangle(areaPerc); } + + wxDCTextColourChanger dummy3(dc, *wxBLACK); //accessibility: always set both foreground AND background colors! dc.DrawLabel(numberTo<wxString>(node->percent_) + L"%", areaPerc, wxALIGN_CENTER); rectTmp.x += widthPercentBar + 2 * CELL_BORDER; @@ -816,7 +819,8 @@ private: wxRect rectStat(rectTmp.GetTopLeft(), wxSize(bmp.GetWidth(), bmp.GetHeight())); rectStat.y += (rectTmp.height - rectStat.height) / 2; - clearArea(dc, rectStat, wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW)); + //clearArea(dc, rectStat, wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW)); + clearArea(dc, rectStat, *wxWHITE); //accessibility: always set both foreground AND background colors! drawBitmapRtlMirror(dc, bmp, rectStat, wxALIGN_CENTER, buffer); }; |