I think its because indicators are called every second by RR to keep them up to date. Whats happening is RR calls gmailnotifier and your program detects this and runs your code. But then a second later RR again calls gmailnotifier so your code runs again.

To get it to run once I would put a flag variable thats state is changed depending on if offline or not. So something like

I think its because indicators are called every second by RR to keep them up to date. Whats happening is RR calls gmailnotifier and your program detects this and runs your code. But then a second later RR again calls gmailnotifier so your code runs again.

To get it to run once I would put a flag variable thats state is changed depending on if offline or not. So something like