Skip to content

Commit

Permalink
sync dialogs 2
Browse files Browse the repository at this point in the history
  • Loading branch information
katahiromz committed Apr 2, 2024
1 parent 393869c commit 7c718b2
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions GUI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4523,7 +4523,7 @@ LOGFONTW *XgGetUIFont(void)

enum
{
I_SYNCED_FILE_SETTINGS,
I_SYNCED_FILE_SETTINGS = 0,
I_SYNCED_VIEW_SETTINGS,
I_SYNCED_APPEARANCE,
I_SYNCED_MAX
Expand All @@ -4536,12 +4536,15 @@ HWND xg_ahSyncedDialogs[I_SYNCED_MAX] = { 0 };
#include "XG_SettingsDialog.cpp"

// 全般設定。
void XgGeneralSettings(HWND hwnd, INT nStartPage = 0)
void XgGeneralSettings(HWND hwnd, INT nStartPage = I_SYNCED_FILE_SETTINGS)
{
PROPSHEETPAGEW psp = { sizeof(psp) };
HPROPSHEETPAGE hpsp[3];
INT iPage = 0;

// 入力候補を破棄する。
XgDestroyCandsWnd();

// 「ファイル」設定。
psp.pszTemplate = MAKEINTRESOURCEW(IDD_FILESETTINGS);
psp.pfnDlgProc = XgFileSettingsDlgProc;
Expand All @@ -4558,7 +4561,7 @@ void XgGeneralSettings(HWND hwnd, INT nStartPage = 0)
psp.lParam = 0;
hpsp[iPage++] = ::CreatePropertySheetPageW(&psp);

//表示」設定
//見た目の設定」
XG_SettingsDialog dialog;
psp.pszTemplate = MAKEINTRESOURCEW(IDD_CONFIG);
psp.pfnDlgProc = XG_SettingsDialog::DialogProc;
Expand All @@ -4585,12 +4588,6 @@ void XgGeneralSettings(HWND hwnd, INT nStartPage = 0)
ZeroMemory(&xg_ahSyncedDialogs, sizeof(xg_ahSyncedDialogs));
}

void MainWnd_OnSettings(HWND hwnd)
{
XgDestroyCandsWnd();
XgGeneralSettings(hwnd, 2);
}

// テーマが変更された。
void XgUpdateTheme(HWND hwnd)
{
Expand Down Expand Up @@ -5816,7 +5813,7 @@ void __fastcall MainWnd_OnCommand(HWND hwnd, int id, HWND hwndCtl, UINT /*codeNo
XgCopyHintsStyle1(hwnd, 1);
break;
case ID_SETTINGS: // 設定。
MainWnd_OnSettings(hwnd);
XgGeneralSettings(hwnd, I_SYNCED_APPEARANCE);
bUpdateImage = TRUE;
break;
case ID_ERASESETTINGS: // 設定の削除。
Expand Down

0 comments on commit 7c718b2

Please sign in to comment.