Again, minor nit... but I think the code would be clearer if you made current_active a gboolean, or changed this if statement to:

if (current_active)

...just so there's no confusion that this is merely a flag/boolean value vs. a count.