using boost::end;
int CDirDoc::m_nDirsTemp = 2;
+// If a folder comparison takes longer than this threshold,
+// display a confirmation message when closing the folder comparison window.
+static constexpr int COMPARISON_TIME_THRESHOLD_SECONDS = 30;
/////////////////////////////////////////////////////////////////////////////
// CDirDoc
, m_pTempPathContext(nullptr)
, m_bGeneratingReport(false)
, m_pReport(nullptr)
+, m_compareStart(0)
+, m_elapsed(0)
{
m_nDirs = m_nDirsTemp;
void CDirDoc::DiffThreadCallback(int& state)
{
+ if (state == CDiffThread::EVENT_COMPARE_COMPLETED)
+ m_elapsed = clock() - m_compareStart;
PostMessage(m_pDirView->GetSafeHwnd(), MSG_UI_UPDATE, state, false);
}
if (!m_bGeneratingReport)
m_pCompareStats->Reset();
- m_pDirView->StartCompare(m_pCompareStats.get());
+
+ m_compareStart = clock();
if (m_pCmpProgressBar == nullptr)
m_pCmpProgressBar.reset(new DirCompProgressBar());
// Do not allow closing if there is a thread running
if (m_diffThread.GetThreadState() == CDiffThread::THREAD_COMPARING)
{
- int ans = LangMessageBox(IDS_CONFIRM_CLOSE_WINDOW, MB_YESNO | MB_ICONWARNING);
+ int ans = LangMessageBox(IDS_CONFIRM_CLOSE_WINDOW_COMPARING, MB_YESNO | MB_ICONWARNING);
if (ans == IDNO)
return FALSE;
m_diffThread.Abort();
Sleep(50);
CompareReady();
}
-
+
+ if (m_elapsed >= COMPARISON_TIME_THRESHOLD_SECONDS * 1000)
+ {
+ int ans = LangMessageBox(IDS_CONFIRM_CLOSE_WINDOW_LONG_COMPARISON, MB_YESNO | MB_ICONWARNING | MB_DONT_ASK_AGAIN);
+ if (ans == IDNO)
+ return FALSE;
+ }
+
return CDocument::SaveModified();
}
bool HasDirView() const { return m_pDirView != nullptr; }
void RefreshOptions();
void CompareReady();
+ clock_t GetElapsedTime() const { return m_elapsed; }
void UpdateChangedItem(const PathContext & paths,
UINT nDiffs, UINT nTrivialDiffs, bool bIdentical);
void UpdateResources();
std::unique_ptr<DirCmpReport> m_pReport;
FileFilterHelper m_fileHelper; /**< File filter helper */
std::unique_ptr<DirCompProgressBar> m_pCmpProgressBar;
+ clock_t m_compareStart; /**< Starting process time of the compare */
+ clock_t m_elapsed; /**< Elapsed time of the compare */
};
/**
CDirView::CDirView()
: m_pList(nullptr)
- , m_compareStart(0)
, m_elapsed(0)
, m_bTreeMode(false)
, m_dirfilter(std::bind(&COptionsMgr::GetBool, GetOptionsMgr(), _1))
*/
void CDirView::StartCompare(CompareStats *pCompareStats)
{
- m_compareStart = clock();
+ m_elapsed = 0;
}
/**
MoveFocus(0, 0, 0);
// If compare took more than TimeToSignalCompare seconds, notify user
- m_elapsed = clock() - m_compareStart;
+ m_elapsed = pDoc->GetElapsedTime();
SetTimer(STATUSBAR_UPDATE, 150, nullptr);
if (m_elapsed > TimeToSignalCompare * CLOCKS_PER_SEC)
MessageBeep(IDOK);
CFont m_font; /**< User-selected font */
bool m_bTreeMode; /**< `true` if tree mode is on*/
DirViewFilterSettings m_dirfilter;
- clock_t m_compareStart; /**< Starting process time of the compare */
clock_t m_elapsed; /**< Elapsed time of the compare */
bool m_bUserCancelEdit; /**< `true` if the user cancels rename */
String m_lastCopyFolder; /**< Last Copy To -target folder. */
IDS_CONFIRM_MULTIPLE_MOVE "Are you sure you want to move %d items?"\r
IDS_CONFIRM_COPY_CAPTION "Confirm Copy"\r
IDS_CONFIRM_MOVE_CAPTION "Confirm Move"\r
- IDS_CONFIRM_CLOSE_WINDOW \r
+ IDS_CONFIRM_CLOSE_WINDOW_COMPARING \r
"You are about to close the window that is comparing folders. Are you sure you want to close the window?"\r
+ IDS_CONFIRM_CLOSE_WINDOW_LONG_COMPARISON\r
+ "You are about to close the folder comparison window that took a significant amount of time. Are you sure you want to close the window?"\r
IDS_ERROR_INVALID_DIR_FILE_NAME\r
"The file or folder name is invalid."\r
END\r
// folder compare window
{ IDS_CREATE_PAIR_FOLDER, IDS_CREATE_PAIR_FOLDER, nullptr, MB_YESNO | MB_ICONWARNING | MB_DONT_ASK_AGAIN },
{ IDS_CONFIRM_SINGLE_COPY, 0, _T("FolderCopyConfirmDlgDontAskAgain"), MB_YESNO | MB_ICONWARNING | MB_DONT_ASK_AGAIN },
+ { IDS_CONFIRM_CLOSE_WINDOW_LONG_COMPARISON, IDS_CONFIRM_CLOSE_WINDOW_LONG_COMPARISON, nullptr, MB_YESNO | MB_ICONWARNING | MB_DONT_ASK_AGAIN },
// file compare window
{ IDS_COMPARE_LARGE_FILES, 0, _T("CompareLargeFiles"), MB_YESNOCANCEL | MB_ICONQUESTION | MB_DONT_ASK_AGAIN},
{ IDS_FILESSAME, IDS_FILESSAME, nullptr, MB_ICONINFORMATION | MB_DONT_DISPLAY_AGAIN},
#define IDS_CONFIRM_MULTIPLE_MOVE 41697\r
#define IDS_CONFIRM_COPY_CAPTION 41698\r
#define IDS_CONFIRM_MOVE_CAPTION 41699\r
-#define IDS_CONFIRM_CLOSE_WINDOW 41700\r
-#define IDS_ERROR_INVALID_DIR_FILE_NAME 41701\r
+#define IDS_CONFIRM_CLOSE_WINDOW_COMPARING 41700\r
+#define IDS_CONFIRM_CLOSE_WINDOW_LONG_COMPARISON 41701\r
+#define IDS_ERROR_INVALID_DIR_FILE_NAME 41702\r
#define IDS_ERROR_EXECUTE_FILE 41719\r
#define IDS_UNKNOWN_ARCHIVE_FORMAT 41731\r
#define IDS_FAILED_EXTRACT_ARCHIVE_FILES 41732\r
"أنت على وشك إغلاق النافذة التي تقوم بالمقارنة بين المجلدات. هل أنت متأكد "
"برغبتك في إغلاقها؟"
+msgid "You are about to close the folder comparison window that took a significant amount of time. Are you sure you want to close the window?"
+msgstr ""
+
msgid "The file or folder name is invalid."
msgstr ""
msgid "You are about to close the window that is comparing folders. Are you sure you want to close the window?"
msgstr ""
+msgid "You are about to close the folder comparison window that took a significant amount of time. Are you sure you want to close the window?"
+msgstr ""
+
msgid "The file or folder name is invalid."
msgstr ""
msgid "You are about to close the window that is comparing folders. Are you sure you want to close the window?"
msgstr "Você está pra fechar a janela que está comparando as pastas. Você tem certeza que você quer fechar a janela?"
+msgid "You are about to close the folder comparison window that took a significant amount of time. Are you sure you want to close the window?"
+msgstr ""
+
msgid "The file or folder name is invalid."
msgstr "Nome de arquivo ou pasta inválido."
"На път сте да затворите прозореца, в който се сравняват папки. Наистина ли "
"искате да затворите този прозорец?"
+msgid "You are about to close the folder comparison window that took a significant amount of time. Are you sure you want to close the window?"
+msgstr ""
+
msgid "The file or folder name is invalid."
msgstr "Името на файла или папката е недействително."
msgid "You are about to close the window that is comparing folders. Are you sure you want to close the window?"
msgstr "Esteu a punt de tancar la finestra que compara els directoris. Esteu segurs de tancar la finestra?"
+msgid "You are about to close the folder comparison window that took a significant amount of time. Are you sure you want to close the window?"
+msgstr ""
+
msgid "The file or folder name is invalid."
msgstr ""
msgid "You are about to close the window that is comparing folders. Are you sure you want to close the window?"
msgstr "您即将关闭比较文件夹的窗口。确定关闭该窗口?"
+msgid "You are about to close the folder comparison window that took a significant amount of time. Are you sure you want to close the window?"
+msgstr ""
+
msgid "The file or folder name is invalid."
msgstr "文件或文件夹的名称不合法。"
msgid "You are about to close the window that is comparing folders. Are you sure you want to close the window?"
msgstr "您要關閉一個正在比較資料夾的視窗,您確定要關閉視窗嗎?"
+msgid "You are about to close the folder comparison window that took a significant amount of time. Are you sure you want to close the window?"
+msgstr ""
+
msgid "The file or folder name is invalid."
msgstr "檔案或資料夾名稱無效。"
msgid "You are about to close the window that is comparing folders. Are you sure you want to close the window?"
msgstr "State per chjode a finestra chì paraguneghja i cartulari. Da veru vulete chjode a finestra ?"
+msgid "You are about to close the folder comparison window that took a significant amount of time. Are you sure you want to close the window?"
+msgstr ""
+
msgid "The file or folder name is invalid."
msgstr "U nome di u schedariu o di u cartulare hè inaccettevule."
msgid "You are about to close the window that is comparing folders. Are you sure you want to close the window?"
msgstr ""
+msgid "You are about to close the folder comparison window that took a significant amount of time. Are you sure you want to close the window?"
+msgstr ""
+
msgid "The file or folder name is invalid."
msgstr ""
msgid "You are about to close the window that is comparing folders. Are you sure you want to close the window?"
msgstr ""
+msgid "You are about to close the folder comparison window that took a significant amount of time. Are you sure you want to close the window?"
+msgstr ""
+
msgid "The file or folder name is invalid."
msgstr ""
msgid "You are about to close the window that is comparing folders. Are you sure you want to close the window?"
msgstr ""
+msgid "You are about to close the folder comparison window that took a significant amount of time. Are you sure you want to close the window?"
+msgstr ""
+
msgid "The file or folder name is invalid."
msgstr ""
msgid "You are about to close the window that is comparing folders. Are you sure you want to close the window?"
msgstr "U staat op het punt om het venster te sluiten dat mappen aan het vergelijken is. Weet u zeker dat u het venster wilt sluiten?"
+msgid "You are about to close the folder comparison window that took a significant amount of time. Are you sure you want to close the window?"
+msgstr ""
+
msgid "The file or folder name is invalid."
msgstr "Bestands- of mapnaam is ongeldig."
msgstr ""
"Project-Id-Version: WinMerge\n"
"Report-Msgid-Bugs-To: https://bugs.winmerge.org/\n"
-"POT-Creation-Date: 2023-08-05 10:45+0000\n"
+"POT-Creation-Date: 2023-08-27 15:32+0000\n"
"PO-Revision-Date: \n"
"Last-Translator: \n"
"Language-Team: English <winmerge-translate@lists.sourceforge.net>\n"
msgid "You are about to close the window that is comparing folders. Are you sure you want to close the window?"
msgstr ""
+msgid "You are about to close the folder comparison window that took a significant amount of time. Are you sure you want to close the window?"
+msgstr ""
+
msgid "The file or folder name is invalid."
msgstr ""
msgstr ""
"Olet sulkemassa kansioiden vertailuikkunaa. Haluatko varmasti sulkea ikkunan?"
+msgid "You are about to close the folder comparison window that took a significant amount of time. Are you sure you want to close the window?"
+msgstr ""
+
msgid "The file or folder name is invalid."
msgstr "Tiedoston tai kansion nimi on virheellinen."
msgid "You are about to close the window that is comparing folders. Are you sure you want to close the window?"
msgstr "Vous êtes sur le point de fermer la fenêtre qui compare les dossiers. Êtes-vous sûr de vouloir fermer la fenêtre ?"
+msgid "You are about to close the folder comparison window that took a significant amount of time. Are you sure you want to close the window?"
+msgstr ""
+
msgid "The file or folder name is invalid."
msgstr "Le nom du fichier ou du dossier n'est pas valide."
msgid "You are about to close the window that is comparing folders. Are you sure you want to close the window?"
msgstr "Vai pechar a ventá de comparación de carpetas. ¿Seguro que quere cerrala?"
+msgid "You are about to close the folder comparison window that took a significant amount of time. Are you sure you want to close the window?"
+msgstr ""
+
msgid "The file or folder name is invalid."
msgstr "O nome do arquivo ou carpeta non é válido."
msgid "You are about to close the window that is comparing folders. Are you sure you want to close the window?"
msgstr "Sie schließen gerade das Fenster, in dem Ordner verglichen werden. Möchten Sie das Fenster wirklich schließen?"
+msgid "You are about to close the folder comparison window that took a significant amount of time. Are you sure you want to close the window?"
+msgstr ""
+
msgid "The file or folder name is invalid."
msgstr "Der Datei- oder Ordnername ist ungültig."
msgid "You are about to close the window that is comparing folders. Are you sure you want to close the window?"
msgstr ""
+msgid "You are about to close the folder comparison window that took a significant amount of time. Are you sure you want to close the window?"
+msgstr ""
+
msgid "The file or folder name is invalid."
msgstr ""
msgid "You are about to close the window that is comparing folders. Are you sure you want to close the window?"
msgstr "Bezárni készülsz a mappákat összehasonlító ablakot. Biztosan bezárod az ablakot?"
+msgid "You are about to close the folder comparison window that took a significant amount of time. Are you sure you want to close the window?"
+msgstr ""
+
msgid "The file or folder name is invalid."
msgstr "A fájl- vagy a mappanév érvénytelen"
"Si sta per chiudere la finestra che sta confrontando le cartelle.\n"
"Vuoi chiudere la finestra?"
+msgid "You are about to close the folder comparison window that took a significant amount of time. Are you sure you want to close the window?"
+msgstr ""
+
msgid "The file or folder name is invalid."
msgstr ""
msgid "You are about to close the window that is comparing folders. Are you sure you want to close the window?"
msgstr "フォルダー比較中のウィンドウを閉じようとしています。本当にウィンドウを閉じますか?"
+msgid "You are about to close the folder comparison window that took a significant amount of time. Are you sure you want to close the window?"
+msgstr "比較にかなりの時間を要したウィンドウを閉じようとしています。本当にウィンドウを閉じますか?"
+
msgid "The file or folder name is invalid."
msgstr "ファイル名またはフォルダー名が無効です。"
msgid "You are about to close the window that is comparing folders. Are you sure you want to close the window?"
msgstr "폴더를 비교하는 창을 닫으려고 합니다. 창을 닫으시겠습니까?"
+msgid "You are about to close the folder comparison window that took a significant amount of time. Are you sure you want to close the window?"
+msgstr ""
+
msgid "The file or folder name is invalid."
msgstr "파일 또는 폴더 이름이 잘못되었습니다."
msgid "You are about to close the window that is comparing folders. Are you sure you want to close the window?"
msgstr "Jūs ketinate užverti langą, kuriame lyginami katalogai. Ar tikrai norite užverti langą?"
+msgid "You are about to close the folder comparison window that took a significant amount of time. Are you sure you want to close the window?"
+msgstr ""
+
msgid "The file or folder name is invalid."
msgstr "Netinkamas failo ar katalogo pavadinimas."
"you want to close the window?"
msgstr ""
+msgid "You are about to close the folder comparison window that took a significant amount of time. Are you sure you want to close the window?"
+msgstr ""
+
msgid "The file or folder name is invalid."
msgstr ""
msgid "You are about to close the window that is comparing folders. Are you sure you want to close the window?"
msgstr ""
+msgid "You are about to close the folder comparison window that took a significant amount of time. Are you sure you want to close the window?"
+msgstr ""
+
msgid "The file or folder name is invalid."
msgstr ""
msgid "You are about to close the window that is comparing folders. Are you sure you want to close the window?"
msgstr "Zamierzasz zamknąć okno porównujące foldery. Czy na pewno chcesz zamknąć okno?"
+msgid "You are about to close the folder comparison window that took a significant amount of time. Are you sure you want to close the window?"
+msgstr ""
+
msgid "The file or folder name is invalid."
msgstr "Nazwa pliku lub folderu jest nieprawidłowa."
msgid "You are about to close the window that is comparing folders. Are you sure you want to close the window?"
msgstr "Está prestes a fechar a janela que está a comparar as pastas. Tem a certeza que deseja fechar a janela?"
+msgid "You are about to close the folder comparison window that took a significant amount of time. Are you sure you want to close the window?"
+msgstr ""
+
msgid "The file or folder name is invalid."
msgstr "O nome do ficheiro ou pasta é inválido."
msgid "You are about to close the window that is comparing folders. Are you sure you want to close the window?"
msgstr ""
+msgid "You are about to close the folder comparison window that took a significant amount of time. Are you sure you want to close the window?"
+msgstr ""
+
msgid "The file or folder name is invalid."
msgstr ""
msgid "You are about to close the window that is comparing folders. Are you sure you want to close the window?"
msgstr "Вы собираетесь закрыть окно сравнения. Действительно закрыть окно?"
+msgid "You are about to close the folder comparison window that took a significant amount of time. Are you sure you want to close the window?"
+msgstr ""
+
msgid "The file or folder name is invalid."
msgstr "Неверное имя файла или папки."
msgid "You are about to close the window that is comparing folders. Are you sure you want to close the window?"
msgstr ""
+msgid "You are about to close the folder comparison window that took a significant amount of time. Are you sure you want to close the window?"
+msgstr ""
+
msgid "The file or folder name is invalid."
msgstr ""
msgid "You are about to close the window that is comparing folders. Are you sure you want to close the window?"
msgstr ""
+msgid "You are about to close the folder comparison window that took a significant amount of time. Are you sure you want to close the window?"
+msgstr ""
+
msgid "The file or folder name is invalid."
msgstr ""
msgid "You are about to close the window that is comparing folders. Are you sure you want to close the window?"
msgstr "Chystáte sa zavrieť okno s porovnaním priečinkov. Naozaj chcete zavrieť okno?"
+msgid "You are about to close the folder comparison window that took a significant amount of time. Are you sure you want to close the window?"
+msgstr ""
+
msgid "The file or folder name is invalid."
msgstr ""
msgid "You are about to close the window that is comparing folders. Are you sure you want to close the window?"
msgstr "Zaklenili boste okno za primerjavo map. Ali ste prepričani, da želite zapreti okno?"
+msgid "You are about to close the folder comparison window that took a significant amount of time. Are you sure you want to close the window?"
+msgstr ""
+
msgid "The file or folder name is invalid."
msgstr "Ime datoteke ali mape ni veljavno."
msgid "You are about to close the window that is comparing folders. Are you sure you want to close the window?"
msgstr "Va a cerrar la ventana que está comparando carpetas. ¿Seguro que quiere cerrarla?"
+msgid "You are about to close the folder comparison window that took a significant amount of time. Are you sure you want to close the window?"
+msgstr ""
+
msgid "The file or folder name is invalid."
msgstr "El nombre del archivo o carpeta no es válido."
"Du är på väg att stänga fönstret som jämför kataloger. Är du säker på att du "
"vill stänga fönstret?"
+msgid "You are about to close the folder comparison window that took a significant amount of time. Are you sure you want to close the window?"
+msgstr ""
+
msgid "The file or folder name is invalid."
msgstr "Den angivna filen eller mappen är ogiltig."
msgid "You are about to close the window that is comparing folders. Are you sure you want to close the window?"
msgstr "கோப்புறைகளை ஒப்பிடும் சாளரத்தை மூட உள்ளீர்கள். நிச்சயமாக நீங்கள் சாளரத்தை மூட விரும்புகிறீர்களா?"
+msgid "You are about to close the folder comparison window that took a significant amount of time. Are you sure you want to close the window?"
+msgstr ""
+
msgid "The file or folder name is invalid."
msgstr "கோப்பு அல்லது கோப்புறையின் பெயர் தவறானது."
"Klasör karşılaştırma penceresini kapatmak üzeresiniz. Bunu yapmak "
"istediğinize emin misiniz?"
+msgid "You are about to close the folder comparison window that took a significant amount of time. Are you sure you want to close the window?"
+msgstr ""
+
msgid "The file or folder name is invalid."
msgstr "Dosya ya da klasör adı geçersiz."
msgid "You are about to close the window that is comparing folders. Are you sure you want to close the window?"
msgstr ""
+msgid "You are about to close the folder comparison window that took a significant amount of time. Are you sure you want to close the window?"
+msgstr ""
+
msgid "The file or folder name is invalid."
msgstr ""