Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into custom-titlebar
Browse files Browse the repository at this point in the history
# Conflicts:
#	Translations/WinMerge/English.pot
  • Loading branch information
sdottaka committed Sep 28, 2024
2 parents d50e145 + 4b490aa commit 0d800f3
Show file tree
Hide file tree
Showing 41 changed files with 176 additions and 130 deletions.
1 change: 1 addition & 0 deletions Src/Merge.rc
Original file line number Diff line number Diff line change
Expand Up @@ -1498,6 +1498,7 @@ BEGIN
COMBOBOX IDC_AUTO_RELOAD_MODIFIED_FILES,7,178,270,10,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
LTEXT "Language:",IDC_STATIC,7,193,270,10
COMBOBOX IDC_LANGUAGE_LIST,7,204,270,41,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "Defaults", IDC_COMPARE_DEFAULTS, 191, 228, 88, 14
END

IDD_EDIT_FIND DIALOGEX 30, 73, 324, 96
Expand Down
41 changes: 41 additions & 0 deletions Src/PropGeneral.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ void PropGeneral::DoDataExchange(CDataExchange* pDX)

BEGIN_MESSAGE_MAP(PropGeneral, OptionsPanel)
//{{AFX_MSG_MAP(PropGeneral)
ON_BN_CLICKED(IDC_COMPARE_DEFAULTS, OnDefaults)
ON_MESSAGE(WM_APP, OnLoadLanguages)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
Expand Down Expand Up @@ -137,6 +138,29 @@ void PropGeneral::WriteOptions()
}
}

/**
* @brief Sets options to defaults.
*/
void PropGeneral::OnDefaults()
{
m_bScroll = GetOptionsMgr()->GetDefault<bool>(OPT_SCROLL_TO_FIRST);
m_bScrollToFirstInlineDiff = GetOptionsMgr()->GetDefault<bool>(OPT_SCROLL_TO_FIRST_INLINE_DIFF);
m_nSingleInstance = GetOptionsMgr()->GetDefault<unsigned>(OPT_SINGLE_INSTANCE);
m_bVerifyPaths = GetOptionsMgr()->GetDefault<bool>(OPT_VERIFY_OPEN_PATHS);
m_nCloseWindowWithEsc = GetOptionsMgr()->GetDefault<unsigned>(OPT_CLOSE_WITH_ESC);
m_bAskMultiWindowClose = GetOptionsMgr()->GetDefault<bool>(OPT_ASK_MULTIWINDOW_CLOSE);
m_nAutoCompleteSource = GetOptionsMgr()->GetDefault<unsigned>(OPT_AUTO_COMPLETE_SOURCE);
m_bPreserveFiletime = GetOptionsMgr()->GetDefault<bool>(OPT_PRESERVE_FILETIMES);
m_bShowSelectFolderOnStartup = GetOptionsMgr()->GetDefault<bool>(OPT_SHOW_SELECT_FILES_AT_STARTUP);
m_bCloseWithOK = GetOptionsMgr()->GetDefault<bool>(OPT_CLOSE_WITH_OK);
m_nFileReloadMode = GetOptionsMgr()->GetDefault<unsigned>(OPT_AUTO_RELOAD_MODIFIED_FILES);

LANGID lang = static_cast<LANGID>(GetOptionsMgr()->GetDefault<unsigned>(OPT_SELECTED_LANGUAGE));
SetCursorSelectForLanguage(lang);

UpdateData(FALSE);
}

LRESULT PropGeneral::OnLoadLanguages(WPARAM, LPARAM)
{
m_ctlLangList.SetRedraw(false);
Expand All @@ -151,3 +175,20 @@ LRESULT PropGeneral::OnLoadLanguages(WPARAM, LPARAM)
m_ctlLangList.SetRedraw(true);
return 0;
}

/**
* @brief Select the item specified by the language ID in the "Language" combo box.
* @param [in] lang The language ID of the selected item.
*/
void PropGeneral::SetCursorSelectForLanguage(LANGID lang)
{
int itemCount = m_ctlLangList.GetCount();
for (int i = 0; i < itemCount; i++)
{
if (m_ctlLangList.GetItemData(i) == lang)
{
m_ctlLangList.SetCurSel(i);
break;
}
}
}
4 changes: 4 additions & 0 deletions Src/PropGeneral.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ class PropGeneral : public OptionsPanel
CComboBox m_ctlLangList;
//}}AFX_DATA

private:
// Implementation methods
void SetCursorSelectForLanguage(LANGID lang);

// Overrides
// ClassWizard generate virtual function overrides
Expand All @@ -56,6 +59,7 @@ class PropGeneral : public OptionsPanel

// Generated message map functions
//{{AFX_MSG(PropGeneral)
afx_msg void OnDefaults();
afx_msg LRESULT OnLoadLanguages(WPARAM, LPARAM);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
Expand Down
6 changes: 3 additions & 3 deletions Translations/WinMerge/Arabic.po
Original file line number Diff line number Diff line change
Expand Up @@ -1308,6 +1308,9 @@ msgstr ""
msgid "Language:"
msgstr "اللغة:"

msgid "Defaults"
msgstr "الإعدادات الافتراضية"

msgid "Find"
msgstr "البحث"

Expand Down Expand Up @@ -1494,9 +1497,6 @@ msgstr "م&جلد مخصص:"
msgid "Br&owse..."
msgstr "&بحث..."

msgid "Defaults"
msgstr "الإعدادات الافتراضية"

msgid "Patch Generator"
msgstr "أداة توليد التصحيح"

Expand Down
8 changes: 4 additions & 4 deletions Translations/WinMerge/Basque.po
Original file line number Diff line number Diff line change
Expand Up @@ -1566,6 +1566,10 @@ msgstr ""
msgid "Language:"
msgstr ""

#, c-format
msgid "Defaults"
msgstr "Berezkoak"

#, c-format
msgid "Find"
msgstr "Bilatu"
Expand Down Expand Up @@ -1801,10 +1805,6 @@ msgstr "&Egile agiritegia:"
msgid "Br&owse..."
msgstr "Bilat&u"

#, c-format
msgid "Defaults"
msgstr "Berezkoak"

#, c-format
msgid "Patch Generator"
msgstr "Eranskin Sortzailea"
Expand Down
6 changes: 3 additions & 3 deletions Translations/WinMerge/Brazilian.po
Original file line number Diff line number Diff line change
Expand Up @@ -1305,6 +1305,9 @@ msgstr "Auto-&recarregar arquivos modificados:"
msgid "Language:"
msgstr "Idioma:"

msgid "Defaults"
msgstr "Padrões"

msgid "Find"
msgstr "Achar"

Expand Down Expand Up @@ -1491,9 +1494,6 @@ msgstr "P&asta personalizada:"
msgid "Br&owse..."
msgstr "Pr&ocurar..."

msgid "Defaults"
msgstr "Padrões"

msgid "Patch Generator"
msgstr "Gerador de Patches"

Expand Down
6 changes: 3 additions & 3 deletions Translations/WinMerge/Bulgarian.po
Original file line number Diff line number Diff line change
Expand Up @@ -1302,6 +1302,9 @@ msgstr "Автоматично &презареждане на променени
msgid "Language:"
msgstr "Език:"

msgid "Defaults"
msgstr "По подразбиране"

msgid "Find"
msgstr "Търсене"

Expand Down Expand Up @@ -1488,9 +1491,6 @@ msgstr "Друга &папка:"
msgid "Br&owse..."
msgstr "&Разглеждане…"

msgid "Defaults"
msgstr "По подразбиране"

msgid "Patch Generator"
msgstr "Създаване на кръпки"

Expand Down
8 changes: 4 additions & 4 deletions Translations/WinMerge/Catalan.po
Original file line number Diff line number Diff line change
Expand Up @@ -1564,6 +1564,10 @@ msgstr "&Recarrega automàticament els fitxers modificats:"
msgid "Language:"
msgstr "Idioma:"

#, c-format
msgid "Defaults"
msgstr "Predeterminats"

#, c-format
msgid "Find"
msgstr "Cerca"
Expand Down Expand Up @@ -1799,10 +1803,6 @@ msgstr "Directori personalitzat:"
msgid "Br&owse..."
msgstr "N&avega..."

#, c-format
msgid "Defaults"
msgstr "Predeterminats"

#, c-format
msgid "Patch Generator"
msgstr "Generador de pedaços"
Expand Down
6 changes: 3 additions & 3 deletions Translations/WinMerge/ChineseSimplified.po
Original file line number Diff line number Diff line change
Expand Up @@ -1309,6 +1309,9 @@ msgstr "自动重新加载修改过的文件(&R):"
msgid "Language:"
msgstr "语言:"

msgid "Defaults"
msgstr "默认"

msgid "Find"
msgstr "查找"

Expand Down Expand Up @@ -1497,9 +1500,6 @@ msgstr "自定义文件夹(&U):"
msgid "Br&owse..."
msgstr "浏览(&O)..."

msgid "Defaults"
msgstr "默认"

msgid "Patch Generator"
msgstr "补丁生成器"

Expand Down
8 changes: 4 additions & 4 deletions Translations/WinMerge/ChineseTraditional.po
Original file line number Diff line number Diff line change
Expand Up @@ -1573,6 +1573,10 @@ msgstr "自動重新載入修改的檔案(&R):"
msgid "Language:"
msgstr "語言:"

#, c-format
msgid "Defaults"
msgstr "預設值"

#, c-format
msgid "Find"
msgstr "尋找"
Expand Down Expand Up @@ -1808,10 +1812,6 @@ msgstr "自訂資料夾 (&U):"
msgid "Br&owse..."
msgstr "瀏覽 (&O)..."

#, c-format
msgid "Defaults"
msgstr "預設值"

#, c-format
msgid "Patch Generator"
msgstr "補綴產生器"
Expand Down
6 changes: 3 additions & 3 deletions Translations/WinMerge/Corsican.po
Original file line number Diff line number Diff line change
Expand Up @@ -1307,6 +1307,9 @@ msgstr "&Ricaricà autumaticamente i schedarii mudificati :"
msgid "Language:"
msgstr "Lingua :"

msgid "Defaults"
msgstr "Predefinizioni"

msgid "Find"
msgstr "Circà"

Expand Down Expand Up @@ -1493,9 +1496,6 @@ msgstr "Cartulare &persunalizatu :"
msgid "Br&owse..."
msgstr "Na&vigà…"

msgid "Defaults"
msgstr "Predefinizioni"

msgid "Patch Generator"
msgstr "Generatore di currezzioni"

Expand Down
8 changes: 4 additions & 4 deletions Translations/WinMerge/Croatian.po
Original file line number Diff line number Diff line change
Expand Up @@ -1563,6 +1563,10 @@ msgstr ""
msgid "Language:"
msgstr ""

#, c-format
msgid "Defaults"
msgstr "Predpodešeno"

#, c-format
msgid "Find"
msgstr "Nađi"
Expand Down Expand Up @@ -1798,10 +1802,6 @@ msgstr "Ko&risnikova mapa"
msgid "Br&owse..."
msgstr "&Odabir..."

#, c-format
msgid "Defaults"
msgstr "Predpodešeno"

#, c-format
msgid "Patch Generator"
msgstr "Pohrana razlika (Patch)"
Expand Down
8 changes: 4 additions & 4 deletions Translations/WinMerge/Czech.po
Original file line number Diff line number Diff line change
Expand Up @@ -1563,6 +1563,10 @@ msgstr ""
msgid "Language:"
msgstr ""

#, c-format
msgid "Defaults"
msgstr "&Původní"

#, c-format
msgid "Find"
msgstr "Najít"
Expand Down Expand Up @@ -1798,10 +1802,6 @@ msgstr "&Vlastní složka:"
msgid "Br&owse..."
msgstr "Procházet..."

#, c-format
msgid "Defaults"
msgstr "&Původní"

#, c-format
msgid "Patch Generator"
msgstr "Vytvoření opravného souboru"
Expand Down
8 changes: 4 additions & 4 deletions Translations/WinMerge/Danish.po
Original file line number Diff line number Diff line change
Expand Up @@ -1564,6 +1564,10 @@ msgstr ""
msgid "Language:"
msgstr ""

#, c-format
msgid "Defaults"
msgstr "Standard"

#, c-format
msgid "Find"
msgstr "Søg"
Expand Down Expand Up @@ -1799,10 +1803,6 @@ msgstr "V&algt mappe:"
msgid "Br&owse..."
msgstr "G&ennemse..."

#, c-format
msgid "Defaults"
msgstr "Standard"

#, c-format
msgid "Patch Generator"
msgstr "Patch Generator"
Expand Down
6 changes: 3 additions & 3 deletions Translations/WinMerge/Dutch.po
Original file line number Diff line number Diff line change
Expand Up @@ -1305,6 +1305,9 @@ msgstr "Gewijzigde bestanden automatisch opnieuw laden:"
msgid "Language:"
msgstr "Language:"

msgid "Defaults"
msgstr "Standaardwaarden"

msgid "Find"
msgstr "Zoeken"

Expand Down Expand Up @@ -1491,9 +1494,6 @@ msgstr "Aangepaste map:"
msgid "Br&owse..."
msgstr "Bladeren..."

msgid "Defaults"
msgstr "Standaardwaarden"

msgid "Patch Generator"
msgstr "Patch-generator"

Expand Down
8 changes: 4 additions & 4 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: 2024-09-21 21:31+0000\n"
"POT-Creation-Date: 2024-09-28 16:54+0000\n"
"PO-Revision-Date: \n"
"Last-Translator: \n"
"Language-Team: English <[email protected]>\n"
Expand Down Expand Up @@ -1299,6 +1299,9 @@ msgstr ""
msgid "Language:"
msgstr ""

msgid "Defaults"
msgstr ""

msgid "Find"
msgstr ""

Expand Down Expand Up @@ -1485,9 +1488,6 @@ msgstr ""
msgid "Br&owse..."
msgstr ""

msgid "Defaults"
msgstr ""

msgid "Patch Generator"
msgstr ""

Expand Down
6 changes: 3 additions & 3 deletions Translations/WinMerge/Finnish.po
Original file line number Diff line number Diff line change
Expand Up @@ -1305,6 +1305,9 @@ msgstr ""
msgid "Language:"
msgstr "Kieli:"

msgid "Defaults"
msgstr "Oletukset"

msgid "Find"
msgstr "Etsi"

Expand Down Expand Up @@ -1495,9 +1498,6 @@ msgstr "Mukautettu kansio:"
msgid "Br&owse..."
msgstr "Selaa..."

msgid "Defaults"
msgstr "Oletukset"

msgid "Patch Generator"
msgstr "Korjausgeneraattori"

Expand Down
Loading

0 comments on commit 0d800f3

Please sign in to comment.