VirtualBox

Changeset 2495 in vbox


Ignore:
Timestamp:
May 4, 2007 12:57:03 PM (18 years ago)
Author:
vboxsync
Message:

Fixing statusBar clearing issue for required popup menus.
Currently status bar will be cleared upon aboutToHide() signal received [for required QPopupMenu] only if the last status bar message was posted by this menu item highlighting event.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/include/VBoxConsoleWnd.h

    r2493 r2495  
    150150    void activateSFMenu();
    151151
     152    void statusTipChanged (const QString &);
     153    void clearStatusBar();
     154
    152155    void showIndicatorContextMenu (QIStateIndicator *ind, QContextMenuEvent *e);
    153156
     
    219222    int devicesVRDPMenuSeparatorId;
    220223    int devicesSFMenuSeparatorId;
     224
     225    bool waitForStatusBarChange;
     226    bool statusBarChangedInside;
    221227
    222228#ifdef VBOX_WITH_DEBUGGER_GUI
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleWnd.cpp

    r2493 r2495  
    559559    connect (devicesNetworkMenu, SIGNAL(aboutToShow()), this, SLOT(prepareNetworkMenu()));
    560560
     561    connect (statusBar(), SIGNAL(messageChanged (const QString &)), this, SLOT(statusTipChanged (const QString &)));
     562
    561563    connect (devicesMountFloppyMenu, SIGNAL(activated(int)), this, SLOT(captureFloppy(int)));
    562564    connect (devicesMountDVDMenu, SIGNAL(activated(int)), this, SLOT(captureDVD(int)));
     
    577579     * is constructed of dynamic items only) */
    578580    connect (devicesMountFloppyMenu, SIGNAL (aboutToHide()),
    579              statusBar(), SLOT (clear()));
     581             this, SLOT (clearStatusBar()));
    580582    connect (devicesMountDVDMenu, SIGNAL (aboutToHide()),
    581              statusBar(), SLOT (clear()));
     583             this, SLOT (clearStatusBar()));
    582584    connect (devicesNetworkMenu, SIGNAL (aboutToHide()),
    583              statusBar(), SLOT (clear()));
     585             this, SLOT (clearStatusBar()));
    584586
    585587    connect (helpWebAction, SIGNAL (activated()),
     
    10571059        {
    10581060            StatusTipEvent *ev = (StatusTipEvent*) e;
    1059             ((QMainWindow*)this)->statusBar()->message (ev->mTip);
     1061            statusBar()->message (ev->mTip);
    10601062            break;
    10611063        }
     
    22122214        StatusTipEvent *ev = new StatusTipEvent (tip);
    22132215        QApplication::postEvent (this, ev);
    2214     }
     2216        waitForStatusBarChange = true;
     2217    }
     2218}
     2219
     2220void VBoxConsoleWnd::statusTipChanged (const QString & /*aMes*/)
     2221{
     2222    statusBarChangedInside = waitForStatusBarChange;
     2223    waitForStatusBarChange = false;
     2224}
     2225
     2226void VBoxConsoleWnd::clearStatusBar()
     2227{
     2228    if (statusBarChangedInside)
     2229        statusBar()->clear();
    22152230}
    22162231
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