Re: scrollbar once again
- From: Ronald Bultje <rbultje ronald bitfreak net>
- To: gtk-list gnome org
- Subject: Re: scrollbar once again
- Date: Wed, 9 May 2001 10:56:51 +0200
On 2001.05.09 08:58:33 +0200 Helmethead wrote:
> On Wed, May 09, 2001 at 08:19:11AM +0200, Ronald Bultje wrote:
> >
> > 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....:-\
>
> The other explanation that comes to one's mind is you're calling gtk_main
> twice :) might that be the strange case?
I cam as far as to see that the delete/destroy signals don't reach their
respective functions at all.
If it gets delete/destroy, it will unrealize the widget, then destroy the
widget (these commands finish), but then, it doesn't reach the
destroy/delete signal handlers in my app. So it doesn't gtk_main_quit();
So something goes wrong between widget-unrealize/-destroy and
app-delete/-destroy.
I don't know where, though...
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]