Re: g_timeout_add / g_idle_remove.



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi

If what u want is to remove the timeout function, just make the callback return
FALSE, and it should do a g_timeout_remove for you.

Otherwise, g_timeout_add returns a gint which can be used to remove the timeout
using g_timout_remove.

HTH
Archit Baweja

Harring Figueiredo <harringf yahoo com> writes:

 Folks,

 What is the argument to pass to g_idle_remove_by_data(gpointer data) ?

 I have the following:

  ...
     g_timeout_add(1000, time_func, aLabel);

  ....
  somewere on a button_clicked callback
  ...
     g_idel_remove_by_data(aLabel);
...

  This is obviously not working (i.e, the fuction keeps being called.) What
data should I pass ? ( I have looked on the source code gmain.c, but there is
no hint on what data to pass.)

  Thanks.Harring.

__________________________________________________
Yahoo! - We Remember
9-11: A tribute to the more than 3,000 lives lost
http://dir.remember.yahoo.com/tribute
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.6 and Gnu Privacy Guard <http://www.gnupg.org/>

iD8DBQE9gC142rWNPKmGjMcRAl5oAJ0UjiHvEuBQ+eYHs+8RJK43FysTXwCeNEOG
xVGuE7CHv8HaSk0ccwbo7j4=
=TN7T
-----END PGP SIGNATURE-----



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]