~laney/notify-osd/no-double-g_source_remove

« back to all changes in this revision

Viewing changes to src/timings.c

  • Committer: Iain Lane
  • Date: 2013-12-09 15:48:46 UTC
  • Revision ID: iain@orangesquash.org.uk-20131209154846-bp0u901kw3fhacym
g_source_remove() always returns TRUE now; no need to check for this

Show diffs side-by-side

added added

removed removed

Lines of Context:
358
358
                // remove timeout for normal scheduled duration
359
359
                removed_successfully = g_source_remove (priv->timeout_id);
360
360
                priv->timeout_id = 0;
361
 
                g_assert (removed_successfully);
362
361
        }
363
362
 
364
363
        // remove timeout enforcing max. time-limit
365
364
        removed_successfully = g_source_remove (priv->max_timeout_id);
366
365
        priv->max_timeout_id = 0;
367
 
        g_assert (removed_successfully);
368
366
 
369
367
        // halt all timers
370
368
        if (priv->is_paused)
423
421
        g_timer_stop (priv->duration_timer);
424
422
        priv->is_paused = TRUE;
425
423
 
426
 
        // try to get rid of old timeout
 
424
        // get rid of old timeout
427
425
        removed_successfully = g_source_remove (priv->timeout_id);
428
426
        priv->timeout_id = 0;
429
 
        g_assert (removed_successfully);
430
427
 
431
428
        return TRUE;
432
429
}
516
513
                return TRUE;
517
514
        }
518
515
 
519
 
        // try to get rid of old timeout
 
516
        // get rid of old timeout
520
517
        removed_successfully = g_source_remove (priv->timeout_id);
521
 
        g_assert (removed_successfully);
522
518
 
523
519
        // ensure we don't overshoot limit with the on-screen time
524
520
        on_screen_time = _ms_elapsed (priv->duration_timer);