~dylanmccall/unity/panel-drag-frontmost-maximized

« back to all changes in this revision

Viewing changes to src/QuicklistView.cpp

  • Committer: Neil Jagdish Patel
  • Date: 2011-03-10 14:55:11 UTC
  • mfrom: (931.3.1 unity)
  • Revision ID: neil.patel@canonical.com-20110310145511-hlvdww454qhjbebe
[merge] Marco Biscaro fixes Bug #731533: quicklist must respect enabled state

Show diffs side-by-side

added added

removed removed

Lines of Context:
170
170
    // <SPACE>, <RETURN> (activate selected menu-item)          
171
171
    case NUX_VK_SPACE:
172
172
    case NUX_VK_ENTER:
173
 
      if (_current_item_index >= 0 && _current_item_index < GetNumItems ())
 
173
      if (_current_item_index >= 0 && _current_item_index < GetNumItems () &&
 
174
          GetNthItems (_current_item_index)->GetEnabled ())
174
175
      {
175
176
 
176
177
        dbusmenu_menuitem_handle_event (GetNthItems (_current_item_index)->_menuItem,
606
607
void QuicklistView::RecvItemMouseClick (QuicklistMenuItem* item, int x, int y)
607
608
{
608
609
  _mouse_down = false;
609
 
  if (IsVisible ())
 
610
  if (IsVisible () && item->GetEnabled ())
610
611
  {
611
612
    // Check if the mouse was released over an item and emit the signal
612
613
    CheckAndEmitItemSignal (x + item->GetBaseX (), y + item->GetBaseY ());
661
662
  _mouse_down = false;
662
663
  
663
664
  
664
 
  if (IsVisible ())
 
665
  if (IsVisible () && item->GetEnabled ())
665
666
  {
666
667
    // Check if the mouse was released over an item and emit the signal
667
668
    CheckAndEmitItemSignal (x + item->GetBaseX (), y + item->GetBaseY ());