[loc] add support for right-to-left languages

* Closes #192
This commit is contained in:
Pete Batard 2014-01-24 02:46:06 +00:00
parent ba9cadd2e6
commit 8ae158ba22
11 changed files with 344 additions and 75 deletions

View File

@ -430,6 +430,61 @@ t MSG_259 "Force update"
############################# TRANSLATOR END COPY ##############################
################################################################################
l "ar-AR" "Arabic (العربية)" 0x0401
a "ra"
v 1.0.8
b "en-US"
g IDD_DIALOG
t IDS_DEVICE_TXT "جهاز"
t IDS_PARTITION_TYPE_TXT "نوع مخطط التقسيم وهدف النظام"
t IDS_FILESYSTEM_TXT "نظام الملفات"
t IDS_CLUSTERSIZE_TXT "حجم الكتلة"
t IDS_LABEL_TXT "تسمية وحدة التخزين الجديدة"
t IDS_FORMAT_OPTIONS_GRP "خيارات تنسيق "
m IDC_ADVANCED -8,0
t IDC_BADBLOCKS "تحقق الجهاز لكتل سيئة:"
t IDC_QUICKFORMAT "تهيئة سريعة"
t IDC_BOOT "إنشاء قرص تمهيد باستخدام:"
t IDC_SET_ICON "إنشاء التسمية ورمز ملفات موسعة"
t IDC_ABOUT "حول ..."
t IDC_LOG "ثقيل"
t IDCANCEL "قريب"
t IDC_START "إقلاع"
t IDS_ADVANCED_OPTIONS_GRP "خيارات متقدمة"
t IDC_ENABLE_FIXED_DISKS "محركات الأقراص الصلبة USB قائمة"
t IDC_EXTRA_PARTITION "إصلاحات BIOS القديمة"
t IDC_RUFUS_MBR "استخدام روفوس MBR مع BIOS ID:"
# About dialog
g IDD_ABOUTBOX
t IDD_ABOUTBOX "حول Rufus"
t IDC_ABOUT_LICENSE "ترخيص"
t IDC_ABOUT_UPDATES "تحديثات"
t IDOK "حسنا"
t MSG_003 "تحذير: كل البيانات على الجهاز '%s' سيتم تدمير. \n"
"الاستمرار في هذه العملية، انقر فوق موافق. لإنهاء انقر فوق إلغاء الأمر."
t MSG_026 "بايت"
t MSG_027 "كيلو بايت"
t MSG_028 "ميغابايت"
t MSG_030 "%s (الافتراضي)"
t MSG_034 "%d يمر"
t MSG_035 "%d تمريرات"
t MSG_109 "0x%02X (أسطوانة %d)"
# The following will appear in the about dialog
t MSG_174 "Rufus وموثوق USB تنسيق المساعدة"
t MSG_175 "الإصدار‏ %d.%d.%d (Build %d)"
t MSG_176 "ترجمة: هارون الرشيد <mailto:pete@akeo.ie>"
t MSG_177 "البق تقرير أو طلب تعزيزات في:"
t MSG_178 "حقوق الطبع والنشر إضافية:"
t MSG_208 "%d جهاز تم العثور عليه"
t MSG_209 "%d الأجهزة الموجودة"
t MSG_210 "منجز"
t MSG_211 "ألغي"
t MSG_212 "فشل"
################################################################################
l "zh-CN" "Chinese Simplified (简体中文)" 0x0804, 0x1004

View File

@ -1288,7 +1288,7 @@ DWORD WINAPI FormatThread(LPVOID param)
lt.wYear, lt.wMonth, lt.wDay, lt.wHour, lt.wMinute, lt.wSecond);
fclose(log_fd);
r = MessageBoxU(hMainDialog, lmprintf(MSG_012, bb_msg, logfile),
lmprintf(MSG_010), MB_ABORTRETRYIGNORE|MB_ICONWARNING);
lmprintf(MSG_010), MB_ABORTRETRYIGNORE|MB_ICONWARNING|MB_IS_RTL);
} else {
// We didn't get any errors => delete the log file
fclose(log_fd);

View File

@ -1,7 +1,7 @@
/*
* Rufus: The Reliable USB Formatting Utility
* Localization functions, a.k.a. "Everybody is doing it wrong but me!"
* Copyright © 2013 Pete Batard <pete@akeo.ie>
* Copyright © 2013-2014 Pete Batard <pete@akeo.ie>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -61,9 +61,8 @@ const loc_parse parse_cmd[9] = {
// Set the font to use for the text controls that follow
// Use f "Default" 0 to reset the font
{ 'f', LC_FONT, "si" }, // f "MS Dialog" 10
// Set the direction to use for the text controls that follow
// 0 = Left to right, 1 = Right to left
{ 'd', LC_DIRECTION, "i" }, // d 1 // TODO: NOT IMPLEMENTED YET
// Set translations attributes such as right-to-left, numerals to use, etc
{ 'a', LC_ATTRIBUTES, "s" }, // a "ra"
};
/* Globals */
@ -459,8 +458,6 @@ void apply_localization(int dlg_id, HWND hDlg)
loc_cmd* lcmd;
HWND hCtrl = NULL;
int id_start = IDD_DIALOG, id_end = IDD_DIALOG + ARRAYSIZE(loc_dlg);
LONG_PTR style;
BOOL left_to_right = FALSE;
if ((dlg_id >= id_start) && (dlg_id < id_end)) {
// If we have a valid dialog_id, just process that one dialog
@ -502,12 +499,6 @@ void apply_localization(int dlg_id, HWND hDlg)
if (hCtrl != NULL) {
if ((lcmd->txt[1] != NULL) && (lcmd->txt[1][0] != 0))
SetWindowTextU(hCtrl, lcmd->txt[1]);
if (left_to_right) {
style = GetWindowLongPtr(hCtrl, GWL_EXSTYLE);
style |= WS_EX_LAYOUTRTL; // TODO: WS_EX_RIGHT | WS_EX_RTLREADING
SetWindowLongPtr(hCtrl, GWL_EXSTYLE, style);
InvalidateRect(hCtrl, NULL, TRUE);
}
}
break;
case LC_MOVE:

View File

@ -1,7 +1,7 @@
/*
* Rufus: The Reliable USB Formatting Utility
* Localization functions, a.k.a. "Everybody is doing it wrong but me!"
* Copyright © 2013 Pete Batard <pete@akeo.ie>
* Copyright © 2013-2014 Pete Batard <pete@akeo.ie>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -24,9 +24,14 @@
// Number of concurrent localization messages (i.e. messages we can concurrently
// reference at the same time). Must be a power of 2.
#define LOC_MESSAGE_NB 8
#define LOC_MESSAGE_SIZE 2048
#define LOC_HTAB_SIZE 1031 // Using a prime speeds up the hash table init
#define LOC_MESSAGE_NB 8
#define LOC_MESSAGE_SIZE 2048
#define LOC_HTAB_SIZE 1031 // Using a prime speeds up the hash table init
// Attributes that can be set by a translation
#define LOC_RIGHT_TO_LEFT 0x00000001
#define LOC_ARABIC_NUMERALS 0x00000002
#define LOC_JAPANESE_NUMERALS 0x00000004
// The [v]ersion major from a translation must match this number or
// the translation will be ignored
@ -113,14 +118,14 @@ enum loc_command_type {
LC_LOCALE,
LC_BASE,
LC_FONT,
LC_DIRECTION,
LC_ATTRIBUTES,
};
typedef struct loc_cmd_struct {
uint8_t command;
uint8_t unum_size;
uint16_t line_nr;
int ctrl_id;
int ctrl_id; // Also used as the attributes mask
int32_t num[2];
uint32_t* unum;
char* txt[2];

View File

@ -374,7 +374,7 @@ out:
PrintStatus(0, FALSE, MSG_242);
SetLastError(error_code);
MessageBoxU(hMainDialog, IS_ERROR(FormatStatus)?StrError(FormatStatus, FALSE):WinInetErrorString(),
lmprintf(MSG_044), MB_OK|MB_ICONERROR);
lmprintf(MSG_044), MB_OK|MB_ICONERROR|MB_IS_RTL);
}
if (hRequest) InternetCloseHandle(hRequest);
if (hConnection) InternetCloseHandle(hConnection);

View File

@ -1,7 +1,7 @@
/*
* Rufus: The Reliable USB Formatting Utility
* Elementary Unicode compliant find/replace parser
* Copyright © 2012-2013 Pete Batard <pete@akeo.ie>
* Copyright © 2012-2014 Pete Batard <pete@akeo.ie>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -38,6 +38,12 @@
static const char space[] = " \t";
static const wchar_t wspace[] = L" \t";
const struct {char c; int flag;} attr_parse[] = {
{ 'r', LOC_RIGHT_TO_LEFT },
{ 'a', LOC_ARABIC_NUMERALS },
{ 'j', LOC_JAPANESE_NUMERALS },
};
/*
* Fill a localization command buffer by parsing the line arguments
* The command is allocated and must be freed (by calling free_loc_cmd)
@ -61,8 +67,8 @@ static loc_cmd* get_loc_cmd(char c, char* line) {
luprint("could not allocate command");
return NULL;
}
lcmd->ctrl_id = -1;
lcmd->command = parse_cmd[j].cmd;
lcmd->ctrl_id = (lcmd->command <= LC_TEXT)?-1:0;
lcmd->line_nr = (uint16_t)loc_line_nr;
i = 0;
@ -231,7 +237,7 @@ BOOL get_supported_locales(const char* filename)
FILE* fd = NULL;
BOOL r = FALSE;
char line[1024];
size_t i;
size_t i, j, k;
loc_cmd *lcmd = NULL, *last_lcmd = NULL;
long end_of_block;
int version_line_nr = 0;
@ -270,11 +276,11 @@ BOOL get_supported_locales(const char* filename)
loc_line_nr++;
// Skip leading spaces
i = strspn(line, space);
if ((line[i] != 'l') && (line[i] != 'v'))
if ((line[i] != 'l') && (line[i] != 'v') && (line[i] != 'a'))
continue;
// line[i] is not NUL so i+1 is safe to access
lcmd = get_loc_cmd(line[i], &line[i+1]);
if ((lcmd == NULL) || ((lcmd->command != LC_LOCALE) && (lcmd->command != LC_VERSION))) {
if ((lcmd == NULL) || ((lcmd->command != LC_LOCALE) && (lcmd->command != LC_VERSION) && (lcmd->command != LC_ATTRIBUTES))) {
free_loc_cmd(lcmd);
continue;
}
@ -297,6 +303,23 @@ BOOL get_supported_locales(const char* filename)
last_lcmd = lcmd;
version_line_nr = 0;
break;
case LC_ATTRIBUTES:
if (last_lcmd == NULL) {
luprint("[a]ttributes cannot precede [l]ocale");
}
for(j=0; lcmd->txt[0][j] != 0; j++) {
for (k=0; k<ARRAYSIZE(attr_parse); k++) {
if (attr_parse[k].c == lcmd->txt[0][j]) {
// Repurpose ctrl_id as an attributes mask
last_lcmd->ctrl_id |= attr_parse[k].flag;
break;
}
}
if (k >= ARRAYSIZE(attr_parse))
luprintf("unknown attribute '%c' - ignored", lcmd->txt[0][j]);
}
free_loc_cmd(lcmd);
break;
case LC_VERSION:
if (version_line_nr != 0) {
luprintf("[v]ersion was already provided at line %d", version_line_nr);

View File

@ -13,6 +13,14 @@
#define IDI_ICON 110
#define IDI_UP 111
#define IDI_DOWN 112
#define RTL_IDD_DIALOG 201
#define RTL_IDD_ABOUTBOX 202
#define RTL_IDD_NOTIFICATION 203
#define RTL_IDD_LICENSE 204
#define RTL_IDD_ISO_EXTRACT 205
#define RTL_IDD_LOG 206
#define RTL_IDD_UPDATE_POLICY 207
#define RTL_IDD_NEW_VERSION 208
#define IDR_FD_COMMAND_COM 300
#define IDR_FD_KERNEL_SYS 301
#define IDR_FD_DISPLAY_EXE 302

View File

@ -138,7 +138,7 @@ uint32_t dur_mins, dur_secs;
HWND hDeviceList, hPartitionScheme, hFileSystem, hClusterSize, hLabel, hBootType, hNBPasses, hLog = NULL;
HWND hISOProgressDlg = NULL, hLogDlg = NULL, hISOProgressBar, hISOFileName, hDiskID;
BOOL use_own_c32[NB_OLD_C32] = {FALSE, FALSE}, detect_fakes = TRUE, mbr_selected_by_user = FALSE;
BOOL iso_op_in_progress = FALSE, format_op_in_progress = FALSE;
BOOL iso_op_in_progress = FALSE, format_op_in_progress = FALSE, right_to_left_mode = FALSE;
BOOL enable_HDDs = FALSE, advanced_mode = TRUE, force_update = FALSE;
int dialog_showing = 0;
uint16_t rufus_version[4], embedded_sl_version[2];
@ -199,7 +199,7 @@ static BOOL DefineClusterSizes(void)
LONGLONG i;
int fs;
BOOL r = FALSE;
char tmp[64] = "", *entry;
char tmp[128] = "", *entry;
default_fs = FS_UNKNOWN;
memset(&SelectedDrive.ClusterSize, 0, sizeof(SelectedDrive.ClusterSize));
@ -839,6 +839,8 @@ static BOOL GetUSBDevices(DWORD devnum)
for (k=0; drive_letters[k]; k++) {
// Append all the drive letters we detected
letter_name[2] = drive_letters[k];
if (right_to_left_mode)
safe_strcat(entry_msg, sizeof(entry_msg), RIGHT_TO_LEFT_MARK);
safe_strcat(entry_msg, sizeof(entry_msg), letter_name);
if (drive_letters[k] == app_dir[0]) break;
}
@ -1122,10 +1124,10 @@ static void CALLBACK BlockingTimer(HWND hWnd, UINT uMsg, UINT_PTR idEvent, DWORD
uprintf("Killed blocking I/O timer\n");
} else if(!user_notified) {
if (last_iso_blocking_status == iso_blocking_status) {
// A write or close operation hasn't made any progress since our last check
user_notified = TRUE;
uprintf("Blocking I/O operation detected\n");
MessageBoxU(hMainDialog, lmprintf(MSG_080), lmprintf(MSG_048), MB_OK|MB_ICONINFORMATION);
// A write or close operation hasn't made any progress since our last check
user_notified = TRUE;
uprintf("Blocking I/O operation detected\n");
MessageBoxU(hMainDialog, lmprintf(MSG_080), lmprintf(MSG_048), MB_OK|MB_ICONINFORMATION|MB_IS_RTL);
} else {
last_iso_blocking_status = iso_blocking_status;
}
@ -1216,7 +1218,7 @@ DWORD WINAPI ISOScanThread(LPVOID param)
}
if ( (!iso_report.has_bootmgr) && (!HAS_SYSLINUX(iso_report)) && (!IS_WINPE(iso_report.winpe))
&& (!iso_report.has_efi) && (!IS_REACTOS(iso_report)) ) {
MessageBoxU(hMainDialog, lmprintf(MSG_082), lmprintf(MSG_081), MB_OK|MB_ICONINFORMATION);
MessageBoxU(hMainDialog, lmprintf(MSG_082), lmprintf(MSG_081), MB_OK|MB_ICONINFORMATION|MB_IS_RTL);
safe_free(iso_path);
SetMBRProps();
} else if (HAS_SYSLINUX(iso_report)) {
@ -1233,7 +1235,7 @@ DWORD WINAPI ISOScanThread(LPVOID param)
} else {
PrintStatus(0, FALSE, MSG_204, old_c32_name[i]);
if (MessageBoxU(hMainDialog, lmprintf(MSG_084, old_c32_name[i], old_c32_name[i]),
lmprintf(MSG_083, old_c32_name[i]), MB_YESNO|MB_ICONWARNING) == IDYES) {
lmprintf(MSG_083, old_c32_name[i]), MB_YESNO|MB_ICONWARNING|MB_IS_RTL) == IDYES) {
SetWindowTextU(hISOProgressDlg, lmprintf(MSG_085, old_c32_name[i]));
SetWindowTextU(hISOFileName, new_c32_url[i]);
if (DownloadFile(new_c32_url[i], old_c32_name[i], hISOProgressDlg))
@ -1350,12 +1352,12 @@ static BOOL BootCheck(void)
if (dt == DT_ISO) {
if (iso_path == NULL) {
// Please click on the disc button to select a bootable ISO
MessageBoxU(hMainDialog, lmprintf(MSG_087), lmprintf(MSG_086), MB_OK|MB_ICONERROR);
MessageBoxU(hMainDialog, lmprintf(MSG_087), lmprintf(MSG_086), MB_OK|MB_ICONERROR|MB_IS_RTL);
return FALSE;
}
if ((size_check) && (iso_report.projected_size > (uint64_t)SelectedDrive.DiskSize)) {
// This ISO image is too big for the selected target
MessageBoxU(hMainDialog, lmprintf(MSG_089), lmprintf(MSG_088), MB_OK|MB_ICONERROR);
MessageBoxU(hMainDialog, lmprintf(MSG_089), lmprintf(MSG_088), MB_OK|MB_ICONERROR|MB_IS_RTL);
return FALSE;
}
fs = (int)ComboBox_GetItemData(hFileSystem, ComboBox_GetCurSel(hFileSystem));
@ -1363,32 +1365,32 @@ static BOOL BootCheck(void)
if (bt == BT_UEFI) {
if (!IS_EFI(iso_report)) {
// Unsupported ISO
MessageBoxU(hMainDialog, lmprintf(MSG_091), lmprintf(MSG_090), MB_OK|MB_ICONERROR);
MessageBoxU(hMainDialog, lmprintf(MSG_091), lmprintf(MSG_090), MB_OK|MB_ICONERROR|MB_IS_RTL);
return FALSE;
}
if ((iso_report.has_win7_efi) && (!WimExtractCheck())) {
// Your platform cannot extract files from WIM archives => download 7-zip?
if (MessageBoxU(hMainDialog, lmprintf(MSG_102), lmprintf(MSG_101), MB_YESNO|MB_ICONERROR) == IDYES)
if (MessageBoxU(hMainDialog, lmprintf(MSG_102), lmprintf(MSG_101), MB_YESNO|MB_ICONERROR|MB_IS_RTL) == IDYES)
ShellExecuteA(hMainDialog, "open", SEVENZIP_URL, NULL, NULL, SW_SHOWNORMAL);
return FALSE;
}
} else if ((fs == FS_NTFS) && (!iso_report.has_bootmgr) && (!IS_WINPE(iso_report.winpe))) {
if (HAS_SYSLINUX(iso_report)) {
// Only FAT/FAT32 is supported for this type of ISO
MessageBoxU(hMainDialog, lmprintf(MSG_096), lmprintf(MSG_092), MB_OK|MB_ICONERROR);
MessageBoxU(hMainDialog, lmprintf(MSG_096), lmprintf(MSG_092), MB_OK|MB_ICONERROR|MB_IS_RTL);
} else {
// Only 'bootmgr' or 'WinPE' based ISO images can currently be used with NTFS
MessageBoxU(hMainDialog, lmprintf(MSG_097), lmprintf(MSG_090), MB_OK|MB_ICONERROR);
MessageBoxU(hMainDialog, lmprintf(MSG_097), lmprintf(MSG_090), MB_OK|MB_ICONERROR|MB_IS_RTL);
}
return FALSE;
} else if (((fs == FS_FAT16)||(fs == FS_FAT32)) && (!HAS_SYSLINUX(iso_report)) && (!IS_REACTOS(iso_report))) {
// FAT/FAT32 can only be used for isolinux based ISO images or when the Target Type is UEFI
MessageBoxU(hMainDialog, lmprintf(MSG_098), lmprintf(MSG_090), MB_OK|MB_ICONERROR);
MessageBoxU(hMainDialog, lmprintf(MSG_098), lmprintf(MSG_090), MB_OK|MB_ICONERROR|MB_IS_RTL);
return FALSE;
}
if (((fs == FS_FAT16)||(fs == FS_FAT32)) && (iso_report.has_4GB_file)) {
// This ISO image contains a file larger than 4GB file (FAT32)
MessageBoxU(hMainDialog, lmprintf(MSG_100), lmprintf(MSG_099), MB_OK|MB_ICONERROR);
MessageBoxU(hMainDialog, lmprintf(MSG_100), lmprintf(MSG_099), MB_OK|MB_ICONERROR|MB_IS_RTL);
return FALSE;
}
if ((SL_MAJOR(iso_report.sl_version) >= 5) && (iso_report.sl_version != embedded_sl_version[1])) {
@ -1411,7 +1413,7 @@ static BOOL BootCheck(void)
ldlinux, ldlinux_ext[0], ldlinux, ldlinux_ext[1], FILES_DIR, syslinux, &iso_report.sl_version_str[1]);
} else {
r = MessageBoxU(hMainDialog, lmprintf(MSG_114, iso_report.sl_version_str, embedded_sl_version_str[1]),
lmprintf(MSG_115), MB_YESNO|MB_ICONWARNING);
lmprintf(MSG_115), MB_YESNO|MB_ICONWARNING|MB_IS_RTL);
if (r != IDYES)
return FALSE;
for (i=0; i<2; i++) {
@ -1443,7 +1445,7 @@ static BOOL BootCheck(void)
PrintStatus(0, FALSE, MSG_206, tmp);
// MSG_104: "Syslinux v5.0 or later requires a '%s' file to be installed"
r = MessageBoxU(hMainDialog, lmprintf(MSG_104, tmp, tmp),
lmprintf(MSG_103, tmp), MB_YESNOCANCEL|MB_ICONWARNING);
lmprintf(MSG_103, tmp), MB_YESNOCANCEL|MB_ICONWARNING|MB_IS_RTL);
if (r == IDCANCEL)
return FALSE;
if (r == IDYES) {
@ -1458,7 +1460,7 @@ static BOOL BootCheck(void)
} else if (dt == DT_WINME) {
if ((size_check) && (ComboBox_GetItemData(hClusterSize, ComboBox_GetCurSel(hClusterSize)) >= 65536)) {
// MS-DOS cannot boot from a drive using a 64 kilobytes Cluster size
MessageBoxU(hMainDialog, lmprintf(MSG_110), lmprintf(MSG_111), MB_OK|MB_ICONERROR);
MessageBoxU(hMainDialog, lmprintf(MSG_110), lmprintf(MSG_111), MB_OK|MB_ICONERROR|MB_IS_RTL);
return FALSE;
}
}
@ -1643,11 +1645,24 @@ void ShowLanguageMenu(HWND hDlg)
POINT pt;
HMENU menu;
loc_cmd* lcmd = NULL;
UM_LANGUAGE_MENU_MAX = UM_LANGUAGE_MENU;
char lang[256];
char *search = "()";
char *l, *r, *dup;
UM_LANGUAGE_MENU_MAX = UM_LANGUAGE_MENU;
menu = CreatePopupMenu();
list_for_each_entry(lcmd, &locale_list, loc_cmd, list) {
InsertMenuU(menu, -1, MF_BYPOSITION|((selected_locale == lcmd)?MF_CHECKED:0), UM_LANGUAGE_MENU_MAX++, lcmd->txt[1]);
// The appearance of LTR languages must be fixed for RTL menus
if ((right_to_left_mode) && (!(lcmd->ctrl_id & LOC_RIGHT_TO_LEFT))) {
dup = safe_strdup(lcmd->txt[1]);
l = strtok(dup, search);
r = strtok(NULL, search);
static_sprintf(lang, LEFT_TO_RIGHT_MARK "(%s) " LEFT_TO_RIGHT_MARK "%s", r, l);
safe_free(dup);
} else {
safe_strcpy(lang, sizeof(lang), lcmd->txt[1]);
}
InsertMenuU(menu, -1, MF_BYPOSITION|((selected_locale == lcmd)?MF_CHECKED:0), UM_LANGUAGE_MENU_MAX++, lang);
}
SetForegroundWindow(hDlg);
@ -1721,7 +1736,7 @@ static INT_PTR CALLBACK MainCallback(HWND hDlg, UINT message, WPARAM wParam, LPA
// Create the log window (hidden)
first_log_display = TRUE;
log_displayed = FALSE;
hLogDlg = CreateDialogW(hMainInstance, MAKEINTRESOURCEW(IDD_LOG), hDlg, (DLGPROC)LogProc);
hLogDlg = CreateDialogW(hMainInstance, MAKEINTRESOURCEW(IDD_LOG + IDD_IS_RTL), hDlg, (DLGPROC)LogProc);
InitDialog(hDlg);
GetUSBDevices(0);
CheckForUpdates(FALSE);
@ -1780,7 +1795,7 @@ static INT_PTR CALLBACK MainCallback(HWND hDlg, UINT message, WPARAM wParam, LPA
EnableWindow(GetDlgItem(hDlg, IDCANCEL), FALSE);
if (format_thid != NULL) {
if (MessageBoxU(hMainDialog, lmprintf(MSG_105), lmprintf(MSG_049),
MB_YESNO|MB_ICONWARNING) == IDYES) {
MB_YESNO|MB_ICONWARNING|MB_IS_RTL) == IDYES) {
// Operation may have completed in the meantime
if (format_thid != NULL) {
FormatStatus = ERROR_SEVERITY_ERROR|FAC(FACILITY_STORAGE)|ERROR_CANCELLED;
@ -1812,21 +1827,32 @@ static INT_PTR CALLBACK MainCallback(HWND hDlg, UINT message, WPARAM wParam, LPA
CreateAboutBox();
break;
case IDC_LOG:
// Place the log Window to the right of our dialog on first display
// Place the log Window to the right (or left for RTL) of our dialog on first display
if (first_log_display) {
GetClientRect(GetDesktopWindow(), &DesktopRect);
GetWindowRect(hLogDlg, &DialogRect);
nWidth = DialogRect.right - DialogRect.left;
nHeight = DialogRect.bottom - DialogRect.top;
GetWindowRect(hDlg, &DialogRect);
Point.x = min(DialogRect.right + GetSystemMetrics(SM_CXSIZEFRAME)+(int)(2.0f * fScale), DesktopRect.right - nWidth);
if (right_to_left_mode)
Point.x = max(DialogRect.left - GetSystemMetrics(SM_CXSIZEFRAME)-(int)(2.0f * fScale) - nWidth, 0);
else
Point.x = min(DialogRect.right + GetSystemMetrics(SM_CXSIZEFRAME)+(int)(2.0f * fScale), DesktopRect.right - nWidth);
Point.y = max(DialogRect.top, DesktopRect.top - nHeight);
MoveWindow(hLogDlg, Point.x, Point.y, nWidth, nHeight, FALSE);
// The log may have been recentered to fit the screen, in which case, try to shift our main dialog left
// The log may have been recentered to fit the screen, in which case, try to shift our main dialog left (or right for RTL)
nWidth = DialogRect.right - DialogRect.left;
nHeight = DialogRect.bottom - DialogRect.top;
MoveWindow(hDlg, max((DialogRect.left<0)?DialogRect.left:0,
Point.x - nWidth - GetSystemMetrics(SM_CXSIZEFRAME) - (int)(2.0f * fScale)), Point.y, nWidth, nHeight, TRUE);
if (right_to_left_mode) {
Point.x = DialogRect.left;
GetWindowRect(hLogDlg, &DialogRect);
Point.x = max(Point.x, DialogRect.right - DialogRect.left + GetSystemMetrics(SM_CXSIZEFRAME) + (int)(2.0f * fScale));
} else {
Point.x = max((DialogRect.left<0)?DialogRect.left:0,
Point.x - nWidth - GetSystemMetrics(SM_CXSIZEFRAME) - (int)(2.0f * fScale));
}
MoveWindow(hDlg, Point.x, Point.y, nWidth, nHeight, TRUE);
first_log_display = FALSE;
}
// Display the log Window
@ -2037,7 +2063,7 @@ static INT_PTR CALLBACK MainCallback(HWND hDlg, UINT message, WPARAM wParam, LPA
if (dur_secs > UDF_FORMAT_WARN) {
dur_mins = dur_secs/60;
dur_secs -= dur_mins*60;
MessageBoxU(hMainDialog, lmprintf(MSG_112, dur_mins, dur_secs), lmprintf(MSG_113), MB_OK|MB_ICONASTERISK);
MessageBoxU(hMainDialog, lmprintf(MSG_112, dur_mins, dur_secs), lmprintf(MSG_113), MB_OK|MB_ICONASTERISK|MB_IS_RTL);
} else {
dur_secs = 0;
dur_mins = 0;
@ -2046,12 +2072,12 @@ static INT_PTR CALLBACK MainCallback(HWND hDlg, UINT message, WPARAM wParam, LPA
GetWindowTextU(hDeviceList, tmp, ARRAYSIZE(tmp));
if (MessageBoxU(hMainDialog, lmprintf(MSG_003, tmp),
APPLICATION_NAME, MB_OKCANCEL|MB_ICONWARNING) == IDCANCEL) {
APPLICATION_NAME, MB_OKCANCEL|MB_ICONWARNING|MB_IS_RTL) == IDCANCEL) {
format_op_in_progress = FALSE;
break;
}
if ((SelectedDrive.nPartitions > 1) && (MessageBoxU(hMainDialog, lmprintf(MSG_093),
lmprintf(MSG_094), MB_OKCANCEL|MB_ICONWARNING) == IDCANCEL)) {
lmprintf(MSG_094), MB_OKCANCEL|MB_ICONWARNING|MB_IS_RTL) == IDCANCEL)) {
format_op_in_progress = FALSE;
break;
}
@ -2094,7 +2120,7 @@ static INT_PTR CALLBACK MainCallback(HWND hDlg, UINT message, WPARAM wParam, LPA
// You'd think that Windows would let you instantiate a modeless dialog wherever
// but you'd be wrong. It must be done in the main callback, hence the custom message.
if (!IsWindow(hISOProgressDlg)) {
hISOProgressDlg = CreateDialogW(hMainInstance, MAKEINTRESOURCEW(IDD_ISO_EXTRACT),
hISOProgressDlg = CreateDialogW(hMainInstance, MAKEINTRESOURCEW(IDD_ISO_EXTRACT + IDD_IS_RTL),
hDlg, (DLGPROC)ISOProc);
// The window is not visible by default but takes focus => restore it
@ -2307,7 +2333,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine
if ( (!get_supported_locales(loc_file))
|| ((selected_locale = ((locale_name == NULL)?get_locale_from_lcid(lcid, TRUE):get_locale_from_name(locale_name, TRUE))) == NULL) ) {
uprintf("FATAL: Could not access locale!\n");
MessageBoxU(NULL, "The locale data is missing or invalid. This application will now exit.", "Fatal error", MB_ICONSTOP);
MessageBoxU(NULL, "The locale data is missing or invalid. This application will now exit.", "Fatal error", MB_ICONSTOP|MB_IS_RTL);
goto out;
}
@ -2324,7 +2350,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine
if ((mutex == NULL) || (GetLastError() == ERROR_ALREADY_EXISTS)) {
// Load the translation before we print the error
get_loc_data_file(loc_file, selected_locale);
MessageBoxU(NULL, lmprintf(MSG_002), lmprintf(MSG_001), MB_ICONSTOP);
MessageBoxU(NULL, lmprintf(MSG_002), lmprintf(MSG_001), MB_ICONSTOP|MB_IS_RTL);
goto out;
}
@ -2348,6 +2374,8 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine
relaunch:
uprintf("localization: using locale '%s'\n", selected_locale->txt[0]);
right_to_left_mode = ((selected_locale->ctrl_id) & LOC_RIGHT_TO_LEFT);
SetProcessDefaultLayout(right_to_left_mode?LAYOUT_RTL:0);
if (get_loc_data_file(loc_file, selected_locale))
WriteRegistryKeyStr(REGKEY_HKCU, REGKEY_LOCALE, selected_locale->txt[0]);
@ -2357,10 +2385,26 @@ relaunch:
hISOProgressDlg = NULL;
}
// Create the main Window
hDlg = CreateDialogW(hInstance, MAKEINTRESOURCEW(IDD_DIALOG), NULL, MainCallback);
/*
* Create the main Window
*
* Oh yeah, thanks to Microsoft limitations for dialog boxes this is SUPER SUCKY:
* As per the MSDN [http://msdn.microsoft.com/en-ie/goglobal/bb688119.aspx], "The only way
* to switch between mirrored and nonmirrored dialog resources at run time is to have two
* sets of dialog resources: one mirrored and one nonmirrored."
* Unfortunately, this limitation is VERY REAL, so that's what we have to go through, and
* furthermore, trying to switch part of the dialogs back to LTR is also a major exercise
* in frustration, because it's next to impossible which combination of WS_EX_RTLREADING,
* WS_EX_RIGHT, WS_EX_LAYOUTRTL, WS_EX_LEFTSCROLLBAR and ES_RIGHT will work, plus there's
* no way to toggle ES_RIGHT at runtime anyway.
* So, just like Microsoft advocates, we go through a massive duplication of all our RC
* dialogs (our RTL dialogs having their IDD's offset by +100 - see IDD_IS_RTL), just to
* add a handful of stupid flags. And of course, now we'll have to figure out a way to keep
* the RTL and non RTL duplicated dialogs always in sync...
*/
hDlg = CreateDialogW(hInstance, MAKEINTRESOURCEW(IDD_DIALOG + IDD_IS_RTL), NULL, MainCallback);
if (hDlg == NULL) {
MessageBoxU(NULL, "Could not create Window", "DialogBox failure", MB_ICONSTOP);
MessageBoxU(NULL, "Could not create Window", "DialogBox failure", MB_ICONSTOP|MB_IS_RTL);
goto out;
}
if ((relaunch_rc.left > -65536) && (relaunch_rc.top > -65536))

View File

@ -35,6 +35,8 @@
#define APPLICATION_NAME "Rufus"
#define COMPANY_NAME "Akeo Consulting"
#define STR_NO_LABEL "NO_LABEL"
#define LEFT_TO_RIGHT_MARK "" // Yes, there is a character between the quotes!
#define RIGHT_TO_LEFT_MARK ""
#define DRIVE_ACCESS_TIMEOUT 15000 // How long we should retry drive access (in ms)
#define DRIVE_ACCESS_RETRIES 60 // How many times we should retry
#define DRIVE_INDEX_MIN 0x00000080
@ -68,6 +70,8 @@
#define ARRAYSIZE(A) (sizeof(A)/sizeof((A)[0]))
#endif
#define IsChecked(CheckBox_ID) (IsDlgButtonChecked(hMainDialog, CheckBox_ID) == BST_CHECKED)
#define MB_IS_RTL (right_to_left_mode?MB_RTLREADING:0)
#define IDD_IS_RTL (right_to_left_mode?100:0)
#define safe_free(p) do {free((void*)p); p = NULL;} while(0)
#define safe_min(a, b) min((size_t)(a), (size_t)(b))
@ -289,7 +293,7 @@ extern DWORD FormatStatus;
extern DWORD syslinux_ldlinux_len[2];
extern RUFUS_DRIVE_INFO SelectedDrive;
extern const int nb_steps[FS_MAX];
extern BOOL use_own_c32[NB_OLD_C32], detect_fakes, iso_op_in_progress, format_op_in_progress;
extern BOOL use_own_c32[NB_OLD_C32], detect_fakes, iso_op_in_progress, format_op_in_progress, right_to_left_mode;
extern RUFUS_ISO_REPORT iso_report;
extern int64_t iso_blocking_status;
extern uint16_t rufus_version[4], embedded_sl_version[2];

View File

@ -32,8 +32,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.3.389"
CAPTION "Rufus v1.4.3.390"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
DEFPUSHBUTTON "Start",IDC_START,94,291,50,14
@ -163,6 +162,146 @@ BEGIN
EDITTEXT IDC_DOWNLOAD_URL,15,191,351,13,ES_AUTOHSCROLL | ES_READONLY
END
RTL_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_RTLREADING | WS_EX_APPWINDOW | WS_EX_LAYOUTRTL
CAPTION "Rufus v1.4.3.390"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
DEFPUSHBUTTON "Start",IDC_START,94,291,50,14
PUSHBUTTON "Close",IDCANCEL,148,291,50,14
PUSHBUTTON "About...",IDC_ABOUT,8,291,50,14
PUSHBUTTON "Log",IDC_LOG,62,291,18,14
PUSHBUTTON "T",IDC_TEST,80,291,12,14,NOT WS_VISIBLE
COMBOBOX IDC_DEVICE,8,17,190,33,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
LTEXT "Device",IDS_DEVICE_TXT,9,6,171,8
COMBOBOX IDC_FILESYSTEM,8,75,190,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
LTEXT "File system",IDS_FILESYSTEM_TXT,9,64,186,10
COMBOBOX IDC_PARTITION_TYPE,8,46,190,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
LTEXT "Partition scheme and target system type",IDS_PARTITION_TYPE_TXT,9,35,186,8
COMBOBOX IDC_CLUSTERSIZE,8,104,190,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
LTEXT "Cluster size",IDS_CLUSTERSIZE_TXT,9,93,186,10
GROUPBOX "Format Options ",IDS_FORMAT_OPTIONS_GRP,7,149,192,66
LTEXT "New volume label",IDS_LABEL_TXT,9,121,186,10
EDITTEXT IDC_LABEL,7,131,190,13,ES_AUTOHSCROLL
CONTROL "Check device for bad blocks:",IDC_BADBLOCKS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,161,101,10
CONTROL "Quick format",IDC_QUICKFORMAT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,173,106,10
CONTROL "Create a bootable disk using:",IDC_BOOT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,185,104,10
CONTROL "Create extended label and icon files",IDC_SET_ICON,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,198,181,10
CONTROL "",IDC_PROGRESS,"msctls_progress32",PBS_SMOOTH | WS_BORDER,8,272,189,9
COMBOBOX IDC_NBPASSES,119,159,49,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
COMBOBOX IDC_BOOTTYPE,119,183,49,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "...",IDC_SELECT_ISO,171,182,22,14,BS_ICON
CONTROL "Use Rufus MBR with BIOS ID:",IDC_RUFUS_MBR,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,248,106,10
PUSHBUTTON "",IDC_ADVANCED,63,148,14,10,BS_TOP | BS_FLAT
GROUPBOX "Advanced Options",IDS_ADVANCED_OPTIONS_GRP,7,210,192,54
COMBOBOX IDC_DISK_ID,119,246,73,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
CONTROL "Add fixes for old BIOSes (extra partition, align, etc.)",IDC_EXTRA_PARTITION,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,235,181,10
CONTROL "List USB Hard Drives",IDC_ENABLE_FIXED_DISKS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,222,181,10
PUSHBUTTON "",IDC_LANG,183,2,15,13,BS_TOP | BS_FLAT
END
RTL_IDD_ABOUTBOX DIALOGEX 0, 0, 319, 229
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_RTLREADING | WS_EX_APPWINDOW | WS_EX_LAYOUTRTL
CAPTION "About Rufus"
FONT 8, "MS Shell Dlg", 400, 0, 0x0
BEGIN
ICON IDI_ICON,IDC_ABOUT_ICON,11,8,20,20
DEFPUSHBUTTON "OK",IDOK,251,207,50,14,WS_GROUP
PUSHBUTTON "License",IDC_ABOUT_LICENSE,46,207,50,14,WS_GROUP
CONTROL "",IDC_ABOUT_COPYRIGHTS,"RichEdit20W",WS_VSCROLL | 0x806,46,107,267,90,WS_EX_RTLREADING | WS_EX_STATICEDGE
CONTROL "",IDC_ABOUT_BLURB,"RichEdit20W",WS_TABSTOP | 0x884,45,7,268,99
PUSHBUTTON "Updates",IDC_ABOUT_UPDATES,100,207,50,14,NOT WS_VISIBLE | WS_GROUP
END
RTL_IDD_ISO_EXTRACT DIALOGEX 0, 0, 262, 66
STYLE DS_SETFONT | DS_FIXEDSYS | WS_POPUP | WS_CAPTION
EXSTYLE WS_EX_RTLREADING | WS_EX_APPWINDOW | WS_EX_LAYOUTRTL
CAPTION "Copying ISO files..."
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
LTEXT "Opening ISO image - please wait...",IDC_ISO_FILENAME,8,10,246,13,SS_PATHELLIPSIS
CONTROL "",IDC_PROGRESS,"msctls_progress32",WS_BORDER,7,26,247,8
PUSHBUTTON "Cancel",IDC_ISO_ABORT,111,43,50,14
END
RTL_IDD_LICENSE DIALOGEX 0, 0, 335, 205
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_RTLREADING | WS_EX_APPWINDOW | WS_EX_LAYOUTRTL
CAPTION "Rufus License"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
DEFPUSHBUTTON "Close",IDCANCEL,278,187,50,14
EDITTEXT IDC_LICENSE_TEXT,7,7,321,176,ES_RIGHT | ES_MULTILINE | ES_READONLY | WS_VSCROLL,WS_EX_RIGHT | WS_EX_RTLREADING | WS_EX_LEFTSCROLLBAR
END
RTL_IDD_LOG DIALOGEX 0, 0, 366, 329
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION
EXSTYLE WS_EX_APPWINDOW | WS_EX_LAYOUTRTL
CAPTION "Log"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
EDITTEXT IDC_LOG_EDIT,0,0,366,301,ES_RIGHT | ES_MULTILINE | ES_READONLY | NOT WS_BORDER | WS_VSCROLL,WS_EX_RIGHT | WS_EX_RTLREADING | WS_EX_LEFTSCROLLBAR | WS_EX_STATICEDGE
PUSHBUTTON "Clear Log",IDC_LOG_CLEAR,198,308,50,14
PUSHBUTTON "Save Log",IDC_LOG_SAVE,253,308,50,14
DEFPUSHBUTTON "Close Log",IDCANCEL,308,308,50,14
END
RTL_IDD_NOTIFICATION DIALOGEX 0, 0, 263, 63
STYLE DS_SETFONT | DS_FIXEDSYS | DS_NOFAILCREATE | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_THICKFRAME
EXSTYLE WS_EX_RTLREADING | WS_EX_APPWINDOW | WS_EX_LAYOUTRTL
CAPTION "Rufus"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
LTEXT "",IDC_NOTIFICATION_LINE,0,0,263,39
CONTROL "",IDC_STATIC,"Static",SS_WHITERECT,0,0,263,38
ICON 32516,IDC_NOTIFICATION_ICON,6,6,20,20
LTEXT "",IDC_NOTIFICATION_TEXT,35,10,219,20
DEFPUSHBUTTON "No",IDNO,206,44,50,14
PUSHBUTTON "More information",IDC_MORE_INFO,8,44,76,14,NOT WS_VISIBLE
PUSHBUTTON "Yes",IDYES,154,44,50,14,NOT WS_VISIBLE
END
RTL_IDD_UPDATE_POLICY DIALOGEX 0, 0, 287, 198
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_RTLREADING | WS_EX_APPWINDOW | WS_EX_LAYOUTRTL
CAPTION "Update policy and settings"
FONT 8, "MS Shell Dlg", 400, 0, 0x0
BEGIN
ICON IDI_ICON,IDC_ABOUT_ICON,11,8,20,20
DEFPUSHBUTTON "Close",IDCANCEL,221,172,50,14,WS_GROUP
CONTROL "",IDC_POLICY,"RichEdit20W",WS_VSCROLL | 0x804,46,8,235,130,WS_EX_STATICEDGE
COMBOBOX IDC_UPDATE_FREQUENCY,133,155,66,12,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
LTEXT "Check for updates:",IDS_UPDATE_FREQUENCY_TXT,52,157,80,11
LTEXT "Include beta versions:",IDS_INCLUDE_BETAS_TXT,52,173,80,11
COMBOBOX IDC_INCLUDE_BETAS,133,171,36,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
GROUPBOX "Settings",IDS_UPDATE_SETTINGS_GRP,45,145,161,46
PUSHBUTTON "Check Now",IDC_CHECK_NOW,221,154,50,14
GROUPBOX "",IDS_CHECK_NOW_GRP,210,145,71,46
END
RTL_IDD_NEW_VERSION DIALOGEX 0, 0, 384, 268
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_RTLREADING | WS_EX_APPWINDOW | WS_EX_LAYOUTRTL
CAPTION "Check For Updates - Rufus"
FONT 8, "MS Shell Dlg", 400, 0, 0x0
BEGIN
PUSHBUTTON "Close",IDCANCEL,167,244,50,14,WS_GROUP
CONTROL "",IDC_RELEASE_NOTES,"RichEdit20W",WS_VSCROLL | 0x804,15,77,352,88,WS_EX_STATICEDGE
DEFPUSHBUTTON "Download",IDC_DOWNLOAD,293,211,74,14,WS_GROUP
CONTROL "",IDC_PROGRESS,"msctls_progress32",WS_BORDER,15,212,270,11
GROUPBOX "Release Notes",IDS_NEW_VERSION_NOTES_GRP,8,63,367,111
LTEXT "A newer version is available. Please download the latest version!",IDS_NEW_VERSION_AVAIL_TXT,10,32,366,8
LTEXT "[...]",IDC_YOUR_VERSION,10,8,366,8
LTEXT "[...]",IDC_LATEST_VERSION,10,19,366,8
CTEXT "Click here to go to the website",IDC_WEBSITE,10,49,366,9,SS_NOTIFY
GROUPBOX "Download",IDS_NEW_VERSION_DOWNLOAD_GRP,8,177,367,58
EDITTEXT IDC_DOWNLOAD_URL,15,191,351,13,ES_AUTOHSCROLL | ES_READONLY
END
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
@ -288,8 +427,8 @@ END
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,4,3,389
PRODUCTVERSION 1,4,3,389
FILEVERSION 1,4,3,390
PRODUCTVERSION 1,4,3,390
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
@ -306,13 +445,13 @@ BEGIN
BEGIN
VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)"
VALUE "FileDescription", "Rufus"
VALUE "FileVersion", "1.4.3.389"
VALUE "FileVersion", "1.4.3.390"
VALUE "InternalName", "Rufus"
VALUE "LegalCopyright", "© 2011-2014 Pete Batard (GPL v3)"
VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html"
VALUE "OriginalFilename", "rufus.exe"
VALUE "ProductName", "Rufus"
VALUE "ProductVersion", "1.4.3.389"
VALUE "ProductVersion", "1.4.3.390"
END
END
BLOCK "VarFileInfo"

View File

@ -452,7 +452,7 @@ void ResizeMoveCtrl(HWND hDlg, HWND hCtrl, int dx, int dy, int dw, int dh)
SIZE border = {0, 0};
GetWindowRect(hCtrl, &rect);
point.x = rect.left;
point.x = right_to_left_mode?rect.right:rect.left;
point.y = rect.top;
ScreenToClient(hDlg, &point);
GetClientRect(hCtrl, &rect);
@ -550,10 +550,10 @@ INT_PTR CALLBACK AboutCallback(HWND hDlg, UINT message, WPARAM wParam, LPARAM lP
EndDialog(hDlg, LOWORD(wParam));
return (INT_PTR)TRUE;
case IDC_ABOUT_LICENSE:
DialogBoxW(hMainInstance, MAKEINTRESOURCEW(IDD_LICENSE), hDlg, LicenseCallback);
DialogBoxW(hMainInstance, MAKEINTRESOURCEW(IDD_LICENSE + IDD_IS_RTL), hDlg, LicenseCallback);
break;
case IDC_ABOUT_UPDATES:
DialogBoxW(hMainInstance, MAKEINTRESOURCEW(IDD_UPDATE_POLICY), hDlg, UpdateCallback);
DialogBoxW(hMainInstance, MAKEINTRESOURCEW(IDD_UPDATE_POLICY + IDD_IS_RTL), hDlg, UpdateCallback);
break;
}
break;
@ -565,7 +565,7 @@ INT_PTR CreateAboutBox(void)
{
INT_PTR r;
dialog_showing++;
r = DialogBoxW(hMainInstance, MAKEINTRESOURCEW(IDD_ABOUTBOX), hMainDialog, AboutCallback);
r = DialogBoxW(hMainInstance, MAKEINTRESOURCEW(IDD_ABOUTBOX + IDD_IS_RTL), hMainDialog, AboutCallback);
dialog_showing--;
return r;
}
@ -704,7 +704,7 @@ BOOL Notification(int type, const notification_info* more_info, char* title, cha
hMessageIcon = LoadIcon(NULL, IDI_INFORMATION);
break;
}
ret = (DialogBoxW(hMainInstance, MAKEINTRESOURCEW(IDD_NOTIFICATION), hMainDialog, NotificationCallback) == IDYES);
ret = (DialogBoxW(hMainInstance, MAKEINTRESOURCEW(IDD_NOTIFICATION + IDD_IS_RTL), hMainDialog, NotificationCallback) == IDYES);
safe_free(szMessageText);
dialog_showing--;
return ret;
@ -1275,7 +1275,7 @@ INT_PTR CALLBACK NewVersionCallback(HWND hDlg, UINT message, WPARAM wParam, LPAR
void DownloadNewVersion(void)
{
DialogBoxW(hMainInstance, MAKEINTRESOURCEW(IDD_NEW_VERSION), hMainDialog, NewVersionCallback);
DialogBoxW(hMainInstance, MAKEINTRESOURCEW(IDD_NEW_VERSION + IDD_IS_RTL), hMainDialog, NewVersionCallback);
}
void SetTitleBarIcon(HWND hDlg)