javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swtlistview.cpp
changeset 23 98ccebc37403
parent 21 2a9601315dfc
child 34 71c436fe3ce0
--- a/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swtlistview.cpp	Mon May 03 12:27:20 2010 +0300
+++ b/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swtlistview.cpp	Fri May 14 15:47:24 2010 +0300
@@ -192,6 +192,8 @@
 #else
         gridFlags |= EAknListBoxMarkableGrid;
 #endif
+        // Enabling marking only by pressing enter key
+        gridFlags |= CEikListBox::EEnterMarks;
 
         // Create control menu
         iMenu = CSwtControlMenu::NewL(iDisplay, NULL, 0);
@@ -2689,15 +2691,7 @@
     {
         GetSelection(iOldSelectionArray);
 
-        TBool shiftKeyPressed = (aKeyEvent.iModifiers & EModifierShift) ||
-                                (aKeyEvent.iModifiers & EModifierLeftShift) ||
-                                (aKeyEvent.iModifiers & EModifierRightShift);
-
-        // Do not offer menu opening ok key event to the grid
-        if ((aKeyEvent.iCode != EKeyOK && aKeyEvent.iCode != EKeyEnter) || shiftKeyPressed)
-        {
-            iGrid->OfferKeyEventL(aKeyEvent, aType);
-        }
+        iGrid->OfferKeyEventL(aKeyEvent, aType);
 
         if (aType == EEventKeyUp)
         {
@@ -2931,22 +2925,16 @@
     }
     else if (aKeyCode == EKeyOK || aKeyCode == EKeyEnter)
     {
-        if (iStyle & KSwtStyleSingle)
+        MSwtCommandArranger* commandArranger = iDisplay.CommandArranger();
+        if (commandArranger)
         {
-            MSwtCommandArranger* commandArranger = iDisplay.CommandArranger();
-            if (commandArranger)
+            if (iStyle & KSwtStyleSingle &&
+                    commandArranger->IsContextSensitiveOperationSet())
             {
-                if (commandArranger->IsContextSensitiveOperationSet())
-                {
-                    return EFalse;
-                }
+                return EFalse;
             }
-            return ETrue;
         }
-        else
-        {
-            return EFalse;
-        }
+        return ETrue;
     }
     return ETrue;
 }