winecfg: Let the user specify the drive letter of a to be added drive.
This commit is contained in:
parent
12d1ff8ef6
commit
9d6d3b3b3c
|
@ -124,6 +124,16 @@ BEGIN
|
||||||
PUSHBUTTON "Cancel",IDCANCEL,57,74,45,14,WS_GROUP
|
PUSHBUTTON "Cancel",IDCANCEL,57,74,45,14,WS_GROUP
|
||||||
END
|
END
|
||||||
|
|
||||||
|
IDD_DRIVECHOOSE DIALOG DISCARDABLE 60, 70, 170, 60
|
||||||
|
STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
|
||||||
|
CAPTION "Select Drive Letter"
|
||||||
|
FONT 8, "MS Shell Dlg"
|
||||||
|
BEGIN
|
||||||
|
COMBOBOX IDC_DRIVESA2Z,15,10,75,230,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||||
|
DEFPUSHBUTTON "OK",IDOK,105,10,45,14,WS_GROUP
|
||||||
|
PUSHBUTTON "Cancel",IDCANCEL,105,30,45,14,WS_GROUP
|
||||||
|
END
|
||||||
|
|
||||||
IDD_DRIVECFG DIALOG DISCARDABLE 0, 0, 260, 250
|
IDD_DRIVECFG DIALOG DISCARDABLE 0, 0, 260, 250
|
||||||
STYLE WS_CHILD | WS_DISABLED
|
STYLE WS_CHILD | WS_DISABLED
|
||||||
FONT 8, "MS Shell Dlg"
|
FONT 8, "MS Shell Dlg"
|
||||||
|
|
|
@ -125,6 +125,16 @@ BEGIN
|
||||||
PUSHBUTTON "Annuleren",IDCANCEL,57,74,45,14,WS_GROUP
|
PUSHBUTTON "Annuleren",IDCANCEL,57,74,45,14,WS_GROUP
|
||||||
END
|
END
|
||||||
|
|
||||||
|
IDD_DRIVECHOOSE DIALOG DISCARDABLE 60, 70, 170, 60
|
||||||
|
STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
|
||||||
|
CAPTION "Selecteer Stationsletter"
|
||||||
|
FONT 8, "MS Shell Dlg"
|
||||||
|
BEGIN
|
||||||
|
COMBOBOX IDC_DRIVESA2Z,15,10,75,230,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||||
|
DEFPUSHBUTTON "OK",IDOK,105,10,45,14,WS_GROUP
|
||||||
|
PUSHBUTTON "Annuleren",IDCANCEL,105,30,45,14,WS_GROUP
|
||||||
|
END
|
||||||
|
|
||||||
IDD_DRIVECFG DIALOG DISCARDABLE 0, 0, 260, 250
|
IDD_DRIVECFG DIALOG DISCARDABLE 0, 0, 260, 250
|
||||||
STYLE WS_CHILD | WS_DISABLED
|
STYLE WS_CHILD | WS_DISABLED
|
||||||
FONT 8, "MS Shell Dlg"
|
FONT 8, "MS Shell Dlg"
|
||||||
|
|
|
@ -291,6 +291,47 @@ static void on_options_click(HWND dialog)
|
||||||
SendMessage(GetParent(dialog), PSM_CHANGED, 0, 0);
|
SendMessage(GetParent(dialog), PSM_CHANGED, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static INT_PTR CALLBACK drivechoose_dlgproc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
|
{
|
||||||
|
static int i, sel;
|
||||||
|
char c;
|
||||||
|
char drive[] = "X:";
|
||||||
|
|
||||||
|
switch(uMsg)
|
||||||
|
{
|
||||||
|
case WM_INITDIALOG:
|
||||||
|
{
|
||||||
|
ULONG mask = ~drive_available_mask(0); /* the mask is now which drives aren't available */
|
||||||
|
for( c = 'A'; c<= 'Z'; c++){
|
||||||
|
drive[0] = c;
|
||||||
|
if(!( mask & (1 << (c - 'A'))))
|
||||||
|
SendDlgItemMessageA( hwndDlg, IDC_DRIVESA2Z, CB_ADDSTRING, 0, (LPARAM) drive);
|
||||||
|
}
|
||||||
|
drive[0] = lParam;
|
||||||
|
SendDlgItemMessageA( hwndDlg, IDC_DRIVESA2Z, CB_SELECTSTRING, 0, (LPARAM) drive);
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
case WM_COMMAND:
|
||||||
|
if(HIWORD(wParam) != BN_CLICKED) break;
|
||||||
|
switch (LOWORD(wParam))
|
||||||
|
{
|
||||||
|
case IDOK:
|
||||||
|
i = SendDlgItemMessageA( hwndDlg, IDC_DRIVESA2Z, CB_GETCURSEL, 0, 0);
|
||||||
|
if( i != CB_ERR){
|
||||||
|
SendDlgItemMessageA( hwndDlg, IDC_DRIVESA2Z, CB_GETLBTEXT, i, (LPARAM) drive);
|
||||||
|
sel = drive[0];
|
||||||
|
} else
|
||||||
|
sel = -1;
|
||||||
|
EndDialog(hwndDlg, sel);
|
||||||
|
return TRUE;
|
||||||
|
case IDCANCEL:
|
||||||
|
EndDialog(hwndDlg, -1);
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
static void on_add_click(HWND dialog)
|
static void on_add_click(HWND dialog)
|
||||||
{
|
{
|
||||||
/* we should allocate a drive letter automatically. We also need
|
/* we should allocate a drive letter automatically. We also need
|
||||||
|
@ -313,7 +354,12 @@ static void on_add_click(HWND dialog)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
WINE_TRACE("allocating drive letter %c\n", new);
|
|
||||||
|
new = DialogBoxParam(0, MAKEINTRESOURCE(IDD_DRIVECHOOSE), dialog, drivechoose_dlgproc, new);
|
||||||
|
|
||||||
|
if( new == -1) return;
|
||||||
|
|
||||||
|
WINE_TRACE("selected drive letter %c\n", new);
|
||||||
|
|
||||||
if (new == 'C')
|
if (new == 'C')
|
||||||
{
|
{
|
||||||
|
|
|
@ -146,6 +146,8 @@
|
||||||
#define IDS_COL_DRIVELETTER 8208
|
#define IDS_COL_DRIVELETTER 8208
|
||||||
#define IDS_COL_DRIVEMAPPING 8209
|
#define IDS_COL_DRIVEMAPPING 8209
|
||||||
#define IDS_NO_DRIVE_C 8210
|
#define IDS_NO_DRIVE_C 8210
|
||||||
|
#define IDD_DRIVECHOOSE 8211
|
||||||
|
#define IDC_DRIVESA2Z 8212
|
||||||
|
|
||||||
/* graphics */
|
/* graphics */
|
||||||
#define IDC_ENABLE_MANAGED 1100
|
#define IDC_ENABLE_MANAGED 1100
|
||||||
|
|
Loading…
Reference in New Issue