儲存庫 vbox 的更動 17150
- 時間撮記:
- 2009-2-26 上午10:40:43 (16 年 以前)
- 位置:
- trunk/src/VBox/Frontends/VirtualBox
- 檔案:
-
- 修改 6 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/VBox/Frontends/VirtualBox/include/VBoxUtils-darwin.h
r17147 r17150 72 72 ********************************************************************************/ 73 73 void darwinSetShowsToolbarButtonImpl (NativeWindowRef aWindow, bool aEnabled); 74 void darwinSetShowsResizeIndicatorImpl (NativeWindowRef aWindow, bool aEnabled); 75 void darwinSetHidesAllTitleButtonsImpl (NativeWindowRef aWindow); 74 76 void darwinSetMouseCoalescingEnabled (bool aEnabled); 75 77 … … 123 125 ********************************************************************************/ 124 126 void darwinSetShowsToolbarButton (QToolBar *aToolBar, bool aEnabled); 127 void darwinSetShowsResizeIndicator (QWidget *aWidget, bool aEnabled); 128 void darwinSetHidesAllTitleButtons (QWidget *aWidget); 125 129 void darwinDisableIconsInMenus (void); 126 130 … … 130 134 * 131 135 ********************************************************************************/ 136 void darwinWindowAnimateResize (QWidget *aWidget, const QRect &aTarget); 132 137 QString darwinSystemLanguage (void); 133 138 QPixmap darwinCreateDragPixmap (const QPixmap& aPixmap, const QString &aText); 134 void darwinWindowAnimateResize (QWidget *aWidget, const QRect &aTarget);135 139 136 140 -
trunk/src/VBox/Frontends/VirtualBox/src/QIDialog.cpp
r17126 r17150 47 47 setFixedSize (size()); 48 48 #ifdef Q_WS_MAC 49 # ifdef QT_MAC_USE_COCOA 50 /** @todo Carbon -> Cocoa */ 51 # else 52 ChangeWindowAttributes (::darwinToNativeWindow (this), kWindowNoAttributes, kWindowResizableAttribute); 53 # endif 49 ::darwinSetShowsResizeIndicator (this, false); 54 50 #endif /* Q_WS_MAC */ 55 51 } -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxSettingsDialog.cpp
r17147 r17150 299 299 setFixedSize (ss); 300 300 } 301 ::darwinSetShowsResizeIndicator (this, false); 301 302 #endif /* !Q_WS_MAC */ 302 303 # ifdef VBOX_GUI_WITH_TOOLBAR_SETTINGS … … 414 415 int minWidth = mSelector->minWidth(); 415 416 #ifdef Q_WS_MAC 417 /* Remove all title bar buttons (Buggy Qt) */ 418 ::darwinSetHidesAllTitleButtons (this); 419 416 420 /* Set all size policies to ignored */ 417 421 for (int i = 0; i < mStack->count(); ++i) -
trunk/src/VBox/Frontends/VirtualBox/src/darwin/VBoxUtils-darwin-carbon.cpp
r17147 r17150 30 30 NativeWindowRef darwinToNativeWindowImpl (NativeViewRef aView) 31 31 { 32 return reinterpret_cast<WindowRef> (::HIViewGetWindow (aView)); 32 if (aView) 33 return reinterpret_cast<WindowRef> (::HIViewGetWindow (aView)); 34 return NULL; 33 35 } 34 36 35 37 void darwinSetShowsToolbarButtonImpl (NativeWindowRef aWindow, bool aEnabled) 36 38 { 37 int err = ::ChangeWindowAttributes (aWindow, aEnabled ? kWindowToolbarButtonAttribute:kWindowNoAttributes, 38 aEnabled ? kWindowNoAttributes:kWindowToolbarButtonAttribute); 39 int err = ::ChangeWindowAttributes (aWindow, aEnabled ? kWindowToolbarButtonAttribute : kWindowNoAttributes, 40 aEnabled ? kWindowNoAttributes : kWindowToolbarButtonAttribute); 41 AssertCarbonOSStatus (err); 42 } 43 44 void darwinSetShowsResizeIndicatorImpl (NativeWindowRef aWindow, bool aEnabled) 45 { 46 int err = ::ChangeWindowAttributes (aWindow, aEnabled ? kWindowResizableAttribute : kWindowNoAttributes, 47 aEnabled ? kWindowNoAttributes : kWindowResizableAttribute); 39 48 AssertCarbonOSStatus (err); 40 49 } … … 42 51 void darwinSetMouseCoalescingEnabled (bool aEnabled) 43 52 { 44 ::SetMouseCoalescingEnabled (aEnabled, NULL); 53 int err = ::SetMouseCoalescingEnabled (aEnabled, NULL); 54 AssertCarbonOSStatus (err); 45 55 } 46 56 … … 48 58 { 49 59 HIRect r = CGRectMake (x, y, width, height); 50 TransitionWindowWithOptions (aWidget, kWindowSlideTransitionEffect, kWindowResizeTransitionAction, &r, false, NULL); 51 } 52 60 int err = ::TransitionWindowWithOptions (aWidget, 61 kWindowSlideTransitionEffect, 62 kWindowResizeTransitionAction, 63 &r, 64 false, 65 NULL); 66 AssertCarbonOSStatus (err); 67 } 53 68 54 69 -
trunk/src/VBox/Frontends/VirtualBox/src/darwin/VBoxUtils-darwin-cocoa.m
r17147 r17150 33 33 if (aView) 34 34 return [aView window]; 35 return 0;35 return NULL; 36 36 } 37 37 … … 39 39 { 40 40 [aWindow setShowsToolbarButton:aEnabled]; 41 } 42 43 void darwinSetShowsResizeIndicatorImpl (NativeWindowRef aWindow, bool aEnabled) 44 { 45 [aWindow setShowsResizeIndicator:aEnabled]; 46 } 47 48 void darwinSetHidesAllTitleButtonsImpl (NativeWindowRef aWindow) 49 { 50 NSButton *closeButton = [aWindow standardWindowButton:NSWindowCloseButton]; 51 if (closeButton != Nil) 52 [closeButton setHidden:YES]; 53 NSButton *minButton = [aWindow standardWindowButton:NSWindowMiniaturizeButton]; 54 if (minButton != Nil) 55 [minButton setHidden:YES]; 56 NSButton *zoomButton = [aWindow standardWindowButton:NSWindowZoomButton]; 57 if (zoomButton != Nil) 58 [zoomButton setHidden:YES]; 59 NSButton *iconButton = [aWindow standardWindowButton:NSWindowDocumentIconButton]; 60 if (iconButton != Nil) 61 [iconButton setHidden:YES]; 41 62 } 42 63 … … 68 89 [aWindow setFrame:windowFrame display:YES animate:YES]; 69 90 } 91 -
trunk/src/VBox/Frontends/VirtualBox/src/darwin/VBoxUtils-darwin.cpp
r17147 r17150 41 41 NativeWindowRef darwinToNativeWindow (QWidget *aWidget) 42 42 { 43 return darwinToNativeWindowImpl (::darwinToNativeView (aWidget));43 return ::darwinToNativeWindowImpl (::darwinToNativeView (aWidget)); 44 44 } 45 45 46 46 NativeWindowRef darwinToNativeWindow (NativeViewRef aView) 47 47 { 48 return darwinToNativeWindowImpl (aView);48 return ::darwinToNativeWindowImpl (aView); 49 49 } 50 50 … … 53 53 QWidget *parent = aToolBar->parentWidget(); 54 54 if (parent) 55 darwinSetShowsToolbarButtonImpl (::darwinToNativeWindow (parent), aEnabled);55 ::darwinSetShowsToolbarButtonImpl (::darwinToNativeWindow (parent), aEnabled); 56 56 } 57 57 58 58 void darwinWindowAnimateResize (QWidget *aWidget, const QRect &aTarget) 59 59 { 60 darwinWindowAnimateResizeImpl (::darwinToNativeWindow (aWidget), aTarget.x(), aTarget.y(), aTarget.width(), aTarget.height()); 60 ::darwinWindowAnimateResizeImpl (::darwinToNativeWindow (aWidget), aTarget.x(), aTarget.y(), aTarget.width(), aTarget.height()); 61 } 62 63 void darwinSetHidesAllTitleButtons (QWidget *aWidget) 64 { 65 #ifdef QT_MAC_USE_COCOA 66 /* Currently only necessary in the Cocoa version */ 67 ::darwinSetHidesAllTitleButtonsImpl (::darwinToNativeWindow (aWidget)); 68 #else /* QT_MAC_USE_COCOA */ 69 NOREF (aWidget); 70 #endif /* !QT_MAC_USE_COCOA */ 71 } 72 73 void darwinSetShowsResizeIndicator (QWidget *aWidget, bool aEnabled) 74 { 75 ::darwinSetShowsResizeIndicatorImpl (::darwinToNativeWindow (aWidget), aEnabled); 61 76 } 62 77
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器