mirror of
https://github.com/pbatard/rufus.git
synced 2025-05-25 04:04:26 -04:00
[ui] delay hotplug event when the user has pressed Start
* Closes #793 * Also update issue template
This commit is contained in:
parent
91eec034b1
commit
cebfa4cc7a
3 changed files with 29 additions and 18 deletions
19
.github/ISSUE_TEMPLATE.md
vendored
19
.github/ISSUE_TEMPLATE.md
vendored
|
@ -1,24 +1,23 @@
|
||||||
Report checklist
|
Checklist
|
||||||
----------------
|
---------
|
||||||
|
<Please complete the following and place an x into each [ ] to confirm that you have read and performed these preliminary steps>
|
||||||
|
|
||||||
(Place an x into each [ ] to confirm that you have read and performed the following)
|
- [ ] I looked at https://github.com/pbatard/rufus/wiki/FAQ to see if my question has already been answered.
|
||||||
|
|
||||||
- [ ] I had a look at https://github.com/pbatard/rufus/wiki/FAQ to see if my issue/question has been answered there.
|
|
||||||
- [ ] I performed a search in the issue tracker for similar issues, using keywords relevant to my problem.
|
- [ ] I performed a search in the issue tracker for similar issues, using keywords relevant to my problem.
|
||||||
- [ ] I clicked on the 'Log' button in Rufus and I have copied it, into the line that says `<FULL LOG>` below.
|
- [ ] I clicked the `Log` button in Rufus and copy/pasted the log into the line that says `<FULL LOG>` below.
|
||||||
- [ ] The log I am copying is the FULL log, starting with the line `Rufus version: x.y.z` - I have NOT removed any part of it.
|
- [ ] The log I am copying is the FULL log, starting with the line `Rufus version: x.y.z` - I have NOT removed any part of it.
|
||||||
|
|
||||||
Additionally (if applicable):
|
Additionally (if applicable):
|
||||||
- [ ] I have run a bad blocks check, by clicking the "bad blocks" check box in Rufus, and confirmed that my USB is not defective
|
- [ ] I ran a bad blocks check, by clicking the "bad blocks" check box in Rufus, and confirmed that my USB is not defective
|
||||||
- [ ] I have also tried one or more of the following:
|
- [ ] I also tried one or more of the following:
|
||||||
- [ ] Using a different USB drive
|
- [ ] Using a different USB drive
|
||||||
- [ ] Plugging the USB into a different port
|
- [ ] Plugging the USB into a different port
|
||||||
- [ ] Running Rufus on a different computer
|
- [ ] Running Rufus on a different computer
|
||||||
- [ ] If using an ISO image, I have clicked on the `#` button, at the bottom of Rufus, to compute the MD5, SHA1 and SHA256 checksums (which are therefore reported in the log I copied) and confirmed, by performing an internet search, that these values match the ones from the official image.
|
- [ ] If using an ISO image, I clicked on the `#` button (at the bottom of the Rufus interface), to compute the MD5, SHA1 and SHA256 checksums, which are therefore present in the log I copied. I confirmed, by performing an internet search, that these values match the ones from the official image.
|
||||||
|
|
||||||
Issue description
|
Issue description
|
||||||
-----------------
|
-----------------
|
||||||
<Describe your issue here>
|
<Please describe your issue here>
|
||||||
|
|
||||||
Log
|
Log
|
||||||
---
|
---
|
||||||
|
|
18
src/rufus.c
18
src/rufus.c
|
@ -2050,11 +2050,12 @@ void SaveVHD(void)
|
||||||
/*
|
/*
|
||||||
* Main dialog callback
|
* Main dialog callback
|
||||||
*/
|
*/
|
||||||
|
#define PROCESS_QUEUED_EVENTS if (queued_hotplug_event) SendMessage(hDlg, UM_MEDIA_CHANGE, 0, 0)
|
||||||
static INT_PTR CALLBACK MainCallback(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
static INT_PTR CALLBACK MainCallback(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
static DWORD DeviceNum = 0;
|
static DWORD DeviceNum = 0;
|
||||||
static uint64_t LastRefresh = 0;
|
static uint64_t LastRefresh = 0;
|
||||||
static BOOL first_log_display = TRUE, isMarquee = FALSE;
|
static BOOL first_log_display = TRUE, isMarquee = FALSE, queued_hotplug_event = FALSE;
|
||||||
static ULONG ulRegister = 0;
|
static ULONG ulRegister = 0;
|
||||||
static LPITEMIDLIST pidlDesktop = NULL;
|
static LPITEMIDLIST pidlDesktop = NULL;
|
||||||
static MY_SHChangeNotifyEntry NotifyEntry;
|
static MY_SHChangeNotifyEntry NotifyEntry;
|
||||||
|
@ -2096,8 +2097,13 @@ static INT_PTR CALLBACK MainCallback(HWND hDlg, UINT message, WPARAM wParam, LPA
|
||||||
case DBT_CUSTOMEVENT: // Sent by our timer refresh function or for card reader media change
|
case DBT_CUSTOMEVENT: // Sent by our timer refresh function or for card reader media change
|
||||||
LastRefresh = _GetTickCount64();
|
LastRefresh = _GetTickCount64();
|
||||||
KillTimer(hMainDialog, TID_REFRESH_TIMER);
|
KillTimer(hMainDialog, TID_REFRESH_TIMER);
|
||||||
GetDevices((DWORD)ComboBox_GetItemData(hDeviceList, ComboBox_GetCurSel(hDeviceList)));
|
if (!format_op_in_progress) {
|
||||||
user_changed_label = FALSE;
|
queued_hotplug_event = FALSE;
|
||||||
|
GetDevices((DWORD)ComboBox_GetItemData(hDeviceList, ComboBox_GetCurSel(hDeviceList)));
|
||||||
|
user_changed_label = FALSE;
|
||||||
|
} else {
|
||||||
|
queued_hotplug_event = TRUE;
|
||||||
|
}
|
||||||
return (INT_PTR)TRUE;
|
return (INT_PTR)TRUE;
|
||||||
case DBT_DEVNODES_CHANGED:
|
case DBT_DEVNODES_CHANGED:
|
||||||
// If it's been more than a second since last device refresh, arm a refresh timer
|
// If it's been more than a second since last device refresh, arm a refresh timer
|
||||||
|
@ -2455,6 +2461,7 @@ static INT_PTR CALLBACK MainCallback(HWND hDlg, UINT message, WPARAM wParam, LPA
|
||||||
if (!zero_drive) {
|
if (!zero_drive) {
|
||||||
if ((IsChecked(IDC_BOOT)) && (!BootCheck())) {
|
if ((IsChecked(IDC_BOOT)) && (!BootCheck())) {
|
||||||
format_op_in_progress = FALSE;
|
format_op_in_progress = FALSE;
|
||||||
|
PROCESS_QUEUED_EVENTS;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2482,6 +2489,7 @@ static INT_PTR CALLBACK MainCallback(HWND hDlg, UINT message, WPARAM wParam, LPA
|
||||||
lmprintf(MSG_276, iso_image), lmprintf(MSG_277, dd_image));
|
lmprintf(MSG_276, iso_image), lmprintf(MSG_277, dd_image));
|
||||||
if (i < 0) { // Cancel
|
if (i < 0) { // Cancel
|
||||||
format_op_in_progress = FALSE;
|
format_op_in_progress = FALSE;
|
||||||
|
PROCESS_QUEUED_EVENTS;
|
||||||
break;
|
break;
|
||||||
} else if (i == 2) {
|
} else if (i == 2) {
|
||||||
selection_default = BT_IMG;
|
selection_default = BT_IMG;
|
||||||
|
@ -2495,18 +2503,21 @@ static INT_PTR CALLBACK MainCallback(HWND hDlg, UINT message, WPARAM wParam, LPA
|
||||||
APPLICATION_NAME, MB_OKCANCEL|MB_ICONWARNING|MB_IS_RTL, selected_langid) == IDCANCEL) {
|
APPLICATION_NAME, MB_OKCANCEL|MB_ICONWARNING|MB_IS_RTL, selected_langid) == IDCANCEL) {
|
||||||
format_op_in_progress = FALSE;
|
format_op_in_progress = FALSE;
|
||||||
zero_drive = FALSE;
|
zero_drive = FALSE;
|
||||||
|
PROCESS_QUEUED_EVENTS;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if ((SelectedDrive.nPartitions > 1) && (MessageBoxExU(hMainDialog, lmprintf(MSG_093),
|
if ((SelectedDrive.nPartitions > 1) && (MessageBoxExU(hMainDialog, lmprintf(MSG_093),
|
||||||
lmprintf(MSG_094), MB_OKCANCEL|MB_ICONWARNING|MB_IS_RTL, selected_langid) == IDCANCEL)) {
|
lmprintf(MSG_094), MB_OKCANCEL|MB_ICONWARNING|MB_IS_RTL, selected_langid) == IDCANCEL)) {
|
||||||
format_op_in_progress = FALSE;
|
format_op_in_progress = FALSE;
|
||||||
zero_drive = FALSE;
|
zero_drive = FALSE;
|
||||||
|
PROCESS_QUEUED_EVENTS;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if ((!zero_drive) && (IsChecked(IDC_BOOT)) && (SelectedDrive.SectorSize != 512) &&
|
if ((!zero_drive) && (IsChecked(IDC_BOOT)) && (SelectedDrive.SectorSize != 512) &&
|
||||||
(MessageBoxExU(hMainDialog, lmprintf(MSG_196, SelectedDrive.SectorSize),
|
(MessageBoxExU(hMainDialog, lmprintf(MSG_196, SelectedDrive.SectorSize),
|
||||||
lmprintf(MSG_197), MB_OKCANCEL|MB_ICONWARNING|MB_IS_RTL, selected_langid) == IDCANCEL)) {
|
lmprintf(MSG_197), MB_OKCANCEL|MB_ICONWARNING|MB_IS_RTL, selected_langid) == IDCANCEL)) {
|
||||||
format_op_in_progress = FALSE;
|
format_op_in_progress = FALSE;
|
||||||
|
PROCESS_QUEUED_EVENTS;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2530,6 +2541,7 @@ static INT_PTR CALLBACK MainCallback(HWND hDlg, UINT message, WPARAM wParam, LPA
|
||||||
if (format_thid == NULL) {
|
if (format_thid == NULL) {
|
||||||
format_op_in_progress = FALSE;
|
format_op_in_progress = FALSE;
|
||||||
zero_drive = FALSE;
|
zero_drive = FALSE;
|
||||||
|
PROCESS_QUEUED_EVENTS;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case IDC_HASH:
|
case IDC_HASH:
|
||||||
|
|
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.10.967"
|
CAPTION "Rufus 2.10.968"
|
||||||
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
|
||||||
|
@ -320,8 +320,8 @@ END
|
||||||
//
|
//
|
||||||
|
|
||||||
VS_VERSION_INFO VERSIONINFO
|
VS_VERSION_INFO VERSIONINFO
|
||||||
FILEVERSION 2,10,967,0
|
FILEVERSION 2,10,968,0
|
||||||
PRODUCTVERSION 2,10,967,0
|
PRODUCTVERSION 2,10,968,0
|
||||||
FILEFLAGSMASK 0x3fL
|
FILEFLAGSMASK 0x3fL
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
FILEFLAGS 0x1L
|
FILEFLAGS 0x1L
|
||||||
|
@ -338,13 +338,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.10.967"
|
VALUE "FileVersion", "2.10.968"
|
||||||
VALUE "InternalName", "Rufus"
|
VALUE "InternalName", "Rufus"
|
||||||
VALUE "LegalCopyright", "© 2011-2016 Pete Batard (GPL v3)"
|
VALUE "LegalCopyright", "© 2011-2016 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.10.967"
|
VALUE "ProductVersion", "2.10.968"
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
BLOCK "VarFileInfo"
|
BLOCK "VarFileInfo"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue