photosgallery/viewframework/uiutilities/src/glxuiutility.cpp
branchRCL_3
changeset 35 420f6808bf21
parent 30 a60acebbbd9d
child 56 b023a8d2866a
equal deleted inserted replaced
32:78ad99c24f08 35:420f6808bf21
    68 const TInt KItemsleft = 0x00000008; //PS key value
    68 const TInt KItemsleft = 0x00000008; //PS key value
    69 /**
    69 /**
    70  * Start Delay for the periodic timer, in microseconds
    70  * Start Delay for the periodic timer, in microseconds
    71  */
    71  */
    72 const TInt KPeriodicStartDelay = 1000000; 
    72 const TInt KPeriodicStartDelay = 1000000; 
    73 
    73 const TInt KIgnoreItemsLeftCount = 5;
    74 //Hg 
    74 //Hg 
    75 //#include <hg/hgcontextutility.h>
    75 //#include <hg/hgcontextutility.h>
    76 
    76 
    77 // TV size constants
    77 // TV size constants
    78 using namespace glxTvOut;
    78 using namespace glxTvOut;
   824 // -----------------------------------------------------------------------------
   824 // -----------------------------------------------------------------------------
   825 //
   825 //
   826 EXPORT_C TInt CGlxUiUtility::GetItemsLeftCount()
   826 EXPORT_C TInt CGlxUiUtility::GetItemsLeftCount()
   827     {
   827     {
   828     TRACER("CGlxUiUtility::GetItemsLeftCount");
   828     TRACER("CGlxUiUtility::GetItemsLeftCount");
   829     TInt leftVariable = 0;
   829     TInt itemsLeftCount = 0;
   830     TInt err = RProperty::Get(KTAGDPSNotification, KItemsleft, leftVariable);
   830     TInt err = RProperty::Get(KTAGDPSNotification, KItemsleft, itemsLeftCount);
   831     GLX_LOG_INFO1("GetItemsLeftCount: GetItemsLeftCount %d", leftVariable);
   831     GLX_LOG_INFO1("GetItemsLeftCount: GetItemsLeftCount %d", itemsLeftCount);
       
   832 
       
   833     // In case of error, enter in the next view. Don't block photos permanently.
       
   834     // [Though this use case is very unlikely]
   832     if (err != KErrNone)
   835     if (err != KErrNone)
   833         {
   836         {
   834         GLX_LOG_INFO1("GetItemsLeftCount: RProperty::Get errorcode %d", err);
   837         GLX_LOG_INFO1("GetItemsLeftCount: RProperty::Get errorcode %d", err);
   835         leftVariable = 0;
   838         itemsLeftCount = 0;
   836         }
   839         }
   837     return leftVariable;
   840 
       
   841     // This case is added as per UI-Improvements.
       
   842     // Use case: Take a pic. open photos from Menu (not "Goto photos")
       
   843     // Progress bar SHOULD NOT be displayed.
       
   844     if (itemsLeftCount <= KIgnoreItemsLeftCount)
       
   845         {
       
   846         GLX_LOG_INFO("GetItemsLeftCount( < KIgnoreItemsLeftCount )");
       
   847         itemsLeftCount = 0;
       
   848         }
       
   849 
       
   850     return itemsLeftCount;
   838     }
   851     }
   839 
   852 
   840 // -----------------------------------------------------------------------------
   853 // -----------------------------------------------------------------------------
   841 // DisplayScreenClearer
   854 // DisplayScreenClearer
   842 // -----------------------------------------------------------------------------
   855 // -----------------------------------------------------------------------------