VirtualBox

Changeset 27678 in vbox


Ignore:
Timestamp:
Mar 24, 2010 5:59:33 PM (15 years ago)
Author:
vboxsync
Message:

FE/Qt: New running VM core: little cleanup for additions downloader.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/runtime
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp

    r27621 r27678  
    14811481        connect(pDl, SIGNAL(downloadFinished(const QString&)),
    14821482                uisession(), SLOT(sltInstallGuestAdditionsFrom(const QString&)));
    1483         /* Some of the modes may show additional info of the download progress. */
    1484         foreach (UIMachineWindow *pWindow, machineWindows())
    1485             pWindow->prepareAdditionsDownloader();
     1483        /* Some of the modes may show additional info of the download progress: */
     1484        emit sigDownloaderAdditionsCreated();
    14861485        /* Start the download: */
    14871486        pDl->startDownload();
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.h

    r27374 r27678  
    8282#endif /* Q_WS_MAC */
    8383
     84signals:
     85
     86    /* Signal to notify listeners about additions downloader created: */
     87    void sigDownloaderAdditionsCreated();
     88
    8489protected:
    8590
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.cpp

    r27624 r27678  
    391391}
    392392
    393 void UIMachineWindow::prepareAdditionsDownloader()
    394 {
    395 }
    396 
    397393void UIMachineWindow::prepareMachineViewContainer()
    398394{
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.h

    r27424 r27678  
    7979    virtual void prepareWindowIcon();
    8080    virtual void prepareConsoleConnections();
    81     virtual void prepareAdditionsDownloader();
    8281    virtual void prepareMachineViewContainer();
    8382    //virtual void loadWindowSettings() {}
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineWindowNormal.cpp

    r27535 r27678  
    142142{
    143143    UIMachineWindow::sltTryClose();
     144}
     145
     146void UIMachineWindowNormal::sltDownloaderAdditionsEmbed()
     147{
     148    /* If there is an additions download running show the process bar: */
     149    if (UIDownloaderAdditions *pDl = UIDownloaderAdditions::current())
     150        statusBar()->addWidget(pDl->processWidget(this), 0);
    144151}
    145152
     
    411418    statusBar()->addPermanentWidget(pIndicatorBox, 0);
    412419
    413     /* Add the additions downloader progress bar to the status bar, if a
    414      * download is actually running. */
    415     prepareAdditionsDownloader();
     420    /* Add the additions downloader progress bar to the status bar,
     421     * if a download is actually running: */
     422    sltDownloaderAdditionsEmbed();
    416423
    417424    /* Create & start timer to update LEDs: */
     
    426433}
    427434
    428 void UIMachineWindowNormal::prepareAdditionsDownloader()
    429 {
    430     /* If there is an Additions download running show the process bar. */
    431     if (UIDownloaderAdditions *pDl = UIDownloaderAdditions::current())
    432         statusBar()->addWidget(pDl->processWidget(this), 0);
    433 }
    434 
    435435void UIMachineWindowNormal::prepareConnections()
    436436{
     
    438438    connect(&vboxGlobal().settings(), SIGNAL(propertyChanged(const char *, const char *)),
    439439            this, SLOT(sltProcessGlobalSettingChange(const char *, const char *)));
     440    /* Setup additions downloader listener: */
     441    connect(machineLogic(), SIGNAL(sigDownloaderAdditionsCreated()), this, SLOT(sltDownloaderAdditionsEmbed()));
    440442}
    441443
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineWindowNormal.h

    r27534 r27678  
    6969    void sltTryClose();
    7070
     71    /* Downloader listeners: */
     72    void sltDownloaderAdditionsEmbed();
     73
    7174private:
    7275
     
    9194    void prepareMenu();
    9295    void prepareStatusBar();
    93     void prepareAdditionsDownloader();
    9496    void prepareConnections();
    9597    void prepareMachineView();
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