Commit a121ac5d authored by Frank Richter's avatar Frank Richter Committed by Alexandre Julliard

winecfg: driveui: Load UI strings from resources.

parent d70832d5
...@@ -239,3 +239,18 @@ BEGIN ...@@ -239,3 +239,18 @@ BEGIN
IDS_SHADER_MODE_NONE "None" IDS_SHADER_MODE_NONE "None"
IDS_SHADER_MODE_EMULATION "Emulated" IDS_SHADER_MODE_EMULATION "Emulated"
END END
STRINGTABLE DISCARDABLE
BEGIN
IDS_DRIVE_UNKNOWN "Autodetect"
IDS_DRIVE_FIXED "Local hard disk"
IDS_DRIVE_REMOTE "Network share"
IDS_DRIVE_REMOVABLE "Floppy disk"
IDS_DRIVE_CDROM "CD-ROM"
IDS_DRIVE_LETTERS_EXCEEDED "You cannot add any more drives.\n\nEach drive must have a letter, from A to Z, so you cannot have more than 26"
IDS_SYSTEM_DRIVE_LABEL "System drive"
IDS_CONFIRM_DELETE_C "Are you sure you want to delete drive C?\n\nMost Windows applications expect drive C to exist, and will die messily if it doesn't. If you proceed remember to recreate it!"
IDS_COL_DRIVELETTER "Letter"
IDS_COL_DRIVEMAPPING "Drive Mapping"
IDS_NO_DRIVE_C "You don't have a drive C. This is not so great.\n\nRemember to click 'Add' in the Drives tab to create one!\n"
END
...@@ -237,3 +237,18 @@ BEGIN ...@@ -237,3 +237,18 @@ BEGIN
IDS_SHADER_MODE_NONE "Aus" IDS_SHADER_MODE_NONE "Aus"
IDS_SHADER_MODE_EMULATION "Emuliert" IDS_SHADER_MODE_EMULATION "Emuliert"
END END
STRINGTABLE DISCARDABLE
BEGIN
IDS_DRIVE_UNKNOWN "Automatisch"
IDS_DRIVE_FIXED "Lokale Festplatte"
IDS_DRIVE_REMOTE "Netzwerkfreigabe"
IDS_DRIVE_REMOVABLE "Diskette"
IDS_DRIVE_CDROM "CD-ROM"
IDS_DRIVE_LETTERS_EXCEEDED "Sie knnen keine weiteren Laufwerke mehr hinzufgen.\n\nJedes Laufwerk muss einen Buchstaben besitzen, von A bis Z, deshalb knnen Sie nicht mehr als 26 haben."
IDS_SYSTEM_DRIVE_LABEL "Systemlaufwerk"
IDS_CONFIRM_DELETE_C "Sind Sie sich sicher, dass Sie Laufwerk C entfernen mchten?\n\nDie meisten Windows-Anwendungen erwarten, dass ein Laufwerk C existiert und funktionieren ohne nicht richtig. Wenn Sie fortfahren, vergessen Sie nicht, Laufwerk C neu zu erstellen!"
IDS_COL_DRIVELETTER "Buchst."
IDS_COL_DRIVEMAPPING "Zuordnung"
IDS_NO_DRIVE_C "Sie haben kein Laufwerk C. Das ist nicht so gut.\n\nVergessen Sie nicht, im Laufwerke-Reiter Hinzufgen zu klicken um eins zu erstellen!\n"
END
...@@ -239,6 +239,21 @@ BEGIN ...@@ -239,6 +239,21 @@ BEGIN
IDS_SHADER_MODE_EMULATION "Emulated" IDS_SHADER_MODE_EMULATION "Emulated"
END END
STRINGTABLE DISCARDABLE
BEGIN
IDS_DRIVE_UNKNOWN "Autodetect"
IDS_DRIVE_FIXED "Local hard disk"
IDS_DRIVE_REMOTE "Network share"
IDS_DRIVE_REMOVABLE "Floppy disk"
IDS_DRIVE_CDROM "CD-ROM"
IDS_DRIVE_LETTERS_EXCEEDED "You cannot add any more drives.\n\nEach drive must have a letter, from A to Z, so you cannot have more than 26"
IDS_SYSTEM_DRIVE_LABEL "System drive"
IDS_CONFIRM_DELETE_C "Are you sure you want to delete drive C?\n\nMost Windows applications expect drive C to exist, and will die messily if it doesn't. If you proceed remember to recreate it!"
IDS_COL_DRIVELETTER "Letter"
IDS_COL_DRIVEMAPPING "Drive Mapping"
IDS_NO_DRIVE_C "You don't have a drive C. This is not so great.\n\nRemember to click Add in the Drives tab to create one!\n"
END
/****************************************************************/ /****************************************************************/
/* English neutral resources /* English neutral resources
/****************************************************************/ /****************************************************************/
......
...@@ -233,3 +233,18 @@ BEGIN ...@@ -233,3 +233,18 @@ BEGIN
IDS_SHADER_MODE_NONE "None" IDS_SHADER_MODE_NONE "None"
IDS_SHADER_MODE_EMULATION "Emulated" IDS_SHADER_MODE_EMULATION "Emulated"
END END
STRINGTABLE DISCARDABLE
BEGIN
IDS_DRIVE_UNKNOWN "Autodetect"
IDS_DRIVE_FIXED "Local hard disk"
IDS_DRIVE_REMOTE "Network share"
IDS_DRIVE_REMOVABLE "Floppy disk"
IDS_DRIVE_CDROM "CD-ROM"
IDS_DRIVE_LETTERS_EXCEEDED "You cannot add any more drives.\n\nEach drive must have a letter, from A to Z, so you cannot have more than 26"
IDS_SYSTEM_DRIVE_LABEL "System drive"
IDS_CONFIRM_DELETE_C "Are you sure you want to delete drive C?\n\nMost Windows applications expect drive C to exist, and will die messily if it doesn't. If you proceed remember to recreate it!"
IDS_COL_DRIVELETTER "Letter"
IDS_COL_DRIVEMAPPING "Drive Mapping"
IDS_NO_DRIVE_C "You don't have a drive C. This is not so great.\n\nRemember to click 'Add' in the Drives tab to create one!\n"
END
...@@ -236,3 +236,18 @@ BEGIN ...@@ -236,3 +236,18 @@ BEGIN
IDS_SHADER_MODE_NONE "None" IDS_SHADER_MODE_NONE "None"
IDS_SHADER_MODE_EMULATION "Emulated" IDS_SHADER_MODE_EMULATION "Emulated"
END END
STRINGTABLE DISCARDABLE
BEGIN
IDS_DRIVE_UNKNOWN "Autodetect"
IDS_DRIVE_FIXED "Local hard disk"
IDS_DRIVE_REMOTE "Network share"
IDS_DRIVE_REMOVABLE "Floppy disk"
IDS_DRIVE_CDROM "CD-ROM"
IDS_DRIVE_LETTERS_EXCEEDED "You cannot add any more drives.\n\nEach drive must have a letter, from A to Z, so you cannot have more than 26"
IDS_SYSTEM_DRIVE_LABEL "System drive"
IDS_CONFIRM_DELETE_C "Are you sure you want to delete drive C?\n\nMost Windows applications expect drive C to exist, and will die messily if it doesn't. If you proceed remember to recreate it!"
IDS_COL_DRIVELETTER "Letter"
IDS_COL_DRIVEMAPPING "Drive Mapping"
IDS_NO_DRIVE_C "You don't have a drive C. This is not so great.\n\nRemember to click 'Add' in the Drives tab to create one!\n"
END
...@@ -237,3 +237,18 @@ BEGIN ...@@ -237,3 +237,18 @@ BEGIN
IDS_SHADER_MODE_NONE "Aucun" IDS_SHADER_MODE_NONE "Aucun"
IDS_SHADER_MODE_EMULATION "Emulation" IDS_SHADER_MODE_EMULATION "Emulation"
END END
STRINGTABLE DISCARDABLE
BEGIN
IDS_DRIVE_UNKNOWN "Autodetect"
IDS_DRIVE_FIXED "Local hard disk"
IDS_DRIVE_REMOTE "Network share"
IDS_DRIVE_REMOVABLE "Floppy disk"
IDS_DRIVE_CDROM "CD-ROM"
IDS_DRIVE_LETTERS_EXCEEDED "You cannot add any more drives.\n\nEach drive must have a letter, from A to Z, so you cannot have more than 26"
IDS_SYSTEM_DRIVE_LABEL "System drive"
IDS_CONFIRM_DELETE_C "Are you sure you want to delete drive C?\n\nMost Windows applications expect drive C to exist, and will die messily if it doesn't. If you proceed remember to recreate it!"
IDS_COL_DRIVELETTER "Letter"
IDS_COL_DRIVEMAPPING "Drive Mapping"
IDS_NO_DRIVE_C "You don't have a drive C. This is not so great.\n\nRemember to click 'Add' in the Drives tab to create one!\n"
END
...@@ -233,3 +233,18 @@ BEGIN ...@@ -233,3 +233,18 @@ BEGIN
IDS_SHADER_MODE_NONE "None" IDS_SHADER_MODE_NONE "None"
IDS_SHADER_MODE_EMULATION "Emulated" IDS_SHADER_MODE_EMULATION "Emulated"
END END
STRINGTABLE DISCARDABLE
BEGIN
IDS_DRIVE_UNKNOWN "Autodetect"
IDS_DRIVE_FIXED "Local hard disk"
IDS_DRIVE_REMOTE "Network share"
IDS_DRIVE_REMOVABLE "Floppy disk"
IDS_DRIVE_CDROM "CD-ROM"
IDS_DRIVE_LETTERS_EXCEEDED "You cannot add any more drives.\n\nEach drive must have a letter, from A to Z, so you cannot have more than 26"
IDS_SYSTEM_DRIVE_LABEL "System drive"
IDS_CONFIRM_DELETE_C "Are you sure you want to delete drive C?\n\nMost Windows applications expect drive C to exist, and will die messily if it doesn't. If you proceed remember to recreate it!"
IDS_COL_DRIVELETTER "Letter"
IDS_COL_DRIVEMAPPING "Drive Mapping"
IDS_NO_DRIVE_C "You don't have a drive C. This is not so great.\n\nRemember to click 'Add' in the Drives tab to create one!\n"
END
...@@ -231,3 +231,18 @@ BEGIN ...@@ -231,3 +231,18 @@ BEGIN
IDS_SHADER_MODE_NONE "None" IDS_SHADER_MODE_NONE "None"
IDS_SHADER_MODE_EMULATION "Emulated" IDS_SHADER_MODE_EMULATION "Emulated"
END END
STRINGTABLE DISCARDABLE
BEGIN
IDS_DRIVE_UNKNOWN "Autodetect"
IDS_DRIVE_FIXED "Local hard disk"
IDS_DRIVE_REMOTE "Network share"
IDS_DRIVE_REMOVABLE "Floppy disk"
IDS_DRIVE_CDROM "CD-ROM"
IDS_DRIVE_LETTERS_EXCEEDED "You cannot add any more drives.\n\nEach drive must have a letter, from A to Z, so you cannot have more than 26"
IDS_SYSTEM_DRIVE_LABEL "System drive"
IDS_CONFIRM_DELETE_C "Are you sure you want to delete drive C?\n\nMost Windows applications expect drive C to exist, and will die messily if it doesn't. If you proceed remember to recreate it!"
IDS_COL_DRIVELETTER "Letter"
IDS_COL_DRIVEMAPPING "Drive Mapping"
IDS_NO_DRIVE_C "You don't have a drive C. This is not so great.\n\nRemember to click 'Add' in the Drives tab to create one!\n"
END
...@@ -68,7 +68,7 @@ BEGIN ...@@ -68,7 +68,7 @@ BEGIN
CONTROL "DirectX 프로그램들이 마우스 커서를 그들의 창안에 잡아두게 함",IDC_DX_MOUSE_GRAB,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,14,230,8 CONTROL "DirectX 프로그램들이 마우스 커서를 그들의 창안에 잡아두게 함",IDC_DX_MOUSE_GRAB,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,14,230,8
CONTROL "데스크탑 이중 버퍼링을 가능하게 함",IDC_DOUBLE_BUFFER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,24,230,8 CONTROL "데스크탑 이중 버퍼링을 가능하게 함",IDC_DOUBLE_BUFFER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,24,230,8
LTEXT "Wine창들이 창관리자에 의해서 관리된다면, Wine창들은 표준 창틀을 가질 것이며, 작업공간 관리자와 잘 어울릴 것입니다. 그리고 창목록에도 나타날 것입니다.\n\n만약에 Wine창들이 창관리자에 의해 관리되지 않는다면, Wien창들은 창관리자와 연결되지 않을 것입니다. 이것은 Wine창들이 데스크탑과 밀접하게 통합되지 않는다는 것을 의미합니다. 하지만 Wine의 윈도우즈 흉내내기가 더 정밀해져서 몇몇 프로그램들이 좀 더 잘 동작할 수 있도록 도와줍니다.", LTEXT "Wine창들이 창관리자에 의해서 관리된다면, Wine창들은 표준 창틀을 가질 것이며, 작업공간 관리자와 잘 어울릴 것입니다. 그리고 창목록에도 나타날 것입니다.\n\n만약에 Wine창들이 창관리자에 의해 관리되지 않는다면, Wine창들은 창관리자와 연결되지 않을 것입니다. 이것은 Wine창들이 데스크탑과 밀접하게 통합되지 않는다는 것을 의미합니다. 하지만 Wine의 윈도우즈 흉내내기가 더 정밀해져서 몇몇 프로그램들이 좀 더 잘 동작할 수 있도록 도와줍니다.",
IDC_STATIC,15,37,228,80 IDC_STATIC,15,37,228,80
CONTROL "창관리자가 Wine창을 관리하도록 함",IDC_ENABLE_MANAGED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,111,230,8 CONTROL "창관리자가 Wine창을 관리하도록 함",IDC_ENABLE_MANAGED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,111,230,8
LTEXT "당신은 모든 윈도우즈 프로그램이 가상데스크탑에서 동일한 행동을 하게 할 것인지, 서로 다른 행동을 하게 할 것인지 선택할 수 있습니다.", LTEXT "당신은 모든 윈도우즈 프로그램이 가상데스크탑에서 동일한 행동을 하게 할 것인지, 서로 다른 행동을 하게 할 것인지 선택할 수 있습니다.",
...@@ -240,3 +240,18 @@ BEGIN ...@@ -240,3 +240,18 @@ BEGIN
IDS_SHADER_MODE_NONE "None" IDS_SHADER_MODE_NONE "None"
IDS_SHADER_MODE_EMULATION "Emulated" IDS_SHADER_MODE_EMULATION "Emulated"
END END
STRINGTABLE DISCARDABLE
BEGIN
IDS_DRIVE_UNKNOWN "Autodetect"
IDS_DRIVE_FIXED "Local hard disk"
IDS_DRIVE_REMOTE "Network share"
IDS_DRIVE_REMOVABLE "Floppy disk"
IDS_DRIVE_CDROM "CD-ROM"
IDS_DRIVE_LETTERS_EXCEEDED "You cannot add any more drives.\n\nEach drive must have a letter, from A to Z, so you cannot have more than 26"
IDS_SYSTEM_DRIVE_LABEL "System drive"
IDS_CONFIRM_DELETE_C "Are you sure you want to delete drive C?\n\nMost Windows applications expect drive C to exist, and will die messily if it doesn't. If you proceed remember to recreate it!"
IDS_COL_DRIVELETTER "Letter"
IDS_COL_DRIVEMAPPING "Drive Mapping"
IDS_NO_DRIVE_C "You don't have a drive C. This is not so great.\n\nRemember to click 'Add' in the Drives tab to create one!\n"
END
...@@ -238,3 +238,18 @@ BEGIN ...@@ -238,3 +238,18 @@ BEGIN
IDS_SHADER_MODE_NONE "None" IDS_SHADER_MODE_NONE "None"
IDS_SHADER_MODE_EMULATION "Emulated" IDS_SHADER_MODE_EMULATION "Emulated"
END END
STRINGTABLE DISCARDABLE
BEGIN
IDS_DRIVE_UNKNOWN "Autodetect"
IDS_DRIVE_FIXED "Local hard disk"
IDS_DRIVE_REMOTE "Network share"
IDS_DRIVE_REMOVABLE "Floppy disk"
IDS_DRIVE_CDROM "CD-ROM"
IDS_DRIVE_LETTERS_EXCEEDED "You cannot add any more drives.\n\nEach drive must have a letter, from A to Z, so you cannot have more than 26"
IDS_SYSTEM_DRIVE_LABEL "System drive"
IDS_CONFIRM_DELETE_C "Are you sure you want to delete drive C?\n\nMost Windows applications expect drive C to exist, and will die messily if it doesn't. If you proceed remember to recreate it!"
IDS_COL_DRIVELETTER "Letter"
IDS_COL_DRIVEMAPPING "Drive Mapping"
IDS_NO_DRIVE_C "You don't have a drive C. This is not so great.\n\nRemember to click 'Add' in the Drives tab to create one!\n"
END
...@@ -236,3 +236,18 @@ BEGIN ...@@ -236,3 +236,18 @@ BEGIN
IDS_SHADER_MODE_NONE "Ingen" IDS_SHADER_MODE_NONE "Ingen"
IDS_SHADER_MODE_EMULATION "Emulert" IDS_SHADER_MODE_EMULATION "Emulert"
END END
STRINGTABLE DISCARDABLE
BEGIN
IDS_DRIVE_UNKNOWN "Autodetect"
IDS_DRIVE_FIXED "Local hard disk"
IDS_DRIVE_REMOTE "Network share"
IDS_DRIVE_REMOVABLE "Floppy disk"
IDS_DRIVE_CDROM "CD-ROM"
IDS_DRIVE_LETTERS_EXCEEDED "You cannot add any more drives.\n\nEach drive must have a letter, from A to Z, so you cannot have more than 26"
IDS_SYSTEM_DRIVE_LABEL "System drive"
IDS_CONFIRM_DELETE_C "Are you sure you want to delete drive C?\n\nMost Windows applications expect drive C to exist, and will die messily if it doesn't. If you proceed remember to recreate it!"
IDS_COL_DRIVELETTER "Letter"
IDS_COL_DRIVEMAPPING "Drive Mapping"
IDS_NO_DRIVE_C "You don't have a drive C. This is not so great.\n\nRemember to click 'Add' in the Drives tab to create one!\n"
END
...@@ -233,3 +233,18 @@ BEGIN ...@@ -233,3 +233,18 @@ BEGIN
IDS_SHADER_MODE_NONE "None" IDS_SHADER_MODE_NONE "None"
IDS_SHADER_MODE_EMULATION "Emulated" IDS_SHADER_MODE_EMULATION "Emulated"
END END
STRINGTABLE DISCARDABLE
BEGIN
IDS_DRIVE_UNKNOWN "Autodetect"
IDS_DRIVE_FIXED "Local hard disk"
IDS_DRIVE_REMOTE "Network share"
IDS_DRIVE_REMOVABLE "Floppy disk"
IDS_DRIVE_CDROM "CD-ROM"
IDS_DRIVE_LETTERS_EXCEEDED "You cannot add any more drives.\n\nEach drive must have a letter, from A to Z, so you cannot have more than 26"
IDS_SYSTEM_DRIVE_LABEL "System drive"
IDS_CONFIRM_DELETE_C "Are you sure you want to delete drive C?\n\nMost Windows applications expect drive C to exist, and will die messily if it doesn't. If you proceed remember to recreate it!"
IDS_COL_DRIVELETTER "Letter"
IDS_COL_DRIVEMAPPING "Drive Mapping"
IDS_NO_DRIVE_C "You don't have a drive C. This is not so great.\n\nRemember to click 'Add' in the Drives tab to create one!\n"
END
...@@ -236,3 +236,18 @@ BEGIN ...@@ -236,3 +236,18 @@ BEGIN
IDS_SHADER_MODE_NONE "None" IDS_SHADER_MODE_NONE "None"
IDS_SHADER_MODE_EMULATION "Emulated" IDS_SHADER_MODE_EMULATION "Emulated"
END END
STRINGTABLE DISCARDABLE
BEGIN
IDS_DRIVE_UNKNOWN "Autodetect"
IDS_DRIVE_FIXED "Local hard disk"
IDS_DRIVE_REMOTE "Network share"
IDS_DRIVE_REMOVABLE "Floppy disk"
IDS_DRIVE_CDROM "CD-ROM"
IDS_DRIVE_LETTERS_EXCEEDED "You cannot add any more drives.\n\nEach drive must have a letter, from A to Z, so you cannot have more than 26"
IDS_SYSTEM_DRIVE_LABEL "System drive"
IDS_CONFIRM_DELETE_C "Are you sure you want to delete drive C?\n\nMost Windows applications expect drive C to exist, and will die messily if it doesn't. If you proceed remember to recreate it!"
IDS_COL_DRIVELETTER "Letter"
IDS_COL_DRIVEMAPPING "Drive Mapping"
IDS_NO_DRIVE_C "You don't have a drive C. This is not so great.\n\nRemember to click 'Add' in the Drives tab to create one!\n"
END
...@@ -52,6 +52,16 @@ static struct drive* current_drive; ...@@ -52,6 +52,16 @@ static struct drive* current_drive;
static void get_etched_rect(HWND dialog, RECT *rect); static void get_etched_rect(HWND dialog, RECT *rect);
static void update_controls(HWND dialog); static void update_controls(HWND dialog);
static DWORD driveui_msgbox (HWND parent, UINT messageId, DWORD flags)
{
WCHAR* caption = load_string (IDS_WINECFG_TITLE);
WCHAR* text = load_string (flags);
DWORD result = MessageBoxW (parent, text, caption, flags);
HeapFree (GetProcessHeap(), 0, caption);
HeapFree (GetProcessHeap(), 0, text);
return result;
}
/**** listview helper functions ****/ /**** listview helper functions ****/
/* clears the item at index in the listview */ /* clears the item at index in the listview */
...@@ -145,15 +155,15 @@ static void set_advanced(HWND dialog) ...@@ -145,15 +155,15 @@ static void set_advanced(HWND dialog)
struct drive_typemap { struct drive_typemap {
unsigned int sCode; unsigned int sCode;
const char *sDesc; UINT idDesc;
}; };
static const struct drive_typemap type_pairs[] = { static const struct drive_typemap type_pairs[] = {
{ DRIVE_UNKNOWN, "Autodetect" }, { DRIVE_UNKNOWN, IDS_DRIVE_UNKNOWN },
{ DRIVE_FIXED, "Local hard disk" }, { DRIVE_FIXED, IDS_DRIVE_FIXED },
{ DRIVE_REMOTE, "Network share" }, { DRIVE_REMOTE, IDS_DRIVE_REMOTE },
{ DRIVE_REMOVABLE, "Floppy disk" }, { DRIVE_REMOVABLE, IDS_DRIVE_REMOVABLE },
{ DRIVE_CDROM, "CD-ROM" } { DRIVE_CDROM, IDS_DRIVE_CDROM }
}; };
#define DRIVE_TYPE_DEFAULT 0 #define DRIVE_TYPE_DEFAULT 0
...@@ -335,14 +345,20 @@ static void on_add_click(HWND dialog) ...@@ -335,14 +345,20 @@ static void on_add_click(HWND dialog)
new++; new++;
if (new > 'Z') if (new > 'Z')
{ {
MessageBox(dialog, "You cannot add any more drives.\n\nEach drive must have a letter, from A to Z, so you cannot have more than 26", "", MB_OK | MB_ICONEXCLAMATION); driveui_msgbox (dialog, IDS_DRIVE_LETTERS_EXCEEDED, MB_OK | MB_ICONEXCLAMATION);
return; return;
} }
} }
WINE_TRACE("allocating drive letter %c\n", new); WINE_TRACE("allocating drive letter %c\n", new);
if (new == 'C') add_drive(new, "../drive_c", "System Drive", "", DRIVE_FIXED); if (new == 'C')
{
char label[64];
LoadStringA (GetModuleHandle (NULL), IDS_SYSTEM_DRIVE_LABEL, label,
sizeof(label)/sizeof(label[0]));
add_drive(new, "../drive_c", label, "", DRIVE_FIXED);
}
else add_drive(new, "/", "", "", DRIVE_UNKNOWN); else add_drive(new, "/", "", "", DRIVE_UNKNOWN);
fill_drives_list(dialog); fill_drives_list(dialog);
...@@ -384,7 +400,7 @@ static void on_remove_click(HWND dialog) ...@@ -384,7 +400,7 @@ static void on_remove_click(HWND dialog)
if (drive->letter == 'C') if (drive->letter == 'C')
{ {
DWORD result = MessageBox(dialog, "Are you sure you want to delete drive C?\n\nMost Windows applications expect drive C to exist, and will die messily if it doesn't. If you proceed remember to recreate it!", "", MB_YESNO | MB_ICONEXCLAMATION); DWORD result = driveui_msgbox (dialog, IDS_CONFIRM_DELETE_C, MB_YESNO | MB_ICONEXCLAMATION);
if (result == IDNO) return; if (result == IDNO) return;
} }
...@@ -445,7 +461,10 @@ static void update_controls(HWND dialog) ...@@ -445,7 +461,10 @@ static void update_controls(HWND dialog)
for (i = 0; i < sizeof(type_pairs) / sizeof(struct drive_typemap); i++) for (i = 0; i < sizeof(type_pairs) / sizeof(struct drive_typemap); i++)
{ {
SendDlgItemMessage(dialog, IDC_COMBO_TYPE, CB_ADDSTRING, 0, (LPARAM) type_pairs[i].sDesc); WCHAR driveDesc[64];
LoadStringW (GetModuleHandle (NULL), type_pairs[i].idDesc, driveDesc,
sizeof(driveDesc)/sizeof(driveDesc[0]));
SendDlgItemMessageW (dialog, IDC_COMBO_TYPE, CB_ADDSTRING, 0, (LPARAM)driveDesc);
if (type_pairs[i].sCode == type) if (type_pairs[i].sCode == type)
{ {
...@@ -655,25 +674,30 @@ BOOL browse_for_unix_folder(HWND dialog, char *pszPath) ...@@ -655,25 +674,30 @@ BOOL browse_for_unix_folder(HWND dialog, char *pszPath)
static void init_listview_columns(HWND dialog) static void init_listview_columns(HWND dialog)
{ {
LVCOLUMN listColumn; LVCOLUMNW listColumn;
RECT viewRect; RECT viewRect;
int width; int width;
WCHAR column[64];
GetClientRect(GetDlgItem(dialog, IDC_LIST_DRIVES), &viewRect); GetClientRect(GetDlgItem(dialog, IDC_LIST_DRIVES), &viewRect);
width = (viewRect.right - viewRect.left) / 6 - 5; width = (viewRect.right - viewRect.left) / 6 - 5;
LoadStringW (GetModuleHandle (NULL), IDS_COL_DRIVELETTER, column,
sizeof(column)/sizeof(column[0]));
listColumn.mask = LVCF_TEXT | LVCF_WIDTH | LVCF_SUBITEM; listColumn.mask = LVCF_TEXT | LVCF_WIDTH | LVCF_SUBITEM;
listColumn.pszText = (char*) "Letter"; listColumn.pszText = column;
listColumn.cchTextMax = lstrlen(listColumn.pszText); listColumn.cchTextMax = lstrlenW (listColumn.pszText);
listColumn.cx = width; listColumn.cx = width;
SendDlgItemMessage(dialog, IDC_LIST_DRIVES, LVM_INSERTCOLUMN, 0, (LPARAM) &listColumn); SendDlgItemMessageW (dialog, IDC_LIST_DRIVES, LVM_INSERTCOLUMNW, 0, (LPARAM) &listColumn);
LoadStringW (GetModuleHandle (NULL), IDS_COL_DRIVEMAPPING, column,
sizeof(column)/sizeof(column[0]));
listColumn.cx = viewRect.right - viewRect.left - width; listColumn.cx = viewRect.right - viewRect.left - width;
listColumn.pszText = (char*) "Drive Mapping"; listColumn.pszText = column;
listColumn.cchTextMax = lstrlen(listColumn.pszText); listColumn.cchTextMax = lstrlenW (listColumn.pszText);
SendDlgItemMessage(dialog, IDC_LIST_DRIVES, LVM_INSERTCOLUMN, 1, (LPARAM) &listColumn); SendDlgItemMessageW (dialog, IDC_LIST_DRIVES, LVM_INSERTCOLUMNW, 1, (LPARAM) &listColumn);
} }
static void load_drive_options(HWND dialog) static void load_drive_options(HWND dialog)
...@@ -696,7 +720,7 @@ DriveDlgProc (HWND dialog, UINT msg, WPARAM wParam, LPARAM lParam) ...@@ -696,7 +720,7 @@ DriveDlgProc (HWND dialog, UINT msg, WPARAM wParam, LPARAM lParam)
load_drive_options(dialog); load_drive_options(dialog);
if (!drives[2].in_use) if (!drives[2].in_use)
MessageBox(dialog, "You don't have a drive C. This is not so great.\n\nRemember to click 'Add' in the Drives tab to create one!\n", "", MB_OK | MB_ICONEXCLAMATION); driveui_msgbox (dialog, IDS_NO_DRIVE_C, MB_OK | MB_ICONEXCLAMATION);
fill_drives_list(dialog); fill_drives_list(dialog);
update_controls(dialog); update_controls(dialog);
......
...@@ -132,6 +132,18 @@ ...@@ -132,6 +132,18 @@
#define IDC_DRIVE_LABEL 1078 #define IDC_DRIVE_LABEL 1078
#define IDS_DRIVE_UNKNOWN 8200
#define IDS_DRIVE_FIXED 8201
#define IDS_DRIVE_REMOTE 8202
#define IDS_DRIVE_REMOVABLE 8203
#define IDS_DRIVE_CDROM 8204
#define IDS_DRIVE_LETTERS_EXCEEDED 8205
#define IDS_SYSTEM_DRIVE_LABEL 8206
#define IDS_CONFIRM_DELETE_C 8207
#define IDS_COL_DRIVELETTER 8208
#define IDS_COL_DRIVEMAPPING 8209
#define IDS_NO_DRIVE_C 8210
/* graphics */ /* graphics */
#define IDC_ENABLE_MANAGED 1100 #define IDC_ENABLE_MANAGED 1100
#define IDC_DX_MOUSE_GRAB 1102 #define IDC_DX_MOUSE_GRAB 1102
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment