mirror of
https://github.com/pbatard/rufus.git
synced 2024-08-14 23:57:05 +00:00
[misc] miscellaneous cleanup
* Also add CreateWindowExU() method * Also add the 'DisableFileIndexing' to the ini template
This commit is contained in:
parent
da7a5bb30d
commit
be1bdb7c85
6 changed files with 31 additions and 14 deletions
|
@ -24,10 +24,6 @@ CheckForBetas = 1
|
||||||
|
|
||||||
; Start with the 'Advanced Options' panel displayed
|
; Start with the 'Advanced Options' panel displayed
|
||||||
; AdvancedMode = 1
|
; AdvancedMode = 1
|
||||||
; Have Rufus to preserve timestamps when copying files (Alt-T)
|
|
||||||
; PreserveTimestamps = 1
|
|
||||||
; Disable the whole Kibi/Gibi nonsense (Alt-U)
|
|
||||||
; UseProperSizeUnits = 1
|
|
||||||
; Display extended information duringh USB enumeration (Alt-.)
|
; Display extended information duringh USB enumeration (Alt-.)
|
||||||
; EnableUsbDebug = 1
|
; EnableUsbDebug = 1
|
||||||
; Don't perform a fake drive test during bad blocks check (Alt-B)
|
; Don't perform a fake drive test during bad blocks check (Alt-B)
|
||||||
|
@ -36,5 +32,11 @@ CheckForBetas = 1
|
||||||
; EnableWindowsDualUefiBiosMode = 1
|
; EnableWindowsDualUefiBiosMode = 1
|
||||||
; Also use RidgeCrop's Large FAT32 format algorithm when formatting smaller drives (Alt-L)
|
; Also use RidgeCrop's Large FAT32 format algorithm when formatting smaller drives (Alt-L)
|
||||||
; ForceLargeFat32Formatting = 1
|
; ForceLargeFat32Formatting = 1
|
||||||
|
; Disable Windows file indexing on the newly formatted drive (Alt-Q)
|
||||||
|
; DisableFileIndexing = 1
|
||||||
|
; Have Rufus to preserve timestamps when copying files (Alt-T)
|
||||||
|
; PreserveTimestamps = 1
|
||||||
|
; Disable the whole Kibi/Gibi nonsense (Alt-U)
|
||||||
|
; UseProperSizeUnits = 1
|
||||||
; Enable listing of VMWare's VMDK drives when used in a virtual machine (Alt-W)
|
; Enable listing of VMWare's VMDK drives when used in a virtual machine (Alt-W)
|
||||||
; EnableVmdkDetection = 1
|
; EnableVmdkDetection = 1
|
||||||
|
|
|
@ -198,6 +198,22 @@ static __inline HWND CreateWindowU(char* lpClassName, char* lpWindowName,
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static __inline HWND CreateWindowExU(DWORD dwExStyle, char* lpClassName, char* lpWindowName,
|
||||||
|
DWORD dwStyle, int x, int y, int nWidth, int nHeight, HWND hWndParent, HMENU hMenu,
|
||||||
|
HINSTANCE hInstance, LPVOID lpParam)
|
||||||
|
{
|
||||||
|
HWND ret = NULL;
|
||||||
|
DWORD err = ERROR_INVALID_DATA;
|
||||||
|
wconvert(lpClassName);
|
||||||
|
wconvert(lpWindowName);
|
||||||
|
ret = CreateWindowExW(dwExStyle, wlpClassName, wlpWindowName, dwStyle, x, y, nWidth, nHeight, hWndParent, hMenu, hInstance, lpParam);
|
||||||
|
err = GetLastError();
|
||||||
|
wfree(lpClassName);
|
||||||
|
wfree(lpWindowName);
|
||||||
|
SetLastError(err);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
static __inline int MessageBoxU(HWND hWnd, LPCSTR lpText, LPCSTR lpCaption, UINT uType)
|
static __inline int MessageBoxU(HWND hWnd, LPCSTR lpText, LPCSTR lpCaption, UINT uType)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
|
|
@ -236,7 +236,6 @@ out:
|
||||||
* Parse a localization file, to construct the list of available locales.
|
* Parse a localization file, to construct the list of available locales.
|
||||||
* The locale file must be UTF-8 with NO BOM.
|
* The locale file must be UTF-8 with NO BOM.
|
||||||
*/
|
*/
|
||||||
extern char lost_translators[][6];
|
|
||||||
BOOL get_supported_locales(const char* filename)
|
BOOL get_supported_locales(const char* filename)
|
||||||
{
|
{
|
||||||
FILE* fd = NULL;
|
FILE* fd = NULL;
|
||||||
|
|
|
@ -1812,7 +1812,7 @@ void InitDialog(HWND hDlg)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create the language toolbar
|
// Create the language toolbar
|
||||||
hLangToolbar = CreateWindowEx(0, TOOLBARCLASSNAME, NULL, WS_CHILD | WS_TABSTOP | TBSTYLE_TRANSPARENT | CCS_NOPARENTALIGN |
|
hLangToolbar = CreateWindowExW(0, TOOLBARCLASSNAME, NULL, WS_CHILD | WS_TABSTOP | TBSTYLE_TRANSPARENT | CCS_NOPARENTALIGN |
|
||||||
CCS_NORESIZE | CCS_NODIVIDER, 0, 0, 0, 0, hMainDialog, NULL, hMainInstance, NULL);
|
CCS_NORESIZE | CCS_NODIVIDER, 0, 0, 0, 0, hMainDialog, NULL, hMainInstance, NULL);
|
||||||
if ((pfImageList_Create != NULL) && (pfImageList_AddIcon != NULL)) {
|
if ((pfImageList_Create != NULL) && (pfImageList_AddIcon != NULL)) {
|
||||||
hLangToolbarImageList = pfImageList_Create(i16, i16, ILC_COLOR32, 1, 0);
|
hLangToolbarImageList = pfImageList_Create(i16, i16, ILC_COLOR32, 1, 0);
|
||||||
|
|
10
src/rufus.rc
10
src/rufus.rc
|
@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
|
||||||
IDD_DIALOG DIALOGEX 12, 12, 242, 376
|
IDD_DIALOG DIALOGEX 12, 12, 242, 376
|
||||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||||
EXSTYLE WS_EX_ACCEPTFILES
|
EXSTYLE WS_EX_ACCEPTFILES
|
||||||
CAPTION "Rufus 2.13.1078"
|
CAPTION "Rufus 2.13.1079"
|
||||||
FONT 8, "Segoe UI Symbol", 400, 0, 0x0
|
FONT 8, "Segoe UI Symbol", 400, 0, 0x0
|
||||||
BEGIN
|
BEGIN
|
||||||
LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8
|
LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8
|
||||||
|
@ -334,8 +334,8 @@ END
|
||||||
//
|
//
|
||||||
|
|
||||||
VS_VERSION_INFO VERSIONINFO
|
VS_VERSION_INFO VERSIONINFO
|
||||||
FILEVERSION 2,13,1078,0
|
FILEVERSION 2,13,1079,0
|
||||||
PRODUCTVERSION 2,13,1078,0
|
PRODUCTVERSION 2,13,1079,0
|
||||||
FILEFLAGSMASK 0x3fL
|
FILEFLAGSMASK 0x3fL
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
FILEFLAGS 0x1L
|
FILEFLAGS 0x1L
|
||||||
|
@ -352,13 +352,13 @@ BEGIN
|
||||||
BEGIN
|
BEGIN
|
||||||
VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)"
|
VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)"
|
||||||
VALUE "FileDescription", "Rufus"
|
VALUE "FileDescription", "Rufus"
|
||||||
VALUE "FileVersion", "2.13.1078"
|
VALUE "FileVersion", "2.13.1079"
|
||||||
VALUE "InternalName", "Rufus"
|
VALUE "InternalName", "Rufus"
|
||||||
VALUE "LegalCopyright", "© 2011-2017 Pete Batard (GPL v3)"
|
VALUE "LegalCopyright", "© 2011-2017 Pete Batard (GPL v3)"
|
||||||
VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html"
|
VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html"
|
||||||
VALUE "OriginalFilename", "rufus.exe"
|
VALUE "OriginalFilename", "rufus.exe"
|
||||||
VALUE "ProductName", "Rufus"
|
VALUE "ProductName", "Rufus"
|
||||||
VALUE "ProductVersion", "2.13.1078"
|
VALUE "ProductVersion", "2.13.1079"
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
BLOCK "VarFileInfo"
|
BLOCK "VarFileInfo"
|
||||||
|
|
|
@ -422,7 +422,7 @@ void CreateStatusBar(void)
|
||||||
HDC hDC;
|
HDC hDC;
|
||||||
|
|
||||||
// Create the status bar (WS_CLIPSIBLINGS since we have an overlapping button)
|
// Create the status bar (WS_CLIPSIBLINGS since we have an overlapping button)
|
||||||
hStatus = CreateWindowEx(0, STATUSCLASSNAME, NULL, WS_CHILD | WS_VISIBLE | SBARS_TOOLTIPS | WS_CLIPSIBLINGS,
|
hStatus = CreateWindowExW(0, STATUSCLASSNAME, NULL, WS_CHILD | WS_VISIBLE | SBARS_TOOLTIPS | WS_CLIPSIBLINGS,
|
||||||
CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, hMainDialog,
|
CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, hMainDialog,
|
||||||
(HMENU)IDC_STATUS, hMainInstance, NULL);
|
(HMENU)IDC_STATUS, hMainInstance, NULL);
|
||||||
|
|
||||||
|
@ -472,7 +472,7 @@ void CreateStatusBar(void)
|
||||||
height += 1;
|
height += 1;
|
||||||
|
|
||||||
// Create the status toolbar
|
// Create the status toolbar
|
||||||
hStatusToolbar = CreateWindowEx(WS_EX_TRANSPARENT, TOOLBARCLASSNAME, NULL, WS_CHILD | WS_TABSTOP | WS_DISABLED |
|
hStatusToolbar = CreateWindowExW(WS_EX_TRANSPARENT, TOOLBARCLASSNAME, NULL, WS_CHILD | WS_TABSTOP | WS_DISABLED |
|
||||||
TBSTYLE_LIST | CCS_NOPARENTALIGN | CCS_NODIVIDER | CCS_NORESIZE,
|
TBSTYLE_LIST | CCS_NOPARENTALIGN | CCS_NODIVIDER | CCS_NORESIZE,
|
||||||
x, y, width, height, hMainDialog, (HMENU)IDC_STATUS_TOOLBAR, hMainInstance, NULL);
|
x, y, width, height, hMainDialog, (HMENU)IDC_STATUS_TOOLBAR, hMainInstance, NULL);
|
||||||
|
|
||||||
|
@ -1050,7 +1050,7 @@ BOOL CreateTooltip(HWND hControl, const char* message, int duration)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create the tooltip window
|
// Create the tooltip window
|
||||||
ttlist[i].hTip = CreateWindowExW(0, TOOLTIPS_CLASSW, NULL, WS_POPUP | TTS_NOPREFIX | TTS_ALWAYSTIP,
|
ttlist[i].hTip = CreateWindowExW(0, TOOLTIPS_CLASS, NULL, WS_POPUP | TTS_NOPREFIX | TTS_ALWAYSTIP,
|
||||||
CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, hMainDialog, NULL,
|
CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, hMainDialog, NULL,
|
||||||
hMainInstance, NULL);
|
hMainInstance, NULL);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue