mirror of
https://github.com/pbatard/rufus.git
synced 2024-08-14 23:57:05 +00:00
[loc] fix a crash on exit
* Don't free loc_filename if it points to embedded name * Also fix resizing of main dialog
This commit is contained in:
parent
ff28e2027c
commit
4e840a6995
3 changed files with 12 additions and 9 deletions
|
@ -131,6 +131,7 @@ void init_localization(void) {
|
|||
void exit_localization(void) {
|
||||
free_dialog_list();
|
||||
free_locale_list();
|
||||
if (loc_filename != embedded_loc_filename)
|
||||
safe_free(loc_filename);
|
||||
}
|
||||
|
||||
|
@ -240,6 +241,8 @@ void apply_localization(int dlg_id, HWND hDlg)
|
|||
continue;
|
||||
}
|
||||
hCtrl = hDlg;
|
||||
if (dlg_id == IDD_DIALOG)
|
||||
hDlg = NULL;
|
||||
} else {
|
||||
hCtrl = GetDlgItem(hDlg, lcmd->ctrl_id);
|
||||
}
|
||||
|
|
10
src/rufus.rc
10
src/rufus.rc
|
@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
|
|||
IDD_DIALOG DIALOGEX 12, 12, 206, 329
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
EXSTYLE WS_EX_APPWINDOW
|
||||
CAPTION "Rufus v1.4.0.284"
|
||||
CAPTION "Rufus v1.4.0.285"
|
||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "Start",IDC_START,94,291,50,14
|
||||
|
@ -284,8 +284,8 @@ END
|
|||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 1,4,0,284
|
||||
PRODUCTVERSION 1,4,0,284
|
||||
FILEVERSION 1,4,0,285
|
||||
PRODUCTVERSION 1,4,0,285
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
|
@ -302,13 +302,13 @@ BEGIN
|
|||
BEGIN
|
||||
VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)"
|
||||
VALUE "FileDescription", "Rufus"
|
||||
VALUE "FileVersion", "1.4.0.284"
|
||||
VALUE "FileVersion", "1.4.0.285"
|
||||
VALUE "InternalName", "Rufus"
|
||||
VALUE "LegalCopyright", "© 2011-2013 Pete Batard (GPL v3)"
|
||||
VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html"
|
||||
VALUE "OriginalFilename", "rufus.exe"
|
||||
VALUE "ProductName", "Rufus"
|
||||
VALUE "ProductVersion", "1.4.0.284"
|
||||
VALUE "ProductVersion", "1.4.0.285"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
|
|
@ -466,12 +466,12 @@ void ResizeMoveCtrl(HWND hDlg, HWND hCtrl, int dx, int dy, int dw, int dh)
|
|||
GetWindowRect(hCtrl, &rect);
|
||||
point.x = rect.left;
|
||||
point.y = rect.top;
|
||||
ScreenToClient((hDlg==hMainDialog)?hDlg:NULL, &point);
|
||||
ScreenToClient(hDlg, &point);
|
||||
GetClientRect(hCtrl, &rect);
|
||||
|
||||
// If we're dealing with a dialog, we must take the border into account
|
||||
if (hCtrl == hDlg)
|
||||
border = GetBorderSize(hDlg);
|
||||
if ((hCtrl == hDlg) || (hDlg == NULL))
|
||||
border = GetBorderSize(hCtrl);
|
||||
MoveWindow(hCtrl, point.x + (int)(fScale*(float)dx), point.y + (int)(fScale*(float)dy),
|
||||
(rect.right - rect.left) + (int)(fScale*(float)dw + border.cx),
|
||||
(rect.bottom - rect.top) + border.cy, TRUE);
|
||||
|
|
Loading…
Reference in a new issue