VirtualBox

Changeset 32789 in vbox for trunk/src/VBox/Frontends


Ignore:
Timestamp:
Sep 28, 2010 12:55:42 PM (14 years ago)
Author:
vboxsync
Message:

FE/Qt4-OSX: added a Window menu for the selector window

Location:
trunk/src/VBox/Frontends/VirtualBox
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk

    r32760 r32789  
    362362        src/runtime/seamless/UIMachineWindowSeamless.h
    363363
    364 ifdef VBOX_WITH_REGISTRATION
    365  VirtualBox_QT_MOCHDRS += \
    366         src/wizards/registration/UIRegistrationWzd.h
    367 endif
    368 
    369364# Sources containing local definitions of classes that use the Q_OBJECT macro.
    370365VirtualBox_QT_MOCSRCS = \
     
    379374        src/runtime/UIMachineLogic.cpp \
    380375        src/runtime/UIMachineMenuBar.cpp
     376
     377ifeq ($(KBUILD_TARGET),darwin)
     378 VirtualBox_QT_MOCHDRS += \
     379    src/darwin/UIWindowMenuManager.h
     380 VirtualBox_QT_MOCSRCS += \
     381    src/darwin/UIWindowMenuManager.cpp
     382endif
     383
     384ifdef VBOX_WITH_REGISTRATION
     385 VirtualBox_QT_MOCHDRS += \
     386        src/wizards/registration/UIRegistrationWzd.h
     387endif
    381388
    382389ifdef VBOX_WITH_XPCOM
     
    529536        src/runtime/UIFrameBufferQuartz2D.cpp \
    530537        src/darwin/UIAbstractDockIconPreview.cpp \
     538        src/darwin/UIWindowMenuManager.cpp \
    531539        src/darwin/UICocoaDockIconPreview.mm
    532540
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxMediaManagerDlg.cpp

    r32760 r32789  
    4545#include "UIVirtualBoxEventHandler.h"
    4646#endif /* !VBOX_WITH_PRECOMPILED_HEADERS */
     47
     48#ifdef Q_WS_MAC
     49# include "UIWindowMenuManager.h"
     50#endif /* Q_WS_MAC */
    4751
    4852class AddVDMUrlsEvent: public QEvent
     
    381385VBoxMediaManagerDlg::~VBoxMediaManagerDlg()
    382386{
     387#ifdef Q_WS_MAC
     388    if (!mDoSelect)
     389    {
     390        UIWindowMenuManager::instance()->removeWindow(this);
     391        UIWindowMenuManager::instance()->destroyMenu(this);
     392    }
     393#endif /* Q_WS_MAC */
    383394    delete mToolBar;
    384395}
     
    496507    /* Applying language settings */
    497508    retranslateUi();
     509
     510#ifdef Q_WS_MAC
     511    if (!mDoSelect)
     512    {
     513        menuBar()->addMenu(UIWindowMenuManager::instance()->createMenu(this));
     514        UIWindowMenuManager::instance()->addWindow(this);
     515    }
     516#endif /* Q_WS_MAC */
    498517
    499518    mSetupMode = false;
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/VBoxSelectorWnd.cpp

    r32760 r32789  
    4545#ifdef Q_WS_MAC
    4646# include "VBoxUtils.h"
     47# include "UIWindowMenuManager.h"
    4748#endif
    4849
     
    281282    mVMMenu->addAction(mVmShowLogsAction);
    282283
     284#ifdef Q_WS_MAC
     285    menuBar()->addMenu(UIWindowMenuManager::instance(this)->createMenu(this));
     286#endif /* Q_WS_MAC */
     287
    283288    mVMCtxtMenu = new QMenu(this);
    284289    mVMCtxtMenu->addAction(mVmConfigAction);
     
    445450    /* bring the VM list to the focus */
    446451    mVMListView->setFocus();
     452
     453#ifdef Q_WS_MAC
     454    UIWindowMenuManager::instance()->addWindow(this);
     455#endif /* Q_WS_MAC */
    447456}
    448457
     
    461470            .arg(mNormalGeo.width()).arg(mNormalGeo.height());
    462471#ifdef Q_WS_MAC
     472        UIWindowMenuManager::destroy();
    463473        ::darwinUnregisterForUnifiedToolbarContextMenuEvents(this);
    464474        if (::darwinIsWindowMaximized(this))
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette