mirror of
https://github.com/lammertb/libhttp.git
synced 2025-09-04 12:42:09 +03:00
Replace is_directory_option
This commit is contained in:
@@ -703,7 +703,7 @@ static BOOL CALLBACK DlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lP)
|
|||||||
|
|
||||||
for (i = 0; default_options[i].name != NULL; i++) {
|
for (i = 0; default_options[i].name != NULL; i++) {
|
||||||
name = default_options[i].name;
|
name = default_options[i].name;
|
||||||
if ((is_filename_option(name) || is_directory_option(name)) &&
|
if ((is_filename_option(name) || (default_options[i].type == CONFIG_TYPE_DIRECTORY)) &&
|
||||||
LOWORD(wParam) == ID_CONTROLS + i + ID_FILE_BUTTONS_DELTA) {
|
LOWORD(wParam) == ID_CONTROLS + i + ID_FILE_BUTTONS_DELTA) {
|
||||||
OPENFILENAME of;
|
OPENFILENAME of;
|
||||||
BROWSEINFO bi;
|
BROWSEINFO bi;
|
||||||
@@ -722,7 +722,7 @@ static BOOL CALLBACK DlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lP)
|
|||||||
bi.lpszTitle = "Choose WWW root directory:";
|
bi.lpszTitle = "Choose WWW root directory:";
|
||||||
bi.ulFlags = BIF_RETURNONLYFSDIRS;
|
bi.ulFlags = BIF_RETURNONLYFSDIRS;
|
||||||
|
|
||||||
if (is_directory_option(name)) {
|
if (default_options[i].type == CONFIG_TYPE_DIRECTORY) {
|
||||||
SHGetPathFromIDList(SHBrowseForFolder(&bi), path);
|
SHGetPathFromIDList(SHBrowseForFolder(&bi), path);
|
||||||
} else {
|
} else {
|
||||||
GetOpenFileName(&of);
|
GetOpenFileName(&of);
|
||||||
@@ -843,7 +843,7 @@ static void show_settings_dialog()
|
|||||||
cl = 0x80;
|
cl = 0x80;
|
||||||
style |= BS_AUTOCHECKBOX;
|
style |= BS_AUTOCHECKBOX;
|
||||||
} else if (is_filename_option(options[i].name) ||
|
} else if (is_filename_option(options[i].name) ||
|
||||||
is_directory_option(options[i].name)) {
|
(options[i].type == CONFIG_TYPE_DIRECTORY)) {
|
||||||
style |= WS_BORDER | ES_AUTOHSCROLL;
|
style |= WS_BORDER | ES_AUTOHSCROLL;
|
||||||
width -= 20;
|
width -= 20;
|
||||||
cl = 0x81;
|
cl = 0x81;
|
||||||
|
Reference in New Issue
Block a user