Skip to content

Commit

Permalink
refactoring on loading files 3
Browse files Browse the repository at this point in the history
  • Loading branch information
katahiromz committed Jul 25, 2024
1 parent ac91a4a commit c36f4a4
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/RisohEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2382,9 +2382,9 @@ class MMainWnd : public MWindowBase
BOOL DoLoadResH(HWND hwnd, LPCTSTR pszFile);
void DoLoadLangInfo(VOID);
BOOL DoLoadFile(HWND hwnd, LPCWSTR pszFileName, DWORD nFilterIndex = 0, BOOL bForceDecompress = FALSE);
BOOL DoLoadRC(HWND hwnd, LPCWSTR szRCFile, EntrySet& res);
BOOL DoLoadRCEx(HWND hwnd, LPCWSTR szRCFile, EntrySet& res);
BOOL DoLoadRES(HWND hwnd, LPCWSTR szPath);
BOOL DoLoadRC2(HWND hwnd, LPCWSTR szPath);
BOOL DoLoadRC(HWND hwnd, LPCWSTR szPath);
BOOL DoLoadEXE(HWND hwnd, LPCWSTR pszPath, BOOL bForceDecompress);
BOOL DoExtract(const EntryBase *entry, BOOL bExporting);
BOOL DoExportRC(LPCWSTR pszRCFile, LPWSTR pszResHFile = NULL);
Expand Down Expand Up @@ -7698,7 +7698,7 @@ BOOL InitLangListBox(HWND hwnd)
return TRUE;
}

BOOL MMainWnd::DoLoadRC2(HWND hwnd, LPCWSTR szPath)
BOOL MMainWnd::DoLoadRC(HWND hwnd, LPCWSTR szPath)
{
// reload the resource.h if necessary
UnloadResourceH(hwnd);
Expand All @@ -7707,7 +7707,7 @@ BOOL MMainWnd::DoLoadRC2(HWND hwnd, LPCWSTR szPath)

// load the RC file to the res variable
EntrySet res;
if (!DoLoadRC(hwnd, szPath, res))
if (!DoLoadRCEx(hwnd, szPath, res))
{
ErrorBoxDx(IDS_CANNOTOPEN);
return FALSE;
Expand Down Expand Up @@ -7977,7 +7977,7 @@ BOOL MMainWnd::DoLoadFile(HWND hwnd, LPCWSTR pszFileName, DWORD nFilterIndex, BO
case LFI_RES:
return DoLoadRES(hwnd, szPath);
case LFI_RC:
return DoLoadRC2(hwnd, szPath);
return DoLoadRC(hwnd, szPath);
default:
return DoLoadEXE(hwnd, szPath, bForceDecompress);
}
Expand Down Expand Up @@ -8069,7 +8069,7 @@ BOOL MMainWnd::CheckResourceH(HWND hwnd, LPCTSTR pszPath)
}

// load an RC file
BOOL MMainWnd::DoLoadRC(HWND hwnd, LPCWSTR szRCFile, EntrySet& res)
BOOL MMainWnd::DoLoadRCEx(HWND hwnd, LPCWSTR szRCFile, EntrySet& res)
{
// load the RC file to the res variable
MStringA strOutput;
Expand Down Expand Up @@ -9823,7 +9823,7 @@ IMPORT_RESULT MMainWnd::DoImportRC(HWND hwnd, LPCWSTR pszFile)

// load the RC file to the res variable
EntrySet res;
if (!DoLoadRC(hwnd, pszFile, res))
if (!DoLoadRCEx(hwnd, pszFile, res))
{
ErrorBoxDx(IDS_CANNOTIMPORT);
return IMPORT_FAILED;
Expand Down

0 comments on commit c36f4a4

Please sign in to comment.