Index: available.c =================================================================== --- available.c (revision 67187) +++ available.c (working copy) @@ -246,7 +246,7 @@ skip_if_cached: - if (Info->Category == -1) + if (Info->Category == FALSE) continue; if (EnumType != Info->Category && EnumType != ENUM_ALL_AVAILABLE) @@ -277,4 +277,20 @@ FindClose(hFind); return TRUE; +} + + +VOID FreeCachedAvailableEntries(VOID) +{ + PAPPLICATION_INFO Info; + + /* loop and deallocate all the catched app infos in the list */ + for (pCachedEntry = CachedEntriesHead.Flink; pCachedEntry != &CachedEntriesHead; pCachedEntry = pCachedEntry->Flink) + { + Info = CONTAINING_RECORD(pCachedEntry, APPLICATION_INFO, List); + + /* flush them down the toilet :D */ + RemoveEntryList(&Info->List); + HeapFree(GetProcessHeap(), 0, Info); + } } \ No newline at end of file Index: CreateCabFile.sh =================================================================== --- CreateCabFile.sh (revision 67187) +++ CreateCabFile.sh (working copy) @@ -2,8 +2,8 @@ cd rapps mkdir utf16 for i in $(find -type f); do - ../../../../output-MinGW-i386/host-tools/tools/utf16le.exe $i utf16/$i + ../../../host-tools/tools/utf16le $i utf16/$i done cd .. -../../../output-MinGW-i386/host-tools/tools/cabman/cabman -M mszip -S rappmgr.cab rapps/utf16/*.txt +../../host-tools/tools/cabman/cabman -M mszip -S rappmgr.cab rapps/utf16/*.txt rm -r rapps/uft16 \ No newline at end of file Index: lang/es-ES.rc =================================================================== --- lang/es-ES.rc (revision 67187) +++ lang/es-ES.rc (working copy) @@ -194,10 +194,10 @@ IDS_AVAILABLEFORINST "Disponible para su instalación" IDS_UPDATES "Actualizaciones" IDS_APPLICATIONS "Aplicaciones" - IDS_CHOOSE_FOLDER_TEXT "Seleccione una carpeta donde se descargarán los programas:" - IDS_CHOOSE_FOLDER_ERROR "¡La carpeta especificada no existe!" + IDS_CHOOSE_FOLDER_TEXT "Seleccione una carpeta de donde se descargarán los programas:" + IDS_CHOOSE_FOLDER_ERROR "La carpeta especificada no existe." IDS_APP_REG_REMOVE "¿Está seguro de querer borrar del Registro los datos de instalación del programa?" IDS_INFORMATION "Información" - IDS_UNABLE_TO_DOWNLOAD "Unable to download the package! Address not found!" - IDS_UNABLE_TO_REMOVE "¡No se pudieron borrar del Registro los datos de instalación del programa!" + IDS_UNABLE_TO_DOWNLOAD "No se pudo descargar el paquete. No se ha encontrado la dirección de Internet." + IDS_UNABLE_TO_REMOVE "No se pudieron borrar del Registro los datos de instalación del programa." END Index: misc.c =================================================================== --- misc.c (revision 67187) +++ misc.c (working copy) @@ -414,12 +414,8 @@ UINT ParserGetString(LPCWSTR lpKeyName, LPWSTR lpReturnedString, UINT nSize, LPCWSTR lpFileName) { PWSTR lpFullFileName = GetINIFullPath(lpFileName); - LPSTR lpRequiredBuf = HeapAlloc(GetProcessHeap(), 0, nSize); DWORD dwResult; - if (!lpRequiredBuf) - return FALSE; - /* we don't have cached section strings for the current system language, create them */ if(bCachedSectionStatus == FALSE) { @@ -457,7 +453,7 @@ lpFullFileName); if (dwResult != 0) - goto skip; + return TRUE; /* 2nd - if they weren't present check for neutral sub-langs/ generic translations (e.g. "Section.0a") */ dwResult = GetPrivateProfileStringW(szCachedINISectionLocaleNeutral, @@ -468,7 +464,7 @@ lpFullFileName); if (dwResult != 0) - goto skip; + return TRUE; /* 3rd - if they weren't present fallback to standard english strings (just "Section") */ dwResult = GetPrivateProfileStringW(L"Section", @@ -478,18 +474,7 @@ nSize, lpFullFileName); - if (dwResult == 0) - { - HeapFree(GetProcessHeap(), 0, lpRequiredBuf); - return FALSE; - } - -skip: - - /* get rid of the dynamically allocated ANSI buffer */ - HeapFree(GetProcessHeap(), 0, lpRequiredBuf); - - return TRUE; + return (dwResult != 0 ? TRUE : FALSE); } UINT ParserGetInt(LPCWSTR lpKeyName, LPCWSTR lpFileName) Index: rapps.h =================================================================== --- rapps.h (revision 67187) +++ rapps.h (working copy) @@ -125,6 +125,7 @@ BOOL EnumAvailableApplications(INT EnumType, AVAILENUMPROC lpEnumProc); BOOL ShowAvailableAppInfo(INT Index); BOOL UpdateAppsDB(VOID); +VOID FreeCachedAvailableEntries(VOID); /* installdlg.c */ BOOL InstallApplication(INT Index); Index: winmain.c =================================================================== --- winmain.c (revision 67187) +++ winmain.c (working copy) @@ -147,21 +147,6 @@ return TRUE; } -VOID -FreeAvailableAppList(VOID) -{ - INT Count = ListView_GetItemCount(hListView) - 1; - PVOID Info; - - while (Count >= 0) - { - Info = ListViewGetlParam(Count); - if (Info) - HeapFree(GetProcessHeap(), 0, Info); - Count--; - } -} - BOOL CALLBACK EnumAvailableAppProc(PAPPLICATION_INFO Info) @@ -202,9 +187,6 @@ if (IS_INSTALLED_ENUM(SelectedEnumType)) FreeInstalledAppList(); - /* FIXME: reenable when caching is fixed */ - /* else if (IS_AVAILABLE_ENUM(SelectedEnumType)) - FreeAvailableAppList(); */ (VOID) ListView_DeleteAllItems(hListView); @@ -887,12 +869,14 @@ FreeLogs(); - if (IS_AVAILABLE_ENUM(SelectedEnumType)) - FreeAvailableAppList(); + FreeCachedAvailableEntries(); + if (IS_INSTALLED_ENUM(SelectedEnumType)) FreeInstalledAppList(); - if (hImageTreeView) ImageList_Destroy(hImageTreeView); + if (hImageTreeView) + ImageList_Destroy(hImageTreeView); + PostQuitMessage(0); return 0; }