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 08:19:11 +0200
On 2001.05.09 01:16:45 +0200 Havoc Pennington wrote:
>
> Ronald Bultje <rbultje ronald bitfreak net> writes:
> > On 2001.05.08 20:53:10 +0200 Havoc Pennington wrote:
> > > Do you gtk_main_quit() to exit gtk_main()?
> >
> > yes
> ...
> > #4 0x400b9043 in gtk_main () from /usr/lib/libgtk-1.2.so.0
>
> You are still in gtk_main(), so the answer is "no" not "yes" ;-)
>
> Maybe you are not calling it when the window closes. Try
> connecting to "destroy" on the window being closed, and
> gtk_main_quit() then.
I already had:
gint delete_event( GtkWidget *widget, GdkEvent *event, gpointer data )
{
return(FALSE);
}
void destroy( GtkWidget *widget, gpointer data )
{
gtk_main_quit();
}
int main( int argc, char *argv[] )
{
[...]
gtk_signal_connect (GTK_OBJECT (window), "delete_event",
GTK_SIGNAL_FUNC (delete_event), NULL);
gtk_signal_connect (GTK_OBJECT (window), "destroy", GTK_SIGNAL_FUNC
(destroy), NULL);
[...]
}
This is weird....:-\
> I forgot to mention that you need to GTK_WIDGET_SET_FLAGS (widget,
> GTK_CAN_FOCUS) in the init function for the widget.
>
Ah, now it works :-), thanks
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]