MCPcopy Create free account
hub / github.com/bruderstein/nppPluginManager / initialiseOptions

Method initialiseOptions

pluginManager/src/SettingsDialog.cpp:87–122  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

85
86
87void SettingsDialog::initialiseOptions()
88{
89 char tmp[15];
90
91 ::SendMessage(GetDlgItem(_hSelf, IDC_NOTIFY), BM_SETCHECK, g_options.notifyUpdates ? BST_CHECKED : BST_UNCHECKED, 0);
92
93 ::SendMessage(GetDlgItem(_hSelf, IDC_SHOWUNSTABLE), BM_SETCHECK, g_options.showUnstable ? BST_CHECKED : BST_UNCHECKED, 0);
94
95
96 _ltoa_s(g_options.daysToCheck, tmp, 15, 10);
97 ::SetWindowTextA(GetDlgItem(_hSelf, IDC_DAYSTOCHECK), tmp);
98
99 ::SendMessage(GetDlgItem(_hSelf, IDC_INSTALLALLUSERS), BM_SETCHECK, g_options.installLocation == INSTALLLOC_APPDATA ? BST_UNCHECKED : BST_CHECKED, 0);
100 ::SendMessage(GetDlgItem(_hSelf, IDC_FORCEHTTP), BM_SETCHECK, g_options.forceHttp != TRUE ? BST_UNCHECKED : BST_CHECKED, 0);
101 ::SendMessage(GetDlgItem(_hSelf, IDC_USEDEVPLUGINLIST), BM_SETCHECK, g_options.useDevPluginList != TRUE ? BST_UNCHECKED : BST_CHECKED, 0);
102
103 ::EnableWindow(GetDlgItem(_hSelf, IDC_INSTALLALLUSERS), g_options.appDataPluginsSupported);
104
105 tstring info(_T("Plugin Config path is:\r\n"));
106 TCHAR path[MAX_PATH];
107 path[0] = _T('\0');
108 ::SendMessage(_nppData->_nppHandle, NPPM_GETPLUGINSCONFIGDIR, MAX_PATH, reinterpret_cast<LPARAM>(path));
109 info.append(path);
110 info.append(_T("\r\n"));
111 if (g_options.appDataPluginsSupported)
112 {
113 info.append(_T("Plugins in user's AppData directory are enabled. Remove the allowAppDataPlugins.xml file from the Notepad++ directory to disable."));
114 }
115 else
116 {
117 info.append(_T("Plugins in user's AppData directory are disabled - to enable in Notepad++ version 5.9.7 onwards place an empty file called allowAppDataPlugins.xml in the Notepad++ directory."));
118 }
119
120 SetWindowText(GetDlgItem(_hSelf, IDC_INFOTEXT), info.c_str());
121
122}
123
124void SettingsDialog::setOptions()
125{

Callers

nothing calls this directly

Calls 2

c_strMethod · 0.80
appendMethod · 0.45

Tested by

no test coverage detected