Logo Search packages:      
Sourcecode: cairo-dock version File versions

void cairo_dock_downgrade_frequency_state ( CairoDockMeasure *  pMeasureTimer  ) 

Degrade la frequence des mesures. La mesure passe dans un etat moins actif (typiquement utile si la mesure a echouee).

Parameters:
pMeasureTimer la mesure periodique.

Definition at line 481 of file cairo-dock-applet-facility.c.

{
      if (pMeasureTimer->iFrequencyState < CAIRO_DOCK_FREQUENCY_SLEEP)
      {
            pMeasureTimer->iFrequencyState ++;
            int iNewCheckInterval;
            switch (pMeasureTimer->iFrequencyState)
            {
                  case CAIRO_DOCK_FREQUENCY_LOW :
                        iNewCheckInterval = 2 * pMeasureTimer->iCheckInterval;
                  break ;
                  case CAIRO_DOCK_FREQUENCY_VERY_LOW :
                        iNewCheckInterval = 4 * pMeasureTimer->iCheckInterval;
                  break ;
                  case CAIRO_DOCK_FREQUENCY_SLEEP :
                        iNewCheckInterval = 10 * pMeasureTimer->iCheckInterval;
                  break ;
                  default :  // ne doit pas arriver.
                        iNewCheckInterval = pMeasureTimer->iCheckInterval;
                  break ;
            }
            
            cd_message ("degradation de la mesure (etat <- %d/%d)", pMeasureTimer->iFrequencyState, CAIRO_DOCK_NB_FREQUENCIES-1);
            _cairo_dock_restart_timer_with_frequency (pMeasureTimer, iNewCheckInterval);
      }
}


Generated by  Doxygen 1.6.0   Back to index