Re: Spin decrements by itself



alblas <r alblas demon nl> writes: 
(Note: This problem was addressed earlier, I didn't get any reaction.
Maybe because it was in a wrong 'thread'?)

It's a good idea to put possible bug reports in bugzilla.gnome.org;
that way they'll definitely get checked out.  GTK 1.2.x bugs will
probably get processed in the weeks before the next 1.2.x release,
which will probably be early next year, or so. The 2.0.0 release is a
higher priority at the moment. Be sure to put the test program in the
report.

If you don't want to delve into GTK source and figure out exactly
what's happening here, an easy workaround is probably to queue a
one-time idle handler in your value_changed callback (g_idle_add a
function that returns FALSE), then do your work in that handler.
An example:

 static guint idle_handler_id = 0;

 static gboolean 
 idle_func (gpointer data)
 {
    idle_handler_id = 0;

    sleep (1); /* do long calculation */

    /* remove self */
    return FALSE;
 }

 static void
 value_changed_callback (GtkAdjustment *adj, gpointer data)
 {
    if (idle_handler == 0)
      idle_handler_id = g_idle_add (idle_func, data);

 }

etc.

Havoc



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