ZVT/GTK scrolling problem



I am hoping someone with some ZVT widget experience
can help me. We have cross compiled ZVT for
win32/LINUX with GTK+ and it works great on LINUX. On
windows though, we cannot get the scrollbar to work.
If we do not comment out the function static void
zvt_term_fix_scrollbar (ZvtTerm *term) which modifies
the gtk_adjustment and emits the "changed" signal,
then it will freeze.

In our main.c, we have the following three lines of
code at the top.

g_thread_init(NULL);
gtk_set_locale ();
gtk_init (&argc, &argv);

If we reorder them to...

gtk_set_locale ();
gtk_init (&argc, &argv);
g_thread_init(NULL);

then the scroll bar will work but GTK crashes every 30
seconds. Apparently, the threads need to be
initialized before the GTK initialization, but then
the scrollbar wont work. Has anyone seen this before? 
Any solutions, suggestions?
Thanks,
Beck.


/* Here is the code for the function
zvt_term_fix_scrollbar */
static void
zvt_term_fix_scrollbar (ZvtTerm *term)
{
                 
GTK_ADJUSTMENT(term->adjustment)->upper =
                     term->vx->vt.scrollbacklines +
term->vx->vt.height - 1;

                  
GTK_ADJUSTMENT(term->adjustment)->page_increment =
                     term->vx->vt.height - 1;

                  
GTK_ADJUSTMENT(term->adjustment)->page_size =
                     term->vx->vt.height - 1;

                  
GTK_ADJUSTMENT(term->adjustment)->value =
                     term->vx->vt.scrollbackoffset +
term->vx->vt.scrollbacklines;

   gtk_signal_emit_by_name (GTK_OBJECT
(term->adjustment), "changed");

}

/* End Code */



__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  http://personal.mail.yahoo.com/




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