Final cleanup
This commit is contained in:
@@ -103,10 +103,8 @@ progsett_fill_iconsets(HWND hdlg)
|
|||||||
plat_get_icons_path(icon_path_root);
|
plat_get_icons_path(icon_path_root);
|
||||||
|
|
||||||
wchar_t search[512];
|
wchar_t search[512];
|
||||||
pclog("icon_path_root: %s\n", icon_path_root);
|
|
||||||
mbstowcs(search, icon_path_root, strlen(icon_path_root) + 1);
|
mbstowcs(search, icon_path_root, strlen(icon_path_root) + 1);
|
||||||
wcscat(search, L"*.*");
|
wcscat(search, L"*.*");
|
||||||
pclog("search: %ls\n", search);
|
|
||||||
|
|
||||||
hFind = FindFirstFile((LPCWSTR)search, &data);
|
hFind = FindFirstFile((LPCWSTR)search, &data);
|
||||||
|
|
||||||
@@ -119,9 +117,7 @@ progsett_fill_iconsets(HWND hdlg)
|
|||||||
mbstowcs(temp, icon_path_root, strlen(icon_path_root) + 1);
|
mbstowcs(temp, icon_path_root, strlen(icon_path_root) + 1);
|
||||||
wcscat(temp, data.cFileName);
|
wcscat(temp, data.cFileName);
|
||||||
wcscat(temp, L"\\iconinfo.txt");
|
wcscat(temp, L"\\iconinfo.txt");
|
||||||
|
|
||||||
pclog("temp: %ls\n", temp);
|
|
||||||
|
|
||||||
wcscpy(dispname, data.cFileName);
|
wcscpy(dispname, data.cFileName);
|
||||||
FILE *fp = _wfopen(temp, L"r");
|
FILE *fp = _wfopen(temp, L"r");
|
||||||
if (fp)
|
if (fp)
|
||||||
@@ -129,7 +125,6 @@ progsett_fill_iconsets(HWND hdlg)
|
|||||||
char line[512];
|
char line[512];
|
||||||
if (fgets(line, 511, fp))
|
if (fgets(line, 511, fp))
|
||||||
{
|
{
|
||||||
pclog("found! %s\n", line);
|
|
||||||
mbstowcs(dispname, line, strlen(line) + 1);
|
mbstowcs(dispname, line, strlen(line) + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -219,7 +214,6 @@ ProgSettDlgProcedure(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam)
|
|||||||
/* Language */
|
/* Language */
|
||||||
temp_language = lang_id;
|
temp_language = lang_id;
|
||||||
strcpy(temp_icon_set, icon_set);
|
strcpy(temp_icon_set, icon_set);
|
||||||
pclog("temp_icon_set: %s\n", temp_icon_set);
|
|
||||||
progsett_fill_languages(hdlg);
|
progsett_fill_languages(hdlg);
|
||||||
progsett_fill_iconsets(hdlg);
|
progsett_fill_iconsets(hdlg);
|
||||||
break;
|
break;
|
||||||
@@ -246,11 +240,9 @@ ProgSettDlgProcedure(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam)
|
|||||||
|
|
||||||
case IDC_COMBO_ICON:
|
case IDC_COMBO_ICON:
|
||||||
if (HIWORD(wParam) == CBN_SELCHANGE) {
|
if (HIWORD(wParam) == CBN_SELCHANGE) {
|
||||||
pclog("dosth\n");
|
|
||||||
HWND combo = GetDlgItem(hdlg, IDC_COMBO_ICON);
|
HWND combo = GetDlgItem(hdlg, IDC_COMBO_ICON);
|
||||||
int index = SendMessage(combo, CB_GETCURSEL, 0, 0);
|
int index = SendMessage(combo, CB_GETCURSEL, 0, 0);
|
||||||
strcpy(temp_icon_set, (char*)SendMessage(combo, CB_GETITEMDATA, index, 0));
|
strcpy(temp_icon_set, (char*)SendMessage(combo, CB_GETITEMDATA, index, 0));
|
||||||
pclog("temp_icon_set: %s\n", temp_icon_set);
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -263,10 +255,8 @@ ProgSettDlgProcedure(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam)
|
|||||||
}
|
}
|
||||||
|
|
||||||
case IDC_BUTTON_DEFICON: {
|
case IDC_BUTTON_DEFICON: {
|
||||||
pclog("dosth\n");
|
|
||||||
SendMessage(GetDlgItem(hdlg, IDC_COMBO_ICON), CB_SETCURSEL, 0, 0);
|
SendMessage(GetDlgItem(hdlg, IDC_COMBO_ICON), CB_SETCURSEL, 0, 0);
|
||||||
strcpy(temp_icon_set, "");
|
strcpy(temp_icon_set, "");
|
||||||
pclog("temp_icon_set: %s\n", temp_icon_set);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
|
Reference in New Issue
Block a user