VirtualBox

Changeset 11789

Show
Ignore:
Timestamp:
08/28/08 21:51:17 (3 months ago)
Author:
vboxsync
Message:

Fe/Qt4: Preventing form invoking some VM blocked (disabled) menu action through action's shortcut.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/VBox/Frontends/VirtualBox4/src/VBoxConsoleView.cpp

    r11661 r11789  
    31513151 *  is found, activates it and returns true. Otherwise returns false. 
    31523152 */ 
    3153 bool VBoxConsoleView::processHotKey (const QKeySequence &key, const QList<QAction*>& data) 
    3154 
    3155     foreach (QAction *pAction, data) 
     3153bool VBoxConsoleView::processHotKey (const QKeySequence &aKey, 
     3154                                     const QList <QAction*> &aData) 
     3155
     3156    foreach (QAction *pAction, aData) 
    31563157    { 
    31573158        if (QMenu *menu = pAction->menu()) 
    3158             return processHotKey (key, menu->actions()); 
     3159            return processHotKey (aKey, menu->actions()); 
    31593160 
    31603161        QString hotkey = VBoxGlobal::extractKeyFromActionText (pAction->text()); 
    3161         if (!hotkey.isEmpty()) 
    3162         { 
    3163             if (key.matches (QKeySequence (hotkey)) == QKeySequence::ExactMatch) 
     3162        if (pAction->isEnabled() && !hotkey.isEmpty()) 
     3163        { 
     3164            if (aKey.matches (QKeySequence (hotkey)) == QKeySequence::ExactMatch) 
    31643165            { 
    31653166                /* 

© 2008 Sun Microsystems, Inc.
ContactPrivacy policy