Re: A callback to destroy the application

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

 



Hi,

I think that your SystemQuit function can be like this:

bool SystemQuit(GtkWidget* widget, GdkEvent* event, gpointer user_data){
     gtk_widget_destroy(widget);
     gtk_main_quit(); 
     return(TRUE);
 }

Tell us if it works fine, ok?

BR,

Afonso

On 6/7/05, jalkadir@xxxxxxxxxx <jalkadir@xxxxxxxxxx> wrote:
> Yes.
> ---
> bool SystemQuit(GtkWidget* widget, GdkEvent* event, gpointer user_data){
>      return(FALSE);
> }
> ----
> Thank you for your prompt reponse.
> > Hi,
> >
> > Could you post here your SystemQuit function?
> >
> > BR,
> >
> > Afonso
> >
> > On 6/6/05, jalkadir@xxxxxxxxxx <jalkadir@xxxxxxxxxx> wrote:
> >> OS: MSW-XP
> >> GTK+: 2.6.X
> >>
> >> Hi!
> >> I have implemented all the callbacks without much problem. However,
> >>
> >> terminating the application using the 'top-right' window button, the
> >>
> >> application stopts but it is still running in the background.
> >> I have written this callbacks to handle this problem, but to no avail:
> >>
> >> gtk_signal_connect(GTK_OBJECT(TopWidget), "delete-event",
> >>                    GTK_SIGNAL_FUNC(SystemQuit), NULL);
> >>
> >> gtk_signal_connect(GTK_OBJECT(TopWidget), "destroy",
> >>                    GTK_SIGNAL_FUNC(SystemQuit), NULL);
> >>
> >>
> >>
> >> Is it because I am using MSW and it sends a different event than UNIX,
> >>
> >> or is it because I have written the callbacks wrongly?
> >>
> >> Thanks
> >> _______________________________________________
> >> 
> >> gtk-list@xxxxxxxxx
> >> http://mail.gnome.org/mailman/listinfo/gtk-list
> >>
> >
> 
>
_______________________________________________

gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list


[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux