equal
deleted
inserted
replaced
17 |
17 |
18 #include <mpxcollectionpath.h> |
18 #include <mpxcollectionpath.h> |
19 #include <mglxmedialist.h> |
19 #include <mglxmedialist.h> |
20 #include <glxcommandfactory.h> |
20 #include <glxcommandfactory.h> |
21 #include <glxcommandhandlerremovefrom.h> |
21 #include <glxcommandhandlerremovefrom.h> |
|
22 #include <glxcollectionpluginalbums.hrh> |
|
23 #include <glxcommandhandlers.hrh> |
22 #include "OstTraceDefinitions.h" |
24 #include "OstTraceDefinitions.h" |
23 #ifdef OST_TRACE_COMPILER_IN_USE |
25 #ifdef OST_TRACE_COMPILER_IN_USE |
24 #include "glxcommandhandlerremovefromTraces.h" |
26 #include "glxcommandhandlerremovefromTraces.h" |
25 #endif |
27 #endif |
26 |
28 |
41 MGlxMediaList& aMediaList, TBool& aConsume) const |
43 MGlxMediaList& aMediaList, TBool& aConsume) const |
42 { |
44 { |
43 OstTraceFunctionEntry0( GLXCOMMANDHANDLERREMOVEFROM_CREATECOMMANDL_ENTRY ); |
45 OstTraceFunctionEntry0( GLXCOMMANDHANDLERREMOVEFROM_CREATECOMMANDL_ENTRY ); |
44 Q_UNUSED(aCommandId); |
46 Q_UNUSED(aCommandId); |
45 Q_UNUSED(aConsume); |
47 Q_UNUSED(aConsume); |
|
48 |
|
49 CMPXCommand* command = NULL; |
46 CMPXCollectionPath* path = aMediaList.PathLC( |
50 CMPXCollectionPath* path = aMediaList.PathLC( |
47 NGlxListDefs::EPathFocusOrSelection); |
51 NGlxListDefs::EPathFocusOrSelection); |
|
52 |
|
53 if(aCommandId == EGlxCmdRemoveFromFav) |
|
54 { |
|
55 // adding to the favourites |
|
56 TGlxMediaId favId(KGlxCollectionFavoritesId); |
|
57 command = TGlxCommandFactory::RemoveFromContainerCommandLC(favId, *path); |
|
58 } |
|
59 else |
|
60 { |
|
61 command = TGlxCommandFactory::RemoveFromContainerCommandLC(*path); |
|
62 } |
48 |
63 |
49 CMPXCommand* command = TGlxCommandFactory::RemoveFromContainerCommandLC( |
|
50 *path); |
|
51 CleanupStack::Pop(command); |
64 CleanupStack::Pop(command); |
52 CleanupStack::PopAndDestroy(path); |
65 CleanupStack::PopAndDestroy(path); |
53 OstTraceFunctionExit0( GLXCOMMANDHANDLERREMOVEFROM_CREATECOMMANDL_EXIT ); |
66 OstTraceFunctionExit0( GLXCOMMANDHANDLERREMOVEFROM_CREATECOMMANDL_EXIT ); |
54 return command; |
67 return command; |
55 } |
68 } |