Fixes #48
Fixes #53
This commit is contained in:
Wiesław Šoltés 2017-02-19 19:13:42 +01:00
Родитель b436f3a1b2
Коммит bedd43b245
8 изменённых файлов: 76 добавлений и 24 удалений

Просмотреть файл

@ -46,6 +46,8 @@
<String key="0x00040007" value="Delete &amp;Output File On Error" /> <String key="0x00040007" value="Delete &amp;Output File On Error" />
<String key="0x00040008" value="Stop &amp;Conversion On Error" /> <String key="0x00040008" value="Stop &amp;Conversion On Error" />
<String key="0x00040009" value="&amp;Hide Console Window" /> <String key="0x00040009" value="&amp;Hide Console Window" />
<String key="0x0004000A" value="&amp;Ensure Item Is Visible" />
<String key="0x0004000B" value="&amp;Try To Find Decoder" />
<!-- Language Menu --> <!-- Language Menu -->

Просмотреть файл

@ -46,6 +46,8 @@
<String key="0x00040007" value="Borrar archivo de &amp;salida si hay error" /> <String key="0x00040007" value="Borrar archivo de &amp;salida si hay error" />
<String key="0x00040008" value="Detener &amp;conversión si hay error" /> <String key="0x00040008" value="Detener &amp;conversión si hay error" />
<String key="0x00040009" value="&amp;Ocultar la ventana de la consola" /> <String key="0x00040009" value="&amp;Ocultar la ventana de la consola" />
<String key="0x0004000A" value="&amp;Ensure Item Is Visible" />
<String key="0x0004000B" value="&amp;Try To Find Decoder" />
<!-- Language Menu --> <!-- Language Menu -->

Просмотреть файл

@ -46,6 +46,8 @@
<String key="0x00040007" value="&amp;오류난 출력 파일 삭제" /> <String key="0x00040007" value="&amp;오류난 출력 파일 삭제" />
<String key="0x00040008" value="&amp;오류 시 변환 중지" /> <String key="0x00040008" value="&amp;오류 시 변환 중지" />
<String key="0x00040009" value="&amp;Hide Console Window" /> <String key="0x00040009" value="&amp;Hide Console Window" />
<String key="0x0004000A" value="&amp;Ensure Item Is Visible" />
<String key="0x0004000B" value="&amp;Try To Find Decoder" />
<!-- Language Menu --> <!-- Language Menu -->

Просмотреть файл

@ -46,6 +46,8 @@
<String key="0x00040007" value="Usuń Plik Wyjściowy W Przypadku &amp;Błędu" /> <String key="0x00040007" value="Usuń Plik Wyjściowy W Przypadku &amp;Błędu" />
<String key="0x00040008" value="Zatrzymaj &amp;Konwersje W Przypadku Błędu" /> <String key="0x00040008" value="Zatrzymaj &amp;Konwersje W Przypadku Błędu" />
<String key="0x00040009" value="Uk&amp;ryj Okno Konsoli" /> <String key="0x00040009" value="Uk&amp;ryj Okno Konsoli" />
<String key="0x0004000A" value="Zapewnij Że &amp;Element Jest Widoczny" />
<String key="0x0004000B" value="Spróbuj Znaleźć &amp;Dekoder" />
<!-- Language Menu --> <!-- Language Menu -->

Просмотреть файл

@ -260,6 +260,8 @@ BEGIN_MESSAGE_MAP(CMainDlg, CResizeDialog)
ON_COMMAND(ID_OPTIONS_DELETE_ON_ERRORS, OnOptionsDeleteOnErrors) ON_COMMAND(ID_OPTIONS_DELETE_ON_ERRORS, OnOptionsDeleteOnErrors)
ON_COMMAND(ID_OPTIONS_STOP_ON_ERRORS, OnOptionsStopOnErrors) ON_COMMAND(ID_OPTIONS_STOP_ON_ERRORS, OnOptionsStopOnErrors)
ON_COMMAND(ID_OPTIONS_HIDE_CONSOLE, OnOptionsHideConsole) ON_COMMAND(ID_OPTIONS_HIDE_CONSOLE, OnOptionsHideConsole)
ON_COMMAND(ID_OPTIONS_ENSURE_VISIBLE, OnOptionsEnsureVisible)
ON_COMMAND(ID_OPTIONS_FIND_DECODER, OnOptionsFindDecoder)
ON_COMMAND(ID_LANGUAGE_DEFAULT, OnLanguageDefault) ON_COMMAND(ID_LANGUAGE_DEFAULT, OnLanguageDefault)
ON_COMMAND_RANGE(ID_LANGUAGE_MIN, ID_LANGUAGE_MAX, OnLanguageChange) ON_COMMAND_RANGE(ID_LANGUAGE_MIN, ID_LANGUAGE_MAX, OnLanguageChange)
ON_COMMAND(ID_HELP_WEBSITE, OnHelpWebsite) ON_COMMAND(ID_HELP_WEBSITE, OnHelpWebsite)
@ -1214,10 +1216,9 @@ void CMainDlg::OnOptionsDeleteSource()
{ {
if (this->pWorkerContext->bRunning == false) if (this->pWorkerContext->bRunning == false)
{ {
if (this->GetMenu()->GetMenuState(ID_OPTIONS_DELETE_SOURCE, MF_BYCOMMAND) == MF_CHECKED) BOOL bChecked = this->GetMenu()->GetMenuState(ID_OPTIONS_DELETE_SOURCE, MF_BYCOMMAND) == MF_CHECKED;
this->GetMenu()->CheckMenuItem(ID_OPTIONS_DELETE_SOURCE, MF_UNCHECKED); this->GetMenu()->CheckMenuItem(ID_OPTIONS_DELETE_SOURCE, (bChecked == TRUE) ? MF_UNCHECKED : MF_CHECKED);
else this->m_Config.m_Options.bDeleteSourceFiles = !bChecked;
this->GetMenu()->CheckMenuItem(ID_OPTIONS_DELETE_SOURCE, MF_CHECKED);
} }
} }
@ -1225,10 +1226,9 @@ void CMainDlg::OnOptionsShutdownWindows()
{ {
if (this->pWorkerContext->bRunning == false) if (this->pWorkerContext->bRunning == false)
{ {
if (this->GetMenu()->GetMenuState(ID_OPTIONS_SHUTDOWN_WINDOWS, MF_BYCOMMAND) == MF_CHECKED) BOOL bChecked = this->GetMenu()->GetMenuState(ID_OPTIONS_SHUTDOWN_WINDOWS, MF_BYCOMMAND) == MF_CHECKED;
this->GetMenu()->CheckMenuItem(ID_OPTIONS_SHUTDOWN_WINDOWS, MF_UNCHECKED); this->GetMenu()->CheckMenuItem(ID_OPTIONS_SHUTDOWN_WINDOWS, (bChecked == TRUE) ? MF_UNCHECKED : MF_CHECKED);
else this->m_Config.m_Options.bShutdownWhenFinished = !bChecked;
this->GetMenu()->CheckMenuItem(ID_OPTIONS_SHUTDOWN_WINDOWS, MF_CHECKED);
} }
} }
@ -1236,10 +1236,9 @@ void CMainDlg::OnOptionsDoNotSave()
{ {
if (this->pWorkerContext->bRunning == false) if (this->pWorkerContext->bRunning == false)
{ {
if (this->GetMenu()->GetMenuState(ID_OPTIONS_DO_NOT_SAVE, MF_BYCOMMAND) == MF_CHECKED) BOOL bChecked = this->GetMenu()->GetMenuState(ID_OPTIONS_DO_NOT_SAVE, MF_BYCOMMAND) == MF_CHECKED;
this->GetMenu()->CheckMenuItem(ID_OPTIONS_DO_NOT_SAVE, MF_UNCHECKED); this->GetMenu()->CheckMenuItem(ID_OPTIONS_DO_NOT_SAVE, (bChecked == TRUE) ? MF_UNCHECKED : MF_CHECKED);
else this->m_Config.m_Options.bDoNotSaveConfiguration = !bChecked;
this->GetMenu()->CheckMenuItem(ID_OPTIONS_DO_NOT_SAVE, MF_CHECKED);
} }
} }
@ -1247,10 +1246,9 @@ void CMainDlg::OnOptionsDeleteOnErrors()
{ {
if (this->pWorkerContext->bRunning == false) if (this->pWorkerContext->bRunning == false)
{ {
if (this->GetMenu()->GetMenuState(ID_OPTIONS_DELETE_ON_ERRORS, MF_BYCOMMAND) == MF_CHECKED) BOOL bChecked = this->GetMenu()->GetMenuState(ID_OPTIONS_DELETE_ON_ERRORS, MF_BYCOMMAND) == MF_CHECKED;
this->GetMenu()->CheckMenuItem(ID_OPTIONS_DELETE_ON_ERRORS, MF_UNCHECKED); this->GetMenu()->CheckMenuItem(ID_OPTIONS_DELETE_ON_ERRORS, (bChecked == TRUE) ? MF_UNCHECKED : MF_CHECKED);
else this->m_Config.m_Options.bDeleteOnErrors = !bChecked;
this->GetMenu()->CheckMenuItem(ID_OPTIONS_DELETE_ON_ERRORS, MF_CHECKED);
} }
} }
@ -1258,10 +1256,9 @@ void CMainDlg::OnOptionsStopOnErrors()
{ {
if (this->pWorkerContext->bRunning == false) if (this->pWorkerContext->bRunning == false)
{ {
if (this->GetMenu()->GetMenuState(ID_OPTIONS_STOP_ON_ERRORS, MF_BYCOMMAND) == MF_CHECKED) BOOL bChecked = this->GetMenu()->GetMenuState(ID_OPTIONS_STOP_ON_ERRORS, MF_BYCOMMAND) == MF_CHECKED;
this->GetMenu()->CheckMenuItem(ID_OPTIONS_STOP_ON_ERRORS, MF_UNCHECKED); this->GetMenu()->CheckMenuItem(ID_OPTIONS_STOP_ON_ERRORS, (bChecked == TRUE) ? MF_UNCHECKED : MF_CHECKED);
else this->m_Config.m_Options.bStopOnErrors = !bChecked;
this->GetMenu()->CheckMenuItem(ID_OPTIONS_STOP_ON_ERRORS, MF_CHECKED);
} }
} }
@ -1269,10 +1266,29 @@ void CMainDlg::OnOptionsHideConsole()
{ {
if (this->pWorkerContext->bRunning == false) if (this->pWorkerContext->bRunning == false)
{ {
if (this->GetMenu()->GetMenuState(ID_OPTIONS_HIDE_CONSOLE, MF_BYCOMMAND) == MF_CHECKED) BOOL bChecked = this->GetMenu()->GetMenuState(ID_OPTIONS_HIDE_CONSOLE, MF_BYCOMMAND) == MF_CHECKED;
this->GetMenu()->CheckMenuItem(ID_OPTIONS_HIDE_CONSOLE, MF_UNCHECKED); this->GetMenu()->CheckMenuItem(ID_OPTIONS_HIDE_CONSOLE, (bChecked == TRUE) ? MF_UNCHECKED : MF_CHECKED);
else this->m_Config.m_Options.bHideConsoleWindow = !bChecked;
this->GetMenu()->CheckMenuItem(ID_OPTIONS_HIDE_CONSOLE, MF_CHECKED); }
}
void CMainDlg::OnOptionsEnsureVisible()
{
if (this->pWorkerContext->bRunning == false)
{
BOOL bChecked = this->GetMenu()->GetMenuState(ID_OPTIONS_ENSURE_VISIBLE, MF_BYCOMMAND) == MF_CHECKED;
this->GetMenu()->CheckMenuItem(ID_OPTIONS_ENSURE_VISIBLE, (bChecked == TRUE) ? MF_UNCHECKED : MF_CHECKED);
this->m_Config.m_Options.bEnsureItemIsVisible = !bChecked;
}
}
void CMainDlg::OnOptionsFindDecoder()
{
if (this->pWorkerContext->bRunning == false)
{
BOOL bChecked = this->GetMenu()->GetMenuState(ID_OPTIONS_FIND_DECODER, MF_BYCOMMAND) == MF_CHECKED;
this->GetMenu()->CheckMenuItem(ID_OPTIONS_FIND_DECODER, (bChecked == TRUE) ? MF_UNCHECKED : MF_CHECKED);
this->m_Config.m_Options.bTryToFindDecoder = !bChecked;
} }
} }
@ -1469,6 +1485,8 @@ void CMainDlg::SetLanguage()
helper.SetMenuItemText(m_hMenu, ID_OPTIONS_DELETE_ON_ERRORS, 0x00040007); helper.SetMenuItemText(m_hMenu, ID_OPTIONS_DELETE_ON_ERRORS, 0x00040007);
helper.SetMenuItemText(m_hMenu, ID_OPTIONS_STOP_ON_ERRORS, 0x00040008); helper.SetMenuItemText(m_hMenu, ID_OPTIONS_STOP_ON_ERRORS, 0x00040008);
helper.SetMenuItemText(m_hMenu, ID_OPTIONS_HIDE_CONSOLE, 0x00040009); helper.SetMenuItemText(m_hMenu, ID_OPTIONS_HIDE_CONSOLE, 0x00040009);
helper.SetMenuItemText(m_hMenu, ID_OPTIONS_ENSURE_VISIBLE, 0x0004000A);
helper.SetMenuItemText(m_hMenu, ID_OPTIONS_FIND_DECODER, 0x0004000B);
// Language Menu // Language Menu
helper.SetMenuPopupText(m_hMenu, 4, 0x00050001); helper.SetMenuPopupText(m_hMenu, 4, 0x00050001);
@ -1580,6 +1598,12 @@ void CMainDlg::GetOptions()
// option: HideConsoleWindow // option: HideConsoleWindow
m_Config.m_Options.bHideConsoleWindow = this->GetMenu()->GetMenuState(ID_OPTIONS_HIDE_CONSOLE, MF_BYCOMMAND) == MF_CHECKED; m_Config.m_Options.bHideConsoleWindow = this->GetMenu()->GetMenuState(ID_OPTIONS_HIDE_CONSOLE, MF_BYCOMMAND) == MF_CHECKED;
// option: EnsureItemIsVisible
m_Config.m_Options.bEnsureItemIsVisible = this->GetMenu()->GetMenuState(ID_OPTIONS_ENSURE_VISIBLE, MF_BYCOMMAND) == MF_CHECKED;
// option: TryToFindDecoder
m_Config.m_Options.bTryToFindDecoder = this->GetMenu()->GetMenuState(ID_OPTIONS_FIND_DECODER, MF_BYCOMMAND) == MF_CHECKED;
// option: ThreadCount // option: ThreadCount
CString szThreadCount; CString szThreadCount;
m_EdtThreads.GetWindowText(szThreadCount); m_EdtThreads.GetWindowText(szThreadCount);
@ -1675,6 +1699,18 @@ void CMainDlg::SetOptions()
else else
this->GetMenu()->CheckMenuItem(ID_OPTIONS_HIDE_CONSOLE, MF_UNCHECKED); this->GetMenu()->CheckMenuItem(ID_OPTIONS_HIDE_CONSOLE, MF_UNCHECKED);
// option: EnsureItemIsVisible
if (m_Config.m_Options.bEnsureItemIsVisible)
this->GetMenu()->CheckMenuItem(ID_OPTIONS_ENSURE_VISIBLE, MF_CHECKED);
else
this->GetMenu()->CheckMenuItem(ID_OPTIONS_ENSURE_VISIBLE, MF_UNCHECKED);
// option: TryToFindDecoder
if (m_Config.m_Options.bTryToFindDecoder)
this->GetMenu()->CheckMenuItem(ID_OPTIONS_FIND_DECODER, MF_CHECKED);
else
this->GetMenu()->CheckMenuItem(ID_OPTIONS_FIND_DECODER, MF_UNCHECKED);
// option: ThreadCount // option: ThreadCount
CString szThreadCount; CString szThreadCount;
szThreadCount.Format(_T("%d\0"), m_Config.m_Options.nThreadCount); szThreadCount.Format(_T("%d\0"), m_Config.m_Options.nThreadCount);

Просмотреть файл

@ -124,6 +124,8 @@ public:
afx_msg void OnOptionsDeleteOnErrors(); afx_msg void OnOptionsDeleteOnErrors();
afx_msg void OnOptionsStopOnErrors(); afx_msg void OnOptionsStopOnErrors();
afx_msg void OnOptionsHideConsole(); afx_msg void OnOptionsHideConsole();
afx_msg void OnOptionsEnsureVisible();
afx_msg void OnOptionsFindDecoder();
afx_msg void OnLanguageDefault(); afx_msg void OnLanguageDefault();
afx_msg void OnLanguageChange(UINT nID); afx_msg void OnLanguageChange(UINT nID);
afx_msg void OnHelpWebsite(); afx_msg void OnHelpWebsite();

Просмотреть файл

@ -260,6 +260,10 @@ BEGIN
MENUITEM "Stop &Conversion On Error", ID_OPTIONS_STOP_ON_ERRORS MENUITEM "Stop &Conversion On Error", ID_OPTIONS_STOP_ON_ERRORS
MENUITEM SEPARATOR MENUITEM SEPARATOR
MENUITEM "&Hide Console Window", ID_OPTIONS_HIDE_CONSOLE MENUITEM "&Hide Console Window", ID_OPTIONS_HIDE_CONSOLE
MENUITEM SEPARATOR
MENUITEM "&Ensure Item Is Visible", ID_OPTIONS_ENSURE_VISIBLE
MENUITEM SEPARATOR
MENUITEM "&Try To Find Decoder", ID_OPTIONS_FIND_DECODER
END END
POPUP "&Language" POPUP "&Language"
BEGIN BEGIN

Просмотреть файл

@ -110,6 +110,8 @@
#define ID_OPTIONS_DELETE_ON_ERRORS 32815 #define ID_OPTIONS_DELETE_ON_ERRORS 32815
#define ID_OPTIONS_STOP_ON_ERRORS 32816 #define ID_OPTIONS_STOP_ON_ERRORS 32816
#define ID_OPTIONS_HIDE_CONSOLE 32817 #define ID_OPTIONS_HIDE_CONSOLE 32817
#define ID_OPTIONS_ENSURE_VISIBLE 32818
#define ID_OPTIONS_FIND_DECODER 32819
#define ID_HELP_ABOUT 32820 #define ID_HELP_ABOUT 32820
#define ID_HELP_WEBSITE 32821 #define ID_HELP_WEBSITE 32821
#define ID_ACCELERATOR_F5 32840 #define ID_ACCELERATOR_F5 32840