changeset 34390:9082a0976655

Remove options cdrom_device and dvd_device from the Win32 GUI. Windows determines these devices by directly checking all drives for type CDROM (and may handle even multiple of them).
author ib
date Sat, 31 Dec 2011 13:15:30 +0000
parents b2d661762e90
children 6b558b00939a
files gui/win32/dialogs.h gui/win32/preferences.c gui/win32/wincfg.c
diffstat 3 files changed, 1 insertions(+), 56 deletions(-) [+]
line wrap: on
line diff
--- a/gui/win32/dialogs.h	Sat Dec 31 12:55:28 2011 +0000
+++ b/gui/win32/dialogs.h	Sat Dec 31 13:15:30 2011 +0000
@@ -68,8 +68,6 @@
 #define ID_OSD1              34
 #define ID_OSD2              35
 #define ID_OSD3              36
-#define ID_DVDDEVICE         37
-#define ID_CDDEVICE          38
 #define ID_PRIO              39
 #define ID_URL               40
 #define ID_TITLESEL          41
--- a/gui/win32/preferences.c	Sat Dec 31 12:55:28 2011 +0000
+++ b/gui/win32/preferences.c	Sat Dec 31 13:15:30 2011 +0000
@@ -61,11 +61,9 @@
 
 static LRESULT CALLBACK PrefsWndProc(HWND hwnd, UINT iMsg, WPARAM wParam, LPARAM lParam)
 {
-    HWND btn, label, edit1, edit2, edit3, updown1, updown2, track1, track2;
+    HWND btn, label, edit1, edit2, updown1, updown2, track1, track2;
     static HWND vo_driver, ao_driver, prio;
     int i = 0, j = 0;
-    char dvddevice[MAX_PATH];
-    char cdromdevice[MAX_PATH];
     char procprio[11];
     float x = 10.0, y = 100.0, stereopos, delaypos;
     stereopos = gtkAOExtraStereoMul * x;
@@ -111,20 +109,6 @@
                                  NULL);
             SendMessage(label, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);
 
-            label = CreateWindow("static", acp(MSGTR_PREFERENCES_DVDDevice),
-                                 WS_CHILD | WS_VISIBLE | SS_RIGHT,
-                                 55, 387, 100, 15, hwnd,
-                                 NULL, ((LPCREATESTRUCT) lParam) -> hInstance,
-                                 NULL);
-            SendMessage(label, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);
-
-            label = CreateWindow("static", acp(MSGTR_PREFERENCES_CDROMDevice),
-                                 WS_CHILD | WS_VISIBLE | SS_RIGHT,
-                                 185, 387, 100, 15, hwnd,
-                                 NULL, ((LPCREATESTRUCT) lParam) -> hInstance,
-                                 NULL);
-            SendMessage(label, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);
-
             label = CreateWindow("static", acp(MSGTR_PREFERENCES_Priority),
                                  WS_CHILD | WS_VISIBLE | SS_RIGHT,
                                  200, 286, 100, 15, hwnd,
@@ -360,25 +344,6 @@
                                           (HWND)edit2, 0, 0, 0);
             SendDlgItemMessage(hwnd, ID_UPDOWN2, UDM_SETRANGE32, (WPARAM)0, (LPARAM)10000);
 
-            /* dvd and cd devices */
-            edit3 = CreateWindowEx(WS_EX_CLIENTEDGE, "edit", NULL,
-                                   WS_CHILD | WS_VISIBLE |
-                                   ES_LEFT | ES_AUTOHSCROLL,
-                                   165, 384, 20, 20, hwnd,
-                                   (HMENU) ID_DVDDEVICE,
-                                   ((LPCREATESTRUCT) lParam) -> hInstance,
-                                   NULL);
-            SendMessage(edit3, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);
-
-            edit3 = CreateWindowEx(WS_EX_CLIENTEDGE, "edit", NULL,
-                                   WS_CHILD | WS_VISIBLE |
-                                   ES_LEFT| ES_AUTOHSCROLL,
-                                   295, 384, 20, 20, hwnd,
-                                   (HMENU) ID_CDDEVICE,
-                                   ((LPCREATESTRUCT) lParam) -> hInstance,
-                                   NULL);
-            SendMessage(edit3, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);
-
             while(video_out_drivers[i])
             {
                 const vo_info_t *info = video_out_drivers[i++]->info;
@@ -476,14 +441,6 @@
             else if(osd_level == 3)
                 SendDlgItemMessage(hwnd, ID_OSD3, BM_SETCHECK, 1, 0);
 
-            if(dvd_device)
-                SendDlgItemMessage(hwnd, ID_DVDDEVICE, WM_SETTEXT, 0, (LPARAM)dvd_device);
-            else SendDlgItemMessage(hwnd, ID_DVDDEVICE, WM_SETTEXT, 0, (LPARAM)"D:");
-
-            if(cdrom_device)
-                SendDlgItemMessage(hwnd, ID_CDDEVICE, WM_SETTEXT, 0, (LPARAM)cdrom_device);
-            else SendDlgItemMessage(hwnd, ID_CDDEVICE, WM_SETTEXT, 0, (LPARAM)"D:");
-
             if(proc_priority)
                 SendDlgItemMessage(hwnd, ID_PRIO, CB_SETCURSEL,
                                    (WPARAM)SendMessage(prio, CB_FINDSTRING, -1,
@@ -577,8 +534,6 @@
                     SendDlgItemMessage(hwnd, ID_OSD1, BM_SETCHECK, 1, 0);
                     SendDlgItemMessage(hwnd, ID_OSD2, BM_SETCHECK, 0, 0);
                     SendDlgItemMessage(hwnd, ID_OSD3, BM_SETCHECK, 0, 0);
-                    SendDlgItemMessage(hwnd, ID_DVDDEVICE, WM_SETTEXT, 0, (LPARAM)"D:");
-                    SendDlgItemMessage(hwnd, ID_CDDEVICE, WM_SETTEXT, 0, (LPARAM)"D:");
                     SendMessage(hwnd, WM_COMMAND, (WPARAM)ID_APPLY, 0);
                     break;
                 }
@@ -677,12 +632,6 @@
                     else if(SendDlgItemMessage(hwnd, ID_OSD3, BM_GETCHECK, 0, 0) == BST_CHECKED)
                         osd_level = 3;
 
-                    /* dvd and cd devices */
-                    SendDlgItemMessage(hwnd, ID_DVDDEVICE, WM_GETTEXT, MAX_PATH, (LPARAM)dvddevice);
-                    dvd_device = strdup(dvddevice);
-                    SendDlgItemMessage(hwnd, ID_CDDEVICE, WM_GETTEXT, MAX_PATH, (LPARAM)cdromdevice);
-                    cdrom_device = strdup(cdromdevice);
-
                     MessageBox(hwnd, acp(MSGTR_PREFERENCES_Message), acp(MSGTR_MSGBOX_LABEL_Warning), MB_OK);
                     DestroyWindow(hwnd);
                     break;
--- a/gui/win32/wincfg.c	Sat Dec 31 12:55:28 2011 +0000
+++ b/gui/win32/wincfg.c	Sat Dec 31 13:15:30 2011 +0000
@@ -70,8 +70,6 @@
     {   "ao_extra_stereo", &gtkAOExtraStereo, CONF_TYPE_FLAG, 0, 0, 1, NULL },
     {   "ao_extra_stereo_coefficient", &gtkAOExtraStereoMul, CONF_TYPE_FLOAT, CONF_RANGE, -10, 10, NULL },
     {   "delay", &audio_delay, CONF_TYPE_FLOAT, CONF_RANGE, -100.0, 100.0, NULL},
-    {   "dvd_device", &dvd_device, CONF_TYPE_STRING, 0, 0, 0, NULL },
-    {   "cdrom_device", &cdrom_device, CONF_TYPE_STRING, 0, 0, 0, NULL },
     {   "osd_level", &osd_level, CONF_TYPE_INT, CONF_RANGE, 0, 3, NULL },
     {   "cache", &gtkCacheOn, CONF_TYPE_FLAG, 0, 0, 1, NULL },
     {   "cache_size", &gtkCacheSize, CONF_TYPE_INT, CONF_RANGE, -1, 65535, NULL },