Hi,
I used g_timeout_add to call a function every tot seconds (or minutes).
Now I'd want to delete and add dynamically the timer. In other words,
i've a button that initialize the timer, and another button that stop
the timer. So if i click the first button:
std::cout << "Inizialiting timer...\n";
        guint timer_id;
        timer_id = 
g_timeout_add(30000,(GSourceFunc)scansioneDB::acquisisciAux,true);

and

gboolean scansioneDB::acquisisciAux(bool start)
{
        if (!start)
                return 0;
        else {
                std::cout << "Eseguo operazione pianificata...\n";
                return 1;
        }
}

If, from the clicked event of the stop button, I call acquisisciAux
with false parameter this stop the timer??? Or i've to call
g_timeout_add(30000,(GSourceFunc)scansioneDB::acquisisciAux,false)???
--
Ciao da
[EMAIL PROTECTED] (ICQ# 266220356; MSN Messenger: [EMAIL PROTECTED])
"Le battaglie si vincono con gli uomini che si hanno, non con quelli che
si vorrebbero" (Napoleone Bonaparte)
"Le cose che possiedi prima o poi ti possiedono..." (Fight Club)
"Le donne possono avere bambini...gli uomini computers" (Anonimo)
_______________________________________________
gtkmm-list mailing list
gtkmm-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtkmm-list

Reply via email to