[MPlayer-cvslog] r34478 - in trunk/gui/win32: dialogs.h preferences.c wincfg.c

ib subversion at mplayerhq.hu
Sat Dec 31 14:15:31 CET 2011


Author: ib
Date: Sat Dec 31 14:15:30 2011
New Revision: 34478

Log:
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).

Modified:
   trunk/gui/win32/dialogs.h
   trunk/gui/win32/preferences.c
   trunk/gui/win32/wincfg.c

Modified: trunk/gui/win32/dialogs.h
==============================================================================
--- trunk/gui/win32/dialogs.h	Sat Dec 31 13:55:28 2011	(r34477)
+++ trunk/gui/win32/dialogs.h	Sat Dec 31 14:15:30 2011	(r34478)
@@ -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

Modified: trunk/gui/win32/preferences.c
==============================================================================
--- trunk/gui/win32/preferences.c	Sat Dec 31 13:55:28 2011	(r34477)
+++ trunk/gui/win32/preferences.c	Sat Dec 31 14:15:30 2011	(r34478)
@@ -61,11 +61,9 @@ static void set_defaults(void)
 
 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 @@ static LRESULT CALLBACK PrefsWndProc(HWN
                                  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 @@ static LRESULT CALLBACK PrefsWndProc(HWN
                                           (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 @@ static LRESULT CALLBACK PrefsWndProc(HWN
             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 @@ static LRESULT CALLBACK PrefsWndProc(HWN
                     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 @@ static LRESULT CALLBACK PrefsWndProc(HWN
                     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;

Modified: trunk/gui/win32/wincfg.c
==============================================================================
--- trunk/gui/win32/wincfg.c	Sat Dec 31 13:55:28 2011	(r34477)
+++ trunk/gui/win32/wincfg.c	Sat Dec 31 14:15:30 2011	(r34478)
@@ -70,8 +70,6 @@ static const m_option_t gui_opts[] =
     {   "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 },


More information about the MPlayer-cvslog mailing list