Re: scrollbar once again
- From: Ronald Bultje <rbultje ronald bitfreak net>
- To: Havoc Pennington <hp redhat com>
- Cc: gtk-list gnome org
- Subject: Re: scrollbar once again
- Date: Wed, 9 May 2001 00:07:06 +0200
Hello,
On 2001.05.08 20:53:10 +0200 Havoc Pennington wrote:
>
> Ronald Bultje <rbultje ronald bitfreak net> writes:
> > 1) if I close the Gtk-app, control doesn't return to the terminal, so
> it
> > locks somewhere - how do I find out where?
>
> Do you gtk_main_quit() to exit gtk_main()?
yes
> To find out where, just run 'gdb myapp', then after closing the app,
> hit Ctrl-C and type "backtrace"
Program received signal SIGINT, Interrupt.
[Switching to Thread 1024 (LWP 11053)]
0x403a3b97 in __poll (fds=0x807c678, nfds=2, timeout=-1)
at ../sysdeps/unix/sysv/linux/poll.c:63
63 ../sysdeps/unix/sysv/linux/poll.c: No such file or directory.
(gdb) bt
#0 0x403a3b97 in __poll (fds=0x807c678, nfds=2, timeout=-1)
at ../sysdeps/unix/sysv/linux/poll.c:63
#1 0x401a3c58 in g_main_poll (timeout=-1, use_priority=0, priority=0)
at gmain.c:1034
#2 0x401a3641 in g_main_iterate (block=1, dispatch=1) at gmain.c:808
#3 0x401a39cc in g_main_run (loop=0x807c778) at gmain.c:935
#4 0x400b9043 in gtk_main () from /usr/lib/libgtk-1.2.so.0
#5 0x804d1dd in main (argc=1, argv=0xbffff9bc) at test.c:86
#6 0x402e6f31 in __libc_start_main (main=0x804cf6c <main>, argc=1,
ubp_av=0xbffff9bc, init=0x80490c0 <_init>, fini=0x804d22c <_fini>,
rtld_fini=0x4000e274 <_dl_fini>, stack_end=0xbffff9b4)
at ../sysdeps/generic/libc-start.c:129
Doesn't look familiar to me, I'm affraid :-\
> > 2) I cannot grab the keyboard keys (I tried
> > gtk_signal_connect(GTK_WIDGET(enhanced_slider), "key_press_event",
> > (GtkSignalFunc)gtk_enhanced_scale_key_press, NULL);, but that didn't
> work)
>
> You need to handle focus with handlers like this:
>
[...code...]
>
> Also, probably when you get a button press you want to
> gtk_grab_focus().
I inserted the code. Doesn't work either.....:-\
The widget receives the focus_in_event and will trigger the function. But
still no keygrabs....
But the keys aren't that important, really, if it just closes when I close
it I'd be very happy.
Ronald
--
---------------------------------------------------.
-- .-. | Ronald Bultje |
-- /V\ | Running: Linux 2.4.4 and OpenBSD 2.8 |
-- // \\ | E-mail : rbultje ronald bitfreak net |
-- /( )\ | WWW : http://ronald.bitfreak.net/ |
-- ^^-^^ | *** Warning: Unix Addicted *** |
---------------------------------------------------'
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]