Re: Simple(?) gtk_clist_moveto problem.



"José Miguel R. Barrientos" wrote:
> 
> Karol Bryd wrote:
> >
> > On 14-May-99, José Miguel R. Barrientos <jmiguel@ceselsa.es> wrote:
> >
> > >
> > > The ScrolledWindow Widget has changed in recent releases of Gtk.
> > > In your program, try this:
> > >
> > >    gtk_container_add(GTK_CONTAINER(scrolled_window), gtklist);
> > >
> > > REPLACING this
> > >    gtk_scrolled_window_add_with_viewport(
> > > GTK_SCROLLED_WINDOW(scrolled_window),
> > >                                           gtklist);
> > >
> > >
> > > Ah!, you CANNOT create a list with 0 (zero) columns. Create it with
> > >
> > >    gtklist=gtk_clist_new(1);
> > >
> > >
> > > I've compiled your source with these changes and (apparently) is
> > > working...
> >
> > Thanks for help, it indeed helped. But now I have other problem.
> > I try to write a x11amp plugin, that will display a song's lyrics.
> > I need for this a list view (for lyrics display) with ability of
> > updating it every few seconds. So I have created a thread that will
> > get current time from x11amp and accordingly update a gtk clist
> > (that is why I needed help with gtk_clist_moveto). But it doesn't
> > work...Everything is great but when I add a thread, that is
> > manipulating a clist, it hangs and I get: "Xlib: unexpected async
> > reply (sequence 0x102)", sometimes I even have to restart X...
> >
> > Are there any special functions to manipulate GtkWidgets from
> > other threads? Or maybe should I use gdk's threads?
> >
> > I have included a source code, if you could look at I'd be grateful.
> >
> > Pozdrawiam.
> > --
> > Karol Bryd                                       //
> > http://www.kki.net.pl/~kbryd                  \ //   Team *AMIGA*
> > kbryd@femina.com.pl                           \X/  Powered by Linux
> >
> > The most exhausting thing in life is being insincere.  -- Anne Morrow
> > Lindberg
> >
> >   --------------------------------------------------------------------------------
> >                      Name: plugin.tar.bz2
> >    plugin.tar.bz2    Type: unspecified type (application/octet-stream)
> >                  Encoding: base64
> 
> Perhaps you can better use a timer (see gdk_timer_set() ) in your program. It's
> more simple than use threads.
> 
>         - José Miguel


Sorry, and sorry, .... :)

Nothing about timers, but timeouts

	gtk_timeout_add()


	- José Miguel



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