Mercurial > mplayer.hg
comparison gui/win32/gui.c @ 34162:9b1b7d46b8d0
Change Win32 GUI window captions.
Use the same captions as the X11/GTK GUI does.
author | ib |
---|---|
date | Tue, 25 Oct 2011 13:40:30 +0000 |
parents | 1c4302df9dcf |
children | 95c396eb89ab |
comparison
equal
deleted
inserted
replaced
34161:64a0c61c6f18 | 34162:9b1b7d46b8d0 |
---|---|
1367 wc.cbWndExtra = 0; | 1367 wc.cbWndExtra = 0; |
1368 wc.hInstance = instance; | 1368 wc.hInstance = instance; |
1369 wc.hCursor = LoadCursor(NULL, IDC_ARROW); | 1369 wc.hCursor = LoadCursor(NULL, IDC_ARROW); |
1370 wc.hIcon = gui->icon; | 1370 wc.hIcon = gui->icon; |
1371 wc.hbrBackground = NULL; //WM_PAINT will handle background color switching; | 1371 wc.hbrBackground = NULL; //WM_PAINT will handle background color switching; |
1372 wc.lpszClassName = "MPlayer Sub for Windows"; | 1372 wc.lpszClassName = "MPlayer - Video"; |
1373 wc.lpszMenuName = NULL; | 1373 wc.lpszMenuName = NULL; |
1374 RegisterClass(&wc); | 1374 RegisterClass(&wc); |
1375 | 1375 |
1376 /* create the sub window menu */ | 1376 /* create the sub window menu */ |
1377 create_submenu(gui); | 1377 create_submenu(gui); |
1395 if (x <= -1 || (x+(rect.right-rect.left) > GetSystemMetrics(SM_CXSCREEN))) | 1395 if (x <= -1 || (x+(rect.right-rect.left) > GetSystemMetrics(SM_CXSCREEN))) |
1396 x = CW_USEDEFAULT; | 1396 x = CW_USEDEFAULT; |
1397 if (y <= -1 || (y+(rect.bottom-rect.top) > GetSystemMetrics(SM_CYSCREEN))) | 1397 if (y <= -1 || (y+(rect.bottom-rect.top) > GetSystemMetrics(SM_CYSCREEN))) |
1398 y = x; | 1398 y = x; |
1399 | 1399 |
1400 hWnd = CreateWindowEx(0, "MPlayer Sub for Windows", "MPlayer for Windows", style, | 1400 hWnd = CreateWindowEx(0, "MPlayer - Video", "MPlayer - Video", style, |
1401 x, y, rect.right-rect.left, rect.bottom-rect.top, | 1401 x, y, rect.right-rect.left, rect.bottom-rect.top, |
1402 gui->subwindow, NULL, instance, NULL); | 1402 gui->subwindow, NULL, instance, NULL); |
1403 | 1403 |
1404 /* load all the window images */ | 1404 /* load all the window images */ |
1405 window_render(gui, hWnd, hdc, priv, desc, binfo); | 1405 window_render(gui, hWnd, hdc, priv, desc, binfo); |
1474 wc.cbWndExtra = 0; | 1474 wc.cbWndExtra = 0; |
1475 wc.hInstance = instance; | 1475 wc.hInstance = instance; |
1476 wc.hCursor = LoadCursor(NULL, IDC_ARROW); | 1476 wc.hCursor = LoadCursor(NULL, IDC_ARROW); |
1477 wc.hIcon = gui->icon; | 1477 wc.hIcon = gui->icon; |
1478 wc.hbrBackground = CreateSolidBrush(RGB(0, 0, 0)); | 1478 wc.hbrBackground = CreateSolidBrush(RGB(0, 0, 0)); |
1479 wc.lpszClassName = gui->classname = "MPlayer GUI for Windows"; | 1479 wc.lpszClassName = gui->classname = "MPlayer"; |
1480 wc.lpszMenuName = NULL; | 1480 wc.lpszMenuName = NULL; |
1481 RegisterClass(&wc); | 1481 RegisterClass(&wc); |
1482 | 1482 |
1483 /* create a context menu */ | 1483 /* create a context menu */ |
1484 create_menu(gui); | 1484 create_menu(gui); |
1510 { | 1510 { |
1511 y = ((GetSystemMetrics(SM_CYSCREEN)-40) - (rect.bottom-rect.top)); | 1511 y = ((GetSystemMetrics(SM_CYSCREEN)-40) - (rect.bottom-rect.top)); |
1512 gui_main_pos_y = y; | 1512 gui_main_pos_y = y; |
1513 } | 1513 } |
1514 | 1514 |
1515 hwnd = CreateWindowEx(0, gui->classname, "MPlayer for Windows", style, | 1515 hwnd = CreateWindowEx(0, gui->classname, "MPlayer", style, |
1516 x, y, rect.right-rect.left, rect.bottom-rect.top, | 1516 x, y, rect.right-rect.left, rect.bottom-rect.top, |
1517 gui->mainwindow, NULL, instance, NULL); | 1517 gui->mainwindow, NULL, instance, NULL); |
1518 | 1518 |
1519 /* set the systray icon properties */ | 1519 /* set the systray icon properties */ |
1520 nid.cbSize = sizeof(NOTIFYICONDATA); | 1520 nid.cbSize = sizeof(NOTIFYICONDATA); |
1521 nid.hWnd = hwnd; | 1521 nid.hWnd = hwnd; |
1522 nid.uID = 1; | 1522 nid.uID = 1; |
1523 nid.uFlags = NIF_MESSAGE | NIF_ICON | NIF_TIP; | 1523 nid.uFlags = NIF_MESSAGE | NIF_ICON | NIF_TIP; |
1524 nid.uCallbackMessage = WM_SYSTRAY; | 1524 nid.uCallbackMessage = WM_SYSTRAY; |
1525 nid.hIcon = gui->icon; | 1525 nid.hIcon = gui->icon; |
1526 strcpy(nid.szTip, "MPlayer for Windows"); | 1526 strcpy(nid.szTip, "MPlayer"); |
1527 | 1527 |
1528 /* register the systray icon */ | 1528 /* register the systray icon */ |
1529 Shell_NotifyIcon(NIM_ADD, &nid); | 1529 Shell_NotifyIcon(NIM_ADD, &nid); |
1530 | 1530 |
1531 /* load all the window images */ | 1531 /* load all the window images */ |
1546 | 1546 |
1547 gui_t *create_gui(char *skindir, void (*playercontrol)(int event)) | 1547 gui_t *create_gui(char *skindir, void (*playercontrol)(int event)) |
1548 { | 1548 { |
1549 gui_t *gui = calloc(1, sizeof(gui_t)); | 1549 gui_t *gui = calloc(1, sizeof(gui_t)); |
1550 char temp[MAX_PATH]; | 1550 char temp[MAX_PATH]; |
1551 HWND runningmplayer = FindWindow("MPlayer GUI for Windows", "MPlayer for Windows"); | 1551 HWND runningmplayer = FindWindow("MPlayer", "MPlayer"); |
1552 | 1552 |
1553 if(runningmplayer) | 1553 if(runningmplayer) |
1554 { | 1554 { |
1555 free(gui); | 1555 free(gui); |
1556 return NULL; | 1556 return NULL; |