- Timestamp:
- Apr 28, 2007 6:01:48 PM (18 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/Makefile
r2410 r2411 159 159 src/darwin/DarwinKeyboard.cpp \ 160 160 src/darwin/DarwinCursor.cpp \ 161 src/darwin/VBoxAquaStyle.cpp 161 src/darwin/VBoxAquaStyle.cpp \ 162 src/darwin/VBoxUtils-darwin.cpp 162 163 163 164 ## @todo how to detect what tool is used? -
trunk/src/VBox/Frontends/VirtualBox/VBoxUI.pro
r2139 r2411 241 241 images/vdm_remove_disabled_22px.png \ 242 242 images/welcome.png \ 243 images/about_600px.png 243 images/about_600px.png \ 244 images/dock_128x128_transparent.png 244 245 245 246 TRANSLATIONS = \ -
trunk/src/VBox/Frontends/VirtualBox/include/VBoxConsoleWnd.h
r1435 r2411 34 34 35 35 #ifdef VBOX_WITH_DEBUGGER_GUI 36 #include <VBox/dbggui.h> 37 #endif 36 # include <VBox/dbggui.h> 37 #endif 38 #ifdef Q_WS_MAC 39 # undef PAGE_SIZE 40 # undef PAGE_SHIFT 41 # include <Carbon/Carbon.h> 42 #endif 38 43 39 44 class QAction; … … 265 270 PDBGGUI dbg_gui; 266 271 #endif 272 273 #ifdef Q_WS_MAC 274 // Dock images. 275 CGImageRef dockImgStateRunning; 276 CGImageRef dockImgStatePaused; 277 CGImageRef dockImgStateSaving; 278 CGImageRef dockImgStateRestoring; 279 #endif 267 280 }; 268 281 -
trunk/src/VBox/Frontends/VirtualBox/include/VBoxUtils.h
r2392 r2411 194 194 }; 195 195 196 197 #ifdef Q_WS_MAC 198 # undef PAGE_SIZE 199 # undef PAGE_SHIFT 200 # include <Carbon/Carbon.h> 201 class QImage; 202 class QPixmap; 203 CGImageRef DarwinQImageToCGImage (const QImage *aImage); 204 CGImageRef DarwinQPixmapToCGImage (const QPixmap *aPixmap); 205 CGImageRef DarwinQPixmapFromMimeSourceToCGImage (const char *aSource); 206 CGImageRef DarwinCreateDockBadge (const char *aSource); 207 #endif /* Q_WS_MAC */ 208 196 209 #endif // __VBoxUtils_h__ 197 210 -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleWnd.cpp
r2354 r2411 32 32 #include "VBoxDiskImageManagerDlg.h" 33 33 #include "VBoxSharedFoldersSettings.h" 34 #include "VBoxUtils.h" 34 35 #include "QIStateIndicator.h" 35 36 #include "QIStatusBar.h" … … 155 156 , dbg_gui (NULL) 156 157 #endif 158 #ifdef Q_WS_MAC 159 , dockImgStateRunning (NULL) 160 , dockImgStatePaused (NULL) 161 , dockImgStateSaving (NULL) 162 , dockImgStateRestoring (NULL) 163 #endif 157 164 { 158 165 if (aSelf) … … 516 523 this, SLOT (dbgShowCommandLine())); 517 524 #endif 525 526 #ifdef Q_WS_MAC 527 /* prepare the dock images */ 528 dockImgStateRunning = ::DarwinCreateDockBadge ("state_running_16px.png"); 529 dockImgStatePaused = ::DarwinCreateDockBadge ("state_paused_16px.png"); 530 dockImgStateSaving = ::DarwinCreateDockBadge ("state_saving_16px.png"); 531 dockImgStateRestoring = ::DarwinCreateDockBadge ("state_restoring_16px.png"); 532 OverlayApplicationDockTileImage (dockImgStateRunning); 533 #endif 518 534 } 519 535 … … 522 538 if (mUsbLedTip) 523 539 delete mUsbLedTip; 540 #ifdef Q_WS_MAC 541 /* release the dock images */ 542 if (dockImgStateRunning) 543 CGImageRelease (dockImgStateRunning); 544 if (dockImgStatePaused) 545 CGImageRelease (dockImgStatePaused); 546 if (dockImgStateSaving) 547 CGImageRelease (dockImgStateSaving); 548 if (dockImgStateRestoring) 549 CGImageRelease (dockImgStateRestoring); 550 #endif 524 551 } 525 552 … … 1493 1520 vmDisableMouseIntegrAction->setEnabled (false); 1494 1521 } 1522 #ifdef Q_WS_MAC 1523 if (1)//(element & DockTile) 1524 { 1525 //CGContextDrawImage 1526 //HIViewDrawCGImage(); 1527 //CGImageAlphaInfo 1528 CGImageRef img; 1529 if (machine_state == CEnums::Running) 1530 img = dockImgStateRunning; 1531 else if (machine_state == CEnums::Paused) 1532 img = dockImgStatePaused; 1533 else if (machine_state == CEnums::Restoring) 1534 img = dockImgStateRestoring; 1535 else if (machine_state == CEnums::Saving) 1536 img = dockImgStateSaving; 1537 else 1538 img = NULL; 1539 RestoreApplicationDockTileImage(); 1540 if (img) 1541 OverlayApplicationDockTileImage (img); 1542 } 1543 #endif 1495 1544 } 1496 1545
Note:
See TracChangeset
for help on using the changeset viewer.