Skip to content

Commit

Permalink
Options dialog: Change "Number of compare threads (...)" to "Number o…
Browse files Browse the repository at this point in the history
…f CPU cores to use".

If the value stored in the registry is negative, the "Number of CPU cores to use" text box will display the value obtained by adding the number of CPU cores.
related to PR  #1513
  • Loading branch information
sdottaka committed Oct 15, 2022
1 parent b22b846 commit 9c97fc5
Show file tree
Hide file tree
Showing 41 changed files with 85 additions and 156 deletions.
4 changes: 2 additions & 2 deletions Src/Merge.rc
Original file line number Diff line number Diff line change
Expand Up @@ -2180,8 +2180,8 @@ BEGIN
EDITTEXT IDC_COMPARE_QUICKC_LIMIT,6,120,30,14,ES_AUTOHSCROLL
LTEXT "Threshold for switching to &binary compare (MB):",IDC_STATIC,6,138,279,10
EDITTEXT IDC_COMPARE_BINARYC_LIMIT,6,150,30,14,ES_AUTOHSCROLL
LTEXT "\n&Number of compare threads (a negative value implies addition of the number of available CPU cores):",IDC_STATIC,6,166,239,30
EDITTEXT IDC_COMPARE_THREAD_COUNT,6,198,30,14,ES_AUTOHSCROLL
LTEXT "&Number of CPU cores to use:",IDC_STATIC,6,166,239,30
EDITTEXT IDC_COMPARE_THREAD_COUNT,6,178,30,14,ES_AUTOHSCROLL
PUSHBUTTON "Defaults",IDC_COMPARE_DEFAULTS,191,228,88,14
END

Expand Down
14 changes: 12 additions & 2 deletions Src/PropCompareFolder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include "OptionsDef.h"
#include "OptionsMgr.h"
#include "OptionsPanel.h"
#include <Poco/Environment.h>

#ifdef _DEBUG
#define new DEBUG_NEW
Expand All @@ -32,6 +33,7 @@ PropCompareFolder::PropCompareFolder(COptionsMgr *optionsMgr)
, m_nQuickCompareLimit(4 * Mega)
, m_nBinaryCompareLimit(64 * Mega)
, m_nCompareThreads(-1)
, m_nCompareThreadsPrev(-1)
{
}

Expand Down Expand Up @@ -78,7 +80,11 @@ void PropCompareFolder::ReadOptions()
m_bIgnoreReparsePoints = GetOptionsMgr()->GetBool(OPT_CMP_IGNORE_REPARSE_POINTS);
m_nQuickCompareLimit = GetOptionsMgr()->GetInt(OPT_CMP_QUICK_LIMIT) / Mega ;
m_nBinaryCompareLimit = GetOptionsMgr()->GetInt(OPT_CMP_BINARY_LIMIT) / Mega ;
m_nCompareThreads = GetOptionsMgr()->GetInt(OPT_CMP_COMPARE_THREADS);
m_nCompareThreadsPrev = GetOptionsMgr()->GetInt(OPT_CMP_COMPARE_THREADS);
m_nCompareThreads = m_nCompareThreadsPrev;
if (m_nCompareThreads <= 0)
m_nCompareThreads = Poco::Environment::processorCount() + m_nCompareThreads;
m_nCompareThreads = std::clamp(m_nCompareThreads, 1, static_cast<int>(Poco::Environment::processorCount()));
}

/**
Expand All @@ -102,7 +108,9 @@ void PropCompareFolder::WriteOptions()
if (m_nBinaryCompareLimit > 2000)
m_nBinaryCompareLimit = 2000;
GetOptionsMgr()->SaveOption(OPT_CMP_BINARY_LIMIT, m_nBinaryCompareLimit * Mega);
GetOptionsMgr()->SaveOption(OPT_CMP_COMPARE_THREADS, m_nCompareThreads);
if ((m_nCompareThreadsPrev > 0 && m_nCompareThreads != m_nCompareThreadsPrev) ||
(m_nCompareThreadsPrev <= 0 && m_nCompareThreads != static_cast<int>(Poco::Environment::processorCount() + m_nCompareThreadsPrev)))
GetOptionsMgr()->SaveOption(OPT_CMP_COMPARE_THREADS, m_nCompareThreads);
}

/**
Expand Down Expand Up @@ -145,6 +153,8 @@ void PropCompareFolder::OnDefaults()
m_nQuickCompareLimit = GetOptionsMgr()->GetDefault<unsigned>(OPT_CMP_QUICK_LIMIT) / Mega;
m_nBinaryCompareLimit = GetOptionsMgr()->GetDefault<unsigned>(OPT_CMP_BINARY_LIMIT) / Mega;
m_nCompareThreads = GetOptionsMgr()->GetDefault<unsigned>(OPT_CMP_COMPARE_THREADS);
if (m_nCompareThreads <= 0)
m_nCompareThreads = Poco::Environment::processorCount() + m_nCompareThreads;
UpdateData(FALSE);
}

Expand Down
1 change: 1 addition & 0 deletions Src/PropCompareFolder.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ class PropCompareFolder : public OptionsPanel
unsigned m_nQuickCompareLimit;
unsigned m_nBinaryCompareLimit;
int m_nCompareThreads;
int m_nCompareThreadsPrev;
//}}AFX_DATA


Expand Down
51 changes: 26 additions & 25 deletions Translations/TranslationsStatus.md
Original file line number Diff line number Diff line change
@@ -1,47 +1,47 @@
# Translations Status

Status from **2022-10-09**:
Status from **2022-10-16**:

## WinMerge

| Language | Total | Translated | Fuzzy | Untranslated | Complete | Last Update |
|:---------------------|------:|-----------:|------:|-------------:|---------:|:-----------:|
| Arabic | 1236 | 898 | 0 | 338 | 72 % | 2019-12-30 |
| Arabic | 1236 | 897 | 0 | 339 | 72 % | 2019-12-30 |
| Basque | 1236 | 639 | 0 | 597 | 51 % | 2013-02-03 |
| Brazilian | 1236 | 1234 | 0 | 2 | 99 % | 2022-08-19 |
| Bulgarian | 1236 | 1022 | 0 | 214 | 82 % | 2021-06-28 |
| Catalan | 1236 | 1188 | 0 | 48 | 96 % | |
| ChineseSimplified | 1236 | 1229 | 0 | 7 | 99 % | |
| ChineseTraditional | 1236 | 1126 | 0 | 110 | 91 % | 2022-02-19 |
| Corsican | 1236 | 1232 | 0 | 4 | 99 % | 2022-08-07 |
| Brazilian | 1236 | 1235 | 0 | 1 | 99 % | 2022-10-09 |
| Bulgarian | 1236 | 1021 | 0 | 215 | 82 % | 2021-06-28 |
| Catalan | 1236 | 1187 | 0 | 49 | 96 % | |
| ChineseSimplified | 1236 | 1228 | 0 | 8 | 99 % | |
| ChineseTraditional | 1236 | 1125 | 0 | 111 | 91 % | 2022-02-19 |
| Corsican | 1236 | 1235 | 0 | 1 | 99 % | 2022-10-09 |
| Croatian | 1236 | 631 | 1 | 604 | 51 % | 2009-02-13 |
| Czech | 1236 | 606 | 0 | 630 | 49 % | |
| Danish | 1236 | 640 | 0 | 596 | 51 % | 2013-01-13 |
| Dutch | 1236 | 1198 | 0 | 38 | 96 % | 2018-09-06 |
| English | 1236 | 1236 | 0 | 0 | 100 % | 2022-10-09 |
| Finnish | 1236 | 1199 | 0 | 37 | 97 % | |
| French | 1236 | 1234 | 0 | 2 | 99 % | 2022-09-21 |
| Galician | 1236 | 1232 | 0 | 4 | 99 % | 2022-07-10 |
| German | 1236 | 1234 | 0 | 2 | 99 % | 2022-09-12 |
| Dutch | 1236 | 1197 | 0 | 39 | 96 % | 2018-09-06 |
| English | 1236 | 1236 | 0 | 0 | 100 % | 2022-10-16 |
| Finnish | 1236 | 1198 | 0 | 38 | 96 % | |
| French | 1236 | 1233 | 0 | 3 | 99 % | 2022-09-21 |
| Galician | 1236 | 1231 | 0 | 5 | 99 % | 2022-07-10 |
| German | 1236 | 1235 | 0 | 1 | 99 % | 2022-10-09 |
| Greek | 1236 | 605 | 0 | 631 | 48 % | |
| Hungarian | 1236 | 1233 | 0 | 3 | 99 % | 2021-03-15 |
| Italian | 1236 | 1107 | 0 | 129 | 89 % | 2022-06-01 |
| Hungarian | 1236 | 1234 | 0 | 2 | 99 % | 2021-03-15 |
| Italian | 1236 | 1106 | 0 | 130 | 89 % | 2022-06-01 |
| Japanese | 1236 | 1235 | 0 | 1 | 99 % | 2022-09-14 |
| Korean | 1236 | 1198 | 0 | 38 | 96 % | 2022-02-02 |
| Lithuanian | 1236 | 1191 | 0 | 45 | 96 % | 2022-09-13 |
| Korean | 1236 | 1197 | 0 | 39 | 96 % | 2022-02-02 |
| Lithuanian | 1236 | 1192 | 0 | 44 | 96 % | 2022-10-10 |
| Norwegian | 1236 | 731 | 0 | 505 | 59 % | |
| Persian | 1236 | 642 | 0 | 594 | 51 % | 2013-08-15 |
| Polish | 1236 | 1205 | 0 | 31 | 97 % | |
| Portuguese | 1236 | 1234 | 0 | 2 | 99 % | 2022-09-14 |
| Polish | 1236 | 1204 | 0 | 32 | 97 % | |
| Portuguese | 1236 | 1233 | 0 | 3 | 99 % | 2022-09-14 |
| Romanian | 1236 | 561 | 44 | 631 | 48 % | |
| Russian | 1236 | 1185 | 0 | 51 | 95 % | 2022-07-27 |
| Russian | 1236 | 1184 | 0 | 52 | 95 % | 2022-07-27 |
| Serbian | 1236 | 633 | 0 | 603 | 51 % | |
| Sinhala | 1236 | 564 | 58 | 614 | 50 % | 2010-12-12 |
| Slovak | 1236 | 1198 | 0 | 38 | 96 % | 2022-02-17 |
| Slovenian | 1236 | 1234 | 0 | 2 | 99 % | 2022-09-12 |
| Slovak | 1236 | 1197 | 0 | 39 | 96 % | 2022-02-17 |
| Slovenian | 1236 | 1235 | 0 | 1 | 99 % | 2022-10-09 |
| Spanish | 1236 | 1174 | 1 | 61 | 95 % | 2022-07-30 |
| Swedish | 1236 | 1092 | 0 | 144 | 88 % | 2021-09-15 |
| Turkish | 1236 | 1230 | 0 | 6 | 99 % | 2022-05-10 |
| Swedish | 1236 | 1091 | 0 | 145 | 88 % | 2021-09-15 |
| Turkish | 1236 | 1229 | 0 | 7 | 99 % | 2022-05-10 |
| Ukrainian | 1236 | 637 | 0 | 599 | 51 % | 2009-06-13 |

## ShellExtension
Expand Down Expand Up @@ -207,6 +207,7 @@ Status from **2022-10-09**:

* Corsican
- [Patriccollu di Santa Maria è Sichè](mailto:patriccollu%20at%20gmail.com) *Maintainer*
- Patriccollu di Santa Maria è Sichè, 2021-2022

* Croatian
- [Hasan Osmanagić](mailto:hasan.osmanagic%20at%20public.carnet.hr)
Expand Down
3 changes: 1 addition & 2 deletions Translations/WinMerge/Arabic.po
Original file line number Diff line number Diff line change
Expand Up @@ -1975,9 +1975,8 @@ msgstr ""
msgid "Threshold for switching to &binary compare (MB):"
msgstr ""

msgid "\n&Number of compare threads (a negative value implies addition of the number of available CPU cores):"
msgid "&Number of CPU cores to use:"
msgstr ""
"عدد سلاسل المقارنة (القيمة السالبة تعني إضافة عدد أنوية المعالج المتوفرة):"

msgid "&CSV File Patterns:"
msgstr ""
Expand Down
2 changes: 1 addition & 1 deletion Translations/WinMerge/Basque.po
Original file line number Diff line number Diff line change
Expand Up @@ -2437,7 +2437,7 @@ msgstr ""
msgid "Threshold for switching to &binary compare (MB):"
msgstr ""

msgid "\n&Number of compare threads (a negative value implies addition of the number of available CPU cores):"
msgid "&Number of CPU cores to use:"
msgstr ""

msgid "&CSV File Patterns:"
Expand Down
4 changes: 2 additions & 2 deletions Translations/WinMerge/Brazilian.po
Original file line number Diff line number Diff line change
Expand Up @@ -1966,8 +1966,8 @@ msgstr "Limite para alternar para comparação rápida (MB):"
msgid "Threshold for switching to &binary compare (MB):"
msgstr "Limite para alternar para comparação binária (MB):"

msgid "\n&Number of compare threads (a negative value implies addition of the number of available CPU cores):"
msgstr "\n&Número dos threads de comparação (um valor negativo implica em adição do número de núcleos da CPU disponíveis):"
msgid "&Number of CPU cores to use:"
msgstr ""

msgid "&CSV File Patterns:"
msgstr "Padrões do Arquivo &CSV:"
Expand Down
8 changes: 1 addition & 7 deletions Translations/WinMerge/Bulgarian.po
Original file line number Diff line number Diff line change
Expand Up @@ -1977,14 +1977,8 @@ msgstr "Ограничение за превключване към &бързо
msgid "Threshold for switching to &binary compare (MB):"
msgstr "Ограничение за превключване към &двоично сравняване (МБ):"

msgid ""
"\n"
"&Number of compare threads (a negative value implies addition of the number "
"of available CPU cores):"
msgid "&Number of CPU cores to use:"
msgstr ""
"\n"
"Брой &нишки извършващи сравняване (отрицателните стойности се добавят към "
"броя налични ядра на CPU):"

msgid "&CSV File Patterns:"
msgstr "Шаблони за име на файл на &CSV:"
Expand Down
6 changes: 1 addition & 5 deletions Translations/WinMerge/Catalan.po
Original file line number Diff line number Diff line change
Expand Up @@ -2441,12 +2441,8 @@ msgstr "Llindar per realitzar una comparació ràpida (MB):"
msgid "Threshold for switching to &binary compare (MB):"
msgstr "Llindar per realitzar una comparació binària (MB):"

msgid ""
"\n"
"&Number of compare threads (a negative value implies addition of the number of available CPU cores):"
msgid "&Number of CPU cores to use:"
msgstr ""
"\n"
"Quantitat de fils de comparació (un valor negatiu implica l'increment del nombre de nuclis de CPU disponibles):"

msgid "&CSV File Patterns:"
msgstr "Patrons del fitxer &CSV:"
Expand Down
7 changes: 1 addition & 6 deletions Translations/WinMerge/ChineseSimplified.po
Original file line number Diff line number Diff line change
Expand Up @@ -1978,13 +1978,8 @@ msgstr "切换到快速比较的最小值(&Q) (MB):"
msgid "Threshold for switching to &binary compare (MB):"
msgstr "切换到二进制比较的最小值(&B) (MB):"

msgid ""
"\n"
"&Number of compare threads (a negative value implies addition of the number "
"of available CPU cores):"
msgid "&Number of CPU cores to use:"
msgstr ""
"\n"
"比较使用的线程数 (负数则使用可用的所有 CPU 核心) (&N):"

msgid "&CSV File Patterns:"
msgstr "&CSV 文件模式:"
Expand Down
6 changes: 1 addition & 5 deletions Translations/WinMerge/ChineseTraditional.po
Original file line number Diff line number Diff line change
Expand Up @@ -2451,12 +2451,8 @@ msgstr ""
msgid "Threshold for switching to &binary compare (MB):"
msgstr ""

msgid ""
"\n"
"&Number of compare threads (a negative value implies addition of the number of available CPU cores):"
msgid "&Number of CPU cores to use:"
msgstr ""
"\n"
"比較進程數 (&N)(負數表示附加可用的CPU內核數量):"

msgid "&CSV File Patterns:"
msgstr "&CSV 檔案模式:"
Expand Down
6 changes: 1 addition & 5 deletions Translations/WinMerge/Corsican.po
Original file line number Diff line number Diff line change
Expand Up @@ -1978,12 +1978,8 @@ msgstr "Sogliu per passà à u paragone &rapidu (Mo) :"
msgid "Threshold for switching to &binary compare (MB):"
msgstr "Sogliu per passà à u paragone &binariu (Mo) :"

msgid ""
"\n"
"&Number of compare threads (a negative value implies addition of the number of available CPU cores):"
msgid "&Number of CPU cores to use:"
msgstr ""
"\n"
"Numeru d’unità d’esecuzione impiegate per u paragone (impiegate un valore nigativu per aghjunghje u numeru di cori CPU dispunibule) :"

msgid "&CSV File Patterns:"
msgstr "Mudelli di schedariu &CSV :"
Expand Down
2 changes: 1 addition & 1 deletion Translations/WinMerge/Croatian.po
Original file line number Diff line number Diff line change
Expand Up @@ -2435,7 +2435,7 @@ msgstr ""
msgid "Threshold for switching to &binary compare (MB):"
msgstr ""

msgid "\n&Number of compare threads (a negative value implies addition of the number of available CPU cores):"
msgid "&Number of CPU cores to use:"
msgstr ""

msgid "&CSV File Patterns:"
Expand Down
2 changes: 1 addition & 1 deletion Translations/WinMerge/Czech.po
Original file line number Diff line number Diff line change
Expand Up @@ -2435,7 +2435,7 @@ msgstr ""
msgid "Threshold for switching to &binary compare (MB):"
msgstr ""

msgid "\n&Number of compare threads (a negative value implies addition of the number of available CPU cores):"
msgid "&Number of CPU cores to use:"
msgstr ""

msgid "&CSV File Patterns:"
Expand Down
2 changes: 1 addition & 1 deletion Translations/WinMerge/Danish.po
Original file line number Diff line number Diff line change
Expand Up @@ -2440,7 +2440,7 @@ msgstr ""
msgid "Threshold for switching to &binary compare (MB):"
msgstr ""

msgid "\n&Number of compare threads (a negative value implies addition of the number of available CPU cores):"
msgid "&Number of CPU cores to use:"
msgstr ""

msgid "&CSV File Patterns:"
Expand Down
6 changes: 1 addition & 5 deletions Translations/WinMerge/Dutch.po
Original file line number Diff line number Diff line change
Expand Up @@ -1986,12 +1986,8 @@ msgstr "Drempel voor overschakelen naar snel vergelijken (MB):"
msgid "Threshold for switching to &binary compare (MB):"
msgstr "Drempel voor overschakelen naar binair vergelijken (MB):"

msgid ""
"\n"
"&Number of compare threads (a negative value implies addition of the number of available CPU cores):"
msgid "&Number of CPU cores to use:"
msgstr ""
"\n"
"Aantal vergelijkingsthreads (een negatieve waarde impliceert optelling van het aantal beschikbare CPU-kernen):"

msgid "&CSV File Patterns:"
msgstr "CSV-bestand-patronen:"
Expand Down
4 changes: 2 additions & 2 deletions Translations/WinMerge/English.pot
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WinMerge\n"
"Report-Msgid-Bugs-To: https://bugs.winmerge.org/\n"
"POT-Creation-Date: 2022-10-09 11:00+0000\n"
"POT-Creation-Date: 2022-10-16 00:15+0000\n"
"PO-Revision-Date: \n"
"Last-Translator: \n"
"Language-Team: English <[email protected]>\n"
Expand Down Expand Up @@ -1960,7 +1960,7 @@ msgstr ""
msgid "Threshold for switching to &binary compare (MB):"
msgstr ""

msgid "\n&Number of compare threads (a negative value implies addition of the number of available CPU cores):"
msgid "&Number of CPU cores to use:"
msgstr ""

msgid "&CSV File Patterns:"
Expand Down
8 changes: 1 addition & 7 deletions Translations/WinMerge/Finnish.po
Original file line number Diff line number Diff line change
Expand Up @@ -1981,14 +1981,8 @@ msgstr "Kynnysarvo, jossa siirrytään &nopeaan vertailuun (MB):"
msgid "Threshold for switching to &binary compare (MB):"
msgstr "Kynnysarvo, jossa siirrytään &binaariseen vertailuun (MB):"

msgid ""
"\n"
"&Number of compare threads (a negative value implies addition of the number "
"of available CPU cores):"
msgid "&Number of CPU cores to use:"
msgstr ""
"\n"
"Vertailusäikeide&n määrä (negatiivinen arvo merkitsee käytettävissä olevien "
"CPU-ytimien määrän lisäämistä):"

msgid "&CSV File Patterns:"
msgstr "&CSV-tiedostomallit:"
Expand Down
6 changes: 1 addition & 5 deletions Translations/WinMerge/French.po
Original file line number Diff line number Diff line change
Expand Up @@ -2448,12 +2448,8 @@ msgstr "Seuil de passage en comparaison &rapide (Mo) :"
msgid "Threshold for switching to &binary compare (MB):"
msgstr "Seuil de passage à la comparaison &binaire (Mo) :"

msgid ""
"\n"
"&Number of compare threads (a negative value implies addition of the number of available CPU cores):"
msgid "&Number of CPU cores to use:"
msgstr ""
"\n"
"&Nombre de threads utilisés pour la comparaison (une valeur négative implique l'utilisation de tous les cœurs CPU disponibles) :"

msgid "&CSV File Patterns:"
msgstr "Modèles de fichiers &CSV :"
Expand Down
6 changes: 1 addition & 5 deletions Translations/WinMerge/Galician.po
Original file line number Diff line number Diff line change
Expand Up @@ -2442,12 +2442,8 @@ msgstr "Limiar para cambiar a com&paración rápida (MB):"
msgid "Threshold for switching to &binary compare (MB):"
msgstr "Limiar para cambiar a com&paración binaria (MB):"

msgid ""
"\n"
"&Number of compare threads (a negative value implies addition of the number of available CPU cores):"
msgid "&Number of CPU cores to use:"
msgstr ""
"\n"
"&Número de fíos de comparación (valores negativos indican que se engaden ao número de núcleos da CPU)"

msgid "&CSV File Patterns:"
msgstr "Padróns de ficheiro &CSV:"
Expand Down
4 changes: 2 additions & 2 deletions Translations/WinMerge/German.po
Original file line number Diff line number Diff line change
Expand Up @@ -2437,8 +2437,8 @@ msgstr "Schwellenwert für den Wechsel zum &Schnellvergleich (MB):"
msgid "Threshold for switching to &binary compare (MB):"
msgstr "Schwellenwert für den Wechsel zum &Binärvergleich (MB):"

msgid "\n&Number of compare threads (a negative value implies addition of the number of available CPU cores):"
msgstr "\nAnzahl der &Vergleichs-Threads\n(negativer Wert bedeutet Summe der verfügbaren CPUs):"
msgid "&Number of CPU cores to use:"
msgstr ""

msgid "&CSV File Patterns:"
msgstr "&CSV-Dateimuster:"
Expand Down
2 changes: 1 addition & 1 deletion Translations/WinMerge/Greek.po
Original file line number Diff line number Diff line change
Expand Up @@ -2432,7 +2432,7 @@ msgstr ""
msgid "Threshold for switching to &binary compare (MB):"
msgstr ""

msgid "\n&Number of compare threads (a negative value implies addition of the number of available CPU cores):"
msgid "&Number of CPU cores to use:"
msgstr ""

msgid "&CSV File Patterns:"
Expand Down
6 changes: 1 addition & 5 deletions Translations/WinMerge/Hungarian.po
Original file line number Diff line number Diff line change
Expand Up @@ -2443,12 +2443,8 @@ msgstr "A gyors összehasonlítás méretkorlátja (MB):"
msgid "Threshold for switching to &binary compare (MB):"
msgstr "A bináris összehasonlítás méretkorlátja (MB):"

msgid ""
"\n"
"&Number of compare threads (a negative value implies addition of the number of available CPU cores):"
msgid "&Number of CPU cores to use:"
msgstr ""
"\n"
"Összehasonlító szálak száma (egy negatív érték a rendelkezésre álló CPU magok igénybevételét jelenti):"

msgid "&CSV File Patterns:"
msgstr "CSV típusú fájlok kiterjesztése:"
Expand Down
Loading

0 comments on commit 9c97fc5

Please sign in to comment.