photosgallery/viewframework/commandhandlers/commoncommandhandlers/src/glxcommandhandlerdelete.cpp
changeset 3 9a9c174934f5
parent 0 4e91876724a2
child 25 191387a8b767
--- a/photosgallery/viewframework/commandhandlers/commoncommandhandlers/src/glxcommandhandlerdelete.cpp	Mon Jan 18 20:19:20 2010 +0200
+++ b/photosgallery/viewframework/commandhandlers/commoncommandhandlers/src/glxcommandhandlerdelete.cpp	Tue Jan 26 11:58:28 2010 +0200
@@ -89,6 +89,11 @@
     info.iMinSelectionLength = 1;
     info.iDisallowSystemItems = aIsContainerList;
    	AddCommandL(info);
+   	
+   	TCommandInfo singleclkinfo( EGlxCmdSingleClickDelete );
+    singleclkinfo.iMinSelectionLength = 1;
+    singleclkinfo.iDisallowSystemItems = aIsContainerList;
+    AddCommandL(singleclkinfo);
 	}
 
 // ---------------------------------------------------------------------------
@@ -228,11 +233,6 @@
                     //it means we are in img viewer.
                     fullscreenViewingMode = ETrue;
                     }
-                else
-                    {
-                     //it means we are in grid view.
-                    fullscreenViewingMode = EFalse;
-                    }
                 } 
             else 
                 {
@@ -242,10 +242,17 @@
             }
         CleanupStack::PopAndDestroy( naviState );
         aNavigationalState->Close();
-        if(EGlxCmdDelete==aCommandId && (0 == aList.Count() ) && !fullscreenViewingMode)
+        if (EGlxCmdDelete==aCommandId && 0 == aList.Count() &&
+		                                 !fullscreenViewingMode)
             {   
             return ETrue;
             }
+        
+        if (EGlxCmdSingleClickDelete==aCommandId && 0 == aList.SelectionCount())
+            {
+            return ETrue;
+            }
+        
         return EFalse;
         }
 //end of file